/* =============================================================================
   Olly — landing page
   Mobile-first. Breakpoints (min-width, em so they respect the user's font size):
     30em /  480px  large phones
     40em /  640px  small tablets
     48em /  768px  tablets
     64em / 1024px  laptops
     80em / 1280px  desktops
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. Fonts — self-hosted variable WOFF2 (no third-party requests)
   Newsreader & DM Sans, SIL Open Font License 1.1 — see fonts/LICENCE.txt
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dm-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* -----------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand */
  --c-bg: #f7f4ef;
  --c-bg-warm: #eae6e1;   /* light warm grey — the closing CTA band */
  --c-surface: #fff;
  --c-surface-sand: #efe9e0;
  --c-accent: #e2673b;
  --c-accent-strong: #c9552b;
  --c-accent-stronger: #a8431f;
  --c-accent-tint: rgb(226 103 59 / 0.08);

  /* iCloud sync panel. A muted duck-egg rather than a clean sky blue:
     saturation is halved against the accent's so it only just reads as blue
     and sits quietly beside the warm cream and the terracotta. */
  --c-surface-sky: #eaf2f5;
  --c-line-sky: rgb(64 92 102 / 0.16);
  --c-accent-mark: rgb(226 103 59 / 0.16);

  /* Text */
  --c-ink: #231f1b;
  --c-ink-2: #3a342e;
  --c-ink-3: #463f38;
  --c-ink-4: #4a423b;
  --c-muted: #5a524a;
  --c-muted-2: #6b625a;
  --c-muted-3: #8a8078;

  /* Lines & shadows */
  --c-line: rgb(35 31 27 / 0.09);
  --shadow-card: 0 18px 44px -30px rgb(35 31 27 / 0.4);
  --shadow-phone: 0 22px 50px -30px rgb(35 31 27 / 0.45);

  /* Device mock */
  --c-device: #2e2a26;
  --c-device-face: #fbf9f6;

  /* Footer */
  --c-footer-bg: #6b6058;

  /* Type */
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;

  --step-h1: clamp(2.75rem, 2.1rem + 2.8vw, 4rem);
  --step-h2: clamp(2rem, 1.7rem + 1.5vw, 2.75rem);
  --step-h3: clamp(1.6875rem, 1.5rem + 0.9vw, 2.125rem);
  --step-lede: clamp(1.09375rem, 1.06rem + 0.2vw, 1.1875rem);
  --step-body: clamp(1.03125rem, 1.01rem + 0.14vw, 1.0625rem);

  /* One leading for every run of body copy. Headings, labels and the device
     mock set their own; nothing else should. */
  --leading-body: 1.6;

  /* Layout */
  --gutter: 1.5rem;
  --wrap: 35rem;          /* 560px — the reading column */
  --wrap-narrow: 32.5rem; /* 520px */
  --wrap-wide: 35rem;     /* widens from 48em up */
  --header-h: 3.5rem;

  /* Device mock scale — one knob drives the whole "how it works" stage */
  --phone-scale: 0.8;

  /* "How it works" loop. Scene lengths are thought 2s / tap 2s / speak 3s /
     done 4s = 11s, putting the boundaries at 18.18% / 36.36% / 63.64%.
     The scenes are unequal, so this is NOT a single knob: @keyframes offsets
     cannot read custom properties, so changing any scene length means
     regenerating every percentage in section 16 to match. Editing --loop alone
     just rescales all four scenes proportionally. */
  --loop: 11s;

  /* Feature screenshot frame */
  --shot-w: 236px;
}

/* -----------------------------------------------------------------------------
   3. Reset & base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  /* clip, not hidden: keeps position:sticky working on the header */
  overflow-x: clip;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

a {
  color: var(--c-accent-strong);
  text-decoration: none;
}
a:hover { color: var(--c-accent-stronger); }

mark {
  background: var(--c-accent-mark);
  box-shadow: 0 0 0 3px var(--c-accent-mark);
  border-radius: 2px;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--c-accent-strong);
  outline-offset: 3px;
  border-radius: 3px;
}

[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* -----------------------------------------------------------------------------
   4. Utilities
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -150%);
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 0.75rem 0.75rem;
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translate(-50%, 0);
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow); }
.wrap--wide { max-width: var(--wrap-wide); }

