/*
 * Riviera Now — connected editorial surfaces.
 * Presentation-only refinements for event cards and event detail. Safe to append to the
 * frozen homepage/Explore build: no layout, navigation or hero selectors are touched.
 */
:root { --ce-ivory: #faf6ee; --ce-card: #fffdf8; --ce-ink: #0d3b38; --ce-teal: #2f8a86; --ce-gold: #b9975b; --ce-edge: rgb(196 170 122 / .34);
  --ce-shadow: inset 0 1px 0 rgb(255 255 255 / .9), 0 1px 2px rgb(92 74 42 / .05), 0 8px 18px -10px rgb(92 74 42 / .16), 0 22px 36px -24px rgb(92 74 42 / .26); }

/* Event cards (DevelopmentEventCard renders article[data-testid^="card-event-"]). */
[data-testid^="card-event-"]:not([data-testid*="card-event-dev"]) {
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
html:not(.dark) [data-testid^="card-event-"] { border-color: var(--ce-edge); }
@media (hover: hover) {
  [data-testid^="card-event-"]:hover { transform: translateY(-2px); box-shadow: var(--ce-shadow); }
  [data-testid^="card-event-"]:hover img { transform: scale(1.035); }
}
[data-testid^="card-event-"] img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
[data-testid^="card-event-"] h3 { letter-spacing: -.01em; text-wrap: balance; }
[data-testid^="card-event-"]:focus-within { outline: 2px solid var(--ce-gold); outline-offset: 3px; }
.home-card[data-testid^="card-event-"] { width: 168px; border-radius: 18px; box-shadow: var(--ce-shadow); }
.home-card[data-testid^="card-event-"] > div:first-child { height: 205px; }
.home-card[data-testid^="card-event-"] > div:last-child { padding: 11px; }
.home-card[data-testid^="card-event-"] h3 { font-size: 16px; height: 38px; line-height: 1.16; }
@media (min-width: 768px) {
  .home-card[data-testid^="card-event-"] { width: 210px; }
  .home-card[data-testid^="card-event-"] > div:first-child { height: 240px; }
}
@media (prefers-reduced-motion: reduce) { [data-testid^="card-event-"], [data-testid^="card-event-"] img { transition: none; transform: none !important; } }

/* Event detail: editorial illustration fallback, explicit unknowns, membership teaser. */
.edp-ref .edp-art { position: relative; margin: 0; aspect-ratio: 3 / 2; border-radius: 24px; overflow: hidden; border: 1px solid var(--ce-edge);
  box-shadow: var(--ce-shadow); background: linear-gradient(135deg, #f7efe0, #e7d3b2); }
.edp-ref .edp-art-img { width: 100%; height: 100%; object-fit: cover; animation: ce-fade .8s ease both; }
.edp-ref .edp-art-missing .edp-art-img { display: none; }
.edp-ref .edp-art-label { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 24px);
  font-size: .72rem; font-weight: 500; color: #fbf6ec; background: rgb(13 47 44 / .62); padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(6px); }
.edp-ref .edp-art-label .edp-badge-ico svg { width: 13px; height: 13px; }
.edp-ref .edp-unknown { font-style: italic; color: #6b7a74; }
.dark .edp-ref .edp-unknown { color: #a9b6b0; }
.edp-ref .edp-member { padding: 22px; border-radius: 22px; color: #f6efe1; background: linear-gradient(160deg, #134e4a, #0d3b38 75%);
  border: 1px solid rgb(185 151 91 / .45); box-shadow: var(--ce-shadow); }
.edp-ref .edp-member-eyebrow { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: #e3c88f; font-weight: 600; }
.edp-ref .edp-member-title { font-size: 1.45rem; line-height: 1.15; margin-top: 6px; }
.edp-ref .edp-member-body { font-size: .9rem; color: #cfdcd6; margin-top: 6px; }
.edp-ref .edp-member-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 8px; font-weight: 600; color: #e3c88f; text-underline-offset: 4px; }
.edp-ref .edp-member-link:hover { text-decoration: underline; }
@keyframes ce-fade { from { opacity: 0; } to { opacity: 1; } }
.edp-ref .edp-art-tag { position: absolute; left: 12px; top: 12px; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #0d3b38; background: rgb(251 246 236 / .92); padding: 4px 10px; border-radius: 999px; box-shadow: 0 1px 3px rgb(0 0 0 / .12); }

/* ---------- CONNECTED membership (follows approved reference: photo hero, logo, script-weight headline, six feature tiles, teal join band) ---------- */
.ms-root .cx-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 0 0 32px 32px; margin: -8px -18px 0; min-height: min(78dvh, 640px);
  display: flex; align-items: flex-end; justify-content: center; text-align: center; }
.ms-root .cx-hero-photo { position: absolute; inset: 0; z-index: -2; object-position: center 40%; animation: cx-drift 22s ease-out both; }
.ms-root .cx-hero-veil { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(250 246 238 / .92) 0%, rgb(250 246 238 / .25) 28%, rgb(250 246 238 / 0) 48%, rgb(250 246 238 / .55) 70%, var(--ms-ivory) 96%); }
.ms-root .cx-hero-inner { width: 100%; padding: 0 20px 34px; display: flex; flex-direction: column; align-items: center; }
.ms-root .cx-logo { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: min(220px, 54vw); height: auto; object-fit: contain; }
.ms-root .cx-eyebrow { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--ms-teal-deep); }
.ms-root .cx-title { font-family: var(--font-display, Fraunces, Georgia, serif); font-style: normal; font-weight: 600; color: #0d3b38;
  font-size: clamp(3.4rem, 15vw, 7rem); line-height: .95; letter-spacing: -.03em; margin-top: 6px; animation: cx-rise .9s cubic-bezier(.2,.7,.2,1) both .1s; }
.ms-root .cx-stroke { display: block; width: min(260px, 60%); height: 4px; border-radius: 99px; margin: 10px auto 12px;
  background: linear-gradient(90deg, transparent, #e2614e 18%, #e2614e 70%, transparent); transform-origin: left; animation: cx-draw .9s ease both .45s; }
.ms-root .cx-sub { font-family: var(--font-display, Fraunces, Georgia, serif); font-size: clamp(1.1rem, 4.4vw, 1.5rem); color: #17322f; animation: cx-rise .9s ease both .3s; }
.ms-root .cx-credit { position: absolute; right: 14px; top: 14px; font-size: .62rem; color: rgb(13 59 56 / .7); }
.dark .ms-root .cx-title, .dark .ms-root .cx-sub { color: #f4ecdc; }
.dark .ms-root .cx-hero-veil { background: linear-gradient(180deg, rgb(250 246 238 / .88), rgb(250 246 238 / .04) 38%, rgb(16 32 30 / .15) 58%, rgb(16 32 30 / .8) 78%, var(--ms-ivory) 97%); }
.dark .ms-root .cx-eyebrow { color: #c8e2d9; }
.ms-root .cx-credit { padding: 3px 6px; border-radius: 4px; background: rgb(250 246 238 / .9); color: #164d47; }
.dark .ms-root .cx-feature:nth-child(2) .cx-f-ico svg,
.dark .ms-root .cx-feature:nth-child(5) .cx-f-ico svg { color: #dcc68f; }

.ms-root .cx-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
@media (min-width: 720px) { .ms-root .cx-features { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.ms-root .cx-feature { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 12px 16px;
  border-radius: 20px; background: var(--ms-card); border: 1px solid var(--ms-gold-soft); box-shadow: var(--ms-shadow); color: inherit; text-decoration: none;
  transition: transform .3s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) { .ms-root a.cx-feature:hover { transform: translateY(-3px); } }
.ms-root a.cx-feature:focus-visible { outline: 2px solid var(--ms-gold); outline-offset: 3px; }
.ms-root .cx-feature h2 { font-weight: 650; font-size: 1rem; line-height: 1.2; margin-top: 4px; }
.ms-root .cx-feature p { font-size: .82rem; line-height: 1.35; color: var(--ms-sub); }
.ms-root .cx-f-ico svg { width: 28px; height: 28px; color: #d9573f; stroke-width: 1.6; }
.ms-root .cx-feature:nth-child(2) .cx-f-ico svg, .ms-root .cx-feature:nth-child(5) .cx-f-ico svg { color: var(--ms-teal-deep); }
.ms-root .cx-feature:nth-child(4) .cx-f-ico svg, .ms-root .cx-feature:nth-child(6) .cx-f-ico svg { color: var(--ms-gold); }
.ms-root .cx-chip { position: absolute; top: 9px; right: 9px; font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 99px; background: rgb(47 138 134 / .12); color: var(--ms-teal-deep); }
.dark .ms-root .cx-chip { color: var(--ms-teal); }
.ms-root .cx-chip-up { background: #e2614e; color: #fff8ef; }
.ms-root .cx-feature-up { background: linear-gradient(180deg, var(--ms-card), rgb(250 240 224 / .6)); }
.dark .ms-root .cx-feature-up { background: var(--ms-card); }

.ms-root .cx-join { margin-top: 22px; display: grid; gap: 18px; padding: 26px 22px; border-radius: 26px; color: #f6efe1;
  background: radial-gradient(120% 140% at 0% 0%, #1d6460 0%, #0f4440 55%, #0b3532 100%); border: 1px solid rgb(185 151 91 / .45); box-shadow: var(--ms-shadow); }
@media (min-width: 720px) { .ms-root .cx-join { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 30px 34px; } .ms-root .cx-join-cta { border-left: 1px solid rgb(246 239 225 / .25); padding-left: 28px; } }
.ms-root .cx-join h2 { font-family: var(--font-display, Fraunces, Georgia, serif); font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.05; }
.ms-root .cx-join p { color: #d4e1db; font-size: .92rem; margin-top: 6px; }
.ms-root .cx-join-cta { text-align: center; }
.ms-root .cx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px; border-radius: 99px;
  background: #ea6b55; color: #fff8ef; font-weight: 650; text-decoration: none; transition: transform .2s ease; }
.ms-root .cx-btn svg { width: 18px; height: 18px; }
.ms-root .cx-btn:active { transform: scale(.97); }
.ms-root .cx-note { margin: 14px 0 26px; justify-content: center; }
@keyframes cx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cx-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cx-drift { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---------- Event detail: related events rail ---------- */
.edp-related { margin-top: 32px; }
.edp-related-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.edp-related-head h2 { font-family: var(--font-display, Fraunces, Georgia, serif); font-size: 1.45rem; }
.edp-related-head p { font-size: .78rem; color: #6b7a74; }
.edp-related-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 2px 6px; }
.edp-related-card { flex: 0 0 210px; scroll-snap-align: start; border-radius: 18px; overflow: hidden; background: var(--ce-card); border: 1px solid var(--ce-edge);
  box-shadow: var(--ce-shadow); color: var(--ce-ink); text-decoration: none; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.dark .edp-related-card { background: #152a27; color: #f1e9da; }
@media (hover: hover) { .edp-related-card:hover { transform: translateY(-2px); } }
.edp-related-card figure { margin: 0; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #f7efe0, #e7d3b2); overflow: hidden; }
.edp-related-card img { width: 100%; height: 100%; object-fit: cover; }
.edp-related-card div { padding: 10px 12px 12px; }
.edp-related-card h3 { font-weight: 650; font-size: .95rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.edp-related-card p { font-size: .76rem; color: #6b7a74; margin-top: 4px; }
.edp-related-card small { display: block; font-size: .62rem; color: #8a958f; margin-top: 4px; }

/* ---------- Homepage / Explore cohesion (presentation only) ---------- */
@media (prefers-reduced-motion: reduce) { .ms-root .cx-title, .ms-root .cx-sub, .ms-root .cx-stroke, .ms-root .cx-hero-photo { animation: none; } }
.edp-ref .edp-member-list { display: grid; gap: 8px; margin-top: 14px; padding: 12px; border-radius: 16px; background: rgb(251 246 236 / .96); color: #0d3b38; }
@media (min-width: 640px) { .edp-ref .edp-member-list { grid-template-columns: repeat(3, 1fr); } }
.edp-ref .edp-member-list li { display: flex; flex-direction: column; gap: 2px; font-size: .84rem; }
.edp-ref .edp-member-list span { font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b9975b; }
.edp-ref .edp-member-link { padding: 0 20px; border-radius: 99px; background: #e9c983; color: #0d3b38; }

/* Frozen homepage / Explore list cards (a.rise[data-testid^="card-event-"]): warmer editorial finish, hero and nav untouched. */
a.rise[data-testid^="card-event-"] { border-radius: 18px; padding: 10px; background: var(--ce-card); box-shadow: var(--ce-shadow); }
.dark a.rise[data-testid^="card-event-"] { background: hsl(var(--card)); }
a.rise[data-testid^="card-event-"] > :first-child { border-radius: 13px; overflow: hidden; }
a.rise[data-testid^="card-event-"] h3 { color: var(--ce-ink); }
.dark a.rise[data-testid^="card-event-"] h3 { color: inherit; }
a.rise[data-testid^="card-event-"] .id-card-when:not(.italic) { font-weight: 600; color: var(--ce-teal); }
.home-card[data-testid^="card-event-"] > div:first-child { position: relative; }
.home-card[data-testid^="card-event-"] > div:first-child::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; pointer-events: none;
  background: linear-gradient(to top, rgb(13 47 44 / .28), transparent); }
.id-chip-row button:focus-visible, .id-filter-chips button:focus-visible { outline: 2px solid var(--ce-gold); outline-offset: 2px; }
/* Owner desk shares card-event- ids; keep it static. */
article.scroll-mt-40[data-testid^="card-event-"] { transform: none !important; }
.ms-root .cx-install { margin-top: 16px; display: grid; gap: 14px; padding: 20px 22px; border-radius: 22px; background: var(--ms-card); border: 1px solid var(--ms-gold-soft); box-shadow: var(--ms-shadow); }
@media (min-width: 720px) { .ms-root .cx-install { grid-template-columns: 1fr auto; align-items: center; } }
.ms-root .cx-install h2 { font-family: var(--font-display, Fraunces, Georgia, serif); font-size: 1.35rem; }
.ms-root .cx-install p { color: var(--ms-sub); font-size: .9rem; margin-top: 4px; }
.ms-root .cx-install-steps { display: grid; gap: 8px; font-size: .9rem; }
.ms-root .cx-install-steps li, .ms-root .cx-install-ok { display: flex; align-items: center; gap: 8px; }
.ms-root .cx-install svg { width: 18px; height: 18px; color: var(--ms-teal-deep); flex-shrink: 0; }
.ms-root .cx-install .cx-btn svg { color: inherit; }
.edp-ref .edp-media { position: relative; }
.edp-ref .edp-photo-credit { position: absolute; right: 10px; bottom: 10px; left: 10px; z-index: 2; margin: 0; width: fit-content; max-width: calc(100% - 20px); margin-left: auto;
  font-size: .64rem; line-height: 1.3; color: #fbf6ec; background: rgb(13 47 44 / .62); padding: 4px 9px; border-radius: 10px; backdrop-filter: blur(6px); }
.edp-ref .edp-media .edp-art-tag { z-index: 2; }
.edp-ref .edp-media .edp-art-tag { top: 12px; bottom: auto; }
.edp-ref .edp-image-attribution { font-size: .72rem; line-height: 1.5; padding: 9px 14px; overflow-wrap: anywhere; }
.edp-ref .edp-image-attribution summary { cursor: pointer; }
.edp-ref .edp-image-attribution p { padding-top: 6px; opacity: .85; }
/* Membership hero: keep logo clear of headline on short/narrow screens. */
.ms-root .cx-hero { padding-top: 120px; }
@media (max-width: 380px) { .ms-root .cx-hero { min-height: 520px; } .ms-root .cx-logo { width: 170px; top: 16px; } }
@media (min-width: 1024px) { .ms-root .cx-hero { margin: -8px 0 0; border-radius: 0 0 36px 36px; } }
