/* =====================================================================
   Valley Automated Integrations — "Valley Operations" design system
   Palette: deep field-green + harvest-gold + warm ink on warm paper.
   Type: Bricolage Grotesque (display) / Inter (body) / IBM Plex Mono (data).
   ===================================================================== */

:root {
  /* color */
  --ink: #181712;          /* warm near-black */
  --ink-soft: #38352c;
  --slate: #615c50;        /* secondary text */
  --slate-light: #8a8578;
  --paper: #f6f4ee;        /* page background */
  --panel: #fffdf8;        /* raised cards */
  --panel-2: #efece2;      /* sunken / alt rows */
  --line: #ddd7c8;         /* hairline */
  --line-strong: #c8c1ad;

  --field: #2e5339;        /* deep valley green (brand) */
  --field-deep: #21402b;
  --field-bright: #3c6e49;
  --field-tint: #e6efe6;

  --harvest: #b5791f;      /* harvest gold (accent) */
  --harvest-deep: #94600f;
  --harvest-tint: #f4e9d2;

  --danger: #9a3b2a;

  /* type */
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* scale */
  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 1.9vw, 3.1rem);
  --step-4: clamp(2.7rem, 2rem + 3.4vw, 4.7rem);

  /* space + shape */
  --gutter: clamp(1.1rem, 0.6rem + 2.4vw, 2.6rem);
  --maxw: 1180px;
  --radius: 7px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(24, 23, 18, 0.05), 0 10px 30px -18px rgba(24, 23, 18, 0.28);
  --shadow-lg: 0 30px 70px -40px rgba(33, 64, 43, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
  color: var(--ink);
}

p { margin: 0 0 1rem; }
a { color: var(--field); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--field-deep); }
img { max-width: 100%; display: block; }

/* ---- layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.2rem, 2rem + 6vw, 6.4rem); }
.section--tight { padding-block: clamp(2.2rem, 1.5rem + 3vw, 3.6rem); }
.section--green { background: var(--field-deep); color: #f3efe4; }
.section--panel { background: var(--panel-2); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--harvest-deep);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--harvest);
  display: inline-block;
}
.section--green .eyebrow { color: var(--harvest-soft, #d9b162); }
.section--green .eyebrow::before { background: var(--harvest-soft, #d9b162); }

.lead { font-size: var(--step-1); color: var(--ink-soft); max-width: 46ch; }
.muted { color: var(--slate); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-body); font-weight: 600; font-size: var(--step-0);
  padding: 0.78em 1.35em; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--field); color: #f7f7f1; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--field-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(24,23,18,0.03); }
.btn-gold { background: var(--harvest); color: #211a06; }
.btn-gold:hover { background: var(--harvest-deep); color: #fff; }
.section--green .btn-ghost { color: #f3efe4; border-color: rgba(243,239,228,0.4); }
.section--green .btn-ghost:hover { border-color: #f3efe4; background: rgba(255,255,255,0.06); }
.btn-arrow::after { content: "\2192"; font-family: var(--font-mono); }

/* =====================================================================
   NAV
   ===================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.85rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 6px; flex: none;
  background:
    linear-gradient(135deg, var(--field-bright), var(--field-deep));
  position: relative; overflow: hidden;
}
.brand__mark::after {
  /* section-grid motif: the 1-mile Valley grid */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(247,247,241,0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247,247,241,0.55) 1px, transparent 1px);
  background-size: 9px 9px; background-position: -1px -1px;
  opacity: 0.7;
}
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a { font-size: var(--step--1); color: var(--ink-soft); text-decoration: none; font-weight: 500; letter-spacing: 0.01em; }
.nav__links a:hover { color: var(--field); }
.nav__cta { font-size: var(--step--1) !important; padding: 0.6em 1em; }
.nav__toggle { display: none; }

/* =====================================================================
   HERO + operations ledger signature
   ===================================================================== */