/* -----------------------------------------------------------------------------
   5. Header & nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(247 244 239 / 0.82);
  border-bottom: 1px solid rgb(35 31 27 / 0.08);
  transition: transform 0.3s ease;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}

.site-header.is-hidden { transform: translateY(-110%); }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 67.5rem;
  margin-inline: auto;
  padding: 0.625rem var(--gutter);
}

.site-nav__home { flex: none; display: flex; }
.site-nav__logo { width: auto; height: 1.375rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.375rem 0.875rem;
  background: var(--c-accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}
.btn:hover { background: var(--c-accent-strong); color: #fff; }

.store-badge {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.2s ease;
}
.store-badge:hover { opacity: 0.85; }
.store-badge img { width: 12.25rem; }

/* -----------------------------------------------------------------------------
   6. Section furniture
   -------------------------------------------------------------------------- */

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-h2);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-lede {
  max-width: 26.25rem;
  margin-top: 0.875rem;
  color: var(--c-muted);
  font-size: var(--step-lede);
  line-height: var(--leading-body);
  text-wrap: pretty;
}

.how,
.review { text-align: center; }

.how .section-lede,
.review .section-lede { margin-inline: auto; }

.section-title--start,
.section-lede--start { margin-inline: 0; text-align: left; }

/* -----------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: 3.5rem 0.5rem;
  text-align: center;
}

.rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5625rem;
  margin-bottom: 1.125rem;
}

.rating__stars {
  display: flex;
  gap: 2px;
  color: var(--c-accent);
  font-size: 1rem;
  line-height: 1;
}
.rating__half { position: relative; display: inline-block; color: rgb(226 103 59 / 0.26); }
.rating__half-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 80%;
  overflow: hidden;
  color: var(--c-accent);
}

.rating__label {
  color: var(--c-muted-2);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-h1);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero__lede {
  max-width: 25rem;
  margin: 1rem auto 1.625rem;
  color: var(--c-muted);
  font-size: clamp(1.125rem, 1.09rem + 0.2vw, 1.25rem);
  line-height: var(--leading-body);
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}

.trust {
  display: flex;
  align-items: center;
  justify-content: center;
  /* row gap then column gap: a single value would put the 22px meant for the
     space between items between the wrapped lines too. */
  gap: 0.5rem 1.375rem;
  flex-wrap: wrap;
}
.trust li {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  color: var(--c-ink-4);
  font-size: 0.96875rem;
  font-weight: 500;
}

.tick {
  width: 0.9375rem;
  height: 0.9375rem;
  flex: none;
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* -----------------------------------------------------------------------------
   8. How it works
   -------------------------------------------------------------------------- */

.how {
  padding-block: 4rem 0.625rem;
  /* The tapping hand deliberately overflows the stage by ~115px. Clip it on
     this section rather than relying on body -> viewport overflow propagation:
     Chrome propagates `clip`, iOS Safari does not, which left the document
     wider than the viewport and a white gutter down the right edge.
     overflow-y stays visible so the hand can still hang below the phone. */
  overflow-x: clip;
}

.how__outro {
  position: relative;
  z-index: 0;
  max-width: 26.25rem;
  margin: 2.375rem auto 0;
  color: var(--c-ink-2);
  font-size: var(--step-lede);
  line-height: var(--leading-body);
  text-wrap: pretty;
}

/* --- stage ---------------------------------------------------------------- */

.stage {
  position: relative;
  /* The hand hangs ~200px below the phone and paints over everything beneath
     it in this section: caption row (0) < closing line (0) < stage (1). */
  z-index: 1;
  width: 100%;
  height: calc(520px * var(--phone-scale) + 4px);
  margin-top: 2.125rem;
}

.stage__thought {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scene-thought var(--loop) ease-in-out infinite;
}
.stage__thought img {
  width: auto;
  max-width: 82%;
  max-height: 100%;
}

.stage__phone {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  animation: phone-show var(--loop) ease-in-out infinite;
}

/* --- device mock ---------------------------------------------------------- */

.phone {
  position: relative;
  flex: none;
  width: 252px;
  height: 520px;
  padding: 9px;
  background: var(--c-device-face);
  border: 2.5px solid var(--c-device);
  border-radius: 42px;
  box-shadow: var(--shadow-phone);
  transform: scale(var(--phone-scale));
  transform-origin: top center;
  /* pull the scaled-down height back out of the layout */
  margin-bottom: calc(520px * (var(--phone-scale) - 1));
}

.phone__btn {
  position: absolute;
  width: 3px;
  background: var(--c-device);
  border-radius: 2px;
}
.phone__btn--vol-up   { left: -3px; top: 112px; height: 56px; }
.phone__btn--vol-down { left: -3px; top: 186px; height: 56px; }
.phone__btn--power    { right: -3px; top: 150px; height: 82px; }

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
}

