:root {
  color-scheme: dark;
  --background: #0a101c;
  --surface: #101a2a;
  --card: #131e2e;
  --line: #273449;
  --text: #f4f7fc;
  --muted: #b9c5d5;
  --accent: #97d7ff;
  --accent-ink: #101a26;
  --wrap: 76rem;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--background); line-height: 1.6; }
h1, h2, h3, p, figure, dl, dd, ol { margin: 0; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }
[id] { scroll-margin-top: 1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.wrap { width: min(calc(100% - var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: fixed; z-index: 5; top: 1rem; left: 1rem; padding: .7rem 1rem; background: var(--accent); color: var(--accent-ink); clip-path: inset(50%); }
.skip:focus { clip-path: none; }

.site-header { position: relative; z-index: 2; border-bottom: 1px solid #1c2737; }
.header-inner { min-height: 5rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.brand { position: relative; display: block; justify-self: start; flex: none; width: 10rem; aspect-ratio: 3.25; }
.brand img { position: absolute; width: 126%; max-width: none; left: -13%; top: -15%; filter: brightness(1.8); }
.site-header nav, .site-footer nav { display: flex; align-items: center; gap: clamp(1.35rem, 3.5vw, 2.9rem); }
nav a { color: var(--muted); font-size: .9375rem; font-weight: 500; text-decoration: none; }
nav a:hover, nav a[aria-current='page'] { color: var(--accent); }
.menu-toggle { display: none; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.85rem; padding: .55rem 1rem; border: 1px solid transparent; border-radius: .55rem; text-decoration: none; font-size: .9375rem; font-weight: 550; line-height: 1.35; transition: background .18s, border-color .18s, color .18s; }
.button-secondary { color: var(--text); background: #162335; border-color: #354b61; }
.button-secondary:hover { background: #1c2d42; border-color: #607995; }
.button-quiet { color: var(--muted); background: transparent; text-decoration: underline; text-decoration-color: #627488; text-underline-offset: .24em; font-weight: 400; }
.button-quiet:hover { color: var(--text); text-decoration-color: currentColor; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero { background: radial-gradient(ellipse at 83% 38%, #122536 0%, transparent 58%), var(--background); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 4.7vw, 4.3rem); padding-block: clamp(2.35rem, 4vw, 3.65rem) clamp(2.7rem, 4.2vw, 3.8rem); }
.hero-copy { padding-block: .75rem; }
.eyebrow { color: #9abbd7; font-weight: 600; font-size: .8125rem; letter-spacing: .09em; line-height: 1.4; text-transform: uppercase; }
.location { display: flex; align-items: center; gap: .45rem; }
.location .icon { width: 1.12rem; height: 1.12rem; }
h1 { margin-top: 1rem; font-size: clamp(2.15rem, 3.95vw, 3.65rem); line-height: 1.07; letter-spacing: -.046em; font-weight: 650; }
h1 em { color: var(--accent); font-style: normal; }
.hero-lede { max-width: 32rem; margin-block: 1.3rem 1.65rem; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.12rem); line-height: 1.65; }
.hero-media, .process-media { position: relative; overflow: hidden; border-radius: 1.15rem; background-color: #162334; border: 1px solid #2b3c4c; }
.hero-media { aspect-ratio: 1.16; box-shadow: 0 20px 55px #02070e65; }
.hero-media img, .process-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media img { object-position: 50% 49%; }

.section { padding-block: clamp(3.8rem, 7vw, 6.4rem); }
.services { padding-block: clamp(3.1rem, 5.2vw, 4.75rem); border-block: 1px solid #202c3d; background: var(--surface); }
.section-intro { display: grid; grid-template-columns: 1fr minmax(18rem, .7fr); align-items: end; gap: 1.4rem 3rem; margin-bottom: 2rem; }
h2, .projects h1 { margin-top: .56rem; font-weight: 650; font-size: clamp(1.8rem, 3.1vw, 2.75rem); letter-spacing: -.039em; line-height: 1.14; }
.section-intro > p, .contact-copy > p:not(.eyebrow) { color: var(--muted); }
.service-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.service-card { grid-column: span 4; display: flex; flex-direction: column; min-height: 100%; padding: 1.5rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--card); transition: border-color .18s; }
.service-card:nth-child(n + 4) { grid-column: span 3; }
.service-card:hover, .service-card:focus-within { border-color: #4c6f90; }
.service-icon, .step-icon { display: grid; place-items: center; flex: none; width: 2.85rem; height: 2.85rem; color: var(--accent); background: #20344c; border: 1px solid #354d66; border-radius: .65rem; }
.service-card h3 { margin-top: 1rem; margin-bottom: .35rem; font-size: 1.15rem; font-weight: 620; letter-spacing: -.015em; line-height: 1.32; }
.service-card p, .steps p { color: var(--muted); }
.service-card > p { margin-bottom: 1.05rem; }
.service-card details { margin-top: auto; border-top: 1px solid var(--line); }
.service-card details > div { padding: 0 0 .2rem; }
.service-card summary { display: flex; justify-content: space-between; gap: .5rem; align-items: center; min-height: 2.75rem; margin-bottom: -.4rem; cursor: pointer; color: var(--accent); font-size: .9375rem; font-weight: 500; list-style: none; }
.service-card summary::-webkit-details-marker { display: none; }
.service-card summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.service-card details[open] summary { margin-bottom: .42rem; }
.service-card details[open] summary::after { content: '−'; }
.service-card details a { display: inline-block; margin-top: .65rem; color: var(--accent); text-underline-offset: .2em; }
.service-links { display: flex; flex-wrap: wrap; column-gap: 1rem; }
.service-links a + a { color: var(--muted); }
.service-links a + a:hover { color: var(--accent); }
.service-page-link { align-self: flex-start; margin-bottom: .85rem; color: var(--accent); font-size: .9375rem; text-underline-offset: .22em; }

.loxone-hero { background: radial-gradient(ellipse at 82% 40%, #162c29 0%, transparent 58%), var(--background); }
.loxone-hero h1 { font-size: clamp(2.05rem, 3.8vw, 3.45rem); }
.loxone-booking { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid #34504d; border-radius: 1rem; background: #112326; box-shadow: 0 16px 38px #02070e48; }
.loxone-booking h2 { margin-top: 0; font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
.loxone-booking > p { margin-top: .65rem; color: var(--muted); }
.loxone-booking .steps { gap: 1rem; margin-top: 1.25rem; }
.loxone-booking .step-icon { color: #abe5bd; border-color: #3a5a4b; background: #1e392f; }
.loxone-booking .booking-use-cases { margin-top: 1.2rem; padding-top: .85rem; border-top: 1px solid #34504d; font-size: .9rem; }
.loxone-services .service-card > p { margin-bottom: 0; }

.projects { padding-block: clamp(2.8rem, 5.5vw, 5rem); border-bottom: 1px solid #202c3d; }
.projects h1 { margin-bottom: .65rem; }
.project-intro { max-width: 65ch; margin-bottom: clamp(1.3rem, 2.8vw, 1.9rem); color: var(--muted); }
.project-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem 1.15rem; margin-bottom: 1.25rem; }
.project-toolbar[hidden] { display: none; }
.project-filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.project-filters button { min-height: 2.65rem; padding: .32rem .82rem; color: var(--muted); border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); font-size: .9rem; cursor: pointer; }
.project-filters button:hover { color: var(--text); border-color: #4c6f90; }
.project-filters button[aria-pressed='true'] { color: var(--text); border-color: #536f8c; background: #21374d; }
.project-count, .photo-position { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.project-grid { --project-columns: 12; display: grid; grid-template-columns: repeat(var(--project-columns), minmax(0, 1fr)); gap: 1rem; }
.project-grid.is-filtered { --project-columns: 3; }
.project-grid.is-filtered > .project-card { grid-column: auto; }
.project-card { --photo-height: clamp(15rem, 26vw, 23rem); grid-column: span 3; min-width: 0; border: 1px solid var(--line); border-radius: .85rem; background: var(--card); }
.project-card-wide { grid-column: span 6; }
.project-card-detail { grid-column: span 4; }
.project-photo { display: grid; place-items: center; width: 100%; height: var(--photo-height); padding: 0; overflow: hidden; border: 0; border-radius: .8rem .8rem 0 0; background: #0d1521; cursor: zoom-in; }
.project-image { position: relative; display: block; overflow: hidden; width: min(100%, calc(var(--photo-height) * var(--photo-ratio))); aspect-ratio: var(--photo-ratio); }
.project-image img { position: absolute; top: var(--crop-top, 0%); left: var(--crop-left, 0%); width: var(--crop-width, 100%); max-width: none; height: auto; filter: brightness(var(--photo-brightness, 1.04)) contrast(1.025); }
.project-rack-populated { --photo-ratio: .51; --crop-width: 103.7%; --crop-left: -1.9%; --photo-brightness: 1.12; }
.project-fiber-populated { --photo-ratio: 1.91; --crop-width: 117.65%; --crop-left: -9.3%; }
.project-loxone { --photo-ratio: .847; --crop-width: 104.17%; --crop-left: -2.08%; --crop-top: -22.88%; }
.project-rack-mount { --photo-ratio: .418; --crop-width: 131.58%; --crop-left: -21.71%; --crop-top: -3.8%; }
.project-fiber-detail { --photo-ratio: .584; --crop-width: 103.85%; --crop-left: -1.92%; --crop-top: -16.9%; }
.project-meter-tree { --photo-ratio: .523; --crop-width: 126.58%; --crop-left: -12.66%; --crop-top: -3.53%; }
.project-rack-storage { --photo-ratio: .414; --crop-width: 115.61%; --crop-left: -6.94%; --crop-top: -5.32%; }
.project-cable-bundles { --photo-ratio: .596; --crop-width: 106.4%; --crop-left: -3.19%; --crop-top: -12.68%; }
.project-recorder { --photo-ratio: .747; --crop-width: 102.04%; --crop-left: -1.02%; --crop-top: -35.58%; }
.project-camera-mast { --photo-ratio: .915; --crop-width: 174.52%; --crop-left: -61.08%; --crop-top: -44.33%; }
.project-fiber-ready { --photo-ratio: .559; --crop-width: 108.23%; --crop-left: -1.73%; --crop-top: -24.16%; }
.project-fiber-prep { --photo-ratio: 1.95; --crop-width: 115.61%; --crop-left: -1.62%; --crop-top: -1.2%; }
.project-fiber-eight { --photo-ratio: 2.26; --crop-width: 101.5%; --crop-left: -.75%; --crop-top: -2.6%; }
.project-alarm { --photo-ratio: 1.248; --crop-width: 185.19%; --crop-left: -32.4%; --crop-top: -2.08%; }
.project-detector { --photo-ratio: 1.54; --crop-width: 238.1%; --crop-left: -73.81%; --crop-top: -117.1%; --photo-brightness: 1.15; }
.project-fiber-repair { --photo-ratio: .857; --crop-width: 112.36%; --crop-left: -5.62%; --crop-top: -26.96%; }
.project-network-details { --photo-ratio: 2.21; --crop-width: 104.17%; --crop-left: -3.125%; --crop-top: -55.25%; }
.project-combined-panel { --photo-ratio: 1.458; --crop-width: 153.85%; --crop-left: -27.69%; --crop-top: -.51%; }
.project-fiber-field { --photo-ratio: 1.016; --crop-width: 102.67%; --crop-left: -.82%; --crop-top: -26.39%; }
.project-fiber-closure { --photo-ratio: 1.096; --crop-width: 108.1%; --crop-left: -3.46%; --crop-top: -29.07%; }
.project-loxone-retrofit { --photo-ratio: .709; --crop-width: 142.16%; --crop-left: -20.31%; --crop-top: -16.58%; }
.project-network-compact { --photo-ratio: .908; --crop-width: 112%; --crop-left: -6.07%; --crop-top: -30.88%; --photo-brightness: 1.1; }
.project-card figcaption { padding: .8rem .95rem 1rem; }
.project-card h3 { font-size: 1.05rem; font-weight: 620; letter-spacing: -.01em; line-height: 1.3; }
.project-card p { margin-top: .25rem; color: var(--muted); font-size: .935rem; line-height: 1.45; }
.photo-dialog { inset: 6svh 0 auto; width: min(56rem, calc(100% - 1.5rem)); max-height: 88svh; margin: 0 auto; padding: .85rem; color: var(--text); border: 1px solid var(--line); border-radius: .9rem; background: var(--background); }
.photo-dialog::backdrop { background: #03070de8; }
.photo-dialog-toolbar { display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: .4rem; margin-bottom: .65rem; }
.photo-dialog-toolbar .button { min-height: 2.65rem; padding-inline: .63rem; font-size: .87rem; cursor: pointer; }
.photo-position { min-width: 3rem; text-align: center; white-space: nowrap; }
.close-photo { justify-self: end; }
.photo-dialog .project-card { --photo-height: min(66svh, 41rem); display: grid; justify-items: center; align-items: center; border: 0; background: none; }
.photo-dialog .project-image { width: min(100%, calc(var(--photo-height) * var(--photo-ratio))); border-radius: .45rem; }
.photo-dialog figcaption { padding: .7rem .15rem 0; text-align: center; }

.process { padding-block: clamp(3.2rem, 5.7vw, 5rem); }
.process-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .93fr); align-items: center; gap: clamp(2rem, 5.5vw, 5rem); }
.process-media { aspect-ratio: 1.23; }
.process-media img { object-position: 52% center; }
.steps { display: grid; gap: 1.26rem; margin-top: 1.65rem; padding: 0; list-style: none; }
.steps li { display: flex; gap: .9rem; align-items: flex-start; }
.step-icon { width: 2.12rem; height: 2.12rem; border-radius: 50%; }
.step-icon .icon { width: 1.14rem; height: 1.14rem; stroke-width: 2; }
.steps h3 { margin-bottom: .15rem; font-size: 1.05rem; font-weight: 600; line-height: 1.35; }

.contact { padding-block: clamp(2.45rem, 4.4vw, 4.25rem); border-block: 1px solid #253246; background: #111a28; }
.contact-inner { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: clamp(1.4rem, 5vw, 4.5rem); align-items: start; }
.contact-copy h2 { margin-bottom: .62rem; font-weight: 600; }
.contact-copy > p:not(.eyebrow) { max-width: 27rem; }
.contact-copy .location { margin-top: .75rem; }
.contact-copy .location .icon { color: #9abbd7; }
.contact-card { padding: clamp(1.05rem, 2vw, 1.45rem); border: 1px solid var(--line); border-radius: .85rem; background: #101824; }
.direct-contact dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; }
.contact-person { grid-column: 1 / -1; }
.contact-card dt { font-size: .875rem; color: var(--muted); }
.contact-card dd { margin: 0; overflow-wrap: anywhere; font-weight: 400; }
.direct-contact dd { margin-top: .08rem; }
.direct-contact a { color: #c0d9ee; text-decoration-color: #677d93; text-underline-offset: .24em; }
.direct-contact a:hover { color: var(--text); text-decoration-color: currentColor; }
.business-details { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.business-details h3 { margin-bottom: .4rem; font-size: 1rem; font-weight: 600; }
.business-details dl { display: grid; gap: .27rem; }
.business-details dl > div { display: grid; grid-template-columns: minmax(6.2rem, .33fr) 1fr; align-items: baseline; gap: .6rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem 2rem; min-height: 5.9rem; padding-block: 1rem; }
.site-footer .brand { width: 8.1rem; }

@media (min-width: 65rem) {
  .direct-contact dl { grid-template-columns: minmax(0, .94fr) minmax(0, 1.13fr) minmax(0, 1fr); }
  .contact-person { grid-column: auto; }
}

@media (max-width: 62rem) {
  .hero-inner { gap: 1.75rem; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid, .project-grid.is-filtered { --project-columns: 2; }
  .service-card, .service-card:nth-child(n + 4) { grid-column: auto; }
  .service-card:last-child { grid-column: 1 / -1; }
  .project-card { grid-column: auto; }
}

@media (max-width: 46rem) {
  .header-inner { min-height: 4.25rem; display: grid; grid-template-columns: 1fr auto; gap: 0 1rem; }
  .brand { width: 8.1rem; }
  .header-inner nav { grid-column: 1 / -1; padding: .5rem 0 1rem; flex-wrap: wrap; gap: .6rem 1.25rem; }
  .has-menu .menu-toggle { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .4rem .65rem; color: var(--text); border: 1px solid var(--line); border-radius: .5rem; background: var(--card); cursor: pointer; }
  .menu-toggle .icon { width: 1.22rem; height: 1.22rem; }
  .menu-toggle .menu-close, .menu-toggle[aria-expanded='true'] .menu-open { display: none; }
  .menu-toggle[aria-expanded='true'] .menu-close { display: block; }
  .has-menu .menu-toggle[aria-expanded='false'] + nav { display: none; }
  .header-inner nav a { padding: .4rem 0; }
  .hero-inner, .process-inner, .contact-inner, .section-intro { grid-template-columns: 1fr; }
  .hero-inner { gap: 1.6rem; padding-top: 2.65rem; }
  .hero-copy { padding: 0; }
  .hero-media { aspect-ratio: 1.28; }
  h1 { font-size: clamp(2.15rem, 9.15vw, 3.5rem); }
  .hero-lede { margin-block: 1.25rem 1.45rem; }
  .section-intro { gap: .78rem; margin-bottom: 1.6rem; }
  .process-inner { gap: 1.65rem; }
  .process-media { aspect-ratio: 1.5; }
}

@media (max-width: 33rem) {
  .service-grid { grid-template-columns: 1fr; }
  .project-grid { gap: .65rem; }
  .project-card { --photo-height: clamp(9rem, 45vw, 14rem); }
  .project-card figcaption { padding: .55rem .6rem .7rem; }
  .project-card h3 { font-size: .92rem; }
  .project-grid figcaption p { display: none; }
  .service-card { padding: 1.3rem; }
  .actions { gap: .6rem; }
  .button { padding-inline: .9rem; }
  .direct-contact dl { grid-template-columns: 1fr; }
  .site-footer nav { gap: 1.25rem; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
