/* ============================================================
   MNV.dev — design system + components
   Brand tokens live in :root. Components below follow page order.
   ============================================================ */

:root {
  /* -------- BRAND TOKENS -------- */
  /* Dark surface system (nav, hero, case studies, contact, footer) */
  --forest:      #34402A;  /* primary dark — deep olive (Clay) */
  --forest-deep: #283120;  /* gradient mid-depth */
  --forest-ink:  #171C10;  /* deepest layer — olive ink */

  /* Accent system */
  --green:       #CBA24E;  /* accent on DARK backgrounds + buttons (amber/gold) */
  --green-deep:  #8A6E2C;  /* muted gold — accent on LIGHT backgrounds */

  /* Light surface system */
  --mist:        #EAE3D5;  /* warm sand — light surface */
  --cream:       #F7F2E8;  /* warm cream — warmest off-white */
  --shower:      #F0ECE0;  /* warm soft text/surface on dark */
  --white:       #FFFFFF;

  /* Typography */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout primitives */
  --maxw: 1240px;
  --gutter: clamp(1.4rem, 5vw, 5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   RESET + BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--forest-ink);
  color: var(--shower);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--green); color: var(--forest-ink); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   SHARED LAYOUT + TYPOGRAPHY
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(5rem, 11vw, 9.5rem) 0; position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 30px; height: 1.5px; background: var(--green);
  display: inline-block;
}
.eyebrow .num { color: var(--green); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.06; }
.h-display { font-size: clamp(2.9rem, 7.2vw, 6.4rem); letter-spacing: -0.02em; }
.h-section { font-size: clamp(2.3rem, 5vw, 4.3rem); letter-spacing: -0.018em; margin: 1.6rem 0; }
.accent-italic {
  font-style: italic; color: var(--green);
  font-variation-settings: "SOFT" 30;
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  color: rgba(232, 238, 235, 0.72); max-width: 46ch;
}

/* Light-section overrides */
.section--light { background: var(--mist); color: var(--forest); }
.section--light .lede { color: rgba(30, 58, 47, 0.74); }
.section--light .accent-italic { color: var(--green-deep); }
.section--paper { background: var(--cream); color: var(--forest); }
.section--paper .lede { color: rgba(30, 58, 47, 0.74); }
.section--paper .accent-italic { color: var(--green-deep); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--body); font-weight: 600; font-size: 0.92rem;
  letter-spacing: 0.01em; cursor: pointer;
  padding: 0.92em 1.7em; border-radius: 100px; border: none;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease),
              background 0.3s var(--ease), color 0.3s var(--ease);
}
.btn-primary {
  background: var(--green); color: var(--forest-ink);
  box-shadow: 0 8px 26px -10px rgba(95, 160, 129, 0.6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -10px rgba(95, 160, 129, 0.78);
}
.btn-ghost {
  background: transparent; color: var(--shower);
  box-shadow: inset 0 0 0 1.5px rgba(232, 238, 235, 0.34);
}
.btn-ghost:hover {
  box-shadow: inset 0 0 0 1.5px var(--green);
  transform: translateY(-2px);
}
.btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem var(--gutter);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease),
              box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(14, 28, 21, 0.86);
  backdrop-filter: blur(14px);
  padding-top: 0.85rem; padding-bottom: 0.85rem;
  box-shadow: 0 1px 0 rgba(232, 238, 235, 0.08);
}
.nav-logo { display: flex; align-items: center; }
/* Main <MNV.dev> wordmark, recolored to the Clay accent (#CBA24E) in the SVG source. */
.nav-logo img { height: 36px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 2.3rem; }
.nav-links a {
  font-size: 0.86rem; font-weight: 500; letter-spacing: 0.02em;
  color: rgba(232, 238, 235, 0.78); transition: color 0.25s;
  position: relative;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 1.5px; background: var(--green);
  transition: width 0.3s var(--ease);
}
.nav-links a:not(.btn):hover::after { width: 100%; }
.nav .btn { padding: 0.7em 1.4em; font-size: 0.86rem; color: var(--forest-ink); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--shower);
  margin: 5px 0; transition: 0.3s var(--ease);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 9rem 0 5rem;
  background:
    radial-gradient(70% 60% at 80% 12%, rgba(203, 162, 78, 0.24), transparent 60%),
    radial-gradient(60% 55% at 10% 90%, rgba(45, 55, 32, 0.92), transparent 65%),
    linear-gradient(165deg, var(--forest) 0%, var(--forest-deep) 55%, var(--forest-ink) 100%);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: 0.5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-inner { position: relative; z-index: 2; max-width: 980px; }
