:root {
  --bg: #161515;
  --bg-deep: #121212;
  --card: #1e1e1e;
  --text: #ffffff;
  --muted: #c8cdd0;
  --orange: #f77f00;
  --blue: #0077cc;
  --ink: #17262f;
  --paper: #f9f9f9;
  --header-h: 120px;
  --pad: 24px;
  --max: 1180px;
  --font: "Manrope", Arial, sans-serif;
  --display: "Roboto", "Manrope", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

#solutions,
#contact,
#references,
#approach {
  scroll-margin-top: calc(var(--header-h) - 8px);
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: #fff;
  color: #111;
  padding: 8px 12px;
}

.wrap {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  height: auto;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.topbar {
  background: #0a0a0a;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding-top: env(safe-area-inset-top);
}

.topbar-inner {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.topbar-inner p {
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-inner a:hover,
.topbar-inner a:focus-visible {
  color: var(--orange);
}

.header-inner {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin-inline: auto;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header.is-scrolled {
  background: rgba(18, 18, 18, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.logo img {
  height: 52px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--orange);
}

.nav-cta {
  border: 1px solid var(--orange);
  color: var(--orange) !important;
  padding: 8px 16px;
  font-size: 13px !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--orange);
  color: #111 !important;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.menu-toggle .bars,
.menu-toggle .bars::before,
.menu-toggle .bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #fff;
  margin: 0 auto;
  position: relative;
}

.menu-toggle .bars::before,
.menu-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle .bars::before {
  top: -6px;
}

.menu-toggle .bars::after {
  top: 6px;
}

.menu-toggle[aria-expanded="true"] .bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .bars::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bars::after {
  top: 0;
  transform: rotate(-45deg);
}

a,
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: flex;
  align-items: center;
  background: #0a0a0a url("../assets/images/hero.jpg") center / cover no-repeat;
  isolation: isolate;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.28) 48%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, transparent 28%, rgba(0, 0, 0, 0.35) 100%);
  z-index: -1;
}

.hero-copy {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin-inline: auto;
  padding-block: 28px 56px;
}

.hero-kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6.2vw, 92px);
  line-height: 0.95;
  color: transparent;
  -webkit-text-stroke: 1.5px #fff;
  text-stroke: 1.5px #fff;
  overflow-wrap: anywhere;
}

.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 7.2vw, 108px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 6px 0 22px;
  overflow-wrap: anywhere;
}

