/* ============================================================
   FINPLIFY | Extended Finance & Accounting Teams
   An IMC Group company
   Palette: Ink Navy #0B1F3A · White · Andersen Red #CE0E2D
   Type: Archivo (Expanded) display · Plus Jakarta Sans body · IBM Plex Mono utility
   ============================================================ */

:root {
  --navy: #0B1F3A;
  --navy-deep: #071527;
  --red: #CE0E2D;
  --red-dark: #A80B24;
  --ink: #182338;
  --slate: #5B6B82;
  --hairline: #E3E8F0;
  --line-strong: #D3DBE6;
  --wash: #F5F7FA;
  --white: #FFFFFF;

  --red-tint: rgba(206, 14, 45, 0.08);
  --navy-tint: rgba(11, 31, 58, 0.06);
  --shadow-sm: 0 2px 8px rgba(11, 31, 58, 0.06);
  --shadow-md: 0 14px 38px rgba(11, 31, 58, 0.10);
  --shadow-lg: 0 24px 60px rgba(11, 31, 58, 0.16);

  --max: 1350px;          /* inner content width */
  --gutter: 28px;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 80px;

  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Archivo', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Content area is exactly --max wide; the gutter sits outside it */
.wrap { width: 100%; max-width: calc(var(--max) + (var(--gutter) * 2)); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Type roles ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-stretch: expanded;
  color: var(--navy);
  line-height: 1.14;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); font-weight: 650; }
h3 { font-size: 1.2rem; font-weight: 650; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--red); }
.lede { font-size: 1.14rem; color: var(--slate); max-width: 62ch; }

