/*
  Wordhoard's site.

  Plain CSS, no build step, no framework, no fonts fetched from anywhere. That last one is not
  minimalism for its own sake: this site's whole argument is that the app does not send your
  reading anywhere, and a page that phones a font CDN to say so is a page that has quietly told
  Google which privacy policy you were reading.

  The palette is the app's, taken from `Wordhoard/Design/WordhoardTheme.swift`. When one moves
  the other has to.
*/

:root {
  --ink:      #16130f;
  --ink-2:    #4a4238;
  --ink-3:    #8a7f6e;
  --paper:    #f4f1ea;
  --surface:  #fffdf8;
  --line:     #e3dccf;
  --soft:     #ebe6db;
  --accent:   #b4460f;
  --accent-2: #c25a24;

  --measure: 1120px;
  --radius: 20px;

  /* Georgia is on every Mac, iPhone and Windows machine, and it is a book face. The app uses a
     serif for headwords for the same reason — a word being defined should look like a word in
     a dictionary rather than like interface text. */
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); }
a:hover { color: var(--accent-2); }

/* ── Header ──────────────────────────────────────────────────────────────── */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 241, 234, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}

.brand svg { width: 24px; height: 24px; display: block; }

.top nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 15px;
}

.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover { background: #2c2620; color: var(--surface); }

.button.quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.quiet:hover { background: var(--soft); color: var(--ink); }

/* ── Type ────────────────────────────────────────────────────────────────── */

h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.12; margin: 0; font-weight: 500; }

h1 { font-size: clamp(38px, 5.2vw, 62px); }
h2 { font-size: clamp(27px, 3.2vw, 38px); }
h3 { font-size: 19px; letter-spacing: -0.015em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.muted { color: var(--ink-3); }
.small { font-size: 14.5px; }

section { padding: 76px 0; }
section + section { border-top: 1px solid var(--line); }

.head { max-width: 62ch; margin-bottom: 40px; }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 0;
  border-top: 0;
  overflow: hidden;
  background: #17140f;
}

.hero .stage {
  position: relative;
  min-height: 620px;
  height: 78vh;
  max-height: 820px;
  display: flex;
  align-items: center;
}

.hero img.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Set once a photograph is chosen — see site/README.md. `hero-test.html` prints the number. */
  object-position: 50% 50%;
}

.hero .scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12,10,8,0.80) 0%, rgba(12,10,8,0.34) 46%, rgba(12,10,8,0.05) 72%),
    linear-gradient(180deg, rgba(12,10,8,0.40) 0%, rgba(12,10,8,0) 26%),
    rgba(12, 10, 8, 0.30);
}

