/* ============================================================
   LEADFLOW — Bloom Studio
   Table of contents
   01. Design tokens (CSS variables)
   02. Reset & base
   03. Layout helpers
   04. Buttons
   05. Navbar
   06. Hero
   07. Services
   08. How It Works
   09. Automation preview / mockup
   10. Lead form
   11. Success state
   12. Footer
   13. Scroll reveal animation
   14. Responsive breakpoints
   ============================================================ */

/* ------------------------------------------------------------
   01. DESIGN TOKENS
   Change these to re-skin the whole site.
   ------------------------------------------------------------ */
:root {
  /* Brand colours — dark navy base, lavender accent */
  --navy-900: #0b1120;
  --navy-800: #111a2e;
  --navy-700: #1a2440;
  --navy-600: #253255;
  --lav-500: #8b7cf6;
  --lav-400: #a89bff;
  --lav-300: #c7beff;
  --lav-100: #eeebff;

  /* Neutrals */
  --white: #ffffff;
  --grey-50: #f8f9fc;
  --grey-100: #eef1f7;
  --grey-200: #e2e6ef;
  --grey-400: #9aa3b8;
  --grey-600: #5b6580;

  /* Semantic */
  --text: var(--navy-900);
  --text-muted: var(--grey-600);
  --text-on-dark: #e9ecf5;
  --text-on-dark-muted: #a3adc4;

  --success: #17b26a;
  --success-soft: #e7f8f0;
  --danger: #e5484d;
  --amber: #f5a524;

  /* Surfaces */
  --bg: var(--white);
  --bg-alt: var(--grey-50);
  --card: var(--white);
  --border: var(--grey-200);

  /* Shape */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(11, 17, 32, .06);
  --shadow: 0 4px 20px rgba(11, 17, 32, .07);
  --shadow-lg: 0 18px 50px rgba(11, 17, 32, .12);
  --shadow-glow: 0 18px 50px rgba(139, 124, 246, .28);

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /* Rhythm */
  --container: 1160px;
  --gutter: 24px;
  --section-y: 104px;

  /* Motion */
  --ease: cubic-bezier(.22, .8, .3, 1);
  --speed: .28s;
}

/* ------------------------------------------------------------
   02. RESET & BASE
   ------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* keeps anchors clear of the sticky header */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; border: none; background: none; }

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 2.5px solid var(--lav-500);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 999;
  background: var(--navy-900);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus {
  left: 12px;
}

/* ------------------------------------------------------------
   03. LAYOUT HELPERS
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 660px;
  margin-bottom: 56px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lav-500);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.06rem;
  max-width: 58ch;
}

.section-head.center .section-sub { margin-inline: auto; }

/* ------------------------------------------------------------
   04. BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform var(--speed) var(--ease),
              background-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              color var(--speed) var(--ease);
}

.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--lav-500), #6f5ce8);
  color: #fff;
  box-shadow: 0 8px 22px rgba(139, 124, 246, .32);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--navy-900);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--lav-500);
  color: var(--lav-500);
  background: var(--lav-100);
  transform: translateY(-2px);
}

.btn[disabled] {
  opacity: .6;
  pointer-events: none;
  cursor: not-allowed;
}

/* ------------------------------------------------------------
   05. NAVBAR
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
}

/* .is-scrolled is toggled by script.js */
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 74px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  color: var(--lav-400);
}
.logo-mark svg { width: 19px; height: 19px; }

.logo-thin {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  position: relative;
  font-size: .94rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--speed) var(--ease);
  padding: 4px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--lav-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed) var(--ease);
}

.nav-link:hover { color: var(--navy-900); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--navy-900); font-weight: 600; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  margin-left: auto;
  transition: background var(--speed) var(--ease);
}
.nav-toggle:hover { background: var(--grey-100); }

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: var(--navy-900);
  transition: transform var(--speed) var(--ease),
              opacity var(--speed) var(--ease);
}

