:root {
  --navy-950: #071a26;
  --navy-900: #0c2433;
  --navy-850: #0f2c3d;
  --navy-800: #123245;
  --navy-700: #1b3f54;
  --paper: #eef3f1;
  --paper-dim: #a9bec2;
  --cyan-line: #8fd6cf;
  --cyan-bright: #c9f1ec;
  --copper: #e08a3e;
  --copper-deep: #c96f28;
  --stamp: #c0523a;

  --font-display: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Consolas', monospace;

  --ease-out-exp: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1400px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--copper); color: var(--navy-950); }
:focus-visible { outline: 2px solid var(--cyan-bright); outline-offset: 3px; border-radius: 2px; }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--navy-950); }
::-webkit-scrollbar-thumb { background: var(--navy-700); border: 3px solid var(--navy-950); border-radius: 8px; }
html { scrollbar-color: var(--navy-700) var(--navy-950); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--paper); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
.ic { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -0.15em; }

.wrap { max-width: var(--wrap); margin: 0; padding: 0 clamp(28px, 4vw, 88px); }
.mono { font-family: var(--font-mono); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out-exp), transform 0.7s var(--ease-out-exp); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

.draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.draw.is-drawn { transition: stroke-dashoffset 1.6s var(--ease-out-exp); stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .draw { stroke-dashoffset: 0 !important; transition: none !important; } }

.pipe-flow { stroke-dasharray: 5 11; animation: flow 1.6s linear infinite; }
.pipe-run.is-flowing { stroke-dasharray: 6 10; animation: flow 1.6s linear infinite; }
@media (prefers-reduced-motion: reduce) { .pipe-flow, .pipe-run.is-flowing { animation: none; } }
@keyframes flow { to { stroke-dashoffset: -16; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(7, 26, 38, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--navy-700); }
.site-header .wrap { max-width: none; }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; color: var(--copper); }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-name em { font-style: normal; color: var(--cyan-line); font-weight: 500; margin-left: 0.35em; }
.main-nav { display: flex; gap: 24px; font-size: 0.94rem; color: var(--paper-dim); white-space: nowrap; }
.main-nav a { transition: color 0.2s; }
.main-nav a:hover { color: var(--cyan-bright); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.phone-chip { display: flex; align-items: center; gap: 8px; background: var(--copper); color: var(--navy-950); font-weight: 600; font-size: 0.9rem; padding: 10px 16px; border-radius: 3px; transition: background 0.2s; }
.phone-chip:hover { background: var(--copper-deep); }
.nav-toggle { display: none; background: none; border: 1px solid var(--navy-700); color: var(--paper); width: 42px; height: 42px; border-radius: 3px; align-items: center; justify-content: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; font-family: var(--font-body); font-weight: 600; font-size: 0.98rem; border-radius: 3px; border: 1px solid transparent; cursor: pointer; transition: background 0.2s var(--ease-out-exp), color 0.2s, border-color 0.2s, transform 0.2s; }
.btn-primary { background: var(--copper); color: var(--navy-950); }
.btn-primary:hover { background: var(--copper-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--navy-700); }
.btn-ghost:hover { border-color: var(--cyan-line); color: var(--cyan-bright); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 96px; border-bottom: 1px solid var(--navy-700); }
.hero-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(180deg, transparent, var(--navy-950) 95%); z-index: 1; }
.hero-schematic { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.9; }
.hero-inner { position: relative; z-index: 2; max-width: 640px; }
.hero-status { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.03em; color: var(--cyan-bright); background: rgba(143, 214, 207, 0.08); border: 1px solid var(--navy-700); padding: 9px 14px; border-radius: 999px; margin-bottom: 28px; }
.hero-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan-line); box-shadow: 0 0 0 3px rgba(143,214,207,0.18); }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); line-height: 1.08; margin-bottom: 22px; }
.hero-sub { font-size: 1.1rem; color: var(--paper-dim); max-width: 52ch; margin-bottom: 34px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Pipe connector ---------- */
.pipe-connector { line-height: 0; background: var(--navy-950); }
.pipe-connector svg { width: 100%; height: 44px; display: block; }

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--navy-900); padding: 30px 0; border-bottom: 1px solid var(--navy-700); }
.trust-row { display: flex; flex-wrap: wrap; gap: 14px 34px; justify-content: flex-start; }
.stamp-tag { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.86rem; color: var(--paper-dim); letter-spacing: 0.01em; }
.stamp-tag .ic { color: var(--copper); }

/* ---------- Section head ---------- */
.section-head { font-size: clamp(1.7rem, 2.6vw, 2.3rem); max-width: 20ch; margin-bottom: 46px; }
.contact .section-head, .area .section-head { margin-bottom: 18px; }

