/* YumLog's site. The colours are the app's: the icon's lavender for the ground,
   the logo's coral (AccentColor), and berry for over the goal (BrandColors.swift). */

:root {
  color-scheme: light;

  --ground: #f2f3fe;
  --panel: #e7e8fb;
  --panel-deep: #dcdef8;
  --card: #ffffff;
  --app-ground: #f2f2f7;

  --ink: #1d1b2c;
  --ink-2: #4c4a60;
  --ink-3: #78768e;
  --line: rgb(29 27 44 / 0.09);

  --coral: #f2533a;
  --coral-deep: #e53e30;
  --coral-light: #ff8d6b;
  --berry: #cf2440;

  --display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;

  --shadow-soft: 0 1px 2px rgb(40 30 90 / 0.06), 0 8px 24px -6px rgb(40 30 90 / 0.14);
  --shadow-lift: 0 2px 4px rgb(40 30 90 / 0.08), 0 30px 70px -20px rgb(40 30 90 / 0.38);

  --gutter: 32px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Bar ─────────────────────────────────────────────── */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(242 243 254 / 0.82);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
}

.bar-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

.brand {
  display: block;
  color: var(--coral);
}

.logotype {
  display: block;
  width: 56px;
  aspect-ratio: 320 / 229;
  fill: currentColor;
}

.links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
}

.links a {
  color: var(--ink-2);
  text-decoration: none;
}

.links a:hover {
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.pill:hover {
  background: #000;
}

/* ── Hero ────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 40px;
  min-height: min(calc(100svh - 72px), 820px);
  padding-top: 24px;
  padding-bottom: 48px;
}

.hero h1 {
  font-size: clamp(48px, 6.4vw, 84px);
  font-weight: 900;
}

.lede {
  margin-top: 24px;
  max-width: 34ch;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink-2);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 36px;
}

.store {
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.cta-note {
  font-size: 15px;
  color: var(--ink-3);
}

/* The hero's picture: Today on the phone, the watch listening, and things people say. */
.stage {
  position: relative;
  height: 640px;
}

.phone {
  position: absolute;
  width: 296px;
  padding: 9px;
  border-radius: 54px;
  background: #101015;
  box-shadow:
    inset 0 0 0 1.5px #3b3b46,
    0 0 0 1.5px #c7c8d6,
    var(--shadow-lift);
}

.phone .screen {
  position: relative;
  overflow: hidden;
  border-radius: 45px;
}

/* The Dynamic Island: a simulator screenshot leaves it out. */
.phone .screen::after {
  content: "";
  position: absolute;
  top: 1.3%;
  left: 50%;
  width: 31%;
  height: 4.2%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}

.hero-phone {
  top: 0;
  right: 40px;
  transform: rotate(4deg);
}

.watch {
  position: relative;
  width: 176px;
}

/* The band, top and bottom, in coral. */
.watch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -64px;
  bottom: -64px;
  width: 72%;
  transform: translateX(-50%);
  border-radius: 40px;
  background: linear-gradient(90deg, #e2452f, var(--coral-light) 45%, #e9472f);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
}

.case {
  position: relative;
  padding: 11px;
  border-radius: 48px;
  background: #0b0b0e;
  box-shadow:
    inset 0 0 0 1.5px #3b3b46,
    0 0 0 2px #b9bacb,
    var(--shadow-lift);
}

.case img {
  border-radius: 38px;
}

/* Digital Crown and side button. */
.case::before,
.case::after {
  content: "";
  position: absolute;
  right: -7px;
  width: 7px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(90deg, #9d9eb0, #d9dae6);
}

.case::before {
  top: 24%;
  height: 36px;
}

.case::after {
  top: 52%;
  height: 46px;
  right: -5px;
  width: 5px;
}

.hero-watch {
  position: absolute;
  left: 4%;
  bottom: 70px;
  transform: rotate(-7deg);
}

/* Things people say: white chips with a mic. */
.said {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  animation: bob 7s ease-in-out infinite;
}

.said svg {
  width: 18px;
  height: 18px;
  color: var(--coral);
  flex: none;
}

.s1 {
  top: 8%;
  left: 2%;
  rotate: -4deg;
}
.s2 {
  top: 34%;
  right: -4%;
  rotate: 3deg;
  animation-delay: -2s;
}
.s3 {
  bottom: 8%;
  right: 8%;
  rotate: -2deg;
  animation-delay: -4s;
}
.s4 {
  top: 47%;
  left: 0;
  rotate: 2deg;
  animation-delay: -5.5s;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ── Facts ───────────────────────────────────────────── */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 8px;
  padding-bottom: 8px;
}

.facts > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px;
  border-left: 1px solid var(--line);
}

.facts > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.facts strong {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.facts span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Intro ───────────────────────────────────────────── */

.intro {
  max-width: 920px;
  padding-top: 140px;
  padding-bottom: 80px;
  text-align: center;
}

.intro h2,
.steps h2,
.faq h2,
.closing h2 {
  font-size: clamp(38px, 5vw, 64px);
}

.intro p {
  margin: 28px auto 0;
  max-width: 44em;
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ── Features ────────────────────────────────────────── */

.feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 72px;
  padding-top: 64px;
  padding-bottom: 64px;
}

.feature.flip {
  grid-template-columns: 1.1fr 1fr;
}

.feature.flip .panel {
  order: -1;
}

.feature h3 {
  font-size: clamp(32px, 3.8vw, 50px);
}

.feature p {
  margin-top: 20px;
  max-width: 32em;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgb(29 27 44 / 0.06);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  padding: 48px 40px;
  border-radius: 36px;
  background: var(--panel);
  overflow: hidden;
}

/* Watch row */
.panel-watch .watch {
  width: 190px;
  transform: rotate(-3deg);
}

.bubble-said {
  position: absolute;
  top: 40px;
  left: 36px;
  max-width: 230px;
  padding: 10px 14px;
  border-radius: 20px;
  background: var(--coral);
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  box-shadow: var(--shadow-soft);
}

.logged {
  position: absolute;
  right: 32px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 250px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  font-size: 14px;
  color: var(--ink-2);
}

.logged-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  white-space: nowrap;
}

/* Chat row: the app's bubbles, coral for you, grey for YumLog. */
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 400px;
  padding: 22px 18px;
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow-lift);
  font-size: 15.5px;
  line-height: 1.4;
}