.phone__hand {
  position: absolute;
  left: 140px;
  top: 396px;
  z-index: 6;
  width: 304px;
  height: 316px;
  animation: tap-finger var(--loop) cubic-bezier(0.3, 0.7, 0.2, 1) infinite;
}
.phone__hand img {
  width: 100%;
  rotate: 135deg;
  filter: drop-shadow(0 6px 10px rgb(23 21 15 / 0.3));
}

.screen { position: absolute; inset: 0; }

.notch {
  position: absolute;
  left: 50%;
  top: 9px;
  z-index: 3;
  width: 74px;
  height: 22px;
  background: #17150f;
  border-radius: 999px;
  transform: translateX(-50%);
}

.home-indicator {
  position: absolute;
  left: 50%;
  bottom: 9px;
  width: 96px;
  height: 4px;
  background: rgb(42 37 31 / 0.3);
  border-radius: 999px;
  transform: translateX(-50%);
}

/* --- screen 1: lock screen ------------------------------------------------ */

.screen--lock {
  background: #e9e4da;
  animation: screen-1 var(--loop) linear infinite;
}
.screen__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 8%, #f6f1e7 0%, #ebe4d8 45%, #ded4c4 100%);
}
.screen__blob { position: absolute; border-radius: 999px; }
.screen__blob--a {
  left: -30px;
  bottom: -60px;
  width: 200px;
  height: 200px;
  background: rgb(226 103 59 / 0.07);
}
.screen__blob--b {
  right: -50px;
  top: 180px;
  width: 170px;
  height: 170px;
  background: rgb(46 42 38 / 0.05);
}

.lock__clock {
  position: relative;
  padding: 60px 18px 0;
  color: #2a251f;
}
.lock__date {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.75;
}
.lock__time {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 62px;
  font-weight: 400;
  line-height: 1;
}
.lock__widgets {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}
.lock__widget {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid rgb(42 37 31 / 0.25);
  border-radius: 999px;
  font-size: 12px;
  color: rgb(42 37 31 / 0.6);
}
.lock__widget-dot {
  width: 11px;
  height: 11px;
  background: rgb(42 37 31 / 0.55);
  border-radius: 999px;
}

.lock__shortcut {
  position: absolute;
  bottom: 34px;
  width: 44px;
  height: 44px;
}
.lock__shortcut--left {
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgb(42 37 31 / 0.25);
  border-radius: 999px;
  font-size: 13px;
  color: rgb(42 37 31 / 0.55);
}
.lock__shortcut--right { right: 20px; }

.lock__ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--c-accent);
  border-radius: 999px;
  animation: tap-ring var(--loop) ease-out infinite;
}
.lock__button {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 0.75);
  border: 2.5px solid var(--c-accent);
  border-radius: 999px;
}
.lock__button-dot {
  width: 14px;
  height: 14px;
  background: var(--c-accent);
  border-radius: 999px;
}

/* --- screen 2: recording -------------------------------------------------- */

.screen--record {
  /* The timer / bin / pulse / stop group is laid out from the original design's
     top offsets. --rec-lift raises the whole group as one so it sits centred
     between the notch and the home indicator instead of low on the screen. */
  --rec-lift: 30px;
  background: #e9e4da;
  animation: screen-2 var(--loop) linear infinite;
}

.rec__timer {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(126px - var(--rec-lift));
  height: 24px;
  color: var(--c-muted-2);
  font-size: 19px;
  font-weight: 500;
}
.rec__tick { position: absolute; left: 0; right: 0; }
.rec__tick--1 { animation: tick-1 var(--loop) steps(1, end) infinite; }
.rec__tick--2 { animation: tick-2 var(--loop) steps(1, end) infinite; }
.rec__tick--3 { animation: tick-3 var(--loop) steps(1, end) infinite; }

.rec__chip {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #fff;
  border-radius: 999px;
  transform: translateX(-50%);
}
.rec__chip--bin { top: calc(176px - var(--rec-lift)); }
.rec__chip--bin svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--c-device);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.rec__chip--stop { top: calc(412px - var(--rec-lift)); }
.rec__stop {
  width: 11px;
  height: 11px;
  background: var(--c-device);
  border-radius: 2px;
}

