/* Building Resilience: dark port-twin design (options 24 and 25). */
:root {
  --bg: #080b12;
  --panel: #0e1420;
  --line: #1a2433;
  --line-2: #253244;
  --text: #eaf0f6;
  --text-2: #c3cdd9;
  --muted: #9aa8b8;
  --cyan: #7ee0f0;
  --amber: #f2b46a;
  --gutter: clamp(16px, 3vw, 32px);
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 300 18px/1.7 var(--sans); }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #b8eef7; }
img, svg, canvas { max-width: 100%; }
.wrap { max-width: 1320px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.small { font-size: 14px; }
.muted { color: var(--muted); }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 18px var(--gutter); max-width: 1320px; margin: 0 auto; position: relative; z-index: 4; }
.site-header.overlay { position: absolute; inset: 0 0 auto 0; max-width: none; background: linear-gradient(rgba(6, 9, 15, .85), rgba(6, 9, 15, .35) 70%, rgba(6, 9, 15, 0)); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 17px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; font-weight: 400; }
.nav a, .menu nav a { color: #dfe6ee; text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--cyan); }
.btn, .btn-ghost { display: inline-block; padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 16px; line-height: 1.2; }
.btn { background: var(--text); color: var(--bg); }
.btn:hover { background: #fff; color: var(--bg); }
.btn-ghost { color: var(--text); border: 1px solid rgba(234, 240, 246, .3); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--text); }
.nav-cta { padding: 9px 18px; font-size: 15px; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; font-size: 15px; font-weight: 400; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: calc(100% + 8px); display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; min-width: 220px; }
@media (max-width: 1080px) {
  .nav, .nav-cta { display: none; }
  .menu { display: block; }
}

/* Home hero and intro */
.pi-hero { position: relative; background: #0d1422; height: clamp(600px, 56vw, 900px); overflow: hidden; }
.scene { display: block; width: 100%; height: 100%; }
.hero-copy { position: absolute; left: 0; bottom: 0; width: min(100%, 860px); z-index: 2; padding: 120px var(--gutter) clamp(32px, 4vw, 56px); background: linear-gradient(to top right, rgba(6, 9, 15, .85), rgba(6, 9, 15, .4) 55%, rgba(6, 9, 15, 0) 80%); }
.hero-copy h1 { margin: 0; font-size: clamp(38px, 5vw, 68px); font-weight: 400; line-height: 1.05; letter-spacing: -.03em; max-width: 16ch; }
.hero-copy .lead { color: #c9d3de; max-width: 32em; }
.eyebrow { margin: 0 0 14px; font-size: 14px; color: var(--muted); font-weight: 400; }
.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--text-2); margin: 18px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }
.pi-intro { display: none; }
.scene-caption { position: absolute; bottom: 8px; right: var(--gutter); font-size: 13px; color: var(--muted); }
/* Intro: only with JavaScript, once per session, and not for reduced motion (see the head script). */
.js:not(.seen) .pi-hero { height: 100vh; height: 100svh; min-height: 560px; max-height: 1100px; transition: height 1.1s cubic-bezier(.6, 0, .2, 1); }
.js:not(.seen) .pi.in { height: clamp(600px, 56vw, 900px); }
.js:not(.seen) .pi-intro { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 10px; padding: 0 var(--gutter) 32px; cursor: pointer; background: linear-gradient(to top, rgba(6, 9, 15, .55), rgba(6, 9, 15, 0) 26%); transition: opacity .7s ease; }
.js:not(.seen) .pi.in .pi-intro { opacity: 0; pointer-events: none; }
.js:not(.seen) .pi:not(.in) .pi-home { opacity: 0; pointer-events: none; }
.js:not(.seen) .pi-home { transition: opacity .9s ease .6s; }
.pi-intro:focus { outline: none; }
.pi-intro:focus-visible { outline: 2px solid var(--cyan); outline-offset: -8px; }
.pi-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: #dfe6ee; }
.pi-line { margin: 0; font-size: clamp(20px, 1.9vw, 26px); font-weight: 400; line-height: 1.2; letter-spacing: -.01em; }
.pi-row { display: flex; align-items: center; gap: 14px; padding-top: 2px; }
.pi-enter { border: 1px solid rgba(234, 240, 246, .35); border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 500; }
.pi-track { display: block; width: min(120px, 26vw); height: 2px; background: rgba(234, 240, 246, .18); border-radius: 2px; overflow: hidden; }
.pi-bar { display: block; height: 100%; width: 100%; background: var(--cyan); transform-origin: left; transform: scaleX(0); }

/* Inner page head */
.page-head { padding-top: clamp(40px, 6vw, 88px); padding-bottom: 12px; }
.page-head h1 { margin: 0; font-size: clamp(36px, 4.6vw, 60px); font-weight: 400; line-height: 1.08; letter-spacing: -.03em; max-width: 20ch; }
.page-head .lead { max-width: 40em; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.meta { font-size: 15px; color: var(--muted); margin: 16px 0 0; }
.meta a { color: var(--muted); }

/* Prose */
.prose { padding-top: 24px; padding-bottom: clamp(56px, 8vw, 104px); }
.prose > * { max-width: 760px; }
.prose > .cards, .prose > .table-wrap, .prose > .wide { max-width: none; }
.prose h2 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 400; letter-spacing: -.02em; line-height: 1.2; margin: 2.2em 0 .6em; scroll-margin-top: 24px; }
.prose h3 { font-size: 21px; font-weight: 500; margin: 1.6em 0 .4em; scroll-margin-top: 24px; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--amber); font-size: 20px; color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.prose code { font-family: var(--mono); font-size: .9em; }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--text); background: var(--panel); }
td { color: var(--text-2); }
tr:last-child td { border-bottom: 0; }