.hero { padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(3rem, 2rem + 4vw, 5rem); position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.hero h1 { font-size: var(--step-4); max-width: 14ch; }
.hero h1 .accent { color: var(--field); }
.hero h1 .ul { background: linear-gradient(transparent 64%, var(--harvest-tint) 64%); padding: 0 0.06em; }
.hero__sub { font-size: var(--step-1); color: var(--ink-soft); max-width: 44ch; margin-top: 0.4rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.hero__note { font-family: var(--font-mono); font-size: var(--step--1); color: var(--slate); margin-top: 1.1rem; }

/* ledger card */
.ledger {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.ledger__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.1rem; background: var(--field-deep); color: #eef3ea;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.ledger__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--harvest-soft, #d9b162); box-shadow: 0 0 0 3px rgba(217,177,98,0.25); }
.ledger__rows { padding: 0.4rem 0.5rem; }
.ledger-row {
  display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.8rem;
  align-items: center; padding: 0.7rem 0.7rem; border-bottom: 1px dashed var(--line);
  opacity: 0; transform: translateY(6px); animation: rowin 0.5s ease forwards;
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-row__task { font-weight: 600; font-size: 0.95rem; }
.ledger-row__flow { font-family: var(--font-mono); font-size: 0.78rem; color: var(--slate); }
.ledger-row__flow s { color: var(--slate-light); }
.ledger-row__flow .to { color: var(--field); font-weight: 600; }
.ledger-row__save { font-family: var(--font-mono); font-weight: 600; color: var(--harvest-deep); font-size: 0.86rem; justify-self: end; white-space: nowrap; }
.ledger__total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; background: var(--harvest-tint); border-top: 1px solid var(--line);
}
.ledger__total .label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--harvest-deep); max-width: 14ch; line-height: 1.3; }
.ledger__total .value { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); color: var(--field-deep); letter-spacing: -0.03em; }
.ledger__total .value small { font-size: 0.4em; color: var(--slate); font-family: var(--font-mono); font-weight: 500; }

@keyframes rowin { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ledger-row { animation: none; opacity: 1; transform: none; }
}

/* =====================================================================
   PROBLEM strip
   ===================================================================== */
.prob__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; margin-top: 2rem; }
.prob-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.3rem 1.4rem; }
.prob-card__n { font-family: var(--font-mono); font-size: 0.78rem; color: var(--harvest-deep); letter-spacing: 0.08em; }
.prob-card h3 { font-size: var(--step-1); margin-top: 0.5rem; }
.prob-card p { color: var(--slate); margin: 0; font-size: 0.96rem; }

/* =====================================================================
   SERVICES ladder (a genuine sequence -> numbering earns its place)
   ===================================================================== */
.ladder { display: grid; gap: 1rem; margin-top: 2.4rem; }
.rung {
  display: grid; grid-template-columns: auto 1fr auto; gap: clamp(1rem, 0.4rem + 2vw, 2.2rem);
  align-items: start; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.2rem, 0.8rem + 1.4vw, 1.9rem);
  position: relative; transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.rung:hover { border-color: var(--field-bright); transform: translateY(-2px); box-shadow: var(--shadow); }
.rung__step { font-family: var(--font-mono); font-size: 0.85rem; color: #fff; background: var(--field); width: 2.4rem; height: 2.4rem; border-radius: 8px; display: grid; place-items: center; font-weight: 600; }
.rung--feature .rung__step { background: var(--harvest); color: #211a06; }
.rung__body h3 { font-size: var(--step-2); margin-bottom: 0.3rem; }
.rung__body p { color: var(--slate); margin: 0; max-width: 58ch; }
.rung__tag { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--field); background: var(--field-tint); padding: 0.2em 0.6em; border-radius: 4px; margin-top: 0.8rem; }
.rung__price { text-align: right; white-space: nowrap; }
.rung__price .amt { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); color: var(--ink); letter-spacing: -0.02em; }
.rung__price .per { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--slate); letter-spacing: 0.04em; margin-top: 0.2rem; }

