/* Hallmark · shape: card pile (kept from DESIGN.md) · genre: modern-minimal · theme: brand · redesign: full
 * paper: #FFFFFF on table #ECEDEE · accent: #D42B28 · display: system (SF Pro Display) · body: system (SF Pro Text) · hero: Split, the fanned phones · nav: edge-aligned, wordmark, links, one action · footer: one quiet line · signature: the app's own screens dealt onto the first card
 * surface: absolute · axes: light/grotesk-sans/warm · posture: split · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V3 · weakest: V, the locked DESIGN.md keeps the card pile; varied the composition instead (ledger proof, alternating head rows, keypad-grid features, Duo picture first) */
/* Hallmark · waive 7b · DESIGN.md names #FFFFFF as --card · the brand surface is locked */
/* Hallmark · waive 1 · DESIGN.md locks the system font, no web fonts · SF Pro is the face the app itself uses on iPhone and iPad, so the page reads as the app */
/* Hallmark · waive 26b · no form controls and no aria-disabled on the page · the App Store badge, the Get the app pill, the FAQ toggles and the Pause button can never be disabled */
/* Hallmark · dropped spfill · the gradient fill under the feature sparkline went with the nested surface */
/* Hallmark · reworded "unlocks every converter" to "opens every converter" (FAQ) · 19 names "unlocks" */
/* Hallmark · reworded "GlobeConverter — Currency…" to "GlobeConverter: Currency…" (title, og:title) · 19 names the dash */
/* Hallmark · reworded "Unlock every converter." to "Every converter, one upgrade." · 19 names "Unlock" */
/* Hallmark · dropped the categories marquee and its tap-to-pause script · the 39 categories now sit in a still index, so nothing moves on its own */
/* Hallmark · dropped the hero label "Currency & unit converter, for iPhone and iPad" and "Category. From. To. Keypad." folded into the lead · 9 names the eyebrow, 58 the hero length */
@import url("./tokens.css");
@import url("./base.css");

html { scroll-behavior: smooth; }
body { background: var(--color-paper); font-size: 17px; line-height: 1.47; letter-spacing: -0.022em; font-feature-settings: "tnum"; }
body.table { background: var(--color-table); }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 8px; transition: none; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--color-paper); padding: var(--space-xs) var(--space-sm); border-radius: 8px; z-index: var(--z-modal); }
h1 { font-size: clamp(44px, 5.4vw, 76px); line-height: 1.04; max-width: 12ch; margin: 0 0 var(--space-lg); }
h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.06; margin: 0; }
.sub { color: var(--color-muted); max-width: 34em; font-size: 21px; line-height: 1.38; letter-spacing: 0.011em; }
.section { padding: 104px 0 120px; }
.wrap.section { padding: 104px var(--gutter) 120px; }
.head-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap-columns); align-items: end; margin-bottom: 56px; }
.head-row .sub { justify-self: end; }
@media (max-width: 860px) { .head-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); } .head-row .sub { justify-self: start; } }

/* Cards: each overlaps the previous by its own radius and casts a shadow upward */
.card { position: relative; background: var(--color-paper); border-radius: var(--radius-card) var(--radius-card) 0 0; margin-top: calc(-1 * var(--radius-card)); box-shadow: var(--shadow-card); }
.hero.card { margin-top: 0; }
[id] { scroll-margin-top: 84px; }

/* Nav on the table, like the status bar above the first card */
.nav { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-table); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--space-sm); font-weight: 600; text-decoration: none; font-size: 18px; }
.brand img { border-radius: 50%; }
.nav nav { display: flex; gap: var(--space-lg); margin-left: auto; }
.nav nav a { text-decoration: none; font-size: 14px; color: var(--color-muted); padding: var(--space-sm) 0; }
.nav nav a:hover { color: var(--color-ink); }
.pill { background: var(--color-accent); color: var(--color-accent-ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: var(--space-sm) 20px; border-radius: var(--radius-pill); white-space: nowrap; }
.pill:hover { background: var(--color-accent-hover); }
.pill:active, .badge:active { transform: scale(0.97); }
@media (max-width: 820px) {
  /* Phones and small tablets: the section links go, the wordmark and Get the app stay */
  .nav nav { display: none; }
  .pill { margin-left: auto; }
}

/* Hero: the copy on the left, the app's own cards dealt on the right */
.hero { overflow: clip; padding: 56px 0 88px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap-columns); align-items: center; }
.lead { font-size: clamp(19px, 1.8vw, 21px); line-height: 1.38; letter-spacing: 0.011em; color: var(--color-muted); max-width: 26em; margin: 0 0 36px; }
.cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.badge { display: inline-block; border-radius: 8px; transition: transform var(--dur-short) var(--ease-out); }
.badge:hover { transform: translateY(-1px); }
@media (max-width: 900px) { .hero-in { grid-template-columns: minmax(0, 1fr); } }

