/* ------------------------------------------------------------------
   🚪 FRONT DOOR — public landing + age-gate bottom sheet
   (owner unlock, Nov 28 2026 — LOCKED.md invariant 24)

   The landing (#front-door in public/index.html) is public and
   crawlable on purpose: brand, one line, ONE action (Enter — 18+)
   and the legal links, so search engines meet the brand instead of
   a blank age-gate wall. The age gate itself is UNCHANGED — same
   markup, same checks (checkAgeGate in app.js) — this sheet only
   dresses it as a bottom sheet over the landing: the overlay
   becomes a scrim and the card anchors to the bottom of the
   screen, with the rules text in a small scrollable box instead
   of a full-screen wall.

   This file is the door for both surfaces: loaded after every
   other sheet in the shell, precached beside the tab-bar door
   files in the service worker, shipped and rolled back on its
   own. No locked sheet is edited for it.
   ------------------------------------------------------------------ */

/* ---------------- the landing ---------------- */

#front-door {
  position: relative;
  z-index: 5;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top)) 20px calc(18px + env(safe-area-inset-bottom));
  color: #fff;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 79, 163, .32), transparent 38%),
    linear-gradient(165deg, #2a0450, #150130 74%);
}
#front-door.hidden { display: none !important; }

.fd-top { display: flex; align-items: center; gap: 11px; }
.fd-logo { width: 58px; height: 58px; border-radius: 15px; object-fit: cover; display: block; }
.fd-word { font-size: 23px; font-weight: 900; line-height: 1; color: #fff; }
.fd-word span { color: #ff5c8a; }
.fd-badge {
  margin-left: auto; background: #2a0a38; color: #fff;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px;
  padding: 5px 9px; font-size: 11px; font-weight: 800;
}

.fd-h { font-size: 31px; line-height: 1.05; font-weight: 900; margin: 26px 0 0; }
.fd-sub { font-size: 15px; line-height: 1.45; color: #f3d9ec; margin: 12px 0 0; }

.fd-enter {
  margin-top: 22px; width: 100%; box-sizing: border-box;
  background: #ff4fa3; color: #fff; font-weight: 900; font-size: 16px;
  border: none; border-radius: 14px; padding: 14px 8px; cursor: pointer;
  text-align: center;
}
.fd-note { font-size: 11px; color: #d9a8c9; margin: 10px 0 0; text-align: center; }

.fd-legal {
  margin-top: auto; padding-top: 16px;
  text-align: center; font-size: 11px; line-height: 1.7; color: #caa3bd;
}
.fd-legal a { color: #d9a8c9; text-decoration: none; }
.fd-legal-note { color: #8f6b84; }

/* ---------------- the gate as a bottom sheet ---------------- */

/* The overlay becomes a scrim; the card seats on the bottom edge.
   The gate's own locks stay exactly as styles.css declares them
   (fixed inset 0, X clipped, pan-y only) — this layer changes the
   SEATING, never the locks. */
#age-gate {
  align-items: flex-end;
  padding: 0;
  background: rgba(8, 0, 16, .55);
}

#age-gate .age-gate-card {
  margin: 0;
  width: 100%;
  max-width: 480px;
  max-height: 88dvh;
  background: #20073a;
  border-top: 2px solid rgba(255, 79, 163, .55);
  border-radius: 22px 22px 0 0;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .5);
}
/* The sheet's grab handle. */
#age-gate .age-gate-card::before {
  content: '';
  display: block;
  width: 42px; height: 4px; border-radius: 99px;
  background: rgba(255, 255, 255, .35);
  margin: 0 auto 12px;
}

/* Compact sheet header — same elements, sheet-sized. */
#age-gate .age-gate-logo { font-size: clamp(24px, 8vw, 32px); margin-bottom: 2px; }
#age-gate .age-gate-q { font-size: 21px; margin: 10px 0 6px; }
#age-gate .age-gate-sub { font-size: 14px; margin-bottom: 14px; }

/* The rules live in a small scrollable box (owner's mockup) — the
   full verbatim text, scrolled inside the box, never a wall.
   overflow-x stays hidden: the Nov 3 sideways-pan lock is not
   negotiable, the box scrolls on the Y axis only. */
#age-gate .age-gate-warn {
  max-height: 118px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  margin-bottom: 14px;
}

/* The legal links at the bottom of the sheet. */
.fd-legal-gate {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: 10px;
}