/* =====================================================================
   APPROACH / feature grid
   ===================================================================== */
.feat__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: clamp(1.2rem, 0.6rem + 2vw, 2.4rem); margin-top: 2.4rem; }
.feat { }
.feat__icon { font-family: var(--font-mono); font-weight: 600; color: var(--field); border: 1.5px solid var(--field-tint); background: var(--field-tint); width: 2.6rem; height: 2.6rem; border-radius: 8px; display: grid; place-items: center; font-size: 1.1rem; margin-bottom: 0.9rem; }
.section--green .feat__icon { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.16); color: var(--harvest-soft, #d9b162); }
.feat h3 { font-size: var(--step-1); }
.feat p { color: var(--slate); font-size: 0.97rem; margin: 0; }
.section--green .feat h3 { color: #f6f3ea; }
.section--green .feat p { color: #cdd4c6; }

/* verticals chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.chip { font-family: var(--font-mono); font-size: 0.8rem; padding: 0.45em 0.9em; border-radius: 100px; border: 1px solid rgba(255,255,255,0.2); color: #e9efe1; background: rgba(255,255,255,0.05); }

/* =====================================================================
   PRICING note table
   ===================================================================== */
.pricetable { width: 100%; border-collapse: collapse; margin-top: 2rem; font-size: 0.95rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.pricetable th, .pricetable td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.pricetable thead th { background: var(--field-deep); color: #eef3ea; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.pricetable tbody tr:last-child td { border-bottom: 0; }
.pricetable tbody tr:nth-child(even) td { background: var(--panel-2); }
.pricetable .amt { font-family: var(--font-mono); font-weight: 600; color: var(--field-deep); white-space: nowrap; }

/* =====================================================================
   CTA band + contact
   ===================================================================== */
.cta-band { text-align: center; }
.cta-band h2 { font-size: var(--step-3); max-width: 18ch; margin-inline: auto; color: #fbf8ef; }
.cta-band p { color: #cdd4c6; max-width: 50ch; margin-inline: auto; }
.cta-band .hero__cta { justify-content: center; }

.contact__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(1.6rem, 1rem + 3vw, 3.4rem); align-items: start; }
.contact-methods { display: grid; gap: 1rem; margin-top: 1.6rem; }
.cm { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1rem 1.1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.cm__k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--harvest-deep); }
.cm a { font-weight: 600; }

.form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.3rem, 0.8rem + 1.6vw, 2.1rem); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin-bottom: 0.4rem; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: var(--step-0); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  padding: 0.7em 0.85em;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--field); box-shadow: 0 0 0 3px var(--field-tint); }
.field textarea { resize: vertical; min-height: 120px; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.foot { background: var(--ink); color: #cfc9ba; padding-block: 2.6rem; font-size: 0.9rem; }
.foot__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.4rem; align-items: flex-start; }
.foot a { color: #e7e2d4; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot__links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.foot__fine { font-family: var(--font-mono); font-size: 0.72rem; color: #8a8472; margin-top: 1.4rem; border-top: 1px solid #2c2a22; padding-top: 1.2rem; }
.foot__portal { font-family: var(--font-mono); font-size: 0.74rem; }

/* =====================================================================
   misc / a11y
   ===================================================================== */
:focus-visible { outline: 3px solid var(--harvest); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 100; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.tag-callout { background: var(--field-tint); border-left: 3px solid var(--field); padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-soft); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .ledger { max-width: 480px; }
  .contact__grid { grid-template-columns: 1fr; }
  .rung { grid-template-columns: auto 1fr; }
  .rung__price { grid-column: 2; text-align: left; margin-top: 0.6rem; }
  .rung__price .per { display: inline; margin-left: 0.4rem; }
  .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: 1rem; background: var(--paper); padding: 1.2rem var(--gutter); border-bottom: 1px solid var(--line); }
  .nav__toggle { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); cursor: pointer; font-size: 1.1rem; }
}
