/* ============================================================
   DUMANTRADE — Editorial design system
   ============================================================ */

:root {
  /* Palette */
  --cream:        #F4EFE4;
  --cream-soft:   #ECE5D5;
  --paper:        #FBF8F1;
  --ink:          #14110D;
  --ink-soft:     #2A2620;
  --muted:        #6B655A;
  --rule:         #2A2620;
  --line-soft:    #C9C0AD;
  --accent:       #C2532E;     /* terracotta */
  --accent-deep:  #8E3A1E;
  --moss:         #2E4234;     /* deep moss green for data hint */

  /* Typography */
  --serif:  "Fraunces", "Times New Roman", serif;
  --sans:   "Manrope", "Helvetica Neue", Arial, sans-serif;
  --mono:   "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Spacing */
  --gutter: clamp(20px, 4vw, 56px);
  --max:    1280px;
}

/* ============================================================
   Reset & base
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.078 0 0 0 0 0.067 0 0 0 0 0.051 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}

h1 {
  font-size: clamp(48px, 8.6vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(36px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.15;
}

p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  display: inline-block;
}

.italic-serif {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ============================================================
   Layout helpers
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
  z-index: 2;
}

section { position: relative; }

.section-pad { padding: clamp(80px, 12vw, 160px) 0; }

.divider {
  height: 1px;
  background: var(--line-soft);
  margin: 0;
}

/* ============================================================
   Top bar / navigation
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 228, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand__mark {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  align-self: center;
  border: 1px solid var(--accent);
  padding: 4px 8px;
  border-radius: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.2s ease;
  color: var(--ink-soft);
}

.nav a:hover { background: var(--cream-soft); color: var(--ink); }

.nav a.active {
  background: var(--ink);
  color: var(--cream);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--ink);
  transition: transform 0.2s ease, background 0.2s ease;
}

.cta:hover { background: var(--accent); border-color: var(--accent); }
.cta:active { transform: translateY(1px); }

.cta--ghost {
  background: transparent;
  color: var(--ink);
}
.cta--ghost:hover { background: var(--ink); color: var(--cream); }

.cta__arrow { transition: transform 0.25s ease; }
.cta:hover .cta__arrow { transform: translateX(4px); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px; height: 40px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  margin: 6px 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: clamp(60px, 9vw, 120px) 0 clamp(80px, 10vw, 140px);
  position: relative;
  overflow: hidden;
}

.hero__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 80px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta span::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.hero__title {
  font-size: clamp(56px, 12vw, 180px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  max-width: 16ch;
}

.hero__title em {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  color: var(--accent);
}

.hero__row {
  margin-top: clamp(48px, 7vw, 90px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}

.hero__lede {
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero__cta-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}

.stat__num {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144;
}

.stat__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

/* Decorative chart svg */
.hero__chart {
  position: absolute;
  right: calc(var(--gutter) * -0.2);
  top: 18%;
  width: 38%;
  max-width: 480px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

/* Ticker */
.ticker {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  position: relative;
}

.ticker__track {
  display: flex;
  gap: 60px;
  padding: 16px 0;
  animation: ticker 38s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.ticker__item {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.ticker__item::after {
  content: "✦";
  color: var(--accent);
  font-size: 10px;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   Generic page header
   ============================================================ */

.page-head {
  padding: clamp(80px, 12vw, 160px) 0 clamp(40px, 6vw, 80px);
}

.page-head__kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.page-head__title {
  font-size: clamp(48px, 9vw, 130px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 14ch;
}

.page-head__title em {
  font-style: italic;
  color: var(--accent);
}

/* ============================================================
   Two-column content
   ============================================================ */

.two-col {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}

.two-col__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  position: sticky;
  top: 100px;
}

.two-col__body { max-width: 65ch; }

.two-col__body p {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  color: var(--ink-soft);
}

.two-col__body p strong {
  color: var(--ink);
  font-weight: 600;
}

.lead {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 32px;
}

/* ============================================================
   Services / cards
   ============================================================ */

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-soft);
}

.service {
  padding: 48px 32px 48px 0;
  border-right: 1px solid var(--line-soft);
  position: relative;
  transition: background 0.3s ease;
}

.service:last-child { border-right: 0; padding-right: 0; }
.service:first-child { padding-left: 0; }

.service:not(:first-child) { padding-left: 32px; }

.service__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 28px;
  display: block;
}

.service__title {
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.service__title em {
  font-style: italic;
  color: var(--accent);
}

.service__copy {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.service__list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-family: var(--mono);
  color: var(--muted);
}

.service__list li {
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.service__list li::after {
  content: "→";
  color: var(--accent);
  opacity: 0.5;
}

/* ============================================================
   Values list (editorial numbered list)
   ============================================================ */

.values { list-style: none; padding: 0; margin: 0; }

.value {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: baseline;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line-soft);
  transition: padding-left 0.35s ease;
}

.value:last-child { border-bottom: 1px solid var(--line-soft); }

.value:hover { padding-left: 16px; }
.value:hover .value__title { color: var(--accent); }

.value__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.value__title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: -0.025em;
  transition: color 0.3s ease;
}

.value__title em { font-style: italic; }

.value__copy {
  font-size: 14px;
  color: var(--muted);
  max-width: 24ch;
  text-align: right;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

/* ============================================================
   Quote / pull-quote
   ============================================================ */

.pullquote {
  padding: clamp(80px, 12vw, 140px) 0;
  background: var(--ink);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.pullquote::before {
  content: "“";
  position: absolute;
  top: -40px; left: 4%;
  font-family: var(--serif);
  font-size: 480px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.18;
  font-style: italic;
}

.pullquote__text {
  font-family: var(--serif);
  font-size: clamp(30px, 4.6vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.pullquote__text em { font-style: italic; color: var(--accent); }

.pullquote__sig {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-soft);
}

/* ============================================================
   CTA strip
   ============================================================ */

.cta-strip {
  padding: clamp(80px, 10vw, 130px) 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.cta-strip__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.cta-strip h2 {
  max-width: 18ch;
}

.cta-strip h2 em {
  font-style: italic;
  color: var(--accent);
}

/* ============================================================
   Forms
   ============================================================ */

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  max-width: 720px;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field--full { grid-column: 1 / -1; }

.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  font-family: var(--sans);
  font-size: 16px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 0;
  border-color: var(--accent);
}

.field textarea { min-height: 120px; }

.form__submit {
  margin-top: 16px;
  align-self: start;
  grid-column: 1 / -1;
}

.form__note {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 80px 0 32px;
  position: relative;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid #2A2620;
}

.footer__brand {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.footer__brand em { color: var(--accent); font-style: italic; }

.footer__tag {
  margin-top: 18px;
  font-size: 14px;
  color: var(--cream-soft);
  opacity: 0.7;
  max-width: 32ch;
}

.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-soft);
  opacity: 0.6;
  margin-bottom: 16px;
}

.footer ul { list-style: none; padding: 0; margin: 0; }

.footer ul li {
  padding: 6px 0;
  font-size: 14px;
}

.footer ul li a:hover { color: var(--accent); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-soft);
  opacity: 0.55;
  flex-wrap: wrap;
  gap: 16px;
}

/* ============================================================
   Reveal animation
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-in { opacity: 1; transform: none; }

.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
.reveal[data-d="5"] { transition-delay: 0.4s; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 960px) {
  .hero__row     { grid-template-columns: 1fr; }
  .services      { grid-template-columns: 1fr; }
  .service       { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 40px 0 !important; }
  .service:last-child { border-bottom: 0; }
  .two-col       { grid-template-columns: 1fr; }
  .two-col__label { position: static; }
  .footer__top   { grid-template-columns: 1fr 1fr; }
  .form          { grid-template-columns: 1fr; }
  .cta-strip__inner { grid-template-columns: 1fr; }
  .value         { grid-template-columns: 50px 1fr; }
  .value__copy   { grid-column: 1 / -1; text-align: left; max-width: none; }
}

@media (max-width: 680px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: var(--cream);
    border-bottom: 1px solid var(--line-soft);
    padding: 16px var(--gutter);
    align-items: stretch;
  }
  .nav.is-open a { padding: 14px 16px; }
  .nav-toggle    { display: inline-block; }
  .topbar__cta   { display: none; }
  .footer__top   { grid-template-columns: 1fr; }
  .hero__meta    { flex-direction: column; gap: 10px; align-items: flex-start; }
  .hero__stats   { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

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