@layer reset, tokens, base, layout, components, motion;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, figure, ol { margin: 0; }
  img, video { display: block; max-width: 100%; }
  button, input, textarea, select { font: inherit; }
}

@layer tokens {
  :root {
    --canvas: #f5f1e8;
    --paper: #fffdf8;
    --ink: #151b31;
    --ink-soft: #555966;
    --hairline: #d9d4c9;
    --boundary: #8a857d;
    --coral: #c33f44;
    --mint: #337a65;
    --butter: #f4d98b;
    --display: ui-rounded, "SF Pro Rounded", "SF Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --page-gutter: clamp(1.25rem, 4vw, 4rem);
    --content: 76rem;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --shadow-paper: 0 1.4rem 4rem rgb(67 56 44 / 12%), 0 .2rem 1rem rgb(67 56 44 / 8%);
  }
}

@layer base {
  body {
    min-width: 20rem;
    color: var(--ink);
    background:
      radial-gradient(circle at 18% 11%, rgb(244 217 139 / 20%), transparent 24rem),
      var(--canvas);
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
  }

  body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: .28;
    background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgb(21 27 49 / 1.4%) 4px);
  }

  a { color: inherit; }
  main:focus { outline: none; }

  h1, h2, h3 {
    font-family: var(--display);
    letter-spacing: -.045em;
    line-height: 1.02;
  }

  h2 { font-size: clamp(2.4rem, 6vw, 5.4rem); }
  h3 { font-size: clamp(1.65rem, 3vw, 2.7rem); }

  ::selection {
    color: var(--ink);
    background: var(--butter);
  }

  :focus-visible {
    outline: .2rem solid var(--coral);
    outline-offset: .22rem;
  }

  .skip-link {
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 100;
    padding: .7rem 1rem;
    border-radius: .5rem;
    color: var(--paper);
    background: var(--ink);
    transform: translateY(-180%);
  }

  .skip-link:focus { transform: translateY(0); }
}

@layer layout {
  .site-header {
    position: relative;
    z-index: 20;
    display: flex;
    width: min(100%, calc(var(--content) + (var(--page-gutter) * 2)));
    margin-inline: auto;
    padding: 1.6rem var(--page-gutter);
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .site-header nav {
    display: flex;
    align-items: center;
    gap: clamp(.9rem, 2.5vw, 2.2rem);
  }

  .site-header nav a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
  }

  .hero {
    display: grid;
    width: min(100%, calc(var(--content) + (var(--page-gutter) * 2)));
    min-height: calc(100svh - 6rem);
    overflow: clip;
    margin-inline: auto;
    padding: clamp(2.5rem, 7vw, 7rem) var(--page-gutter) clamp(5rem, 9vw, 9rem);
    align-items: center;
    grid-template-columns: minmax(0, .9fr) minmax(24rem, 1.1fr);
    gap: clamp(3rem, 7vw, 8rem);
  }

  .hero-copy { position: relative; z-index: 5; }

  .hero h1 {
    max-width: 13ch;
    margin-top: 1.1rem;
    font-size: clamp(3.8rem, 7.7vw, 8.3rem);
    letter-spacing: -.065em;
  }

  .hero h1 span { display: block; }

  .hero-summary {
    max-width: 38rem;
    margin-top: 2rem;
    color: var(--ink-soft);
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    line-height: 1.55;
  }

  .hero-actions {
    display: flex;
    margin-top: 2rem;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.4rem;
  }

  .availability {
    display: flex;
    margin-top: 1.8rem;
    flex-wrap: wrap;
    gap: .55rem;
  }

  .hero-stage {
    position: relative;
    min-height: clamp(35rem, 60vw, 49rem);
  }

  .promise-band {
    display: grid;
    min-height: 27rem;
    padding: clamp(5rem, 9vw, 9rem) var(--page-gutter);
    place-content: center;
    color: var(--paper);
    background: var(--ink);
    text-align: center;
  }

  .promise-band p {
    font-family: var(--display);
    font-size: clamp(2.1rem, 6.4vw, 6.6rem);
    font-weight: 750;
    letter-spacing: -.055em;
    line-height: 1.02;
  }

  .promise-band p:last-child { color: var(--butter); }

  .section-shell {
    width: min(100%, calc(var(--content) + (var(--page-gutter) * 2)));
    margin-inline: auto;
    padding: clamp(6rem, 11vw, 11rem) var(--page-gutter);
  }

  .section-intro { max-width: 68rem; }
  .section-intro h2 { margin-top: 1rem; }

  .section-intro > p:last-child {
    max-width: 48rem;
    margin-top: 1.4rem;
    color: var(--ink-soft);
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  }

  .flow-list {
    display: grid;
    margin-top: clamp(5rem, 10vw, 10rem);
    padding: 0;
    list-style: none;
    gap: clamp(7rem, 13vw, 13rem);
  }

  .flow-step {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, .76fr);
    gap: clamp(3rem, 10vw, 9rem);
  }

  .flow-step-reverse .step-copy { order: 2; }
  .flow-step-reverse .screen-card { order: 1; }

  .step-copy { max-width: 34rem; }
  .step-copy h3 { margin-top: 1.1rem; }

  .step-copy p {
    margin-top: 1.2rem;
    color: var(--ink-soft);
    font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  }

  .film {
    width: 100%;
    max-width: none;
    color: var(--paper);
    background: var(--ink);
  }

  .film > * {
    width: min(100%, var(--content));
    margin-inline: auto;
  }

  .platform-ledger {
    display: grid;
    margin-top: clamp(4rem, 8vw, 7rem);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    grid-template-columns: 1fr 1fr;
  }

  .platform {
    position: relative;
    min-width: 0;
    padding: clamp(2rem, 5vw, 5rem);
  }

  .platform + .platform { border-left: 1px solid var(--hairline); }

  .closing {
    display: grid;
    min-height: 46rem;
    padding: clamp(6rem, 12vw, 12rem) var(--page-gutter);
    place-items: center;
    align-content: center;
    text-align: center;
  }

  .closing h2 {
    max-width: 14ch;
    margin-top: 1rem;
    font-size: clamp(3rem, 8vw, 8.5rem);
  }

  .closing .button { margin-top: 2.4rem; }

  footer {
    display: grid;
    padding: 2.6rem var(--page-gutter);
    align-items: center;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    color: var(--paper);
    background: var(--ink);
  }

  footer p { color: #c8c2b7; }
  footer .footer-note { text-align: right; }
}

