/* Thisness website: the app presented like a finely made thing.
   Newsreader (the app's entry face) for reading, Inter caps for the app's date line and buttons. */
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader.woff2") format("woff2"); font-style: normal; font-weight: 300 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader-Italic.woff2") format("woff2"); font-style: italic; font-weight: 300 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Regular.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
/* Just the letters of Marc's signature (Reenie Beanie, the wordmark's hand) and the three characters in "ma". */
@font-face { font-family: "Signature"; src: url("/fonts/ReenieBeanie-Marc.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mincho"; src: url("/fonts/ShipporiMincho-ma.woff2") format("woff2"); font-display: swap; }

/* The app's palette (Shared/Theme.swift). The "o" colours are the opposite mode: the phone and the letter band. */
:root {
  --bg: #F5F1E8;
  --ink: #2B211A;
  --muted: #6B5C50;
  --faint: #B8AC9C;
  --rule: #DCD3C5;
  --o-bg: #080605;
  --o-ink: #CD8C5F;
  --o-muted: #A8866B;
  --o-faint: #5A4535;
  --bezel: #1B1612;
  --floor: rgba(43, 33, 26, 0.22);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080605;
    --ink: #CD8C5F;
    --muted: #A8866B;
    --faint: #5A4535;
    --rule: #2A211B;
    --o-bg: #F5F1E8;
    --o-ink: #2B211A;
    --o-muted: #6B5C50;
    --o-faint: #B8AC9C;
    --bezel: #2A211B;
    --floor: rgba(205, 140, 95, 0.16);
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 20px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  animation: fade-in 0.9s ease both;
  transition: opacity 0.35s ease;
}
body.fading { opacity: 0; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { animation: none; transition: none; }
}

::selection { background: var(--rule); }
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; transition: opacity 0.3s ease; }
a:hover { opacity: 0.65; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Languages: both are in the page; only one shows. */
html[data-lang="en"] [lang="de"]:not(#lang), html[data-lang="de"] [lang="en"]:not(#lang) { display: none; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(64px, env(safe-area-inset-left)); padding-right: max(64px, env(safe-area-inset-right)); }

/* Small tracked caps in Inter: the app's date line and buttons. */
.caps {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.display { font-weight: 300; font-size: 56px; line-height: 1.06; letter-spacing: -0.015em; margin: 0; font-variant-numeric: lining-nums; }

/* Header: menu left and right, the name in the middle. */
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding-top: 34px; padding-bottom: 34px; color: var(--ink); }
.top nav { display: flex; gap: 30px; align-items: center; }
.top .nav-r { justify-content: flex-end; }
.top a { text-decoration: none; }
.top button {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  background: none; border: 0; padding: 0; cursor: pointer;
  transition: opacity 0.3s ease;
}
.top button:hover { opacity: 0.65; }
/* The name is a drawing (Reenie Beanie, spaced and thinned; see Tools/wordmark). */
.wordmark { display: block; line-height: 0; color: var(--ink); }
.wordmark svg { width: 150px; height: auto; }

/* Hero: the promise, then the app itself. */
.hero { text-align: center; padding-top: 72px; padding-bottom: 110px; }
.lead { font-weight: 300; font-size: 52px; line-height: 1.12; letter-spacing: -0.018em; max-width: 15em; margin: 0 auto; }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 72px; margin-top: 84px; }
.aside { font-style: italic; font-size: 24px; line-height: 1.3; color: var(--muted); }
.aside-l { text-align: right; }
.aside-r { text-align: left; }
.avail { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 56px; }
.app-icon { display: block; width: 64px; height: 64px; border-radius: 22.5%;
  box-shadow: 0 1px 2px rgba(43, 33, 26, 0.12), 0 8px 24px rgba(43, 33, 26, 0.14); }
.avail-t { text-align: left; font-size: 22px; line-height: 1.3; }
.avail-t .caps { display: block; margin-top: 6px; }

/* The phone: today's entry as the app shows it, drawn in the opposite mode. Sized in em so it scales as one piece. */
.device { font-size: 26px; display: flex; flex-direction: column; align-items: center; }
.phone { width: 15em; height: 32.5em; border-radius: 2.5em; background: var(--bezel); padding: 0.5em;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08); }
.screen { position: relative; height: 100%; overflow: hidden; border-radius: 2em; background: var(--o-bg); color: var(--o-ink);
  text-align: left; padding: 2.6em 1.2em 1.3em; display: flex; flex-direction: column; }
