/* ── Tokens ── */
:root {
  --paper: #F4F1EB;
  --paper-2: #EBE7DE;
  --ink: #1B1814;
  --ink-2: rgba(27,24,20,0.62);
  --ink-3: rgba(27,24,20,0.40);
  --ink-4: rgba(27,24,20,0.20);
  --rule: rgba(27,24,20,0.14);
  --accent: #5BB8FF;
  --accent-ink: #1F5F92;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; }

/* ── Layout ── */
.frame { max-width: 1240px; margin: 0 auto; padding: 0 64px; }

/* ── Masthead ── */
.masthead { padding: 30px 0 28px; }
.mast { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none; line-height: 1;
}
.brand .dim { color: rgba(27,24,20,0.40); }
.nav-links { display: flex; gap: 34px; align-items: baseline; }
.nav-links a {
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  color: var(--ink); text-decoration: none;
  position: relative; letter-spacing: -0.005em;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: right;
  transition: transform 280ms cubic-bezier(.4,.6,.2,1);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ── Homepage hero ── */
.hero {
  padding: 110px 0 110px;
  display: grid; grid-template-columns: repeat(12,1fr); gap: 24px; align-items: end;
}
.hero h1 {
  grid-column: 1 / span 9;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(48px,7vw,108px); line-height: 0.96; letter-spacing: -0.04em;
  color: var(--ink); margin: 0; text-wrap: balance;
}
.hero h1 .soft { font-weight: 300; color: var(--ink-2); }
.hero-lede {
  grid-column: 6 / span 6; margin-top: 48px;
  font-family: var(--font-body); font-size: 18px; line-height: 1.66;
  color: var(--ink); font-weight: 400; max-width: 54ch;
}
.hero-lede + .hero-lede { margin-top: 18px; color: var(--ink-2); }

/* ── Homepage sections ── */
.section { padding: 64px 0; border-top: 1px solid var(--ink); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  margin-bottom: 48px;
}
.section-head .label { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); letter-spacing: -0.005em; }
.section-head .aux { font-family: var(--font-body); font-size: 13px; color: var(--ink-3); font-weight: 400; }

/* ── Product entry ── */
.entry { display: grid; grid-template-columns: repeat(12,1fr); gap: 24px; align-items: start; padding-bottom: 8px; }
.entry-mark { grid-column: 1 / span 5; display: flex; align-items: center; gap: 18px; }
.entry-mark .mark-tile {
  width: 52px; height: 52px; border-radius: 12px; background: #0E0B08;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; box-shadow: 0 1px 0 rgba(27,24,20,0.06);
}
.entry-mark .mark-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry-name {
  font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 44px;
  letter-spacing: -2px; line-height: 1; color: var(--ink); margin: 0;
}
.entry-name .accent { color: var(--accent); }
.entry-body { grid-column: 7 / span 5; display: flex; flex-direction: column; gap: 20px; }
.entry-summary { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--ink); max-width: 56ch; font-weight: 400; }
.entry-meta { font-family: var(--font-body); font-size: 13px; color: var(--ink-2); font-weight: 400; }
.entry-link {
  font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--ink-4); padding-bottom: 3px;
  align-self: flex-start; white-space: nowrap;
  transition: border-color 200ms, color 200ms;
}
.entry-link:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.entry-link .arr { transition: transform 200ms; }
.entry-link:hover .arr { transform: translateX(3px); }

