/* ===== KAMAI subpage system — shared by all inner pages ===== */
@font-face {
  font-family: 'Narkiss';
  src: url('/fonts/Narkiss-Regular.ttf') format('truetype');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Narkiss';
  src: url('/fonts/Narkiss-Bold.ttf') format('truetype');
  font-weight: 700; font-display: swap;
}

:root {
  --ink: #171412;
  --ink-2: #211C19;
  --bone: #F4EEE5;
  --merlot: #711F33;
  --merlot-deep: #5C1929;
  --signal: #FF5A47;
  --chrome: #B8B5AE;
  --bone-dim: #DAD4C8;
  --grid-line: rgba(244, 238, 229, 0.06);
  --grid-line-light: rgba(23, 20, 18, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Narkiss', 'Arial Hebrew', Arial, sans-serif;
  background: var(--ink);
  color: var(--bone);
  line-height: 1.65;
  font-size: 19px;
  overflow-x: hidden;
}

.container { width: min(1120px, 92vw); margin-inline: auto; }
a { color: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--signal); color: var(--ink); }

/* ===== header ===== */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(244,238,229,.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 14px; flex-wrap: wrap; }
.nav .logo {
  font-weight: 700; font-size: 26px; letter-spacing: .04em;
  color: var(--bone); text-decoration: none; direction: ltr;
}
.nav .logo .dot { color: var(--signal); }
.nav ul { display: flex; gap: 22px; list-style: none; flex-wrap: wrap; }
.nav ul a {
  color: var(--bone-dim); text-decoration: none; font-size: 17px;
  transition: color .2s;
}
.nav ul a:hover, .nav ul a:focus-visible, .nav ul a[aria-current="page"] { color: var(--signal); }
.nav .cta-mini {
  background: var(--signal); color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 9px 18px; border-radius: 4px;
  transition: transform .15s ease, background .2s;
}
.nav .cta-mini:hover { transform: translateY(-2px); background: var(--bone); }
@media (max-width: 860px) {
  .nav { justify-content: space-between; }
  .nav .logo { font-size: 22px; }
  .nav .cta-mini { font-size: 14px; padding: 8px 14px; }
  .nav ul { order: 3; width: 100%; justify-content: center; gap: 12px 14px; }
  .nav ul a { font-size: 15px; }
  .page-hero { padding-block: 60px 44px; }
}