.chat p {
  margin: 0;
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: inherit;
  line-height: inherit;
}

.chat .q {
  align-self: flex-end;
  background: var(--coral);
  color: #fff;
}

.chat .a {
  align-self: flex-start;
  background: var(--app-ground);
  color: var(--ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #ffeae5;
  color: var(--coral-deep);
  font-size: 12.5px;
  font-weight: 600;
}

.chips span::before {
  content: "+ ";
}

/* Usuals row */
.list {
  width: 100%;
  max-width: 400px;
  padding: 10px 20px 6px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow-lift);
}

.list-title {
  padding: 12px 0 6px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.row span {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: var(--ink-3);
}

.row b {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}

.row em {
  font-style: normal;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.row.hit {
  background: linear-gradient(90deg, rgb(242 83 58 / 0.08), transparent 80%);
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}

.said-static {
  top: 36px;
  right: 30px;
  rotate: 3deg;
  animation: none;
}

/* Plate row: the Today screen's own ground, so the crop sits flush. The app's #f2f2f7
   comes out of ring.webp's lossy encoding as #f2f1f6, so the panel matches that. */
.panel-plate {
  background: #f2f1f6;
  padding: 32px;
}

.plate-shot {
  width: 100%;
  max-width: 440px;
}

/* Health row */
.sync {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 480px;
}

.sync-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.sync-end img,
.health-tile {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.health-tile {
  display: grid;
  place-items: center;
  background: var(--card);
}

.health-tile svg {
  width: 48px;
  height: 48px;
  fill: #ff3b5c;
}

.sync-flows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.flow i {
  font-style: normal;
  color: var(--coral);
  font-size: 18px;
}

.flow.from {
  justify-content: flex-start;
}

/* Everywhere row: a watch face with YumLog's complications. */
.face {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 260px;
  padding: 22px 20px 24px;
  border-radius: 56px;
  background: #000;
  color: #fff;
  box-shadow:
    0 0 0 10px #0b0b0e,
    0 0 0 12px #b9bacb,
    var(--shadow-lift);
}

.face-time {
  font-family: var(--display);
  font-size: 58px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  letter-spacing: -0.02em;
}

.comp-row {
  display: flex;
  gap: 12px;
}

.gauge {
  --p: 0;
  display: grid;
  place-items: center;
  align-content: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #1c1c22 80%, transparent 81% 100%),
    conic-gradient(var(--coral) calc(var(--p) * 1turn), #3a3a44 0);
  font-family: var(--display);
  line-height: 1;
}

.gauge b {
  font-size: 18px;
}

.gauge small {
  font-size: 10px;
  color: #b8b8c6;
}

.gauge.mic {
  background: #1c1c22;
}

.gauge.mic svg {
  width: 26px;
  height: 26px;
  color: var(--coral);
}

.comp-rect {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #1c1c22;
}

.comp-rect span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--coral-light);
}

.comp-rect b {
  font-family: var(--display);
  font-size: 19px;
}

.comp-rect i {
  --p: 0;
  height: 6px;
  margin-top: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--coral-light), var(--coral-deep)) 0 0 / calc(var(--p) * 100%) 100% no-repeat, #3a3a44;
}

.siri {
  position: absolute;
  left: 32px;
  bottom: 36px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  font-size: 15px;
  font-weight: 600;
  rotate: -2deg;
}

/* ── Steps ───────────────────────────────────────────── */