.hero .wrap { position: relative; z-index: 2; }
.hero h1, .hero .lead { color: #fff; }
.hero .lead { color: rgba(255,255,255,0.76); max-width: 46ch; }
.hero .eyebrow { color: rgba(255,255,255,0.72); }

.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .button { background: var(--surface); color: var(--ink); }
.hero .button:hover { background: #fff; }

.hero .button.quiet {
  background: rgba(255,255,255,0.10);
  color: #fff;
  border-color: rgba(255,255,255,0.26);
}

.hero .button.quiet:hover { background: rgba(255,255,255,0.18); }

/* The floating card, as on the app's own screens. One, not three — the site has room to say
   things in words, so the card is here to show what a saved word looks like and nothing else. */
.hero .card {
  position: absolute;
  right: 5vw;
  top: 50%;
  transform: translateY(-50%);
  width: 330px;
  padding: 22px 24px;
  border-radius: 24px;
  background: rgba(255,255,255,0.13);
  backdrop-filter: blur(26px) saturate(1.2);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
  color: #fff;
  z-index: 2;
}

.hero .card .word { font-family: var(--serif); font-size: 31px; line-height: 1.1; }
.hero .card .phon { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 3px; }

.hero .card .pos {
  margin-top: 16px; font-size: 11.5px; letter-spacing: 0.09em;
  text-transform: uppercase; color: rgba(255,255,255,0.55);
}

.hero .card .def { margin-top: 6px; font-size: 16px; line-height: 1.45; }

.hero .card .quote {
  margin-top: 18px; padding-left: 14px;
  border-left: 2px solid rgba(255,255,255,0.3);
  font-family: var(--serif); font-style: italic; font-size: 15px;
  color: rgba(255,255,255,0.9);
}

.hero .card .src { margin-top: 10px; font-size: 12.5px; color: rgba(255,255,255,0.55); }

@media (max-width: 1080px) {
  .hero .card { display: none; }
}

/*
  The hero on a narrow screen, which is a different picture even though it is the same file.

  `object-fit: cover` crops whatever the box doesn't need. On a wide viewport that is the top and
  bottom, and the frame arrives intact: dark curtain on the left, lit book on the right, headline
  in the dark. On a tall one it crops the *sides* and keeps the horizontal centre — which in this
  photograph is the brightest thing in it. The sub-heading landed as white text on a lit page and
  could not be read.

  So: pull the crop back towards the dark left, and replace the left-to-right gradient with one
  that runs down. The horizontal scrim exists to clear a column beside the photograph; on a phone
  there is no column, the text is simply on top of everything, and the whole frame has to come
  down instead.
*/
@media (max-width: 860px) {
  .hero img.photo { object-position: 30% 50%; }

  .hero .scrim {
    background:
      linear-gradient(180deg, rgba(12,10,8,0.55) 0%, rgba(12,10,8,0.30) 34%, rgba(12,10,8,0.52) 100%),
      rgba(12, 10, 8, 0.44);
  }

  /* The headline already carries one. On a phone the body copy is over the picture too. */
  .hero .lead { text-shadow: 0 1px 16px rgba(0,0,0,0.5); }
}

/* ── Blocks ──────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}

.tile {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.tile h3 { margin-bottom: 8px; }
.tile p { color: var(--ink-2); font-size: 15.5px; }

.chip {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--soft);
  font-size: 18px;
}

.steps { counter-reset: step; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.step { position: relative; padding-top: 46px; }

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 600;
}

.step p { color: var(--ink-2); font-size: 15.5px; }

/* The before/after that makes the whole argument. */
.compare { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.compare > div {
  padding: 24px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.compare .after { border-color: #e2c9b4; background: #fdf6ef; }

.compare .who {
  font-size: 12px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px;
}

.compare .after .who { color: var(--accent); }
.compare .body { font-family: var(--serif); font-size: 18px; line-height: 1.5; }
.compare .note { margin-top: 14px; font-size: 14.5px; color: var(--ink-2); }

/* ── Pricing ─────────────────────────────────────────────────────────────── */

.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); align-items: start; }

.plan {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.plan.paid { border-color: var(--ink); }

.plan .price { font-size: 34px; letter-spacing: -0.03em; margin: 6px 0 4px; }
.plan .price small { font-size: 15px; color: var(--ink-3); letter-spacing: 0; }

.plan ul { margin: 20px 0 0; padding: 0; list-style: none; }

.plan li {
  position: relative;
  padding: 7px 0 7px 26px;
  font-size: 15.5px;
  color: var(--ink-2);
}

.plan li::before {
  content: "";
  position: absolute;
  left: 4px; top: 15px;
  width: 9px; height: 5px;
  border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}

/* ── Prose pages ─────────────────────────────────────────────────────────── */

.prose { max-width: 72ch; padding: 56px 0 84px; }
.prose h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 10px; }
.prose h2 { font-size: 23px; margin: 46px 0 12px; }
.prose h3 { font-size: 17.5px; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 600; }

.prose .updated {
  font-size: 14.5px;
  color: var(--ink-3);
  padding-bottom: 26px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

/* The summary at the top of the policy. Somebody who reads only this should still come away
   with an accurate picture, which is the actual test of a privacy policy. */
.summary {
  padding: 24px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 40px;
}

.summary ul { margin: 0; padding-left: 20px; }
.summary li { margin-bottom: 7px; }
.summary li:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 26px;
  font-size: 15px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

th { color: var(--ink); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 56px;
  font-size: 15px;
  color: var(--ink-3);
}

footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--ink); }

.credit { width: 100%; margin-top: 22px; font-size: 13.5px; line-height: 1.6; }

@media (max-width: 720px) {
  .top nav { display: none; }
  section { padding: 56px 0; }
  .hero .stage { min-height: 540px; }
}
