:root {
  color-scheme: light;
  --ink: #101318;
  --muted: #5d6673;
  --line: rgba(16, 19, 24, 0.12);
  --paper: #f4f4f4;
  --white: #ffffff;
  --green: #393c41;
  --copper: #3e6ae1;
  --blue: #3e6ae1;
  --header-h: 64px;
  --pill: 980px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  color: #fff;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  transition: background 220ms var(--ease-out), color 220ms var(--ease-out), border-color 220ms var(--ease-out), backdrop-filter 220ms var(--ease-out);
}

.site-header.is-scrolled,
.site-header.dark-header {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(160%);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.brand-mark {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.brand-subtitle {
  color: currentColor;
  font-size: 0.78rem;
  opacity: 0.72;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  grid-column: 2;
}

.site-nav a {
  border-radius: var(--pill);
  padding: 9px 16px;
  color: currentColor;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0.82;
  transition: background 160ms var(--ease-out), opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.site-nav a:active,
.button:active,
.menu-toggle:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover {
    background: rgba(255, 255, 255, 0.16);
    opacity: 1;
  }

  .site-header.is-scrolled .site-nav a:hover,
  .site-header.dark-header .site-nav a:hover {
    background: rgba(16, 19, 24, 0.06);
  }
}

.menu-toggle {
  display: none;
  grid-column: 3;
  justify-self: end;
  width: 40px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: currentColor;
  transition: transform 140ms var(--ease-out), background 160ms var(--ease-out);
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 48px) max(24px, calc((100vw - 1120px) / 2)) 64px;
  color: #fff;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center 60%;
}

.hero-shade {
  background:
    linear-gradient(180deg, rgba(4, 8, 12, 0.5), rgba(4, 8, 12, 0.06) 42%, rgba(4, 8, 12, 0.52)),
    linear-gradient(90deg, rgba(4, 8, 12, 0.16), rgba(4, 8, 12, 0.06));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  max-width: 760px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--copper);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-right: auto;
  margin-bottom: 16px;
  margin-left: auto;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(1.85rem, 3vw, 2.8rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.015em;
}

h3 {
  margin-bottom: 10px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero-copy {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.55;
}

.hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  padding: 0 26px;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 140ms var(--ease-out), background 180ms var(--ease-out), color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.button.primary {
  background: var(--blue);
  color: var(--white);
}

@media (hover: hover) and (pointer: fine) {
  .button.primary:hover {
    background: #2f57c4;
  }
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  background: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .button.ghost:hover {
    background: rgba(255, 255, 255, 0.12);
  }
}

.button.light {
  background: #fff;
  color: var(--ink);
}

.disabled-button {
  cursor: default;
}

/* ---------- Sections ---------- */

.intro-section,
.services-band,
.split-section,
.cta-section,
.page-main {
  padding-right: max(24px, calc((100vw - 1120px) / 2));
  padding-left: max(24px, calc((100vw - 1120px) / 2));
}

.intro-section {
  padding-top: 96px;
  padding-bottom: 96px;
  background: var(--paper);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: end;
}

.intro-grid p,
.text-block p,
.page-hero p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.services-band {
  padding-top: 88px;
  padding-bottom: 88px;
  background: #fff;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 52px;
}

/* Tesla-style tile grid: photo tiles with text overlaid on a bottom scrim,
   plus solid-tone tiles for services without dedicated photography. */

.service-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.service-tile {
  position: relative;
  grid-column: span 2;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #1c2530, #10161d);
}

.service-tile.wide {
  grid-column: span 3;
  aspect-ratio: 16 / 10;
}

.service-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .service-tile:hover img {
    transform: scale(1.045);
  }
}

.tile-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 9, 13, 0) 42%, rgba(6, 9, 13, 0.82) 100%);
}

.tile-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 24px;
  color: #fff;
}

.tile-content span {
  display: inline-block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tile-content h3 {
  margin-bottom: 8px;
  color: #fff;
}

.tile-content p {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
  line-height: 1.55;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  padding-top: 108px;
  padding-bottom: 108px;
  background: #e9ece8;
}

.principles {
  display: grid;
  gap: 1px;
  background: rgba(16, 19, 24, 0.12);
  border: 1px solid rgba(16, 19, 24, 0.08);
}

.principles div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  padding: 24px;
  background: #f8f8f4;
}

.principles strong {
  font-weight: 500;
}

.cta-section {
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 96px;
  padding-bottom: 96px;
  background: linear-gradient(135deg, #183f32, #102235 58%, #191715);
  color: #fff;
}

.cta-section h2 {
  max-width: 840px;
}

.cta-section p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.1rem;
  line-height: 1.7;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 26px max(24px, calc((100vw - 1120px) / 2));
  background: #0f1216;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.subpage {
  background: #fff;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.subpage .page-main {
  flex: 1;
}

