/* ==========================================================================
   Resources Business Solutions — site styles
   Light, editorial look: warm paper background, deep ink navy, one restrained
   teal accent. Serif display (Instrument Serif) + Inter for UI/body.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper:      #faf9f6;
  --paper-2:    #f2f0ea;
  --surface:    #ffffff;
  --ink:        #0b1b2b;
  --ink-2:      #33414f;
  --ink-3:      #5f6b77;
  --line:       #e4e1d9;
  --line-2:     #d6d2c7;
  --accent:     #0f766e;
  --accent-2:   #0b5e58;
  --accent-soft:#e3f1ee;
  --danger:     #b42318;

  --dark:       #0b1b2b;
  --dark-2:     #13273b;
  --dark-line:  rgba(255,255,255,.10);
  --dark-text:  #c8d1da;

  --font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11,27,43,.05);
  --shadow:    0 1px 2px rgba(11,27,43,.04), 0 12px 32px -12px rgba(11,27,43,.14);
  --shadow-lg: 0 2px 4px rgba(11,27,43,.04), 0 28px 60px -24px rgba(11,27,43,.25);

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 8rem);
  --header-h: 72px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Typography helpers ---------- */
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.015em; }
h1 em, h2 em { font-style: italic; color: var(--accent); }

.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.kicker::before { content: ''; width: 22px; height: 1px; background: currentColor; }

.section { padding-block: var(--section-y); }
.section h2 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); margin-bottom: 1.25rem; }
.section-tint { background: var(--paper-2); }
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head > p:last-child { color: var(--ink-3); font-size: 1.075rem; }

.micro { font-size: .75rem; color: var(--ink-3); letter-spacing: .04em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .8rem 1.4rem;
  border-radius: 999px; border: 1px solid transparent;
  font-size: .95rem; font-weight: 500; letter-spacing: -.005em;
  cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn .ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); box-shadow: 0 10px 24px -10px rgba(15,118,110,.6); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn-sm { min-height: 40px; padding: .5rem 1.1rem; font-size: .875rem; }
