@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;1,8..60,300&display=swap');

:root {
  --bg: #f5f4f0;
  --bg2: #eceae3;
  --black: #111110;
  --accent: #d4351c;
  --text: #1a1917;
  --text-mid: #5a5852;
  --text-dim: #9a9590;
  --border: rgba(17,17,16,0.1);
  --sans: 'Syne', system-ui, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 860px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
main { flex: 1; }

/* ── HEADER ── */
header {
  background: var(--black);
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.logo-text span {
  display: block;
  font-weight: 400;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
}

/* ── LANG SWITCHER ── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 3px;
}
.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}
.lang-btn.active {
  background: var(--accent);
  color: #fff;
}
.lang-btn:hover:not(.active) {
  color: rgba(255,255,255,0.85);
}

/* ── NAV STRIP ── */
.nav-strip {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 0 40px;
  display: flex;
  gap: 0;
}
.nav-link {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 10px 20px 10px 0;
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}
.nav-link:hover { color: rgba(255,255,255,0.75); }
.nav-link.active { color: #fff; }
.nav-link.active::after { width: calc(100% - 20px); }

/* ── HERO BAND ── */
.page-band {
  background: var(--black);
  padding: 48px 40px 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.page-band-left {}
.page-band-eyebrow {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.page-band h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.page-band-meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  text-align: right;
  line-height: 1.7;
  flex-shrink: 0;
}

/* ── CONTENT ── */
.content-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 40px 80px;
}

/* ── HOME GRID ── */
.home-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 64px 40px 80px;
}
.home-intro {
  margin-bottom: 48px;
  max-width: 560px;
}
.home-intro h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}
.home-intro p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.7;
}

.doc-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.doc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
  cursor: pointer;
}
.doc-card:hover {
  box-shadow: 0 8px 32px rgba(17,17,16,0.1);
  transform: translateY(-3px);
}
.doc-card-icon {
  width: 44px; height: 44px;
  background: var(--bg2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.doc-card h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.doc-card p {
  font-size: 0.84rem;
  color: var(--text-mid);
  line-height: 1.65;
  flex: 1;
}
.doc-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s;
}
.doc-card:hover .doc-card-link { gap: 10px; }

/* ── APP INFO STRIP ── */
.app-strip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}
.app-strip-icon {
  width: 48px; height: 48px;
  background: var(--black);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--sans);
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}
.app-strip-info { flex: 1; }
.app-strip-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.app-strip-bundle {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.app-strip-badge {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 100px;
  flex-shrink: 0;
}

/* ── DOCUMENT TYPOGRAPHY ── */
.doc-body { font-size: 0.92rem; color: var(--text); }

.doc-body h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 44px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.doc-body h2:first-child { margin-top: 0; }

.doc-body p { margin-bottom: 14px; color: var(--text-mid); line-height: 1.8; }

.doc-body ul, .doc-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.doc-body li { color: var(--text-mid); margin-bottom: 6px; line-height: 1.7; }

.doc-body strong { color: var(--text); font-weight: 600; }

.doc-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }

.doc-body .info-box {
  background: var(--bg2);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
  margin: 20px 0;
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.7;
}
.doc-body .info-box strong { display: block; color: var(--text); margin-bottom: 4px; }

.effective-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 32px;
}
.effective-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── TABLE OF CONTENTS ── */
.toc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 40px;
}
.toc-title {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.toc ol {
  padding-left: 16px;
  list-style: decimal;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
}
.toc li { font-size: 0.8rem; color: var(--text-mid); }
.toc a { color: var(--text-mid); transition: color 0.2s; }
.toc a:hover { color: var(--accent); }

/* ── FOOTER ── */
footer {
  background: var(--black);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-legal {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
}
.footer-legal strong {
  display: block;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2px;
  font-weight: 500;
}
.footer-contact {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-align: right;
}
.footer-contact a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-contact a:hover { color: #fff; }

/* ── LANG SECTIONS ── */
[data-lang] { display: none; }
[data-lang].visible { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  header { padding: 0 20px; }
  .nav-strip { padding: 0 20px; }
  .page-band { padding: 36px 20px 32px; flex-direction: column; align-items: flex-start; }
  .page-band-meta { text-align: left; }
  .content-wrap { padding: 40px 20px 60px; }
  .home-wrap { padding: 40px 20px 60px; }
  .doc-cards { grid-template-columns: 1fr; }
  .toc ol { grid-template-columns: 1fr; }
  footer { padding: 24px 20px; flex-direction: column; }
  .footer-contact { text-align: left; }
}
