/* abigwhy.com, the landing page only. styles.css keeps the tokens, the orb, the forms, the footer and the legal pages. */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-5.3.0.woff2') format('woff2');
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-italic-5.3.0.woff2') format('woff2');
}

/* A fallback sized to the serif, so the headline keeps its lines while the file loads. */
@font-face {
  font-family: 'Instrument Serif Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 88%;
  ascent-override: 92%;
  descent-override: 24%;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-5.3.0.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Helvetica Neue');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
}

:root {
  --serif: 'Instrument Serif', 'Instrument Serif Fallback', Georgia, serif;
  --sans: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --measure: 34em;
  --screen-w: 300px;
  --shadow: 0 40px 80px -30px rgba(32, 34, 43, 0.28), 0 2px 6px rgba(32, 34, 43, 0.06);
}

body.landing {
  font-family: var(--sans);
  overflow-x: clip;
}

body.landing h1,
body.landing h2,
body.landing h3 {
  font-family: var(--sans);
  letter-spacing: -0.015em;
}

body.landing .display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.02;
  text-wrap: balance;
}

h1.display {
  font-size: clamp(52px, 10vw, 112px);
  margin: 0 auto;
  max-width: 10em;
}

h2.display {
  font-size: clamp(38px, 6vw, 68px);
  margin: 0 0 16px;
  max-width: 12em;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  z-index: 20;
}

.skip:focus {
  top: 16px;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Header */
body.landing .top {
  position: sticky;
  top: 0;
  z-index: 10;
  max-width: none;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

body.landing .mark {
  font: 600 18px/1 var(--sans);
  letter-spacing: -0.01em;
}

body.landing .mark::before {
  content: none;
}

.mark-svg {
  display: block;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 500 14px/1 var(--sans);
  text-decoration: none;
}

.nav-cta {
  opacity: 0;
  translate: 0 -6px;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    translate 0.3s ease;
}

.nav-cta.is-on {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}

/* The mark, as discs */
.discs {
  position: relative;
  margin: 0 auto;
}

.discs svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.disc {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

/* Hero */
body.landing .hero {
  position: relative;
  min-height: 100svh;
  padding: 24px 20px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
}

.hero-discs {
  width: min(52vw, 300px);
  margin-bottom: 6px;
}

body.landing .hero .lede {
  font-size: clamp(17px, 2.1vw, 21px);
  max-width: var(--measure);
  margin: 0 auto;
}

.join-box {
  width: 100%;
  max-width: 460px;
}

body.landing .join {
  margin: 0;
  max-width: none;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 1px;
  height: 36px;
  overflow: hidden;
  background: var(--line);
}

.scroll-cue span {
  position: absolute;
  inset: 0;
  background: var(--ink-soft);
  animation: cue 1.8s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}

@keyframes cue {
  0% {
    transform: translateY(-100%);
  }
  60%,
  100% {
    transform: translateY(100%);
  }
}

/* The problem */
.problem {
  padding: 18vh 20px 14vh;
  display: grid;
  gap: 0.6em;
  max-width: 1120px;
  margin: 0 auto;
}

.problem .big {
  font-family: var(--serif);
  font-size: clamp(34px, 6.6vw, 84px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

.problem .big:nth-child(2) {
  color: var(--accent);
}

[data-words] .w {
  display: inline-block;
}

/* The dive */
.dive-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 0 20px;
  overflow: hidden;
}

.dive-fill {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--people);
  opacity: 0;
  pointer-events: none;
}

.dive-discs {
  width: min(70vw, 320px);
  position: relative;
  z-index: 1;
}

.dive-labels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.dive-label b {
  display: block;
  font: 500 13px/1.3 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.dive-label span {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.1;
  color: var(--ink);
}

.dive-label[data-ring='4'] span {
  color: var(--people);
}

.dive-copy {
  position: relative;
  z-index: 2;
  max-width: var(--measure);
}

.dive-copy p {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-soft);
  margin: 0;
}

.dots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  gap: 8px;
}

.dots li {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.3s ease;
}

.dots li.is-on {
  background: var(--ink);
}

/* Screen cards: the app's own tokens, no bezel */
.screen {
  position: relative;
  width: var(--screen-w);
  height: calc(var(--screen-w) * 19.5 / 9);
  margin: 0 auto;
  border-radius: 44px;
  background: var(--ground);
  box-shadow:
    var(--shadow),
    0 0 0 1px var(--line);
  overflow: hidden;
  padding: 14px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font: 13px/1.4 var(--ui);
  color: var(--ink);
  text-align: left;
}

.sbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 6px 6px;
  font: 600 13px/1 var(--ui);
}

.sdate {
  font-size: 12px;
  color: var(--ink-soft);
}

.stitle {
  font:
    700 22px/1.15 ui-rounded,
    'SF Pro Rounded',
    var(--ui);
  letter-spacing: -0.01em;
  margin-top: -8px;
}

.sorb {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 10px 0 6px;
}

.sorb.tall {
  flex: 1;
  padding: 10px 0;
}

.screen .orb {
  width: 112px;
  margin: 0;
}

.screen .orb.live {
  width: 150px;
}

.shint {
  font-size: 14px;
  color: var(--ink-soft);
}

.scard {
  background: var(--surface);
  border-radius: 20px;
  padding: 14px 14px 12px;
  display: grid;
  gap: 6px;
}

.scard p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.shead {
  font: 600 15px/1.3 var(--ui);
}

.slabel {
  font: 500 11px/1 var(--ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.sbutton {
  margin-top: 4px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.chips {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--ground);
  font-size: 12px;
  font-weight: 500;
}

.stabs {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  padding: 10px 0 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--ink-soft);
}

.stabs .on {
  color: var(--accent);
  font-weight: 600;
}

.srow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-soft);
}

