@font-face { font-family: "Plex Sans"; src: url(/fonts/IBMPlexSans-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(/fonts/IBMPlexSans-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url(/fonts/IBMPlexSerif-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --ground: #eef1f6; --surface: #ffffff; --front: #16213a; --front-muted: #a9b4cc;
  --ink: #16213a; --text: #27324a; --muted: #5e6a82; --border: #dde2ec;
  --primary: #2f5bea; --ok-bg: #e3f4ea; --ok: #17663f; --bad-bg: #fbe7e4; --bad: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0e131f; --surface: #171e2e; --front: #223058; --ink: #eef1f8; --text: #d5dae6;
    --muted: #8e99b0; --border: #283248; --primary: #8fa8ff; --ok-bg: #12301f; --ok: #7fd6a4;
    --bad-bg: #3a1614; --bad: #f2a29b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 17px/1.6 "Plex Sans", system-ui, sans-serif; }
a { color: var(--primary); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.bar nav a { margin-left: 18px; color: var(--muted); text-decoration: none; font-size: 15px; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); }

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 40px 0 72px; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; }
.hero h1 { font: 400 clamp(36px, 5.4vw, 56px)/1.12 "Plex Serif", Georgia, serif; margin: 0 0 18px; letter-spacing: -.01em; }
.lede { font-size: 19px; color: var(--muted); max-width: 34em; margin: 0 0 28px; }
.play { display: inline-block; background: var(--front); color: #fff; text-decoration: none; font-weight: 600; padding: 14px 22px; border-radius: 12px; }
.play:hover { filter: brightness(1.15); }
.note { font-size: 14px; color: var(--muted); margin-top: 12px; }

/* The hero card: tap to turn it, as in the app */
.card { position: relative; width: 100%; max-width: 400px; aspect-ratio: 4 / 5; margin: 0 auto; perspective: 1400px; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; text-align: left; color: inherit; }
.card .face { position: absolute; inset: 0; border-radius: 24px; padding: 26px; backface-visibility: hidden; transition: transform .45s cubic-bezier(.65, 0, .35, 1); display: flex; flex-direction: column; }
.card .front { background: var(--front); color: #fff; }
.card .back { background: var(--surface); border: 1px solid var(--border); transform: rotateY(180deg); }
.card[aria-pressed="true"] .front { transform: rotateY(-180deg); }
.card[aria-pressed="true"] .back { transform: rotateY(0); }
.kicker { font-size: 14px; font-weight: 600; color: var(--front-muted); }
.back .kicker { color: var(--primary); }
.front .phrase { margin-top: auto; font: 400 34px/1.22 "Plex Serif", Georgia, serif; }
.front .hint { margin-top: 24px; font-size: 14px; color: var(--front-muted); }
.diff { margin: 16px 0 0; padding: 10px 12px; border-radius: 12px; font: 400 18px/1.35 "Plex Serif", Georgia, serif; display: flex; gap: 10px; }
.diff b { font: 600 18px/1.35 "Plex Sans", sans-serif; }
.diff.bad { background: var(--bad-bg); color: var(--bad); }
.diff.bad span { text-decoration: line-through; }
.diff.ok { background: var(--ok-bg); color: var(--ok); font-size: 20px; }
.back h3 { margin: 18px 0 2px; font-size: 14px; color: var(--muted); }
.back p { margin: 0; font-size: 16px; line-height: 1.5; }

.kinds { padding: 8px 0 64px; }
.kinds h2, .shots h2 { font: 400 30px/1.2 "Plex Serif", Georgia, serif; margin: 0 0 8px; }
.kinds > p { color: var(--muted); margin: 0 0 24px; max-width: 40em; }
.kinds ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.kinds li { padding: 18px 20px; border-top: 1px solid var(--border); }
.kinds li:nth-child(-n+2) { border-top: 0; }
.kinds li:nth-child(odd) { border-right: 1px solid var(--border); }
.kinds strong { display: block; color: var(--ink); font: 400 19px/1.3 "Plex Serif", Georgia, serif; }
.kinds span { font-size: 15px; color: var(--muted); }

.shots { padding: 0 0 72px; }
.shots .row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.shot { margin: 0; }
.shot img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border); display: block; }
.shot figcaption { font-size: 15px; color: var(--muted); margin-top: 10px; }

.video { padding: 0 0 72px; }
.video h2 { font: 400 30px/1.2 "Plex Serif", Georgia, serif; margin: 0 0 20px; }
.video .player, .video iframe { display: block; width: 100%; max-width: 360px; aspect-ratio: 9 / 16; border: 0; border-radius: 18px; overflow: hidden; padding: 0; position: relative; cursor: pointer; background: var(--front); }
.video .player img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-icon { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: rgba(22, 33, 58, .82); }
.play-icon::after { content: ""; position: absolute; left: 31px; top: 24px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff; }

.closing { background: var(--front); color: #fff; border-radius: 24px; padding: 40px 32px; margin-bottom: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.closing h2 { color: #fff; font: 400 28px/1.25 "Plex Serif", Georgia, serif; margin: 0; max-width: 20em; }
.closing .play { background: #fff; color: var(--front); }

.doc { max-width: 720px; padding: 16px 0 64px; }
.doc h1 { font: 400 40px/1.15 "Plex Serif", Georgia, serif; margin: 8px 0 8px; }
.doc h2 { font-size: 20px; margin: 32px 0 6px; }
.doc .meta { color: var(--muted); font-size: 15px; }

footer { border-top: 1px solid var(--border); padding: 24px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 16px; }
  .shots .row { grid-template-columns: minmax(0, 1fr); max-width: 340px; }
  .kinds ul { grid-template-columns: minmax(0, 1fr); }
  .kinds li:nth-child(2) { border-top: 1px solid var(--border); }
  .kinds li:nth-child(odd) { border-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .card .face { transition: none; } }
