/* ---------------------------------------------------------------------------
   Start Somewhere, marketing site

   The palette, the type and the spacing grid are lifted from the app itself
   (lib/design/tokens.dart, docs/DESIGN_SYSTEM.md) rather than reinvented. If a
   value here disagrees with the app, the app is right.

   Two deliberate departures, both recorded rather than assumed:
   - `--navy` (accentDeep) is NOT used. It is reserved in the app for a peak
     moment that has not been spent yet, and a brand that shows it on the web
     and never in the product would be incoherent. The page gets its dark band
     from `--ink`, which is already the text colour.
   - Light only, like the app. `color-scheme: light` is declared so browsers
     do not try to invert a palette whose whole argument is the paper.
--------------------------------------------------------------------------- */

@font-face {
  font-family: 'SS4 Display';
  src: url('fonts/serif-display.woff2') format('woff2');
  font-weight: 350;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SS4 Text';
  src: url('fonts/serif-text.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('fonts/sans-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('fonts/sans-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --linen: #f1ede3;
  --surface: #fbf9f3;
  --hairline: #e5e0d3;
  --seam: #8e8674;
  --chip-edge: #ada695;
  --ink: #2e2c26;
  --ink-muted: #6e6a5e;
  --leather: #7a5638;
  --leather-fill: #e8dccd;

  /* 4pt grid, same six steps the app kept. */
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 20px;
  --s-2xl: 24px;

  --serif-display: 'SS4 Display', 'Iowan Old Style', Georgia, serif;
  --serif: 'SS4 Text', 'Iowan Old Style', Georgia, serif;
  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --measure: 34rem;
  --page: 68rem;
  --radius-card: 12px;
  --radius-control: 8px;
}

/* The app's DarkPalette, token for token. Same fourteen inks after dark, so a
   value is never invented here. If one of these disagrees with
   lib/design/tokens.dart, that file is right.
   The whole site inverts off these because every rule below reads the variable
   rather than a hex: the pale band under "Things this app will never do" is
   `--ink` on `--linen`, which is a dark band on paper in the light theme and a
   paper band in the dark one, with no second rule to keep in step. */
@media (prefers-color-scheme: dark) {
  :root {
    --linen: #14100d;
    --surface: #2a241c;
    --hairline: #383026;
    --seam: #847b69;
    --chip-edge: #5b5245;
    --ink: #efe9dc;
    --ink-muted: #b0a794;
    --leather: #d3a75c;
    --leather-fill: #40311b;
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: 'onum' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--leather);
  text-decoration-color: color-mix(in srgb, var(--leather) 35%, transparent);
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-color: var(--leather);
}

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

/* --- layout ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--s-2xl);
}

section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.band-surface {
  background: var(--surface);
  border-block: 1px solid var(--hairline);
}

.band-ink {
  background: var(--ink);
  color: var(--linen);
}
.band-ink a {
  color: var(--linen);
}

/* --- type --------------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  margin: 0 0 var(--s-xl);
  /* Full-width sections would otherwise set a heading across the whole 68rem
     measure, which no display face survives. */
  max-width: 15em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0 0 var(--s-sm);
}

p {
  margin: 0 0 var(--s-lg);
  max-width: var(--measure);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--s-md);
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 38rem;
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* A line of the app's own copy, quoted. Serif, because in the app the serif is
   what the product says when it is speaking to you directly. */
.said {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.3;
  color: var(--ink);
  margin: var(--s-2xl) 0;
  padding-left: var(--s-xl);
  border-left: 2px solid var(--leather);
  max-width: 32rem;
  text-wrap: balance;
}
.band-ink .said {
  color: var(--linen);
  border-left-color: var(--chip-edge);
}

/* --- hero --------------------------------------------------------------- */

.hero {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.wordmark {
  font-family: var(--serif-display);
  font-weight: 350;
  font-size: clamp(3.4rem, 9.5vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.028em;
  margin: 0 0 var(--s-2xl);
  text-wrap: balance;
}

.hero .lede {
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  margin-bottom: var(--s-2xl);
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  font-size: 0.9375rem;
  color: var(--ink-muted);
  border: 1px solid var(--chip-edge);
  border-radius: 999px;
  padding: var(--s-sm) var(--s-lg);
  background: var(--surface);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leather);
  flex: none;
}

/* The facts in the order somebody would ask for them. Small and quiet, and the
   only place on the page where the product is described as a spec rather than
   argued for, which is exactly the shape a machine lifts cleanly. */
.spec {
  list-style: none;
  margin: var(--s-2xl) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm) 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  max-width: 34rem;
}

.spec li + li::before {
  content: '·';
  margin: 0 var(--s-md);
  color: var(--chip-edge);
}

/* --- questions ---------------------------------------------------------- */

.faq {
  max-width: 40rem;
}

.faq h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.25;
  margin: calc(var(--s-2xl) * 1.5) 0 var(--s-sm);
  max-width: 32rem;
}

.faq h3:first-child {
  margin-top: 0;
}

.faq p {
  max-width: none;
  margin-bottom: 0;
}

/* --- phones ------------------------------------------------------------- */

.phone {
  border: 1px solid var(--seam);
  border-radius: 40px;
  overflow: hidden;
  background: var(--linen);
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
}

.phone img {
  width: 100%;
}

.phone-lg {
  max-width: 340px;
}

.phones {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}