.hero-lead {
  max-width: 560px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn-solid,
.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn-solid {
  background: var(--orange);
  color: #111;
}

.btn-solid:hover,
.btn-solid:focus-visible {
  background: #ff8c14;
}

.btn-line {
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-line:hover,
.btn-line:focus-visible {
  border-color: var(--orange);
  color: var(--orange);
}

.stats {
  background: #0e0e0e;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 22px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.stats-grid strong {
  color: #fff;
  font-weight: 700;
}

.hero-dot {
  position: absolute;
  left: 28px;
  bottom: 36px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* Solutions */
.solutions {
  position: relative;
  background:
    linear-gradient(180deg, rgba(22, 21, 21, 0.92), rgba(22, 21, 21, 0.94)),
    url("../assets/images/services-bg.jpg") left top / cover no-repeat;
  padding: 88px 0 72px;
}

.eyebrow {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}

.eyebrow-dark {
  color: var(--blue);
}

.section-title {
  text-align: center;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 48px;
}

.section-lead {
  text-align: center;
  max-width: 640px;
  margin: -28px auto 32px;
  color: var(--muted);
  font-size: 15px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.service {
  min-width: 0;
  transition: transform 0.2s ease;
}

.service:hover {
  transform: translateY(-4px);
}

.service figure {
  overflow: hidden;
  margin-bottom: 18px;
  aspect-ratio: 370 / 200;
  background: #111;
  border-radius: 4px;
}

.service img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.service ul {
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.service li + li {
  margin-top: 2px;
}

.approach {
  background: #101010;
  padding: 72px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.approach-grid article {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px;
}

.approach-grid h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.approach-grid p {
  color: var(--muted);
  font-size: 14px;
}

.flag {
  font-size: 14px;
  line-height: 1;
}

/* References */
.references {
  background: #171616;
  padding: 56px 0 64px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.references.is-open {
  padding-bottom: 88px;
}

.ref-toggle {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  text-align: left;
  padding: 0 0 28px;
  cursor: pointer;
  font-family: inherit;
}

.ref-toggle:hover .ref-toggle-label,
.ref-toggle:focus-visible .ref-toggle-label {
  color: var(--orange);
  border-color: var(--orange);
}

.ref-toggle-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ref-toggle .eyebrow {
  margin-bottom: 0;
}

.ref-toggle-title {
  display: block;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}

.ref-toggle-lead {
  display: block;
  max-width: 52ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.ref-toggle-label {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  min-height: 40px;
  padding: 0 18px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ref-panel {
  padding-top: 36px;
}

.ref-panel[hidden] {
  display: none;
}

.ref-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.ref-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.8);
  min-height: 36px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.ref-tab.is-active,
.ref-tab:hover,
.ref-tab:focus-visible {
  border-color: var(--orange);
  color: var(--orange);
}

.ref-group + .ref-group {
  margin-top: 40px;
}

.ref-heading {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 14px;
}

.ref-note {
  color: var(--muted);
  font-size: 13px;
  margin: -6px 0 14px;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.logo-grid--wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.logo-card {
  margin: 0;
  background: #f4f4f2;
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 16px 18px;
}

.logo-card img {
  max-width: min(148px, 100%);
  max-height: 42px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.88;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.logo-card:hover img,
.logo-card:focus-within img {
  filter: none;
  opacity: 1;
}

/* Contact */
.contact {
  background: var(--paper);
  color: var(--ink);
  padding: 56px 0 64px;
}

.contact .section-title {
  color: var(--ink);
  margin-bottom: 36px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  text-align: left;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-layout .contact-grid {
  grid-template-columns: 1fr;
  gap: 28px;
}

.contact-grid address {
  font-style: normal;
  color: #444;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 12px;
}

.inquiry {
  background: #fff;
  border: 1px solid #e4e4e4;
  padding: 24px;
}

.inquiry h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--ink);
}

.inquiry label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 12px;
}

.inquiry input,
.inquiry textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 6px;
  border: 1px solid #d7d7d7;
  background: #fafafa;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
}

.inquiry button {
  border: 0;
  cursor: pointer;
  margin-top: 8px;
}

.contact-grid h3 {
  color: var(--blue);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-grid a,
.contact-grid p {
  color: #333;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.contact-grid a:hover,
.contact-grid a:focus-visible {
  color: var(--blue);
}

/* Footer */
.site-footer {
  background: var(--bg-deep);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  padding: 22px 0 max(22px, env(safe-area-inset-bottom));
}

.footer-inner {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin-inline: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.site-footer address {
  font-style: normal;
  line-height: 1.55;
}

.site-footer strong {
  color: #fff;
  font-weight: 700;
}

.footer-brand {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.footer-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--orange);
}

.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #111;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.to-top:hover,
.to-top:focus-visible {
  background: var(--orange);
  color: #111;
}

@media (max-width: 1100px) {
  .logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .logo-grid--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 96px;
    --pad: 20px;
  }

  .header-inner {
    height: 64px;
    gap: 12px;
  }

  .logo img {
    height: 40px;
  }

  .cards,
  .contact-grid,
  .stats-grid,
  .approach-grid,
  .contact-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .logo-grid,
  .logo-grid--wide {
    grid-template-columns: 1fr 1fr;
  }

  .topbar-inner {
    justify-content: flex-end;
    gap: 16px;
  }

  .topbar-inner p {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
  }

  .site-header.is-scrolled,
  body.nav-open .site-header {
    background: rgba(12, 12, 12, 0.98);
  }

  .nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 60;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
    background: #0c0c0c;
    padding: 8px var(--pad) calc(20px + env(safe-area-inset-bottom));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-cta {
    margin-top: 12px;
    width: fit-content;
    justify-content: center;
    border-bottom: 0 !important;
    min-height: 44px;
    padding: 8px 16px;
  }

  .hero-kicker {
    -webkit-text-stroke: 0.8px #fff;
    font-size: clamp(28px, 10vw, 64px);
  }

  .hero-title {
    font-size: clamp(36px, 12vw, 72px);
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn-solid,
  .hero-actions .btn-line {
    flex: 1 1 160px;
    min-height: 48px;
  }

  .hero-dot {
    display: none;
  }

  .solutions,
  .approach,
  .references,
  .contact {
    padding-block: 56px;
  }

  .section-title {
    margin-bottom: 28px;
    font-size: clamp(20px, 6.5vw, 28px);
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .stats {
    padding: 16px 0;
  }

  .stats-grid {
    text-align: left;
    gap: 10px;
  }

  .contact-grid h3 {
    justify-content: flex-start;
  }

  .inquiry {
    padding: 20px;
  }

  .inquiry .btn-solid {
    width: 100%;
    min-height: 48px;
  }

  .ref-toggle {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .ref-toggle-label {
    align-self: flex-start;
    min-height: 44px;
    min-width: 96px;
  }

  .ref-toggle-lead {
    font-size: 14px;
  }

  .ref-tabs {
    justify-content: flex-start;
    gap: 6px;
  }

  .ref-tab {
    min-height: 44px;
    padding: 0 12px;
  }

  .logo-card {
    min-height: 72px;
    padding: 12px 10px;
  }

  .to-top {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  :root {
    --pad: 16px;
  }

  .topbar-inner a[href^="mailto"] {
    display: none;
  }

  .hero-actions .btn-solid,
  .hero-actions .btn-line {
    flex: 1 1 100%;
  }

  .logo-card img {
    max-height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .service {
    animation: none;
    transition: none;
  }
}
