/* Yardstick website. Layout: a yardage book. One reading column on the phone; on wide screens the
   words sit beside the screen they describe. A ruler's graduations divide the sections, and each section's
   eyebrow names the moment of the round it belongs to. Light only, like the app (decisions/0069). */

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* The app's own tokens (Sources/GolfGPS/Design/Palette.swift). No yellow. */
  --page: #F2EFE4;      /* Surface.page: the paper a yardage book is printed on */
  --plate: #FAF7EF;     /* Surface.group */
  --inset: #E4DECC;     /* Surface.inset */
  --sage: #DEE9DD;      /* Surface.selected */
  --ink: #181A14;       /* Ink.primary */
  --ink-2: #4C5046;     /* Ink.secondary */
  --ink-3: #63675B;     /* Ink.tertiary */
  --hairline: #727660;  /* Edge.hairline */
  --rule: #CFC8B3;
  --green: #1D5238;     /* Accent.interactive: spent on the one thing you are about to do */
  --green-deep: #163F2B;
  --on-green: #F7F4EA;  /* Ink.onAccent */
  --red: #B03A2E;       /* survey red: the green's centre */

  /* New York on Apple devices (the app's one classic voice), Source Serif 4 elsewhere. */
  --display: ui-serif, "New York", "Source Serif 4", Georgia, serif;
  /* SF Pro on Apple devices, the app's data face. */
  --text: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --measure: 62ch;
  --wide: 1120px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --shot-radius: 9.5%/4.4%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.012em; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: clamp(42px, 10.5vw, 76px); line-height: 1.02; }
h2 { font-size: clamp(31px, 6.4vw, 46px); line-height: 1.08; }
h3 { font: 600 19px/1.3 var(--text); margin: 0; letter-spacing: -0.005em; text-wrap: balance; }
p { margin: 0; max-width: var(--measure); text-wrap: pretty; }
.lede { font-size: clamp(18px, 2.3vw, 21px); line-height: 1.5; color: var(--ink-2); }
.small { font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

.eyebrow {
  font: 600 12px/1.3 var(--text);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.wrap { max-width: var(--wide); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }

/* The ruler: a yardstick's graduations, a long mark every fifth. */
.rule {
  height: 12px;
  border-top: 1px solid var(--hairline);
  background:
    repeating-linear-gradient(90deg, var(--hairline) 0 1px, transparent 1px 50px) top left / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--hairline) 0 1px, transparent 1px 10px) top left / 100% 6px no-repeat;
  opacity: 0.55;
}

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--page) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--page); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img.icon { width: 32px; height: 32px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(24, 26, 20, 0.12); }
.brand .wordmark { width: 112px; height: auto; color: var(--ink); }
.site-nav { display: flex; gap: 20px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 8px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--green); }

/* App Store badge: Apple's black artwork, unmodified, at least 40 px tall. */
.badge { display: inline-block; line-height: 0; border-radius: 8px; }
.badge img { height: 52px; width: auto; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; color: var(--ink-2); padding: 0; margin: 0; list-style: none; }
.facts li { display: inline-flex; align-items: baseline; }
.facts li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--red); margin-right: 8px; transform: translateY(-2px); }

