/* Twinread: stylesheet for every page of the site.
 * Tokens are the ones in apps/translator/src/ui/theme.css (accent blue, twin teal, Geist and Newsreader, light and dark). */

@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/Geist-latin.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/Newsreader-latin.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --ink: #141a2a;
  --muted: #586176;
  --line: #dde1eb;
  --soft: #edf0f7;
  --accent: #2b59c3;
  --accent-hover: #2249a3;
  --accent-ink: #ffffff;
  --accent-soft: #e4ebfb;
  --twin: #0f8b8d;
  --twin-soft: #dcf1f0;
  --hero-top: #1d3d91;
  --hero-bottom: #132a6b;
  --hero-sub: #c9d6f5;
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --shadow: 0 1px 2px rgba(20, 26, 42, 0.06), 0 12px 32px rgba(20, 26, 42, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e121c;
    --surface: #161c2a;
    --ink: #e8ecf6;
    --muted: #98a2b9;
    --line: #283047;
    --soft: #131826;
    --accent: #8aa8ff;
    --accent-hover: #a5bcff;
    --accent-ink: #0c1121;
    --accent-soft: #1f2a4a;
    --twin: #4fd1c5;
    --twin-soft: #16302f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip:focus { top: 12px; color: var(--accent-ink); }
.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; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); line-height: 1.08; font-weight: 450; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.7vw, 2.4rem); line-height: 1.15; margin-bottom: 12px; }
h3 { font-size: 1.35rem; line-height: 1.25; }
p { margin: 0; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand img { border-radius: 7px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 6px 0; }
.nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 0.3em; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.quiet:hover { background: var(--soft); border-color: var(--accent); color: var(--ink); }

/* hero */
.hero { background: linear-gradient(180deg, var(--hero-top), var(--hero-bottom)); color: #fff; padding: 56px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .lede { font-size: 1.2rem; line-height: 1.55; color: var(--hero-sub); max-width: 34rem; margin-bottom: 28px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.hero .btn { background: #fff; border-color: #fff; color: #10245e; }
.hero .btn:hover { background: #e4ebfb; border-color: #e4ebfb; color: #10245e; }
.hero a:not(.btn) { color: #fff; font-weight: 500; }
.hero :focus-visible { outline-color: #fff; }
.hero .cta-note { margin-top: 18px; font-size: 0.95rem; color: var(--hero-sub); }

.shot { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.shot img { width: 100%; }
.hero .shot { border-color: rgba(255, 255, 255, 0.25); box-shadow: 0 24px 60px rgba(4, 12, 40, 0.45); }

/* sections */
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
section.ground { background: var(--soft); }
.rule { display: block; width: 30px; height: 4px; border-radius: 2px; background: var(--accent); margin-bottom: 8px; position: relative; }
.rule::after { content: ""; position: absolute; left: 0; top: 8px; width: 19px; height: 4px; border-radius: 2px; background: var(--twin); }
.rule + h2 { margin-top: 20px; }
.sub { color: var(--muted); font-size: 1.1rem; max-width: 42rem; margin-bottom: 28px; }

.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.feature.flip .shot { order: -1; }
.feature.narrow { grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr); }
.feature.narrow .shot { max-width: 400px; justify-self: center; width: 100%; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink); max-width: 36rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 3px; background: var(--twin); }

/* the four looks, drawn in CSS */
.looks-title { font-size: 1.05rem; font-family: var(--font); font-weight: 650; margin: 32px 0 12px; letter-spacing: 0; }
.looks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.look { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.9rem; line-height: 1.4; }
.look b { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.look .t { display: block; margin-top: 4px; }
.look.subtle .t { color: var(--muted); }
.look.underline .t { text-decoration: underline; text-decoration-color: var(--twin); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.look.highlight .t { background: var(--twin-soft); border-radius: 4px; padding: 1px 4px; }
.look.dim .o { color: var(--muted); }

/* pricing */
.price-table { width: 100%; max-width: 860px; border-collapse: collapse; table-layout: fixed; }
.price-table th, .price-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; font-weight: 400; }
.price-table th:first-child, .price-table td:first-child { padding-left: 0; width: 42%; }
.price-table thead th { font-size: 0.95rem; color: var(--muted); font-weight: 650; }
.price-table tbody th { font-weight: 500; }
.price-table .yes { color: var(--accent); font-weight: 600; }
.price-table .no { color: var(--muted); }
.price-table tfoot th, .price-table tfoot td { border-bottom: 0; padding-top: 22px; }
.price { font-family: var(--serif); font-size: 2rem; line-height: 1.1; margin: 0 0 4px; font-variant-numeric: lining-nums; }
.price small { font-family: var(--font); font-size: 0.9rem; color: var(--muted); }
.price-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
.price-table .btn { display: flex; width: 100%; max-width: 240px; margin: 0 0 8px; }
.table-note { color: var(--muted); max-width: 46rem; margin-top: 20px; }

/* faq */
.faq { max-width: 46rem; margin: 24px 0 0; }
.faq dt { font-weight: 650; font-size: 1.1rem; margin-top: 24px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 6px 0 0; color: var(--muted); }
.faq dd + dd { margin-top: 8px; }

/* footer */
.site-footer { padding: 48px 0 0; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 28px 64px; padding-bottom: 28px; }
.footer-col h2 { font-family: var(--font); font-size: 0.95rem; font-weight: 650; letter-spacing: 0; margin: 0 0 8px; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; }
.trademark { border-top: 1px solid var(--line); padding: 18px 0 40px; color: var(--muted); font-size: 0.85rem; }

/* privacy policy and other text pages */
main.doc { max-width: 760px; margin: 0 auto; padding-top: 48px; padding-bottom: 72px; }
.doc h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); margin-bottom: 16px; }
.doc h2 { font-size: 1.5rem; margin: 36px 0 10px; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
.doc a { overflow-wrap: anywhere; }

/* 404 */
.notfound { padding-top: 88px; padding-bottom: 96px; max-width: 720px; margin: 0 auto; }
.notfound h1 { margin-bottom: 12px; }
.notfound p { color: var(--muted); font-size: 1.15rem; margin-bottom: 28px; }
.notfound .cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 900px) {
  .hero { padding: 40px 0 48px; }
  .hero .wrap, .feature, .feature.narrow { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .feature.flip .shot { order: 0; }
  section { padding: 56px 0; }
}

@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  body { font-size: 16px; }
  .hero .lede { font-size: 1.1rem; }
  .looks { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero .btn { width: 100%; }

  /* the pricing table stacks: one block per feature, then one block per plan */
  .price-table, .price-table tbody, .price-table tfoot, .price-table tr, .price-table th, .price-table td { display: block; width: 100%; max-width: none; }
  .price-table thead { display: none; }
  .price-table tbody tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .price-table th, .price-table td, .price-table th:first-child, .price-table td:first-child { padding: 0; border: 0; width: 100%; }
  .price-table tbody th { font-weight: 600; margin-bottom: 6px; }
  .price-table tbody td { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; }
  .price-table tbody td::before { content: attr(data-label); color: var(--muted); font-weight: 400; }
  .price-table tfoot tr { padding: 20px 0 0; }
  .price-table tfoot th, .price-table tfoot th:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }
  .price-table tfoot td { padding: 0 0 20px; }
  .price-table tfoot td::before { content: attr(data-label); display: block; font-size: 0.85rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
  .price-table tfoot .btn { display: flex; width: 100%; margin: 0 0 8px; }
}