.hero .eyebrow { color: var(--mist); }
.hero h1 { margin: 1.7rem 0 1.6rem; }
.hero h1 .line2 { display: block; }
.hero-sub {
  font-size: clamp(1.08rem, 1.7vw, 1.42rem);
  color: rgba(232, 238, 235, 0.82);
  max-width: 44ch; margin-bottom: 2.6rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-trust {
  margin-top: 3.4rem; padding-top: 1.7rem;
  border-top: 1px solid rgba(232, 238, 235, 0.14);
  display: flex; gap: 2.2rem; flex-wrap: wrap;
  font-size: 0.86rem; color: rgba(232, 238, 235, 0.6);
}
.hero-trust b { color: var(--green); font-weight: 700; }
.hero-trust .dot { color: rgba(232, 238, 235, 0.3); }

.hero-anim { opacity: 0; transform: translateY(26px); }
.loaded .hero-anim {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.loaded .hero-anim.d1 { transition-delay: 0.1s; }
.loaded .hero-anim.d2 { transition-delay: 0.24s; }
.loaded .hero-anim.d3 { transition-delay: 0.38s; }
.loaded .hero-anim.d4 { transition-delay: 0.52s; }
.loaded .hero-anim.d5 { transition-delay: 0.66s; }

/* ============================================================
   ABOUT — 3-card grid (light surface)
   ============================================================ */
.about-head {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem; align-items: end; margin-bottom: 4.5rem;
}
.about-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.about-card {
  background: #FFFDF8;
  border-radius: 18px; padding: 2.4rem 2rem;
  border: 1px solid rgba(30, 58, 47, 0.09);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.about-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 50px -28px rgba(30, 58, 47, 0.32);
}
.about-card .k {
  font-family: var(--display); font-size: 1.05rem; color: var(--green-deep);
  font-style: italic; margin-bottom: 0.3rem;
}
.about-card h3 { font-size: 1.55rem; margin-bottom: 0.9rem; color: var(--forest); }
.about-card p { color: rgba(30, 58, 47, 0.72); font-size: 0.99rem; }

/* ============================================================
   CASE STUDIES — text + metric cluster (dark)
   ============================================================ */
.cases {
  background:
    radial-gradient(75% 90% at 85% 0%, rgba(203, 162, 78, 0.2), transparent 62%),
    linear-gradient(160deg, var(--forest) 0%, #232C1B 60%, var(--forest-ink) 100%);
}
.cases-head { max-width: 760px; margin-bottom: 4.5rem; }
.case-study {
  display: grid; grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  padding: 3.4rem 0;
  border-top: 1px solid rgba(232, 238, 235, 0.14);
}
.case-study:first-of-type { border-top: none; padding-top: 0; }
.cs-meta {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--green); margin-bottom: 0.9rem;
}
.cs-label {
  font-family: var(--display); font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.05; color: var(--shower); margin-bottom: 1.1rem;
}
.cs-brief { color: rgba(232, 238, 235, 0.78); font-size: 1.06rem; max-width: 42ch; }
.cs-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.1rem;
}
.metric {
  border: 1px solid rgba(232, 238, 235, 0.16); border-radius: 16px;
  padding: 1.6rem 1.2rem; background: rgba(232, 238, 235, 0.04);
  position: relative; overflow: hidden;
}
.metric::before {
  content: ""; position: absolute; top: -30px; right: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(203, 162, 78, 0.2), transparent 70%);
}
.metric .fig {
  display: flex; align-items: baseline; gap: 0.08em;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1;
  color: var(--shower); letter-spacing: -0.02em;
  white-space: nowrap;
}
.metric .fig .dir {
  color: var(--green); font-size: 0.52em; font-weight: 600;
  align-self: center; line-height: 1;
}
.metric .fig .sfx { color: var(--green); }
.metric .lab {
  margin-top: 0.7rem; font-size: 0.86rem;
  color: rgba(232, 238, 235, 0.62); line-height: 1.4;
}

/* ============================================================
   CONTACT + FORM (dark)
   ============================================================ */
