/* ==========================================================================
   Business Website Template — style.css
   Colors and fonts are tokens on :root. The brand color is overridden at
   runtime from js/config.js (brand.primaryColor).
   ========================================================================== */

:root {
  --brand: #2F4BFF;
  --brand-ink: #FFFFFF;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, transparent);

  --bg: #FFFFFF;
  --surface: #F7F9FC;
  --surface-2: #EEF2F7;
  --card: #FFFFFF;
  --ink: #172033;
  --ink-2: #596579;
  --ink-3: #5E6A7C;   /* small text: 5.4:1 on white */
  --line: #E4E9F0;

  /* cursor / accent set */
  --coral: #FF6B5B;
  --mint: #12A981;
  --amber: #E89E00;
  --violet: #8A5CF6;
  --sky: #1E9BF0;

  --font-display: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
  --shadow-win: 0 1px 0 rgba(23, 32, 51, .04), 0 18px 40px -18px rgba(23, 32, 51, .18);
  --header-h: 72px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; letter-spacing: -0.02em; font-weight: 600; }
h2 { font-size: clamp(32px, 4.4vw, 54px); }
h3 { font-size: 22px; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { margin-top: 16px; color: var(--ink-2); font-size: 19px; }
.section-head.split { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.section-head.split > div { max-width: 640px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background-color .2s, color .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-lg { height: 54px; padding: 0 28px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 86%, #000); }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--brand); color: var(--brand-ink); }
.btn-light:hover { background: color-mix(in srgb, var(--brand) 86%, #000); }

.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; color: var(--ink);
  transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.link-arrow { font-weight: 600; text-decoration: none; color: var(--brand); border-bottom: 2px solid currentColor; padding-bottom: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.04em; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.logo .logo-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--brand); position: relative; flex: none; }
.logo .logo-mark::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg); }
.logo img { height: 32px; width: auto; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; padding: 8px 12px; border-radius: 999px; transition: color .2s, background-color .2s; }
.nav a:hover, .nav a.active, .nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brand); }
.nav .nav-mobile-cta { display: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }

.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, top .25s; }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 24px 0 clamp(64px, 9vw, 112px); position: relative; }
.canvas {
  position: relative; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto;
  height: clamp(380px, 44vw, 540px);
  background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  background-position: center;
  mask-image: linear-gradient(to bottom, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent);
  overflow: hidden;
}
.float { animation: bob 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.win { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-win); overflow: hidden; }
.win-bar { height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.win-bar i:nth-child(1) { background: var(--coral); }
.win-bar i:nth-child(2) { background: var(--amber); }
.win-bar i:nth-child(3) { background: var(--mint); }
.win-bar span { margin-left: 10px; }
.win-url { background: var(--surface); padding: 2px 12px; border-radius: 999px; flex: 1; max-width: 220px; }
.win-browser { left: 3%; top: 9%; width: 40%; }
.wire { padding: 14px; display: grid; gap: 14px; }
.wire-nav { display: flex; align-items: center; gap: 8px; }
.wire-nav b { width: 22px; height: 22px; border-radius: 6px; background: var(--brand); }
.wire-nav span { height: 7px; width: 34px; border-radius: 4px; background: var(--surface-2); }
.wire-nav span:first-of-type { margin-left: auto; }
.wire-hero { display: grid; gap: 8px; padding: 18px 0 6px; }
.wire-hero span { height: 12px; border-radius: 6px; background: var(--surface-2); }
.wire-hero .w-60 { width: 60%; height: 18px; background: var(--ink); opacity: .85; }
.wire-hero .w-80 { width: 80%; }
.wire-hero .w-40 { width: 30%; height: 26px; border-radius: 999px; margin-top: 6px; }
.wire-hero .accent { background: var(--brand); }
.wire-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wire-cards span { height: 58px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line); }