@layer components {
  .wordmark {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: .65rem;
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.035em;
    text-decoration: none;
  }

  .brand-icon {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 22%;
    box-shadow: 0 .18rem .6rem rgb(67 56 44 / 13%);
  }

  footer .brand-icon {
    box-shadow: 0 .18rem .6rem rgb(0 0 0 / 22%);
  }

  .nav-cta {
    padding-inline: 1rem;
    border: 1px solid var(--ink);
    border-radius: .65rem;
  }

  .eyebrow {
    color: var(--coral);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .coral-underline {
    position: relative;
    z-index: 0;
    width: fit-content;
  }

  .coral-underline::after {
    position: absolute;
    right: 0;
    bottom: .04em;
    left: 0;
    z-index: -1;
    height: .13em;
    border-radius: 100%;
    content: "";
    background: var(--coral);
    transform: rotate(-1.2deg) scaleX(.94);
    transform-origin: left;
  }

  .button {
    display: inline-flex;
    min-height: 3.25rem;
    padding: .86rem 1.25rem;
    align-items: center;
    justify-content: center;
    border-radius: .72rem;
    font-weight: 780;
    line-height: 1.2;
    text-decoration: none;
  }

  .button-primary {
    color: #fff;
    background: var(--ink);
    box-shadow: 0 .55rem 1.3rem rgb(21 27 49 / 16%);
  }

  .button-primary:hover { transform: translateY(-.15rem); }

  .text-link {
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    font-weight: 780;
    text-underline-offset: .28rem;
  }

  .availability span {
    padding: .45rem .7rem;
    border: 1px solid var(--hairline);
    border-radius: 99rem;
    color: var(--ink-soft);
    background: rgb(255 253 248 / 56%);
    font-size: .78rem;
  }

  .availability strong { color: var(--ink); }

  .phone-frame img {
    width: 100%;
    height: auto;
    border: .5rem solid var(--ink);
    border-radius: 2.5rem;
    background: var(--paper);
    box-shadow: var(--shadow-paper);
  }

  .phone-frame figcaption {
    margin-top: .8rem;
    color: var(--ink-soft);
    font-size: .76rem;
    font-weight: 720;
    letter-spacing: .04em;
    text-align: center;
    text-transform: uppercase;
  }

  .hero-phone {
    position: absolute;
    top: 1%;
    right: 3%;
    width: min(58%, 27rem);
    transform: translateY(var(--hero-shift, 0)) rotate(2deg);
  }

  .hero-phone img { border-width: .6rem; }

  .widget-slip {
    position: absolute;
    top: 46%;
    left: 0;
    z-index: 3;
    width: min(64%, 29rem);
    min-height: 13rem;
    padding: 1.4rem 1.55rem;
    border: 1px solid rgb(21 27 49 / 12%);
    border-radius: 1.7rem;
    background: var(--paper);
    box-shadow: var(--shadow-paper);
    transform: translateY(var(--widget-shift, 0)) rotate(-3.4deg);
  }

  .widget-label,
  .mini-label {
    color: var(--coral);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  .widget-priority {
    margin-top: .9rem;
    font-family: var(--display);
    font-size: clamp(1.35rem, 3vw, 2.3rem);
    font-weight: 720;
    line-height: 1.16;
  }

  .widget-note {
    margin-top: 1.2rem;
    color: var(--ink-soft);
    font-size: .85rem;
  }

  .hand-note {
    position: absolute;
    right: 2%;
    bottom: 4%;
    color: var(--coral);
    font-family: "Bradley Hand", "Segoe Print", cursive;
    font-size: clamp(1rem, 2vw, 1.5rem);
    transform: rotate(-5deg);
  }

  .paper-line {
    position: absolute;
    border: 1px solid var(--hairline);
    border-radius: 50%;
  }

  .paper-line-one { inset: 8% 0 16% 14%; transform: rotate(-6deg); }
  .paper-line-two { inset: 15% 10% 6% 3%; border-color: rgb(195 63 68 / 22%); transform: rotate(8deg); }

  .step-number {
    display: inline-grid;
    width: 3.2rem;
    height: 3.2rem;
    border: 1px solid var(--ink);
    border-radius: 50%;
    place-items: center;
    font-size: .82rem;
    font-weight: 850;
  }

  .screen-card {
    width: min(100%, 25rem);
    justify-self: center;
  }

  .phone-frame-android img { border-radius: 2.2rem; }

  .flow-step-wide {
    grid-template-columns: minmax(0, .7fr) minmax(28rem, 1.3fr);
    gap: clamp(3rem, 7vw, 6rem);
  }

  .screen-pair {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(0, .78fr);
    gap: clamp(1rem, 2.5vw, 2rem);
  }

  .screen-pair .screen-card { width: 100%; }

  .screen-card-home {
    margin-top: clamp(2rem, 5vw, 5rem);
  }

  .section-intro-light .eyebrow { color: #ff9a94; }
  .section-intro-light > p:last-child { color: #c8c2b7; }

  .film-frame {
    margin-top: clamp(3rem, 7vw, 6rem);
    border: 1px solid rgb(255 253 248 / 20%);
    border-radius: 1.1rem;
    overflow: hidden;
    background: #0d1020;
    box-shadow: 0 2rem 6rem rgb(0 0 0 / 28%);
  }

  .film-frame video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0d1020;
  }

  .transcript {
    margin-top: 1.4rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid rgb(255 253 248 / 18%);
    border-radius: .75rem;
    color: #c8c2b7;
  }

  .transcript summary {
    min-height: 2.75rem;
    color: var(--paper);
    font-weight: 760;
    cursor: pointer;
  }

  .transcript p + p { margin-top: .55rem; }

  .platform-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .platform-name {
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 850;
  }

  .status-dot {
    display: inline-flex;
    padding: .35rem .6rem;
    border-radius: 99rem;
    font-size: .7rem;
    font-weight: 800;
    line-height: 1.2;
  }

  .status-mint { color: #175743; background: #cbe9dc; }
  .status-butter { color: #4e3f12; background: var(--butter); }

  .platform h3 { margin-top: clamp(3rem, 6vw, 6rem); }

  .platform > p {
    margin-top: 1.2rem;
    color: var(--ink-soft);
  }

  .ios-detail {
    width: min(72%, 20rem);
    margin: 3rem auto 0;
  }

  .privacy-note {
    margin-top: clamp(3rem, 7vw, 7rem);
    padding-top: 1.3rem;
    border-top: 1px solid var(--hairline);
  }

  .privacy-note p:last-child {
    margin-top: .75rem;
    color: var(--ink);
    font-family: var(--display);
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    font-weight: 720;
    line-height: 1.25;
  }

  .faq-list {
    margin-top: clamp(3.5rem, 7vw, 6rem);
    border-top: 1px solid var(--hairline);
  }

  .faq-list details { border-bottom: 1px solid var(--hairline); }

  .faq-list summary {
    min-height: 5.5rem;
    display: flex;
    padding: 1.4rem 3.2rem 1.4rem 0;
    align-items: center;
    font-family: var(--display);
    font-size: clamp(1.25rem, 2.6vw, 2rem);
    font-weight: 760;
    line-height: 1.2;
    cursor: pointer;
  }

  .faq-list summary::marker { color: var(--coral); }

  .faq-list details p {
    max-width: 56rem;
    padding: 0 3.2rem 1.7rem 0;
    color: var(--ink-soft);
    font-size: 1.05rem;
  }

  .store-status {
    display: flex;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    gap: .55rem;
  }

  .store-status span {
    padding: .6rem .85rem;
    border: 1px dashed var(--boundary);
    border-radius: .65rem;
    color: var(--ink-soft);
    background: rgb(255 253 248 / 52%);
    font-size: .8rem;
    font-weight: 720;
  }
}

@layer motion {
  .reveal {
    opacity: 1;
    transform: none;
  }

  .js .reveal {
    opacity: 0;
    transform: translateY(1.2rem);
    transition: opacity .75s var(--ease-out), transform .75s var(--ease-out);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .button,
  .hero-phone,
  .widget-slip {
    transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      scroll-behavior: auto !important;
      animation-duration: .01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: .01ms !important;
    }
    .js .reveal { opacity: 1; transform: none; }
    .button-primary:hover { transform: none; }
  }
}

@media (hover: hover) and (pointer: fine) {
  .hero-stage:hover .hero-phone { transform: translateY(calc(var(--hero-shift, 0) - .45rem)) rotate(1.2deg); }
  .hero-stage:hover .widget-slip { transform: translateY(calc(var(--widget-shift, 0) + .35rem)) rotate(-2.4deg); }
  .site-header nav a:not(.nav-cta):hover,
  .text-link:hover { color: var(--coral); }
  .nav-cta:hover { color: var(--paper); background: var(--ink); }
}

@media (max-width: 60rem) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy { max-width: 46rem; }
  .hero-stage { min-height: 42rem; }
  .hero-phone { right: 8%; width: min(52%, 25rem); }
  .widget-slip { left: 7%; width: min(58%, 27rem); }
  .hand-note { right: 10%; }

  .flow-step { gap: 3rem; }
  .platform { padding-inline: clamp(1.5rem, 4vw, 3rem); }

  footer { grid-template-columns: 1fr; text-align: center; }
  footer .wordmark { justify-self: center; }
  footer .footer-note { text-align: center; }
}

@media (max-width: 45rem) {
  .site-header { padding-top: 1rem; padding-bottom: 1rem; }
  .site-header nav a:first-child { display: none; }

  .hero {
    padding-top: 2.5rem;
    gap: 2rem;
  }

  .hero h1 { font-size: clamp(3.25rem, 16vw, 5.2rem); }
  .hero-stage { min-height: 35rem; }
  .hero-phone { top: 0; right: 1%; width: 58%; }
  .widget-slip { top: 46%; left: 0; width: 68%; min-height: 11.5rem; }
  .hand-note { right: 3%; bottom: 0; }

  .flow-step,
  .flow-step-wide,
  .platform-ledger { grid-template-columns: 1fr; }

  .screen-pair { grid-template-columns: 1fr; }
  .screen-pair .screen-card { width: min(82%, 23rem); }
  .screen-card-home { margin-top: 0; }

  .flow-step-reverse .step-copy,
  .flow-step-reverse .screen-card { order: initial; }

  .screen-card { width: min(82%, 23rem); }
  .platform + .platform { border-top: 1px solid var(--hairline); border-left: 0; }
  .platform-heading { align-items: flex-start; flex-direction: column; }

  .closing { min-height: 38rem; }
}

@media (max-width: 27rem) {
  .site-header .nav-cta { padding-inline: .7rem; font-size: .78rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button, .text-link { width: 100%; justify-content: center; }
  .hero-stage { min-height: 31rem; }
  .widget-slip { width: 76%; }
  .widget-note { display: none; }
  .hero-phone { width: 62%; }
  .availability { align-items: stretch; flex-direction: column; }
  .availability span { text-align: center; }
  .screen-card { width: 92%; }
}