/* ---------- Services / spec list ---------- */
.services { padding: 100px 0; }
.spec-list { border-top: 1px solid var(--navy-700); }
.spec-row { display: grid; grid-template-columns: 90px 44px 1fr; gap: 22px; align-items: start; padding: 28px 0; border-bottom: 1px solid var(--navy-700); }
.spec-code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--cyan-line); padding-top: 6px; letter-spacing: 0.02em; }
.spec-icon { width: 26px; height: 26px; color: var(--copper); margin-top: 4px; }
.spec-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.spec-body p { color: var(--paper-dim); max-width: 62ch; }
.spec-row--featured { padding: 40px 0 44px; }
.spec-row--featured .spec-icon { width: 40px; height: 40px; }
.spec-row--featured h3 { font-size: 1.6rem; margin-bottom: 12px; }
.spec-row--featured p { font-size: 1.08rem; max-width: 58ch; color: var(--paper); opacity: 0.88; }

/* ---------- Process ---------- */
.process { padding: 100px 0; background: var(--navy-900); }
.process-diagram { position: relative; }
.process-line { display: none; }
.process-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.process-steps li { border-top: 2px solid var(--navy-700); padding-top: 22px; position: relative; }
.process-steps li::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--navy-900); border: 2px solid var(--copper); }
.step-no { font-family: var(--font-mono); font-size: 0.85rem; color: var(--copper); display: block; margin-bottom: 10px; }
.process-steps h3 { font-size: 1.08rem; margin-bottom: 8px; }
.process-steps p { color: var(--paper-dim); font-size: 0.96rem; }

@media (min-width: 820px) {
  .process-line { display: block; width: 100%; height: 60px; margin-bottom: 6px; }
  .process-steps li { border-top: none; padding-top: 0; }
  .process-steps li::before { display: none; }
}

/* ---------- Work ---------- */
.work { padding: 100px 0; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.work-item--wide { grid-column: span 3; }
@media (min-width: 720px) { .work-item--wide { grid-column: span 1; } }
.frame { position: relative; border: 1px solid var(--navy-700); padding: 10px; background: var(--navy-900); }
.frame::before, .frame::after { content: ""; position: absolute; width: 16px; height: 16px; border: 1.5px solid var(--copper); }
.frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.frame::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.frame img { width: 100%; height: 240px; object-fit: cover; display: block; }
.work-item figcaption { margin-top: 14px; font-size: 0.92rem; color: var(--paper-dim); }
.work-item figcaption .mono { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--cyan-line); letter-spacing: 0.05em; margin-bottom: 5px; }

/* ---------- Reviews ---------- */
.reviews { padding: 100px 0; background: var(--navy-900); }
.reviews-note { font-family: var(--font-mono); font-size: 0.8rem; color: var(--paper-dim); margin-top: -30px; margin-bottom: 40px; opacity: 0.7; }
.ticket-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.ticket { position: relative; margin: 0; background: var(--navy-850); border: 1px solid var(--navy-700); padding: 28px 26px; overflow: hidden; }
.ticket-stamp { position: absolute; top: 18px; right: -8px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--stamp); border: 1.5px solid var(--stamp); padding: 4px 10px; transform: rotate(8deg); opacity: 0.55; }
.stars { color: var(--copper); letter-spacing: 3px; margin-bottom: 14px; font-size: 0.95rem; }
.ticket p { font-size: 1.02rem; margin-bottom: 16px; max-width: 46ch; }
.ticket cite { font-family: var(--font-mono); font-size: 0.82rem; color: var(--paper-dim); font-style: normal; }

/* ---------- Area ---------- */
.area { padding: 100px 0; }
.area-row { display: flex; align-items: center; justify-content: space-between; gap: 60px; flex-wrap: wrap; }
.area-copy { flex: 0 1 480px; }
.area-copy p { color: var(--paper-dim); font-size: 1.05rem; max-width: 46ch; margin-top: 14px; }
.area-map-frame { flex: 0 0 380px; max-width: 100%; align-self: flex-start; }
.area-map { position: relative; }
.area-map img { width: 100%; height: auto; display: block; }

