/* =================================================================
   Numbers Agentic — prototype styles
   Rebrand fast: change the variables in :root below.
   ================================================================= */
:root {
  --ink:        #f5f3ef;  /* headings / main text */
  --ink-soft:   #ccc8c1;  /* body text */
  --muted:      #9b968d;  /* secondary text */
  --line:       #37332c;  /* borders */
  --bg:         #1a1916;  /* page background (soft warm dark, not black) */
  --bg-alt:     #211f1b;  /* alternating section background */
  --surface:    #262320;  /* cards (slightly raised) */
  --accent:     #e8631c;  /* brand accent (darker orange) — change this first */
  --accent-ink: #cf5210;  /* button hover */
  --accent-soft:#ff9e5c;  /* accent text on tints */
  --accent-2:   #ecb44e;  /* secondary accent (amber/gold) — "the destination" */
  --accent-2-soft:#ffd98c;/* gold text on tints */
  --radius:     20px;
  --maxw:       1280px;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Space Grotesk', 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 58px; } /* tuck section top just under the 64px sticky nav so the previous section's edge doesn't peek */

body {
  font-family: var(--font);
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.12; letter-spacing: -0.02em; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.18rem; color: var(--ink); text-decoration: none; letter-spacing: -0.03em; }
.brand-logo { height: 35px; width: auto; flex: none; display: block; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent); }
.nav-left { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; margin-left: -8px; padding: 0; background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: 8px; }
.nav-toggle:hover { color: var(--accent); }
.mobile-menu { display: none; }
@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }
  .mobile-menu.open { display: flex; flex-direction: column; padding: 6px 0 12px; border-top: 1px solid var(--line); }
  .mobile-menu a { color: var(--ink-soft); text-decoration: none; font-weight: 500; padding: 12px 22px; }
  .mobile-menu a:hover, .mobile-menu a:active { color: var(--accent); background: var(--bg-alt); }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  text-decoration: none; font-weight: 600; padding: 12px 24px;
  border-radius: 999px; border: 1px solid var(--accent);
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-ink); transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--muted); }

/* ---------- HERO ---------- */
.hero { position: relative; overflow: hidden; padding: 48px 0 48px; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(72px); pointer-events: none; z-index: 0; }
.hero::before { top: -227.5px; right: -152.5px; width: 575px; height: 575px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 68%); opacity: 0.6; }
.hero::after { bottom: -170px; left: -90px; width: 420px; height: 420px; background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 45%, transparent), transparent 68%); opacity: 0.32; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; display: block; }
.hero-img { width: 100%; height: auto; display: block;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0,0,0,0.45); }
.nv-panel { fill: var(--bg-alt); stroke: var(--line); stroke-width: 1.5; }
.nv-line { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0.38; }
.nv-node { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.nv-dot { fill: var(--accent); opacity: 0.55; }
.nv-glow { fill: var(--accent); opacity: 0.12; }
.nv-hub { fill: var(--accent); }
.nv-spark { fill: #fff; }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { max-width: 360px; }
}
.eyebrow { font-family: var(--font-head); color: var(--accent); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 3.8rem); font-weight: 700; margin-bottom: 24px; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 640px; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- SECTIONS ---------- */
.section { padding: 40px 0 56px; } /* 40 top; 56 bottom offsets heading leading so gaps look even */
#services { padding-top: 36px; }   /* slightly tighter right under the hero */
#approach, #why { padding-bottom: 42px; } /* end in text, not cards — tighter bottom reads even */
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; margin-bottom: 12px; }
.section-lede { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin-bottom: 44px; }

/* ---------- GRID + CARDS ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.step-num { position: absolute; top: 16px; right: 24px; font-family: var(--font-head); font-weight: 700;
  font-size: 2.6rem; line-height: 1; color: color-mix(in srgb, var(--accent) 24%, transparent); }
.card:hover { border-color: var(--accent); box-shadow: 0 10px 34px color-mix(in srgb, var(--accent) 18%, transparent); transform: translateY(-2px); }
.card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.kicker { display: block; color: var(--accent); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.ic { width: 40px; height: 40px; display: block; margin-bottom: 16px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic .fill { fill: var(--accent); stroke: none; }

.why-item h3 { font-size: 1.2rem; font-weight: 600; margin: 12px 0 10px; }
.why-num { color: var(--accent); font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.work-card .tag, .tag {
  display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--accent-soft);
  background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* ---------- MATURITY LADDER ---------- */
.ladder-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 16px 2px 18px; }
.ladder { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 16px; min-width: 900px; }
@media (min-width: 1000px) { .ladder { min-width: 0; } }
/* hide native scrollbar — replaced by the custom JS-driven .ladder-bar below (works on iOS too) */
.ladder-scroll { scrollbar-width: none; }
.ladder-scroll::-webkit-scrollbar { display: none; }
/* custom scroll indicator; JS shows it only when the ladder overflows (<1000px), so desktop never sees it */
.ladder-bar { display: none; height: 5px; margin: 6px 2px 0; background: var(--bg-alt); border-radius: 999px; }
.ladder-bar-thumb { height: 100%; width: 30%; border-radius: 999px; background: color-mix(in srgb, var(--accent) 60%, transparent); }