/* Phones with real screenshots */
.phone { margin: 0; border-radius: var(--radius-phone); padding: var(--space-sm); background: var(--color-ink); box-shadow: var(--shadow-phone); }
.phone img { width: 100%; border-radius: 32px; }
.fan { position: relative; height: 640px; }
.fan .phone { position: absolute; width: 288px; top: 8px; left: 50%; }
.fan .front { transform: translateX(-50%); z-index: 2; }
.fan .back { width: 240px; top: 72px; }
.fan .l { transform: translateX(-120%) rotate(-8deg); }
.fan .r { transform: translateX(20%) rotate(8deg); }
@media (max-width: 520px) { .fan { height: 528px; } .fan .phone { width: 228px; } .fan .back { width: 180px; } .fan .l { transform: translateX(-104%) rotate(-8deg); } .fan .r { transform: translateX(4%) rotate(8deg); } }

/* Proof: a ledger of three figures split by hairlines, then the reviews */
.ledger { list-style: none; margin: 0 0 72px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.ledger li { border-top: var(--rule-hair) solid var(--color-rule); padding-top: var(--space-lg); color: var(--color-muted); font-size: 15px; }
.ledger .laurel { width: 28px; margin-bottom: var(--space-md); }
.ledger .fig { font-size: clamp(40px, 4.6vw, 60px); font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--color-ink); margin-bottom: var(--space-xs); }
.stars { color: var(--color-star); font-size: 0.4em; vertical-align: 0.6em; }
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.quotes figure { margin: 0; display: flex; flex-direction: column; }
.quotes blockquote { margin: 0; flex: 1; }
.quotes b { display: block; font-weight: 600; font-size: 21px; margin-bottom: var(--space-xs); }
.quotes blockquote p { color: var(--color-ink-2); }
.quotes figcaption { margin-top: var(--space-md); color: var(--color-muted); font-size: 14px; }
@media (max-width: 860px) { .ledger, .quotes { grid-template-columns: minmax(0, 1fr); } }

/* Screens: three phones, the middle one lifted like the top card of the pile */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); align-items: start; }
.shots figure { margin: 0; display: flex; flex-direction: column; gap: var(--space-lg); }
.shots figure:nth-child(2) { margin-top: calc(-1 * var(--space-xl)); }
.shots figure:not(:nth-child(2)) { margin-top: var(--space-xl); }
.shots .phone { max-width: 300px; width: 100%; margin: 0 auto; }
.shots figcaption { text-align: center; color: var(--color-muted); font-size: 15px; max-width: 280px; margin: 0 auto; }
.shots figcaption b { display: block; color: var(--color-ink); font-size: 18px; margin-bottom: var(--space-3xs); }
@media (max-width: 820px) { .shots { grid-template-columns: minmax(0, 1fr); } .shots figure:nth-child(n) { margin-top: 0; } }

/* iPhone Duo: the picture leads, the words follow */
.duo-in { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap-columns); align-items: center; }
.duo-in .sub { margin-top: var(--space-md); }
.duo { margin: 0; padding: var(--space-sm); border-radius: var(--radius-phone); background: var(--color-ink); box-shadow: var(--shadow-phone); }
.duo img { width: 100%; border-radius: 32px; }
@media (max-width: 860px) { .duo-in { grid-template-columns: minmax(0, 1fr); } }

