/* ============================================================
   Bstrap Portal shared stylesheet
   Extends the Bstrap landing design system:
   same paper/ink/terra palette, Young Serif + Atkinson Hyperlegible,
   warm-daylight wash + paper grain. Used by /portal/* and /you/*.
   Self-contained, no build step.
   ============================================================ */

:root {
  --paper: #f8f2e5;
  --paper-deep: #f1e7d2;
  --card: rgba(255, 252, 244, 0.72);
  --ink: #1c2b33;
  --ink-soft: #3e4953;
  --ink-faint: #6c777f;
  --terra: #c2410c;
  --terra-deep: #9a3412;
  --gold: #8a5e15;
  --teal: #1f5074;
  --teal-deep: #163a55;
  --line: rgba(28, 43, 51, 0.16);
  --line-soft: rgba(28, 43, 51, 0.1);
  --radius: 18px;
  --radius-lg: 26px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* warm daylight wash + paper grain (shared with landing) */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(70% 55% at 50% 0%, rgba(185, 127, 36, 0.14), transparent 70%),
    radial-gradient(90% 60% at 100% 100%, rgba(194, 65, 12, 0.07), transparent 65%),
    linear-gradient(180deg, #faf4e8 0%, #f8f2e5 50%, #f3ebd9 100%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 12px 20px; z-index: 50;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; padding: 24px 0;
}
.brand {
  font-family: "Young Serif", serif;
  font-size: 1.4rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 11px;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs a {
  color: var(--ink-soft); text-decoration: none; font-weight: 700;
  font-size: 0.96rem; padding: 8px 13px; border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease;
}
.crumbs a:hover { background: rgba(194, 65, 12, 0.1); color: var(--terra-deep); }
.crumbs a[aria-current="page"] { color: var(--terra-deep); background: rgba(194, 65, 12, 0.1); }

/* ---------- hero / page head ---------- */
.head { padding: 7vh 0 5vh; }
.eyebrow {
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--terra-deep); margin-bottom: 22px;
  display: flex; align-items: center; gap: 13px;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--terra); flex: none; }

h1 {
  font-family: "Young Serif", serif; font-weight: 400;
  font-size: clamp(2.2rem, 5.6vw, 3.7rem);
  line-height: 1.08; letter-spacing: -0.015em;
  max-width: 18ch; margin-bottom: 24px;
}
h1 .warm { color: var(--terra); }

.lede {
  font-size: clamp(1.12rem, 2vw, 1.3rem);
  color: var(--ink-soft); max-width: 54ch;
}
.lede + .lede { margin-top: 16px; }
.lede strong { color: var(--ink); }

/* ---------- shared typography ---------- */
.kicker {
  font-size: 0.88rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 22px;
  display: flex; align-items: center; gap: 14px;
}
.kicker::before { content: ""; width: 30px; height: 3px; border-radius: 3px; background: var(--gold); flex: none; }

h2 {
  font-family: "Young Serif", serif; font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.14; letter-spacing: -0.01em;
  max-width: 26ch; margin-bottom: 20px;
}
h3 { font-family: "Young Serif", serif; font-weight: 400; }

.body-copy { color: var(--ink-soft); max-width: 62ch; font-size: 1.1rem; }
.body-copy + .body-copy { margin-top: 16px; }
.body-copy strong { color: var(--ink); }

