/* Therisma web style. Type on warm white. No panels, cards, pills, gradients or shadows.
   Full spec: docs/design/therisma-web-style.md */
:root {
  --bg: #f8f7f3; --ink: #1c1f26; --head: #14213d; --muted: #565a63; --faint: #666a72; --line: #d9d7d0; --brand: #14213d; --on-brand: #f8f7f3;
  --f-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --f-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-greek: 'Gentium Book Plus', 'Gentium Plus', 'Noto Serif', Georgia, serif;
  --gl: max(24px, env(safe-area-inset-left)); --gr: max(24px, env(safe-area-inset-right));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1218; --ink: #e9eaee; --head: #dfe6f3; --muted: #a9adb7; --faint: #8d929c; --line: #2a303b; --brand: #c4d1ea; --on-brand: #0e1218;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1218; --ink: #e9eaee; --head: #dfe6f3; --muted: #a9adb7; --faint: #8d929c; --line: #2a303b; --brand: #c4d1ea; --on-brand: #0e1218;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
main { flex: 1 0 auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }

/* Top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: max(20px, env(safe-area-inset-top)); padding-bottom: 20px; }
.wordmark { font-family: var(--f-display); font-size: 30px; line-height: 1; letter-spacing: -0.01em; color: var(--brand); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.nav { display: flex; gap: 28px; }
.navlink { font-size: 15px; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; min-height: 44px; border-bottom: 1px solid transparent; }
.navlink:hover, .navlink[aria-current="page"] { border-bottom-color: currentColor; }

/* Type */
.label { font-size: 12px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint); margin: 0; }
h1 { font-family: var(--f-display); font-weight: 400; color: var(--head); font-size: clamp(40px, 8.4vw, 92px); line-height: 1.04; letter-spacing: -0.022em; margin: 0 auto; }
.lede { font-size: clamp(18px, 2vw, 20px); line-height: 1.55; color: var(--muted); max-width: 32em; margin: 28px auto 0; }

/* Buttons: one per screen, square corners, no shadow */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; font: 500 15px/1 var(--f-body); text-decoration: none; color: var(--brand); background: transparent; border: 1px solid var(--brand); border-radius: 2px; cursor: pointer; transition: background-color .15s, color .15s; }
.btn:hover { background: var(--brand); color: var(--on-brand); }
.actions { margin-top: 40px; }

/* Home */
.hero { text-align: center; padding-top: clamp(56px, 11vw, 132px); padding-bottom: clamp(72px, 12vw, 148px); }
.hero .label { margin-bottom: 28px; }
.name { text-align: center; max-width: 640px; margin: 0 auto; padding-bottom: clamp(88px, 13vw, 160px); }
.word { font-family: var(--f-greek); font-size: clamp(60px, 11vw, 112px); line-height: 1.1; color: var(--head); margin: 18px 0 6px; }
.gloss { color: var(--muted); max-width: 30em; margin: 0 auto; }
.rule { width: 72px; height: 0; border: 0; border-top: 1px solid var(--line); margin: 48px auto; }
blockquote { margin: 0; }
.greek, .english { font-style: italic; font-size: clamp(21px, 2.8vw, 27px); line-height: 1.45; color: var(--ink); margin: 0; }
.greek { font-family: var(--f-greek); }
.english { font-family: var(--f-display); margin-top: 14px; }
cite { display: block; font-style: normal; font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-top: 24px; }

/* Contact */
.contact { text-align: center; padding-top: clamp(56px, 10vw, 120px); padding-bottom: clamp(64px, 10vw, 120px); }
.contact .label { margin-bottom: 28px; }
.facts { max-width: 760px; margin: clamp(64px, 9vw, 104px) auto 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); text-align: left; }
.facts li { padding: 24px 24px 0 0; }
.facts h2 { font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.facts p { margin: 0; color: var(--muted); font-size: 16px; }
.facts a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line); }

/* Footer */
.foot { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; padding-bottom: max(32px, env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); }
.foot a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }

/* iPad landscape, large iPad portrait and desktop: Harvey-style split layout */
@media (min-width: 900px) {
  :root { --gl: max(48px, env(safe-area-inset-left)); --gr: max(48px, env(safe-area-inset-right)); }
  .wrap { max-width: 1280px; }
  .bar { padding-top: max(28px, env(safe-area-inset-top)); padding-bottom: 28px; }
  .wordmark { font-size: 32px; }
  .navlink { font-size: 16px; }

  .hero { display: grid; grid-template-columns: 1.5fr 1fr; column-gap: clamp(48px, 6vw, 96px); align-items: end; text-align: left; padding-top: clamp(88px, 11vw, 168px); padding-bottom: clamp(104px, 12vw, 176px); }
  .hero h1 { font-size: clamp(56px, 6.4vw, 100px); margin: 0; }
  .hero-side { padding-bottom: 0.4em; }
  .hero .lede { margin: 0; max-width: 28em; font-size: 20px; }
  .hero .actions { margin-top: 32px; }

  .name { max-width: 1280px; display: grid; grid-template-columns: 1fr 1px 1fr; column-gap: clamp(48px, 6vw, 96px); align-items: center; text-align: left; border-top: 1px solid var(--line); padding-top: clamp(88px, 10vw, 144px); padding-bottom: clamp(96px, 11vw, 160px); }
  .word { font-size: clamp(88px, 9vw, 140px); margin: 20px 0 16px; }
  .gloss { margin: 0; max-width: 26em; font-size: 18px; }
  .rule { width: 1px; height: auto; align-self: stretch; border-top: 0; border-left: 1px solid var(--line); margin: 0; }
  .greek, .english { font-size: clamp(23px, 2vw, 28px); text-wrap: balance; }
  .english { margin-top: 18px; }
  cite { margin-top: 28px; }

  .contact .facts { grid-column: 1 / -1; max-width: none; margin-top: clamp(96px, 10vw, 144px); }
  .facts li { padding: 28px 48px 0 0; }
  .facts p { font-size: 17px; }
}

/* iPad portrait and smaller */
@media (max-width: 820px) {
  .facts { grid-template-columns: 1fr; text-align: center; }
  .facts li { padding: 24px 0 0; }
}
/* iPhone */
@media (max-width: 600px) {
  :root { --gl: max(20px, env(safe-area-inset-left)); --gr: max(20px, env(safe-area-inset-right)); }
  body { font-size: 16px; }
  .wordmark { font-size: 27px; }
  .nav { gap: 20px; }
  .foot { flex-direction: column; align-items: center; text-align: center; }
  .btn { width: 100%; max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
