/* ============================================================
   DMN Base Styles — resets, type utilities, buttons, sections
   ============================================================ */

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

::-moz-selection {
  background-color: rgba(246, 100, 0, 0.34);
  color: #1c1714;
}

::selection {
  background-color: rgba(246, 100, 0, 0.34);
  color: #1c1714;
}

.section-dark ::-moz-selection,
.hero ::-moz-selection,
.mox-section ::-moz-selection {
  background-color: rgba(246, 100, 0, 0.46);
  color: #f4efe9;
}

.section-dark ::selection,
.hero ::selection,
.mox-section ::selection {
  background-color: rgba(246, 100, 0, 0.46);
  color: #f4efe9;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-display); cursor: pointer; border: none; background: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ---------- Type utilities ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}
.eyebrow.no-rule::before { display: none; }

.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.h-display,
.h-section {
  text-rendering: optimizeLegibility;
}
.h-section {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.h-section em {
  color: var(--orange);
  font-style: italic;
}
.section-paper .eyebrow,
.section-paper-2 .eyebrow,
.section-paper .h-section em,
.section-paper-2 .h-section em,
.section-paper .link-arrow,
.section-paper-2 .link-arrow {
  color: var(--orange-text);
}

@media (min-width: 641px) and (max-width: 980px) {
  .h-section {
    font-size: clamp(42px, 5.8vw, 54px);
    line-height: 1.02;
  }
}

.h-card {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.body-lg {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
}

@media (max-width: 640px) {
  .body-lg {
    font-size: 16px;
    line-height: 1.62;
  }
}

.body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 65ch;
}
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.final-intro { max-width: 520px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border-radius: 6px;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--button-primary-bg) !important;
  color: var(--button-primary-text) !important;
}
.btn-primary * { color: var(--button-primary-text) !important; }
.btn-primary:hover,
.btn-primary:focus-visible,
a.btn.btn-primary:hover,
a.btn.btn-primary:focus-visible {
  background: var(--button-primary-bg-hover) !important;
  color: var(--button-primary-text) !important;
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost-on-dark,
a.btn.btn-ghost-on-dark {
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
}
.btn-ghost-on-dark:hover,
.btn-ghost-on-dark:focus-visible,
a.btn.btn-ghost-on-dark:hover,
a.btn.btn-ghost-on-dark:focus-visible {
  color: #fff !important;
  border-color: #fff !important;
  background: rgba(255,255,255,0.04) !important;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--orange);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap 0.18s ease, color 0.18s ease;
}
.link-arrow:hover { gap: 12px; color: var(--orange-hot); }
.section-paper .link-arrow:hover,
.section-paper-2 .link-arrow:hover {
  color: var(--orange-text-hover);
}
.link-arrow .arrow { transition: transform 0.18s ease; }
.link-arrow:hover .arrow { transform: translateX(2px); }

.arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-dark { background: var(--charcoal); color: var(--text-on-dark); }
.section-dark .body-lg,
.section-dark .body { color: var(--text-dark-muted); }
.section-dark .h-section { color: var(--text-on-dark); }
.section-dark .h-section em { color: var(--orange); font-style: italic; }
.section-paper { background: var(--paper); }
.section-paper-2 { background: var(--paper-2); }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); }
.divider-dark { background: rgba(255,255,255,0.08); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  background: #fff;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Skip Link (a11y) ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--charcoal);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--orange);
  border-radius: 4px;
  transform: translateY(calc(-100% - 16px));
  transition: transform 200ms ease;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