.rec__pulse {
  position: absolute;
  left: 50%;
  top: calc(238px - var(--rec-lift));
  width: 150px;
  height: 150px;
  transform: translateX(-50%);
}
.rec__wave { position: absolute; border-radius: 999px; }
.rec__wave--outer {
  inset: 0;
  background: rgb(226 103 59 / 0.22);
  animation: ring-2 2.4s ease-in-out infinite;
}
.rec__wave--inner {
  inset: 14px;
  background: rgb(226 103 59 / 0.34);
  animation: ring-1 2.4s ease-in-out infinite;
}
.rec__core {
  position: absolute;
  inset: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fff;
  border: 7px solid var(--c-accent);
  border-radius: 999px;
  animation: breathe 2.4s ease-in-out infinite;
}
.rec__core i {
  width: 6px;
  height: 22px;
  background: var(--c-accent);
  border-radius: 2px;
}

.screen--record .home-indicator { background: rgb(46 42 38 / 0.35); }

/* --- screen 3: saved note ------------------------------------------------- */

.screen--note {
  background: #dad6d0;
  animation: screen-3 var(--loop) linear infinite;
}

.note { padding: 48px 20px 0; text-align: left; }
.note__back {
  width: 9px;
  height: 16px;
  fill: none;
  stroke: var(--c-ink-4);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.note__title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-ink);
}
.note__meta {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--c-muted-2);
}
.note__folder {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--c-muted-2);
}
.note__folder svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--c-muted-2);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.note__body {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--c-ink-2);
}
.note__line {
  display: block;
  height: 7px;
  margin-top: 7px;
  background: rgb(35 31 27 / 0.14);
  border-radius: 4px;
}
.note__line:first-of-type { margin-top: 14px; }
.note__line--short { width: 82%; }

.saved {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 250px;
  background: #fff;
  border-radius: 26px 26px 34px 34px;
  animation: card-up var(--loop) cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
.saved__check {
  width: 56px;
  height: 53px;
  fill: #e66233;
  transform-origin: 50% 55%;
  animation: check-pop var(--loop) ease-out infinite;
}
.saved__title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-ink);
}
.saved__label {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--c-muted);
}
.saved__folder {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-ink);
}
.saved__action {
  margin-top: 12px;
  padding: 7px 16px;
  background: #eae7e2;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--c-muted);
}


/* --- hand-lettered scene labels ------------------------------------------- */

.label {
  position: absolute;
  z-index: 8;
  height: auto;
  pointer-events: none;
}

/* Tap — above the fingertip as it presses the Lock Screen button. Lives in
   .phone rather than .phone__screen so the screen's overflow cannot clip it. */
.label--tap {
  right: 30px;
  bottom: 104px;
  width: 62px;
  animation: label-tap var(--loop) ease-out infinite;
}

/* Speak — tucked against the top-right of the record button, close enough
   that the radiating rings sweep behind it. Tilted so the S sits higher
   than the k. z-index on .label keeps it above the rings. */
.label--speak {
  right: 18px;
  top: 198px;
  width: 86px;
  animation: label-speak var(--loop) ease-out infinite;
}

/* Done — beside the tick, easing in as the tick reaches full size. */
.label--done {
  left: 153px;
  top: 34px;
  width: 70px;
  animation: label-done var(--loop) ease-out infinite;
}

/* --- play only once the section is on screen ------------------------------ */

.js .scene:not(.is-playing),
.js .scene:not(.is-playing) * { animation-play-state: paused; }

/* -----------------------------------------------------------------------------
   9. Featured review card
   -------------------------------------------------------------------------- */

.review { padding-block: 3.5rem 0; }

.card {
  padding: 1.875rem 1.625rem 1.625rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-card);
  text-align: left;
}
.card__stars {
  color: var(--c-accent);
  font-size: 1.0625rem;
  letter-spacing: 3px;
  line-height: 1;
}
.card__title {
  margin: 1rem 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.4rem + 0.45vw, 1.75rem);
  line-height: 1.2;
}
.card__quote p {
  color: var(--c-ink-3);
  font-size: clamp(1.0625rem, 1.03rem + 0.14vw, 1.125rem);
  line-height: var(--leading-body);
  text-wrap: pretty;
}
.card__author {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1.375rem;
  padding-top: 1.125rem;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted-2);
  font-size: 0.96875rem;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.875rem;
  height: 1.875rem;
  background: #f0e7e1;
  border-radius: 999px;
  color: var(--c-accent-strong);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* -----------------------------------------------------------------------------
   10. Feature stories
   -------------------------------------------------------------------------- */

.features { padding-block: 4.75rem 0.5rem; }

.feature {
  display: flex;
  flex-direction: column;
  margin-bottom: 4.125rem;
}
.feature:last-child { margin-bottom: 0; }

.feature__media {
  order: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 1.5rem;
  padding: 2.125rem 1.625rem 0;
  border-radius: 1.75rem;
  overflow: hidden;
}
.feature__media--warm { background: var(--c-surface-sand); }
.feature__media--accent { background: var(--c-accent-tint); }

