/* ============================================================
   LEVERIX — shared styles
   Dark base, orange (hot/source) + teal (cold/replica) accents
   ============================================================ */

:root {
  --void:      #0a0e13;
  --surface:   #10171f;
  --raised:    #161f2a;
  --line:      #22303c;
  --line-soft: #1a2430;
  --ink:       #eaf1f5;
  --muted:     #93a4b2;
  --faint:     #61707d;
  --teal:      #2dd4bf;
  --teal-dim:  #1b8f83;
  --orange:    #ff7a2f;
  --orange-dim:#c85818;

  --maxw: 1180px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --radius: 14px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient background glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50rem 40rem at 78% -8%, rgba(255,122,47,.10), transparent 60%),
    radial-gradient(46rem 38rem at 12% 8%, rgba(45,212,191,.08), transparent 62%),
    radial-gradient(60rem 50rem at 50% 120%, rgba(45,212,191,.05), transparent 60%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.2rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--teal), transparent);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.16rem; letter-spacing: -.01em; }

p { margin: 0 0 1rem; color: var(--muted); }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #b9c6d0; max-width: 40ch; }

.accent-o { color: var(--orange); }
.accent-t { color: var(--teal); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10,14,19,.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex; align-items: center; gap: 1.5rem;
  height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.16rem;
  letter-spacing: .14em;
  display: inline-flex; align-items: center; gap: .6rem;
}
.brand .mark {
  width: 15px; height: 15px; position: relative; display: inline-block;
}
.brand .mark::before, .brand .mark::after {
  content: ""; position: absolute; inset: 0; border-radius: 3px;
}
.brand .mark::before { background: var(--orange); transform: translate(-2px,-2px); }
.brand .mark::after  { background: var(--teal); transform: translate(2px,2px); mix-blend-mode: screen; }

.nav-links { display: flex; gap: 1.6rem; margin-left: auto; align-items: center; }
.nav-links a:not(.btn) {
  font-size: .93rem; color: var(--muted);
  padding: .3rem 0; position: relative; transition: color .18s;
}
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--teal));
  border-radius: 2px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 500; font-size: .93rem;
  padding: .68rem 1.25rem; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .16s, box-shadow .2s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn-primary {
  color: #0a0e13;
  background: linear-gradient(135deg, var(--orange), #ff9a5c);
  box-shadow: 0 6px 24px -8px rgba(255,122,47,.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(255,122,47,.7); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--teal-dim); background: rgba(45,212,191,.06); }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 42px; height: 38px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10,14,19,.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: .5rem 1.1rem 1.2rem;
    transform: translateY(-120%); transition: transform .28s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a:not(.btn) { padding: .85rem .2rem; border-bottom: 1px solid var(--line-soft); }
  .nav-links .btn { margin-top: .8rem; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(3.6rem, 8vw, 6.5rem); }
.section-tight { padding-block: clamp(2.6rem, 5vw, 4rem); }

.section-head { max-width: 46ch; margin-bottom: 2.6rem; }
.section-head p { margin-top: .9rem; }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(2.6rem, 6vw, 5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero h1 { margin-bottom: 1.3rem; }
.hero .lead { margin-bottom: 2rem; max-width: 46ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.hero-trust { display: flex; gap: 1.8rem; flex-wrap: wrap; font-family: var(--font-mono); font-size: .78rem; color: var(--faint); letter-spacing: .04em; }
.hero-trust b { color: var(--teal); font-weight: 500; }

.hero-visual {
  position: relative; aspect-ratio: 1 / 1; min-height: 320px;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22,31,42,.5), rgba(16,23,31,.2));
  overflow: hidden;
}
.hero-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-visual .hv-tag {
  position: absolute; left: 14px; bottom: 12px;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em;
  color: var(--faint); text-transform: uppercase;
}
.hv-legend { position: absolute; right: 14px; top: 12px; display: flex; flex-direction: column; gap: .4rem; font-family: var(--font-mono); font-size: .66rem; color: var(--muted); }
.hv-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.hv-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 460px; }
}

/* ---------- pillars / cards ---------- */
.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 940px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--raised), var(--surface));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.5rem 1.45rem;
  position: relative;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--line); transform: translateY(-3px); }
.card .ic {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 1.1rem;
  background: rgba(45,212,191,.08); border: 1px solid rgba(45,212,191,.18);
  color: var(--teal);
}
.card.hot .ic { background: rgba(255,122,47,.09); border-color: rgba(255,122,47,.2); color: var(--orange); }
.card .ic svg { width: 20px; height: 20px; }
.card h3 { margin-bottom: .5rem; }
.card p { margin: 0; font-size: .94rem; }

/* ---------- metrics ---------- */
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: rgba(22,31,42,.35); overflow: hidden;
}
.metric { padding: 1.6rem 1.4rem; border-right: 1px solid var(--line-soft); }
.metric:last-child { border-right: none; }
.metric .num { font-family: var(--font-mono); font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 500; color: var(--ink); letter-spacing: -.02em; }
.metric .num .u { color: var(--orange); }
.metric .lab { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
@media (max-width: 780px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: none; }
  .metric:nth-child(1), .metric:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
}

