/* =========================================================
   PERFORIENT — site styles
   Brand: deep navy (trust, engineering) + signal orange (urgency, action)
   ========================================================= */

/* Self-hosted fonts (SIL Open Font License), latin subset, variable weight */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
}

:root {
  --navy-900: #071528;
  --navy-800: #0B1F3A;
  --navy-700: #13305A;
  --navy-500: #3A5682;
  --orange: #FF7A1A;
  --orange-600: #C2410C; /* accessible orange: 5.2:1 with white */
  --orange-700: #9A3412;
  --orange-50: #FFF3EA;
  --teal: #19B394;
  --teal-700: #0E7A64; /* accessible teal: 5:1 with white */
  --ink: #0E1726;
  --ink-2: #44506A;
  --ink-3: #6B7690;
  --line: #E3E8F0;
  --bg: #FFFFFF;
  --bg-soft: #F5F7FB;

  --font-head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 8px 24px rgba(11, 31, 58, .08);
  --shadow-lg: 0 24px 60px rgba(7, 21, 40, .35);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--navy-800); color: #D6DEEB; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange-600);
  margin-bottom: 14px;
}
.section--dark .eyebrow, .hero .eyebrow { color: var(--orange); }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 680px; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head);
  font-weight: 700; font-size: 1rem;
  padding: 15px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.btn--primary { background: var(--orange-600); color: #fff; box-shadow: 0 8px 22px rgba(194, 65, 12, .35); }
.btn--primary:hover { background: var(--orange-700); }
.btn--ghost { border-color: currentColor; color: var(--navy-800); background: transparent; }
.btn--ghost:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.btn--ghost-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--navy-800); border-color: #fff; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

