/* ============================================================
   Theme CSS — the static homepage's inline <style> block (kept
   verbatim where possible) plus what WordPress needs on top of it:
   the mobile drawer, long-form prose, CF7 chrome, the lightbox.
   Behaviour lives in assets/js/main.js.
   ============================================================ */

/* ── Hero (full viewport) ── */
.hero-slide { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1); transition: transform 7.5s ease; }
.hero-slide.is-active .hero-img { transform: scale(1.07); }
.hero-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,23,23,.55) 0%, rgba(23,23,23,.35) 45%, rgba(23,23,23,.9) 100%); }
.hero-wedge { background: rgba(23,23,23,.82); clip-path: polygon(0 0, 100% 0, 70% 46%, 92% 100%, 0 100%); }
.hero-anim { opacity: 0; transform: translateY(80px); transition: opacity 1s ease, transform 1s ease; transition-delay: var(--d, 0s); }
.hero.is-in .hero-anim { opacity: 1; transform: none; }
.hero-dot { width: 34px; height: 3px; background: rgba(232,232,232,.3); transition: background .3s, width .3s; position: relative; }
/* The 3px bar is the visual; give thumbs a 24px-tall hit area around it. */
.hero-dot::before { content: ""; position: absolute; left: 0; right: 0; top: -11px; bottom: -11px; }
.hero-dot.is-active { width: 54px; background: var(--color-brand, #DC141C); }
#site-header.is-scrolled { background: rgba(23,23,23,.92); backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(232,232,232,.08); }
#site-header.is-scrolled > div { padding-top: 14px; padding-bottom: 14px; }
.hatch-rule { height: 7px; background: repeating-linear-gradient(-55deg, rgba(232,232,232,.28) 0 1px, transparent 1px 5px); }

/* ── Hover dropdowns (language switcher + nav items with children) ── */
.lang-drop { opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility 0s .2s; z-index: 60; }
.lang-menu:hover .lang-drop, .lang-menu:focus-within .lang-drop { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease; }

/* ── Client logo marquee ── */
.client-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.client-track { display: flex; gap: 28px; width: max-content; animation: client-scroll 42s linear infinite; }
.client-marquee:hover .client-track { animation-play-state: paused; }
@keyframes client-scroll { to { transform: translateX(calc(-50% - 14px)); } }
.client-chip { flex: none; display: grid; place-items: center; grid-template-columns: 100%; grid-template-rows: 100%; width: 200px; height: 96px; background: #fff; padding: 18px 22px; }
.client-chip img { width: 100%; height: 100%; object-fit: contain; }
.client-chip--text { background: var(--color-card, #1e1e1e); border: 1px solid rgba(232,232,232,.15); }
.client-chip--text span { font-family: var(--font-mono); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-fog, #b1b1b1); text-align: center; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .client-track { animation: none; } }

/* ── Loading screen ── */
#loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--color-brand, #DC141C); transition: opacity .6s ease, visibility 0s .6s; }
#loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-blueprint { position: absolute; inset: -60px; opacity: .14; background-image:
  linear-gradient(rgba(232,232,232,.9) 1px, transparent 1px),
  linear-gradient(90deg, rgba(232,232,232,.9) 1px, transparent 1px),
  linear-gradient(rgba(232,232,232,.5) 1px, transparent 1px),
  linear-gradient(90deg, rgba(232,232,232,.5) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  animation: blueprint-pan 14s linear infinite; }
@keyframes blueprint-pan { to { transform: translate(120px, 120px); } }
.loader-mark { position: relative; display: grid; place-items: center; gap: 22px; }
.loader-mark img { width: min(622px, 78vw); height: auto; opacity: 0; animation: loader-logo-in .9s ease .15s forwards; } /* 622 = 116px tall at the logo's 1684×314 ratio; width-driven so phones scale it instead of squashing it */
@keyframes loader-logo-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .loader-blueprint { animation: none; } .loader-mark img { animation: none; opacity: 1; } }

/* ── Large-screen scaling: keep the 1440 canvas proportional up to 4K ── */
/* zoom scales lengths but NOT viewport units, so 100svh must be divided
   back by the zoom factor or the hero/loader overshoot the screen. */
@media (min-width: 2100px) { body { zoom: 1.25; } section.hero { min-height: calc(100svh / 1.25); } }
@media (min-width: 2560px) { body { zoom: 1.45; } section.hero { min-height: calc(100svh / 1.45); } }
@media (min-width: 3200px) { body { zoom: 1.75; } section.hero { min-height: calc(100svh / 1.75); } }
@media (min-width: 3800px) { body { zoom: 2.1; } section.hero { min-height: calc(100svh / 2.1); } }
/* The lightbox overlay lives in <body>, so it inherits that zoom and its 90vh
   image overshoots the screen on big monitors (2026-10-09). Zoom it back to 1:1 —
   nested zooms multiply, so 1.25 × 0.8 = 1 and the vh maths is right again. */
@media (min-width: 2100px) { .sf-lb { zoom: 0.8; } }
@media (min-width: 2560px) { .sf-lb { zoom: 0.6897; } }
@media (min-width: 3200px) { .sf-lb { zoom: 0.5714; } }
@media (min-width: 3800px) { .sf-lb { zoom: 0.4762; } }
@media (prefers-reduced-motion: reduce) {
  .hero-anim, .hero-img, .hero-slide { transition: none !important; }
  .hero-slide.is-active .hero-img { transform: none; }
}

/* ── Reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(44px); transition: opacity .8s ease, transform .8s ease; transition-delay: calc(var(--ri, 0) * 120ms); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; opacity: 1; transform: none; } }

/* ── Projects slider ── */
.proj-track { display: flex; gap: 0; overflow-x: auto; overflow-y: hidden; padding-bottom: 46px; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; }
.proj-track::-webkit-scrollbar { display: none; }
.proj-track, .rev-track { cursor: grab; }
.proj-track.is-grabbing, .rev-track.is-grabbing { cursor: grabbing; scroll-behavior: auto; }
.proj-track img, .rev-track img { -webkit-user-drag: none; user-select: none; }
.proj-track > article { flex: 0 0 auto; width: min(84vw, 340px); scroll-snap-align: start; border-left: 1px solid rgba(232,232,232,.15); padding-left: 28px; padding-right: 28px; }
.proj-track > article:first-child { border-left: none; padding-left: 0; }

/* ── Services slider (layout "slider": one row, 3 or 2 cards visible on desktop) ── */
.svc-track { display: flex; gap: 30px; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; cursor: grab; }
.svc-track::-webkit-scrollbar { display: none; }
.svc-track.is-grabbing { cursor: grabbing; scroll-behavior: auto; }
.svc-track > article { flex: 0 0 auto; width: min(84vw, 400px); scroll-snap-align: start; display: flex; }
@media (min-width: 1024px) { .svc-track > article { width: calc((100% - 60px) / 3); } .svc-track--2 > article { width: calc((100% - 30px) / 2); } }

/* ── Reviews slider ── */
.rev-track { display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; padding-bottom: 46px; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; }
.rev-track::-webkit-scrollbar { display: none; }
.rev-track > article { flex: 0 0 auto; width: min(88vw, 560px); scroll-snap-align: start; display: flex; }

/* ── About / card bodies (richtext inside the numbered cards) ── */
.ir-card-body p { max-width: 407px; font-size: 16px; line-height: 1.6; }
.ir-card-body ul { display: grid; gap: 12px; font-size: 16px; line-height: 1.5; }
.ir-card-body li { display: flex; gap: 12px; }
.ir-card-body li::before { content: ""; flex-shrink: 0; margin-top: 9px; width: 6px; height: 6px; border-radius: 9999px; background: var(--color-cloud, #E8E8E8); }
.ir-card--card .ir-card-body { color: var(--color-fog, #b1b1b1); }
.ir-card--brand .ir-card-body { color: rgba(232,232,232,.92); }

/* ── Admin bar: the fixed header must start below it ── */
body.admin-bar #site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar #site-header { top: 46px; } }

/* ── Mobile / full-screen drawer (the red square button opens it) ── */
.ir-drawer { position: fixed; inset: 0; z-index: 90; background: var(--color-ink, #171717); color: var(--color-cloud, #E8E8E8);
  transform: translateX(100%); visibility: hidden; transition: transform .4s cubic-bezier(.4,0,.2,1), visibility 0s .4s; overflow-y: auto; }
.ir-drawer.is-open { transform: none; visibility: visible; transition: transform .4s cubic-bezier(.4,0,.2,1); }
.ir-drawer__inner { min-height: 100%; display: flex; flex-direction: column; max-width: 1440px; margin: 0 auto; padding: 24px clamp(20px,7vw,100px) 40px; }
.ir-drawer__top { display: flex; align-items: center; justify-content: space-between; min-height: 80px; }
.ir-drawer__nav { flex: 1; display: grid; align-content: center; gap: 4px; padding: 40px 0; }
.ir-drawer__link { display: block; font-family: var(--font-display); font-weight: 500; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05;
  font-size: clamp(36px, 7vw, 72px); color: var(--color-cloud, #E8E8E8); padding: 6px 0; transition: color .2s; }
.ir-drawer__link:hover { color: var(--color-brand, #DC141C); }
.ir-drawer__sub { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 4px 0 14px; }
.ir-drawer__sub a { font-family: var(--font-mono); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-fog, #b1b1b1); }
.ir-drawer__sub a:hover { color: var(--color-brand, #DC141C); }
.ir-drawer__langs { margin-top: 24px; }
.ir-drawer__meta { display: grid; gap: 16px 40px; padding-top: 24px; border-top: 1px solid rgba(232,232,232,.15); font-size: 16px; color: rgba(232,232,232,.85); }
@media (min-width: 768px) { .ir-drawer__meta { grid-template-columns: 1fr auto; align-items: center; } }
.ir-drawer__meta a:hover { color: var(--color-brand, #DC141C); }
html.ir-drawer-open { overflow: hidden; }

/* ── Subpage long-form prose (dark canvas) ── */
.sf-prose { color: var(--color-fog, #b1b1b1); font-size: 17px; line-height: 1.65; }
.sf-prose > * + * { margin-top: 1.1em; }
.sf-prose h2, .sf-prose h3, .sf-prose h4 { font-family: var(--font-display); font-weight: 500; text-transform: uppercase; letter-spacing: .01em; line-height: 1.1; color: var(--color-cloud, #E8E8E8); }
.sf-prose h2 { font-size: clamp(28px, 3vw, 36px); margin-top: 2em; }
.sf-prose h3 { font-size: 24px; margin-top: 1.8em; }
.sf-prose h4 { font-size: 20px; margin-top: 1.5em; }
.sf-prose strong { color: var(--color-cloud, #E8E8E8); font-weight: 700; }
.sf-prose a { color: var(--color-cloud, #E8E8E8); text-decoration: underline; text-underline-offset: 3px; }
.sf-prose a:hover { color: var(--color-brand, #DC141C); }
.sf-prose ul, .sf-prose ol { display: grid; gap: 10px; padding-left: 0; }
.sf-prose ul li { position: relative; padding-left: 22px; }
.sf-prose ul li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 2px; background: var(--color-brand, #DC141C); }
.sf-prose ol { counter-reset: ir; }
.sf-prose ol li { position: relative; padding-left: 40px; counter-increment: ir; }
.sf-prose ol li::before { content: counter(ir, decimal-leading-zero) "."; position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--color-brand, #DC141C); }
.sf-prose blockquote { border-left: 2px solid var(--color-brand, #DC141C); padding-left: 24px; color: var(--color-cloud, #E8E8E8); font-size: 20px; line-height: 1.5; }
.sf-prose img { max-width: 100%; height: auto; }
.sf-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.sf-prose th, .sf-prose td { border: 1px solid rgba(232,232,232,.15); padding: 12px 14px; text-align: left; vertical-align: top; }
.sf-prose th { font-family: var(--font-mono); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-cloud, #E8E8E8); background: var(--color-card, #1e1e1e); }
.sf-prose hr { border: 0; height: 1px; background: rgba(232,232,232,.15); }

/* ── Contact Form 7 (fields carry class:ir-field in the form template) ── */
.ir-field { display: block; width: 100%; height: 60px; padding: 0 20px; background: var(--color-card, #1e1e1e); border: 1px solid rgba(232,232,232,.2); color: var(--color-cloud, #E8E8E8); font-family: var(--font-body); font-size: 16px; transition: border-color .2s; }
.ir-field::placeholder { color: var(--color-fog, #b1b1b1); }
.ir-field:focus { outline: none; border-color: var(--color-brand, #DC141C); }
.ir-field--area { height: 180px; padding: 18px 20px; resize: vertical; }
.ir-btn { display: inline-flex; align-items: center; justify-content: center; height: 60px; padding: 0 36px; background: var(--color-brand, #DC141C); color: var(--color-cloud, #E8E8E8); border: 0; cursor: pointer;
  font-family: var(--font-mono); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .05em; transition: background-color .2s, color .2s; }
.ir-btn:hover { background: var(--color-cloud, #E8E8E8); color: var(--color-ink, #171717); }
.sf-cf7 .wpcf7-form-control-wrap { display: block; width: 100%; }
.sf-cf7 .wpcf7-not-valid-tip { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--color-brand, #DC141C); }
.sf-cf7 .wpcf7-response-output { margin: 24px 0 0; padding: 14px 18px; border: 1px solid rgba(232,232,232,.25); font-size: 15px; line-height: 1.6; color: var(--color-cloud, #E8E8E8); }
.sf-cf7 .wpcf7-form.invalid .wpcf7-response-output,
.sf-cf7 .wpcf7-form.failed .wpcf7-response-output { border-color: var(--color-brand, #DC141C); }
.sf-cf7 .wpcf7-spinner { margin: 0 0 0 16px; }

/* ── Lightbox (assets/js/main.js) ── */
.sf-lb { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; background: rgba(23,23,23,.94); padding: 24px; overflow: auto; }
.sf-lb.is-open { display: flex; }
.sf-lb__figure { margin: 0; max-width: min(1400px, 94vw); max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sf-lb__img { display: block; width: auto; height: calc(90vh - 48px); max-width: 100%; max-height: calc(90vh - 48px); object-fit: contain; }
.sf-lb__caption { color: var(--color-fog, #b1b1b1); font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; text-align: center; }
.sf-lb__close, .sf-lb__nav { position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border: 1px solid rgba(232,232,232,.4); cursor: pointer; background: transparent; color: var(--color-cloud, #E8E8E8); transition: border-color .15s, background .15s; }
.sf-lb__close:hover, .sf-lb__nav:hover { border-color: var(--color-brand, #DC141C); background: var(--color-brand, #DC141C); }
.sf-lb__close { top: 20px; right: 20px; font-size: 30px; line-height: 1; }
.sf-lb__nav { top: 50%; transform: translateY(-50%); font-size: 20px; }
.sf-lb__nav--prev { left: 16px; }
.sf-lb__nav--next { right: 16px; }
.sf-lb__nav[hidden], .sf-lb__caption[hidden] { display: none; }
@media (max-width: 640px) { .sf-lb { padding: 12px; } .sf-lb__nav, .sf-lb__close { width: 44px; height: 44px; } .sf-lb__nav--prev { left: 8px; } .sf-lb__nav--next { right: 8px; } }
a.sf-lb-open { cursor: zoom-in; }

/* ── Google map (keyless embed): tone the iframe to the dark canvas ── */
.ir-map--dark iframe { filter: grayscale(1) invert(.92) contrast(.9) brightness(.9); }
.ir-map--gray iframe { filter: grayscale(1); }

/* Contact form: CF7's Turnstile module prepends its widget with no spacing (keys are
   set on the server import, so the widget only shows there). Same rule as the KSC theme. */
.wpcf7-form .wpcf7-turnstile { margin-bottom: 18px; }
