/* ==============================================================
   tier.css : shared design system for the four tier pages
   (icons, platinums, essentials, brands)

   Each page sets its own ground and text tokens plus its accent:
     --accent, --accent-rgb, --accent-dim, --accent-line, --accent-glow
   and then declares only what it deliberately differs on.

   The accent appears in a fixed set of structural slots on every
   page, so position tells the reader where to look and hue tells
   them which tier they are in:
     kicker rule, section label, section rule, chip border,
     CTA frame, focus ring.

   Loaded BEFORE each page's inline <style>, so page rules win.
   ============================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* A grid item defaults to `min-width: auto`, so it refuses to shrink below its
   widest indivisible content and pushes the track — and the page — wider than
   the viewport. That is what made Essentials scroll sideways at 375px (a 403px
   document) and drag the shared header out with it. */
.shell > * {
  min-width: 0;
}

/* Measure cap for the reading column.
   With the sidebar collapsed, the main column takes the full width, and on a
   tablet that ran body copy out to ~89 characters a line — past the point the
   eye reliably finds the next line. Capped in `ch` so it tracks the type rather
   than a guessed pixel width. `:where()` keeps specificity at zero, so any page
   that wants a wider block just says so. */
:where(.essentials-main, .icons-main, .brands-main, .platinums-main) :where(p, li) {
  max-width: 68ch;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: calc(88vh - var(--site-header-h, 72px));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--site-header-h, 72px) 0 72px;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(28px, 6vw, 96px);
  max-width: 1100px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero-kicker-line {
  width: 32px;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.hero-h1 {
  font-size: clamp(48px, 7.5vw, 112px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.04em;
  margin-bottom: 32px;
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--fg-3);
  max-width: 52ch;
  line-height: 1.65;
}

.sec-label {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.sec-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.sec-num {
  color: var(--fg-4);
  margin-left: 6px;
}

.body-l {
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-2);
  max-width: 62ch;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: border-color .2s, color .2s;
}

.btn-ghost:hover {
  border-color: var(--fg-3);
  color: var(--fg);
}

.back-top {
  position: fixed;
  /* Clears the home indicator; falls back to the plain 28px without one. */
  bottom: max(28px, env(safe-area-inset-bottom));
  right: max(28px, env(safe-area-inset-right));
  z-index: 300;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--line-2);
  color: var(--fg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.back-top svg {
  width: 15px;
  height: 15px;
}

.fu {
  opacity: 0;
  transform: translateY(20px);
}

.vault-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  padding: 5px 14px;
  border-radius: 100px;
  background: var(--accent-dim);
  margin-bottom: 20px;
}

.vault-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.cta-block {
  margin-top: 48px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  padding: 60px 44px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .05) 0%, var(--bg-elev) 60%);
  text-align: center;
}

.cta-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--accent) 50%, transparent 95%);
}

.cta-block::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(var(--accent-rgb), .06) 0%, transparent 70%);
}

.cta-block h2 {
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.035em;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.cta-block h2 span {
  color: var(--accent);
}

.cta-block p {
  font-size: 15px;
  color: var(--fg-3);
  max-width: 44ch;
  margin: 0 auto 36px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.acc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acc-list li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--fg-3);
  line-height: 1.5;
}

.acc-list li::before {
  content: "◈";
  color: var(--accent);
  font-size: 7px;
  flex: none;
  margin-top: 5px;
}

.hero-h1 .dim {
  display: block;
  font-weight: 300;
  color: var(--fg-3);
}

.accordion {
  display: flex;
  flex-direction: column;
  margin-top: 40px;
}

.acc-chip {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-4);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  white-space: nowrap;
}

.acc-desc {
  font-size: 14px;
  color: var(--fg-3);
  line-height: 1.7;
  grid-column: span 2;
}

/* Keyboard focus: the accent's sixth structural slot. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Hero proof slot: the fourth element of every tier hero.
   Variant A, the stat row. Platinums uses a chip row and
   Essentials a metric grid; all three sit in the same slot. */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 52px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.hero-stat .n {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--fg);
  line-height: 1;
}

.hero-stat .n span {
  color: var(--accent);
}

.hero-stat .l {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-top: 4px;
}

.hero-stat-div {
  width: 1px;
  height: 32px;
  background: var(--line-2);
}

/* ==============================================================
   Type scale and spatial rhythm

   Before this, sizes were picked per page and per component:
   10px, 10.5px, 11px, 12px, 13px, 13.5px, 15px, 16px, 17px, 19px,
   20px, and four different hero clamps. That reads as accidental
   because it was. These are the steps, and nothing sits between
   them.

   Optical sizing rule: tracking tightens as size grows, and opens
   as size shrinks. Display type at -0.04em, uppercase labels at
   +0.18em. That is what stops small caps from feeling cramped and
   large headlines from feeling loose.
   ============================================================== */
:root {
  /* Type steps */
  --t-micro:   10.5px;                      /* legal, tertiary meta   */
  --t-label:   11px;                        /* uppercase eyebrows     */
  --t-fine:    12.5px;                      /* chips, table meta      */
  --t-small:   13.5px;                      /* dense supporting copy  */
  --t-base:    15px;                        /* UI text, CTA body      */
  --t-body:    17px;                        /* reading copy           */
  --t-lead:    clamp(16px, 1.8vw, 20px);    /* hero subhead           */
  --t-section: clamp(28px, 3.5vw, 46px);    /* section statements     */
  --t-feature: clamp(28px, 4.5vw, 52px);    /* CTA headline           */
  --t-display: clamp(48px, 7.5vw, 112px);   /* hero                   */

  /* Tracking, paired to the steps above */
  --track-label:   .18em;
  --track-kicker:  .2em;
  --track-body:    -.005em;
  --track-section: -.025em;
  --track-display: -.04em;

  /* Spatial rhythm, 4px base. Section gaps are the large steps. */
  --s-1:  4px;   --s-2:  8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px;   --s-6: 24px;   --s-7: 32px;  --s-8: 40px;
  --s-9: 48px;   --s-10: 64px;  --s-11: 80px; --s-12: 96px;
}

/* Headings set their own rag rather than leaving it to chance. */
.hero-h1,
.statement,
.headline,
.cta-block h2 {
  text-wrap: balance;
}

/* Reading copy avoids orphans where the browser supports it. */
.body-l,
.hero-sub,
.acc-desc,
.exp-body {
  text-wrap: pretty;
}

/* Figures that sit in a row must share a column width, or the row
   jitters as values change. */
.hero-stat .n,
.hero-stats {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ==============================================================
   Micro-interactions

   The accent rule beside a section label draws in as the section
   arrives, so the tier colour enters with the content rather than
   sitting there waiting for it.
   ============================================================== */
.sec-label::before {
  transform-origin: left center;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
/* Collapsed only once JS is present to expand it again. Without the
   script the rule simply renders drawn, rather than never appearing. */
.micro-ready .sec-label::before {
  transform: scaleX(0);
}
.micro-ready .sec-label.is-drawn::before {
  transform: scaleX(1);
}

/* Ghost buttons fill from the leading edge instead of only changing
   border colour. The label lifts to sit above the fill. */
.btn-ghost {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-ghost::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .38s cubic-bezier(.22, 1, .36, 1);
}
.btn-ghost:hover::after,
.btn-ghost:focus-visible::after {
  transform: scaleX(1);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--bg);
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .micro-ready .sec-label::before { transform: scaleX(1); transition: none; }
  .btn-ghost::after { transition: none; }
}
