/* ============================================================
   MILLRUN — dark industrial command deck
   Adapted from the Orderful design system → dark theme
   ============================================================ */

:root {
  /* Surfaces (dark) */
  --bg:            #0a0a0c;   /* page canvas */
  --surface:       #111114;   /* card / panel */
  --surface-2:     #16161a;   /* alt section */
  --carbon:        #1c1c21;   /* elevated inner */
  --hairline:      #26262c;   /* borders */
  --hairline-2:    #33333b;   /* stronger borders */

  /* Text */
  --text:          #f4f4f5;   /* primary */
  --text-2:        #b7b7bf;   /* body */
  --text-3:        #7c7c85;   /* muted / captions */
  --text-4:        #55555d;   /* faint */

  /* Accent — Millrun brand orange (from logo) */
  --accent:        #db7b22;
  --accent-hot:    #f0902e;
  --accent-glow:   rgba(219, 123, 34, 0.18);

  /* Brand green (from logo) — used sparingly for depth */
  --brand-green:   #0f4a38;
  --brand-green-2: #12563f;
  --green-deep:    #0a3c2e;
  --green-line:    #1c6b52;

  /* Type */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Geometry */
  --radius: 10px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --gap-section: 120px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle grid texture on canvas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.28;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }

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

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase;
  padding: 14px 22px; border-radius: var(--radius-sm);
  cursor: pointer; border: 1px solid transparent;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-accent {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-accent:hover { background: var(--accent-hot); box-shadow: 0 8px 30px var(--accent-glow); transform: translateY(-1px); }

.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--hairline-2);
}
.btn-ghost:hover { border-color: var(--text-3); background: var(--surface); }

.btn-block { width: 100%; justify-content: center; padding: 16px; font-size: 15px; }

/* ---------------- Nav ---------------- */
#nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 12, 0.72);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  height: 68px; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; color: var(--text); }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-word { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.14em; font-size: 16px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 14px; color: var(--text-2); font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { padding: 10px 18px; font-size: 13px; }

/* ---------------- Layout ---------------- */
main { position: relative; z-index: 1; }
.section { max-width: var(--maxw); margin: 0 auto; padding: var(--gap-section) 28px; }
.section-alt { background: var(--surface-2); max-width: none; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-dark { background: #060607; max-width: none; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 46px); margin: 18px 0 20px; }
.section-lede { font-size: 18px; color: var(--text-2); line-height: 1.6; }

.eyebrow-plain { font-size: 12px; letter-spacing: 0.18em; color: var(--text-3); text-transform: uppercase; }
.accent-label { color: var(--accent); }
.accent { color: var(--accent); }

/* ---------------- Hero ---------------- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 84px 28px 96px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--text-2);
  border: 1px solid var(--hairline-2); border-radius: 100px;
  padding: 7px 14px; margin-bottom: 26px; text-transform: uppercase;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.hero-copy h1 { font-size: clamp(38px, 5.6vw, 68px); letter-spacing: -0.035em; margin-bottom: 24px; }
.lede { font-size: 19px; color: var(--text-2); max-width: 540px; line-height: 1.6; }
.hero-actions { display: flex; gap: 14px; margin: 36px 0 30px; flex-wrap: wrap; }
.hero-trust { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.hero-trust .mono { color: var(--accent); font-size: 12px; }
.hero-trust .sep { color: var(--text-4); }

.hero-visual { position: relative; }
.hero-visual img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); border: 1px solid var(--hairline);
  box-shadow: 0 40px 90px rgba(0,0,0,0.55);
}

/* ---------------- Strip ---------------- */
.strip {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 28px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  text-align: center;
}
.strip-label { font-size: 11px; letter-spacing: 0.2em; color: var(--text-4); }
.strip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; }
.strip-row span { font-family: var(--font-display); font-weight: 500; font-size: 17px; color: var(--text-3); letter-spacing: -0.01em; }
.strip-row span:last-child { color: var(--accent); }

/* ---------------- Cards (problem) ---------------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 30px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.card:hover { border-color: var(--hairline-2); transform: translateY(-3px); }
.card-num { font-size: 13px; color: var(--accent); margin-bottom: 18px; letter-spacing: 0.1em; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: 15px; }

/* ---------------- Steps ---------------- */
.steps { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 48px; counter-reset: none; }
.step { display: flex; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--hairline); }
.step-index {
  flex: none; width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  border: 1px solid var(--accent); color: var(--accent);
  font-size: 16px; font-weight: 500;
}
.step-body h3 { font-size: 19px; margin-bottom: 8px; }
.step-body p { color: var(--text-2); font-size: 15px; }

/* ---------------- Features ---------------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 30px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.feature:hover { border-color: var(--hairline-2); background: var(--carbon); }
.feature .ico { width: 28px; height: 28px; stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; }
.feature h3 { font-size: 18px; margin-bottom: 9px; }
.feature p { color: var(--text-2); font-size: 15px; }

/* ---------------- Engine section ---------------- */
.engine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.engine-copy h2 { font-size: clamp(30px, 4.2vw, 46px); margin: 16px 0 20px; }
.engine-list { list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.engine-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.engine-list strong { color: var(--text); font-weight: 600; }
.li-mark { color: var(--accent); font-size: 15px; margin-top: 2px; }

.engine-panel {
  background: var(--surface); border: 1px solid var(--hairline-2);
  border-radius: var(--radius); padding: 22px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--hairline); margin-bottom: 8px; }