a { color: var(--navy); text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------- Icons ---------- */
.ico {
  width: 1em; height: 1em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-badge {
  width: 54px; height: 54px; flex-shrink: 0;
  display: inline-grid; place-items: center;
  border-radius: 14px;
  background: var(--red-tint); color: var(--red);
  font-size: 25px;
}
.icon-badge.navy { background: var(--navy-tint); color: var(--navy); }
.icon-badge.solid { background: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(206, 14, 45, 0.28); }
.icon-badge.solid.navy { background: var(--navy); box-shadow: 0 10px 24px rgba(11, 31, 58, 0.25); }
.icon-badge.sm { width: 42px; height: 42px; border-radius: 11px; font-size: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--red); color: #fff;
  font-family: var(--font-body);
  font-weight: 600; font-size: 0.94rem; line-height: 1.2;
  padding: 14px 26px;
  border: 1px solid var(--red); border-radius: var(--radius-sm);
  white-space: nowrap; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn .ico { font-size: 1.05em; transition: transform 0.2s ease; }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(206, 14, 45, 0.25); }
.btn:hover .ico { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: #fff; box-shadow: 0 10px 22px rgba(11, 31, 58, 0.2); }
.btn.onblue { background: #fff; color: var(--navy); border-color: #fff; }
.btn.onblue:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn[disabled] { opacity: 0.7; cursor: progress; transform: none; box-shadow: none; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow 0.25s ease;
}
.topbar.scrolled { box-shadow: 0 8px 28px rgba(11, 31, 58, 0.08); }
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 20px;
}
.logo { display: inline-flex; flex-shrink: 0; }
.logo img { height: 52px; width: auto; }

nav.main { display: flex; align-items: center; gap: 2px; }
nav.main > a:not(.btn) {
  position: relative;
  font-size: 0.9rem; font-weight: 600; color: var(--ink);
  padding: 10px 11px;
  white-space: nowrap;
  line-height: 1.2;
  transition: color 0.2s ease;
}
nav.main > a:not(.btn)::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 3px;
  height: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
nav.main > a:not(.btn):hover { color: var(--navy); }
nav.main > a:not(.btn):hover::after,
nav.main > a[aria-current="page"]::after { transform: scaleX(1); }
nav.main > a[aria-current="page"] { color: var(--navy); }
nav.main > a.btn { margin-left: 14px; padding: 12px 22px; font-size: 0.9rem; color: #fff; }

.menu-toggle {
  display: none;
  width: 46px; height: 46px; flex-shrink: 0;
  place-items: center;
  background: var(--white); color: var(--navy);
  border: 1px solid var(--hairline); border-radius: 10px;
  font-size: 24px; cursor: pointer;
}
.menu-toggle .ico-close { display: none; }
.menu-toggle[aria-expanded="true"] .ico-open { display: none; }
.menu-toggle[aria-expanded="true"] .ico-close { display: block; }

/* ---------- Hero (home) ---------- */
.hero { padding: 84px 0 96px; position: relative; overflow: hidden; isolation: isolate; }
.hero::after { /* ledger-line motif */
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 47px, var(--hairline) 47px 48px);
  opacity: 0.5; z-index: -1;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 45%, transparent 85%);
  mask-image: linear-gradient(to right, #000 0%, #000 45%, transparent 85%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 72px; align-items: center; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin: 26px 0 38px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .redrule { width: 72px; height: 4px; background: var(--red); margin-bottom: 30px; border-radius: 2px; }

.media-frame { position: relative; }
.media-frame > img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}
.media-frame.accent::before { /* offset red block */
  content: ""; position: absolute; z-index: 0;
  right: -18px; bottom: -18px; width: 58%; height: 62%;
  background: var(--red); border-radius: 16px;
}
.split .reveal > h2 + .media-frame { margin-top: 44px; }
.media-frame.accent-navy::before {
  content: ""; position: absolute; z-index: 0;
  left: -18px; top: -18px; width: 52%; height: 58%;
  background: var(--navy); border-radius: 16px;
}
.hero .media-frame > img { aspect-ratio: 5 / 4.4; }

.float-badge {
  position: absolute; z-index: 2;
  display: flex; align-items: center; gap: 14px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 14px 20px 14px 14px;
  box-shadow: var(--shadow-md);
  max-width: 270px;
}
.float-badge b {
  display: block;
  font-family: var(--font-display); font-stretch: expanded;
  font-size: 1.45rem; line-height: 1.1; color: var(--navy);
}
.float-badge b span { color: var(--red); }
.float-badge small { display: block; font-size: 0.8rem; line-height: 1.35; color: var(--slate); }
.float-badge.pos-bl { left: -32px; bottom: 44px; }
.float-badge.pos-tr { right: -22px; top: 32px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 56px 0 72px;
  border-bottom: 1px solid var(--hairline);
  position: relative; overflow: hidden; isolation: isolate;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(to bottom, transparent 0 47px, var(--hairline) 47px 48px);
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(to right, #000 0%, transparent 60%);
  mask-image: linear-gradient(to right, #000 0%, transparent 60%);
}
.page-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.page-hero h1 { font-size: clamp(2rem, 3.8vw, 3.05rem); max-width: 22ch; }
.page-hero .lede { margin-top: 20px; }
.page-hero .media-frame > img { aspect-ratio: 16 / 11; }
.page-hero .hero-ctas { margin-top: 30px; }

.breadcrumb { margin-bottom: 26px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--slate); }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--line-strong); }
.breadcrumb a { color: var(--slate); font-weight: 500; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb [aria-current] { color: var(--navy); font-weight: 600; }

/* ---------- Sections ---------- */
section { padding: 92px 0; }
section.wash { background: var(--wash); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
section.dark { background: var(--navy); position: relative; overflow: hidden; isolation: isolate; }
section.dark::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(to bottom, transparent 0 47px, rgba(255, 255, 255, 0.04) 47px 48px);
}
section.dark h2, section.dark h3 { color: #fff; }
section.dark p { color: #C6D0DF; }
.section-head { margin-bottom: 48px; }
.section-head .lede { margin-top: 16px; }
.section-head.center { text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Grids ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split.top { align-items: start; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 32px 30px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--navy); z-index: 2; }
.card.accent::before { background: var(--red); }
.card > .icon-badge { margin-bottom: 22px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--slate); font-size: 0.96rem; flex: 1; }
.card ul { list-style: none; margin: 18px 0 24px; flex: 1; }
.card ul li {
  padding: 9px 0 9px 28px;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.94rem;
  position: relative;
}
.card ul li::before, .check-list li::before {
  content: ""; position: absolute; left: 0; top: 14px;
  width: 17px; height: 17px;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cardlink {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.92rem; color: var(--red);
}
.cardlink .ico { transition: transform 0.2s ease; }
.cardlink:hover .ico { transform: translateX(4px); }

/* Card with photo header */
.card.has-media { padding-top: 0; overflow: hidden; }
.card-media { margin: 0 -30px 0; position: relative; }
.card-media img { width: 100%; height: auto; aspect-ratio: 16 / 9.5; object-fit: cover; transition: transform 0.6s ease; }
.card.has-media:hover .card-media img { transform: scale(1.04); }
.card.has-media p, .price-card p { flex: 0 0 auto; }
.card-media + .icon-badge { margin-top: -27px; margin-bottom: 20px; position: relative; z-index: 1; border: 4px solid var(--white); width: 62px; height: 62px; box-sizing: border-box; }

/* ---------- Feature rows ---------- */
.feature-list { display: grid; gap: 18px; }
.feature {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.feature:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.feature .num { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; color: var(--red); display: block; margin-bottom: 4px; }
.feature h3 { margin-bottom: 6px; font-size: 1.12rem; }
.feature p { color: var(--slate); font-size: 0.95rem; }

/* ---------- Stats strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline);
  border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--white); padding: 34px 28px; transition: background 0.25s ease; }
.stat:hover { background: var(--wash); }
.stat .icon-badge { margin-bottom: 18px; }
.stat b {
  font-family: var(--font-display); font-stretch: expanded;
  font-size: 2.4rem; font-weight: 700; color: var(--navy); display: block; line-height: 1.1;
}
.stat b span { color: var(--red); }
.stat small { color: var(--slate); font-size: 0.9rem; display: block; margin-top: 6px; }

/* ---------- Tool chips ---------- */
.tool-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.tool-group {
  background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 30px;
}
.tool-group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--white);
  padding: 8px 16px;
  color: var(--ink);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.chip:hover { border-color: var(--navy); color: var(--navy); }

/* ---------- Security (dark) ---------- */
.secure-points { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.secure-point {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff; font-weight: 600; font-size: 0.92rem; line-height: 1.35;
}
.secure-point .ico { font-size: 20px; color: var(--red); }
section.dark .media-frame > img { aspect-ratio: 4 / 3.3; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
section.dark .float-badge { background: var(--white); }

/* ---------- Seat detail rows (service pages) ---------- */
.seat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.seat {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 32px 30px 32px 33px;
  background: var(--white);
  position: relative; overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.seat::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--red); }
.seat-grid > .seat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.seat:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.seat-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.seat h3 { margin: 0; }
.seat .scope { color: var(--slate); font-size: 0.97rem; margin-bottom: 18px; }
.seat dl { display: grid; grid-template-columns: 140px 1fr; row-gap: 10px; column-gap: 16px; font-size: 0.92rem; border-top: 1px solid var(--hairline); padding-top: 18px; }
.seat dt { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); padding-top: 3px; }
.seat dd { color: var(--ink); }

/* ---------- Onboarding steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; position: relative; }
.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.step:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.step-tag {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--red); background: var(--red-tint);
  padding: 6px 12px; border-radius: 999px; font-weight: 500;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--slate); font-size: 0.95rem; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -22px; width: 16px; height: 16px;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Pricing ---------- */
.price-card { text-align: left; }
.price-card .from { font-family: var(--font-mono); font-size: 0.78rem; color: var(--slate); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }
.price-card .amount {
  font-family: var(--font-display); font-stretch: expanded;
  font-size: 2rem; font-weight: 700; color: var(--navy); margin: 6px 0 12px;
}
.price-card .amount em { font-style: normal; font-size: 0.95rem; font-weight: 500; color: var(--slate); font-family: var(--font-body); font-stretch: normal; }
.price-card.accent { box-shadow: var(--shadow-md); }

/* ---------- Offices ---------- */
.contact-lines { display: grid; gap: 14px; margin-top: 22px; }
.contact-line { display: flex; align-items: center; gap: 14px; }
.contact-line strong { display: block; font-size: 0.8rem; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); font-weight: 500; }
.contact-line a { color: var(--red); font-weight: 600; }
.contact-line a:hover { text-decoration: underline; }
.office-list { display: grid; gap: 18px; }
.office {
  display: grid; grid-template-columns: 150px 1fr; gap: 0;
  border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden;
  background: var(--white);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.office:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.office img { width: 100%; height: 100%; min-height: 128px; object-fit: cover; }
.office-body { padding: 20px 24px; border-left: 3px solid var(--red); }
.office-body h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 1.1rem; }
.office-body h3 .ico { color: var(--red); font-size: 18px; }
.office-body p { color: var(--slate); font-size: 0.94rem; }
.info-card { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 30px; background: var(--wash); margin-bottom: 24px; }
.info-card > p { color: var(--slate); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: start; }
.faq-grid .section-head { position: sticky; top: calc(var(--header-h) + 32px); margin-bottom: 0; }
.faq-list { border-top: 1px solid var(--hairline); }
.faq-list details { border-bottom: 1px solid var(--hairline); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 4px;
  font-weight: 700; font-size: 1.04rem; color: var(--navy); line-height: 1.45;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .toggle {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red-tint); color: var(--red); font-size: 18px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.faq-list details[open] summary .toggle { transform: rotate(45deg); background: var(--red); color: #fff; }
.faq-list summary:hover { color: var(--red); }
.faq-list .answer { padding: 0 60px 24px 4px; color: var(--slate); }

/* ---------- Consultation / form ---------- */
section.consult { background: var(--wash); border-top: 1px solid var(--hairline); position: relative; overflow: hidden; isolation: isolate; }
section.consult::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(to bottom, transparent 0 47px, var(--hairline) 47px 48px);
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(to right, #000 0%, transparent 55%);
  mask-image: linear-gradient(to right, #000 0%, transparent 55%);
}
.consult-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; }
.consult-grid.contact-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
.consult-copy h2 { margin-bottom: 18px; }
.icon-points { list-style: none; display: grid; gap: 16px; margin: 32px 0; }
.icon-points li { display: flex; align-items: center; gap: 14px; font-weight: 600; color: var(--navy); }
.consult-contact {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--hairline);
}
.consult-contact small { display: block; color: var(--slate); font-size: 0.82rem; }
.consult-contact a { color: var(--red); font-weight: 700; }

.form-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 40px 38px 34px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.form-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--red); }
.form-card-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.form-card-head h3 { font-size: 1.35rem; }
.form-card-head p { color: var(--slate); font-size: 0.88rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.84rem; font-weight: 700; color: var(--navy); }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 0.95rem; color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6B82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.field input::placeholder, .field textarea::placeholder { color: #98A5B8; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--slate); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(11, 31, 58, 0.08);
}
.was-validated .field :invalid { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-tint); }
.consent { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 12px; font-size: 0.86rem; color: var(--slate); line-height: 1.55; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex-shrink: 0; cursor: pointer; }
.consent a { color: var(--red); font-weight: 600; text-decoration: underline; }
.was-validated .consent input:invalid { outline: 2px solid var(--red); outline-offset: 2px; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.form-actions small { display: inline-flex; align-items: center; gap: 8px; color: var(--slate); font-size: 0.82rem; }
.form-actions small .ico { color: var(--red); }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; display: none; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 600; line-height: 1.5; }
.form-status .ico { font-size: 20px; margin-top: 1px; }
.form-status.show { display: flex; }
.form-status.success { background: var(--navy-tint); color: var(--navy); border: 1px solid var(--line-strong); }
.form-status.success .ico { color: var(--red); }
.form-status.error { background: var(--red-tint); color: var(--red-dark); border: 1px solid rgba(206, 14, 45, 0.25); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; display: none; }
.btn.loading .spinner { display: inline-block; }
.btn.loading .ico { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- CTA band ---------- */
section.cta-band { padding: 0 0 96px; }
.cta-box {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--navy);
  border-radius: 20px;
  padding: 58px 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.cta-box::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(to bottom, transparent 0 47px, rgba(255, 255, 255, 0.05) 47px 48px);
}
.cta-box::after {
  content: ""; position: absolute; z-index: -1;
  right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  border: 40px solid rgba(206, 14, 45, 0.9); opacity: 0.18;
}
.cta-box h2 { color: #fff; max-width: 22ch; }
.cta-box .eyebrow { color: #fff; }
.cta-box .eyebrow::before { background: var(--red); }
section.wash + section.cta-band, section.dark + section.cta-band { padding-top: 96px; }

/* ---------- Prose ---------- */
.prose p { margin-bottom: 18px; max-width: 68ch; }
.prose p + h3 { margin-top: 32px; }
.prose h3 { margin-bottom: 10px; }
.legal-page .prose h2 { margin: 36px 0 14px; font-size: 1.5rem; }
.prose ul { margin: 0 0 18px 22px; max-width: 68ch; }
.prose ul li { margin-bottom: 6px; }
.prose a { color: var(--red); text-decoration: underline; }
.legal-page .prose { max-width: 860px; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy-deep); color: #AEBBCF; padding: 72px 0 36px; font-size: 0.92rem; position: relative; }
footer.site-footer::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(to right, var(--red) 0 120px, transparent 120px); }
footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
footer h4 {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: #fff; margin-bottom: 18px;
}
footer .col-links a { color: #AEBBCF; display: flex; align-items: center; gap: 10px; padding: 5px 0; transition: color 0.2s ease, transform 0.2s ease; }
footer .col-links a .ico { color: var(--red); font-size: 16px; }
footer .col-links a:hover { color: #fff; transform: translateX(3px); }
footer .footer-brand p { max-width: 42ch; }
footer .footer-brand .logo { margin-bottom: 18px; }
footer .footer-brand .logo img { height: 50px; }
footer a.inline { white-space: nowrap; color: #fff; font-weight: 600; border-bottom: 1px solid rgba(206, 14, 45, 0.8); }
footer a.inline:hover { color: #fff; border-bottom-color: #fff; }
footer .legal { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.84rem; }

/* ---------- Simple centered pages (404 / thank you) ---------- */
.center-page { padding: 110px 0; text-align: center; }
.center-page .icon-badge { margin: 0 auto 26px; width: 76px; height: 76px; font-size: 34px; border-radius: 20px; }
.center-page h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.center-page .lede { margin: 0 auto 32px; }
.center-page .hero-ctas { justify-content: center; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.08s; }
.js .reveal.d2 { transition-delay: 0.16s; }
.js .reveal.d3 { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */

/* Navigation collapses before it can wrap: this also covers browser zoom,
   which shrinks the CSS viewport and previously broke the menu. */
@media (max-width: 1239px) {
  .menu-toggle { display: inline-grid; }
  nav.main {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 18px 30px rgba(11, 31, 58, 0.10);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  nav.main.open { display: flex; }
  nav.main > a:not(.btn) {
    padding: 14px 4px; font-size: 1rem;
    border-bottom: 1px solid var(--hairline);
    white-space: normal;
  }
  nav.main > a:not(.btn)::after { display: none; }
  nav.main > a[aria-current="page"] { color: var(--red); }
  nav.main > a.btn { margin: 18px 0 0; padding: 15px 22px; font-size: 0.98rem; }
  .hero-grid, .page-hero-grid { gap: 56px; }
}

@media (max-width: 1100px) {
  .split, .faq-grid, .consult-grid { gap: 48px; }
  .float-badge.pos-bl { left: -12px; }
  .float-badge.pos-tr { right: -8px; }
}

@media (max-width: 980px) {
  .hero-grid, .page-hero-grid, .split, .faq-grid, .consult-grid, .consult-grid.contact-grid, .tool-groups { grid-template-columns: 1fr; }
  .grid3, .steps { grid-template-columns: 1fr 1fr; }
  .seat-grid { grid-template-columns: 1fr; }
  .faq-grid .section-head { position: static; }
  .hero { padding: 56px 0 80px; }
  .hero .media-frame { max-width: 640px; }
  .page-hero .media-frame { max-width: 640px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  footer .cols { grid-template-columns: 1fr 1fr; }
  .step:not(:last-child)::after { display: none; }
  section { padding: 76px 0; }
}

@media (max-width: 700px) {
  :root { --gutter: 18px; --header-h: 70px; }
  body { font-size: 16px; }
  .logo img { height: 44px; }
  .grid3, .grid2, .steps, .form-grid, .secure-points { grid-template-columns: 1fr; }
  footer .cols { grid-template-columns: 1fr; gap: 34px; }
  section { padding: 60px 0; }
  section.cta-band { padding-bottom: 60px; }
  section.wash + section.cta-band, section.dark + section.cta-band { padding-top: 60px; }
  .hero { padding: 44px 0 64px; }
  .page-hero { padding: 36px 0 56px; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .float-badge { position: relative; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; margin-top: 14px; max-width: none; box-shadow: var(--shadow-sm); }
  .media-frame.accent::before { right: -8px; bottom: -8px; }
  .media-frame:has(.float-badge)::before { display: none; }
  .split .reveal > h2 + .media-frame { margin-top: 44px; }
.media-frame.accent-navy::before { left: -8px; top: -8px; }
  .seat, .card, .step, .tool-group { padding: 26px 22px; }
  .card.has-media { padding-top: 0; }
  .card-media { margin: 0 -22px; }
  .seat dl { grid-template-columns: 1fr; row-gap: 2px; }
  .seat dt { padding-top: 10px; }
  .form-card { padding: 28px 20px 24px; border-radius: 14px; }
  .cta-box { padding: 40px 26px; border-radius: 16px; }
  .cta-box .btn { width: 100%; }
  .stats { grid-template-columns: 1fr; }
  .office { grid-template-columns: 1fr; }
  .office img { aspect-ratio: 16 / 8; min-height: 0; }
  .office-body { border-left: none; border-top: 3px solid var(--red); }
  .faq-list .answer { padding-right: 4px; }
  .faq-list summary { font-size: 0.98rem; }
}