/* Direct children only. A `.phone` inside a `.shot` is a *column* flex item, so
   a `flex-basis` here would set its height rather than its width and crop the
   screenshot to 200px. */
.phones > .phone {
  max-width: 250px;
  flex: 1 1 200px;
}

.phone-caption {
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-align: center;
  margin: var(--s-md) 0 0;
  max-width: 250px;
  margin-inline: auto;
}

.shot {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  flex: 1 1 200px;
  max-width: 250px;
}
.shot .phone {
  max-width: 100%;
  flex: none;
  width: 100%;
}

/* A phone at 300pt on a 375pt screen is 650pt tall, and three of them stacked
   is most of a minute of scrolling past pictures. Smaller, on the one device
   where the screenshots are least in need of being large. */
@media (max-width: 40rem) {
  .phone,
  .phone-lg {
    max-width: 264px;
  }
  .phones > .phone,
  .shot,
  .phone-caption {
    max-width: 216px;
  }
}

/* --- split sections ----------------------------------------------------- */

.split {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split.reverse .split-media {
    order: -1;
  }
}

/* --- lists -------------------------------------------------------------- */

.ticks {
  list-style: none;
  margin: 0 0 var(--s-lg);
  padding: 0;
  max-width: var(--measure);
}

.ticks li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: var(--s-md);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--leather);
}

.questions {
  list-style: none;
  margin: 0 0 var(--s-xl);
  padding: 0;
  max-width: var(--measure);
  border-top: 1px solid var(--hairline);
}

.questions li {
  font-family: var(--serif);
  font-size: 1.15rem;
  padding: var(--s-md) 0;
  border-bottom: 1px solid var(--hairline);
}

/* --- the "never" grid --------------------------------------------------- */

.nevers {
  list-style: none;
  margin: var(--s-2xl) 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  background: color-mix(in srgb, var(--linen) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--linen) 22%, transparent);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.nevers li {
  background: var(--ink);
  padding: var(--s-xl) var(--s-lg);
}

.nevers b {
  font-weight: 400;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--linen);
}

.nevers span {
  color: color-mix(in srgb, var(--linen) 62%, var(--ink));
  font-size: 0.9rem;
}


/* --- cards -------------------------------------------------------------- */

.cards {
  display: grid;
  gap: var(--s-lg);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin-top: var(--s-2xl);
}

.card {
  background: var(--surface);
  border: 1px solid var(--seam);
  border-radius: var(--radius-card);
  padding: var(--s-2xl);
}
.band-surface .card {
  background: var(--linen);
}
.card p:last-child {
  margin-bottom: 0;
}
.card p {
  max-width: none;
}

/* --- price -------------------------------------------------------------- */

.price {
  font-family: var(--serif-display);
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-lg);
}

.price small {
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--ink-muted);
  display: block;
  margin-top: var(--s-sm);
}

/* --- footer ------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--s-2xl) calc(var(--s-2xl) * 2);
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-lg) var(--s-2xl);
  align-items: baseline;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-lg) var(--s-2xl);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- prose pages (privacy, terms) --------------------------------------- */

.doc {
  max-width: 42rem;
  margin-inline: auto;
  padding-block: clamp(3rem, 6vw, 5rem);
}

.doc h1 {
  font-family: var(--serif-display);
  font-weight: 350;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 var(--s-md);
}

.doc h2 {
  font-size: 1.4rem;
  margin: calc(var(--s-2xl) * 2) 0 var(--s-md);
  max-width: none;
}

.doc h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  margin: var(--s-2xl) 0 var(--s-sm);
}

.doc p,
.doc li {
  max-width: none;
}

.doc ul {
  padding-left: 1.15rem;
  margin: 0 0 var(--s-lg);
}

.doc li {
  margin-bottom: var(--s-sm);
}

.doc-meta {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin-bottom: calc(var(--s-2xl) * 1.5);
}

.summary {
  background: var(--surface);
  border: 1px solid var(--seam);
  border-radius: var(--radius-card);
  padding: var(--s-2xl);
  margin-bottom: calc(var(--s-2xl) * 1.5);
}

.summary p:last-child {
  margin-bottom: 0;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--s-lg);
  font-size: 0.9375rem;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: var(--s-md) var(--s-md) var(--s-md) 0;
  border-bottom: 1px solid var(--hairline);
}

.doc th {
  font-weight: 500;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: var(--s-lg);
}

/* --- the handful of one-off adjustments ---------------------------------
   These are classes rather than `style=` attributes for one reason: the CSP in
   `_headers` sets `style-src 'self'`, which blocks inline style attributes as
   well as <style> blocks. A policy that has to be loosened to render the page
   it protects is not a policy. */

.mt-lg {
  margin-top: 2rem;
}
.mt-xl {
  margin-top: 2.5rem;
}
.flush {
  margin: 0;
}
.mb-0 {
  margin-bottom: 0;
}
.caption-wide {
  max-width: 300px;
}
.centered {
  text-align: center;
}
.centered p {
  margin-inline: auto;
}

.band-ink .eyebrow {
  color: var(--chip-edge);
}
.band-ink .intro {
  color: color-mix(in srgb, var(--linen) 78%, var(--ink));
}

/* --- masthead ----------------------------------------------------------- */

.masthead {
  padding-block: var(--s-xl);
  border-bottom: 1px solid var(--hairline);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-lg);
}

.masthead a {
  text-decoration: none;
}

.masthead-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  position: static;
  display: inline-block;
  margin: var(--s-sm);
}
