/* Tokens and page chrome, shared by every document on the site.

   The palette is the app's, value for value - see `lib/date/ui/theme.dart`.
   The site is a selling surface end to end, so `CLAUDE.md`'s licence for a
   ground applies: sections may take one. What a ground owes is enforced here -
   secondary type on colour is `--ink-2` (`Th.groundMuted`), never `--muted`,
   and a coloured band runs full bleed with no border, because a boundary makes
   it a panel.

   Landing layout is in `_home.css`, the legal/support layout in `_doc.css`.
   Competitor measurements: `docs/design/dating-landing-pages.md`. */

/* Anton, the face `BrandLockup` sets the wordmark in. SIL Open Font License,
   see assets/fonts/Anton-OFL.txt. Subset to caps, lowercase, digits and the
   punctuation a display line sets - the earlier subset was caps and digits
   only, so a headline could not set a full stop. */
@font-face {
  font-family: 'Anton';
  src: url('/assets/anton.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Th.ink, Th.muted, Th.faint, Th.stroke */
  --ink: #000;
  --muted: #5a5a5f;
  --faint: #737378;
  --stroke: #444;

  /* Th.groundMuted - secondary type wherever a ground is not white. 13.55:1
     on white, 4.76:1 on the darkest ground the app can produce. */
  --ink-2: #2e2e30;

  /* Th.background, Th.surface, Th.raised, Th.border, Th.divider */
  --ground: #fff;
  --bed: #f6f6f6;
  --raised: #efeff1;
  --rule: #eaeaea;
  --divider: #f0f0f0;

  /* Th.accent. 4.58:1 against white, both directions. */
  --accent: #d93a26;
  --accent-ink: #fff;

  /* The warm off-white the references all run under their white. Tinder
     `#F0EEEE`, Bumble `#F3F3F3`, Hinge `#FFFEFD`; this sits between them and
     stays inside the app's grey family. */
  --bone: #f4f2ef;

  /* **The accent's own tint scale, and no second hue** (2026-08-31, the human:
     *"можна там більше кольорів, я не хочу чорно-білий сайт"*). Taylor Anne
     (`docs/design/pinterest-references.md`) grounds a whole page on three
     steps of one warm colour and reads as colourful without owning a palette;
     the first attempt at this page used a black-and-white photo mosaic and
     read as a gallery. Each step is `--accent` mixed with white at a fixed
     ratio, so the hue is the logo's and nothing here is invented: 15%, 30%,
     45%. Black ink measures 17.0:1, 13.7:1 and 10.6:1 on them in turn, so ink
     is legal on all three and `--ink-2` covers secondary type. */
  --blush: #f9e2df;
  --peach: #f4c5be;
  --coral: #eea69d;

  /* The warm paper the mosaic sits on - Liam Bennett's move, an editorial page
     grounds on off-white rather than `#FFFFFF`. */
  --paper: #fbf7f4;

  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -12px rgba(0, 0, 0, .16);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .06), 0 28px 60px -20px rgba(0, 0, 0, .26);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(20px, 5vw, 48px);
  --page: 1240px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 3px; }

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

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

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

/* Hidden until it is tabbed to, which is the one moment it is wanted. */
.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 60;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: top .2s var(--ease);
}

.skip:focus-visible { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- the lockup --------------------------------------------------------- */

/* One SVG, composed from the app's three `lockup_*.svg` at the offsets
   `docs/design/logo.md` records. Ink bounds are 1003 x 457, so the width is
   2.195 times the height and the height is the number worth setting. */
.lockup {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.lockup img { height: 26px; width: auto; }

/* `.wordmark` survives for the legal pages, which set the word as text. */
.wordmark {
  font-family: 'Anton', 'Arial Narrow', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.12;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- site header -------------------------------------------------------- */

/* Hinge's bar: over the landing page's photograph it floats with no plate, so
   the fold is the picture and nothing else.

   **The plate is the default and `.on-photo` takes it away**, not the other
   way round. With transparency as the base state every page that never adds a
   class - privacy, terms, support, 404 - got a sticky bar with its own text
   scrolling under it. */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 var(--rule);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}

.site-head nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  font-size: 15px;
}

/* The call is excluded rather than fought with: this rule outweighs `.btn` on
   specificity, so without the `:not` it strips the button's padding and
   repaints its label in the links' grey. */
.site-head nav a:not(.btn) {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 0;
  transition: opacity .2s var(--ease);
}

.site-head nav a:not(.btn):hover { opacity: .6; }

.site-head .btn {
  min-height: 40px;
  padding: 0 20px;
  font-size: 15px;
}

/* Over the photograph the word goes white and the card keeps `#FD2F1A`:
   inverting the whole lockup turns the card white too, and the white `p`
   inside it disappears into it. */
.site-head.on-photo {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.site-head.on-photo .lockup img { content: url('/assets/lockup-light.svg'); }
.site-head.on-photo nav a:not(.btn) { color: #fff; }

/* On a phone the row is the lockup and the call. Three text links beside them
   wrap into each other at 390px, and both are reachable by scrolling. */
@media (max-width: 780px) {
  .site-head nav a:not(.btn) { display: none; }
}

/* --- buttons ------------------------------------------------------------ */

/* A pill, which is what all three references ship. The fill is the accent and
   not the references' near-black: `CLAUDE.md` spends the accent on action, and
   a black primary would leave it with no job on the page. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), filter .18s var(--ease);
}

.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.97); }

/* The quiet twin: Tinder's grey pill beside its black one. */
.btn-quiet {
  background: var(--raised);
  color: var(--ink);
}

/* On ink or on the accent, the quiet twin is white. */
.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5);
}

.btn-ghost:hover { background: rgba(255, 255, 255, .1); filter: none; }

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

.site-foot {
  background: var(--ink);
  color: rgba(255, 255, 255, .62);
  padding: 56px 0 60px;
  font-size: 15px;
}

.site-foot .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}

.site-foot a { color: inherit; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot .lockup img { height: 24px; content: url('/assets/lockup-light.svg'); }
.site-foot .lockup:hover { text-decoration: none; }
.site-foot .fine { margin: 28px 0 0; font-size: 14px; color: rgba(255, 255, 255, .55); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