/* ===== page hero ===== */
.page-hero { padding-block: 90px 60px; position: relative; }
.page-hero .code {
  font-size: 14px; letter-spacing: .28em; color: var(--signal);
  text-transform: uppercase; display: block; margin-bottom: 18px;
}
.page-hero h1 {
  font-size: clamp(42px, 7vw, 84px); font-weight: 700; line-height: 1.05;
  letter-spacing: -0.01em;
}
.page-hero h1 b { color: var(--signal); }
.page-hero .lede {
  margin-top: 26px; font-size: clamp(20px, 2.4vw, 26px);
  color: var(--bone-dim); max-width: 34em;
}
.gridded {
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ===== sections ===== */
section { padding-block: 72px; }
section.light { background: var(--bone); color: var(--ink); }
section.light.gridded {
  background-image: linear-gradient(var(--grid-line-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-light) 1px, transparent 1px);
}
section.merlot { background: var(--merlot); }
.sec-label .code {
  font-size: 14px; letter-spacing: .28em; color: var(--signal);
  text-transform: uppercase;
}
section h2 {
  font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; line-height: 1.1;
  margin-top: 14px; letter-spacing: -0.01em;
}
section .lede { margin-top: 18px; font-size: 21px; color: var(--bone-dim); max-width: 36em; }
section.light .lede { color: #4a443d; }

/* ===== prose (blog & legal) ===== */
.prose { max-width: 46em; margin-top: 40px; }
.prose p, .prose ul, .prose ol { margin-bottom: 22px; font-size: 20px; }
.prose h2 { font-size: clamp(26px, 3vw, 36px); margin: 44px 0 14px; }
.prose h3 { font-size: 23px; margin: 34px 0 10px; }
.prose ul, .prose ol { padding-inline-start: 24px; }
.prose li { margin-bottom: 8px; }
.prose b, .prose strong { color: var(--merlot); }
.prose a { color: var(--merlot); font-weight: 700; text-decoration-color: var(--signal); }
.prose blockquote {
  border-inline-start: 4px solid var(--signal);
  padding: 10px 22px; margin-bottom: 22px; font-size: 22px; font-weight: 700;
  background: rgba(23,20,18,.04);
}
.post-meta { margin-top: 16px; color: var(--chrome); font-size: 16px; letter-spacing: .04em; }
section.light .post-meta { color: #857e73; }

/* ===== cards ===== */
.cards { display: grid; gap: 22px; margin-top: 46px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  border: 1px solid rgba(244,238,229,.14); padding: 30px 26px; border-radius: 6px;
  background: var(--ink-2); transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--signal); }
.card .idx { font-size: 15px; letter-spacing: .2em; color: var(--signal); margin-bottom: 12px; }
.card h3 { font-size: 25px; margin-bottom: 8px; }
.card p { color: var(--bone-dim); font-size: 18px; }
.card ul { margin-top: 14px; padding-inline-start: 20px; color: var(--bone-dim); font-size: 17px; }
.card li { margin-bottom: 6px; }
section.light .card { background: #fff; border-color: rgba(23,20,18,.12); }
section.light .card p, section.light .card ul { color: #4a443d; }

/* ===== blog list ===== */
.post-list { display: grid; gap: 22px; margin-top: 46px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.post-card {
  display: block; text-decoration: none; background: #fff; color: var(--ink);
  border: 1px solid rgba(23,20,18,.12); border-radius: 6px; padding: 30px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--merlot); box-shadow: 0 18px 36px -24px rgba(23,20,18,.4); }
.post-card .tag { font-size: 14px; letter-spacing: .18em; color: var(--merlot); text-transform: uppercase; }
.post-card h3 { font-size: 24px; margin: 10px 0 8px; line-height: 1.2; }
.post-card p { color: #4a443d; font-size: 17px; }
.post-card .more { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--signal); }

/* ===== stats strip ===== */
.stats { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 48px; }
.stat { border-inline-start: 3px solid var(--signal); padding-inline-start: 18px; }
.stat b { display: block; font-size: clamp(34px, 4vw, 52px); line-height: 1; }
.stat span { color: var(--bone-dim); font-size: 17px; }
section.light .stat span { color: #4a443d; }

/* ===== forms ===== */
form.lead { margin-top: 46px; display: grid; gap: 18px; grid-template-columns: 1fr 1fr; max-width: 760px; }
@media (max-width: 640px) { form.lead { grid-template-columns: 1fr; } }
form.lead .field { display: flex; flex-direction: column; gap: 7px; }
form.lead .field.full { grid-column: 1 / -1; }
form.lead label { font-size: 16px; color: var(--bone-dim); }
section.light form.lead label { color: #4a443d; }
form.lead input, form.lead textarea, form.lead select {
  background: rgba(244,238,229,.06); border: 1px solid rgba(244,238,229,.22);
  color: var(--bone); font-family: inherit; font-size: 18px;
  padding: 13px 15px; border-radius: 4px; min-height: 24px;
}
section.light form.lead input, section.light form.lead textarea, section.light form.lead select {
  background: #fff; border-color: rgba(23,20,18,.2); color: var(--ink);
}
form.lead input:focus, form.lead textarea:focus, form.lead select:focus {
  outline: 2px solid var(--signal); outline-offset: 1px;
}
form.lead textarea { min-height: 110px; resize: vertical; }
.btn {
  display: inline-block; font-weight: 700; font-size: 19px; text-decoration: none;
  padding: 16px 34px; border-radius: 4px; border: none; cursor: pointer;
  font-family: inherit; transition: transform .15s ease, background .2s, color .2s;
}
.btn--signal { background: var(--signal); color: var(--ink); }
.btn--signal:hover { background: var(--bone); transform: translateY(-2px); }
.btn--merlot { background: var(--merlot); color: var(--bone); }
.btn--merlot:hover { background: var(--merlot-deep); transform: translateY(-2px); }
.btn--ghost { border: 1.5px solid var(--bone-dim); color: var(--bone); background: transparent; }
section.light .btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { border-color: var(--signal); color: var(--signal); transform: translateY(-2px); }
form.lead .btn { grid-column: 1 / -1; justify-self: start; }
.form-ok {
  grid-column: 1 / -1; background: var(--merlot); color: var(--bone);
  padding: 20px 24px; border-radius: 6px; font-size: 20px; font-weight: 700;
}

/* ===== footer ===== */
footer.site { border-top: 1px solid rgba(244,238,229,.1); padding-block: 38px; font-size: 16px; color: var(--bone-dim); background: var(--ink); }
footer.site .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer.site .wordmini { font-weight: 700; font-size: 22px; color: var(--bone); direction: ltr; }
footer.site .wordmini i { color: var(--signal); font-style: normal; }
footer.site a { color: var(--bone-dim); }
footer.site a:hover { color: var(--signal); }
footer.site .legal { width: 100%; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; margin-top: 8px; }

/* ===== reveal ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== breadcrumb ===== */
.crumbs { padding-top: 26px; font-size: 15px; color: var(--chrome); }
.crumbs a { color: var(--chrome); text-decoration: none; }
.crumbs a:hover { color: var(--signal); }
section.light .crumbs, section.light .crumbs a { color: #857e73; }

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

/* ===== accessibility prefs (set by a11y.js) ===== */
html.a11y-bigtext body { font-size: 22px; }
html.a11y-bigtext .prose p, html.a11y-bigtext .prose ul, html.a11y-bigtext .prose ol { font-size: 23px; }
html.a11y-contrast body { background: #000; }
html.a11y-contrast section.light { background: #fff; color: #000; }
html.a11y-contrast .card { background: #0a0a0a; }
html.a11y-links a { text-decoration: underline !important; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after {
  animation: none !important; transition: none !important;
}
html.a11y-still .reveal { opacity: 1 !important; transform: none !important; }
