/* Ate Plates — landing. Tokens transcribed from ios/ios-mockup.pen `variables`;
   layout per web/web-mockup.pen (mobile 390 = pixel truth). */

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

:root {
  --coral: #FF7F6B;
  --coral-press: #F26A55;
  --coral-soft: #FFE7E0;
  --peach: #FFB088;
  --cream: #FFF5E8;
  --beige: #F9F4EF;
  --surface: #FFFFFF;
  --border: #EFE6DA;
  --charcoal: #2C3E50;
  --warm-gray: #757575;
  --muted: #A99F92;
  --teal: #4DB8C4;
  --teal-soft: #E2F4F6;
  --green: #5AC77C;
  --green-soft: #E4F6EA;
  --green-text: #2D7A4F;
  --teal-text: #2C7A85;
  --red-soft: #FCE9E7;
  --red-text: #C0392B;
  --amber-text: #C8702E;
  --shadow-card: 0 3px 12px rgba(44, 62, 80, 0.06);
  --shadow-cta: 0 8px 20px rgba(255, 127, 107, 0.2);
  --font-stack: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.4;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

main,
footer {
  position: relative;
  z-index: 1;
}

/* ---------- ambient sketch plates (behind everything) ---------- */

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

.plates {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.plate {
  position: absolute;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  color: var(--muted);
  opacity: 0.3;
}

/* static scatter — the visible state when motion is off */
.p1 { width: 110px; height: 110px; top: 9%;  left: -28px; color: var(--peach); }
.p2 { width: 64px;  height: 64px;  top: 5%;  right: 8%; }
.p3 { width: 96px;  height: 96px;  top: 36%; right: -30px; color: var(--teal); opacity: 0.22; }
.p4 { width: 70px;  height: 70px;  top: 58%; left: 4%; color: var(--peach); }
.p5 { width: 120px; height: 120px; top: 78%; right: 6%; opacity: 0.24; }
.p6 { width: 52px;  height: 52px;  top: 88%; left: 14%; color: var(--teal); opacity: 0.26; }

@media (max-width: 600px) {
  .p4,
  .p6 {
    display: none;
  }
}

img {
  max-width: 100%;
  height: auto;
}

section {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px;
}

h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin-bottom: 14px;
}

/* ---------- hero ---------- */

#hero {
  padding-top: 48px;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

#hero .mascot {
  width: 176px;
}

.wordmark {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.qa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.question {
  display: inline-block;
  position: relative;
  font-size: clamp(22px, 6vw, 26px);
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--warm-gray);
  opacity: 0.55; /* settled state: struck and dimmed */
}

.question::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  top: 55%;
  height: 3px;
  border-radius: 2px;
  background: var(--coral);
  transform: scaleX(1);
  transform-origin: left center;
}

.answer {
  font-size: clamp(36px, 9.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.answer .ch {
  display: inline-block;
}

.sub {
  color: var(--warm-gray);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  max-width: 30ch;
}

.cta {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 28px;
  box-shadow: var(--shadow-cta);
  transition: transform 0.15s ease, background 0.15s ease;
}

.cta:hover {
  transform: translateY(-1px);
}

.cta:active {
  background: var(--coral-press);
  transform: scale(0.98);
}

.micro {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- problem ---------- */

#problem .lead {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

#problem p:not(.lead) {
  font-size: 17px;
  color: var(--warm-gray);
  line-height: 1.55;
  margin-bottom: 10px;
}

/* ---------- how ---------- */

.cards {
  display: grid;
  gap: 16px;
}

.card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.step {
  font-size: 15px;
  font-weight: 600;
  color: var(--coral-press);
}

.stepsub {
  font-size: 14px;
  font-weight: 500;
  color: var(--warm-gray);
  line-height: 1.4;
  margin-top: 4px;
}

.mock {
  background: var(--beige);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mockrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.m-emoji {
  font-size: 19px;
}

.dish {
  font-size: 17px;
  font-weight: 600;
}

.minichip {
  background: var(--surface);
  color: var(--warm-gray);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 9px;
}

.rotation {
  font-size: 14px;
  font-weight: 700;
  color: var(--coral-press);
}

.chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 5px 12px;
}

.chip-red {
  background: var(--red-soft);
  color: var(--red-text);
}

.chip-green {
  background: var(--green-soft);
  color: var(--green-text);
}

.chip-teal {
  background: var(--teal-soft);
  color: var(--teal-text);
}

.mockcaption {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.pick .dish {
  font-size: 16px;
}

.pick .check {
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

.check.ok {
  color: var(--green-text);
}

.check.new {
  color: var(--amber-text);
}

.closing {
  font-size: 19px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.35;
  text-align: center;
  max-width: 26ch;
  margin: 30px auto 0;
}

.closing::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--coral);
  margin: 0 auto 12px;
}

/* ---------- why ---------- */

.blocks {
  display: grid;
  gap: 20px;
}

.block h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 5px;
}

.block p {
  font-size: 16px;
  color: var(--warm-gray);
  line-height: 1.5;
}

/* ---------- waitlist ---------- */

#waitlist {
  padding-top: 48px;
  padding-bottom: 48px;
}