/* ── Contact section ── */
.contact-grid { display: grid; grid-template-columns: repeat(12,1fr); gap: 24px; }
.contact-block { grid-column: 1 / span 8; display: flex; flex-direction: column; }
.contact-row {
  display: grid; grid-template-columns: 280px 1fr; gap: 24px;
  padding: 20px 0; border-top: 1px solid var(--rule); align-items: baseline;
}
.contact-row:last-child { border-bottom: 1px solid var(--rule); }
.contact-row .label { font-family: var(--font-body); font-size: 14px; color: var(--ink-2); font-weight: 400; }
.contact-row .value { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.contact-row .value a { text-decoration: none; color: inherit; border-bottom: 1px solid var(--ink-4); padding-bottom: 2px; transition: border-color 200ms; }
.contact-row .value a:hover { border-color: var(--ink); }

/* ── Footer ── */
.foot {
  padding: 42px 0 40px; border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: 1fr auto; gap: 24px 32px; align-items: end;
  font-family: var(--font-body); font-size: 12.5px; color: var(--ink-2);
}
.foot .brand-line { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.foot .brand-line .fb-name { font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--ink); letter-spacing: -0.015em; }
.foot .brand-line .fb-name .dim { color: rgba(27,24,20,0.40); }
.foot .brand-line .sep { color: var(--ink-4); }
.foot .brand-line span:not(.fb-name):not(.sep) { color: var(--ink-3); font-size: 12px; }
.foot .legal { display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; }
.foot .legal a { color: var(--ink-2); text-decoration: none; transition: color 200ms; }
.foot .legal a:hover { color: var(--ink); }

/* ── 404 page ── */
.err-page { min-height: 100vh; display: flex; flex-direction: column; }
.err-main {
  flex: 1; display: grid; grid-template-columns: repeat(12,1fr); gap: 24px;
  align-items: start; padding: 80px 0 96px;
}
.err-code {
  grid-column: 1 / span 7;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(160px,22vw,320px); line-height: 0.86; letter-spacing: -0.05em;
  color: var(--ink); margin: 0;
}
.err-body { grid-column: 8 / span 5; padding-top: 38px; display: flex; flex-direction: column; }
.err-tag { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink); letter-spacing: -0.005em; margin-bottom: 6px; }
.err-tag .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin-right: 8px; transform: translateY(-1px); }
.err-body h1 { font-family: var(--font-display); font-weight: 700; font-size: 38px; letter-spacing: -0.03em; line-height: 1.04; color: var(--ink); margin: 14px 0 18px; }
.err-body p { font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: var(--ink-2); font-weight: 400; max-width: 42ch; margin-bottom: 38px; }
.err-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.btn-back {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--ink-4); padding-bottom: 3px;
  display: inline-flex; align-items: center; gap: 8px; letter-spacing: -0.005em;
  transition: border-color 200ms;
}
.btn-back:hover { border-color: var(--ink); }
.btn-back .arr { transition: transform 200ms; display: inline-block; }
.btn-back:hover .arr { transform: translateX(-3px); }
.btn-secondary { font-family: var(--font-body); font-size: 14px; font-weight: 400; color: var(--ink-2); text-decoration: none; transition: color 200ms; }
.btn-secondary:hover { color: var(--ink); }
.err-footer { border-top: 1px solid var(--rule); padding: 32px 0 36px; }