/* Cards */
.cards { list-style: none; padding: 0; margin: 1.4em 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 26px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; transition: border-color .25s, background .25s; }
.card a:hover { border-color: #2d4a63; background: var(--panel); }
.tag { font-family: var(--mono); font-size: 12px; color: var(--amber); }
.card-title { font-size: 21px; font-weight: 400; color: var(--text); line-height: 1.3; }
.card-text { color: var(--muted); font-size: 16px; line-height: 1.55; }
.card time { font-size: 14px; color: var(--muted); }

/* FAQ */
.faq { margin-top: 3em; }
.faq details { border-top: 1px solid var(--line); padding: 6px 0; }
.faq summary { cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { display: inline; font-size: 19px; font-weight: 500; color: var(--text); }
.faq p { margin: .4em 0 1em; }

/* Contact form */
.form { display: grid; gap: 16px; max-width: 560px; }
.form label { display: grid; gap: 6px; font-size: 15px; color: var(--text-2); font-weight: 400; }
.form input, .form textarea { font: 400 16px var(--sans); color: var(--text); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.form button { justify-self: start; border: 0; cursor: pointer; font-family: var(--sans); }
.form .hp { position: absolute; left: -9999px; }
.form-status { font-size: 15px; margin: 0; }
.form-status.ok { color: #8cdcaa; }
.form-status.error { color: #ff8a7a; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 28px; font-size: 15px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; align-content: start; }
.site-footer nav a, .site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.site-footer p { margin: 12px 0 0; }
.copyright { margin-top: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Inner page banner (src/assets/banner.js draws on the canvas). */
.page-hero { position: relative; overflow: hidden; min-height: clamp(340px, 34vw, 460px); display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); }
.page-hero .banner { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.page-hero .page-head { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(28px, 4vw, 48px); }

/* Numbered step cards ({{style:steps}}). */
.prose > .steps { max-width: none; }
.prose .steps, .prose .offer { padding-left: 0; }
.steps { list-style: none; padding: 0; margin: 1.6em 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; position: relative; counter-reset: none; }
.steps::before { content: ''; position: absolute; left: 28px; right: 28px; top: 47px; height: 1px; background: linear-gradient(90deg, var(--cyan), rgba(126, 224, 240, .15)); transform-origin: left; }
.steps li { position: relative; margin: 0; padding: 26px 24px 24px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, rgba(14, 20, 32, .9), rgba(8, 11, 18, .9)); }
.step-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(126, 224, 240, .5); background: var(--bg); color: var(--cyan); font: 400 14px var(--mono); position: relative; box-shadow: 0 0 0 6px var(--bg), 0 0 24px rgba(126, 224, 240, .18); }
.steps h3 { margin: 18px 0 6px; font-size: 21px; font-weight: 500; color: var(--text); }
.steps p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
@media (max-width: 760px) { .steps::before { display: none; } }

/* Service cards with icons ({{style:offer}}). */
.prose > .offer { max-width: none; }
.offer { list-style: none; padding: 0; margin: 1.6em 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.offer li { margin: 0; }
.offer a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 26px 24px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; background: radial-gradient(120% 80% at 0% 0%, rgba(126, 224, 240, .07), rgba(126, 224, 240, 0) 60%); transition: border-color .3s, transform .3s, background .3s; }
.offer a:hover { border-color: #2d4a63; transform: translateY(-3px); background: radial-gradient(120% 80% at 0% 0%, rgba(126, 224, 240, .14), rgba(126, 224, 240, 0) 60%), var(--panel); }
.offer .icon { width: 30px; height: 30px; color: var(--cyan); transition: transform .3s; }
.offer a:hover .icon { transform: scale(1.08); }
.offer .more { margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--amber); }

/* Fade-up on scroll: only after site.js adds .motion, so nothing is hidden if scripts fail. */
.motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.motion .reveal.shown { opacity: 1; transform: none; }
.motion .steps.reveal, .motion .offer.reveal, .motion .cards { opacity: 1; transform: none; }
.motion .steps li, .motion .offer li { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.motion .steps.shown li, .motion .offer.shown li { opacity: 1; transform: none; }
.motion .steps li:nth-child(2), .motion .offer li:nth-child(2) { transition-delay: .12s; }
.motion .steps li:nth-child(3), .motion .offer li:nth-child(3) { transition-delay: .24s; }
.motion .steps li:nth-child(4), .motion .offer li:nth-child(4) { transition-delay: .36s; }
.motion .steps li:nth-child(5), .motion .offer li:nth-child(5) { transition-delay: .48s; }
.motion .steps::before { transform: scaleX(0); transition: transform 1.4s cubic-bezier(.6, 0, .2, 1) .2s; }
.motion .steps.shown::before { transform: scaleX(1); }
.motion .prose > h2 { opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s ease; }
.motion .prose > h2.shown { opacity: 1; transform: none; }

/* Phones: stack table rows into small cards instead of scrolling sideways. */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; border: 0; }
  .table-wrap thead { display: none; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap tr { border: 1px solid var(--line); border-radius: 16px; padding: 6px 0; margin-bottom: 12px; background: var(--panel); }
  .table-wrap td { border: 0; padding: 6px 16px; }
  .table-wrap td:first-child { color: var(--text); font-weight: 500; }
}