.win-code { left: 47%; top: 4%; width: 28%; }
.code { margin: 0; padding: 14px 16px; min-height: 168px; font: 12.5px/1.65 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink-2); white-space: pre; overflow: hidden; }
.code .tk-tag { color: #315FEA; }
.code .tk-attr { color: #A65A00; }
.code .tk-str { color: #087A58; }
.code .tk-cursor { display: inline-block; width: 7px; height: 14px; background: var(--ink-2); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.phone { position: absolute; right: 5%; top: 10%; width: 150px; height: 300px; border: 1px solid var(--line); border-radius: 28px; background: var(--card); padding: 8px; box-shadow: var(--shadow-win); }
.phone-notch { position: absolute; top: 12px; left: 50%; translate: -50% 0; width: 46px; height: 12px; border-radius: 8px; background: var(--ink); z-index: 1; }
.phone-screen { height: 100%; border-radius: 21px; background: var(--card); padding: 34px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.ph-title { height: 14px; width: 70%; border-radius: 6px; background: var(--ink); opacity: .85; }
.ph-img { flex: 1; border-radius: 12px; background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--violet) 22%, transparent)); }
.ph-line { height: 8px; border-radius: 4px; background: var(--surface-2); }
.ph-line.short { width: 60%; }
.ph-btn { height: 28px; border-radius: 999px; background: var(--brand); }

.chat { position: absolute; display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 10px 16px 12px 10px; box-shadow: var(--shadow-win); max-width: 300px; opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .5s ease, transform .5s cubic-bezier(.2, .9, .3, 1.3); }
.chat.show { opacity: 1; transform: none; }
.chat b { font-size: 14px; }
.chat small { color: var(--ink-3); font-size: 12px; margin-left: 4px; }
.chat p { font-size: 15px; margin-top: 2px; }
.chat-1 { left: 26%; top: 58%; }
.chat-2 { left: 55%; top: 70%; }
.avatar-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; font-family: var(--font-display); }

.dock { position: absolute; left: 4%; bottom: 14%; display: flex; gap: 8px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-win); }
.tool { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; }
.t1 { background: color-mix(in srgb, var(--sky) 70%, #000); } .t2 { background: color-mix(in srgb, var(--coral) 70%, #000); } .t3 { background: color-mix(in srgb, var(--violet) 80%, #000); } .t4 { background: var(--ink); color: var(--bg); } .t5 { background: color-mix(in srgb, var(--mint) 70%, #000); }

/* multiplayer cursors */
.cursor-layer { position: absolute; inset: 0; pointer-events: none; }
.mp-cursor { position: absolute; left: 0; top: 0; will-change: transform; transition: transform 2.4s cubic-bezier(.45, .05, .25, 1); }
.mp-cursor svg { width: 22px; height: 22px; fill: var(--c); stroke: #fff; stroke-width: 1.5; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }
.mp-cursor span { display: inline-block; margin: -2px 0 0 16px; background: color-mix(in srgb, var(--c) 60%, #000); color: #fff; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 4px 999px 999px 999px; white-space: nowrap; }
.mp-cursor.you { transition: transform .12s linear; opacity: 0; }
.mp-cursor.you.on { opacity: 1; }

.hero-copy { margin-top: clamp(-40px, -3vw, -12px); position: relative; }
.hero-title { font-size: clamp(42px, 7.2vw, 96px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; max-width: 15ch; }
.rotator { display: block; color: var(--brand); white-space: nowrap; }
.caret { display: inline-block; width: .07em; height: .82em; background: currentColor; margin-left: .06em; vertical-align: -0.06em; animation: blink 1s steps(1) infinite; }
.hero-sub { margin-top: 24px; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 46ch; }
.hero-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Services ---------- */
.services { background: var(--surface); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px;
  display: flex; flex-direction: column; gap: 14px; position: relative;
}
.service-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 8px; }
.service-icon svg { width: 26px; height: 26px; }
.service p { color: var(--ink-2); }
.service-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.service-more > div { overflow: hidden; }
.service-more p { padding-top: 14px; border-top: 1px dashed var(--line); color: var(--ink); }
.service.open .service-more { grid-template-rows: 1fr; }
.service-toggle {
  margin-top: auto; align-self: flex-start; background: none; border: 0; padding: 6px 0; cursor: pointer;
  font-weight: 600; color: var(--brand); display: inline-flex; gap: 8px; align-items: center;
}
.service-toggle svg { width: 18px; height: 18px; transition: transform .3s; }
.service.open .service-toggle svg { transform: rotate(45deg); }

/* ---------- Process ---------- */
.process { background: var(--bg); color: var(--ink); position: relative; overflow: hidden; }
.process::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .5;
  mask-image: radial-gradient(ellipse at 80% 40%, #000 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 40%, #000 0%, transparent 65%);
}
.process-inner { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.process-copy p { margin: 20px 0 32px; color: var(--ink-2); font-size: 19px; max-width: 44ch; }
.process-steps { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; box-shadow: var(--shadow-win); }
.step-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.step-tab {
  background: transparent; border: 0; border-radius: 12px; padding: 12px 10px; cursor: pointer; text-align: left;
  color: var(--ink-2); font-weight: 600; font-size: 15px; transition: background-color .2s, color .2s;
}
.step-tab .num { display: block; font-size: 13px; opacity: .7; margin-bottom: 2px; }
.step-tab:hover { color: var(--ink); }
.step-tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); }
.step-panel { padding: 28px 18px 18px; min-height: 170px; }
.step-panel h3 { font-size: 30px; }
.step-panel p { margin-top: 12px; color: var(--ink-2); font-size: 18px; }
.step-panel.swap { animation: swapIn .4s ease; }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step-progress { height: 3px; background: var(--line); border-radius: 3px; margin: 0 18px 12px; overflow: hidden; }
.step-progress span { display: block; height: 100%; width: 0; background: var(--brand); }

/* ---------- Team ---------- */
.team-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.member { text-align: left; }
.member-photo {
  aspect-ratio: 1; border-radius: var(--r-lg); display: grid; place-items: center; overflow: hidden; position: relative;
  background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: color-mix(in srgb, var(--c) 55%, #000);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3.4vw, 44px);
  transition: border-radius .35s ease;
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member:hover .member-photo { border-radius: 50%; }
.member b { display: block; margin-top: 10px; font-size: 15px; }
.member span { color: var(--ink-3); font-size: 14px; }
.team-copy p { margin-top: 16px; color: var(--ink-2); font-size: 19px; }
.openings { display: grid; gap: 10px; margin: 28px 0; }
.opening { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border-radius: 16px 16px 16px 4px; padding: 10px 16px 10px 10px; width: fit-content; max-width: 100%; }
.opening b { font-size: 14px; }
.opening small { color: var(--ink-3); font-size: 12px; margin-left: 4px; }
.opening p { font-size: 15px; }

/* ---------- Work ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter {
  border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 18px; cursor: pointer;
  font-weight: 500; color: var(--ink-2); transition: all .2s;
}
.filter:hover { color: var(--ink); border-color: var(--ink-3); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.project[hidden] { display: none; }
.project.enter { animation: swapIn .35s ease both; }
.cover {
  aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; position: relative;
  background: var(--cv1); display: grid; place-items: center;
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cover-art { width: 74%; aspect-ratio: 16 / 10; background: var(--card); border-radius: 10px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.4); padding: 10%; display: grid; gap: 8%; align-content: start; transition: transform .5s ease; }
.cover-art i { display: block; height: 10%; min-height: 6px; border-radius: 4px; background: var(--surface-2); }
.cover-art i:first-child { width: 55%; background: var(--cv2); height: 16%; }
.cover-art i:nth-child(2) { width: 85%; }
.cover-art i:nth-child(3) { width: 35%; background: var(--cv2); opacity: .6; border-radius: 999px; height: 14%; }
.project:hover .cover-art, .project:hover .cover img { transform: scale(1.04); }
.project-meta { display: flex; justify-content: space-between; margin-top: 14px; gap: 12px; }
.project-meta h3 { font-size: 20px; }
.project-meta span { color: var(--ink-3); font-size: 15px; white-space: nowrap; }

/* ---------- Clients marquee ---------- */
.clients { padding: 8px 0 clamp(56px, 8vw, 96px); }
.clients-label { color: var(--ink-3); margin-bottom: 20px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.client { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -0.03em; color: var(--ink-3); white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.client::before { content: ""; width: 22px; height: 22px; border-radius: 6px; border: 3px solid currentColor; }
.client.has-logo::before { display: none; }
.client img { height: 34px; width: auto; filter: grayscale(1); opacity: .7; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--surface); }
.quote-wrap { max-width: 900px; }
.quotes { position: relative; min-height: 260px; }
.quote { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.quote.active { opacity: 1; visibility: visible; position: relative; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 42px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; }
.quote figcaption { margin-top: 28px; display: flex; align-items: center; gap: 14px; }
.quote figcaption b { display: block; }
.quote figcaption span { color: var(--ink-3); font-size: 15px; }
.quote-nav { display: flex; align-items: center; gap: 16px; margin-top: 36px; }
.dots { display: flex; gap: 8px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; padding: 0; transition: width .3s, background-color .3s; }
.dots button[aria-current="true"] { width: 28px; border-radius: 6px; background: var(--brand); }

/* ---------- Insights ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post { text-decoration: none; display: flex; flex-direction: column; border-top: 2px solid var(--ink); padding-top: 20px; }
.post-meta { color: var(--ink-3); font-size: 14px; display: flex; gap: 12px; }
.post-meta .tag { color: var(--brand); font-weight: 600; }
.post h3 { margin-top: 12px; font-size: 24px; transition: color .2s; }
.post p { margin-top: 10px; color: var(--ink-2); }
a.post:hover h3 { color: var(--brand); }

/* ---------- FAQ ---------- */
.faq-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: none; border: 0; padding: 22px 0; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.01em;
}
.faq-q svg { width: 22px; height: 22px; flex: none; transition: transform .3s; color: var(--brand); }
.faq-q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding-bottom: 22px; color: var(--ink-2); max-width: 60ch; }
.faq-q[aria-expanded="true"] + .faq-a { grid-template-rows: 1fr; }

/* ---------- Contact ---------- */
.contact { background: var(--surface); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.contact-copy p { margin-top: 16px; color: var(--ink-2); font-size: 19px; max-width: 42ch; }
.contact-list { list-style: none; padding: 0; margin: 36px 0; display: grid; gap: 14px; }
.contact-list li { display: grid; grid-template-columns: 88px 1fr; gap: 12px; }
.contact-list span { color: var(--ink-3); }
.contact-list a, .contact-list em { font-style: normal; text-decoration: none; font-weight: 500; }
.contact-list a:hover { color: var(--brand); }
.socials { display: flex; gap: 10px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--ink); transition: background-color .2s, color .2s; }
.socials a:hover { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.socials svg { width: 20px; height: 20px; }

.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); display: grid; gap: 20px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label, .field legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 0; }
.field legend { margin-bottom: 8px; }
.opt { color: var(--ink-3); font-weight: 400; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field.invalid input, .field.invalid textarea { border-color: var(--coral); }
.error { color: var(--coral); font-size: 14px; min-height: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip label { display: inline-block; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 500; font-size: 15px; transition: all .2s; }
.chip input:checked + label { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip input:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 2px; }
.form-status { font-weight: 500; min-height: 1.6em; }
.form-status.ok { color: var(--mint); }
.form-status.err { color: var(--coral); }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-legal { color: var(--ink-3); font-size: 15px; flex: 1; min-width: 240px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Floating buttons ---------- */
.fab { position: fixed; right: 20px; z-index: 90; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(0,0,0,.35); transition: transform .25s, opacity .25s; }
.fab svg { width: 26px; height: 26px; }
.fab-wa { bottom: 20px; background: #25D366; color: #fff; }
.fab-top { bottom: 86px; background: var(--ink); color: var(--bg); opacity: 0; transform: translateY(12px); pointer-events: none; width: 46px; height: 46px; right: 24px; }
.fab-top.show { opacity: 1; transform: none; pointer-events: auto; }
.fab-top svg { width: 20px; height: 20px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 24, .6); backdrop-filter: blur(4px); animation: fade .25s; }
.modal-card { position: relative; width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg); border-radius: var(--r-lg); animation: pop .3s cubic-bezier(.2, .9, .3, 1.2); }
.modal-close { position: absolute; right: 14px; top: 14px; z-index: 2; }
.modal-cover .cover { border-radius: 0; aspect-ratio: 16 / 8; }
.modal-body { padding: 28px clamp(20px, 4vw, 36px) 36px; }
.modal-meta { color: var(--ink-3); }
.modal-body h3 { font-size: 34px; margin: 6px 0 12px; }
.modal-body p:not(.modal-meta) { color: var(--ink-2); font-size: 18px; margin-bottom: 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(10px); } }

/* ---------- Reveal (one subtle entrance for section heads only) ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .service-grid, .post-grid { grid-template-columns: 1fr 1fr; }
  .service-grid .service:last-child { grid-column: span 2; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .process-inner, .team-inner, .contact-inner, .faq-inner { grid-template-columns: 1fr; }
  .win-code { width: 34%; left: 46%; }
  .chat-2 { display: none; }
}

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 4px;
    background: var(--bg); padding: 16px var(--gutter) 24px; border-bottom: 1px solid var(--line);
    transform: translateY(-110%); visibility: hidden; transition: transform .3s ease, visibility .3s;
    z-index: -1;
  }
  .nav.open { transform: none; visibility: visible; }
  .nav a { padding: 14px 12px; font-size: 18px; }
  .nav .nav-mobile-cta { display: inline-flex; margin-top: 8px; color: var(--brand-ink); }
  .nav .nav-mobile-cta:hover { color: var(--brand-ink); background: var(--brand); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .canvas { height: 380px; }
  .win-browser { width: 66%; left: 4%; top: 6%; }
  .mp-cursor:nth-child(n+4):not(.you) { display: none; }
  .win-code { display: none; }
  .phone { width: 116px; height: 230px; right: 4%; top: 22%; border-radius: 22px; }
  .phone-screen { border-radius: 16px; }
  .chat-1 { left: 6%; top: 62%; max-width: 250px; }
  .dock { display: none; }
  .service-grid, .post-grid, .work-grid { grid-template-columns: 1fr; }
  .service-grid .service:last-child { grid-column: auto; }
  .team-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .step-tabs { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .rotator { white-space: normal; }
  .contact-list li { grid-template-columns: 72px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
}

/* ---------- No-JavaScript notice ---------- */
.noscript-note { margin-bottom: 24px; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font-size: 16px; }

/* ---------- Legal page (legal.html) ---------- */
.legal-page { padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 10vw, 128px); }
.legal-head { max-width: 760px; }
.legal-head h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; }
.legal-head p { margin-top: 18px; color: var(--ink-2); font-size: 19px; }
.legal-head a, .legal-body a { color: var(--brand); font-weight: 600; text-underline-offset: 3px; }
.legal-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; margin-top: clamp(40px, 6vw, 64px); }
.legal-toc { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.legal-toc b { margin-bottom: 6px; font-size: 14px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.legal-toc a { padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.legal-toc a:hover { background: var(--surface-2); }
.legal-body { max-width: 70ch; }
.legal-body h2 { font-size: clamp(28px, 3.4vw, 38px); margin-top: 56px; }
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body h3 { font-size: 19px; margin-top: 28px; }
.legal-body p { margin-top: 10px; color: var(--ink-2); }
.template-note { margin-bottom: 40px !important; padding: 14px 18px; border: 1.5px dashed var(--ink-3); border-radius: var(--r-md); color: var(--ink-2); font-size: 15px; }
@media (max-width: 860px) { .legal-grid { grid-template-columns: 1fr; gap: 28px; } .legal-toc { position: static; } }

/* Keep the menu button at the right edge when the navigation collapses */
@media (max-width: 860px) { .header-actions { margin-left: auto; } }

/* ---------- Inner pages: page heading and call-to-action strip ---------- */
.page-head { position: relative; isolation: isolate; padding: clamp(56px, 8vw, 104px) 0 clamp(8px, 2vw, 24px); }
.page-head::before { content: ""; position: absolute; inset: 0 0 -40px; z-index: -1; background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.page-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--brand); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.page-head .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.page-head h1 { max-width: 16ch; font-family: var(--font-display); font-size: clamp(40px, 6vw, 72px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; }
.page-head__text { max-width: 56ch; margin-top: 18px; color: var(--ink-2); font-size: 19px; }
.page-head + .section { padding-top: clamp(40px, 6vw, 72px); }
.cta-strip { padding: 0 0 clamp(72px, 10vw, 112px); }
.cta-strip__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; padding: clamp(28px, 5vw, 56px); border-radius: var(--r-lg); background: var(--ink); color: #fff; }
.cta-strip h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: #fff; }
.cta-strip p { margin-top: 10px; max-width: 46ch; color: #C9D2DE; font-size: 18px; }
.cta-strip .btn-primary:focus-visible { outline-color: #fff; }
.section-head p .link-arrow { font-size: 17px; }
.footer-links { flex-wrap: wrap; row-gap: 4px; }
