/* Structural fidelity overrides inherited from the validated UpexFlow Hub.
   Services keeps its own editorial content, but the page geometry, header,
   hero distribution, shells and responsive behavior follow the Hub contract. */

:root {
  --frame: 1120px;
}

.site-header {
  height: 60px;
  background: #0d0e0e;
}

.header-inner {
  width: min(calc(100% - 64px), var(--frame));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 18px;
}

.wordmark {
  font-size: 28px;
}

.main-nav {
  justify-content: center;
  gap: 24px;
  font-size: 11px;
}

.main-nav a {
  height: 60px;
}

.main-nav a:first-child::after {
  bottom: 13px;
}

.language-switcher {
  align-items: center;
  gap: 7px;
}

.lang {
  height: 28px;
  min-width: 61px;
  padding: 0 9px;
  gap: 6px;
  font-size: 10.5px;
}

.section-shell {
  width: min(calc(100% - 64px), var(--frame));
  margin-inline: auto;
}

.hero {
  width: min(100%, var(--frame));
  height: 470px;
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 48% 52%;
}

.hero-copy {
  padding: 52px 42px 42px 52px;
}

.eyebrow,
.kicker {
  margin-bottom: 14px;
  font-size: 10px;
}

.hero h1 {
  font-size: 68px;
  line-height: .94;
}

.hero-lead {
  max-width: 430px;
  margin: 20px 0 14px;
  font-size: 22px;
  line-height: 1.22;
}

.short-rule,
.heading-rule {
  width: 42px;
}

.short-rule {
  margin: 3px 0 18px;
}

.hero-body {
  max-width: 420px;
  font-size: 12px;
  line-height: 1.58;
}

.hero-actions {
  gap: 16px;
  margin-top: 24px;
}

.btn {
  min-width: 184px;
  height: 39px;
  padding: 0 17px;
  font-size: 11px;
}

.hero-image {
  container-type: size;
}

.hero-image img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;
}

@container (min-aspect-ratio: 9 / 8) {
  .hero-image img {
    object-position: center top;
  }
}

/* Services-specific content remains unchanged; only the shared UpexFlow
   horizontal rhythm is inherited here. */
.dark-section,
.paper-section,
.automation-section,
.contact-section {
  width: 100%;
}

.about-grid {
  width: min(calc(100% - 64px), var(--frame));
}

@media (min-width: 901px) {
  .site-header {
    height: 62px;
  }

  .header-inner {
    width: 100%;
    max-width: 1055px;
    padding-inline: 38px;
    grid-template-columns: 170px 1fr auto;
    gap: 18px;
  }

  .wordmark {
    font-size: 31px;
    letter-spacing: -.035em;
  }

  .main-nav {
    justify-self: stretch;
    justify-content: center;
    gap: 27px;
    font-size: 11px;
    transform: translateX(-46px);
  }

  .main-nav a {
    height: 62px;
  }

  .main-nav a:first-child::after {
    bottom: 14px;
  }

  .language-switcher {
    justify-self: end;
    gap: 8px;
  }

  .lang {
    height: 27px;
    min-width: 58px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .lang:first-child {
    min-width: 72px;
  }

  .hero {
    width: 100%;
    max-width: 1055px;
    height: 485px;
    grid-template-columns: 48.53% 51.47%;
  }

  .hero-copy {
    padding: 48px 48px 45px 54px;
  }

  .hero-copy > * {
    transform: translateY(10px);
  }

  .eyebrow {
    margin-bottom: 3px;
    font-size: 11px;
    letter-spacing: .17em;
  }

  .hero h1 {
    font-size: 76px;
    line-height: .94;
    font-weight: 300;
    letter-spacing: -.045em;
  }

  .hero-lead {
    max-width: 410px;
    margin: 16px 0 15px;
    font-size: 25px;
    line-height: 1.08;
    font-weight: 300;
  }

  .short-rule {
    width: 50px;
    margin: 4px 0 18px;
  }

  .hero-body {
    max-width: 380px;
    font-size: 13px;
    line-height: 1.42;
  }

  .hero-actions {
    gap: 17px;
    margin-top: 22px;
  }

  .btn {
    min-width: 188px;
    height: 40px;
    padding-inline: 18px;
    font-size: 11px;
  }

  .btn.secondary {
    min-width: 146px;
  }

  .section-shell {
    width: calc(100% - 80px);
    max-width: 975px;
  }

  .dark-section,
  .paper-section,
  .automation-section,
  .contact-section {
    padding-left: 0;
    padding-right: 0;
  }

  .about-grid {
    width: calc(100% - 120px);
    max-width: 935px;
  }
}

@media (min-width: 1056px) {
  .header-inner,
  .hero {
    max-width: none;
  }

  .header-inner {
    padding-inline: clamp(38px, 3.6vw, 68px);
  }

  .hero {
    height: clamp(485px, 42vw, 640px);
    grid-template-columns: minmax(500px, 48.53%) minmax(0, 1fr);
  }

  .hero-copy {
    padding-left: clamp(54px, 5.1vw, 98px);
  }

  .hero h1 {
    font-size: 76px;
  }

  .hero-lead {
    max-width: 500px;
    font-size: 25px;
  }

  .hero-body {
    max-width: 500px;
    font-size: clamp(12px, .88vw, 14px);
  }

  .section-shell {
    width: calc(100% - 80px);
    max-width: 1360px;
  }

  .about-grid {
    width: calc(100% - 120px);
    max-width: 1320px;
  }
}

@media (min-width: 1320px) {
  .about-grid {
    width: calc(100% - clamp(120px, 10.2vw, 196px));
    max-width: none;
    grid-template-columns: minmax(270px, 340px) minmax(500px, 700px) minmax(330px, 1fr);
    gap: clamp(28px, 3vw, 56px);
    align-items: start;
  }

  .about-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1353 / 1162;
    align-self: start;
  }

  .about-copy {
    align-self: start;
    padding-top: 3px;
  }

  .values {
    height: auto;
    min-height: 100%;
    align-self: stretch;
    align-content: start;
    gap: 20px;
    padding: 8px 0 8px clamp(30px, 2.5vw, 46px);
  }
}

@media (min-width: 1440px) {
  .section-shell,
  .about-grid {
    width: calc(100% - 196px);
    max-width: none;
  }
}

@media (min-width: 1800px) {
  .values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 34px;
  }
}

@media (min-width: 901px) and (max-width: 1319px) {
  .about-grid {
    width: calc(100% - 80px);
    max-width: none;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 30px 34px;
    align-items: start;
  }

  .about-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1353 / 1162;
  }

  .values {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line-dark);
    padding: 22px 0 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 34px;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: auto;
  }

  .header-inner {
    min-height: 60px;
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
    transform: none;
  }

  .hero {
    width: 100%;
    height: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 430px;
    padding-inline: clamp(28px, 7vw, 58px);
  }

  .hero-image {
    height: 460px;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.06);
  }

  .section-shell {
    width: calc(100% - clamp(32px, 8vw, 64px));
  }

  .about-grid {
    width: calc(100% - clamp(32px, 8vw, 64px));
    grid-template-columns: 1fr;
  }

  .about-photo {
    height: auto;
    aspect-ratio: 264 / 226;
  }
}

@media (max-width: 620px) {
  .site-header {
    position: relative;
  }

  .header-inner,
  .section-shell,
  .about-grid {
    width: calc(100% - 28px);
  }

  .header-inner {
    min-height: 68px;
  }

  .wordmark {
    font-size: 27px;
  }

  .hero-copy {
    min-height: 430px;
  }

  .hero-image {
    height: min(100vw, 470px);
  }
}