.steps {
  margin-top: 96px;
  padding: 112px 0 120px;
  background: var(--panel);
}

.steps ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
}

.num {
  display: block;
  font-family: var(--display);
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  color: var(--coral);
}

.steps h4 {
  margin-top: 18px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.steps li p {
  margin-top: 10px;
  font-size: 17px;
  color: var(--ink-2);
}

/* ── Questions ───────────────────────────────────────── */

.faq {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  padding-top: 128px;
  padding-bottom: 64px;
}

.faq-head {
  position: sticky;
  top: 112px;
  align-self: start;
}

.faq-list {
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  flex: none;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--coral);
  transition: rotate 0.2s ease;
}

details[open] summary::after {
  rotate: 45deg;
}

details p {
  padding: 0 40px 24px 0;
  font-size: 17px;
  color: var(--ink-2);
}

/* ── Closing ─────────────────────────────────────────── */

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 96px;
  padding-bottom: 128px;
  text-align: center;
}

.closing-plate {
  width: 260px;
  border-radius: 60px;
  box-shadow: var(--shadow-lift);
  margin-bottom: 48px;
}

.closing p {
  margin: 20px 0 32px;
  font-size: 20px;
  color: var(--ink-2);
}

/* ── Footer ──────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line);
}

.foot-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 40px;
  font-size: 14px;
  color: var(--ink-3);
}

.foot .logotype {
  width: 44px;
  color: var(--coral);
}

.foot .legal {
  margin-left: auto;
}

/* ── Coming up on scroll (only with JS, so nothing hides without it) ── */

.js [data-reveal] {
  opacity: 0;
  translate: 0 24px;
  transition:
    opacity 0.7s ease,
    translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js [data-reveal].in {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .said {
    animation: none;
  }
  .js [data-reveal] {
    opacity: 1;
    translate: none;
    transition: none;
  }
}

/* ── Narrower screens ────────────────────────────────── */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 40px;
    gap: 24px;
  }

  .hero-copy {
    text-align: center;
  }

  .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .cta {
    justify-content: center;
  }

  .stage {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  .hero-phone {
    right: 50%;
    translate: 60% 0;
  }

  .feature {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .feature.flip {
    grid-template-columns: 1fr;
  }

  .feature.flip .panel {
    order: 0;
  }

  .faq-head {
    position: static;
  }

  .facts {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 24px;
  }

  .facts > div:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .faq {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .steps ol {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
  }

  body {
    font-size: 16px;
  }

  .links {
    display: none;
  }

  .pill {
    margin-left: auto;
  }

  .logotype {
    width: 48px;
  }

  .lede {
    font-size: 18px;
  }

  .stage {
    height: 500px;
  }

  .phone {
    width: 228px;
    padding: 7px;
    border-radius: 42px;
  }

  .phone .screen {
    border-radius: 35px;
  }

  .hero-watch {
    width: 128px;
    left: 0;
    bottom: 60px;
  }

  .hero-watch .case {
    padding: 8px;
    border-radius: 36px;
  }

  .hero-watch .case img {
    border-radius: 29px;
  }

  .hero-watch::before {
    top: -44px;
    bottom: -44px;
  }

  .said {
    font-size: 13px;
    padding: 8px 12px 8px 10px;
  }

  .said svg {
    width: 15px;
    height: 15px;
  }

  .s2 {
    right: 0;
  }

  .s4 {
    display: none;
  }

  .intro {
    padding-top: 88px;
    padding-bottom: 32px;
  }

  .intro p,
  .feature p {
    font-size: 17px;
  }

  .feature {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .panel {
    min-height: 0;
    padding: 72px 16px;
    border-radius: 28px;
  }

  .panel-watch {
    min-height: 460px;
  }

  .panel-watch .watch {
    width: 150px;
  }

  .bubble-said {
    top: 22px;
    left: 18px;
    font-size: 14px;
  }

  .logged {
    right: 14px;
    bottom: 20px;
    width: 250px;
    font-size: 13px;
  }

  .panel-plate {
    padding: 20px;
  }

  .said-static {
    top: 20px;
    right: 16px;
  }

  .sync {
    gap: 10px;
  }

  .sync-end img,
  .health-tile {
    width: 60px;
    height: 60px;
    border-radius: 15px;
  }

  .health-tile svg {
    width: 32px;
    height: 32px;
  }

  .flow {
    font-size: 12.5px;
    padding: 8px 10px;
  }

  .siri {
    left: 16px;
    bottom: 20px;
    font-size: 13.5px;
  }

  .face {
    width: 230px;
  }

  .facts strong {
    font-size: 24px;
  }

  .steps {
    margin-top: 48px;
    padding: 80px 0;
  }

  .faq {
    padding-top: 88px;
  }

  summary {
    font-size: 17px;
  }

  .closing-plate {
    width: 200px;
    border-radius: 46px;
  }

  .foot-inner {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .foot .legal {
    margin-left: 0;
    width: 100%;
  }
}