/* ── Document layout (privacy, terms) ── */
.doc-layout {
  display: grid; grid-template-columns: repeat(12,1fr); gap: 24px;
  padding: 72px 0 96px;
}
.doc-head {
  grid-column: 1 / span 12;
  border-top: 1px solid var(--ink); padding-top: 18px;
  display: grid; grid-template-columns: repeat(12,1fr); gap: 24px;
  margin-bottom: 72px;
}
.doc-head h1 {
  grid-column: 1 / span 8;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(40px,5.2vw,76px); line-height: 0.98; letter-spacing: -0.035em;
  color: var(--ink);
}
.doc-head-meta {
  grid-column: 10 / span 3;
  font-family: var(--font-body); font-size: 13px; line-height: 1.7; color: var(--ink-3);
  display: flex; flex-direction: column; gap: 4px;
}
.doc-head-meta b { color: var(--ink); font-weight: 600; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.doc-toc {
  grid-column: 1 / span 3;
  position: sticky; top: 24px; align-self: start;
}
.doc-toc h4 { font-family: var(--font-display); font-weight: 600; font-size: 12px; color: var(--ink); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.doc-toc ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.doc-toc li { border-bottom: 1px solid var(--rule); }
.doc-toc a { display: flex; gap: 10px; padding: 8px 0; font-size: 12.5px; color: var(--ink-2); text-decoration: none; transition: color 200ms; line-height: 1.4; }
.doc-toc a:hover { color: var(--ink); }
.doc-toc a .toc-num { font-family: var(--font-display); color: var(--ink-3); font-weight: 500; min-width: 18px; }
.doc-body { grid-column: 5 / span 8; max-width: 64ch; }
.doc-body .doc-lede { font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1.45; color: var(--ink); margin-bottom: 48px; letter-spacing: -0.015em; }
.doc-body section { margin-bottom: 42px; }
.doc-body section:last-of-type { margin-bottom: 0; }
.doc-body h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); line-height: 1.18; display: flex; gap: 14px; align-items: baseline; margin-bottom: 14px; }
.doc-body h2 .sec-num { font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--ink-3); letter-spacing: 0.06em; min-width: 24px; }
.doc-body p { font-size: 15.5px; line-height: 1.74; color: var(--ink); margin-bottom: 12px; font-weight: 400; }
.doc-body p:last-child { margin-bottom: 0; }
.doc-body strong { font-weight: 500; }
.doc-body a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink-4); transition: border-color 200ms; }
.doc-body a:hover { border-color: var(--ink); }
.doc-body ul { list-style: none; margin: 14px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.doc-body ul li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.65; color: var(--ink); }
.doc-body ul li::before { content: ''; position: absolute; left: 0; top: 11px; width: 6px; height: 1px; background: var(--ink-3); }
.doc-data-table { width: 100%; border-top: 1px solid var(--ink); margin: 18px 0 8px; }
.doc-data-row { display: grid; grid-template-columns: 38% 1fr; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.doc-data-row:last-child { border-bottom: none; }
.doc-data-key { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 13.5px; letter-spacing: -0.005em; }
.doc-data-val { color: var(--ink-2); line-height: 1.6; font-size: 13.5px; }
.doc-note { font-size: 13px; color: var(--ink-3); line-height: 1.65; border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 24px; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .frame { padding: 0 28px; }
  .nav-links { gap: 24px; }
  .hero { padding: 68px 0 72px; grid-template-columns: 1fr; }
  .hero h1 { grid-column: 1; }
  .hero-lede { grid-column: 1; margin-top: 30px; font-size: 16px; }
  .section { padding: 52px 0; }
  .entry { grid-template-columns: 1fr; gap: 18px; }
  .entry-mark, .entry-body { grid-column: 1; }
  .entry-name { font-size: 42px; }
  .entry-body { margin-top: 6px; }
  .contact-block { grid-column: 1 / -1; }
  .contact-row { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .contact-row .value { font-size: 18px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px 0; grid-template-columns: 1fr; }
  .foot .legal { gap: 18px; }
  .err-main { padding: 48px 0 64px; grid-template-columns: 1fr; gap: 8px; }
  .err-code { grid-column: 1; font-size: 32vw; }
  .err-body { grid-column: 1; padding-top: 8px; }
  .err-body h1 { font-size: 30px; }
  .doc-layout { grid-template-columns: 1fr; gap: 8px; padding: 48px 0 64px; }
  .doc-head { grid-column: 1; grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
  .doc-head h1 { grid-column: 1; }
  .doc-head-meta { grid-column: 1; flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .doc-toc { grid-column: 1; position: static; margin-bottom: 32px; }
  .doc-body { grid-column: 1; }
  .doc-body .doc-lede { font-size: 17px; }
  .doc-body h2 { font-size: 20px; }
  .doc-body p { font-size: 15px; }
}
@media (max-width: 540px) {
  .frame { padding: 0 20px; }
  .nav-links a:not(:last-child) { display: none; }
  .err-body h1 { font-size: 26px; }
  .err-body p { font-size: 15px; }
  .doc-data-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
}