/* ---------- service blocks (alternating) ---------- */
.svc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 4vw, 3.4rem); align-items: center; padding-block: clamp(2.2rem, 5vw, 3.6rem); border-top: 1px solid var(--line-soft); }
.svc:first-of-type { border-top: none; }
.svc .svc-media {
  aspect-ratio: 4/3; border-radius: var(--radius); border: 1px solid var(--line-soft);
  background:
    linear-gradient(135deg, rgba(255,122,47,.06), rgba(45,212,191,.06)),
    var(--surface);
  position: relative; overflow: hidden; display: grid; place-items: center;
}
.svc:nth-child(even) .svc-media { order: 2; }
.svc-media .glyph { width: 46%; opacity: .9; }
.svc h2 { margin-bottom: .8rem; }
.svc .tag { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--orange); display: block; margin-bottom: .7rem; }
.svc ul { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: .55rem; }
.svc li { position: relative; padding-left: 1.5rem; font-size: .93rem; color: #b6c3cd; }
.svc li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--teal); }
@media (max-width: 820px) {
  .svc { grid-template-columns: 1fr; }
  .svc:nth-child(even) .svc-media { order: 0; }
}

/* ---------- process (numbered — real sequence) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: s; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.4rem 1.3rem; background: var(--surface); }
.step .n { font-family: var(--font-mono); font-size: .8rem; color: var(--orange); letter-spacing: .1em; }
.step h3 { margin: .5rem 0 .5rem; font-size: 1.02rem; }
.step p { margin: 0; font-size: .9rem; }

/* ---------- cases ---------- */
.case {
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; background: linear-gradient(180deg, var(--raised), var(--surface));
  display: flex; flex-direction: column; gap: 1rem;
}
.case .co { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.case .res { display: flex; gap: 1.6rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.case .res div { }
.case .res .rn { font-family: var(--font-mono); font-size: 1.4rem; color: var(--orange); font-weight: 500; }
.case .res .rl { font-size: .76rem; color: var(--muted); }
.case p { margin: 0; font-size: .95rem; color: #b6c3cd; }

/* ---------- testimonials ---------- */
.quote {
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; background: var(--surface);
}
.quote p { color: var(--ink); font-size: 1rem; margin-bottom: 1.1rem; }
.quote .by { display: flex; align-items: center; gap: .8rem; }
.quote .av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--orange-dim), var(--teal-dim)); flex: none; }
.quote .who { font-size: .86rem; }
.quote .who b { display: block; color: var(--ink); font-weight: 500; }
.quote .who span { color: var(--faint); font-family: var(--font-mono); font-size: .74rem; }

/* ---------- logos ---------- */
.logos { display: flex; flex-wrap: wrap; gap: 1.4rem 2.6rem; align-items: center; opacity: .6; }
.logos span { font-family: var(--font-display); font-weight: 600; letter-spacing: .04em; color: var(--muted); font-size: 1.05rem; }

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid var(--line-soft); border-radius: 18px;
  padding: clamp(2rem, 5vw, 3.2rem);
  background:
    radial-gradient(30rem 20rem at 85% 10%, rgba(255,122,47,.12), transparent 60%),
    radial-gradient(28rem 20rem at 5% 90%, rgba(45,212,191,.1), transparent 60%),
    var(--surface);
  display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; flex-wrap: wrap;
}
.cta-band h2 { max-width: 20ch; }
.cta-band p { margin: .6rem 0 0; max-width: 40ch; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .form-grid { grid-template-columns: 1fr; } }

.seg { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); margin-bottom: 1.6rem; }
.seg button {
  font-family: var(--font-body); font-size: .88rem; color: var(--muted);
  background: none; border: none; padding: .55rem 1.05rem; border-radius: 8px; cursor: pointer; transition: all .18s;
}
.seg button[aria-selected="true"] { background: linear-gradient(135deg, rgba(255,122,47,.16), rgba(45,212,191,.16)); color: var(--ink); }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .84rem; color: var(--muted); margin-bottom: .4rem; font-weight: 500; }
.field label .req { color: var(--orange); }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: .95rem; color: var(--ink);
  background: var(--void); border: 1px solid var(--line); border-radius: 10px;
  padding: .72rem .9rem; transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--teal-dim); box-shadow: 0 0 0 3px rgba(45,212,191,.14);
}
.field.err input, .field.err textarea, .field.err select { border-color: var(--orange); }
.field .msg { font-size: .78rem; color: var(--orange); margin-top: .35rem; min-height: 1em; }

.form-note { font-size: .82rem; color: var(--faint); margin-top: .4rem; }

.form-side .panel { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.4rem 1.35rem; background: var(--surface); margin-bottom: 1rem; }
.form-side h3 { font-size: 1rem; margin-bottom: .7rem; }
.form-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.form-side li { position: relative; padding-left: 1.5rem; font-size: .9rem; color: var(--muted); }
.form-side li::before { content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

.form-success {
  border: 1px solid rgba(45,212,191,.3); border-radius: var(--radius);
  background: rgba(45,212,191,.06); padding: 1.6rem 1.5rem; display: none;
}
.form-success.show { display: block; }
.form-success h3 { color: var(--teal); margin-bottom: .5rem; }
.form-success p { margin: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 2rem; padding-block: 2.6rem; }
.foot-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.foot-brand { max-width: 30ch; }
.foot-brand p { font-size: .88rem; margin-top: .8rem; }
.foot-cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.foot-col h4 { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 0 .9rem; font-weight: 500; }
.foot-col a { display: block; font-size: .9rem; color: var(--muted); padding: .25rem 0; transition: color .16s; }
.foot-col a:hover { color: var(--ink); }
.foot-base { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--faint); font-family: var(--font-mono); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* focus visibility */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