.stag {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface);
}

.stime {
  font-variant-numeric: tabular-nums;
}

.caption {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  min-height: 2.7em;
}

.question {
  margin: 0;
  font-size: 14px;
  color: var(--accent);
}

.scontrols {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 0 20px;
}

.scontrols span {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  font-weight: 500;
}

.scontrols .end {
  background: var(--ink);
  color: #fff;
}

.sseg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: #ebe5dc;
  font-size: 10.5px;
}

.sseg span {
  flex: 1;
  text-align: center;
  padding: 5px 0;
  border-radius: 8px;
  color: var(--ink-soft);
}

.sseg .on {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.ssince {
  font-size: 11px;
  color: var(--ink-soft);
}

.srows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.srowitem {
  background: var(--surface);
  border-radius: 16px;
  padding: 11px 13px;
  display: grid;
  gap: 2px;
}

.srowitem b {
  font-weight: 600;
  font-size: 14px;
}

.srowitem span {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.srowitem i {
  font-style: normal;
  font-size: 10px;
  color: var(--accent);
}

/* Reveal */
.reveal {
  padding: 10vh 20px;
  display: grid;
  gap: 40px;
  justify-items: center;
  text-align: center;
}

.reveal-copy {
  max-width: var(--measure);
}

.reveal-copy p {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.tiny {
  font-size: 13px;
  color: var(--ink-soft);
}

/* How it works */
.how-stage {
  position: relative;
  padding: 6vh 20px;
  display: grid;
  gap: 64px;
}

.beat {
  display: grid;
  gap: 24px;
  justify-items: center;
  text-align: center;
}

.beat .copy {
  max-width: var(--measure);
}

.beat .copy p {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-soft);
  margin: 0;
}

/* Notifications */
.notes {
  padding: 10vh 20px;
  display: grid;
  gap: 40px;
  justify-items: center;
  text-align: center;
}

.notes-copy {
  max-width: var(--measure);
}

.notes-copy p {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-soft);
  margin: 0;
}

.lock {
  width: min(100%, 420px);
  border-radius: 36px;
  padding: 44px 16px 28px;
  background:
    radial-gradient(120% 80% at 20% 10%, rgba(255, 185, 138, 0.55), transparent 60%),
    radial-gradient(90% 70% at 85% 90%, rgba(255, 138, 122, 0.5), transparent 60%), linear-gradient(170deg, #c7d3ff, #7f98fb 55%, #5b7cfa);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.lock-date {
  font: 500 16px/1.2 var(--ui);
  opacity: 0.9;
}

.lock-time {
  font: 200 76px/1 var(--ui);
  letter-spacing: -0.02em;
  margin: 2px 0 26px;
}

.stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.notif {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--ink);
  text-align: left;
  font: 15px/1.3 var(--ui);
}

.notif img {
  border-radius: 9px;
  display: block;
}

.notif p {
  margin: 2px 0 0;
}

.nhead {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.nhead b {
  font-weight: 600;
}

.nhead span {
  font-size: 13px;
  color: var(--ink-soft);
}

@media (prefers-reduced-transparency: reduce) {
  .notif {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* The letter */
.letter-section {
  padding: 10vh 20px;
  display: grid;
  gap: 40px;
  justify-items: center;
  text-align: center;
}

.letter {
  width: min(100%, 440px);
  background: var(--surface);
  border-radius: 22px;
  padding: 26px 28px;
  text-align: left;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.4;
  box-shadow: var(--shadow);
}

.letter p {
  margin: 0 0 1em;
}

.letter p:last-child {
  margin-bottom: 0;
}

.ldate {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
}

.lsign {
  font-style: italic;
  color: var(--ink-soft);
}

.letter-copy {
  max-width: var(--measure);
}

.letter-copy p {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.since {
  display: inline-grid;
  gap: 2px;
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink) !important;
  font-size: 16px !important;
}

.since span {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Trust */
.trust {
  padding: 8vh 20px 6vh;
  max-width: 760px;
  margin: 0 auto;
}

.rows {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border-radius: 22px;
  overflow: hidden;
}

.rows li {
  background: var(--surface);
  padding: 18px 22px;
  display: grid;
  gap: 4px;
}

.rows b {
  font-weight: 600;
}

.rows span {
  color: var(--ink-soft);
}

body.landing .trust .card {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* Close */
.close {
  position: relative;
  padding: 10vh 20px 12vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  overflow: hidden;
}

.close-discs {
  width: min(44vw, 220px);
}

.close .lede {
  max-width: var(--measure);
  margin: 0;
}

.store[hidden] {
  display: none;
}

.store {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font: 600 15px/1 var(--ui);
}

.qr {
  display: none;
  gap: 8px;
  justify-items: center;
  font-size: 13px;
  color: var(--ink-soft);
}

@media (hover: hover) and (min-width: 1024px) {
  .qr {
    display: grid;
  }
}

/* Desktop with motion: the pinned stages. Reduced motion gets the stacked layout at any width. */
@media (min-width: 768px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  .dive-stage {
    height: 100svh;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0;
    padding: 0 6vw;
  }

  .dive-discs {
    width: min(44vmin, 420px);
    justify-self: center;
  }

  .dive-labels {
    position: relative;
    height: 10em;
  }

  .dive-label {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    gap: 8px;
    opacity: 0;
  }

  .dive-copy {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 0 10vw;
    opacity: 0;
    z-index: 3;
  }

  .dive-copy h2,
  .dive-copy p {
    color: var(--ink);
    margin-left: auto;
    margin-right: auto;
  }

  .dots {
    display: flex;
    position: absolute;
    left: 50%;
    bottom: 28px;
    translate: -50% 0;
    z-index: 4;
  }

  .dive-dots li {
    background: rgba(32, 34, 43, 0.18);
  }

  .reveal {
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    text-align: left;
    max-width: 1040px;
    margin: 0 auto;
    gap: 8vw;
  }

  .how-stage {
    height: 100svh;
    max-width: 1040px;
    margin: 0 auto;
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr;
    align-items: center;
    gap: 8vw;
    padding: 0 20px;
  }

  .beat {
    display: contents;
  }

  .beat .screen {
    grid-column: 1;
    grid-row: 1;
  }

  .beat .copy {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    justify-self: start;
  }

  .beat:not([data-beat='1']) .screen,
  .beat:not([data-beat='1']) .copy {
    opacity: 0;
  }

  .notes {
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
    text-align: left;
    max-width: 1040px;
    margin: 0 auto;
    gap: 8vw;
  }

  .letter-section {
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    text-align: left;
    max-width: 1040px;
    margin: 0 auto;
    gap: 8vw;
  }
}

/* Phones: a tighter screen card */
@media (max-width: 767.98px) {
  :root {
    --screen-w: min(78vw, 300px);
  }

  .hero-discs {
    width: min(58vw, 240px);
  }

  .join-box .join {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue span {
    animation: none;
  }

  .nav-cta {
    transition: none;
  }
}
