/* Homepage, "Notion-style" design (Owner-approved demo 2026-11). Left: the hero photo in a rounded card with the headline over its bottom;
   right: a LINK-ONLY sign-in panel. One column on phones (card, then panel). Colours are the --n-* tokens below (dark = the site's default
   theme, light = [data-theme="light"]); no colour literal appears outside the two token blocks. Layout of the sections below the hero is in explore.css.
   The hero grid, the sign-in panel and the discovery slots keep their class names (tests and the discovery contract use them). */
:root, :root[data-theme="dark"] {
  --n-bg: #0A0C12; --n-soft: #12151E; --n-line: #252936; --n-line-strong: #5E657D; --n-text: #EFECE5; --n-muted: #A4A8B5;
  --n-accent: #F2B544; --n-on-accent: #1A1204; --n-soft-accent: #1B1F2B; --n-soft-accent-text: #E8C679;
  --n-outline-c: #EFECE5; --n-outline-b: #5E657D; --n-tick: #F2B544; --n-pill: rgba(242, 181, 68, .18); --n-pill-text: #F2B544; --n-ok: #5EE6D0;
  --n-shadow: 0 22px 50px -34px rgba(0, 0, 0, .9);
  --n-hero-card: #0A0D1A; --n-on-photo: #FFFFFF; --n-photo-shadow: 0 2px 24px rgba(6, 9, 30, .7);
  --n-band: #12151E; --n-band-text: #FFFFFF; --n-band-muted: #B9C0E0; --n-band-soft: rgba(255, 255, 255, .14); --n-band-btn: #F2B544; --n-band-btn-text: #1A1204;
  --n-th1: #12232E; --n-th2: #2A2018; --n-th3: #1B1B30; --n-t1: #7FD9E6; --n-t2: #F2B544; --n-t3: #B7A9F5;
}
:root[data-theme="light"] {
  --n-bg: #FFFFFF; --n-soft: #F5F6FA; --n-line: #E3E5EF; --n-line-strong: #7E85A6; --n-text: #0E1430; --n-muted: #555C7D;
  --n-accent: #4A3FD1; --n-on-accent: #FFFFFF; --n-soft-accent: #ECEAFE; --n-soft-accent-text: #3B30B5;
  --n-outline-c: #4A3FD1; --n-outline-b: #4A3FD1; --n-tick: #0B7A6B; --n-pill: #FDEFCB; --n-pill-text: #5C3D00; --n-ok: #0B7A6B;
  --n-shadow: 0 30px 80px -30px rgba(40, 30, 120, .35);
  --n-band: #0A1030;
}

.home { position: relative; background: var(--n-bg); color: var(--n-text); }
.home h1, .home h2, .home h3 { font-family: var(--display); text-wrap: balance; overflow-wrap: break-word; min-width: 0; letter-spacing: -.02em; line-height: 1.08; }
.home .wrap { max-width: 1560px; padding-left: max(clamp(16px, 3.6vw, 72px), env(safe-area-inset-left, 0px)); padding-right: max(clamp(16px, 3.6vw, 72px), env(safe-area-inset-right, 0px)); }
.home :focus-visible { outline-color: var(--n-accent); }
.home .btn { min-height: 48px; border-radius: 10px; font-weight: 600; font-size: 16px; }
.home .btn:active { transform: translateY(1px); }
.home .btn-primary { background: var(--n-accent); color: var(--n-on-accent); border-color: transparent; }
.home .btn-primary:hover { color: var(--n-on-accent); filter: brightness(1.08); }
.home .btn-outline { background: transparent; color: var(--n-outline-c); border: 2px solid var(--n-outline-b); }
.home .btn-outline:hover { color: var(--n-outline-c); border-color: var(--n-accent); }

/* hero: photo card + sign-in panel */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: stretch; padding-block: 14px 0; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.32fr) minmax(0, .9fr); grid-template-areas: "card panel"; gap: 22px; }
  .n-card { grid-area: card; } .login-panel { grid-area: panel; }
}
.n-card { position: relative; min-width: 0; border: 1px solid var(--n-line); border-radius: 24px; overflow: hidden; display: flex; justify-content: center; padding-top: 22px; box-shadow: var(--n-shadow); background: var(--n-hero-card); }
.n-stage { position: relative; width: 100%; max-width: 700px; padding-bottom: clamp(70px, 7.4vw, 112px); }
.n-photo { margin: 0; }
.n-photo picture { display: block; }
.n-photo img { display: block; width: 100%; height: auto; -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 12%, black 72%, transparent 100%), linear-gradient(to right, transparent 0, black 10%, black 90%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(to bottom, transparent 0, black 12%, black 72%, transparent 100%), linear-gradient(to right, transparent 0, black 10%, black 90%, transparent 100%); mask-composite: intersect; }
.n-stage h1 { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0 auto; padding: 0 10px clamp(12px, 1.8vw, 24px); text-align: center; color: var(--n-on-photo); text-shadow: var(--n-photo-shadow); font-size: clamp(2.2rem, 4.7vw, 4.3rem); font-weight: 700; letter-spacing: -.035em; }
.n-pill { display: inline-flex; align-items: center; gap: .16em; background: var(--n-pill); color: var(--n-pill-text); border-radius: .5em; padding-block: .1em; padding-inline: max(.3em, 8px); margin-inline: .03em; text-shadow: none; }
.n-pill::before { content: ""; width: .34em; height: .34em; border-radius: 50%; background: var(--n-ok); margin-inline-end: .08em; }
@media (max-width: 899px) {
  .n-stage { padding-bottom: 0; }
  .n-stage h1 { position: relative; margin-top: -34px; padding: 0 12px 24px; font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .n-photo img { -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 14%, black 80%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, black 14%, black 80%, transparent 100%); }
}