.shot {
  width: var(--shot-w);
  max-width: 100%;
  aspect-ratio: 236 / 284;
  overflow: hidden;
}
.shot img { width: 100%; }

.feature__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-h3);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.feature__body {
  margin-top: 0.625rem;
  color: var(--c-muted);
  font-size: var(--step-lede);
  line-height: var(--leading-body);
  text-wrap: pretty;
}

/* -----------------------------------------------------------------------------
   11. "And so much more"
   -------------------------------------------------------------------------- */

.more { padding-block: 4.75rem 2.75rem; }

.more__list {
  display: grid;
  gap: 1.625rem;
  margin-top: 2.375rem;
}

.perk { display: flex; gap: 0.875rem; }
.perk__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.375rem;
  height: 2.375rem;
  background: rgb(226 103 59 / 0.1);
  border-radius: 0.6875rem;
}
.perk__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.perk__icon svg .fill { fill: var(--c-accent); stroke: none; }

.perk__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4375rem;
  color: var(--c-ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}
.perk__text p {
  margin-top: 0.3125rem;
  color: var(--c-muted);
  font-size: 1rem;
  line-height: var(--leading-body);
  text-wrap: pretty;
}

.pro {
  padding: 3px 6px;
  background: var(--c-accent);
  border-radius: 5px;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* --- iCloud sync card ----------------------------------------------------- */

.sync {
  margin-top: 2.5rem;
  padding: 1.375rem;
  background: var(--c-surface-sky);
  border: 1px solid var(--c-line-sky);
  border-radius: 1.5rem;
  overflow: hidden;
}
/* Always a plain stack: copy above, artwork below. Never overlaid, so the
   text can't run over the image at any width. */
.sync__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sync__art { width: 100%; }
.sync__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  line-height: 1.15;
  color: var(--c-ink);
}
.sync__copy p {
  margin-top: 0.5rem;
  color: var(--c-muted);
  font-size: clamp(1.03125rem, 1rem + 0.2vw, 1.125rem);
  line-height: var(--leading-body);
  text-wrap: pretty;
}

/* -----------------------------------------------------------------------------
   12. Praise
   -------------------------------------------------------------------------- */

.praise { padding-block: 1.25rem 6rem; }

.quotes {
  display: grid;
  gap: 2.75rem;
  margin-top: 1.875rem;
}

.quote {
  display: grid;
  grid-template-columns: 4px 1fr;
  gap: 1.125rem;
  height: 100%;
}
.quote::before {
  content: "";
  background: var(--c-accent);
  border-radius: 2px;
}
.quote__title {
  color: var(--c-ink);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
}
.quote__body {
  margin-top: 0.625rem;
  color: var(--c-ink-3);
  font-size: var(--step-lede);
  line-height: var(--leading-body);
  text-wrap: pretty;
}
.quote__author {
  margin-top: 0.625rem;
  color: var(--c-accent-strong);
  font-size: 1rem;
}

/* -----------------------------------------------------------------------------
   13. Closing call to action
   -------------------------------------------------------------------------- */

.cta {
  background: var(--c-bg-warm);
  padding-block: 4rem 0;
  text-align: center;
}
.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 1.9rem + 1.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
/* Same component as the hero's trust row; only the spacing differs. */
.cta__trust { margin-top: 1.125rem; margin-bottom: 1.5rem; }

.cta__art {
  width: 100%;
  max-width: 14.375rem;
  margin: 1.625rem auto -2px;
}

/* -----------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--c-footer-bg);
  padding-block: 4rem 3.5rem;
  text-align: center;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.site-footer__logo {
  width: auto;
  height: 2.75rem;
  filter: brightness(0) invert(1);
}
.site-footer__copy {
  color: rgb(255 255 255 / 0.86);
  font-size: 1rem;
}
.site-footer__link {
  color: rgb(255 255 255 / 0.7);
  font-size: 1rem;
}
.site-footer__link:hover { color: #fff; }

/* =============================================================================
   15. Breakpoints
   ========================================================================== */

/* --- 480px — large phones -------------------------------------------------- */
@media (min-width: 30em) {
  :root {
    --gutter: 2rem;
    --shot-w: 260px;
  }
  .hero { padding-block: 4.5rem 0.5rem; }
}

/* --- 640px — small tablets ------------------------------------------------- */
@media (min-width: 40em) {
  :root {
    --wrap: 38rem;
    --wrap-narrow: 35rem;
    --wrap-wide: 42rem;
    --phone-scale: 0.9;
  }
  .more__list { grid-template-columns: repeat(2, 1fr); column-gap: 2.25rem; }
  .sync { padding: 1.75rem; }
}