/* Screens. Shown as the app runs, straight on, at the iPhone's own corner radius, with no fake bezel. */
.shot { position: relative; width: 100%; max-width: 300px; aspect-ratio: 1206 / 2622; border-radius: var(--shot-radius); overflow: hidden; background: var(--inset); box-shadow: 0 0 0 1px rgba(24, 26, 20, 0.18), 0 24px 48px -24px rgba(24, 26, 20, 0.35); margin: 0; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot.slot { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 18% 12%; background: repeating-linear-gradient(135deg, var(--inset) 0 10px, var(--plate) 10px 20px); box-shadow: inset 0 0 0 2px var(--hairline); text-align: center; }
.shot.slot .k { font: 600 11px/1.3 var(--text); letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.shot.slot .t { font: 600 16px/1.35 var(--text); color: var(--ink); }
.shot.slot .d { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.shot.watch { max-width: 200px; aspect-ratio: 416 / 496; border-radius: 22%; padding: 14% 10%; }
figure.screen { margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; min-width: 0; }
figure.screen figcaption { font-size: 14px; line-height: 1.45; color: var(--ink-3); text-align: center; max-width: 30ch; }
.screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; justify-items: center; }

/* Sections */
.section { padding-block: 64px; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }

/* Hero */
.hero { padding-block: 40px 56px; }
.hero .split { gap: 44px; }
.hero .shot { max-width: 290px; justify-self: center; }
.hero .copy { display: flex; flex-direction: column; gap: 22px; }

/* Why it's free: the one band of deep green */
.band-green { background: var(--green); color: var(--on-green); }
.band-green h2, .band-green h3 { color: var(--on-green); }
.band-green .eyebrow { color: #E9B7AF; }
.band-green p { color: color-mix(in srgb, var(--on-green) 86%, var(--green)); }
.band-green a { color: var(--on-green); }
.reasons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(247, 244, 234, 0.25); }
.reasons li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; padding-block: 22px; border-bottom: 1px solid rgba(247, 244, 234, 0.25); }
.reasons .mark { grid-row: span 2; font: 700 30px/1 var(--display); color: var(--on-green); opacity: 0.7; padding-top: 2px; }
.reasons li:last-child .mark { color: #F2B5AC; opacity: 1; }

/* Feature lists */
.points { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; }
.points li { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; border-left: 2px solid var(--rule); }
.points li p { color: var(--ink-2); }

/* Hands-free cards */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.card { background: var(--plate); border: 1px solid var(--rule); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card p { color: var(--ink-2); font-size: 16px; }
.said { font: 600 22px/1.25 var(--display); color: var(--ink); padding: 14px 16px; background: var(--sage); border-radius: 14px 14px 14px 4px; align-self: flex-start; max-width: 100%; }
.answer { font: 500 16px/1.4 var(--text); color: var(--ink-2); padding: 12px 16px; background: var(--inset); border-radius: 14px 14px 4px 14px; align-self: flex-end; max-width: 92%; }

/* The readout: how the app shows a yardage */
.readout { display: flex; align-items: flex-end; gap: 18px; padding: 22px 24px; background: var(--plate); border: 1px solid var(--rule); border-radius: 18px; align-self: flex-start; max-width: 100%; }
.readout .mid { font: 700 76px/0.9 var(--text); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.readout .fb { display: grid; gap: 4px; font: 600 19px/1.1 var(--text); font-variant-numeric: tabular-nums; color: var(--ink-2); padding-bottom: 4px; }
.readout .fb span b { font-weight: 500; color: var(--ink-3); margin-right: 6px; font-size: 14px; }
.defs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; }
.defs div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding-block: 16px; border-top: 1px solid var(--rule); }
.defs dt { font-weight: 600; }
.defs dd { margin: 0; color: var(--ink-2); max-width: var(--measure); }

/* Privacy label quote */
.label-quote { background: var(--plate); border: 1px solid var(--rule); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.label-quote .h { font: 700 24px/1.2 var(--text); color: var(--ink); }
.label-quote .src { font-size: 13px; color: var(--ink-3); }
.check { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--sage); color: var(--green); align-items: center; justify-content: center; }

/* Search */
.search { display: flex; gap: 10px; flex-wrap: wrap; max-width: 560px; }
.search input { flex: 1 1 220px; min-width: 0; font: 17px/1.3 var(--text); padding: 14px 16px; border-radius: 14px; border: 1px solid var(--hairline); background: var(--plate); color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 17px/1 var(--text); padding: 15px 22px; border-radius: 999px; border: 0; background: var(--green); color: var(--on-green); text-decoration: none; cursor: pointer; }
.button:hover { background: var(--green-deep); text-decoration: none; }
.button.ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }

/* Closing */
.closing { text-align: left; }
.closing .wrap { display: flex; flex-direction: column; gap: 20px; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: 40px 48px; background: var(--plate); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.signoff { font: 600 22px/1.25 var(--display); color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; }
.foot-links a { color: var(--ink-2); }
.legal { font-size: 12.5px; line-height: 1.55; color: var(--ink-3); display: flex; flex-direction: column; gap: 6px; max-width: 80ch; }

/* Inner pages */
.page-head { padding-block: 44px 28px; display: flex; flex-direction: column; gap: 14px; }
.page-head h1 { font-size: clamp(38px, 8vw, 58px); }
.prose { display: flex; flex-direction: column; gap: 14px; max-width: var(--measure); }
.prose h2 { font-size: clamp(24px, 4.6vw, 30px); margin-top: 18px; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.summary { background: var(--sage); border-radius: 18px; padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.summary ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.contact { background: var(--plate); border: 1px solid var(--rule); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.email { font: 600 clamp(20px, 5vw, 26px)/1.2 var(--text); color: var(--green); word-break: break-word; }
.faq { display: flex; flex-direction: column; max-width: 760px; }
.faq section { padding-block: 22px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.faq section p { color: var(--ink-2); }
.faq h2 { font: 600 20px/1.3 var(--text); letter-spacing: -0.005em; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.toc a { display: inline-block; font-size: 14px; padding: 7px 12px; border-radius: 999px; background: var(--plate); border: 1px solid var(--rule); color: var(--ink-2); text-decoration: none; }

/* Courses */
.results { display: flex; flex-direction: column; max-width: 760px; margin: 0; padding: 0; list-style: none; }
.results li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 2px; border-bottom: 1px solid var(--rule); }
.results .n { font-weight: 600; }
.results .w { color: var(--ink-3); font-size: 15px; grid-column: 1; }
.results .h { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.results mark { background: var(--sage); color: inherit; border-radius: 3px; padding: 0 1px; }
.status { font-size: 15px; color: var(--ink-2); min-height: 1.5em; }
.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 0 28px; }
.regions details { border-top: 1px solid var(--rule); }
.regions summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 2px; cursor: pointer; list-style: none; font-weight: 500; }
.regions summary::-webkit-details-marker { display: none; }
.regions summary span:last-child { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.regions details[open] summary { color: var(--green); }
.regions ol { margin: 0 0 12px; padding: 0; list-style: none; font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.regions ol li span { color: var(--ink-3); }
.country { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 28px; }
.country h2 { font-size: clamp(26px, 5vw, 34px); }

@media (min-width: 720px) {
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screens { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screens.two { grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: start; }
  .defs div { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .site-footer .legal { grid-column: 1 / -1; }
  .reasons { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 0; }
  .reasons li { border-bottom: 0; border-top: 1px solid rgba(247, 244, 234, 0.25); grid-template-columns: minmax(0, 1fr); }
  .reasons .mark { grid-row: auto; }
}
@media (min-width: 920px) {
  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; }
  .split.flip > :first-child { order: 2; }
  .hero { padding-block: 72px 88px; }
  .section { padding-block: 96px; }
}
@media (max-width: 380px) {
  .site-nav { gap: 14px; }
  .brand .wordmark { width: 96px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .shot { animation: rise 700ms cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise { from { transform: translateY(14px); opacity: 0.6; } to { transform: none; opacity: 1; } }
}

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--plate); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: var(--gutter-l); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section.plate { background: var(--plate); border-block: 1px solid var(--rule); }
.shot.slot.wide { max-width: 100%; aspect-ratio: 16 / 10; border-radius: 18px; padding: 8% 10%; }
.browse { padding-block: 24px 72px; }
.page-body { padding-bottom: 72px; }

/* Three screens on a phone: a row you swipe, not two and an orphan. */
@media (max-width: 719px) {
  .screens.three { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-inline: calc(-1 * var(--gutter-l)) calc(-1 * var(--gutter-r)); padding-inline: var(--gutter-l) var(--gutter-r); padding-bottom: 8px; scrollbar-width: none; }
  .screens.three::-webkit-scrollbar { display: none; }
  .screens.three > figure { flex: 0 0 62%; scroll-snap-align: center; }
}

.measure { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
.readout-fig { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.readout-fig figcaption { font-size: 15px; color: var(--ink-2); max-width: 40ch; }
.readout-fig figcaption b { font-variant-numeric: tabular-nums; color: var(--ink); }
.screens.three .shot { max-width: 250px; }
@media (min-width: 920px) {
  .measure { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
  .measure-head { position: sticky; top: 100px; }
  .defs div:first-child { border-top: 0; padding-top: 0; }
}

/* The comparison: Yardstick's column is the one deep-green column; the first column stays put while the rest scroll. */
.compare-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 18px; background: var(--page); -webkit-overflow-scrolling: touch; }
.compare-wrap:focus-visible { outline-offset: 2px; }
.compare { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 720px; font-size: 15px; }
.compare th, .compare td { padding: 12px 12px; border-bottom: 1px solid var(--rule); text-align: center; vertical-align: middle; white-space: nowrap; }
.compare thead th { font: 600 13px/1.3 var(--text); color: var(--ink-2); background: var(--inset); }
.compare tbody th { text-align: left; font-weight: 500; color: var(--ink); white-space: normal; min-width: 150px; max-width: 220px; line-height: 1.35; }
.compare th:first-child { position: sticky; left: 0; z-index: 1; background: var(--page); box-shadow: 1px 0 0 var(--rule); }
.compare thead th:first-child { background: var(--inset); }
.compare .us { background: var(--green); color: var(--on-green); font-weight: 700; }
.compare thead th.us { background: var(--green); color: var(--on-green); }
.compare .y { color: var(--green); font-weight: 600; }
.compare .n { color: var(--red); }
.compare .l { color: var(--ink-3); font-size: 14px; }
.compare tr.loss td.us { background: color-mix(in srgb, var(--green) 72%, var(--page)); }
.compare tr.price th, .compare tr.price td { font-weight: 700; font-variant-numeric: tabular-nums; border-bottom: 0; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare-notes { max-width: 820px; }
.sources summary { cursor: pointer; font-weight: 600; color: var(--green); padding: 6px 0; }
.sources[open] { display: flex; flex-direction: column; gap: 14px; }
.src-row h3 { font-size: 16px; }
.src-row ul { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink-2); }

/* The accuracy figure */
.proof { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.proof-n { font: 700 clamp(64px, 14vw, 96px)/0.9 var(--text); letter-spacing: -0.03em; color: var(--red); }
.proof figcaption { font-size: 17px; color: var(--ink); max-width: 44ch; }

/* The supporting cast: small cards, never a hero */
.extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.extras .card { padding: 18px; gap: 10px; }
.extras .card p { font-size: 15px; }

/* The maker's note */
.story { margin: 0; max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.story blockquote { margin: 0; display: flex; flex-direction: column; gap: 14px; font: 400 clamp(19px, 2.6vw, 23px)/1.5 var(--display); color: var(--ink); }
.story figcaption { font-size: 15px; color: var(--ink-3); }
