/* Landing page: one rounded frame over a structure contour map, with four
   views (home, about, questions, contact) that switch inside the frame.
   The switch is plain CSS (:target on the anchors at the top of the frame);
   landing.js only slides the pill under the current link and moves focus. */

body.landing { background: var(--canvas); }

.stage {
  --on-dark: #ffffff;
  --on-dark-2: rgba(232, 244, 237, 0.8);
  --on-dark-3: rgba(232, 244, 237, 0.62);
  --glass: rgba(255, 255, 255, 0.075);
  --glass-hover: rgba(255, 255, 255, 0.12);
  --glass-line: rgba(255, 255, 255, 0.15);
  --glass-blur: blur(18px) saturate(140%);
  --ease: cubic-bezier(0.22, 0.75, 0.2, 1);

  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  min-block-size: calc(100vh - 24px);
  min-block-size: calc(100svh - 24px);
  margin: 12px;
  border-radius: var(--radius-xl);
  background: var(--g950);
  color: var(--on-dark);
}
.stage :focus-visible { box-shadow: 0 0 0 3px rgba(143, 208, 170, 0.6); }

/* --- Background: light, map, vignette ------------------------------------ */

.stage-bg {
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; overflow: hidden; overflow: clip;
  background:
    radial-gradient(80% 65% at 100% 0%, rgba(47, 154, 98, 0.34), transparent 62%),
    radial-gradient(60% 55% at 0% 100%, rgba(3, 18, 11, 0.55), transparent 70%),
    linear-gradient(160deg, #145036 0%, #0f3d2a 40%, #0b2e20 72%, #082316 100%);
}
.stage-bg::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 160px rgba(2, 14, 8, 0.5);
}
/* The map stays in view while a long view (the questions) scrolls past. */
.stage-map {
  position: sticky; inset-block-start: 0;
  display: block; block-size: 100vh; block-size: 100svh;
  background: url("../img/structure-map.b4537a286596.svg") 32% 46% / cover no-repeat;
}

/* --- Top bar ------------------------------------------------------------- */