/* Open state — bars morph into an X */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ------------------------------------------------------------
   06. HERO
   ------------------------------------------------------------ */
.hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 82% -8%, rgba(139, 124, 246, .16), transparent 62%),
    radial-gradient(760px 420px at 4% 8%, rgba(37, 50, 85, .07), transparent 60%),
    var(--white);
}

.hero-glow {
  position: absolute;
  top: -220px;
  right: -180px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 124, 246, .22), transparent 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  align-items: center;
  gap: 64px;
}

.hero-title {
  font-size: clamp(2.15rem, 5vw, 3.5rem);
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.grad-text {
  background: linear-gradient(120deg, var(--lav-500), #6f5ce8 55%, #4f8ff7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 500;
}
.hero-points li { display: flex; align-items: center; gap: 8px; }

.tick {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--lav-100);
  color: var(--lav-500);
  font-size: .68rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* --- Hero dashboard visual --- */
.hero-visual { position: relative; }

.panel {
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--grey-50);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-amber { background: #febc2e; }
.dot-green { background: #28c840; }

.panel-title {
  margin-left: 10px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .02em;
}

.panel-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background:
    linear-gradient(180deg, rgba(139, 124, 246, .05), transparent 55%);
}

.flow-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}
.flow-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
  border-color: var(--lav-300);
}

.flow-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.flow-icon svg { width: 20px; height: 20px; }

.icon-new { background: var(--lav-100); color: var(--lav-500); }
.icon-score { background: #e8f1ff; color: #3b7ddd; }
.icon-mail { background: var(--success-soft); color: var(--success); }

.flow-text { display: flex; flex-direction: column; line-height: 1.35; }
.flow-text strong { font-size: .95rem; font-weight: 650; }
.flow-text span { font-size: .79rem; color: var(--text-muted); }

.pill {
  margin-left: auto;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.pill-high { background: var(--lav-500); color: #fff; }
.pill-navy { background: var(--navy-800); color: var(--lav-300); }
.pill-soft { background: var(--success-soft); color: #0f8a51; }

.flow-arrow {
  text-align: center;
  color: var(--lav-400);
  font-size: .95rem;
  line-height: 1;
  padding: 2px 0;
}

/* Floating stat chips */
.float-chip {
  position: absolute;
  display: flex;
  flex-direction: column;
  padding: 11px 16px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.float-chip-1 { top: -18px; left: -22px; }
.float-chip-2 { bottom: -20px; right: -18px; }

.float-num { font-size: 1.05rem; font-weight: 800; color: var(--lav-500); line-height: 1.2; }
.float-label { font-size: .72rem; color: var(--text-muted); }

/* ------------------------------------------------------------
   07. SERVICES
   ------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--lav-300);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  margin-bottom: 22px;
}
.card-icon svg { width: 24px; height: 24px; }
.icon-lav { background: var(--lav-100); color: var(--lav-500); }
.icon-navy { background: var(--navy-800); color: var(--lav-300); }

.card-title {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.card-text {
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.card-list {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.card-list li {
  position: relative;
  padding-left: 22px;
  font-size: .88rem;
  color: var(--grey-600);
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lav-400);
}

/* ------------------------------------------------------------
   08. HOW IT WORKS
   ------------------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 72px;
}

.step {
  position: relative;
  padding: 28px 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
}
.step:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* The little connector line between steps on wide screens */
.step::after {
  content: "";
  position: absolute;
  top: 46px;
  right: -22px;
  width: 22px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--lav-300), transparent);
}
.step:last-child::after { display: none; }

.step-num {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lav-500);
  background: var(--lav-100);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.step-title {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.step-text {
  font-size: .92rem;
  color: var(--text-muted);
}

/* --- Workflow diagram --- */
.diagram-wrap {
  padding: 44px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--navy-900), var(--navy-700) 70%, #1e2b52);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.diagram-label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lav-400);
  margin-bottom: 30px;
}

.diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.diagram-node {
  position: relative;
  padding: 13px 22px;
  border-radius: var(--radius-full);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .13);
  transition: background var(--speed) var(--ease),
              transform var(--speed) var(--ease);
}
.diagram-node:hover {
  background: rgba(255, 255, 255, .13);
  transform: translateY(-2px);
}

/* Downward arrows drawn with CSS, only between wrapped rows */
.diagram-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lav-400);
  font-size: .85rem;
}

.diagram-accent {
  background: linear-gradient(135deg, var(--lav-500), #6f5ce8);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(139, 124, 246, .35);
}

/* ------------------------------------------------------------
   09. AUTOMATION PREVIEW / MOCKUP
   ------------------------------------------------------------ */
.mockup-wrap { position: relative; }

.mockup-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: #fff8e8;
  border: 1px solid #f6dfae;
  color: #8a6410;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 22px;
}

.mockup-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, .22);
}