.login-panel { min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: stretch; text-align: center; gap: 14px; padding: clamp(24px, 3vw, 44px); border-radius: 24px; background: var(--n-bg); border: 1px solid var(--n-line-strong); }
.n-logo { display: block; width: 104px; height: 69px; margin: 0 auto 2px; }
.login-panel h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 700; }
.n-lead { margin: 0 auto 8px; max-width: 30ch; color: var(--n-muted); font-size: 1.05rem; }
.login-panel .btn { width: 100%; min-height: 48px; overflow-wrap: anywhere; }
.login-panel .n-wide { min-height: 54px; font-size: 17px; border-radius: 999px; }
.panel-forgot { text-align: center; }
.panel-forgot a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px; color: var(--n-text); font-weight: 500; text-decoration: none; }
.panel-forgot a:hover { color: var(--n-text); text-decoration: underline; }
.panel-or { display: flex; align-items: center; gap: 12px; color: var(--n-muted); font-size: 14px; }
.panel-or::before, .panel-or::after { content: ""; flex: 1; height: 1px; background: var(--n-line); }
.panel-note { text-align: center; font-size: 14px; color: var(--n-muted); }
html[data-member] .login-panel .hide-member { display: none; }

/* the strip under the illustration */
.n-strip { margin-top: 44px; }
.n-strip ul { list-style: none; margin: 0; padding: 8px 0; border-block: 1px solid var(--n-line); display: flex; flex-wrap: wrap; justify-content: center; gap: 0 30px; font: 600 15px/1.2 var(--display); color: var(--n-muted); }
.n-strip li { display: inline-flex; align-items: center; min-height: 44px; }
.n-strip a { display: inline-flex; align-items: center; min-height: 44px; color: var(--n-muted); text-decoration: none; }
.n-strip a:hover { color: var(--n-text); text-decoration: underline; }

/* ---------- discovery slots (markup contract: see home.njk; absent unless the build switch is on): restyled as story cards ---------- */
.hd-section { padding-block: 72px 0; }
.hd-section .section-title { font-size: clamp(1.9rem, 5.6vw, 3.8rem); }
.hd-section .section-intro { color: var(--n-muted); max-width: 60ch; }
.hd-section .fine { color: var(--n-muted); }
.hd-grid { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.hd-card { --n-cover: var(--n-th3); display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow: hidden; padding: 0 0 16px; border-radius: 18px; background: var(--n-soft); border: 1px solid var(--n-line); box-shadow: var(--n-shadow); }
.hd-card::before { content: ""; display: block; aspect-ratio: 16 / 9; background: var(--n-cover); border-bottom: 1px solid var(--n-line); }
.hd-section[data-hd="communities"] .hd-card { --n-cover: var(--n-th1); }
.hd-section[data-hd="events"] .hd-card { --n-cover: var(--n-th2); }
.hd-card > * { margin-inline: 16px; }
.hd-card h3 { font-size: 1.18rem; font-weight: 700; }
.hd-card p { font-size: 14px; line-height: 1.4; color: var(--n-muted); overflow-wrap: anywhere; unicode-bidi: plaintext; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.hd-card .hd-meta { color: var(--n-muted); -webkit-line-clamp: 2; }
.hd-card .btn { margin-top: auto; align-self: flex-start; min-height: 44px; border-radius: 999px; font-size: 14px; }
@media (max-width: 480px) { .hd-card .btn { align-self: stretch; } }
.hd-section[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { .home .btn:active { transform: none; } }

/* header/footer at 200% zoom and text (same block in pages.css) */
.wordmark { white-space: normal; overflow-wrap: normal; line-height: 1.15; }
.brand { max-width: 100%; }
@media (max-width: 1023px) {
  .header-row { flex-wrap: wrap; row-gap: 4px; padding-block: 6px; }
  .header-row .brand { flex: 0 1 auto; min-width: 0; }
  .header-row .menu-toggle { flex: none; margin-inline-start: auto; }
}
@media (max-width: 520px) { .header-row { column-gap: 8px; } }
.footer-group a { overflow-wrap: break-word; }
.footer-brand, .footer-note, .footer-bottom > span { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 600px) {
  .footer-group ul { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9em), 1fr)); }
}