.stage-bar {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 16px;
  padding: 20px 28px 12px;
}
.stage-brand { justify-self: start; display: flex; align-items: center; gap: 12px; text-decoration: none; min-inline-size: 0; }
.stage-brand, .stage-brand:hover { color: #fff; }
.stage-brand .brand-mark {
  background: rgba(255, 255, 255, 0.12); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.stage-brand .brand-name { color: #fff; font-size: 0.95rem; }
.stage-brand .brand-unit { color: var(--on-dark-3); }
.stage-account { justify-self: end; }

.btn-glass {
  border-color: transparent; color: #fff;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.btn-glass:hover { background: #fff; border-color: #fff; color: var(--g950); }

/* --- Pill navigation ----------------------------------------------------- */

.pill-nav {
  position: relative; display: flex; gap: 2px; padding: 5px;
  border-radius: var(--pill);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 12px 32px -16px rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.pill-nav a {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--pill);
  font-size: 0.9rem; font-weight: 500; white-space: nowrap; text-decoration: none;
  color: var(--on-dark-2);
  transition: color 0.35s var(--ease), background-color 0.25s;
}
.pill-nav a .icon { display: none; }
.pill-nav a:hover { color: #fff; }
.pill-nav a[aria-current] { color: var(--g950); }
.pill-indicator {
  position: absolute; left: 0; top: 0; z-index: 0;
  border-radius: var(--pill); background: #fff;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.55);
  transition: transform 0.55s var(--ease), width 0.55s var(--ease), height 0.55s var(--ease);
}
.pill-indicator.no-anim { transition: none; }

/* Without JavaScript the current link is lit by :target alone. */
html:not(.js) #home:target ~ .stage-bar a[data-view="home"],
html:not(.js) #about:target ~ .stage-bar a[data-view="about"],
html:not(.js) #faq:target ~ .stage-bar a[data-view="faq"],
html:not(.js) #contact:target ~ .stage-bar a[data-view="contact"] { background: #fff; color: var(--g950); }
/* Separate rule: a browser without :has() drops only this one. */
html:not(.js) .stage:not(:has(.anchor:target)) a[data-view="home"] { background: #fff; color: var(--g950); }

/* --- Views --------------------------------------------------------------- */

/* Following a link scrolls to the page top, margin included, rather than
   cutting off the frame's top edge. */
.anchor { position: absolute; inset-block-start: 0; scroll-margin-block-start: 12px; }

.views { position: relative; z-index: 1; flex: 1; display: grid; padding: 24px 44px 36px; }
.view { display: none; min-inline-size: 0; }
.view-home { display: grid; }
#about:target ~ .views .view-home,
#faq:target ~ .views .view-home,
#contact:target ~ .views .view-home { display: none; }
#about:target ~ .views .view-about,
#faq:target ~ .views .view-faq,
#contact:target ~ .views .view-contact { display: grid; }

.view [tabindex="-1"]:focus { outline: none; box-shadow: none; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 22px; padding: 6px 14px 6px 16px; border-radius: var(--pill);
  font-size: 0.85rem; color: var(--on-dark-2);
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.chip .icon { color: var(--g300); }

.glass {
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 30px 60px -30px rgba(0, 0, 0, 0.55);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}

.view-title { font-size: clamp(1.9rem, 1.1rem + 2.4vw, 3.1rem); line-height: 1.25; font-weight: 600; margin-block-end: 16px; }
.view-sub { color: var(--on-dark-2); font-size: 1.02rem; }

/* Call to action and the Google button (Google's light theme). */
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-block-start: 28px; }
.cta-note { margin: 0; color: var(--on-dark-2); font-size: 0.95rem; }
.stage .gsi-btn {
  min-block-size: 50px; padding-inline: 16px 24px; font-size: 0.98rem;
  box-shadow: 0 14px 32px -14px rgba(0, 0, 0, 0.6);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}
.stage .gsi-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.65); }
.btn-cta {
  min-block-size: 50px; padding-inline: 24px 20px; font-size: 0.98rem;
  background: #fff; border-color: #fff; color: var(--g950);
  box-shadow: 0 14px 32px -14px rgba(0, 0, 0, 0.6);
}
.btn-cta:hover { background: var(--g100); border-color: var(--g100); color: var(--g950); }
.cta-note bdi { color: #fff; }

/* Home */
.view-home { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); align-items: end; gap: 48px; }
.home-copy { max-inline-size: 700px; }
.view-home h1 { font-size: clamp(2.6rem, 1.3rem + 4.3vw, 5.3rem); line-height: 1.14; font-weight: 600; margin-block-end: 24px; }
.view-home h1 span { display: block; }
.view-home h1 .accent { color: var(--g300); }
.lead { font-size: clamp(1rem, 0.92rem + 0.3vw, 1.16rem); line-height: 1.9; color: var(--on-dark-2); max-inline-size: 60ch; margin-block-end: 14px; }
.lead-strong { font-size: clamp(1rem, 0.94rem + 0.3vw, 1.14rem); font-weight: 500; color: #fff; margin: 0; }

/* Countdown while registration is open until a deadline. */
.countdown { display: inline-flex; flex-direction: column; gap: 6px; margin-block-start: 24px; padding: 16px 20px; }
.countdown p { margin: 0; }
.countdown-title { color: var(--on-dark-2); font-size: 0.95rem; }
.countdown-units { display: flex; align-items: baseline; gap: 8px; color: var(--on-dark-2); font-size: 0.95rem; white-space: nowrap; }
.countdown-units b {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 600; color: #fff;
  font-variant-numeric: tabular-nums; margin-inline-end: 2px;
}
.countdown-units .sep { color: var(--on-dark-2); opacity: 0.6; }
@media (max-width: 420px) {
  .countdown { padding: 14px 16px; }
  .countdown-units { gap: 5px; font-size: 0.85rem; }
  .countdown-units b { font-size: 1.35rem; }
}

.docs-card { padding: 22px 22px 20px; }
.docs-card h2 { font-size: 1rem; margin-block-end: 14px; }
.docs-card ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.docs-card li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06); font-size: 0.92rem;
}
.docs-icon {
  inline-size: 34px; block-size: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: rgba(143, 208, 170, 0.16); color: var(--g300);
}
.docs-card p { margin: 0; font-size: 0.84rem; color: var(--on-dark-3); }

/* About */
.view-about { align-content: end; }
.about-panel { max-inline-size: 920px; padding: 34px 38px 36px; }
.about-text { font-size: clamp(1.05rem, 0.95rem + 0.42vw, 1.32rem); line-height: 1.95; color: var(--on-dark-2); margin: 0; }
/* Registration paused from the dashboard: the home view says so. The
   illustration has a white background, so it sits on a light card. */
.view-closed { grid-template-columns: minmax(0, 1fr) minmax(280px, 500px); align-items: center; }
.view-closed .closed-title { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); line-height: 1.3; margin-block-end: 18px; }
.closed-art {
  margin: 0; padding: clamp(10px, 1.6vw, 18px); border-radius: var(--radius-lg); background: #fff;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55);
}
.closed-art img { display: block; inline-size: 100%; block-size: auto; }
.cta-note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.cta-row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 18px; }

/* Questions */
/* Anchored to the top so an opening answer pushes the next questions down. */
.view-faq {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); grid-template-rows: auto 1fr;
  grid-template-areas: "title list" "cta list";
  column-gap: 48px; align-items: start; align-content: start; padding-block-start: 24px;
}
.faq-title { grid-area: title; margin: 0; }
.qa-list { grid-area: list; }
.faq-cta { grid-area: cta; margin-block-start: 22px; }
.qa-list { display: grid; gap: 10px; }
.qa {
  border-radius: var(--radius);
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  transition: background-color 0.25s;
}
.qa:hover, .qa[open] { background: var(--glass-hover); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; cursor: pointer; list-style: none;
  font-size: 1rem; font-weight: 500; border-radius: var(--radius);
}
.qa summary::-webkit-details-marker { display: none; }
.qa-icon {
  inline-size: 30px; block-size: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.1);
  transition: transform 0.35s var(--ease), background-color 0.25s, color 0.25s;
}
.qa[open] .qa-icon { transform: rotate(45deg); background: #fff; color: var(--g900); }
.qa-body { padding: 0 20px 18px; color: var(--on-dark-2); line-height: 1.9; }
/* A closed answer must not be selectable or copied with its neighbours. */
.qa:not([open]) .qa-body { display: none; }
.qa-body p { margin: 0; }
.qa-body ul { margin: 6px 0 0; padding-inline-start: 22px; }
.qa-body li { margin-block: 2px; }

/* Contact */
.view-contact { align-content: end; gap: 26px; }
.contact-head .view-title { margin-block-end: 6px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.contact-card { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; inline-size: min(440px, 100%); }
.contact-icon {
  inline-size: 46px; block-size: 46px; border-radius: 50%; margin-block-end: 14px;
  display: grid; place-items: center; background: #fff; color: var(--g900);
}
.contact-label { font-size: 0.85rem; color: var(--on-dark-3); }
.contact-value { font-size: 1.08rem; font-weight: 500; line-height: 1.6; color: #fff; text-decoration: none; }
a.contact-value:hover { color: #fff; text-decoration: underline; }
.contact-value[dir="ltr"] { text-align: end; align-self: flex-start; }

/* --- Footer -------------------------------------------------------------- */

.stage-foot {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px;
  margin-inline: 44px; padding-block: 16px 22px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem; color: var(--on-dark-3);
}
.stage-foot a { color: inherit; text-underline-offset: 3px; }
.stage-foot a:hover { color: #fff; }
.foot-note { display: inline-flex; align-items: center; gap: 8px; }
.foot-note .icon { color: var(--g300); }

/* --- Motion -------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .stage-map { animation: map-in 2.2s var(--ease) both; }
  .view-home .home-copy > *, .view-home .docs-card, .view-closed .closed-art,
  .view-about .about-panel, .faq-title, .faq-cta, .qa-list > *, .contact-head, .contact-list > * {
    animation: rise 0.7s var(--ease) both;
  }
  .view-home .home-copy > :nth-child(2), .qa-list > :nth-child(2), .contact-list > :nth-child(2) { animation-delay: 0.06s; }
  .view-home .home-copy > :nth-child(3), .qa-list > :nth-child(3), .contact-list > :nth-child(3) { animation-delay: 0.12s; }
  .view-home .home-copy > :nth-child(4), .qa-list > :nth-child(4), .view-home .docs-card,
  .view-closed .closed-art { animation-delay: 0.18s; }
  .view-home .home-copy > :nth-child(5), .qa-list > :nth-child(5) { animation-delay: 0.24s; }
  .qa-list > :nth-child(6) { animation-delay: 0.3s; }
  .qa-list > :nth-child(7) { animation-delay: 0.36s; }
  .contact-list { animation-delay: 0.08s; }
}
@keyframes map-in { from { opacity: 0; transform: scale(1.05); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* --- Smaller screens ----------------------------------------------------- */

@media (max-width: 1100px) {
  .view-home { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 32px; }
  .views { padding-inline: 32px; }
  .stage-foot { margin-inline: 32px; }
}

@media (max-width: 900px) {
  .view-home { grid-template-columns: 1fr; align-content: end; }
  .view-closed { align-content: center; }
  .closed-art { max-inline-size: 460px; }
  .docs-card { max-inline-size: 460px; }
  .view-faq { grid-template-columns: 1fr; grid-template-areas: "title" "list" "cta"; row-gap: 22px; }
  .faq-cta { margin-block-start: 0; }
}

/* Phones: the pill becomes a tab bar floating at the bottom of the screen. */
@media (max-width: 760px) {
  .stage { margin: 8px; border-radius: var(--radius-lg); min-block-size: calc(100svh - 16px); padding-block-end: 84px; }
  .anchor { scroll-margin-block-start: 8px; }
  .stage-bar { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 14px 6px; }
  .stage-brand .brand-mark { inline-size: 38px; block-size: 38px; }
  .stage-brand .brand-name { font-size: 0.86rem; }
  .stage-brand .brand-unit { font-size: 0.74rem; }
  .stage-account .btn { min-block-size: 40px; padding: 8px; inline-size: 40px; }
  .stage-account .label-wide { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  /* Corner radii stay concentric: the bar's 28px minus its 5px padding. */
  .pill-nav {
    position: fixed; z-index: 30; inset-inline: 14px; inset-block-end: max(12px, env(safe-area-inset-bottom));
    border-radius: 28px; background: rgba(11, 46, 32, 0.72);
  }
  .pill-nav a { flex: 1 1 0; flex-direction: column; gap: 2px; padding: 7px 4px 6px; font-size: 0.72rem; border-radius: 23px; min-inline-size: 0; }
  .pill-nav a .icon { display: block; inline-size: 20px; block-size: 20px; }
  .pill-nav a span { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; }
  .pill-indicator { border-radius: 23px; }

  .views { padding: 14px 18px 24px; }
  .chip { margin-block-end: 16px; }
  .view-home h1 { margin-block-end: 18px; }
  .cta { margin-block-start: 22px; align-items: stretch; }
  .gsi-btn, .btn-cta { justify-content: center; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .about-panel { padding: 24px 20px; }
  .qa summary { padding: 14px 16px; font-size: 0.95rem; }
  .qa-body { padding: 0 16px 16px; }
  .contact-card { inline-size: 100%; }
  .stage-foot { margin-inline: 18px; flex-direction: column; }
  /* Seven blurred panels scrolling together are costly on low-end phones. */
  .qa { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 255, 255, 0.085); }
  .qa[open] { background: rgba(255, 255, 255, 0.12); }
}