.screen > * { flex-shrink: 0; }
.island { position: absolute; top: 0.55em; left: 50%; width: 4.3em; height: 1.2em; margin-left: -2.15em; border-radius: 0.7em; background: #000; }
.p-caps { font-family: "Inter", -apple-system, sans-serif; font-size: 0.425em; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.9; }
.p-m { color: var(--o-muted); }
.p-top { display: flex; justify-content: space-between; }
.p-top > div { display: flex; flex-direction: column; }
.p-title { margin-top: 4.8em; display: flex; align-items: baseline; gap: 0.6em; }
.p-word { font-size: 2.6em; font-style: italic; line-height: 1; }
.p-native { font-family: "Mincho", "Hiragino Mincho ProN", serif; font-size: 1.1em; }
.p-gloss { font-size: 0.55em; font-style: italic; color: var(--o-muted); margin-top: 0.9em; }
.p-rule { height: 1px; background: currentColor; opacity: 0.5; margin: 1em -1.2em 0.9em; }
.p-body { font-size: 0.56em; line-height: 1.62; flex: 0 1 auto; min-height: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent); mask-image: linear-gradient(to bottom, #000 82%, transparent); }
.p-body p + p { margin-top: 0.55em; }
.p-q { font-style: italic; margin-top: 1em !important; }
.p-orig { margin-top: 1.2em; flex: none; }
.p-bot { margin-top: auto; padding-top: 1.4em; flex: none; display: flex; justify-content: space-between; align-items: center; }
.p-bot svg { width: 0.6em; height: 0.7em; }
.screen .p-body, .screen .p-word { font-family: "Newsreader", Georgia, serif; }
.floor { width: 18em; height: 1.3em; margin: -0.3em auto 0; border-radius: 50%; background: radial-gradient(closest-side, var(--floor), transparent); }

/* The four kinds of day, then the letter. */
.kinds { padding-top: 40px; padding-bottom: 150px; }
.kinds .display { max-width: 14em; }

.band { background: var(--o-bg); color: var(--o-ink); }
.band ::selection { background: var(--o-faint); }
.band .caps { color: var(--o-muted); }
.letter { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 96px; padding-top: 130px; padding-bottom: 130px; }
.letter h2 { margin: 0; }
.coda { font-weight: 300; font-size: 88px; line-height: 0.98; letter-spacing: -0.025em; margin-top: 36px; }
.coda span span { display: block; }
.body { font-size: 22px; line-height: 1.66; }
.body p + p { margin-top: 0.9em; }
.hope { font-style: italic; }
.sig { font-family: "Signature", cursive; font-size: 48px; letter-spacing: 0.12em; line-height: 1; margin-top: 0.4em !important; }

/* The app in six lines. */
.spec { padding-top: 120px; padding-bottom: 120px; }
.spec-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 56px; }
.spec-list li { padding: 28px 0 34px; border-top: 1px solid var(--rule); font-size: 18px; line-height: 1.5; color: var(--muted); }
.spec-list b { display: block; font-weight: 300; font-size: 40px; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 10px; }

/* Support, privacy and Impressum: a quiet reading column. */
.docs { max-width: 720px; margin: 0 auto; padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); }
.doc { padding: 90px 0 60px; border-top: 1px solid var(--rule); }
[id] { scroll-margin-top: 24px; }
.doc h2 { font-weight: 300; font-size: 44px; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 20px; }
.doc h3 { font-weight: 400; font-style: italic; font-size: 24px; margin: 1.8em 0 0.4em; }
.doc p { margin: 0 0 1em; }
.dated { margin-top: -8px !important; }
.legal { font-size: 18px; }
.legal h3 { margin-top: 2.2em; }
.doc h4 { font-weight: 400; font-size: 20px; margin: 1.6em 0 0.3em; }
.doc h5 { font-weight: 400; font-style: italic; font-size: 18px; margin: 1.3em 0 0.3em; }
.doc ul { margin: 0 0 1em; padding-left: 1.2em; }
.doc li { margin: 0 0 0.4em; }
.legal p, .legal li { overflow-wrap: break-word; hyphens: auto; }
.addr { color: var(--muted); }
.imprint { font-size: 18px; padding-bottom: 100px; }
.imprint h2 { font-size: 32px; }

.bottom { display: flex; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 44px; border-top: 1px solid var(--rule); }
.bottom nav { display: flex; gap: 28px; }
.bottom a { text-decoration: none; }

@media (prefers-color-scheme: dark) {
  .app-icon { box-shadow: 0 10px 36px rgba(205, 140, 95, 0.10); }
}

@media (max-width: 900px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); }
  .top .nav-l { display: none; }
  .top { grid-template-columns: auto 1fr; }
  .stage { gap: 36px; }
  .aside { font-size: 21px; }
  .letter { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .spec-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 56px; }
  .aside, .aside-l, .aside-r { text-align: center; font-size: 20px; }
  .aside-l { order: 0; }
}

@media (max-width: 640px) {
  body { font-size: 18px; }
  .wrap { padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
  .top { padding-top: 22px; padding-bottom: 22px; }
  .top nav { gap: 18px; }
  .top .hide-s { display: none; }
  .wordmark svg { width: 112px; }
  .hero { padding-top: 36px; padding-bottom: 72px; }
  .lead { font-size: 34px; }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 44px; }
  .aside, .aside-l, .aside-r { text-align: center; font-size: 20px; }
  .device { font-size: min(21px, 5.2vw); margin: 0 auto; }
  .avail { flex-direction: column; gap: 14px; }
  .avail-t { text-align: center; }
  .kinds { padding-top: 24px; padding-bottom: 96px; }
  .display { font-size: 38px; }
  .letter { padding-top: 72px; padding-bottom: 72px; }
  .coda { font-size: 58px; }
  .body { font-size: 19px; }
  .spec { padding-top: 72px; padding-bottom: 72px; }
  .spec-list { grid-template-columns: minmax(0, 1fr); }
  .spec-list b { font-size: 32px; }
  .docs { padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
  .doc { padding-top: 64px; }
  .doc h2 { font-size: 36px; }
  .bottom { flex-direction: column; }
}
@media (max-width: 360px) {
  .top .nav-r a { display: none; }
}