.mockup {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-900);
  border: 1px solid var(--navy-700);
  box-shadow: var(--shadow-lg);
}

.mockup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}
.mockup-head .panel-title { color: var(--text-on-dark-muted); margin-left: 0; }

.mockup-status {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lav-300);
  background: rgba(139, 124, 246, .18);
  padding: 4px 11px;
  border-radius: var(--radius-full);
}

.mockup-body {
  padding: 30px 24px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mock-card {
  width: 100%;
  max-width: 430px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  transition: transform var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}
.mock-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 124, 246, .5);
}

.mock-kicker {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lav-400);
  margin-bottom: 8px;
}

.mock-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.mock-meta {
  font-size: .86rem;
  color: var(--text-on-dark-muted);
}

.mock-priority {
  max-width: 430px;
  text-align: center;
  background: linear-gradient(135deg, rgba(139, 124, 246, .22), rgba(139, 124, 246, .07));
  border-color: rgba(139, 124, 246, .4);
}

.mock-flag {
  display: inline-block;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lav-300);
}

.mock-note {
  font-size: .78rem;
  color: var(--text-on-dark-muted);
  margin-top: 5px;
}

.mock-arrow {
  color: var(--lav-400);
  font-size: 1rem;
  line-height: 1;
}

.mock-rows {
  width: 100%;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: background var(--speed) var(--ease);
}
.mock-row:hover { background: rgba(255, 255, 255, .09); }

.mock-row-icon { font-size: 1rem; flex-shrink: 0; }

.mock-row-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-on-dark);
}

.mock-row-state {
  margin-left: auto;
  font-size: .76rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.state-ready { background: rgba(23, 178, 106, .18); color: #57d99b; }

/* ------------------------------------------------------------
   10. LEAD FORM
   ------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 64px;
  align-items: start;
}

.contact-points {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-points li {
  padding-left: 20px;
  border-left: 2.5px solid var(--lav-300);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.contact-points strong {
  font-size: .96rem;
  font-weight: 650;
}
.contact-points span {
  font-size: .88rem;
  color: var(--text-muted);
}

.form-card {
  padding: 38px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.field label {
  font-size: .86rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--navy-900);
}

.req { color: var(--lav-500); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--grey-50);
  font-size: .94rem;
  transition: border-color var(--speed) var(--ease),
              background var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
}

.field textarea { resize: vertical; min-height: 120px; }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='[w3.org](http://www.w3.org/2000/svg)' viewBox='0 0 24 24' fill='none' stroke='%235b6580' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
  padding-right: 42px;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--grey-400); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--lav-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(139, 124, 246, .13);
}

/* Invalid state — applied by script.js */
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
  background: #fff6f6;
}
.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
  box-shadow: 0 0 0 4px rgba(229, 72, 77, .13);
}

.error-msg {
  font-size: .8rem;
  color: var(--danger);
  font-weight: 500;
  margin-top: 7px;
  min-height: 0;
}
.error-msg:empty { display: none; }

.hint {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 7px;
}

.form-status {
  font-size: .88rem;
  font-weight: 600;
  margin-top: 14px;
  text-align: center;
  min-height: 0;
}
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }
.form-status.is-ok { color: var(--success); }

