/* ===== Fonts (self-hosted, zero CDN) ===== */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/Fraunces-Variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/Karla-Variable.woff2') format('woff2');
}

/* ===== Tokens ===== */
:root {
  --bg: #F7F3EC;
  --bg-alt: #EFE6D6;
  --surface: #FFFFFF;
  --ink: #221E17;
  --ink-soft: #5B5546;
  --accent: #C1592D;
  --accent-deep: #A94A22;
  --accent-ink: #FBF3EC;
  --accent-soft: #F0DCC9;
  --line: #E4DAC6;

  --ease: cubic-bezier(.19,1,.22,1);

  --radius: 12px;
  --radius-lg: 20px;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --wrap: 1160px;
}

/* ===== Reset ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

#scrollSentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
  pointer-events: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 999;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.eyebrow-center { text-align: center; }

.section-title {
  font-size: clamp(28px, 3.4vw, 42px);
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 52ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid transparent;
  transition: transform .18s var(--ease), background .18s ease, border-color .18s ease, box-shadow .18s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 3px 0 var(--accent-deep);
}
.btn-primary:hover { background: #A94A22; transform: translateY(-2px); box-shadow: 0 5px 0 var(--accent-deep); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 1px 0 var(--accent-deep); }
.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: 0 5px 0 var(--accent); }
.btn-ghost:active { transform: translateY(0); box-shadow: 0 1px 0 var(--accent); }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 236, 0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: rgba(247, 243, 236, 0.96);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 var(--line), 0 12px 24px -20px rgba(34, 30, 23, 0.35);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.logo span {
  color: var(--accent);
  display: inline-block;
  transition: transform .3s var(--ease);
}
.logo:hover span { transform: scale(1.35); }
.logo-mark {
  width: 0.66em;
  height: auto;
  color: var(--accent);
  flex-shrink: 0;
  transition: color .2s ease;
}
.logo:hover .logo-mark { color: var(--accent-deep); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-nav a:not(.nav-cta) {
  position: relative;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.site-nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -5px;
  height: 2px;
  background: var(--accent);
  transition: right .28s var(--ease);
}
.site-nav a:not(.nav-cta):hover { color: var(--ink); }
.site-nav a:not(.nav-cta):hover::after { right: 0; }
.nav-cta {
  font-weight: 700;
  font-size: 14px;
  background: var(--accent);
  color: var(--accent-ink) !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  box-shadow: 0 3px 0 var(--accent-deep);
  transition: transform .18s var(--ease), background .18s ease, box-shadow .18s var(--ease);
}
.nav-cta:hover { background: #A94A22; transform: translateY(-2px); box-shadow: 0 5px 0 var(--accent-deep); }
.nav-cta:active { transform: translateY(0); box-shadow: 0 1px 0 var(--accent-deep); }

.lang { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  transition: color .2s ease, border-color .2s ease;
}
.lang-btn:hover { color: var(--ink); border-color: var(--accent); }
.lang-cur { letter-spacing: .04em; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: 0 12px 28px -14px rgba(34, 30, 23, .4);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 120;
}
.lang.is-open .lang-menu { display: flex; }
.lang-menu button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  background: none;
  transition: background .15s ease, color .15s ease;
}
.lang-menu button:hover { background: var(--bg-alt); color: var(--ink); }
.lang-menu button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .lang-menu button { text-align: right; }
[dir="rtl"] .site-nav a:not(.nav-cta)::after { left: auto; right: 0; }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
[dir="rtl"] .card-index { right: auto; left: 26px; }
[dir="rtl"] .float-btn { right: auto; left: 24px; }
@media (max-width: 480px) {
  [dir="rtl"] .float-btn { left: 16px; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero { padding: 90px 0 110px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  display: inline-block;
}
.hero h1 em .char-in {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.2em);
  animation: char-in .55s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes char-in {
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 em .char-in { animation: none; opacity: 1; filter: none; transform: none; }
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  height: 470px;
}
.hero-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 30px 22px;
  width: min(296px, 100%);
  box-shadow: 0 2px 0 var(--line);
}
.hero-card-kicker {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.hero-card-row--accent .hero-card-kicker { color: var(--accent); }
.hero-card-stat {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0;
}
.hero-card-stat .stat-count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hero-card-stat--accent .stat-count { color: var(--accent); }
.hero-card-unit {
  font-size: 13px;
  color: var(--ink-soft);
}
.hero-card-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin: 14px 0;
}
.hero-card-divider svg { width: 18px; height: 18px; }
.hero-card-foot {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.chip {
  position: absolute;
  background: var(--accent-soft);
  color: #7A3818;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transform: rotate(var(--r, 0deg));
}
.chip-1 { top: 4%;  left: 4%;  --r: -6deg; --d: .1s;  --fd: 4.8s; }
.chip-2 { top: 2%;  right: 6%; --r: 4deg;  --d: .18s; --fd: 6.2s; }
.chip-3 { top: 26%; left: -2%; --r: 3deg;  --d: .26s; --fd: 5.4s; }
.chip-4 { top: 30%; right: -4%; --r: -4deg; --d: .34s; --fd: 6.8s; }
.chip-5 { bottom: 24%; left: 2%; --r: -3deg; --d: .42s; --fd: 5.1s; }
.chip-6 { bottom: 20%; right: 0%; --r: 5deg;  --d: .5s;  --fd: 6.5s; }
.chip-7 { bottom: 2%; left: 14%; --r: 4deg;  --d: .58s; --fd: 5.8s; }
.chip-8 { bottom: 0%; right: 16%; --r: -5deg; --d: .66s; --fd: 7.1s; }

/* ===== Problem ===== */
.problem {
  background: var(--bg-alt);
  padding: 70px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.problem h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin-bottom: 18px;
}
.problem .section-lead {
  color: var(--ink-soft);
  font-size: 18px;
  max-width: 62ch;
}