.map-pin-wrap { position: absolute; left: 71%; top: 53%; width: 0; height: 0; }
.map-pin-wrap .ping-ring { position: absolute; left: 0; top: 0; width: 34px; height: 34px; overflow: visible; transform: translate(-50%, -50%) scale(0.5); transform-origin: center; animation: ping 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.map-pin-wrap .ping-ring--2 { animation-delay: 0.8s; }
.map-pin-wrap .ping-ring--3 { animation-delay: 1.6s; }
.map-pin-wrap .map-pin { position: absolute; left: 0; top: 0; width: 26px; height: 26px; transform: translate(-50%, -88%); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
@keyframes ping { 0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; } 100% { transform: translate(-50%, -50%) scale(3.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .map-pin-wrap .ping-ring { animation: none; opacity: 0.35; }
  .map-pin-wrap .ping-ring--2, .map-pin-wrap .ping-ring--3 { display: none; }
}

.map-credit { position: absolute; right: 8px; bottom: 6px; font-size: 12px; color: var(--paper-dim); opacity: 0.8; background: rgba(7, 26, 38, 0.6); padding: 2px 7px; border-radius: 2px; letter-spacing: 0.02em; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- FAQ ---------- */
.faq { padding: 100px 0; background: var(--navy-900); }
.faq-list { border-top: 1px solid var(--navy-700); }
.faq-item { border-bottom: 1px solid var(--navy-700); }
.faq-item summary { display: flex; align-items: center; gap: 16px; padding: 24px 0; cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--paper); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; margin-left: auto; flex-shrink: 0; width: 9px; height: 9px; border-right: 2px solid var(--copper); border-bottom: 2px solid var(--copper); transform: rotate(45deg); transition: transform 0.25s var(--ease-out-exp); }
.faq-item[open] summary::after { transform: rotate(225deg); }
.faq-item p { margin: 0 0 26px; color: var(--paper-dim); max-width: 62ch; font-size: 1rem; }
.faq-code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--cyan-line); }

/* ---------- CTA band ---------- */
.cta-band { padding: 76px 0; background: var(--navy-800); border-top: 1px solid var(--navy-700); border-bottom: 1px solid var(--navy-700); }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-row h2 { font-size: 1.7rem; margin-bottom: 8px; }
.cta-row p { color: var(--paper-dim); }

/* ---------- Contact ---------- */
.contact { padding: 100px 0; }
.contact-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; }
.contact-info p { color: var(--paper-dim); font-size: 1.05rem; max-width: 42ch; margin-top: 14px; margin-bottom: 30px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: var(--paper-dim); }
.contact-list .ic { color: var(--copper); }
.contact-list a:hover { color: var(--cyan-bright); }

.contact-form { display: grid; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; position: relative; }
.field label { font-size: 0.86rem; color: var(--paper-dim); font-family: var(--font-mono); letter-spacing: 0.02em; }
.field input, .field textarea { background: var(--navy-900); border: 1px solid var(--navy-700); color: var(--paper); font-family: var(--font-body); font-size: 1rem; padding: 13px 14px; border-radius: 3px; transition: border-color 0.2s; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--cyan-line); outline: none; }
.field-error { display: none; font-size: 0.82rem; color: var(--stamp); }
.field.has-error input, .field.has-error textarea { border-color: var(--stamp); }
.field.has-error .field-error { display: block; }

.btn-submit { justify-content: center; position: relative; }
.btn-submit.is-loading .btn-label { opacity: 0; }
.btn-submit.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(7,26,38,0.35); border-top-color: var(--navy-950); animation: spin 0.7s linear infinite; }
.btn-submit:disabled { cursor: default; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-success { display: none; color: var(--cyan-bright); font-size: 0.92rem; margin-top: -4px; }
.contact-form.is-sent .form-success { display: block; }
.contact-form.is-sent .field, .contact-form.is-sent .btn-submit { opacity: 0.55; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--navy-700); padding: 60px 0 26px; background: var(--navy-950); }
.footer-row { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-brand p { color: var(--paper-dim); font-size: 0.92rem; max-width: 32ch; margin-top: 12px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; font-size: 0.9rem; color: var(--paper-dim); }
.footer-nav a:hover { color: var(--cyan-bright); }
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: var(--paper-dim); }
.footer-social a:hover { color: var(--copper); }
.footer-legal { font-family: var(--font-mono); font-size: 0.76rem; color: var(--paper-dim); opacity: 0.6; border-top: 1px solid var(--navy-700); padding-top: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; flex-shrink: 0; }
  .header-actions { gap: 10px; }
  .phone-chip { padding: 10px; }
  .phone-chip .phone-text { display: none; }
}

@media (max-width: 860px) {
  .contact-row { grid-template-columns: 1fr; gap: 40px; }
  .process-steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .header-row { height: 66px; gap: 12px; }
  .brand { gap: 6px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-name { font-size: 0.88rem; }
  .hero { padding: 56px 0 64px; }
  .hero-schematic { opacity: 0.5; }
  .hero-sub { font-size: 1.02rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }
  .services, .process, .work, .reviews, .area, .contact { padding: 64px 0; }
  .ticket-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 56px 34px 1fr; gap: 14px; }
  .process-steps { grid-template-columns: 1fr; gap: 24px; }
  .cta-row { flex-direction: column; align-items: flex-start; }
  .area-row { gap: 30px; }
}

/* Mobile nav panel */
.main-nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 66px;
  left: 0;
  right: 0;
  background: var(--navy-900);
  border-bottom: 1px solid var(--navy-700);
  padding: 20px 28px 26px;
  gap: 18px;
  font-size: 1.05rem;
}