.panel-head .mono { font-size: 11px; letter-spacing: 0.12em; color: var(--text-2); }
.panel-head .muted { color: var(--text-4); }
.quote-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px;
  padding: 16px 12px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.quote-row.recommended { background: var(--accent-glow); border-color: rgba(228,43,12,0.4); }
.q-net { font-family: var(--font-display); font-weight: 500; font-size: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; padding: 3px 7px; border-radius: 5px; background: var(--accent); color: #fff; white-space: nowrap; }
.badge-cheap { background: transparent; border: 1px solid var(--text-4); color: var(--text-3); }
.q-score { text-align: right; }
.q-score .big { font-size: 20px; color: var(--text); display: block; line-height: 1; }
.q-lbl { font-size: 10px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.08em; }
.q-price { font-size: 17px; color: var(--text); min-width: 78px; text-align: right; }
.panel-note { font-size: 11px; color: var(--text-3); line-height: 1.5; margin-top: 12px; padding: 0 12px; letter-spacing: 0.02em; }

/* ---------------- Waitlist ---------------- */
.waitlist-wrap { max-width: 620px; margin: 0 auto; }
.waitlist-form {
  margin-top: 40px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 34px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; font-weight: 500; }
.req { color: var(--accent); }
.field input, .field select {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--hairline-2); border-radius: var(--radius-sm);
  padding: 13px 15px; font-family: var(--font-body); font-size: 15px;
  transition: border-color .2s;
}
.field input::placeholder { color: var(--text-4); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%237c7c85' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }
.form-fine { font-size: 12px; color: var(--text-4); text-align: center; margin-top: 14px; }
.form-msg { text-align: center; margin-top: 14px; font-size: 14px; font-weight: 500; min-height: 20px; }
.form-msg.ok { color: #4ade80; }
.form-msg.err { color: var(--accent-hot); }

/* success state */
.waitlist-success { text-align: center; padding: 20px 0; }
.waitlist-success .check { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-glow); border: 1px solid var(--accent); display: grid; place-items: center; margin: 0 auto 18px; }
.waitlist-success .check svg { width: 26px; height: 26px; stroke: var(--accent); stroke-width: 2.4; fill: none; }
.waitlist-success h3 { font-size: 24px; margin-bottom: 10px; }
.waitlist-success p { color: var(--text-2); font-size: 15px; }
.waitlist-success .pos { font-family: var(--font-mono); color: var(--accent); font-size: 14px; margin-top: 14px; }

/* ---------------- Footer ---------------- */
#footer { border-top: 1px solid var(--hairline); background: var(--bg); position: relative; z-index: 1; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 48px 28px; display: flex; flex-direction: column; gap: 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.footer-brand .brand-logo { height: 26px; width: auto; }
.footer-tag { color: var(--text-3); font-size: 14px; }
.footer-meta { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--hairline); margin-top: 8px; font-size: 12px; color: var(--text-4); letter-spacing: 0.04em; }
.footer-meta a { color: var(--text-3); }
.footer-meta a:hover { color: var(--accent); }

/* ---------------- V2 Vision / Roadmap ---------------- */
.vision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}
.vision-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 36px 34px;
  position: relative;
}
.vision-card--next {
  background:
    linear-gradient(180deg, rgba(15, 74, 56, 0.28), rgba(10, 60, 46, 0.08)),
    var(--surface);
  border-color: var(--green-line);
}
.vision-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin-bottom: 18px;
}
.vision-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 14px;
}
.vision-card > p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}
.vision-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.vision-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}
.vision-list strong { color: var(--text); font-weight: 600; }

/* ---------------- Pricing ---------------- */
.pricing-prelim {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.prelim-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  flex: none;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 48px;
  align-items: stretch;
}
.plan {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 34px 30px;
  position: relative;
}
.plan--featured {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(219, 123, 34, 0.07), rgba(219, 123, 34, 0) 60%),
    var(--surface);
  box-shadow: 0 20px 60px -30px var(--accent-glow);
}
.plan-flag {
  position: absolute;
  top: -12px;
  left: 30px;
  white-space: nowrap;
  background: var(--accent);
  color: #0a0a0c;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 999px;
}
.plan-head { margin-bottom: 22px; }
.plan-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  margin: 0 0 6px;
}
.plan-who {
  color: var(--text-3);
  font-size: 13px;
  margin: 0;
  line-height: 1.4;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
}
.plan-price .currency { color: var(--text-2); font-size: 20px; font-weight: 500; }
.plan-price .amount { color: var(--text); font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.plan-price .per { color: var(--text-3); font-size: 14px; margin-left: 4px; }
.plan-features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.plan-features li {
  position: relative;
  padding-left: 24px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
}
.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px; height: 7px;
  border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}
.plan-features li strong { color: var(--text); font-weight: 600; }
.plan-meter {
  color: var(--text-3) !important;
  font-size: 12.5px !important;
  letter-spacing: 0.02em;
}
.plan-meter::before { display: none; }
.plan .btn-block { margin-top: auto; }
.pricing-foot {
  margin-top: 34px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.6;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------- Reveal animation ---------------- */
/* Only hide when JS is active (html.js). Without JS, content shows normally. */
html.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  :root { --gap-section: 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 56px; }
  .hero-visual { order: -1; }
  .engine-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards-3, .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .vision-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 440px; margin-left: auto; margin-right: auto; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .nav-inner { padding: 0 18px; }
  .section, .hero, .strip { padding-left: 18px; padding-right: 18px; }
  .waitlist-form { padding: 24px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .footer-meta { flex-direction: column; gap: 10px; align-items: flex-start; }
}