.text-link {
  color: inherit; font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 2px;
  transition: color .15s;
}
.text-link:hover { color: var(--orange); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled, .site-header--solid {
  background: rgba(7, 21, 40, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand__mark { width: 36px; height: 36px; }
.brand__mark rect { fill: #fff; }
.brand__mark path { stroke: var(--orange); }
.brand__name { font-family: var(--font-head); font-weight: 800; letter-spacing: .16em; font-size: 1.08rem; }
.nav__links { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: #C9D3E3; text-decoration: none; font-weight: 500; font-size: .96rem; transition: color .15s; }
.nav__links a:hover { color: #fff; }
.nav__links .btn { color: #fff; padding: 11px 20px; font-size: .94rem; }
.nav__toggle {
  display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 8px; margin-right: -8px;
}
.nav__toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(255,122,26,.16), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgba(25,179,148,.10), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #C9D3E3;
  padding: 168px 0 112px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero__sub { font-size: 1.22rem; max-width: 620px; margin-bottom: 36px; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.hero__ctas .text-link { color: #fff; font-size: .98rem; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 44px; font-size: .9rem; color: #8FA0BC; }
.hero__trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust svg { width: 16px; height: 16px; color: var(--teal); }

/* Results panel in hero */
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
.panel__title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  color: #8FA0BC; margin-bottom: 18px;
}
.panel__live { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); }
.panel__live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(25,179,148,.2); }
.metric { padding: 18px 0; border-top: 1px solid rgba(255,255,255,.08); }
.metric:first-of-type { border-top: 0; padding-top: 4px; }
.metric__label { font-size: .88rem; color: #A9B6CC; margin-bottom: 8px; }
.metric__row { display: flex; align-items: baseline; gap: 12px; font-family: var(--font-head); color: #fff; }
.metric__from { font-size: 1.05rem; color: #7D8CA6; text-decoration: line-through; text-decoration-color: rgba(255,122,26,.7); }
.metric__arrow { color: var(--orange); font-weight: 800; }
.metric__to { font-size: 1.5rem; font-weight: 800; }
.metric__delta {
  margin-left: auto; font-size: .82rem; font-weight: 800; color: var(--navy-900);
  background: var(--orange); padding: 4px 10px; border-radius: 999px;
}
.bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); margin-top: 12px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--orange), #FFB36B); width: 0; transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.is-visible .bar span { width: var(--w); }

/* ---------- Problem ---------- */
.problem { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; }
.pain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pain-list li {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; font-weight: 500; color: var(--ink);
  transition: border-color .2s, transform .2s;
}
.pain-list li:hover { border-color: #FFC9A1; transform: translateX(4px); }
.pain-list .ico {
  flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--orange-50); color: var(--orange-600);
  display: grid; place-items: center;
}
.pain-list .ico svg { width: 18px; height: 18px; }
.callout {
  margin-top: 32px; padding: 28px 30px; border-radius: var(--radius);
  background: var(--navy-800); color: #D6DEEB; font-size: 1.12rem;
  border-left: 5px solid var(--orange);
}
.callout strong { color: #fff; font-family: var(--font-head); font-size: 1.3rem; display: block; margin-bottom: 6px; letter-spacing: -0.01em; }

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 30px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(11,31,58,.06), 0 18px 40px rgba(11,31,58,.12); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy-800); color: var(--orange); margin-bottom: 22px;
}
.card__icon svg { width: 26px; height: 26px; }
.card__num { font-family: var(--font-head); font-size: .8rem; font-weight: 800; color: var(--ink-3); letter-spacing: .1em; margin-bottom: 6px; }
.card p { color: var(--ink-2); margin: 0; }
.delivery {
  margin-top: 28px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 22px 28px; border-radius: var(--radius); background: #fff; border: 1px dashed #C6D0E0;
  color: var(--ink-2);
}
.delivery strong { color: var(--ink); font-family: var(--font-head); }
.delivery svg { width: 24px; height: 24px; color: var(--teal); flex: none; }

/* ---------- Proof / case studies ---------- */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.case {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg); padding: 38px 36px 34px;
  display: flex; flex-direction: column;
}
.case::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,122,26,.22), transparent 70%);
}
.case__tag {
  align-self: flex-start; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #A9B6CC; border: 1px solid rgba(255,255,255,.18); padding: 5px 12px; border-radius: 999px; margin-bottom: 26px;
}
.case__big { font-family: var(--font-head); font-weight: 800; color: #fff; font-size: clamp(3.4rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.04em; }
.case__big span { color: var(--orange); }
.case__biglabel { color: #C9D3E3; font-weight: 600; margin: 8px 0 26px; }
.case h3 { font-size: 1.3rem; margin-bottom: 14px; }
.case ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.case li { display: flex; gap: 12px; color: #C9D3E3; }
.case li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-top: 10px; }
.case .text-link { color: #fff; margin-top: auto; align-self: flex-start; }
.note { text-align: center; color: #8FA0BC; font-size: .9rem; margin: 30px 0 0; }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 28px; left: 28px; right: 28px; height: 2px;
  background: repeating-linear-gradient(90deg, #C6D0E0 0 8px, transparent 8px 16px);
}
.step { position: relative; }
.step__dot {
  position: relative; width: 56px; height: 56px; border-radius: 50%;
  background: #fff; border: 2px solid var(--navy-800); color: var(--navy-800);
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.1rem;
  margin-bottom: 22px;
}
.step:last-child .step__dot { background: var(--orange); border-color: var(--orange); color: #fff; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-2); margin: 0; }

/* ---------- Why us ---------- */
.why { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: center; }
.why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.why__item {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); padding: 26px 24px;
}
.why__item .k { font-family: var(--font-head); font-weight: 800; color: #fff; font-size: 1.9rem; line-height: 1.1; margin-bottom: 8px; letter-spacing: -0.02em; }
.why__item .k small { font-size: 1rem; color: var(--orange); font-weight: 800; }
.why__item p { margin: 0; color: #B8C4D8; font-size: .97rem; }
.quote {
  font-family: var(--font-head); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; color: #fff;
  line-height: 1.3; letter-spacing: -0.01em; margin: 26px 0 0;
}
.quote span { color: var(--orange); }

/* ---------- Contact / final CTA ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact__options { display: grid; gap: 16px; margin-top: 32px; }
.option {
  display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px;
  border-radius: var(--radius); border: 1px solid var(--line); background: #fff;
}
.option__ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--orange-50); color: var(--orange-600); display: grid; place-items: center; }
.option__ico svg { width: 22px; height: 22px; }
.option h3 { font-size: 1.08rem; margin-bottom: 4px; }
.option p { margin: 0 0 12px; color: var(--ink-2); font-size: .97rem; }
.option .btn { padding: 11px 20px; font-size: .94rem; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; color: var(--ink-2); }
.checks svg { flex: none; width: 20px; height: 20px; color: var(--teal); margin-top: 4px; }

.form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow);
}
.form h3 { font-size: 1.4rem; margin-bottom: 4px; }
.form > p { color: var(--ink-2); margin-bottom: 24px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.field label .opt { color: var(--ink-3); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 13px 14px; border-radius: 10px; border: 1.5px solid #D5DCE7; background: #FBFCFE;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-500); background: #fff; box-shadow: 0 0 0 4px rgba(58,86,130,.14);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #D64545; }
.form__fine { font-size: .84rem; color: var(--ink-3); margin: 14px 0 0; text-align: center; }
.form__status { margin-top: 16px; padding: 14px 16px; border-radius: 10px; font-size: .95rem; display: none; }
.form__status.is-ok { display: block; background: #E8F7F3; color: #0E6B57; }
.form__status.is-err { display: block; background: #FDECEC; color: #9B2C2C; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #8FA0BC; padding: 64px 0 36px; font-size: .95rem; }
.footer__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer__tag { font-family: var(--font-head); color: #fff; font-size: 1.3rem; font-weight: 700; margin: 18px 0 0; max-width: 360px; line-height: 1.35; }
.footer__tag span { color: var(--orange); }
.footer__cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer__cols h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer__cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer__cols a { text-decoration: none; color: #A9B6CC; }
.footer__cols a:hover { color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; font-size: .86rem; }

/* ---------- Case study pages ---------- */
.cs-hero { padding: 152px 0 80px; }
.crumbs { font-size: .9rem; color: #8FA0BC; margin-bottom: 22px; }
.crumbs a { color: #C9D3E3; text-decoration: none; }
.crumbs a:hover { color: #fff; }
.cs-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); max-width: 900px; }
.cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-top: 44px; }
.cs-stat { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 24px; }
.cs-stat .k { font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -0.03em; }
.cs-stat .k span { color: var(--orange); }
.cs-stat p { margin: 10px 0 0; color: #A9B6CC; font-size: .95rem; }
.cs-body { display: grid; grid-template-columns: 1fr 320px; gap: 72px; align-items: start; }
.cs-block { margin-bottom: 56px; }
.cs-block h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
.cs-block p { color: var(--ink-2); font-size: 1.08rem; }
.ba { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.ba th, .ba td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.ba tr:last-child td { border-bottom: 0; }
.ba th { background: var(--bg-soft); font-family: var(--font-head); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.ba td:first-child { font-weight: 600; color: var(--ink); }
.ba .before { color: var(--ink-3); }
.ba .after { color: var(--ink); font-weight: 700; }
.ba .after b { color: var(--orange-600); }
.aside {
  position: sticky; top: 104px;
  background: var(--navy-800); color: #C9D3E3; border-radius: var(--radius-lg); padding: 30px;
}
.aside h3 { color: #fff; font-size: 1.25rem; }
.aside p { font-size: .97rem; }
.aside dl { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 12px; font-size: .92rem; }
.aside dt { color: #8FA0BC; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.aside dd { margin: 2px 0 0; color: #fff; }
.next-case {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 30px 34px; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--line);
  text-decoration: none; transition: border-color .2s;
}
.next-case:hover { border-color: var(--orange); }
.next-case small { display: block; color: var(--ink-3); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .76rem; margin-bottom: 4px; }
.next-case strong { font-family: var(--font-head); font-size: 1.25rem; color: var(--ink); }
.next-case .arrow { font-size: 1.6rem; color: var(--orange); }

/* ---------- Process animation (see-the-fix + case pages) ---------- */
.flow {
  margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.flow--case { margin: 0 0 72px; }
.flow__bar {
  display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap;
  padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.flow__title { font-family: var(--font-head); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.flow__status {
  display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600;
  color: var(--orange-600); background: var(--orange-50); padding: 5px 12px 5px 10px; border-radius: 999px;
  transition: background .3s, color .3s;
}
.flow__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 rgba(194,65,12,.45); animation: flow-pulse 1.6s ease-out infinite; }
@keyframes flow-pulse { 0% { box-shadow: 0 0 0 0 rgba(194,65,12,.45); } 100% { box-shadow: 0 0 0 8px rgba(194,65,12,0); } }
.flow.is-fixed .flow__status { color: var(--teal-700); background: #E8F7F3; }
.flow.is-fixed .flow__dot { animation: none; box-shadow: 0 0 0 3px rgba(25,179,148,.25); }
.flow__toggle {
  margin-left: auto; display: inline-flex; padding: 4px; gap: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
}
.flow__toggle button {
  font: inherit; font-family: var(--font-head); font-weight: 700; font-size: .9rem;
  border: 0; border-radius: 999px; padding: 9px 18px; cursor: pointer;
  background: transparent; color: var(--ink-2); transition: background .2s, color .2s, box-shadow .2s;
}
.flow__toggle button:hover { color: var(--ink); }
.flow__toggle button[aria-pressed="true"] { background: var(--navy-800); color: #fff; }
.flow__toggle button.is-fix[aria-pressed="true"] { background: var(--orange-600); box-shadow: 0 6px 16px rgba(194,65,12,.3); }
.flow__toggle button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.flow__canvas { padding: 20px 22px 6px; }
.flow__canvas svg { width: 100%; height: auto; overflow: visible; }
.flow__cap { padding: 16px 22px 20px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .95rem; }
.flow__cap .text-link { white-space: nowrap; }

/* diagram drawing (SVG is generated by main.js) */
.dg-pipe { stroke: var(--navy-800); stroke-width: 2; fill: none; }
.dg-pipe-fast { stroke: var(--teal); stroke-width: 2.5; fill: none; stroke-dasharray: 7 6; stroke-linecap: round; opacity: 0; transition: opacity .5s; }
.dg-st rect { fill: #fff; stroke: var(--navy-800); stroke-width: 1.5; transition: opacity .5s, fill .3s; }
.dg-st text { font-family: var(--font-head); font-size: 13px; font-weight: 700; fill: var(--ink); transition: opacity .5s; }
.dg-st .dg-idx { font-family: var(--font-body); font-size: 10.5px; font-weight: 500; fill: var(--ink-3); }
.dg-x { stroke: var(--orange-600); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 160; stroke-dashoffset: 160; transition: stroke-dashoffset .45s ease; }
.dg-tag { opacity: 0; transition: opacity .4s .3s; }
.dg-st .dg-tag rect { fill: var(--orange-600); stroke: none; }
.dg-st .dg-tag--auto rect { fill: var(--teal-700); }
.dg-tag text { font-family: var(--font-head); font-size: 10px; font-weight: 800; letter-spacing: .08em; fill: #fff; }
.dg-leak line { stroke: var(--orange-600); stroke-width: 1.5; stroke-dasharray: 3 4; transition: opacity .4s; }
.dg-leak text { font-family: var(--font-body); font-size: 12px; font-weight: 500; fill: var(--orange-600); transition: opacity .4s; }
.dg-leak .dg-leak-k { font-family: var(--font-head); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; }
.dg-dim line { stroke: var(--navy-800); stroke-width: 1.3; fill: none; }
.dg-dim .dg-dim-ext { stroke: #B9C3D3; stroke-dasharray: 2 3; }
.dg-dim text { font-family: var(--font-head); font-size: 12.5px; font-weight: 800; fill: var(--ink); }
.dg-dim .dg-dim-bg { fill: var(--bg-soft); stroke: var(--line); }
.dg-dim--before { transition: opacity .5s; }
.dg-dim--after line { stroke: var(--teal-700); }
.dg-dim--after text { fill: var(--teal-700); }
.dg-dim--after { opacity: 0; transition: opacity .5s .4s; }
.dg-p { fill: var(--navy-700); transition: fill .3s; }
.dg-p--leak { fill: var(--orange); }

.flow.is-fixed .dg-st.is-removed > rect, .flow.is-fixed .dg-st.is-removed > text { opacity: .3; }
.flow.is-fixed .dg-st.is-removed .dg-x { stroke-dashoffset: 0; }
.flow.is-fixed .dg-tag { opacity: 1; }
.flow.is-fixed .dg-leak line, .flow.is-fixed .dg-leak text { opacity: 0; }
.flow.is-fixed .dg-pipe-fast { opacity: 1; }
.flow.is-fixed .dg-dim--after { opacity: 1; }
.flow.is-fixed .dg-dim--before { opacity: .3; }
.flow.is-fixed .dg-p { fill: var(--teal); }

/* ---------- Leak calculator ---------- */
.calc { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: stretch; }
.calc__in {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-lg);
  padding: 36px 34px; display: grid; gap: 32px; align-content: start;
}
.slider label { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.slider label span:first-child { font-weight: 600; color: #fff; }
.slider output {
  flex: none; font-family: var(--font-head); font-weight: 800; color: var(--orange); font-size: 1.05rem; white-space: nowrap;
}
.slider__ticks { display: flex; justify-content: space-between; margin-top: 8px; font-size: .78rem; color: #8FA0BC; }
.calc input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; margin: 0;
}
.calc input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--orange) 0 var(--p, 50%), rgba(255,255,255,.14) var(--p, 50%));
}
.calc input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.14); }
.calc input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--orange); }
.calc input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%;
  background: #fff; border: 4px solid var(--orange); box-shadow: 0 4px 12px rgba(0,0,0,.35);
  transition: transform .15s;
}
.calc input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--orange); box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.calc input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.calc input[type="range"]:focus-visible { outline: 3px solid var(--orange); outline-offset: 6px; border-radius: 999px; }
.calc__note { margin: -8px 0 0; font-size: .88rem; color: #8FA0BC; }
.calc__out {
  background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 36px 34px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
}
.calc__out .eyebrow { color: var(--orange-600); margin-bottom: 8px; }
.calc__big {
  font-family: var(--font-head); font-weight: 800; font-size: clamp(2.6rem, 5.4vw, 4rem); line-height: 1.05;
  letter-spacing: -0.03em; color: var(--navy-800); font-variant-numeric: tabular-nums; margin-bottom: 24px;
  overflow-wrap: anywhere;
}
.calc__rows { margin: 0 0 28px; border-top: 1px solid var(--line); }
.calc__rows div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.calc__rows dt { color: var(--ink-2); }
.calc__rows dd { margin: 0; font-family: var(--font-head); font-weight: 800; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.calc__out .btn { margin-top: auto; }
.calc__fine { font-size: .84rem; color: var(--ink-3); margin: 14px 0 0; text-align: center; }

@media (max-width: 1020px) {
  .calc { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .flow__toggle { margin-left: 0; width: 100%; }
  .flow__toggle button { flex: 1; }
}
@media (max-width: 600px) {
  .flow__bar { padding: 14px 16px; }
  .flow__canvas { padding: 12px 8px 4px; }
  .flow__cap { padding: 14px 16px 16px; }
  .flow__toggle button { padding: 9px 10px; font-size: .86rem; }
  .calc__in, .calc__out { padding: 26px 20px; }
  .slider label { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .flow__dot { animation: none; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: #fff; color: var(--navy-800); font-weight: 700;
  padding: 12px 18px; border-radius: 10px; text-decoration: none;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; outline: 3px solid var(--orange); outline-offset: 2px; }
main:focus { outline: none; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.faq details[open] { border-color: #F2B48C; box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 26px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.3rem; line-height: 1;
  background: var(--orange-50); color: var(--orange-600); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; border-radius: var(--radius); }
.faq .faq__a { padding: 0 26px 22px; color: var(--ink-2); }
.faq .faq__a p:last-child { margin-bottom: 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .bar span { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero__grid, .problem, .why, .contact, .cs-body { grid-template-columns: 1fr; gap: 48px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .steps::before { display: none; }
  .aside { position: static; }
  .panel { max-width: none; }
}
@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-900); padding: 8px 24px 24px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav__links .btn { margin-top: 16px; width: 100%; }
  .site-header.menu-open { background: var(--navy-900); }
  .cases { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .faq summary { padding: 18px 20px; font-size: 1.02rem; }
  .faq .faq__a { padding: 0 20px 18px; }
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 128px 0 80px; }
  .steps { grid-template-columns: 1fr; }
  .why__grid, .form__row { grid-template-columns: 1fr; }
  .form { padding: 26px 20px; }
  .case { padding: 30px 24px 28px; }
  .hero__ctas .btn { width: 100%; }
  .hero .eyebrow { font-size: .72rem; letter-spacing: .1em; line-height: 1.6; text-wrap: balance; }
  .hero__ctas { gap: 22px; }
  .hero__ctas .text-link {
    border-bottom: 0; padding-bottom: 0; line-height: 1.6;
    text-decoration: underline; text-decoration-color: var(--orange);
    text-decoration-thickness: 2px; text-underline-offset: 6px;
  }
  .hero__trust { flex-direction: column; gap: 8px; margin-top: 32px; }
  .metric__row { flex-wrap: wrap; }
  .ba th, .ba td { padding: 12px; font-size: .92rem; }
}

/* =========================================================
   Small-screen density pass
   Tablet: use the width (services as rows, cases side by side).
   Phone: wider margins, smaller type, fewer boxes, even rhythm.
   ========================================================= */
@media (max-width: 1020px) {
  /* Services: icon on the left, text on the right */
  .card { display: grid; grid-template-columns: 52px 1fr; column-gap: 22px; align-items: start; padding: 28px; }
  .card__icon { grid-row: 1 / span 3; margin: 0; }
  .card__num, .card h3, .card p { grid-column: 2; }
  .card__num { margin-top: 2px; }
  .delivery { flex-wrap: nowrap; align-items: flex-start; }
}
@media (max-width: 820px) and (min-width: 701px) {
  .cases { grid-template-columns: 1fr 1fr; gap: 20px; }
  .case { padding: 30px 26px 28px; }
  .case h3 { font-size: 1.15rem; }
}

@media (max-width: 600px) {
  /* Margins and type scale */
  .wrap { padding: 0 22px; }
  h1 { font-size: 2.05rem; }
  h2 { font-size: 1.65rem; }
  h3 { font-size: 1.12rem; }
  .lead, .hero__sub { font-size: 1.06rem; }
  .hero__sub { margin-bottom: 30px; }

  /* Even rhythm: smaller gap under headings, a little more between cards */
  .section-head { margin-bottom: 32px; }
  .problem, .why, .contact, .cs-body { gap: 36px; }

  /* Problem: a simple divided list instead of five cards */
  .pain-list { gap: 0; }
  .pain-list li {
    background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    padding: 16px 0; gap: 14px;
  }
  .pain-list li:first-child { border-top: 1px solid var(--line); }
  .pain-list li:hover { transform: none; }
  .pain-list .ico { width: 28px; height: 28px; }
  .callout { margin-top: 26px; padding: 20px 20px; font-size: 1rem; }
  .callout strong { font-size: 1.12rem; }

  /* Services: compact cards, icon beside the title */
  .cards { gap: 14px; }
  .card { grid-template-columns: 44px 1fr; column-gap: 14px; padding: 22px 20px; }
  .card__icon { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 12px; align-self: center; }
  .card__icon svg { width: 22px; height: 22px; }
  .card__num { margin: 0 0 2px; }
  .card h3 { margin: 0; }
  .card p { grid-column: 1 / -1; margin-top: 12px; font-size: .97rem; }
  .delivery { margin-top: 14px; padding: 18px 20px; gap: 12px; flex-wrap: nowrap; align-items: flex-start; font-size: .97rem; }
  .delivery svg { margin-top: 2px; }

  /* Results cards */
  .case { padding: 26px 20px 24px; }
  .case__tag { margin-bottom: 18px; }
  .case__big { font-size: 3.2rem; }
  .case__biglabel { margin-bottom: 18px; }

  /* Why us: compact 2 x 2 stats */
  .why__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .why__item { padding: 18px 16px; }
  .why__item .k { font-size: 1.35rem; }
  .why__item .k small { font-size: .82rem; }
  .why__item p { font-size: .88rem; line-height: 1.5; }
  .quote { font-size: 1.35rem; }

  /* FAQ */
  .faq { gap: 10px; }
  .faq summary { padding: 16px 18px; font-size: .98rem; }
  .faq summary::after { width: 28px; height: 28px; }
  .faq .faq__a { padding: 0 18px 16px; font-size: .97rem; }

  /* Contact */
  .checks { margin-top: 22px; }
  .contact__options { margin-top: 24px; }
  .option { padding: 18px; gap: 14px; }
  .form { padding: 24px 18px; }

  /* Case study pages */
  .cs-hero { padding: 124px 0 56px; }
  .cs-hero h1 { font-size: 1.9rem; }
  .cs-stats { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
  .cs-stat { padding: 18px 16px; }
  .cs-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cs-stat .k { font-size: 1.75rem; }
  .cs-stat p { font-size: .86rem; line-height: 1.45; margin-top: 8px; }
  .cs-block { margin-bottom: 40px; }
  .cs-block h2 { font-size: 1.45rem; }
  .cs-block p { font-size: 1rem; }
  .aside { padding: 24px 20px; }
  .next-case { padding: 22px 20px; }
  .flow--case { margin-bottom: 48px; }

  /* Before/after table becomes one small card per row */
  .ba, .ba tbody, .ba tr, .ba td { display: block; width: 100%; }
  .ba { border: 0; border-radius: 0; overflow: visible; }
  .ba thead { display: none; }
  .ba tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; background: #fff; }
  .ba td { padding: 0; border: 0; font-size: .95rem; }
  .ba td:first-child { font-family: var(--font-head); font-weight: 800; font-size: 1.02rem; margin-bottom: 10px; }
  .ba td:nth-child(2), .ba td:nth-child(3) { position: relative; padding-left: 68px; }
  .ba td:nth-child(2) { margin-bottom: 8px; }
  .ba td:nth-child(2)::before, .ba td:nth-child(3)::before {
    content: "Before"; position: absolute; left: 0; top: 4px;
    font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  }
  .ba td:nth-child(3)::before { content: "After"; color: var(--orange-600); }
}