.btn-block { width: 100%; }
.btn:active { transform: translateY(1px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand img { height: 40px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 2.25rem; }
.primary-nav ul { display: flex; gap: 2rem; }
.primary-nav ul a { position: relative; font-size: .925rem; color: var(--ink-2); padding-block: .4rem; transition: color .2s; }
.primary-nav ul a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease);
}
.primary-nav ul a:hover, .primary-nav ul a[aria-current="true"] { color: var(--ink); }
.primary-nav ul a:hover::after, .primary-nav ul a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child  { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(3.5rem, 9vw, 7rem) clamp(4rem, 9vw, 7rem); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw; max-width: 820px; max-height: 820px;
  background: radial-gradient(closest-side, rgba(15,118,110,.10), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .4rem .9rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
  font-size: .8rem; color: var(--ink-2); margin-bottom: 1.75rem;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(2.75rem, 6.4vw, 5.25rem); line-height: 1.02; letter-spacing: -.025em; margin-bottom: 1.5rem; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-3); max-width: 34rem; margin-bottom: 2.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.stats { display: grid; grid-template-columns: 1fr 1fr; }
.stats > div { padding: 1.75rem 1.75rem 1.5rem; display: flex; flex-direction: column-reverse; gap: .35rem; }
.stats > div:nth-child(odd)  { border-right: 1px solid var(--line); }
.stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.stats dd { font-family: var(--font-display); font-size: clamp(2.5rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -.02em; margin: 0; }
.stats dd span { color: var(--accent); }
.stats dt { font-size: .825rem; color: var(--ink-3); }
.hero-panel-foot { padding: 1.25rem 1.75rem 1.5rem; background: var(--paper); border-top: 1px solid var(--line); }
.hero-panel-foot .micro { text-transform: uppercase; letter-spacing: .12em; margin-bottom: .7rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li { font-size: .78rem; padding: .3rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }
.about-copy p:not(.kicker) { color: var(--ink-3); font-size: 1.05rem; margin-bottom: 1.1rem; }
.about-copy strong { color: var(--ink); font-weight: 600; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.pillar { padding: 1.75rem 1.5rem 1.75rem 0; border-bottom: 1px solid var(--line); }
.pillar:nth-child(even) { padding-left: 1.5rem; padding-right: 0; border-left: 1px solid var(--line); }
.pillar-num { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--accent); }
.pillar h3 { font-size: 1.05rem; margin: .5rem 0 .35rem; }
.pillar p { font-size: .9rem; color: var(--ink-3); }

/* ---------- Service cards ---------- */
.group-label {
  display: flex; align-items: center; gap: 1rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 1.25rem;
}
.group-label::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.cards + .group-label { margin-top: 3.5rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1.5rem;
  transition: background-color .3s, color .3s;
}
.card:hover .card-icon { background: var(--accent); color: #fff; }
.card-icon svg, .contact-list svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h4 { font-size: 1.1rem; letter-spacing: -.01em; margin-bottom: .6rem; }
.card p { font-size: .925rem; color: var(--ink-3); margin-bottom: 1.5rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; }
.tags li { font-size: .72rem; color: var(--ink-2); padding: .2rem .6rem; border-radius: 6px; background: var(--paper-2); }

/* Featured AI card (spans the full width above the service grid) */
.card-feature {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(1.75rem, 4vw, 3.5rem);
  padding: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: 1.25rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(15,118,110,.08), transparent 45%),
    var(--surface);
  border-color: var(--line-2);
}
.card-feature:hover { transform: none; }
.card-feature-copy { display: flex; flex-direction: column; align-items: flex-start; }
.card-feature-copy .card-icon { margin-bottom: 1.25rem; }
.card-feature-copy .product-badge { margin-bottom: .9rem; }
.card-feature h4 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 3vw, 2.4rem); letter-spacing: -.015em; }
.card-feature-copy > p:not(.product-badge) { font-size: 1rem; }
.card-feature-copy .btn { margin-top: auto; }
.ai-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.75rem; align-content: start; }
.ai-list li { padding: 1rem 0; border-top: 1px solid var(--line); }
.ai-list h5 { font-size: .95rem; font-weight: 600; margin-bottom: .2rem; }
.ai-list p { font-size: .85rem; color: var(--ink-3); margin: 0; }