.form-footnote {
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: #fff8e8;
  border: 1px solid #f6dfae;
  font-size: .8rem;
  color: #8a6410;
  line-height: 1.55;
}

/* ------------------------------------------------------------
   11. SUCCESS STATE
   ------------------------------------------------------------ */
.success-card {
  text-align: center;
  padding: 24px 8px 8px;
  animation: popIn .45s var(--ease) both;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.success-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}
.success-icon svg { width: 32px; height: 32px; }

.success-title {
  font-size: 1.45rem;
  margin-bottom: 14px;
}

.success-text {
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0 auto 20px;
}

.success-note {
  font-size: .82rem;
  color: var(--grey-600);
  background: var(--grey-100);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 26px;
}

/* ------------------------------------------------------------
   12. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background: var(--navy-900);
  color: var(--text-on-dark-muted);
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.logo-footer { color: #fff; margin-bottom: 18px; }
.logo-footer .logo-thin { color: var(--text-on-dark-muted); }

.footer-tagline {
  font-size: .95rem;
  max-width: 34ch;
  line-height: 1.7;
}

.footer-heading {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.footer-col a {
  font-size: .92rem;
  transition: color var(--speed) var(--ease);
}
.footer-col a:hover { color: var(--lav-400); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  font-size: .84rem;
}

.footer-note { color: var(--grey-600); }

/* ------------------------------------------------------------
   13. SCROLL REVEAL
   Elements with .reveal start slightly offset and fade in once
   script.js adds .is-visible via IntersectionObserver.
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger cards slightly so they don't all land at once */
.card-grid .reveal:nth-child(2),
.steps .reveal:nth-child(2) { transition-delay: .08s; }

.card-grid .reveal:nth-child(3),
.steps .reveal:nth-child(3) { transition-delay: .16s; }

.steps .reveal:nth-child(4) { transition-delay: .24s; }

/* ------------------------------------------------------------
   14. RESPONSIVE
   ------------------------------------------------------------ */

/* Tablet — landscape */
@media (max-width: 1024px) {
  :root { --section-y: 84px; }

  .hero-grid { gap: 44px; }
  .contact-grid { gap: 44px; }

  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }

  .float-chip-1 { left: -8px; }
  .float-chip-2 { right: -6px; }
}

/* Tablet — portrait / mobile nav threshold */
@media (max-width: 900px) {
  /* Turn the nav into a slide-down panel */
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px var(--gutter) 26px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--speed) var(--ease),
                opacity var(--speed) var(--ease),
                visibility var(--speed);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    display: block;
    padding: 15px 2px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-link::after { display: none; }

  .nav-cta {
    margin-top: 18px;
    width: 100%;
    padding: 15px 24px;
  }

  /* Stack the two-column layouts */
  .hero-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .hero { padding: 60px 0 74px; }
  .hero-visual { max-width: 520px; margin-inline: auto; width: 100%; }

  .card-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --section-y: 64px;
    --gutter: 20px;
    --radius-lg: 20px;
  }

  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }

  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }

  .hero-points { flex-direction: column; gap: 10px; }

  /* Floating chips would overflow the viewport — hide them */
  .float-chip { display: none; }

  .section-head { margin-bottom: 38px; }
  .section-title { font-size: 1.6rem; }

  .steps { grid-template-columns: 1fr; }

  .diagram-wrap { padding: 30px 20px; }
  .diagram { flex-direction: column; }
  .diagram-node { width: 100%; max-width: 320px; text-align: center; }
  /* Swap the horizontal arrow for a vertical one when stacked */
  .diagram-node:not(:last-child)::after {
    content: "↓";
    right: auto;
    top: auto;
    bottom: -13px;
    left: 50%;
    transform: translateX(-50%);
  }

  .form-card { padding: 26px 20px; }
  .contact-points { margin-top: 26px; }

  .mockup-body { padding: 22px 16px 26px; }

  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
