/* taoquo — personal site for the two products.
 *
 * The vocabulary is the family's: an eyebrow, a large serif wordmark, a
 * numbered rail, product blocks made of type, hairlines and one screenshot
 * each. Every colour comes from tokens.json's roles[*].web; the audit reads
 * this file as a registered surface, so an unregistered value fails.
 * No webfont, no JavaScript.
 */

:root {
  --page: #f6f0ea;
  --card: #fbf7f3;
  --rule: #e6dacd;
  --ink: #191514;
  --ink-warm: #3a312d;
  --muted: #756a63;
  --accent: #b83d2e;
  --on-accent: #ffffff;

  --max: 1120px;
  --serif: "Source Serif 4", Charter, Georgia, "Songti SC", "Noto Serif CJK SC", "STSong", SimSun, Palatino, serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Songti SC", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 16px;
  top: 16px;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--rule);
  z-index: 10;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px clamp(20px, 5vw, 64px) 0;
}

.brandline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink-warm);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lang-switch a:hover:not(.active) {
  border-color: var(--accent);
  color: var(--ink);
}

.lang-switch a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.lang-switch .repo {
  width: 28px;
  height: 28px;
  padding: 0;
}

.lang-switch .repo svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* ---------- page ---------- */

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 8vh, 88px) clamp(20px, 5vw, 64px) 96px;
}

/* ---------- hero ---------- */

.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .n { color: var(--accent); }

.wordmark {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(64px, 11vw, 106px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -1.2px;
  color: var(--ink);
}

.tagline {
  margin: 0;
  max-width: 920px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
}

.tagline em {
  font-style: normal;
  color: var(--accent);
}

.hero-lede {
  margin: 18px 0 0;
  max-width: 58ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-warm);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.action {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink-warm);
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.action:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.action.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.action.primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
  border-color: transparent;
  color: var(--on-accent);
}

/* ---------- section rail ---------- */

.rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 36px 0 clamp(40px, 7vh, 64px);
  border-top: 1px solid var(--rule);
}

.rail a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--ink-warm);
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.rail a:last-child { border-right: none; }

.rail a:hover {
  background: var(--card);
  color: var(--ink);
}

.rail span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}

/* ---------- product blocks ---------- */

.product { scroll-margin-top: 24px; }

.product-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.product-detail { padding-top: 44px; }

.product + .product,
.about {
  margin-top: clamp(56px, 9vh, 88px);
  padding-top: clamp(32px, 5vh, 48px);
  border-top: 1px solid var(--rule);
}

.product-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 16px;
}

.product-mark {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.product-name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 50px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.product-lede {
  margin: 0;
  max-width: 24ch;
  font-family: var(--serif);
  font-size: clamp(19px, 2.1vw, 23px);
  font-weight: 500;
  line-height: 1.34;
  color: var(--ink);
  text-wrap: balance;
}

.product-text {
  margin: 0;
  max-width: 42ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-warm);
}

.features {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  max-width: 42ch;
  border-top: 1px solid var(--rule);
}

.features li {
  position: relative;
  padding: 9px 0 9px 24px;
  border-bottom: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-warm);
}

.features li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* ---------- figure ---------- */

.fig { margin: clamp(30px, 4.5vh, 44px) 0 0; }

.fig-frame {
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--card);
}

.fig-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

.fig-cap {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- about ---------- */

.about { scroll-margin-top: 24px; }

.about-title {
  margin: 0 0 18px;
  max-width: 26ch;
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0.1px;
  color: var(--ink);
  text-wrap: balance;
}

.about-body p {
  margin: 0 0 14px;
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-warm);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.about-links a {
  color: var(--ink-warm);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.about-links a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ---------- colophon ---------- */

.colophon {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(56px, 10vh, 96px);
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  .product-copy { grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 36rem; }
  .product-detail { padding-top: 0; }
  .product-lede,
  .product-text,
  .features { max-width: none; }
}

@media (max-width: 760px) {
  .page { padding-top: 32px; padding-bottom: 64px; }

  .wordmark { font-size: clamp(56px, 16vw, 84px); letter-spacing: -0.8px; }

  .rail { grid-template-columns: 1fr; margin: 28px 0 40px; }
  .rail a { border-right: none; }

  .fig-frame { padding: 7px; }

  .colophon { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .action,
  .lang-switch a,
  .rail a,
  .about-links a { transition: none; }
}
