/* Copience house site · VI v1.0 tokens · Dagora-site rhythm, not Dagora palette */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..600&family=Noto+Serif+SC:wght@300;400;500;600&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --melas: #100D0B;
  --melas-2: #181310;
  --ostrakon: #EFE6D5;
  --ostrakon-2: #CBBFA9;
  --chrysos: #C9A227;
  --chrysos-2: #E8C55C;
  --erythra: #8E1F2C;
  --phlox: #C6402F;
  --ash: #7C7264;

  --bg: var(--melas);
  --bg-alt: var(--melas-2);
  --ink: var(--ostrakon);
  --ink-2: var(--ostrakon-2);
  --ink-3: var(--ash);
  --accent: var(--chrysos);
  --accent-2: var(--chrysos-2);
  --accent-soft: rgba(201, 162, 39, 0.12);
  --accent-line: rgba(201, 162, 39, 0.48);
  --hair: rgba(239, 230, 213, 0.14);
  --hair-2: rgba(239, 230, 213, 0.07);
  --card: #181310;
  --card-2: #1e1914;

  --serif: 'Fraunces', Georgia, serif;
  --cn: 'Noto Serif SC', 'Songti SC', serif;
  --mono: 'Space Mono', ui-monospace, monospace;

  --maxw: 1180px;
  --gutter: clamp(22px, 5vw, 48px);
  --nav-h: 76px;
  --radius: 2px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--cn);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--chrysos); color: var(--melas); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); width: 100%; }
.band { padding-block: clamp(76px, 11vw, 140px); }
.band.alt { background: var(--bg-alt); }
.band.hair-top { border-top: 1px solid var(--hair); }

.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.gr { color: var(--accent); }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.kicker .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  flex: none;
}

.display {
  font-family: var(--serif);
  font-weight: 340;
  font-optical-sizing: auto;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: 0.01em;
}
.h2 {
  font-family: var(--cn);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.25;
  letter-spacing: 0.06em;
}
.lede {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 36em;
}
.body-lg {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 2.05;
  color: var(--ink-2);
  max-width: 46em;
}
.body-lg strong, .lede strong { color: var(--ink); font-weight: 500; }

.section-head { display: flex; flex-direction: column; gap: 20px; max-width: 40em; }

.meander {
  height: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='20'><path d='M1 19 V5 H21 V13 H9 V9 H15' fill='none' stroke='rgba(239,230,213,0.25)' stroke-width='2'/></svg>");
  background-repeat: repeat-x;
}

.btns { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 22px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  color: var(--accent);
  background: transparent;
  transition: background .32s, border-color .32s, color .32s;
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--melas); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); color: var(--melas); }
.btn-ghost { border-color: transparent; color: var(--ink-2); padding-inline: 8px; }
.btn-ghost:hover { color: var(--ink); background: transparent; }

.textlink {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 3px;
}
.textlink:hover { border-color: var(--accent); gap: 12px; }

/* nav — solid, no glass */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .32s, border-color .32s;
}
.nav.scrolled {
  background: var(--melas);
  border-bottom-color: var(--hair);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand .logomark { width: 36px; height: 38px; flex: none; }
.brand .wordmark {
  font-family: var(--serif);
  font-weight: 340;
  font-size: 26px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 8px 14px;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.lang {
  margin-left: 10px;
  border: 1px solid var(--hair);
  letter-spacing: 0.12em;
}
.nav-links a.lang:hover { border-color: var(--accent-line); color: var(--accent); }
.nav-toggle { display: none; }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 99;
  background: var(--melas);
  border-top: 1px solid var(--hair);
  padding: 24px var(--gutter);
  display: flex; flex-direction: column;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu a {
  font-size: 22px; font-weight: 400; color: var(--ink-2);
  padding: 16px 4px; border-bottom: 1px solid var(--hair-2);
}

.helps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); }
.help {
  background: var(--bg);
  padding: 40px 32px 36px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 180px;
  justify-content: center;
}
.help .hn { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.help .ht { font-size: clamp(18px, 1.8vw, 22px); font-weight: 400; line-height: 1.45; color: var(--ink); letter-spacing: 0.04em; }
.help .hp { font-size: 15.5px; line-height: 1.85; color: var(--ink-2); }

.stalls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--hair); }
.stall {
  background: var(--bg);
  padding: clamp(36px, 5vw, 56px);
  display: flex; flex-direction: column; gap: 18px;
  min-height: 360px;
}
.stall.gdai { box-shadow: inset 4px 0 0 var(--phlox); }
.stall.dagora { box-shadow: inset 4px 0 0 var(--erythra); }
.stall.sunyata { box-shadow: inset 4px 0 0 var(--ash); }
.stall .sn { font-family: var(--mono); font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent); }
.stall.gdai .sn { color: var(--phlox); }
.stall.dagora .sn { color: #d47882; }
.stall.sunyata .sn { color: var(--ash); }
.stall h3 { font-family: var(--serif); font-weight: 340; font-size: clamp(32px, 4vw, 44px); letter-spacing: 0.01em; }
.stall p { color: var(--ink-2); font-size: 16.5px; line-height: 1.9; max-width: 36em; }
.stall .role { font-size: 17px; color: var(--ink); letter-spacing: 0.04em; }

.cite-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cite-box { padding: 32px 30px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--hair); }
.cite-box.yes { border-color: var(--accent-line); background: var(--accent-soft); }
.cite-box .cl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.cite-box.no .cl { color: var(--ink-3); }
.cite-box .ct { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; }
.cite-box .cp { font-size: 15.5px; line-height: 1.8; color: var(--ink-2); }

.essay { max-width: 46em; }
.essay p { font-size: clamp(17px, 1.6vw, 20px); line-height: 2.05; color: var(--ink-2); margin-top: 28px; }
.essay p strong { color: var(--ink); font-weight: 500; }
.essay p em { font-style: italic; font-family: var(--serif); color: var(--accent-2); }
.essay h3 {
  font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--hair);
}
.pull {
  font-family: var(--serif); font-weight: 340; font-style: italic;
  font-size: clamp(24px, 2.8vw, 34px); line-height: 1.3;
  color: var(--ink); margin: clamp(48px, 7vw, 80px) auto; max-width: 18em; text-align: center;
}
.site-footer { border-top: 1px solid var(--hair); padding-block: clamp(64px, 8vw, 104px) 48px; }
.footer-close {
  font-family: var(--serif); font-weight: 340; font-style: italic;
  font-size: clamp(30px, 4.4vw, 52px); line-height: 1.2;
  max-width: 16em;
}
.footer-grid {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px;
  margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--hair);
}
.footer-brand p { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ink-3); margin-top: 12px; }
.footer-cols { display: flex; gap: clamp(40px, 7vw, 80px); }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col .ft-h { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.footer-col a { font-size: 15px; color: var(--ink-2); }
.footer-col a:hover { color: var(--accent); }
.footer-col a[aria-current="page"] { color: var(--ink); }
.footer-base {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--hair-2);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .64s ease, transform .64s ease; }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  [data-cursor] { animation: none !important; }
  html { scroll-behavior: auto; }
}

@keyframes omBlink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

@media (max-width: 1100px) {
  .stalls { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
  }
  .nav-toggle span { width: 24px; height: 1.5px; background: var(--ink); }
  .helps, .stalls, .cite-pair { grid-template-columns: 1fr; }
  .footer-cols { flex-direction: column; gap: 28px; }
}
@media (min-width: 881px) { .mobile-menu { display: none; } }
