/* =========================================================
   SRS iFix Technologies — precision engineering studio
   Palette: obsidian / midnight navy / platinum / cool silver /
   sapphire (primary) / ice blue (annotations) / steel borders
   ========================================================= */
:root {
  --bg: #070A10;
  --surface: #101827;
  --ink: #F2F4F8;
  --body: #A4ADBD;
  --sapphire: #527CFF;
  --ice: #9DDEFF;
  --steel: #253044;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gut: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, figure, blockquote, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
::selection { background: var(--sapphire); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1240px, 100% - 2 * var(--gut)); margin-inline: auto; }
.mono { font: 500 11.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ice); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }

h1, h2 { color: var(--ink); font-weight: 600; letter-spacing: -.035em; line-height: 1.02; }
h3 { color: var(--ink); font-weight: 600; letter-spacing: -.015em; }
.lead { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; color: var(--body); max-width: 560px; }

.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 15px; white-space: nowrap; transition: background .25s, border-color .25s, transform .3s var(--ease), box-shadow .3s; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--sapphire); color: var(--bg); }
.btn-primary:hover { background: #6a8dff; transform: translateY(-1px); box-shadow: 0 10px 30px -12px var(--sapphire); }
.btn-ghost { border: 1px solid var(--steel); color: var(--ink); }
.btn-ghost:hover { border-color: var(--sapphire); background: rgba(82, 124, 255, .08); }

/* nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .35s, border-color .35s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(7, 10, 16, .78); border-color: var(--steel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-inner { width: min(1240px, 100% - 2 * var(--gut)); margin-inline: auto; height: 68px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -.02em; color: var(--ink); }
.brand b { font-weight: 700; color: var(--sapphire); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, .04); }
.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--steel); position: relative; }
.burger i { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease); }
.burger i:first-child { top: 18px; } .burger i:last-child { top: 25px; }
.nav.open .burger i:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.open .burger i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 820px) {
  .burger { display: block; }
  .nav-book { margin-left: auto; }
  .nav-links { position: absolute; top: 68px; left: var(--gut); right: var(--gut); flex-direction: column; gap: 0; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--steel); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .35s var(--ease); margin: 0; }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 16px; font-size: 17px; color: var(--ink); }
}

/* hero */
.hero { position: relative; min-height: 78svh; display: flex; align-items: flex-end; padding: 150px 0 56px; background: radial-gradient(60% 70% at 78% 0%, rgba(82, 124, 255, .10), transparent 70%), radial-gradient(50% 60% at 10% 100%, rgba(157, 222, 255, .04), transparent 70%); }
.hero h1 { margin-top: 22px; font-size: clamp(46px, 8.4vw, 128px); letter-spacing: -.05em; line-height: .96; }
.hero .lead { margin-top: 26px; }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cue { margin-top: 48px; color: var(--body); }

/* ===== chapters ===== */
.chapter-track { position: relative; height: calc(100svh + 380svh); }
.chapter-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: radial-gradient(46% 52% at 50% 46%, rgba(82, 124, 255, .11), transparent 72%), var(--bg); }
.chapter-stage::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(120% 100% at 50% 50%, transparent 60%, rgba(7, 10, 16, .75)); }
.chapter-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.chapter-fallback { display: none; }
.chapter-leaders { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.chapter-leaders path { fill: none; stroke: var(--ice); stroke-width: 1; }
.chapter-leaders circle { fill: var(--ice); }
.chapter-leaders > * { visibility: hidden; }

.chapter-head { position: absolute; z-index: 4; left: var(--gut); top: 50%; transform: translateY(-50%); width: min(25vw, 360px); }
.chapter-head h2 { margin-top: 14px; font-size: clamp(30px, 3.6vw, 56px); }
.chapter-stage-name { margin-top: 22px; min-height: 2.8em; color: var(--body); }
.chapter-skip { display: inline-block; margin-top: 10px; font-size: 13.5px; border-bottom: 1px solid var(--steel); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.chapter-skip:hover { color: var(--ink); border-color: var(--sapphire); }

.chapter-notes { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.note { position: absolute; left: 0; top: 0; width: min(300px, 27vw); padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--steel); visibility: hidden; opacity: 0; will-change: transform, opacity; }
.note .mono { font-size: 10.5px; }
.note h3 { margin-top: 6px; font-size: 17px; }
.note p { margin-top: 6px; font-size: 14px; line-height: 1.5; }
.chapter-notes.is-narrow { display: none; }

.chapter-caption { position: absolute; z-index: 4; left: var(--gut); right: var(--gut); bottom: 30px; display: none; opacity: 0; transition: opacity .3s; text-align: center; }
.chapter-caption.is-on { opacity: 1; }
.chapter-caption b { display: block; color: var(--ink); font-size: 17px; font-weight: 600; }
.chapter-caption span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; }
.chapter-progress { position: absolute; z-index: 4; left: var(--gut); right: var(--gut); bottom: 0; height: 2px; background: var(--steel); }
.chapter-progress i { display: block; height: 100%; background: var(--sapphire); transform-origin: left; transform: scaleX(0); }

@media (max-width: 760px) {
  .chapter-track { height: calc(100svh + 260svh); }
  .chapter-head { top: 84px; transform: none; width: auto; right: var(--gut); }
  .chapter-head h2 { font-size: clamp(28px, 8vw, 38px); }
  .chapter-stage-name { display: none; }
  .chapter-caption { display: block; }
  .chapter-leaders { display: none; }
}

/* static + reduced-motion states: a composed still view, no pinned scroll */
.chapter.is-static .chapter-track, .chapter.is-reduced .chapter-track { height: auto; }
.chapter.is-static .chapter-stage, .chapter.is-reduced .chapter-stage { position: relative; height: min(100svh, 920px); }
.chapter.is-static .chapter-canvas, .chapter.is-static .chapter-notes, .chapter.is-static .chapter-leaders, .chapter.is-static .chapter-caption, .chapter.is-static .chapter-progress { display: none; }
.chapter.is-static .chapter-fallback { display: block; position: absolute; z-index: 1; top: 5%; bottom: 5%; right: 8%; height: 90%; width: auto; max-width: 56%; object-fit: contain; border-radius: 14px; }
.chapter.is-static .chapter-head, .chapter.is-reduced .chapter-head { opacity: 1 !important; }
.chapter.is-static .chapter-stage-name, .chapter.is-reduced .chapter-stage-name { display: none; }
.chapter.is-reduced .chapter-progress, .chapter.is-reduced .chapter-caption { display: none; }
@media (max-width: 760px) {
  .chapter.is-static .chapter-fallback { top: 38%; bottom: 3%; left: 50%; right: auto; transform: translateX(-50%); height: 59%; max-width: 90%; }
}

/* ===== services ===== */
.services { padding: clamp(80px, 11vw, 150px) 0; border-top: 1px solid var(--steel); }
.services-head h2 { margin-top: 14px; font-size: clamp(34px, 4.6vw, 68px); }
.services-head .lead { margin-top: 22px; }
.services-head .btn { margin-top: 30px; }
.services-list li { display: grid; grid-template-columns: 44px 1fr; gap: 6px 14px; padding: 24px 0; border-top: 1px solid var(--steel); }
.services-list li:last-child { border-bottom: 1px solid var(--steel); }
.services-list h3 { font-size: clamp(19px, 1.8vw, 24px); }
.services-list p { margin-top: 6px; font-size: 15.5px; }
.services-list .mono { padding-top: 6px; }

.services--split .services-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.services--split .services-head { position: sticky; top: 110px; }

.services--mirror .services-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.services--mirror .services-head { order: 2; position: sticky; top: 110px; }
.services--mirror .services-list { order: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.services--mirror .services-list li { display: block; padding: 22px; border: 1px solid var(--steel); border-radius: 16px; background: var(--surface); }
.services--mirror .services-list .mono { display: block; margin-bottom: 14px; padding: 0; }

.services--grid { background: linear-gradient(180deg, var(--surface), var(--bg) 70%); }
.services--grid .services-head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.services--grid .services-list { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.services--grid .services-list li { display: block; padding: 28px; border: 1px solid var(--steel); border-radius: 18px; background: rgba(16, 24, 39, .6); }
.services--grid .services-list .mono { display: block; margin-bottom: 40px; padding: 0; }

@media (max-width: 960px) {
  .services--split .services-grid, .services--mirror .services-grid { grid-template-columns: 1fr; }
  .services--split .services-head, .services--mirror .services-head { position: static; order: 0; }
  .services--mirror .services-list { order: 0; grid-template-columns: 1fr; }
  .services--grid .services-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) { .services--grid .services-list { grid-template-columns: 1fr; } }

/* ===== process + proof ===== */
.trust { padding: clamp(80px, 11vw, 150px) 0; border-top: 1px solid var(--steel); }
.trust h2 { margin-top: 14px; max-width: 14ch; font-size: clamp(34px, 5vw, 72px); }
.steps { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { padding-top: 22px; border-top: 1px solid var(--steel); }
.steps h3 { margin-top: 12px; font-size: 20px; }
.steps p { margin-top: 8px; font-size: 15.5px; }
.proof { margin-top: clamp(56px, 8vw, 100px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.proof-stats { display: grid; gap: 14px; }
.proof-stats p { padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--steel); }
.proof-stats b { display: block; font-size: clamp(40px, 4vw, 56px); font-weight: 300; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.proof-stats span { display: block; margin-top: 8px; font-size: 14px; }
.proof figure { padding: 26px; border-radius: 16px; border: 1px solid var(--steel); display: flex; flex-direction: column; gap: 18px; }
.proof blockquote { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.4; color: var(--ink); }
.proof figcaption { margin-top: auto; color: var(--body); }
.link-arrow { display: inline-block; margin-top: 26px; color: var(--ice); font-weight: 500; border-bottom: 1px solid var(--steel); padding-bottom: 2px; }
.link-arrow:hover { border-color: var(--ice); }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } .proof { grid-template-columns: 1fr; } .proof-stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ===== booking ===== */
.book { padding: clamp(80px, 11vw, 150px) 0; border-top: 1px solid var(--steel); background: linear-gradient(180deg, var(--bg), var(--surface)); }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form { padding: clamp(24px, 4vw, 44px); border-radius: 24px; background: var(--bg); border: 1px solid var(--steel); display: flex; flex-direction: column; gap: 14px; }
.form h2 { font-size: clamp(32px, 4vw, 52px); }
.form-sub { margin-bottom: 6px; }
.seg { border: 0; margin: 0; padding: 4px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; border-radius: 14px; background: var(--surface); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 12px 4px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .25s, color .25s; }
.seg input:checked + span { background: var(--sapphire); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--ice); outline-offset: 2px; }
.field { position: relative; }
.field input, .field textarea { width: 100%; padding: 26px 16px 10px; border-radius: 12px; border: 1px solid var(--steel); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; resize: vertical; transition: border-color .25s, box-shadow .25s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sapphire); box-shadow: 0 0 0 3px rgba(82, 124, 255, .22); }
.field label { position: absolute; left: 17px; top: 18px; pointer-events: none; font-size: 16px; transition: transform .25s var(--ease), color .25s; transform-origin: left; }
.field :is(input, textarea):focus + label, .field :is(input, textarea):not(:placeholder-shown) + label { transform: translateY(-11px) scale(.78); color: var(--ice); }
.field.err :is(input, textarea) { border-color: #ff7a90; }
.form-msg { min-height: 22px; font-size: 14px; }
.visit { display: flex; flex-direction: column; gap: 20px; }
.visit-card { padding: clamp(24px, 4vw, 40px); border-radius: 24px; background: var(--bg); border: 1px solid var(--steel); }
.visit-card h3 { margin-top: 12px; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }
address { margin-top: 14px; font-style: normal; line-height: 1.7; }
.visit-btns { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.map { flex: 1; min-height: 280px; border-radius: 24px; overflow: hidden; border: 1px solid var(--steel); }
.map iframe { width: 100%; height: 100%; min-height: 280px; border: 0; filter: invert(.92) hue-rotate(180deg) saturate(.5) brightness(.9); }
@media (max-width: 900px) { .book-grid { grid-template-columns: 1fr; } }

/* footer */
.foot { padding: 56px 0 28px; border-top: 1px solid var(--steel); }
.foot-row { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14.5px; }
.foot nav a:hover { color: var(--ink); }
.legal { margin-top: 34px; max-width: 820px; font-size: 12.5px; line-height: 1.6; color: #7f889a; }
.foot-base { margin-top: 20px; color: #7f889a; }

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

/* ===== video chapter (MacBook) ===== */
.chapter-video { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--bg); display: flex; align-items: flex-end; }
.chapter-video-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% center; }
.chapter-video-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 10, 16, .92) 0%, rgba(7, 10, 16, .55) 34%, rgba(7, 10, 16, 0) 62%), linear-gradient(90deg, rgba(7, 10, 16, .55) 0%, rgba(7, 10, 16, 0) 55%); }
.chapter-video-content { position: relative; z-index: 1; padding-bottom: clamp(56px, 9vh, 104px); }
.chapter-video-content h2 { margin-top: 14px; max-width: 12ch; font-size: clamp(40px, 6.4vw, 96px); letter-spacing: -.045em; line-height: .98; }
.chapter-video-content .lead { margin-top: 18px; max-width: 480px; }
.chapter-video-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.video-toggle { position: absolute; z-index: 2; right: var(--gut); bottom: 28px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--steel); background: rgba(7, 10, 16, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; color: var(--ink); transition: border-color .2s; }
.video-toggle:hover { border-color: var(--sapphire); }
@media (max-width: 760px) { .chapter-video-media { object-position: 30% center; } .video-toggle { bottom: auto; top: 84px; } }

/* portrait video: framed beside the text on wide screens, full-bleed on phones */
.chapter-video--portrait .chapter-video-media { object-position: center 62%; }
@media (min-width: 901px) {
  .chapter-video--portrait { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(32px, 6vw, 96px); padding: 96px var(--gut) 40px; }
  .chapter-video--portrait .chapter-video-shade { display: none; }
  .chapter-video--portrait .chapter-video-media { position: relative; inset: auto; width: auto; height: min(86svh, 860px); aspect-ratio: 9 / 16; border-radius: 24px; border: 1px solid var(--steel); object-position: center; }
  .chapter-video--portrait .chapter-video-content { order: -1; width: auto; margin: 0; padding: 0; }
  .chapter-video--portrait .video-toggle { right: auto; left: var(--gut); bottom: 28px; }
}