/* Features: the app's keypad grid, cells split by hairlines, no boxes */
.feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: var(--rule-hair) solid var(--color-rule); }
.feats > li { position: relative; padding: var(--space-lg) var(--space-lg) 32px; display: flex; flex-direction: column; gap: var(--space-2xs); border-bottom: var(--rule-hair) solid var(--color-rule); }
.feats > li:not(:nth-child(4n)) { border-right: var(--rule-hair) solid var(--color-rule); }
.feats b { font-weight: 600; font-size: 17px; }
.feats span { color: var(--color-muted); font-size: 15px; }
.sp { height: 112px; margin: 0 0 var(--space-md); display: flex; align-items: center; justify-content: flex-start; font-weight: 600; }
.sp > * { transition: transform var(--dur-short) var(--ease-out); }
.sp-tile { background: var(--color-accent); color: var(--color-accent-ink); border-radius: 12px; padding: var(--space-sm) var(--space-md); font-size: 18px; display: flex; flex-direction: column; }
.sp-tile small { font-size: 12px; font-weight: 400; }
.sp-tile.quiet { background: var(--color-paper-2); color: var(--color-ink); font-size: 16px; }
.sp-tile.quiet small { color: var(--color-muted); }
.sp-tile.fav { flex-direction: row; align-items: center; gap: var(--space-sm); }
.sp-tile.fav span { color: var(--color-ink); font-size: 16px; display: flex; flex-direction: column; }
.heart { width: 22px; height: 22px; fill: var(--color-accent); stroke: none; }
.sp-chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.sp-chips i { font-style: normal; font-size: 13px; padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-pill); background: var(--color-paper-2); }
.sp-chips i:first-child { background: var(--color-accent); color: var(--color-accent-ink); }
.sp-line { width: 88%; color: var(--color-accent); overflow: visible; }
.sp-big { font-size: 44px; font-weight: 700; letter-spacing: -0.01em; color: var(--color-accent); }
.sp-keys { display: grid; grid-template-columns: repeat(4, 40px); gap: var(--space-xs); }
.sp-keys i { font-style: normal; background: var(--color-paper-2); height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 500; }
.sp-keys i:last-child { background: var(--color-accent); color: var(--color-accent-ink); }
.sp-dev { display: flex; align-items: flex-end; gap: var(--space-sm); }
.sp-dev i { display: block; width: 32px; height: 56px; border: 2px solid var(--color-ink); border-radius: 8px; background: var(--color-paper-2); }
.sp-dev .duo { width: 64px; background: linear-gradient(90deg, var(--color-paper-2) calc(50% - 1px), var(--color-ink) calc(50% - 1px) calc(50% + 1px), var(--color-paper-2) calc(50% + 1px)); }
.sp-dev .pad { width: 56px; height: 72px; border-radius: 12px; }
.tag { display: inline-block; vertical-align: 2px; margin-left: var(--space-xs); padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-pill); background: var(--color-gold-wash); color: var(--color-gold-ink); font-size: 12px; font-weight: 600; text-decoration: none; }
.tag:hover { background: var(--color-gold-wash-2); }
@media (max-width: 1000px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feats > li:nth-child(n) { border-right: 0; } .feats > li:nth-child(odd) { border-right: var(--rule-hair) solid var(--color-rule); } }
@media (max-width: 560px) { .feats { grid-template-columns: minmax(0, 1fr); } .feats > li:nth-child(n) { border-right: 0; padding-inline: 0; } }

/* Categories: all 39 in a still index, hairlines between rows */
.cats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--gap-columns); align-items: start; }
.cat-index { list-style: none; margin: 0; padding: 0; columns: 3 200px; column-gap: var(--gap-columns); }
.cat-index li { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) 0; border-bottom: var(--rule-hair) solid var(--color-rule); break-inside: avoid; font-size: 16px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; color: var(--color-muted); }
@media (max-width: 860px) { .cats { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .cat-index { columns: 2; column-gap: var(--space-md); } .cat-index li { font-size: 14px; gap: var(--space-xs); } }

/* Full version */
.full-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap-columns); align-items: center; }
.full-in .sub { margin-top: var(--space-md); }
@media (max-width: 860px) { .full-in { grid-template-columns: minmax(0, 1fr); } }
.perks { list-style: none; padding: 0; margin: 0; background: var(--color-paper-2); border-radius: var(--radius-group); overflow: clip; }
.perks li { display: flex; flex-direction: column; padding: 20px var(--space-lg) 20px 56px; position: relative; }
.perks li + li { border-top: var(--rule-hair) solid var(--color-rule); }
.perks li::before { content: "★"; position: absolute; left: var(--space-lg); top: 20px; color: var(--color-star); }
.perks b { font-weight: 600; }
.perks span { color: var(--color-muted); font-size: 15px; }

/* FAQ: heading on the left, questions on the right */
.faq-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--gap-columns); align-items: start; }
@media (max-width: 860px) { .faq-in { grid-template-columns: minmax(0, 1fr); } }
.faq { border-top: var(--rule-hair) solid var(--color-rule); }
details { border-bottom: var(--rule-hair) solid var(--color-rule); padding: var(--space-lg) 0; }
summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); border-radius: 8px; transition: color var(--dur-short) var(--ease-out); }
summary:hover { color: var(--color-accent); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2.5px solid var(--color-accent); border-bottom: 2.5px solid var(--color-accent); transform: translateY(-3px) rotate(45deg); transition: transform var(--dur-long) var(--ease-out); }
details[open]:not(.closing) summary::after { transform: translateY(2px) rotate(225deg); }
details p { color: var(--color-muted); margin: var(--space-sm) 0 0; max-width: 40em; }

.foot { background: var(--color-table); color: var(--color-muted); font-size: 14px; padding: var(--space-md) 0; }
.foot-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-sm); }
.foot-in > span { padding: var(--space-sm) 0; }
.foot nav { display: flex; gap: var(--space-2xs) 20px; flex-wrap: wrap; }
.foot nav a { display: inline-block; padding: var(--space-sm) 0; text-decoration: none; transition: color var(--dur-short) var(--ease-out); }
.foot a:hover { color: var(--color-ink); }
.nav nav a, .pill, .tag { transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }

