:root {
  --bg: #111417;
  --bg-2: #181c21;
  --surface: #22282f;
  --surface-2: #2b323b;
  --text: #f3efe6;
  --muted: #b8b0a2;
  --accent: #e08a2c;
  --accent-2: #f0b35a;
  --accent-dark: #9a5414;
  --line: rgba(243, 239, 230, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --header-h: 76px;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --max: 1180px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

img, iframe { max-width: 100%; }
img { display: block; height: auto; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }

.skip-link {
  position: absolute;
  left: 0;
  top: -100em;
  background: var(--accent);
  color: #1a1208 !important;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  z-index: 10001;
}
.skip-link:focus { top: 0; }

.wrap {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(17, 20, 23, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1280px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text) !important;
  min-width: 0;
}
.brand img {
  height: 48px;
  width: auto;
  background: #fff;
  border-radius: 6px;
  padding: 2px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand-text span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 8px;
  background: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--text); }
.site-nav .ext { font-size: 0.85rem; opacity: 0.85; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1208 !important;
}
.btn-primary:hover { filter: brightness(1.06); color: #1a1208 !important; }
.btn-ghost {
  background: transparent;
  color: var(--text) !important;
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-2) !important; }
.btn-full { width: 100%; }

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-media,
.page-hero-media {
  position: absolute;
  inset: 0;
}
.hero-media img,
.page-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after,
.page-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 20, 23, 0.92) 0%, rgba(17, 20, 23, 0.55) 48%, rgba(17, 20, 23, 0.25) 100%),
    linear-gradient(180deg, rgba(17, 20, 23, 0.15), rgba(17, 20, 23, 0.88));
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 10vw, 8rem) 0 3.5rem;
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  color: var(--accent-2);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}
.hero h1,
.page-hero h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.95;
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  max-width: 14ch;
}
.hero h1 span { color: var(--accent); }
.hero-lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0 0 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(17, 20, 23, 0.82);
}
.hero-stats li {
  list-style: none;
  margin: 0;
  padding: 1.4rem var(--gutter);
  border-right: 1px solid var(--line);
}
.hero-stats { padding: 0; margin: 0; }
.hero-stats li:last-child { border-right: 0; }
.hero-stats strong {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
}
.hero-stats span {
  color: var(--muted);
  font-size: 0.82rem;
}

/* Sections */
.sec { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.sec-tinted { background: var(--bg-2); }
.sec-head { margin-bottom: 2.25rem; }
.sec-head h2,
.prose h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.sec-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.service-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
}
.service-card {
  position: relative;
  min-height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: var(--text) !important;
  isolation: isolate;
}
.service-card.feature { min-height: 420px; grid-row: span 2; }
.service-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.5s ease;
}
.service-card:hover img { transform: scale(1.06); }
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 20%, rgba(10, 12, 14, 0.92));
}
.service-card div { padding: 1.4rem; }
.service-card h3 {
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}
.service-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.split img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
}
.check-list { padding: 0; margin: 1.25rem 0 0; list-style: none; }
.check-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.portfolio-item {
  position: relative;
  min-height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
}
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 240px;
}
.portfolio-item span {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(17, 20, 23, 0.82);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.client-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.client-cloud li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
  color: var(--muted);
}

/* Inner pages */
.page-hero {
  position: relative;
  min-height: 42vh;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.page-hero-inner {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 2.5rem;
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.page-hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  margin: 0;
}

.prose {
  width: min(820px, calc(100% - var(--gutter) * 2));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 4rem;
}
.prose.wide { width: min(var(--max), calc(100% - var(--gutter) * 2)); }
.prose p, .prose li { color: var(--muted); }
.prose h3 {
  font-family: var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 2rem 0 0.6rem;
}
.prose blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  color: var(--text);
  font-style: italic;
}
.figure-wide {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.figure-wide img { width: 100%; height: min(420px, 50vh); object-fit: cover; }

.cert-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.cert-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.cert-card strong { display: block; color: var(--accent-2); margin-bottom: 0.35rem; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.85rem;
}
.info-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.info-card p { margin: 0; color: var(--muted); }
.info-card a { color: var(--text); }
.map-wrap {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.map-wrap iframe { display: block; width: 100%; height: 460px; border: 0; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  font-family: inherit;
  font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.form-note { min-height: 1.4em; margin: 0.75rem 0 0; font-size: 0.9rem; }
.form-note.success { color: #87c5a4; }
.form-note.error { color: #ec8d81; }

.legal-table-wrap { overflow-x: auto; margin: 1rem 0; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.legal-table th, .legal-table td {
  border: 1px solid var(--line);
  padding: 0.7rem;
  text-align: left;
  vertical-align: top;
}
.legal-table th { background: var(--surface); }

.thank-wrap {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 2rem var(--gutter);
}
.thank-box {
  max-width: 540px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 3rem 2rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  background: #0d1013;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* Cookies */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10003;
  background: rgba(17, 20, 23, 0.97);
  border-top: 1px solid var(--line);
  padding: 1.25rem 0;
}
.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.cookie-banner-text h2 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.cookie-banner-text p { margin: 0; color: var(--muted); font-size: 0.9rem; max-width: 70ch; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10005;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cookie-modal.is-open { display: flex; }
.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 12, 0.72);
  cursor: pointer;
}
.cookie-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.cookie-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}
.cookie-modal-intro { color: var(--muted); }
.cookie-pref-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}
.cookie-pref-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
}
.cookie-pref-head h3 { margin: 0; font-size: 1rem; }
.cookie-pref-item p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.cookie-badge { color: var(--accent-2); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.cookie-switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; display: inline-block; }
.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #3d4468;
  border-radius: 999px;
}
.cookie-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cookie-switch input:checked + .cookie-slider { background: var(--accent); }
.cookie-switch input:checked + .cookie-slider::before { transform: translateX(20px); }
.cookie-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(12px);
  z-index: 10006;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.cookie-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.cookie-toast.error { border-color: #ec8d81; color: #ec8d81; }
body.cookie-modal-open { overflow: hidden; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 980px) {
  .service-grid,
  .split,
  .contact-grid,
  .portfolio-grid,
  .cert-row,
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .service-card.feature { grid-row: auto; min-height: 300px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #15191e;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem var(--gutter) 1.25rem;
  }
  .site-header.is-open .site-nav { display: flex; }
}

@media (max-width: 640px) {
  .service-grid,
  .split,
  .contact-grid,
  .portfolio-grid,
  .cert-row,
  .hero-stats,
  .form-row { grid-template-columns: 1fr; }
  .hero-stats li { border-right: 0; border-bottom: 1px solid var(--line); }
  .split img { height: 260px; }
  .brand-text { display: none; }
}