section { padding: 6vh 0; }
.rule { height: 2px; background: linear-gradient(90deg, var(--line), transparent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none;
  font-weight: 700; font-size: 1.08rem;
  padding: 16px 30px; border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--terra); color: #fff8ef;
  box-shadow: 0 10px 28px -10px rgba(194, 65, 12, 0.55);
}
.btn-primary:hover { background: var(--terra-deep); transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(154, 52, 18, 0.55); }
.btn-quiet { color: var(--teal); border: 2px solid currentColor; }
.btn-quiet:hover { background: rgba(31, 80, 116, 0.08); transform: translateY(-2px); }
.cta-row { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta-row .btn { }

/* ---------- portal navigation cards (index) ---------- */
.map-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.map-card {
  display: block; text-decoration: none; color: inherit;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  padding: 28px 28px 26px;
  position: relative; overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.map-card:hover { transform: translateY(-4px); border-color: rgba(194, 65, 12, 0.4); }
.map-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--terra), var(--gold));
  opacity: 0; transition: opacity 0.3s ease;
}
.map-card:hover::before { opacity: 1; }
.map-card .glyph { display: block; margin-bottom: 16px; }
.map-card .glyph svg { width: 38px; height: 38px; display: block; }
.map-card h3 { font-size: 1.28rem; margin-bottom: 8px; }
.map-card p { color: var(--ink-soft); font-size: 1.02rem; }
.map-card .go { margin-top: 14px; color: var(--terra-deep); font-weight: 700; font-size: 0.98rem; }
.map-card .go::after { content: " \2192"; }

/* ---------- LEGO blocks ---------- */
.blocks { margin-top: 8px; display: grid; gap: 18px; }
.block {
  border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  padding: 30px 30px 28px;
  position: relative;
  display: grid; grid-template-columns: 58px 1fr; gap: 22px; align-items: start;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.block:hover { transform: translateY(-3px); border-color: rgba(194, 65, 12, 0.4); }
.block .stud { flex: none; }
.block .stud svg { width: 52px; height: 52px; display: block; }
.block h3 { font-size: 1.42rem; margin-bottom: 6px; }
.block .picture {
  color: var(--ink); font-size: 1.12rem; margin-bottom: 16px;
  font-style: italic;
}
.block .picture .lead-word { font-style: normal; font-weight: 700; color: var(--terra-deep); }
.block .meta { display: grid; gap: 12px; }
.block .meta-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline; }
.block .meta-label {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--gold); white-space: nowrap; padding-top: 2px;
}
.block .meta-row.cost .meta-label { color: var(--teal-deep); }
.block .meta-text { color: var(--ink-soft); font-size: 1.02rem; }
.block .meta-text strong { color: var(--ink); }

/* the connector that makes them feel "stackable" */
.stack-note {
  margin: 8px 0 26px; color: var(--ink-faint); font-size: 1rem;
  display: flex; align-items: center; gap: 12px;
}

/* ---------- pricing table ---------- */
.price-table {
  margin-top: 8px;
  border: 2px solid var(--line); border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}
.price-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 16px; align-items: baseline;
  padding: 20px 26px;
  border-top: 2px solid var(--line-soft);
}
.price-row:first-child { border-top: none; }
.price-row .item { font-family: "Young Serif", serif; font-size: 1.16rem; color: var(--ink); }
.price-row .why { display: block; font-family: "Atkinson Hyperlegible", sans-serif; font-size: 0.98rem; color: var(--ink-soft); margin-top: 4px; max-width: 52ch; }
.price-row .amount { font-weight: 700; font-size: 1.12rem; color: var(--terra-deep); white-space: nowrap; text-align: right; }
.price-row .amount .sub { display: block; font-weight: 400; font-size: 0.86rem; color: var(--ink-faint); }
.price-row.optional .item { color: var(--ink-soft); }