/* ---------- Products ---------- */
.products { display: grid; gap: 1.5rem; }
.product {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.product-alt .product-visual { order: -1; }
.product-body { padding: clamp(1.75rem, 4vw, 3rem); display: flex; flex-direction: column; align-items: flex-start; }
.product-badge {
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: .3rem .75rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.product h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 3.2vw, 2.6rem); letter-spacing: -.015em; margin-bottom: .85rem; }
.product-lead { color: var(--ink-3); font-size: 1.025rem; margin-bottom: 1.5rem; max-width: 32rem; }
.product-features { display: grid; gap: .7rem; margin-bottom: 1.75rem; }
.product-features li { display: flex; gap: .7rem; font-size: .95rem; color: var(--ink-2); }
.product-features svg { flex: none; width: 20px; height: 20px; margin-top: 2px; padding: 3px; border-radius: 50%; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ai-strip {
  width: 100%; margin-bottom: 1.75rem; padding: 1rem 1.1rem;
  border-radius: 12px; border: 1px dashed rgba(15,118,110,.35);
  background: linear-gradient(135deg, var(--accent-soft), rgba(227,241,238,.35));
}
.ai-strip-label { display: flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .65rem; }
.ai-strip-label svg, .mock-ai svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ai-strip .chips li { border-color: rgba(15,118,110,.2); }
.mock-ai { display: flex; align-items: center; gap: .45rem; margin: 0 .9rem .9rem; padding: .55rem .7rem; border-radius: 8px; background: var(--accent-soft); color: var(--accent-2); font-size: .72rem; font-weight: 500; }
.product-industries-label { text-transform: uppercase; letter-spacing: .12em; margin-bottom: .6rem; }
.product-industries { margin-bottom: 1.75rem; }
.product-body .btn { margin-top: auto; }

/* Decorative product mock-ups */
.product-visual {
  position: relative; display: grid; place-items: center; padding: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 30% 20%, rgba(95,212,195,.22), transparent 55%),
    linear-gradient(160deg, var(--dark-2), var(--dark));
}
.mock {
  width: 100%; max-width: 420px; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); font-size: .8rem;
  transform: rotate(-1.2deg); transition: transform .5s var(--ease);
}
.product:hover .mock { transform: rotate(0) translateY(-4px); }
.mock-bar { display: flex; align-items: center; gap: .35rem; padding: .7rem .9rem; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.mock-bar span { margin-left: .5rem; font-size: .72rem; color: var(--ink-3); font-weight: 500; }
.mock-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: .9rem; }
.mock-kpis div { padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.mock-kpis small { display: block; font-size: .68rem; color: var(--ink-3); }
.mock-kpis b { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; }
.mock-rows { padding: 0 .9rem .9rem; display: grid; gap: .4rem; }
.mock-rows li { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; background: var(--paper); border-radius: 8px; color: var(--ink-2); font-size: .75rem; }
.mock-pin { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.mock-rows em { margin-left: auto; font-style: normal; font-size: .66rem; color: var(--accent); background: var(--accent-soft); padding: .1rem .45rem; border-radius: 999px; }
.mock-pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; padding: .9rem; }
.mock-pipeline > div { display: grid; gap: .45rem; align-content: start; background: var(--paper); border-radius: 10px; padding: .6rem; min-height: 170px; }
.mock-pipeline small { display: flex; justify-content: space-between; font-size: .68rem; color: var(--ink-3); margin-bottom: .15rem; }
.mock-pipeline small b { color: var(--ink); font-weight: 600; }
.mock-card { display: block; height: 38px; border-radius: 7px; background: #fff; border: 1px solid var(--line); position: relative; }
.mock-card::before, .mock-card::after { content: ''; position: absolute; left: 8px; height: 5px; border-radius: 3px; background: var(--line-2); }
.mock-card::before { top: 10px; width: 65%; }
.mock-card::after  { top: 21px; width: 40%; background: var(--line); }
.mock-card.short { height: 30px; }
.mock-card.short::after { display: none; }
.mock-card.won { border-color: rgba(15,118,110,.35); background: var(--accent-soft); }
.mock-card.won::before { background: rgba(15,118,110,.45); }

.assurances { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 2rem; border-top: 1px solid var(--line-2); }
.assurances li { display: flex; gap: .9rem; }
.assurances svg { flex: none; width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.assurances h3 { font-size: .975rem; margin-bottom: .25rem; }
.assurances p { font-size: .875rem; color: var(--ink-3); }

/* ---------- Process timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; border-top: 1px solid var(--line-2); }
.timeline li { position: relative; padding: 2rem 1.5rem 0 0; }
.timeline li::before {
  content: ''; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--accent); transition: background-color .3s;
}
.timeline li:hover::before { background: var(--accent); }
.step { display: block; font-family: var(--font-display); font-style: italic; font-size: 2.25rem; line-height: 1; color: #a9a497; margin-bottom: 1rem; transition: color .3s; }
.timeline li:hover .step { color: var(--accent); }
.timeline h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.timeline p { font-size: .9rem; color: var(--ink-3); }

/* ---------- Why (dark band) ---------- */
.section-dark { background: var(--dark); color: #fff; }
.section-dark h2 em, .section-dark .kicker { color: #5fd4c3; }
.why-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }
.why-list { margin-top: 2rem; }
.why-list li { display: flex; gap: 1rem; padding-block: 1.25rem; border-top: 1px solid var(--dark-line); }
.why-list li:last-child { border-bottom: 1px solid var(--dark-line); }
.ic-check { flex: none; width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: rgba(95,212,195,.14); fill: none; stroke: #5fd4c3; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.why-list h3 { font-size: 1.025rem; margin-bottom: .2rem; }
.why-list p { font-size: .925rem; color: var(--dark-text); }

.stack { background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem); }
.stack-title { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dark-text); margin-bottom: 1.5rem; }
.stack dl > div { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; padding-block: 1rem; border-top: 1px solid var(--dark-line); }
.stack dt { font-size: .85rem; color: #fff; font-weight: 500; padding-top: .3rem; }
.stack dd { margin: 0; }
.chips-dark li { background: rgba(255,255,255,.05); border-color: var(--dark-line); color: var(--dark-text); transition: border-color .2s, color .2s; }
.chips-dark li:hover { border-color: #5fd4c3; color: #fff; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.quote {
  display: flex; flex-direction: column; gap: 1.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow-sm);
}
.quote-mark { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.quote blockquote { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.35; letter-spacing: -.005em; color: var(--ink); }
.quote figcaption { display: flex; align-items: center; gap: .85rem; margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.quote figcaption strong { display: block; font-size: .9rem; font-weight: 600; }
.quote figcaption > span:last-child { font-size: .8rem; color: var(--ink-3); }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: .8rem; font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.faq-grid .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 2rem); }
.text-link { color: var(--accent); border-bottom: 1px solid currentColor; }
.faq-list { border-top: 1px solid var(--line-2); }
.faq { border-bottom: 1px solid var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.35rem 0; font-size: 1.05rem; font-weight: 500; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 10px no-repeat;
  transition: transform .3s var(--ease), background-color .2s;
}
.faq[open] summary::after { transform: rotate(45deg); background-color: var(--accent-soft); }
.faq summary:hover { color: var(--accent); }
.faq p { padding: 0 3rem 1.4rem 0; color: var(--ink-3); }

/* ---------- Legal modals ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.form-note a, .prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.modal {
  width: min(760px, calc(100% - 2rem)); max-width: none; max-height: min(86vh, 900px);
  margin: auto; padding: 0; border: 0; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--ink); box-shadow: 0 40px 100px -20px rgba(11,27,43,.45);
  overflow: hidden; display: none; flex-direction: column;
}
.modal[open] { display: flex; animation: modalIn .3s var(--ease); }
.modal::backdrop { background: rgba(11,27,43,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.75rem 2rem 1.25rem; border-bottom: 1px solid var(--line); }
.modal-head .kicker { margin-bottom: .4rem; }
.modal-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: .2rem; }
.modal-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; position: relative; transition: background-color .2s; }
.modal-close:hover { background: var(--paper-2); }
.modal-close span::before, .modal-close span::after { content: ''; position: absolute; left: 13px; right: 13px; top: 21px; height: 1.5px; background: var(--ink); }
.modal-close span::before { transform: rotate(45deg); }
.modal-close span::after  { transform: rotate(-45deg); }
.modal-body { overflow-y: auto; padding: 1.5rem 2rem 2.25rem; overscroll-behavior: contain; }
.prose { font-size: .95rem; color: var(--ink-2); }
.prose h3 { font-size: 1.02rem; color: var(--ink); margin: 1.75rem 0 .5rem; }
.prose p, .prose ul { margin-bottom: .8rem; }
.prose ul { list-style: disc; padding-left: 1.25rem; display: grid; gap: .35rem; }
body.modal-open { overflow: hidden; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }
.contact-copy > p:not(.kicker) { color: var(--ink-3); font-size: 1.05rem; margin-bottom: 2rem; max-width: 30rem; }
.contact-list li { display: flex; align-items: flex-start; gap: 1rem; padding-block: 1rem; border-top: 1px solid var(--line-2); }
.contact-list li:last-child { border-bottom: 1px solid var(--line-2); }
.contact-list svg { color: var(--accent); margin-top: 2px; flex: none; }
.contact-list span { display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .1rem; }
.contact-list div { font-size: .975rem; word-break: break-word; }
.contact-list a { border-bottom: 1px solid var(--line-2); transition: border-color .2s, color .2s; }
.contact-list a:hover { color: var(--accent); border-color: var(--accent); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3.5vw, 2.5rem); box-shadow: var(--shadow-lg); }
#rbs-contact-form { display: grid; gap: 1.15rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.field abbr { text-decoration: none; color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .75rem .95rem;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 10px;
  font-size: .95rem; color: var(--ink);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.5rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235f6b77' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.field ::placeholder { color: #9aa3ab; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(180,35,24,.10); }
.field-meta { display: flex; justify-content: space-between; gap: 1rem; }
.field-error { font-size: .8rem; color: var(--danger); animation: errIn .2s ease; }
.field-error::before { content: '! '; font-weight: 700; }
.char-count { font-size: .75rem; color: var(--ink-3); margin-left: auto; font-variant-numeric: tabular-nums; }
.char-count.warn { color: #b54708; }
.char-count.over { color: var(--danger); }
@keyframes errIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

#form-error-banner { padding: .85rem 1rem; border-radius: 10px; background: #fef3f2; border: 1px solid #fecdca; color: var(--danger); font-size: .875rem; }
#form-error-banner a { text-decoration: underline; }
.form-note { text-align: center; font-size: .78rem; color: var(--ink-3); }

#submitBtn.loading { opacity: .8; pointer-events: none; }
#submitBtn.loading .ic { display: none; }
#submitBtn.loading::after { content: ''; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#form-success { text-align: center; padding: 2.5rem 1rem; }
#form-success:focus { outline: none; }
.success-mark { width: 56px; height: 56px; margin: 0 auto 1.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); }
.success-mark svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#form-success h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.85rem; margin-bottom: .5rem; }
#form-success p { color: var(--ink-3); margin-bottom: .75rem; }
#form-success a { color: var(--accent); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-text); padding-block: clamp(3.5rem, 7vw, 5rem) 2rem; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid var(--dark-line); }
.footer-brand img { height: 46px; width: auto; margin-bottom: 1.25rem; }
.footer-brand p { font-size: .9rem; max-width: 22rem; }
.footer-col h2 { font-family: var(--font-body); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; }
.footer-col ul { display: grid; gap: .6rem; }
.footer-col a, .footer-legal a { font-size: .9rem; transition: color .2s; }
.footer-col a:hover, .footer-legal a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.75rem; font-size: .825rem; }
.footer-legal { display: flex; gap: 1.5rem; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 2.5rem; }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .assurances { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 1.25rem;
    padding: 1.25rem var(--gutter) 2rem;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav ul a { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .primary-nav ul a::after { display: none; }
  .nav-cta { min-height: 48px; }

  .hero-inner, .about-grid, .why-grid, .contact-grid, .faq-grid { grid-template-columns: 1fr; }
  .faq-grid .section-head { position: static; }
  .cards, .quotes { grid-template-columns: repeat(2, 1fr); }
  .product, .card-feature { grid-template-columns: 1fr; }
  .product-alt .product-visual { order: 0; }
  .product-visual { min-height: 300px; }
}

@media (max-width: 640px) {
  .cards, .cards-4, .quotes { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .assurances { grid-template-columns: 1fr; }
  .ai-list { grid-template-columns: 1fr; }
  .faq p { padding-right: 0; }
  .modal { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-head { padding: 1.25rem 1.25rem 1rem; }
  .modal-body { padding: 1.25rem 1.25rem 2rem; }
  .product-body .btn, .card-feature-copy .btn { width: 100%; }
  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar:nth-child(even) { padding: 1.4rem 0; border-left: 0; }
  .timeline { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line-2); row-gap: 0; }
  .timeline li { padding: 0 0 2rem 1.75rem; }
  .timeline li::before { top: 6px; left: -5px; }
  .step { font-size: 1.75rem; margin-bottom: .5rem; }
  .stats > div { padding: 1.25rem; }
  .stack dl > div { grid-template-columns: 1fr; gap: .6rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .brand img { height: 34px; }
}

/* Spam-trap field: off-screen for people, still visible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Text for screen readers only */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Enquiry form: brief highlight on arrival (header offset comes from html scroll-padding-top) */
#enquiry.flash { animation: enquiryFlash 1.4s var(--ease); }
@keyframes enquiryFlash {
  0%   { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(15,118,110,.45); }
  40%  { box-shadow: var(--shadow-lg), 0 0 0 8px rgba(15,118,110,.18); }
  100% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(15,118,110,0); }
}