.wcard {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.wcard h2 {
  margin-bottom: 0;
}

.wcard p {
  font-size: 16px;
  font-weight: 500;
  color: var(--warm-gray);
  line-height: 1.45;
  max-width: 36ch;
}

.wcard .micro {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- footer ---------- */

footer {
  text-align: center;
  padding: 24px 24px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.foot-mascot {
  width: 44px;
}

.foot-brand {
  font-size: 14px;
  font-weight: 700;
}

.egg {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  max-width: 40ch;
  line-height: 1.4;
}

.contact {
  font-size: 13px;
  font-weight: 500;
  color: var(--warm-gray);
  text-decoration: none;
  margin-top: 4px;
}

.contact:hover {
  text-decoration: underline;
}

.contact:active {
  color: var(--coral-press);
}

.copyright {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------- 404 / simple centered pages ---------- */

main.placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 48px 24px;
}

.placeholder .mascot {
  width: 190px;
}

.placeholder h1 {
  font-size: clamp(32px, 8.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ---------- desktop ---------- */

@media (min-width: 900px) {
  #hero {
    max-width: 1020px;
    display: grid;
    grid-template-columns: 1fr 320px;
    column-gap: 48px;
    row-gap: 16px;
    text-align: left;
    align-items: start;
    align-content: center;
    padding-top: 88px;
    padding-bottom: 72px;
  }

  #hero .mascot {
    grid-column: 2;
    grid-row: 1 / 6;
    align-self: center;
    width: 300px;
  }

  #hero .wordmark,
  #hero .qa,
  #hero .sub,
  #hero .cta,
  #hero .micro {
    grid-column: 1;
  }

  #hero .qa {
    align-items: flex-start;
  }

  #hero .cta {
    justify-self: start;
  }

  .question {
    font-size: 32px;
  }

  .answer {
    font-size: 64px;
    letter-spacing: -1.5px;
    line-height: 1.1;
  }

  .sub {
    font-size: 20px;
  }

  h2 {
    font-size: 30px;
  }

  #how {
    max-width: 1020px;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  /* equal-height cards; the beige mocks stretch to a shared bottom edge */
  .card {
    display: flex;
    flex-direction: column;
  }

  .card .mock {
    flex: 1;
    justify-content: flex-start;
  }

  .closing {
    font-size: 21px;
  }
}

/* Print: never hide scroll-revealed content */
@media print {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- motion (opt-in only) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* plates rise from below the viewport like bubbles, continuously;
     negative delays mean the screen is already populated at load */
  .plate {
    top: 102%;
    bottom: auto;
    animation: bubble-rise var(--dur, 26s) linear var(--del, 0s) infinite;
  }

  .p1 { --dur: 24s; }
  .p2 { --dur: 32s; --del: -12s; }
  .p3 { --dur: 20s; --del: -8s; }
  .p4 { --dur: 28s; --del: -18s; }
  .p5 { --dur: 22s; --del: -4s; }
  .p6 { --dur: 34s; --del: -26s; }

  @keyframes bubble-rise {
    0% {
      transform: translate(0, 0) rotate(0deg);
    }
    25% {
      transform: translate(16px, -34vh) rotate(4deg);
    }
    50% {
      transform: translate(-12px, -68vh) rotate(-3deg);
    }
    75% {
      transform: translate(14px, -101vh) rotate(3deg);
    }
    100% {
      transform: translate(-6px, -134vh) rotate(-2deg);
    }
  }

  /* hero sequence — plays once, question stays readable throughout */
  .js #hero .mascot {
    animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }

  .js #hero .wordmark {
    opacity: 0;
    animation: fadein 0.4s ease-out 0.15s forwards;
  }

  .js .question {
    opacity: 1;
    animation:
      q-in 0.35s ease-out 0.15s backwards,
      q-dim 0.4s ease-out 1.4s forwards;
  }

  .js .question::after {
    transform: scaleX(0);
    animation: strike 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
  }

  /* the answer writes itself on, letter by letter */
  .js .answer .ch {
    opacity: 0;
    animation: write 0.25s ease-out forwards;
    animation-delay: calc(1.35s + var(--i) * 0.038s);
  }

  .js #hero .sub {
    opacity: 0;
    animation: rise 0.45s ease-out 2.1s forwards;
  }

  .js #hero .cta {
    opacity: 0;
    animation: rise 0.45s ease-out 2.25s forwards;
  }

  .js #hero .micro {
    opacity: 0;
    animation: fadein 0.35s ease-out 2.4s forwards;
  }

  /* scroll reveals below the fold */
  .js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  }

  .js .reveal.in-view {
    opacity: 1;
    transform: none;
  }

  @keyframes pop {
    from {
      opacity: 0;
      transform: scale(0.6);
    }
  }

  @keyframes fadein {
    to {
      opacity: 1;
    }
  }

  @keyframes q-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes q-dim {
    to {
      opacity: 0.55;
    }
  }

  @keyframes strike {
    to {
      transform: scaleX(1);
    }
  }

  @keyframes write {
    from {
      opacity: 0;
      transform: translateY(0.18em) rotate(2deg) scale(0.92);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
