/* Trazo: the App Store promo look. Paper ground, Newsreader serif,
   a real Trazo highlighter stroke under one word per section. Dark mode is a
   warm graphite ground. */
:root {
  color-scheme: light dark;
  --ground: url("images/paper.jpg");
  --mark-opacity: 1;
  --paper: #F6F1E8;
  --ink: #2B2B2B;
  --soft: #68625A;
  --rule: #DDD5C7;
  --link: #7B4A2A;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper) var(--ground) repeat;
  background-size: 640px;
  font: 400 18px/1.55 "Newsreader", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  padding: 0 16px;
  overflow-x: clip;
}
main, footer { max-width: 980px; margin: 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
footer a { text-decoration: none; }
footer a:hover, footer a:focus-visible { text-decoration: underline; }
h1, h2 { font-weight: 500; letter-spacing: -0.015em; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }

/* The highlighter stroke sits under the word, as in the promo images. */
.mark { position: relative; white-space: nowrap; z-index: 0; }
.mark::after {
  content: ""; opacity: var(--mark-opacity); position: absolute; z-index: -1;
  left: -3%; right: -4%; bottom: -0.02em; height: 0.36em;
  background: url("images/stroke-orange.png") center / 100% 100% no-repeat;
}
.mark-yellow::after { background-image: url("images/stroke-yellow.png"); }

/* The stroke draws in, left to right, like a highlighter: the hero's as the
   page opens, each heading's as it scrolls into view. Without scroll-driven
   animation, or with Reduce Motion, it simply shows. */
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: no-preference) {
  .hero .mark::after { animation: draw .7s .35s cubic-bezier(.3, .7, .2, 1) both; }
  @supports (animation-timeline: view()) {
    .feature .mark::after { animation: draw linear both; animation-timeline: view(); animation-range: entry 35% cover 40%; }
  }
}

.hero { text-align: center; padding: 56px 0 28px; display: grid; justify-items: center; gap: 12px; }
.icon { width: 88px; border-radius: 22.5%; box-shadow: 0 2px 4px rgba(60, 45, 30, .15), 0 10px 24px -10px rgba(60, 45, 30, .45); }
h1 { font-size: clamp(56px, 13vw, 104px); margin-top: 8px; }
.subtitle { font-size: clamp(26px, 5.6vw, 42px); line-height: 1.15; }
.lede { color: var(--soft); max-width: 34ch; font-size: 19px; text-wrap: balance; }

/* Top bar: the app, Support, and the App Store (a badge once the listing is live). */
.bar { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 22px; padding: 16px 0; font-size: 17px; }
.bar a { color: var(--ink); text-decoration: none; }
.bar a:hover, .bar a:focus-visible { text-decoration: underline; }
.bar .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; margin-right: auto; }
.bar .brand img { width: 32px; border-radius: 22.5%; }
/* Apple's official badges, unmodified: black on light, white on dark; 40 px is
   Apple's minimum onscreen height. The bar's badge keeps its own clear space. */
.store, .store-hero { display: inline-flex; line-height: 0; border-radius: 8px; }
.store img, .store-hero img { height: 40px; width: auto; }
.store-hero img { height: 54px; }
.store:focus-visible, .store-hero:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.chip { font-size: 16px; color: var(--soft); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 14px; }

/* The promo film: the real app on iPhone Duo, muted and looping. */
.film { position: relative; margin: 8px auto 0; max-width: 980px; }
.film video { width: 100%; height: auto; display: block; border-radius: 18px; background: var(--paper);
  box-shadow: 0 0 0 1px var(--rule), 0 24px 48px -28px rgba(60, 45, 30, .45); }