.lvl-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.lvl-card:hover { transform: translateY(-2px); box-shadow: 0 10px 34px color-mix(in srgb, var(--accent) 16%, transparent); }
.lvl-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--bg-alt); color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums;
}
.lvl-card h3 { font-size: 1.05rem; font-weight: 600; margin: 14px 0 12px; }
.lvl-bar { height: 5px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.lvl-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.lvl-points { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 13px; }
.lvl-points li { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.45; }
.lvl-points li b {
  display: block; color: var(--muted); font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px;
}
.lvl-tag {
  margin-top: auto; align-self: flex-start;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 5px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 18%, transparent); color: var(--accent-2-soft);
}
.lvl-tag.muted-tag { background: var(--bg-alt); color: var(--muted); }
.lvl-card.is-target { border-color: var(--accent-2); box-shadow: 0 10px 34px color-mix(in srgb, var(--accent-2) 18%, transparent); }
.lvl-card.is-target .lvl-badge { background: var(--accent-2); color: #2a1d05; }

.ladder-note { margin-top: 24px; color: var(--ink); font-weight: 500; font-size: 1.05rem; max-width: 780px; }
.ladder-note::before { content: "→ "; color: var(--accent); font-weight: 700; }

/* ---------- CONTACT ---------- */
#contact { position: relative; overflow: hidden; }
#contact::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1px);
  background-size: 24px 24px; }
.contact { position: relative; z-index: 1; text-align: center; }
.contact .section-lede { margin-left: auto; margin-right: auto; }
.contact-icons { display: flex; gap: 18px; justify-content: center; }
.ic-btn { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s, transform .15s; }
.ic-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.ic-btn svg { display: block; }
.ic-mail { color: var(--accent); }

/* ---------- CLICKABLE WORK CARDS ---------- */
.work-card { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; }
.work-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.work-thumb { width: 100%; aspect-ratio: 1894 / 1335; object-fit: cover; object-position: center; border-radius: 10px; border: 1px solid var(--line); margin-top: 18px; display: block; }
.work-more { display: inline-block; margin-top: 16px; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.work-card:hover .work-more { text-decoration: underline; }

/* ---------- MODAL ---------- */
.modal { position: fixed; inset: 0; z-index: 100; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: var(--bg); }
.modal-box {
  position: absolute; inset: 0; z-index: 1; background: var(--bg);
  width: 100%; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal-inner { max-width: var(--maxw); margin: 0 auto; padding: 52px 24px 72px; }
.modal-close {
  position: fixed; top: 18px; right: 22px; z-index: 3;
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--line);
  font-size: 1.5rem; line-height: 1; color: var(--ink); cursor: pointer;
}
.modal-close:hover { background: var(--line); }
.modal-box h3 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 16px 0 18px; }
.case-body { display: flex; gap: 34px; align-items: flex-start; margin-bottom: 26px; }
.case-left { flex: 1 1 54%; min-width: 0; }
.case-left h3 { margin-top: 0; }
.case-desc { font-size: 1.15rem; color: var(--ink-soft); margin: 0; }
.case-left .case-results { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.case-left .case-results h4 { text-align: left; }
.case-left .case-meta { margin: 30px 0 0; }
.case-shots { display: grid; gap: 16px; flex: 1 1 46%; min-width: 0; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.shot figcaption { color: var(--muted); font-size: 0.8rem; margin-top: 8px; line-height: 1.4; }
.case-meta { display: flex; gap: 44px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.case-meta-k { display: block; color: var(--muted); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.case-meta div span:last-child { font-weight: 600; color: var(--ink); }
.case-results h4 { text-align: center; color: var(--muted); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 22px; }
.results-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; }
.stat .ic { width: 30px; height: 30px; margin: 0 auto 8px; }
.stat-val { display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; line-height: 1.1; }
.stat-lab { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 5px; line-height: 1.35; }
@media (max-width: 640px) { .case-body { flex-direction: column; gap: 22px; } }
@media (max-width: 520px) { .results-grid { grid-template-columns: repeat(2, 1fr); } .case-meta { gap: 30px; } }

/* ---------- FOOTER ---------- */
.footer { padding: 13px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; font-size: 0.9rem; color: var(--muted); }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.footer-meta a { color: var(--muted); text-decoration: none; }
.footer-meta a:hover { color: var(--accent); }
.footer-loc { display: inline-flex; align-items: center; gap: 6px; }
.footer-loc svg { opacity: 0.85; }
.footer-legal { flex-basis: 100%; margin: 0; font-size: 0.78rem; line-height: 1.4; color: var(--muted); opacity: 0.8; }
.muted { color: var(--muted); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 24px 0 35px; }
  .section { padding: 56px 0; }
  #services { padding-top: 28px; padding-bottom: 40px; }
  #benefits { padding-top: 32px; padding-bottom: 40px; }
  #approach { padding-top: 32px; padding-bottom: 38px; }
  #why { padding-top: 32px; padding-bottom: 34px; }
  #work { padding-top: 32px; padding-bottom: 44px; }
  #contact { padding-top: 32px; }
}