.contact {
  background:
    radial-gradient(60% 70% at 18% 18%, rgba(138, 110, 44, 0.42), transparent 60%),
    radial-gradient(55% 60% at 90% 95%, rgba(203, 162, 78, 0.16), transparent 60%),
    linear-gradient(160deg, var(--forest-deep), var(--forest-ink));
  position: relative; overflow: hidden;
}
.contact-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem); align-items: center;
}
.contact-copy h2 { margin-bottom: 1.4rem; }
.contact-copy .lede { margin-bottom: 2rem; }
.contact-direct {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding-top: 1.7rem; border-top: 1px solid rgba(232, 238, 235, 0.14);
}
.contact-direct .cd-k {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mist);
}
.contact-direct a {
  font-family: var(--display); font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: var(--green); transition: opacity 0.25s;
}
.contact-direct a:hover { opacity: 0.75; }

.form-card {
  background: rgba(232, 238, 235, 0.04);
  border: 1px solid rgba(232, 238, 235, 0.16);
  border-radius: 22px; padding: clamp(1.8rem, 3.5vw, 2.8rem);
  backdrop-filter: blur(6px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label {
  display: block; font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(224, 232, 231, 0.7); margin-bottom: 0.45rem;
}
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--body); font-size: 0.98rem;
  color: var(--shower); background: rgba(14, 28, 21, 0.55);
  border: 1px solid rgba(232, 238, 235, 0.18);
  border-radius: 11px; padding: 0.85em 1em;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(232, 238, 235, 0.34); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(95, 160, 129, 0.16);
}
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235FA081' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.1em center;
  padding-right: 2.6em;
}
.field select option { background: var(--forest-ink); }
.form-card .btn-primary { width: 100%; justify-content: center; margin-top: 0.4rem; }
.form-note {
  font-size: 0.8rem; color: rgba(232, 238, 235, 0.45);
  text-align: center; margin-top: 0.9rem;
}
.form-note.is-error { color: #f0a6a6; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-success { text-align: center; padding: 1.4rem 0.5rem 0.6rem; }
.form-success .fs-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green); color: var(--forest-ink);
  display: grid; place-items: center; margin: 0 auto 1.3rem;
  font-size: 1.7rem; font-weight: 700;
}
.form-success h3 {
  font-family: var(--display); font-size: 1.7rem;
  color: var(--shower); margin-bottom: 0.6rem;
}
.form-success p { color: rgba(232, 238, 235, 0.7); font-size: 0.97rem; }
.form-success a { color: var(--green); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--forest-ink); padding: 4rem 0 2.4rem;
  border-top: 1px solid rgba(232, 238, 235, 0.08);
}
.footer-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 2.5rem; flex-wrap: wrap;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid rgba(232, 238, 235, 0.08);
}
.footer-brand { max-width: 32ch; }
.footer-brand img { height: 42px; width: auto; display: block; margin-bottom: 1.1rem; }
.footer-brand p { font-size: 0.92rem; color: rgba(232, 238, 235, 0.55); }
.footer-nav { display: flex; gap: 4rem; flex-wrap: wrap; }
.footer-nav .fcol h4 {
  font-family: var(--body); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--green); margin-bottom: 1rem;
}
.footer-nav .fcol a {
  display: block; font-size: 0.92rem; color: rgba(232, 238, 235, 0.62);
  margin-bottom: 0.6rem; transition: color 0.2s;
}
.footer-nav .fcol a:hover { color: var(--white); }
.footer-bot {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 1rem; padding-top: 1.8rem;
  font-size: 0.82rem; color: rgba(232, 238, 235, 0.4);
}

/* ============================================================
   SCROLL REVEAL + REDUCED MOTION
   ============================================================ */
.reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.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; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal, .hero-anim { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 1.3rem;
    background: rgba(14, 28, 21, 0.97); backdrop-filter: blur(14px);
    padding: 1.8rem var(--gutter) 2.2rem;
    border-top: 1px solid rgba(232, 238, 235, 0.1);
  }
  .nav-toggle { display: block; }
  .nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .about-head { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
  .about-grid { grid-template-columns: 1fr; }
  .case-study { grid-template-columns: 1fr; gap: 1.8rem; }
  .contact-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .hero { padding-top: 8rem; }
  .hero-trust {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }
  .hero-trust .dot { display: none; }
}