/* --- 768px — tablets ------------------------------------------------------- */
@media (min-width: 48em) {
  :root {
    --gutter: 2.5rem;
    --wrap: 40rem;
    --wrap-narrow: 38rem;
    --wrap-wide: 56rem;
    --header-h: 4rem;
    --phone-scale: 1;
    --shot-w: 280px;
  }

  .site-nav { padding-block: 0.875rem; }
  .site-nav__logo { height: 1.625rem; }
  .btn { min-height: 2.5rem; padding-inline: 1.125rem; font-size: 1rem; }

  .hero { padding-block: 5.5rem 1rem; }
  .how { padding-block: 5.5rem 1rem; }
  .review { padding-block: 4.5rem 0; }
  .features { padding-block: 6rem 1rem; }
  .more { padding-block: 6rem 3.5rem; }
  .praise { padding-block: 2rem 7rem; }

  .card { padding: 2.5rem 2.25rem 2rem; }

  /* feature stories become alternating two-column rows */
  .feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
    margin-bottom: 5.5rem;
  }
  .feature__media { order: 0; margin-top: 0; }
  .feature:nth-child(even) .feature__media { order: 1; }
  .feature__text { align-self: center; }

  .quotes { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }

  /* closing CTA sits beside the artwork */
  .cta { padding-block: 5rem 0; text-align: left; }
  /* auto/auto + justify-content keeps the pair together in the middle; a 1fr
     column would stretch and push copy and artwork to opposite edges. */
  .cta__inner {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: end;
    gap: 2.5rem;
  }
  .cta__copy { align-self: center; max-width: 21rem; padding-bottom: 3.5rem; }
  /* the closing CTA is left-aligned from here up, so the row follows */
  .cta__trust { justify-content: flex-start; }
  .cta__art { margin: 0; max-width: 15rem; }

  /* footer becomes a single row */
  .site-footer { padding-block: 3.5rem; }
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
  }
  .site-footer__logo { height: 2.25rem; }
}

/* --- 1024px — laptops ------------------------------------------------------ */
@media (min-width: 64em) {
  :root {
    --gutter: 3rem;
    --wrap: 44rem;
    --wrap-narrow: 42rem;
    --wrap-wide: 68rem;
    --phone-scale: 1.1;
    --shot-w: 320px;
  }

  .hero { padding-block: 6.5rem 1.5rem; }
  .how { padding-block: 6.5rem 1.5rem; }
  .features { padding-block: 7rem 1.5rem; }
  .more { padding-block: 7rem 4rem; }
  .praise { padding-block: 3rem 8rem; }

  .hero__lede { max-width: 32rem; }
  .section-lede { max-width: 32rem; }
  .how__outro { max-width: 32rem; }

  .feature { gap: 4.5rem; margin-bottom: 6.5rem; }
  .feature__media { padding: 3rem 2.5rem 0; }

  .more__list { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .sync { margin-top: 3.5rem; padding: 2.25rem; }

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

  .cta { padding-block: 6rem 0; }
  .cta__inner { gap: 3.5rem; }
  /* wide enough for the trust row to sit on one line, as it does in the hero */
  .cta__copy { max-width: 28.5rem; }
  .cta__art { max-width: 18rem; }
}

/* --- 1280px — desktops ----------------------------------------------------- */
@media (min-width: 80em) {
  :root {
    --wrap: 46rem;
    --wrap-narrow: 44rem;
    --wrap-wide: 72rem;
  }
  .feature { gap: 6rem; }
}

/* =============================================================================
   16. Animations
   ========================================================================== */

/* Scene boundaries: 0% thought, 18.18% tap, 36.36% speak, 63.64% done
   (2s / 2s / 3s / 4s of an 11s loop). Every crossfade STARTS on its boundary
   (2.73% = 0.3s); 1.36% = the 0.15s caption fade. Screens reset between 2.9%
   and 3%, where phone-show holds the whole device at zero opacity. */

@keyframes scene-thought {
  0% { opacity: 0; transform: scale(0.94) }
  2.73%, 18.18% { opacity: 1; transform: scale(1) }
  20.91%, 100% { opacity: 0; transform: scale(0.94) }
}
@keyframes phone-show {
  0% { opacity: 1 }
  2.73%, 18.18% { opacity: 0 }
  20.91%, 100% { opacity: 1 }
}

@keyframes screen-1 { 0%, 2.9% { opacity: 0 } 3%, 36.36% { opacity: 1 } 39.09%, 100% { opacity: 0 } }
@keyframes screen-2 { 0%, 36.36% { opacity: 0 } 39.09%, 63.64% { opacity: 1 } 66.36%, 100% { opacity: 0 } }
@keyframes screen-3 { 0%, 2.9% { opacity: 1 } 3%, 63.64% { opacity: 0 } 66.36%, 100% { opacity: 1 } }

/* Tap scene (2s): hand reaches in, presses at 25%, withdraws. */
@keyframes tap-finger {
  0%, 18.18% { transform: translate(96px, 104px); opacity: 0 }
  20% { opacity: 1 }
  25%, 28.64% { transform: translate(0, 0) }
  32.73% { transform: translate(96px, 104px); opacity: 1 }
  35%, 100% { opacity: 0 }
}
@keyframes tap-ring {
  0%, 25% { transform: scale(0.7); opacity: 0 }
  27.09% { transform: scale(1); opacity: 0.9 }
  30.45% { transform: scale(1.9); opacity: 0 }
  100% { opacity: 0 }
}

@keyframes ring-1 { 0%, 100% { transform: scale(0.88) } 50% { transform: scale(1.1) } }
@keyframes ring-2 { 0%, 100% { transform: scale(0.9) } 50% { transform: scale(1.12) } }
@keyframes breathe { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.06) } }

