/* /shared/index-page.css */
/* CANON: extracted from index.html (index is the only visual reference) */

*{ box-sizing:border-box; }

html{ height: 100%; }
html, body { overflow-x: hidden; }
body{
  min-height: 100%;
  overflow-x: hidden;
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  background: var(--bg0);
  position: relative; /* anchors .world/.vignette absolute layers */
  -webkit-text-size-adjust: 100%;
}

/* ONE wrap rule only */
.wrap{
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding:
    max(12px, env(safe-area-inset-top))
    max(var(--pad), env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(var(--pad), env(safe-area-inset-left));
}

/* Topbar (canon) */
.topbar{
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  padding: 6px 0 4px;
  position: relative;
  z-index: 2;
}
.pill{
  text-decoration:none;
  color: rgba(233,238,246,.90);
  font-weight:700;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  border:1px solid var(--line);
  padding:10px 14px;
  border-radius:999px;
  background: rgba(255,255,255,.03);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  white-space:nowrap;
}
.pill:hover{
  transform: translateY(-1px);
  border-color: rgba(255,43,43,.26);
  background: rgba(255,255,255,.05);
}

/* Panel (canon: NO backdrop-filter) */
.panel{
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  position: relative;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow: visible;
  flex: 0 0 auto;
  align-self: stretch;
}

/* Legibility fog (canon) */
.panel::before{
  content:"";
  position:absolute;
  inset:-22px;
  pointer-events:none;
  z-index: 0;
  background:
    radial-gradient(640px 420px at 50% 18%,
      rgba(0,0,0,.68) 0%,
      rgba(0,0,0,.36) 48%,
      rgba(0,0,0,0)   78%
    ),
    radial-gradient(760px 520px at 50% 52%,
      rgba(0,0,0,.56) 0%,
      rgba(0,0,0,.28) 54%,
      rgba(0,0,0,0)   84%
    ),
    radial-gradient(720px 460px at 50% 88%,
      rgba(0,0,0,.46) 0%,
      rgba(0,0,0,.18) 58%,
      rgba(0,0,0,0)   86%
    );
  filter: blur(16px);
  opacity: .72;
  border-radius: var(--radius);
  background-clip: padding-box;
}
.panel > *{ position: relative; z-index: 1; }

/* Index typography helpers (canon) */
.brand, .copy{
  text-shadow:
    0 2px 18px rgba(0,0,0,.85),
    0 1px 0 rgba(0,0,0,.55);
}
.brand{ text-align:center; margin: 0 0 8px; }
.brand h1{
  margin:0;
  font-family: var(--hero);
  font-weight:700;
  font-size: clamp(46px, 10vw, 72px);
  line-height:.95;
  letter-spacing:.02em;
}
.brand p{
  margin: 8px 0 0;
  color: rgba(233,238,246,.78);
  font-size: 12px;
  letter-spacing:.22em;
  text-transform: uppercase;
}
/* Shared: brand logo support (used on privacy/terms/contact) */
.brand-logo{
  display:block;
  width: min(520px, 86%);
  height:auto;
  margin: 0 auto;
  filter: drop-shadow(0 18px 48px rgba(0,0,0,.65));
}
.copy{
  margin: 18px auto 0;
  max-width: 62ch;
  text-align:center;
  color: var(--muted);
  line-height:1.75;
  font-size: 15px;
}
.copy strong{ color: rgba(233,238,246,.92); }

.divider{
  height:1px;
  width: 70%;
  margin: 16px auto;
  background: rgba(255,255,255,.10);
}

/* Footer lockup (GLOBAL) — index-first
   Goals:
   - Always 2 lines (legal line + links line)
   - Readable over red water WITHOUT painting/darkening the water
   - Never interfere with CTA bloom (no big pseudo overlay)
*/
.footer{
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;

  /* pins footer to bottom on short pages */
  margin-top: auto;

  /* keeps it from sitting too low on mobile */
  padding: 12px 0 8px;

  text-align: center;
  border-top: 1px solid rgba(255,255,255,.08);
  position: relative;
  z-index: 3;

  /* tiny local lift for readability, confined to footer box only */
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.10) 55%,
    rgba(0,0,0,.22) 100%);
}

/* line 1 */
.footer .legal-mark{
  display:block;
  margin: 0 auto 8px;

  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(233,238,246,.62);

  text-shadow:
    0 2px 18px rgba(0,0,0,.88),
    0 1px 0 rgba(0,0,0,.60);
}

/* line 2 */
.footer .footer-links{
  display:block; /* FORCE 2-LINE FOOTER ALWAYS */
  margin: 0;

  font-size: 12px;
  letter-spacing: .20em;
  text-transform: uppercase;

  text-shadow:
    0 2px 18px rgba(0,0,0,.85),
    0 1px 0 rgba(0,0,0,.35);
}

.footer .footer-links a{
  color: rgba(233,238,246,.70);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding-bottom: 2px;
  transition: color .16s ease, border-color .16s ease;
}

.footer .footer-links a:hover{
  color: rgba(233,238,246,.90);
  border-color: rgba(255,43,43,.28);
}

.footer .footer-links .sep{
  color: rgba(233,238,246,.26);
  letter-spacing: 0;
}

@media (max-width: 520px){
  .footer{ padding: 10px 0 6px; }
  .footer .legal-mark{ margin-bottom: 6px; }
  .footer .legal-mark,
  .footer .footer-links{ font-size: 11px; }
}
/* BOOK PAGE — reduce fog so buoy matches index */
.panel--book::before{
  opacity: .42 !important;
}
/* BOOK PAGE — reduce fog so buoy matches index */
.panel.panel--book::before{
  opacity: .30 !important;
  filter: blur(12px) !important;
}
/* iOS Safari scroll wobble fix: kill big blur layer that jitters */
/* iOS Safari scroll wobble fix:
   - remove big blur (main jitter source)
   - DO NOT promote the whole panel to its own transform layer (causes wobble) */
@supports (-webkit-touch-callout:none){
  .panel::before{
    filter: none !important;   /* kill blur jitter */
    transform: none !important;
  }

  .panel{
    transform: none !important;      /* <-- REMOVE translateZ(0) */
    will-change: auto !important;    /* <-- REMOVE will-change */
  }
}