/* ===== Services ===== */
.services { padding: 100px 0; }
.grid-services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card-service {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px 32px;
  transition: transform .25s var(--ease), border-color .25s ease, box-shadow .25s var(--ease);
}
.card-service:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 6px 0 var(--line);
}
.card-service--accent {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.card-service--accent:hover {
  border-color: var(--ink);
  box-shadow: 0 6px 0 rgba(255,255,255,.12);
}
.card-service--accent p { color: #C9C3B4; }

.card-index {
  position: absolute;
  top: 26px;
  right: 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--line);
  transition: color .25s ease;
}
.card-service:hover .card-index { color: var(--accent); }
.card-service--accent .card-index { color: rgba(255,255,255,.22); }
.card-service--accent:hover .card-index { color: var(--accent-soft); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: transform .3s var(--ease), background .3s ease, color .3s ease;
}
.card-icon svg { width: 22px; height: 22px; }
.card-service--accent .card-icon { background: rgba(255,255,255,.1); color: var(--accent-soft); }
.card-service:hover .card-icon {
  transform: scale(1.08) rotate(-4deg);
  background: var(--accent);
  color: var(--accent-ink);
}
.card-service--accent:hover .card-icon {
  background: var(--accent);
  color: var(--accent-ink);
}
.card-service h3 {
  font-size: 19px;
  margin-bottom: 10px;
}
.card-service p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

/* ===== How ===== */
.how {
  background: var(--bg-alt);
  padding: 100px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step-num {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  margin-bottom: 18px;
  transition: transform .4s var(--ease), background .4s ease, border-color .4s ease, color .4s ease;
}
.step-num.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: scale(1.1);
}
.step h3 {
  font-size: 21px;
  margin-bottom: 10px;
}
.step p {
  color: var(--ink-soft);
  font-size: 15px;
}

/* ===== Why ===== */
.why { padding: 100px 0; }
.why-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.why-copy h2 {
  font-size: clamp(30px, 3.4vw, 42px);
  margin-bottom: 18px;
}
.why-copy h2 .accent-word {
  color: var(--accent);
}
.why-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.why-item {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.why-item h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}
.why-item p {
  color: var(--ink-soft);
  font-size: 15px;
}

/* ===== Contact ===== */
.contact {
  background: var(--ink);
  color: var(--bg);
  padding: 100px 0;
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  margin-bottom: 18px;
  color: var(--bg);
}
.contact .eyebrow { color: var(--accent-soft); }
.contact .lead { color: #C9C3B4; }
.contact-alt {
  margin-top: 26px;
  color: #C9C3B4;
  font-size: 15px;
}
.contact-alt a {
  color: var(--accent-soft);
  font-weight: 700;
  border-bottom: 1px solid currentColor;
}

.contact-form {
  background: #2E2A22;
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #C9C3B4;
}
.contact-form input,
.contact-form textarea {
  background: #211E18;
  border: 1px solid #45402F;
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--bg);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.logo-footer { font-size: 18px; }
.footer-nav {
  display: flex;
  gap: 24px;
}
.footer-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.footer-nav a:hover { color: var(--ink); }
.footer-copy {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ===== Floating buttons ===== */
.float-btn {
  position: fixed;
  right: 24px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  cursor: pointer;
  transition: transform .2s var(--ease), opacity .25s ease, box-shadow .2s var(--ease), background .2s ease;
}
.float-whatsapp {
  bottom: 24px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 3px 0 var(--accent-deep), 0 10px 22px -10px rgba(34, 30, 23, .45);
}
.float-whatsapp svg { width: 26px; height: 26px; }
.float-whatsapp:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 5px 0 var(--accent-deep), 0 12px 24px -10px rgba(34, 30, 23, .5); }
.float-whatsapp:active { transform: translateY(0); box-shadow: 0 1px 0 var(--accent-deep); }

.float-top {
  bottom: 86px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 3px 0 #14110c, 0 10px 22px -10px rgba(34, 30, 23, .45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}
.float-top svg { width: 20px; height: 20px; }
.float-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.float-top:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #14110c, 0 12px 24px -10px rgba(34, 30, 23, .5); }
.float-top:active { transform: translateY(0); box-shadow: 0 1px 0 #14110c; }

@media (max-width: 480px) {
  .float-btn { width: 46px; height: 46px; right: 16px; }
  .float-whatsapp { bottom: 16px; }
  .float-top { bottom: 70px; }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .grid-services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .why-inner, .contact-inner { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 410px; margin-top: 20px; }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 28px 28px;
    gap: 18px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-cta { align-self: flex-start; }

  .site-nav.is-open > * {
    opacity: 0;
    animation: fade-up .4s var(--ease) forwards;
  }
  .site-nav.is-open > *:nth-child(1) { animation-delay: .03s; }
  .site-nav.is-open > *:nth-child(2) { animation-delay: .08s; }
  .site-nav.is-open > *:nth-child(3) { animation-delay: .13s; }
  .site-nav.is-open > *:nth-child(4) { animation-delay: .18s; }
  .site-nav.is-open > *:nth-child(5) { animation-delay: .23s; }

  .grid-services { grid-template-columns: 1fr; }
  .hero { padding: 50px 0 60px; }
  .services, .how, .why, .contact { padding: 64px 0; }
  .hero-visual { padding: 0 12px; }
  .chip { font-size: 12px; padding: 7px 12px; }
  .chip-1 { left: 2%; }
  .chip-2 { right: 2%; }
  .chip-3 { left: 4%; }
  .chip-4 { right: 2%; }
  .chip-5 { left: 4%; }
  .chip-6 { right: 4%; }
  .chip-7 { left: 6%; }
  .chip-8 { right: 8%; }
}

/* ===== Motion ===== */

/* scroll reveal, base state */
.reveal {
  opacity: 0;
  transform: translateY(18px);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-group > *:nth-child(1) { transition-delay: 0ms; }
.reveal-group > *:nth-child(2) { transition-delay: 70ms; }
.reveal-group > *:nth-child(3) { transition-delay: 140ms; }
.reveal-group > *:nth-child(4) { transition-delay: 210ms; }
.reveal-group > *:nth-child(5) { transition-delay: 280ms; }
.reveal-group > *:nth-child(6) { transition-delay: 350ms; }
.reveal-group > *:nth-child(7) { transition-delay: 420ms; }
.reveal-group > *:nth-child(8) { transition-delay: 490ms; }
.section-title.reveal { transition-delay: 80ms; }

/* no-JS: never hide content */
.no-js .reveal { opacity: 1; transform: none; }
.no-js .chip { opacity: 1; }
.no-js .logo-mark path { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    transition: opacity .7s var(--ease), transform .7s var(--ease);
  }

  .logo-mark path {
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
    animation: draw-mark 1s var(--ease) .1s forwards;
  }

  .hero-copy > * {
    opacity: 0;
    animation: fade-up .7s var(--ease) forwards;
  }
  .hero-copy .eyebrow { animation-delay: .05s; }
  .hero-copy h1 { animation-delay: .16s; }
  .hero-copy .lead { animation-delay: .3s; }
  .hero-copy .hero-actions { animation-delay: .42s; }

  .hero-card {
    animation: card-in .8s var(--ease) .38s backwards;
  }

  .chip {
    opacity: 0;
    animation:
      chip-in .55s var(--ease) var(--d, 0s) forwards,
      chip-float var(--fd, 5.5s) ease-in-out calc(var(--d, 0s) + .6s) infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chip { opacity: 1; }
  .site-nav.is-open > * { opacity: 1; animation: none; }
  .logo:hover span, .logo:hover .logo-mark { transform: none; color: var(--accent); }
}

@keyframes draw-mark {
  to { stroke-dashoffset: 0; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes card-in {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes chip-in {
  from { opacity: 0; transform: rotate(var(--r, 0deg)) scale(.85) translateY(8px); }
  to   { opacity: 1; transform: rotate(var(--r, 0deg)) scale(1) translateY(0); }
}

/* ===== Legal / doc pages ===== */
.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.doc-back:hover { color: var(--accent); }

.doc-head {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}
.doc-head h1 { font-size: clamp(32px, 4vw, 48px); margin: 0 0 16px; }
.doc-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.doc-updated .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.doc-main { padding: 56px 0 110px; }
.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.doc-toc h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 4px;
}
.doc-toc a {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.doc-toc a:hover { color: var(--accent); }

.doc-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 44px;
  font-size: 14px;
  color: #7A3818;
}
.doc-note svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

.doc-content section { margin-bottom: 42px; }
.doc-content section:last-child { margin-bottom: 0; }
.doc-content h2 {
  font-size: 21px;
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.doc-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}
.doc-content p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.65; margin: 0 0 12px; }
.doc-content ul { margin: 0 0 12px; padding: 0; }
.doc-content li {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.65;
  padding-left: 20px;
  position: relative;
  margin-bottom: 6px;
}
.doc-content li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.doc-content strong { color: var(--ink); }
.doc-content a { color: var(--accent); border-bottom: 1px solid currentColor; }
.doc-fill {
  background: var(--accent-soft);
  color: #7A3818;
  padding: 1px 6px;
  border-radius: 5px;
  font-weight: 600;
}

.footer-copy a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.footer-copy a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
  }
  .doc-toc h4 { width: 100%; }
}

@keyframes chip-float {
  0%   { transform: rotate(var(--r, 0deg)) translate(0, 0); }
  25%  { transform: rotate(calc(var(--r, 0deg) + 6deg)) translate(3px, -7px); }
  50%  { transform: rotate(var(--r, 0deg)) translate(0, -12px); }
  75%  { transform: rotate(calc(var(--r, 0deg) - 6deg)) translate(-3px, -5px); }
  100% { transform: rotate(var(--r, 0deg)) translate(0, 0); }
}