/* Speak scene (3s): one timer reading per second. */
@keyframes tick-1 { 0%, 45.44% { opacity: 1 } 45.45%, 100% { opacity: 0 } }
@keyframes tick-2 { 0%, 45.44% { opacity: 0 } 45.45%, 54.54% { opacity: 1 } 54.55%, 100% { opacity: 0 } }
@keyframes tick-3 { 0%, 54.54% { opacity: 0 } 54.55%, 63.64% { opacity: 1 } 63.65%, 100% { opacity: 0 } }

/* Done scene (4s): card slides up, tick pops, then it holds for ~2.1s. */
@keyframes card-up { 0%, 66.36% { transform: translateY(105%) } 71.36%, 100% { transform: translateY(0) } }
@keyframes check-pop {
  0%, 72.27% { transform: scale(0.4); opacity: 0 }
  73.64% { opacity: 1 }
  75.91% { transform: scale(1.12); animation-timing-function: ease-out }
  78.18%, 100% { transform: scale(1); opacity: 1 }
}


/* Scene labels. Each pops in on its own beat and clears before the scene ends;
   label-done rides out with the phone, so its seam jump is never visible. */
@keyframes label-tap {
  0%, 24.5% { opacity: 0; transform: translateY(8px) scale(0.85) }
  27% { opacity: 1; transform: translateY(0) scale(1.06) }
  29% { opacity: 1; transform: translateY(0) scale(1) }
  33.5% { opacity: 1; transform: translateY(0) scale(1) }
  35.5%, 100% { opacity: 0; transform: translateY(8px) scale(0.85) }
}
@keyframes label-speak {
  0%, 37.5% { opacity: 0; transform: translateY(10px) rotate(8deg) scale(0.88) }
  41% { opacity: 1; transform: translateY(0) rotate(8deg) scale(1) }
  60% { opacity: 1; transform: translateY(0) rotate(8deg) scale(1) }
  62.5%, 100% { opacity: 0; transform: translateY(10px) rotate(8deg) scale(0.88) }
}
@keyframes label-done {
  0%, 75.5% { opacity: 0; transform: translateX(-12px) scale(0.9) }
  79%, 100% { opacity: 1; transform: translateX(0) scale(1) }
}

/* The loop's 0% is the start of the crossfade into the thought scene, so begin
   playback one crossfade in — the sequence opens on Olly thinking rather than
   on the tail of "Thought Saved". Must stay after the rules above: each
   `animation` shorthand resets animation-delay to 0. */
.scene .stage,
.scene .stage * { animation-delay: -0.3s; }

/* =============================================================================
   17. Reduced motion — show a readable static end state instead
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .stage__thought,
  .phone__hand { display: none; }

  .screen--lock,
  .screen--record { opacity: 0; }
  .screen--note { opacity: 1; }
  .rec__tick--2,
  .rec__tick--3 { opacity: 0; }

  .saved { transform: none; }
  .saved__check { transform: none; opacity: 1; }

  /* The static frame is the saved note, so only that scene's label belongs. */
  .label--tap,
  .label--speak { display: none; }
  .label--done { opacity: 1; transform: none; }
}

