/*
 * Website shell: announcement bar, header, mobile menu, footer, the app-coming-soon notice,
 * shared section layouts and the home-page intro.
 */

/* ── Announcement bar ───────────────────────────────────────────── */
.announce { position: relative; z-index: calc(var(--z-header) + 1); background: var(--ink-1); color: #EDE5D2; font-size: var(--fs-13); }
[data-theme='dark'] .announce { background: #1A160E; }
.announce__in { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 40px; padding: 8px 48px; text-align: center; }
.announce__in .i { color: var(--brand-gold-border); width: 16px; height: 16px; }
.announce a { color: var(--brand-gold-border); text-decoration: underline; text-underline-offset: 3px; }
.announce__x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #B9B09B; }
.announce__x:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.announce__x .i { width: 16px; height: 16px; }

/* ── Header ─────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: var(--z-header); height: var(--header-h); transition: background-color var(--t-3), box-shadow var(--t-3), transform var(--t-3) var(--ease-out); }
.site-header::before { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); opacity: 0; transition: opacity var(--t-3); border-bottom: 1px solid var(--line); }
.site-header.is-scrolled::before { opacity: 1; }
.site-header__in { position: relative; height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; --logo-h: 42px; flex: none; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav a { position: relative; padding: 10px 14px; font-size: var(--fs-15); font-weight: 550; color: var(--text-2); border-radius: var(--r-pill); transition: color var(--t-2); }
.nav a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--t-3) var(--ease-out); }
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a[aria-current='page']::after { transform: none; }
.nav a[aria-current='page'] { color: var(--text); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.header-actions .btn { min-height: 42px; padding: 0 18px; font-size: var(--fs-14); }
.menu-btn { display: none; }
@media (max-width: 1060px) { .nav a:nth-child(n+4) { display: none; } }
@media (max-width: 880px) {
  .nav, .header-actions .hide-sm { display: none; }
  .menu-btn { display: grid; }
  .brand { --logo-h: 36px; }
}
@media (max-width: 420px) { .header-actions .btn--gold { display: none; } }

/* Full-screen menu for phones. */
.mnav { position: fixed; inset: 0; z-index: calc(var(--z-header) + 5); background: var(--bg); display: flex; flex-direction: column; padding: calc(var(--header-h) + 10px) var(--gutter) calc(28px + env(safe-area-inset-bottom)); opacity: 0; visibility: hidden; transition: opacity var(--t-3) var(--ease-out), visibility 0s linear var(--t-3); overflow-y: auto; }
.mnav .pattern { opacity: 0.6; }
.mnav.is-open { opacity: 1; visibility: visible; transition: opacity var(--t-3) var(--ease-out), visibility 0s; }
.mnav__links { position: relative; display: grid; gap: 2px; }
.mnav__links a { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; font-family: var(--font-display); font-size: 2rem; line-height: 1.1; border-bottom: 1px solid var(--line); opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity var(--t-4) var(--ease-out), transform var(--t-4) var(--ease-out); transition-delay: calc(var(--i) * 45ms + 80ms); }
.mnav__links a small { font-family: var(--font-ui); font-size: var(--fs-12); color: var(--accent-text); letter-spacing: 0.1em; min-width: 22px; }
.mnav.is-open .mnav__links a { opacity: 1; transform: none; }
.mnav__foot { position: relative; margin-top: auto; padding-top: 28px; display: grid; gap: 10px; }
.menu-open .site-header::before { opacity: 1; }

/* ── Sections ───────────────────────────────────────────────────── */
.sec-head { display: grid; gap: 18px; max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head.center { margin-inline: auto; justify-items: center; }
.sec-head p:not(.eyebrow) { color: var(--text-2); font-size: var(--fs-18); max-width: 58ch; }

/* Page hero for inner pages. */
.page-hero { position: relative; padding: clamp(56px, 8vw, 110px) 0 clamp(40px, 6vw, 72px); overflow: hidden; overflow: clip visible; }
.page-hero .pattern { opacity: 0.8; }
.page-hero__in { position: relative; display: grid; gap: 20px; max-width: 820px; }
.page-hero h1 { font-size: var(--fs-60); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: var(--fs-13); color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.crumbs .i { width: 14px; height: 14px; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer { position: relative; background: var(--ink-1); color: #D9D1BE; overflow: hidden; padding: clamp(64px, 8vw, 104px) 0 calc(28px + env(safe-area-inset-bottom)); --text: #F2ECDD; --text-2: #B8B09D; --text-3: #8A8373; --line: #2E2A22; --pattern-ink: rgba(229, 197, 104, 0.07); }
[data-theme='dark'] .site-footer { background: #08090B; }
.site-footer .pattern { opacity: 1; }
.foot-grid { position: relative; display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr 1.1fr; gap: 48px; }
.foot-brand { display: grid; gap: 20px; align-content: start; --logo-h: 48px; }
.foot-brand p { color: var(--text-2); max-width: 36ch; font-size: var(--fs-15); }
.foot-motto { font-family: var(--font-accent); font-style: normal; font-stretch: var(--accent-stretch); font-size: var(--fs-20); color: #E5C568; }
.foot-col h3 { font-family: var(--font-ui); font-size: var(--fs-12); letter-spacing: 0.16em; text-transform: uppercase; color: #E5C568; font-weight: 650; margin-bottom: 18px; }
.foot-col ul { display: grid; gap: 10px; }
.foot-col a { color: var(--text-2); font-size: var(--fs-15); transition: color var(--t-2); }
.foot-col a:hover { color: #fff; }
.foot-contact li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: var(--fs-15); }
.foot-contact .i { color: #CC9933; margin-top: 3px; width: 18px; height: 18px; }
.foot-bottom { position: relative; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: var(--fs-13); color: var(--text-3); }
.foot-family { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.foot-family span::before { content: '◆'; font-size: 7px; color: #CC9933; margin-right: 8px; vertical-align: 2px; }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ── App coming soon (the original floating notice) ─────────────── */
.playnote { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3); font-size: var(--fs-14); font-weight: 550; color: var(--text); transition: transform var(--t-4) var(--ease-out), opacity var(--t-3), padding var(--t-4) var(--ease-out); max-width: calc(100vw - 36px); }
.playnote__text { white-space: nowrap; overflow: hidden; transition: max-width var(--t-4) var(--ease-out), opacity var(--t-3); max-width: 320px; }
.playnote__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--inverse); color: var(--on-inverse); flex: none; }
.playnote__icon svg { width: 18px; height: 18px; }
.playnote.is-tucked { padding: 6px; gap: 0; }
.playnote.is-tucked .playnote__text { max-width: 0; opacity: 0; }
.playnote.is-hidden { transform: translate3d(0, 140%, 0); opacity: 0; pointer-events: none; }
/* Phones: a smaller pill that tucks into a 44px icon in the corner, clear of the content; hidden while the menu is open. */
@media (max-width: 720px) {
  .playnote { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); gap: 10px; padding: 6px 6px 6px 14px; font-size: var(--fs-13); max-width: calc(100vw - 24px); }
  .playnote__icon { width: 36px; height: 36px; }
  .playnote.is-tucked { padding: 4px; opacity: 0.94; }
  .playnote__text { max-width: 260px; }
  .menu-open .playnote { opacity: 0; pointer-events: none; }
}

/* ── Guest notice ("Progress Not Saved") art ─────────────────────── */
.notice-art { width: 64px; height: 64px; margin: 0 auto 6px; color: var(--accent); }


/* The home intro carries its own styles: tools/gen-intro.js writes them inline into index.html,
   so it can play before any stylesheet has loaded. */
