:root {
  color-scheme: light;
  --bg: #faf7f1;
  --panel: #fffefa;
  --ink: #172534;
  --muted: #525b64;
  --line: #d8d2c8;
  --accent: #8b451c;
  --button: #943b17;
  --button-hover: #743010;
  --button-ink: #fff;
  --mono: ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(clamp(1180px, 86vw, 1920px), calc(100% - 64px)); margin-inline: auto; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 800; white-space: nowrap; }
.brand-copy { display: grid; gap: 3px; line-height: 1.15; }
.brand-copy small { color: var(--muted); font-size: 11px; font-weight: 500; }
nav { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
nav a:hover, .site-footer a:hover { color: var(--accent); }
.button {
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 11px 16px; border-radius: 7px; min-height: 46px;
  border: 1px solid transparent; font-size: 14px; font-weight: 740;
}
.button span { font-size: 17px; line-height: 1; }
.outline { border-color: var(--line); }
.outline:hover { border-color: var(--accent); }
.primary { background: var(--button); color: var(--button-ink); }
.primary:hover { background: var(--button-hover); }
.header-call { white-space: nowrap; }
.header-call span { font-size: inherit; line-height: inherit; }
.header-call .header-call-label { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero, .contact, dialog {
  color-scheme: dark;
  --bg: #111e2c;
  --panel: #1e3042;
  --ink: #fff9ef;
  --muted: #c7d0db;
  --line: #536477;
  --accent: #ffc078;
  --button: #ffc078;
  --button-hover: #ffd6a6;
  --button-ink: #272119;
  background: var(--bg);
  color: var(--ink);
}
/* Keep the drafting grid and cable routes behind the content. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 83% 43%, #263d53, transparent 63%), var(--bg);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(#9db4ce19 1px, transparent 1px),
    linear-gradient(90deg, #9db4ce19 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(90deg, transparent 14%, #000 67%);
}
.hero-traces {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(72%, 1050px);
  height: 100%;
  pointer-events: none;
  z-index: -1;
}
.trace-base { stroke: #9db4ce; opacity: .29; }
.trace-accent { stroke: var(--accent); opacity: .55; }
.trace-nodes { stroke: #9db4ce; opacity: .49; }
.hero-grid {
  display: grid; grid-template-columns: 1.02fr 1fr; align-items: center;
  gap: clamp(24px, 4vw, 58px); padding-block: clamp(48px, 7vw, 96px);
}
.hero-copy, .hero-photo { min-width: 0; }
.eyebrow {
  display: flex; align-items: center; gap: 9px;
  color: var(--accent); font: 700 12px/1.5 var(--mono); letter-spacing: .11em;
}
.eyebrow i { width: 8px; height: 8px; background: currentColor; flex: none; }
h1, h2 { font-weight: 770; letter-spacing: -.055em; line-height: 1.03; }
h1 { font-size: clamp(39px, 5.15vw, 88px); margin: 18px 0 22px; }
h1 em { display: block; color: var(--accent); font-size: .9em; font-style: normal; }
.intro { color: var(--muted); max-width: 490px; margin-bottom: 26px; font-size: 17px; }
.hero-photo {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 20px 60px #08111c70; background: var(--panel);
}
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1.19; object-fit: cover; object-position: center 38%; }
.hero-photo figcaption {
  position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 28px 15px 12px; color: #fff; font: 11px/1.4 var(--mono);
  background: linear-gradient(transparent, #0e1b29 90%);
}
.hero-photo figcaption span:first-child { color: var(--accent); font-weight: 700; }

.section { padding-block: clamp(48px, 6.6vw, 83px); scroll-margin-top: 12px; }
h2 { font-size: clamp(34px, 4.6vw, 62px); margin: 12px 0 25px; }
h3 { line-height: 1.22; }
.works { border-bottom: 1px solid var(--line); }
.works .eyebrow { margin: 0 0 18px; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.work-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.work-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; background: var(--bg); }
.work-shot { display: block; position: relative; overflow: hidden; }
.work-shot:first-child { grid-column: 1 / -1; }
.work-shot img { display: block; width: 100%; height: 74px; object-fit: cover; transition: transform .24s ease; }
.work-shot:first-child img { height: clamp(175px, 19vw, 360px); object-position: center 40%; }
.work-shot:hover img { transform: scale(1.04); }
.work-shot:focus-visible { outline-offset: -4px; z-index: 1; }
.extra-shot { padding: 6px 12px; font-size: 13px; text-decoration: underline; }
.gallery-ready .extra-shot { display: none; }
.work-caption { flex: 1; display: flex; flex-direction: column; padding: 20px; }
.work-caption p { color: var(--muted); font-size: 14px; }
.work-caption .work-index { margin-bottom: 8px; color: var(--accent); font: 700 11px var(--mono); letter-spacing: .09em; }
.work-caption h3 { margin-bottom: 8px; font-size: clamp(20px, 2.15vw, 29px); letter-spacing: -.045em; }
.gallery-open {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-height: 46px; border: 0; border-top: 1px solid var(--line);
  background: transparent; color: var(--accent); padding: 9px 0 0; font-size: 14px; font-weight: 760;
}
.gallery-open[hidden] { display: none; }
.gallery-open:hover { text-decoration: underline; }
.work-caption > p:last-of-type { flex: 1; margin-bottom: 14px; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cards article { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 21px; }
.index { color: var(--accent); font: 700 12px var(--mono); margin-bottom: 22px; }
.cards h3 { font-size: 20px; letter-spacing: -.025em; }
.cards p, .muted, .faq p, ol p, footer p { color: var(--muted); }
.cards p { font-size: 14px; margin: 10px 0 22px; }
.cards a { margin-top: auto; color: var(--accent); font-size: 13px; font-weight: 750; }
.cards a:hover { text-decoration: underline; }
.result-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.result-cards article { border-top: 2px solid var(--accent); }
.result-cards p { margin-bottom: 0; }

.process { border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 60px); }
.muted { max-width: 370px; }
.process ol { list-style: none; counter-reset: steps; padding: 0; margin: 0; }
.process li { position: relative; border-top: 1px solid var(--line); padding: 17px 0 17px 48px; counter-increment: steps; }
.process li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: 22px; color: var(--accent); font: 700 13px var(--mono); }
.process li b { font-size: 19px; }
.process li p { margin-top: 4px; }
#faq { border-top: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); padding: 15px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
summary { font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent); }
details[open] summary::after { content: '−'; }
.faq p { margin-top: 12px; }

.contact-card { align-self: center; padding: clamp(16px, 4vw, 32px); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.contact-phone { display: inline-block; margin: 0 0 16px; color: var(--ink); font-size: clamp(23px, 3.2vw, 39px); font-weight: 750; letter-spacing: -.045em; }
.contact-phone:hover { text-decoration: underline; }
footer { font-size: 14px; }
.business { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; border-top: 1px solid var(--line); padding: 18px 0 23px; color: var(--muted); }
.business strong { color: var(--ink); font-weight: 650; }
.business dl, .business dd { margin: 0; }
.business dl { display: flex; flex-wrap: wrap; gap: 6px 17px; }
.business dl div { display: flex; gap: 7px; }
.business dd { font-variant-numeric: tabular-nums; color: var(--ink); }
/* Drafting accents are placed below the content and fade toward the text. */
.drafting-surface {
  position: relative;
  isolation: isolate;
  background-color: var(--draft-bg, var(--bg));
}
.drafting-surface::before, .drafting-surface::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: -1;
}
.drafting-surface::before {
  inset: 0;
  background-image:
    linear-gradient(var(--draft-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--draft-grid) 1px, transparent 1px);
  background-size: var(--draft-cell, 36px) var(--draft-cell, 36px);
  mask-image: linear-gradient(var(--draft-angle, 100deg), transparent 20%, #000 94%);
}
.drafting-surface::after {
  inset: var(--draft-inset, auto 0 0 auto);
  width: min(52%, 610px);
  height: min(86%, 240px);
  background: var(--draft-line);
  mask: var(--draft-motif, url('patterns/routes.svg')) right bottom / contain no-repeat;
}
.works {
  --draft-bg: #f1ebe0;
  --draft-grid: #94674223;
  --draft-line: #95623c50;
  --draft-inset: 0 0 auto auto;
}
.services {
  --draft-bg: #e9eff2;
  --draft-grid: #48758d24;
  --draft-line: #38688355;
  --draft-motif: url('patterns/symbols.svg');
  --draft-inset: 0 0 auto auto;
}
.process {
  --draft-bg: #eaf0eb;
  --draft-grid: #53725d24;
  --draft-line: #53725d4d;
  --draft-angle: 255deg;
  --draft-inset: auto auto 0 0;
}
.process::after { transform: scaleX(-1); }
.work-result {
  --draft-bg: #faf6ee;
  --draft-grid: #956a4924;
  --draft-line: #9165464d;
  --draft-inset: 0 0 auto auto;
  --draft-motif: url('patterns/symbols.svg');
}
.questions {
  --draft-bg: #eff1f4;
  --draft-grid: #58677a20;
  --draft-line: #58677a42;
}
.contact {
  --draft-grid: #a4bed52c;
  --draft-line: #ffc07876;
  --draft-cell: 36px;
}
.site-footer {
  --draft-grid: #69798519;
  --draft-line: #68778931;
  --draft-cell: 28px;
  --draft-motif: url('patterns/symbols.svg');
}
@media (max-width: 760px) {
  .drafting-surface::before { mask-image: linear-gradient(110deg, transparent 28%, #000 100%); }
  .drafting-surface::after { width: min(82%, 450px); opacity: .7; }
}

.skip { position: absolute; top: 8px; left: 8px; transform: translateY(-160%); z-index: 2; background: var(--button); color: var(--button-ink); padding: 8px; }
.skip:focus { transform: none; }

dialog { width: min(890px, calc(100% - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
dialog::backdrop { background: #0d1623ed; }
#full-photo { display: block; width: 100%; height: min(69dvh, 760px); object-fit: contain; background: #101c2b; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 2px; color: var(--muted); font-size: 14px; }
.viewer-bar h3 { flex: 1; font-size: 16px; color: var(--ink); }
.viewer-bar p { text-align: center; }
.viewer-bar span { white-space: nowrap; }
.viewer-bar button { width: 43px; height: 43px; flex: none; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--accent); font-size: 22px; }

@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-caption { padding: 16px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .hero-grid, .split, .work-grid, .result-cards { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  h1 { font-size: clamp(32px, 9.4vw, 58px); }
  h2 { margin-bottom: 19px; }
  .bar { min-height: 68px; gap: 12px; }
  nav, .site-footer .bar p, .brand-copy small, .header-call .header-number { display: none; }
  .header-call .header-call-label { display: inline; }
  .hero-photo img { aspect-ratio: 1.4; }
  .hero-traces { width: 100%; opacity: .56; }
  .hero::before { mask-image: linear-gradient(180deg, transparent 10%, #000 85%); }
  .work-shot:first-child img { height: clamp(170px, 61vw, 355px); }
}
@media (max-width: 470px) {
  .brand { font-size: 14px; gap: 8px; }
  .brand img { width: 31px; height: 31px; }
  .bar .button { padding-inline: 10px; font-size: 13px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .cards article { padding: 17px; }
  .index { margin-bottom: 13px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy, .hero-photo { animation: hero-enter 420ms ease-out both; }
  .hero-photo { animation-delay: 70ms; }
  .trace-accent { animation: trace-enter 1200ms ease-out both; }
  .hero .button span { transition: transform 180ms ease; }
  .hero .primary:is(:hover, :focus-visible) span { transform: translate(2px, -2px); }
  .hero .outline:is(:hover, :focus-visible) span { transform: translateY(2px); }
  dialog[open] { animation: gallery-enter 180ms ease-out both; }
}
@keyframes trace-enter {
  from { stroke-dasharray: 1; stroke-dashoffset: 1; }
  to { stroke-dasharray: 1; stroke-dashoffset: 0; }
}
@keyframes hero-enter {
  from { opacity: .65; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gallery-enter {
  from { opacity: .75; }
  to { opacity: 1; }
}
@media (hover: hover) {
  .work-card:hover { border-color: #a99582; box-shadow: 0 10px 24px #18253612; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .work-card { transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
  .work-card:hover { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work-shot img { transition: none; }
}