/* =============================================================================
   18. Privacy / legal page — reuses the tokens, header and footer above.
   Self-contained, media queries included, so it can be lifted out wholesale.
   ========================================================================== */

.legal { padding-block: 3.5rem 5rem; }

.legal__head {
  padding-bottom: 2.5rem;
  /* full-width rule, but the text keeps a readable measure */
  border-bottom: 1px solid var(--c-line);
}
.legal__eyebrow,
.legal__title,
.legal__intro { max-width: 40rem; }

.legal__eyebrow {
  color: var(--c-accent-strong);
  font-size: 0.84375rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal__title {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 2rem + 2.4vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.legal__intro {
  margin-top: 1.25rem;
  color: var(--c-muted);
  font-size: clamp(1.125rem, 1.09rem + 0.2vw, 1.25rem);
  line-height: var(--leading-body);
  text-wrap: pretty;
}

.legal__layout {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

/* --- contents ------------------------------------------------------------- */

.legal__toc {
  padding: 1.5rem 1.5rem 1.625rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 1.25rem;
}
.legal__toc-title {
  color: var(--c-muted-2);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.legal__toc-list {
  counter-reset: toc;
  margin-top: 1rem;
  display: grid;
  gap: 0.625rem;
}
.legal__toc-list li { counter-increment: toc; }
.legal__toc-list a {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.25rem;
  color: var(--c-ink-3);
  font-size: 1rem;
  line-height: 1.45;
  text-wrap: pretty;
}
.legal__toc-list a::before {
  content: counter(toc) ".";
  color: var(--c-accent);
  font-variant-numeric: tabular-nums;
}
.legal__toc-list a:hover { color: var(--c-accent-strong); }

/* --- clauses -------------------------------------------------------------- */

.legal__content { max-width: 40rem; }

.clause + .clause { margin-top: 2.75rem; }

.clause__title {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.36rem + 0.6vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.clause__num {
  color: var(--c-accent);
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}

.clause__sub {
  margin-top: 1.5rem;
  color: var(--c-ink);
  font-size: 1rem;
  font-weight: 700;
}

.clause p {
  margin-top: 0.875rem;
  color: var(--c-ink-3);
  font-size: var(--step-lede);
  line-height: var(--leading-body);
  text-wrap: pretty;
}

.clause__list {
  display: grid;
  gap: 0.625rem;
  margin-top: 1rem;
}
.clause__list li {
  position: relative;
  padding-left: 1.375rem;
  color: var(--c-ink-3);
  font-size: var(--step-lede);
  line-height: var(--leading-body);
  text-wrap: pretty;
}
.clause__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 6px;
  height: 6px;
  background: var(--c-accent);
  border-radius: 999px;
}

.clause__emphasis {
  color: var(--c-ink);
  font-weight: 700;
}

.clause a,
.contact-card a {
  color: var(--c-accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
.clause a:hover,
.contact-card a:hover { color: var(--c-accent-stronger); }

/* --- closing contact card ------------------------------------------------- */

.contact-card {
  margin-top: 3.5rem;
  padding: 1.75rem 1.75rem 2rem;
  background: var(--c-accent-tint);
  border-radius: 1.5rem;
}
.contact-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
}
.contact-card p {
  margin-top: 0.75rem;
  color: var(--c-ink-3);
  font-size: var(--step-lede);
  line-height: var(--leading-body);
  text-wrap: pretty;
}

@media (min-width: 48em) {
  .legal { padding-block: 4.5rem 6rem; }
  .legal__head { padding-bottom: 3rem; }
  .legal__layout { margin-top: 3rem; gap: 3rem; }
  .clause + .clause { margin-top: 3.25rem; }
  .contact-card { padding: 2.25rem 2.25rem 2.5rem; }
}

@media (min-width: 64em) {
  .legal { padding-block: 5.5rem 7rem; }
  .legal__layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 4.5rem;
    align-items: start;
  }
  .legal__toc {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

/* =============================================================================
   19. 404
   ========================================================================== */

.notfound {
  padding-block: 4.5rem 5rem;
  text-align: center;
}
.notfound__title {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 1.9rem + 1.8vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.notfound__body {
  max-width: 26rem;
  margin: 1rem auto 0;
  color: var(--c-muted);
  font-size: var(--step-lede);
  line-height: var(--leading-body);
  text-wrap: pretty;
}
.notfound__actions { margin-top: 1.75rem; }
.notfound__art {
  width: 100%;
  max-width: 17rem;
  margin: 2.5rem auto 0;
}

@media (min-width: 48em) {
  .notfound { padding-block: 6rem 6.5rem; }
}