.film .sound { position: absolute; right: 14px; bottom: 14px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  font: 500 15px/1 "Newsreader", Georgia, serif; color: #fff; background: rgba(43, 43, 43, .72); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.film .sound:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* Feature grid: six pencil icons drawn with PencilKit's pencil (tools/PencilMarks.swift). */
.grid { list-style: none; margin: 8px auto 0; padding: 32px 0 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 16px; max-width: 680px; }
.grid li { display: grid; justify-items: center; align-content: start; gap: 8px; text-align: center; font-size: 18px; line-height: 1.2; text-wrap: balance; }
.grid img { width: 56px; filter: var(--pencil-filter, none); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }

/* Pencil annotations: a loose circle and an arrow, drawn in as they scroll into view. */
.circled { position: relative; white-space: nowrap; margin-left: 0.18em; }
.circled::after {
  content: ""; position: absolute; inset: -0.3em -0.34em -0.24em -0.2em; pointer-events: none;
  background: url("images/pencil-annot-circle.png") center / 100% 100% no-repeat;
  filter: var(--pencil-filter, none);
  -webkit-mask: conic-gradient(from -90deg, #000 var(--sweep), transparent 0);
          mask: conic-gradient(from -90deg, #000 var(--sweep), transparent 0);
}
.note { position: relative; font-style: italic; font-size: 18px; color: var(--soft); padding-top: 6px; }
.note .arrow { position: absolute; width: 120px; left: calc(100% + 6px); top: 4px; filter: var(--pencil-filter, none); }
@media (max-width: 999px) { .note { padding-bottom: 54px; } .note .arrow { left: 58%; top: calc(100% - 50px); width: 76px; rotate: 62deg; transform-origin: 0 0; } }
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 360deg; }
@keyframes sweep { from { --sweep: 0deg; } to { --sweep: 360deg; } }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .circled::after { animation: sweep linear both; animation-timeline: view(); animation-range: entry 35% cover 42%; }
    .note .arrow { animation: draw linear both; animation-timeline: view(); animation-range: entry 30% cover 45%; }
  }
}

/* Features: real captures in Apple's bezels, transparent; the words are HTML. */
.feature { display: grid; gap: 28px; justify-items: center; text-align: center; padding-block: 48px; }
.feature .copy { display: grid; gap: 14px; justify-items: center; max-width: 44ch; position: relative; }
.feature h2 { font-size: clamp(32px, 6.4vw, 52px); }
.feature p { color: var(--soft); font-size: 19px; text-wrap: pretty; }
.device { width: min(100%, 340px); filter: drop-shadow(0 22px 28px rgba(60, 45, 30, .22)) drop-shadow(0 2px 4px rgba(60, 45, 30, .12)); }
.feature-wide .device { width: min(100%, 900px); }
.frames { display: flex; justify-content: center; padding-top: 10px; }
.frames img { width: 96px; border: 6px solid #fff; border-radius: 4px; box-shadow: 0 8px 18px -8px rgba(60, 45, 30, .45); margin-inline: -6px; }
.frames img:nth-child(1) { rotate: -4deg; }
.frames img:nth-child(2) { rotate: 1.5deg; translate: 0 6px; }
.frames img:nth-child(3) { rotate: 5deg; }

@media (min-width: 1000px) {
  .feature:not(.feature-wide) { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; text-align: left; }
  .feature:not(.feature-wide) .copy { justify-items: start; }
  .feature-flip .copy { order: 2; }
  .frames { justify-content: start; }
}

.notes { display: grid; gap: 14px; max-width: 60ch; margin: 0 auto; padding: 28px 0 48px; border-top: 1px solid var(--rule); color: var(--soft); }
.notes b { color: var(--ink); font-weight: 500; }

@media (min-width: 1000px) {
  .notes { grid-template-columns: 1fr 1fr; gap: 32px; max-width: none; }
}

/* Privacy and Support */
.page { max-width: 64ch; margin: 0 auto; padding: 32px 0 48px; display: grid; gap: 16px; }
.page .back { font-size: 17px; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.page .back img { width: 32px; border-radius: 22.5%; }
.page h1 { font-size: clamp(40px, 9vw, 60px); margin-top: 16px; }
.page h2 { font-size: 24px; margin-top: 18px; }
.page .lede { max-width: none; }
.page details { border-top: 1px solid var(--rule); padding: 14px 0; }
.page details:last-child { border-bottom: 1px solid var(--rule); }
.page summary { cursor: pointer; font-weight: 500; font-size: 19px; }
.page details p { margin-top: 8px; color: var(--soft); }
.todo { background: var(--todo, #FFE14D66); padding: 0 4px; border-radius: 3px; }

footer { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 24px 0 40px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--soft); }
footer span { flex-basis: 100%; }
.page .effective { color: var(--soft); font-size: 15px; }

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #24211E;
    --ground: url("images/paper-dark.jpg");
    --ink: #EDE6DA;
    --soft: #B4AA9C;
    --rule: #3D3833;
    --link: #E2AE85;
    --mark-opacity: .82;
    --pencil-filter: invert(.9) sepia(.15);
    --todo: #FFE14D33;
  }
  .icon { box-shadow: 0 0 0 1px rgba(255, 248, 235, .12), 0 10px 24px -10px rgba(0, 0, 0, .8); }
}