/* One orchestrated moment: the phones are dealt onto the hero card */
@keyframes deal { from { translate: 0 140px; } }
@keyframes rise { from { translate: 0 20px; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.8s var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .fan .phone { animation: deal 1s var(--ease-out) both; }
  .fan .front { animation-delay: 0.2s; }
  .fan .l { animation-delay: 0.4s; }
  .fan .r { animation-delay: 0.5s; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Phones: tighter rhythm, the screens become a swipeable row, bigger tap targets */
@media (max-width: 600px) {
  .section, .wrap.section { padding-block: var(--space-2xl) var(--space-2xl); }
  .head-row { margin-bottom: var(--space-xl); }
  .sub, .lead { font-size: 18px; }
  .hero { padding: 32px 0 56px; }
  .lead { margin-bottom: 28px; }
  .brand { min-height: 44px; }
  .ledger { margin-bottom: var(--space-xl); gap: var(--space-lg); }
  .ledger li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-md); align-items: center; }
  .ledger .laurel { grid-row: span 2; margin: 0; }
  .ledger .fig { font-size: 40px; margin: 0; }
  .quotes { gap: var(--space-xl); }
  .shots { display: flex; gap: var(--space-md); overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: var(--space-sm) var(--gutter) var(--space-md); scrollbar-width: none; }
  .shots::-webkit-scrollbar { display: none; }
  .shots figure { flex: 0 0 72%; scroll-snap-align: center; }
  .feats > li { padding-block: var(--space-lg) var(--space-lg); }
  .sp { height: 80px; margin-bottom: var(--space-sm); }
  .tag { padding: var(--space-xs) var(--space-sm); margin-left: var(--space-2xs); }
  details { padding: 0; }
  summary { min-height: 44px; padding-block: var(--space-md); font-size: 17px; }
  details p { margin: 0 0 var(--space-md); }
  .perks li { padding-right: var(--space-md); padding-left: 48px; }
  .perks li::before { left: 20px; }
}

/* Micro-interactions on the mockups: each one acts out its own feature, only under a pointer and only with motion allowed */
@keyframes draw { from { stroke-dashoffset: 260; } }
@keyframes beat { 30% { transform: scale(1.3); } 60% { transform: scale(0.92); } }
@keyframes hop { 40% { transform: translateY(-5px); } }
@keyframes press { 40% { transform: scale(0.86); } }
.fan .phone, .shots .phone { transition: transform var(--dur-long) var(--ease-out), rotate var(--dur-long) var(--ease-out), scale var(--dur-long) var(--ease-out); }
.cat-index .ic { transition: color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.sp-dev .pad { transition: transform var(--dur-long) var(--ease-out); }
.sp-line polyline { stroke-dasharray: 260; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .fan:hover .l { rotate: -4deg; }
  .fan:hover .r { rotate: 4deg; }
  .fan:hover .front { scale: 1.02; }
  .shots figure:hover .phone { transform: translateY(-8px); }
  .cat-index li:hover .ic { color: var(--color-accent); transform: translateX(3px) scale(1.1); }
  .feats > li:hover .sp-tile:not(.fav) { transform: translateY(-3px); }
  .feats > li:hover .sp-chips i { animation: hop 0.45s var(--ease-out) both; }
  .feats > li:hover .sp-chips i:nth-child(2) { animation-delay: 0.04s; }
  .feats > li:hover .sp-chips i:nth-child(3) { animation-delay: 0.08s; }
  .feats > li:hover .sp-chips i:nth-child(4) { animation-delay: 0.12s; }
  .feats > li:hover .sp-chips i:nth-child(5) { animation-delay: 0.16s; }
  .feats > li:hover .sp-chips i:nth-child(6) { animation-delay: 0.2s; }
  .feats > li:hover .sp-line polyline { animation: draw 0.9s var(--ease-out); }
  .feats > li:hover .sp-big { transform: scale(1.06); }
  .feats > li:hover .sp-keys i:last-child { animation: press 0.3s var(--ease-out); }
  .feats > li:hover .heart { animation: beat 0.6s var(--ease-out); }
  .feats > li:hover .sp-dev .pad { transform: rotate(-90deg); }
}

/* Phones: the showcase blocks (hero, iPhone Duo, Full Version heading) sit on one centred axis; long text and lists stay left */
@media (max-width: 600px) {
  .hero-copy { text-align: center; }
  .hero h1, .hero .lead { margin-inline: auto; }
  .hero .cta { justify-content: center; }
  .duo-in > div { text-align: center; }
  .duo-in .sub { margin-inline: auto; }
  .full-in > div:first-child { text-align: center; }
  .full-in > div:first-child .sub { margin-inline: auto; }
}