.price-note {
  margin-top: 26px;
  border-left: 4px solid var(--terra);
  background: rgba(194, 65, 12, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px;
  font-size: 1.08rem; color: var(--ink);
}
.price-note strong { color: var(--terra-deep); }

/* ---------- per-person "what you have" panels ---------- */
.have-grid { margin-top: 8px; display: grid; gap: 16px; }
.have {
  border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  padding: 26px 28px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
}
.have .have-icon svg { width: 30px; height: 30px; display: block; }
.have .have-body h3 { font-size: 1.2rem; margin-bottom: 3px; }
.have .have-body p { color: var(--ink-soft); font-size: 1.02rem; }
.have .status {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 13px; border-radius: 999px; white-space: nowrap;
}
.status-live { color: var(--teal-deep); background: rgba(31, 80, 116, 0.12); }
.status-building { color: var(--terra-deep); background: rgba(194, 65, 12, 0.1); }
.status-pending { color: var(--gold); background: rgba(138, 94, 21, 0.12); }

/* next-steps list */
.next { margin-top: 12px; counter-reset: nx; display: grid; gap: 4px; }
.next-item {
  display: grid; grid-template-columns: 54px 1fr; gap: 20px;
  padding: 26px 0; border-top: 2px solid var(--line);
}
.next-item:last-child { border-bottom: 2px solid var(--line); }
.next-item .nx-num {
  font-family: "Young Serif", serif; font-size: 2rem; line-height: 0.9; color: var(--terra);
}
.next-item h3 { font-size: 1.26rem; margin-bottom: 8px; }
.next-item p { color: var(--ink-soft); font-size: 1.05rem; max-width: 56ch; }

/* note / callout card */
.note-card {
  margin-top: 8px;
  border: 2px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 252, 244, 0.92), rgba(248, 240, 222, 0.92));
  padding: clamp(30px, 5vw, 48px);
  box-shadow: 0 30px 60px -42px rgba(28, 43, 51, 0.35);
}
.note-card.center { text-align: center; }
.note-card.center h2 { margin-left: auto; margin-right: auto; }
.note-card.center .body-copy { margin-left: auto; margin-right: auto; }
.signoff {
  margin-top: 22px; font-family: "Young Serif", serif; font-size: 1.16rem; color: var(--ink);
}

/* pull quote */
.creed { text-align: center; padding: 9vh 0;
  background: radial-gradient(50% 70% at 50% 50%, rgba(185, 127, 36, 0.1), transparent 75%); }
.creed blockquote {
  font-family: "Young Serif", serif;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem); line-height: 1.25;
  max-width: 27ch; margin: 0 auto; letter-spacing: -0.01em;
}
.creed .mark { color: var(--terra); }

/* ---------- footer ---------- */
footer {
  padding: 7vh 0 6vh; text-align: center;
  font-size: 0.96rem; color: var(--ink-soft);
}
footer .sig { font-family: "Young Serif", serif; font-size: 1.12rem; color: var(--ink); margin-bottom: 10px; }
footer a { color: var(--teal); font-weight: 700; text-decoration: none; border-bottom: 2px solid rgba(31, 80, 116, 0.3); }
footer a:hover { border-bottom-color: var(--teal); }
footer .fine { margin-top: 14px; font-size: 0.86rem; opacity: 0.8; }

/* private-page quiet banner */
.private-tag {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.82rem; color: var(--ink-faint); margin-top: 26px;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px;
  background: rgba(255, 252, 244, 0.5);
}
.private-tag svg { width: 15px; height: 15px; flex: none; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.06s; } .d2 { animation-delay: 0.18s; }
.d3 { animation-delay: 0.3s; } .d4 { animation-delay: 0.44s; } .d5 { animation-delay: 0.58s; }

html.js .when-seen { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
html.js .when-seen.seen { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 680px) {
  body { font-size: 18px; }
  .map-grid { grid-template-columns: 1fr; }
  .block { grid-template-columns: 1fr; gap: 14px; }
  .block .stud svg { width: 44px; height: 44px; }
  .have { grid-template-columns: auto 1fr; }
  .have .status { grid-column: 2; justify-self: start; }
  .next-item { grid-template-columns: 40px 1fr; gap: 14px; }
  .next-item .nx-num { font-size: 1.6rem; }
  .price-row { grid-template-columns: 1fr; gap: 6px; }
  .price-row .amount { text-align: left; }
  .topbar { justify-content: center; text-align: center; }
  .cta-row .btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  html.js .when-seen, html.js .when-seen.seen { opacity: 1; transform: none; transition: none; }
  .btn, .map-card, .block, .next-item, .crumbs a { transition: none; }
}