.subpage .site-footer {
  margin-top: auto;
}

.page-main {
  padding-top: calc(var(--header-h) + 52px);
}

.page-hero {
  max-width: 760px;
  padding: 46px 0 52px;
}

.page-hero h1 {
  color: var(--ink);
  max-width: 720px;
  margin-right: 0;
  margin-left: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.14;
  font-weight: 500;
  text-align: left;
  overflow-wrap: anywhere;
}

/* ---------- Service detail page ---------- */

.service-detail-list {
  display: grid;
  gap: 64px;
  margin-bottom: 88px;
}

.service-detail {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 44px;
  align-items: center;
}

.service-detail:nth-child(even) .service-detail-media {
  order: 2;
}

.service-detail-media {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #1c2530, #10161d);
}

.service-detail-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-detail-body span.index {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.service-detail-body h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  margin-bottom: 12px;
}

.service-detail-body > p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 22px;
}

.service-detail-body h4 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.service-detail-body ul {
  margin: 0 0 22px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.service-detail-body ul:last-child {
  margin-bottom: 0;
}

.service-detail-body li::marker {
  color: var(--blue);
}

.use-cases {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.detail-list,
.about-grid,
.contact-details {
  display: grid;
  gap: 1px;
  margin-bottom: 76px;
  background: rgba(16, 19, 24, 0.12);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-list article,
.about-grid div,
.contact-details div {
  padding: clamp(20px, 3vw, 28px);
  background: #fafaf7;
}

.detail-list {
  grid-template-columns: repeat(2, 1fr);
}

.detail-list h2,
.about-grid h2 {
  margin-bottom: 10px;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.18;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.detail-list p,
.about-grid p,
.service-card p,
.service-strip p,
.principles span,
.contact-details span {
  color: var(--muted);
}

.detail-list p,
.about-grid p {
  max-width: 38rem;
  font-size: clamp(0.92rem, 1vw, 0.98rem);
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.about-grid,
.contact-details {
  grid-template-columns: repeat(3, 1fr);
}

.contact-details div {
  display: grid;
  gap: 12px;
}

.contact-details strong {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.35;
  font-weight: 500;
}

.contact-hero .button {
  width: auto;
  min-width: 0;
  margin-top: 6px;
  padding-right: 22px;
  padding-left: 22px;
}

@media (max-width: 1100px) {
  .site-header {
    padding: 0 18px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    right: 12px;
    left: 12px;
    grid-column: auto;
    display: grid;
    gap: 2px;
    padding: 8px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(16, 19, 24, 0.1);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
    backdrop-filter: blur(18px) saturate(160%);
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .site-nav a {
    padding: 13px 12px;
  }

  .hero {
    min-height: 92svh;
    padding-bottom: 44px;
  }

  .intro-grid,
  .split-section {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-tile,
  .service-tile.wide {
    grid-column: span 2;
    aspect-ratio: 16 / 11;
  }

  .service-detail,
  .detail-list,
  .about-grid,
  .contact-details {
    grid-template-columns: 1fr;
  }

  .service-detail:nth-child(even) .service-detail-media {
    order: 0;
  }

  .service-detail-media {
    aspect-ratio: 16 / 10;
  }

  .principles div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-tile,
  .service-tile.wide {
    grid-column: 1;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(2rem, 8vw, 2.4rem);
    line-height: 1.08;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .eyebrow {
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .hero-actions {
    display: grid;
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .tile-content {
    padding: 18px;
  }

  .page-main {
    padding-top: calc(var(--header-h) + 28px);
    padding-right: 24px;
    padding-left: 24px;
  }

  .page-hero {
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
    padding-top: 28px;
    padding-bottom: 38px;
  }

  .page-hero h1 {
    width: 100%;
    max-width: 18rem;
    font-size: clamp(1.5rem, 6.5vw, 1.9rem);
    line-height: 1.18;
    white-space: normal;
  }

  .page-hero p {
    width: 100%;
    max-width: 18.5rem;
    font-size: 0.94rem;
    line-height: 1.62;
  }

  .detail-list,
  .about-grid,
  .contact-details {
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
  }

  .detail-list h2,
  .about-grid h2 {
    max-width: 18rem;
    font-size: 1.05rem;
  }

  .detail-list p,
  .about-grid p {
    max-width: 18rem;
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .site-nav,
  .button.ghost {
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    backdrop-filter: none;
  }
}
