:root {
  --maxw: 1376px;
  --radius-sm: 5px;
  --radius-md: 10px;
  --fs-xl: clamp(1.85rem, 3.7vw, 2.9rem);
}

html, body { overflow-x: clip; }
[hidden] { display: none !important; }

.site-header {
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(12px);
}
.header-inner { height: 78px; }
.brand { gap: .7rem; }
.brand img { width: 41px; height: 41px; }
.brand .word { font-size: 1.95rem; letter-spacing: .095em; font-weight: 700; line-height: 1; }
.logo-mark, .president-mark img { border-radius: 50%; }
.nav-desktop { gap: .25rem; }
.nav-link { color: var(--ink); padding-inline: .95rem; font-weight: 700; }
.nav-link.is-active { background: var(--bg-band); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-left: .6rem;
  padding: .65rem 1.1rem;
}
.mobile-nav .nav-cta { color: white; margin-left: 0; border-bottom: 0; }
.mobile-nav-close { color: var(--ink); font-size: 1.5rem; }
.nav-toggle span::before, .nav-toggle span::after { left: 0; }
.mobile-nav[aria-label] { visibility: hidden; }
.mobile-nav.is-open { visibility: visible; }
.skip-link { position: fixed; }
.route.is-active { animation: none; }
h1[tabindex="-1"]:focus, main[tabindex="-1"]:focus { outline: none; }

.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.btn { gap: 1rem; min-height: 48px; padding-inline: 1.25rem; }
.btn-outline { background: transparent; }
.btn span[aria-hidden] { font-size: 1rem; line-height: 1; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--interactive);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: .28em; }
.link-arrow span { font-size: 1.1rem; line-height: 1; }

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--dark-surface);
  color: var(--on-dark);
}
.home-hero-backdrop {
  position: absolute;
  z-index: -1;
  inset: 0;
}
.home-hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(92deg, rgb(8 8 8 / 84%), rgb(8 8 8 / 72%) 35%, rgb(8 8 8 / 28%) 75%, rgb(8 8 8 / 12%)),
    linear-gradient(0deg, rgb(8 8 8 / 55%), transparent 36%);
}
.home-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s var(--ease);
}
.home-hero-photo.is-current { opacity: 1; }
.home-hero-sales { object-position: center 43%; }
.home-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(36rem, 88svh, 64rem);
  padding-block: clamp(3rem, 7svh, 5rem) clamp(5.75rem, 10svh, 8rem);
}
.home-hero-copy { width: min(100%, 46rem); }
.home-hero h1 {
  font-size: clamp(2.3rem, 4.3vw, 4.04rem);
  letter-spacing: -.045em;
  line-height: 1.37;
  text-wrap: initial;
}
.home-hero h1 em, .home-philosophy em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: .065em;
  text-underline-offset: .14em;
}
.home-hero .lede { color: inherit; margin: 1.25rem 0 1.85rem; line-height: 1.85; }
.home-hero-term { white-space: nowrap; }
.home-hero .btn-outline { border-color: rgb(255 255 255 / 72%); color: var(--on-dark); }
.home-hero .btn-outline:hover { border-color: white; background: rgb(255 255 255 / 16%); }
.home-hero :focus-visible { outline-color: var(--on-dark); }
.home-hero-controls {
  position: absolute;
  display: flex;
  align-items: center;
  inset-inline-start: var(--gutter);
  inset-block-end: clamp(1rem, 4svh, 2.75rem);
}
.home-hero-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-dark);
}
.home-hero-dot::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 72%);
  transition: width .24s var(--ease), background-color .24s var(--ease);
}
.home-hero-dot:hover::before { background: white; }
.home-hero-dot[aria-pressed="true"]::before { width: 1.5rem; background: var(--red); }
.home-hero-autoplay::before {
  content: "";
  width: 0;
  height: 0;
  border-block: .35rem solid transparent;
  border-inline-start: .55rem solid currentColor;
}
.home-hero-autoplay[data-playing="true"]::before {
  width: .58rem;
  height: .72rem;
  border-block: 0;
  border-inline: .14rem solid currentColor;
}
.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1.5rem;
  margin-bottom: 1.65rem;
}
.section-row h2 { font-size: var(--fs-xl); line-height: 1.42; }
.home-business { border-top: 1px solid var(--border); }
.home-company {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: flex;
  align-items: center;
  min-block-size: clamp(42rem, 88svh, 58rem);
  padding-block: clamp(5rem, 9vw, 9rem);
  background:
    radial-gradient(ellipse at 90% 65%, rgb(255 255 255 / 10%), transparent 62%),
    linear-gradient(124deg, #202020, var(--dark-surface) 79%);
}
.home-company::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(54rem, 68vw);
  aspect-ratio: 1;
  border-radius: 50%;
  inset-block-start: 50%;
  inset-inline-end: -8%;
  transform: translateY(-48%) rotate(-14deg);
  background: url("allive-logo-monochrome.webp") center / contain no-repeat;
  mix-blend-mode: screen;
  opacity: .12;
  pointer-events: none;
}
.home-company-content { width: 100%; }
.home-company h2 {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: var(--fs-md);
  letter-spacing: .04em;
  margin-bottom: clamp(1.35rem, 3vw, 2.5rem);
}
.home-company h2::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: var(--red);
}
.home-philosophy {
  --scroll-reveal-delay: 85ms;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.8vw, 5.2rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.035em;
  word-break: auto-phrase;
  text-wrap: balance;
}
.home-philosophy span { display: block; }
.home-company-description {
  --scroll-reveal-delay: 160ms;
  max-width: 40rem;
  margin-top: clamp(1.45rem, 3.7vw, 3rem);
  line-height: 1.9;
}
.home-company-action { --scroll-reveal-delay: 230ms; margin-top: 1.6rem; }
.home-company :focus-visible, .site-footer :focus-visible {
  outline-color: var(--on-dark);
}

@media (prefers-reduced-motion: no-preference) {
  [data-scroll-reveal].reveal-pending { opacity: 0; }
  [data-scroll-reveal].is-revealed {
    animation: scroll-reveal .68s var(--ease) var(--scroll-reveal-delay, 0s) backwards;
  }
  [data-scroll-reveal]:focus-within { opacity: 1; animation: none; }
  @keyframes scroll-reveal {
    from { opacity: 0; transform: translateY(1.3rem); }
    to { opacity: 1; transform: none; }
  }
}

.home-president {
  background: var(--bg-elevated);
  padding-block: clamp(4.25rem, 8.8vw, 8rem);
}
.home-president-layout {
  --maxw: 1230px;
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  gap: clamp(1.4rem, 6vw, 5rem);
  align-items: start;
}
.home-president h2 { font-size: var(--fs-xl); line-height: 1.42; }
.home-president h2::before {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin-bottom: 1rem;
  background: var(--red);
}
.home-president-quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.35vw, 1.9rem);
  line-height: 1.75;
  word-break: auto-phrase;
}
.home-president-sign { margin: 1.4rem 0 1.25rem; font-weight: 700; }
.home-president-sign span { margin-right: .5rem; color: var(--ink-soft); font-size: var(--fs-sm); }

.company-principles {
  background: var(--bg-subtle);
  margin-block-start: clamp(3rem, 6vw, 5.5rem);
  padding-block: clamp(4.25rem, 8.8vw, 8rem);
}
.principles-inner { --maxw: 1230px; }
.company-principles h2 {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1rem;
  color: var(--interactive);
  font-size: clamp(1.3rem, 2.3vw, 1.85rem);
}
.company-principles h2::before {
  content: "";
  width: 1.65rem;
  height: 2px;
  background: var(--red);
}
.principles-mission { padding-bottom: clamp(2rem, 5vw, 4rem); }
.principles-statement {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.15vw, 3.6rem);
  line-height: 1.45;
  letter-spacing: -.025em;
  word-break: auto-phrase;
  text-wrap: balance;
}
.principles-statement em { color: var(--red); font-style: normal; }
.principles-mission .lede { max-width: 44rem; margin-top: 1.25rem; }
.principles-groups {
  display: grid;
  gap: clamp(2.3rem, 5vw, 4rem);
  border-top: 1px solid var(--border-strong);
  padding-top: clamp(1.8rem, 4vw, 3.2rem);
}
.principles-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.7rem, 2vw, 1.3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.principles-panels > li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .65rem;
  min-block-size: 6.8rem;
  padding: clamp(1.15rem, 2.5vw, 1.8rem);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--interactive);
  border-radius: var(--radius-sm);
}
.principles-panels h3 {
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  line-height: 1.65;
  word-break: auto-phrase;
  text-wrap: balance;
}
.principles-panels p { color: var(--ink-soft); font-size: var(--fs-sm); }
.principles-panels h3 span { white-space: nowrap; }
.principles-value-panels > li:last-child:nth-child(odd) { grid-column: 1 / -1; }

.service-card { position: relative; }
.service-card, .service-card-copy { padding: clamp(1.45rem, 3vw, 2.55rem); }
.service-card-photo { padding: 0; gap: 0; overflow: hidden; }
.service-card-image { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.service-card-copy { display: flex; flex: 1; flex-direction: column; gap: 1.1rem; }
.service-card-lifeline { background: var(--bg-elevated); }
.service-card-ar { background: var(--bg-subtle); }
.service-card p { max-width: 33rem; }
.text-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  align-self: flex-end;
  color: var(--interactive);
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  font-size: 1.1rem;
  margin-top: auto;
  transition: background .2s, color .2s;
}
.service-card:hover .text-arrow { background: var(--interactive); color: #fff; }
.service-description .lede + .lede { margin-top: .85rem; }
.business-case-link { display: flex; justify-content: flex-end; margin-top: 1.15rem; }

.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.55rem; }
.case-grid:has(> .case-card:only-child) { grid-template-columns: minmax(0, 1fr); }
.case-card {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.case-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.case-card-featured {
  grid-template: auto / minmax(0, 1.24fr) minmax(0, 1fr);
}
.case-card-text-only { grid-template-rows: auto; }
.case-card-text-only .case-card-copy { max-width: 50rem; }
.case-card-media { overflow: hidden; display: block; background: var(--dark-surface); }
.case-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  object-position: center 42%;
  transition: transform .4s var(--ease);
}
.case-card:hover img { transform: scale(1.028); }
.case-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.25rem, 3vw, 2.75rem);
}
.case-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem .85rem;
  color: var(--interactive);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.case-status {
  padding: .05rem .5rem;
  border-radius: 3px;
  background: var(--bg-subtle);
  color: var(--ink);
  font-size: var(--fs-xs);
}
.case-card h2, .case-card h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.76rem);
  margin: .8rem 0;
  line-height: 1.45;
  word-break: auto-phrase;
}
.case-card-featured h3 { font-size: clamp(1.35rem, 2.6vw, 2.1rem); }
.case-card p { color: var(--ink-soft); }
.case-card .link-arrow { margin-top: 1.35rem; }
.case-card:not(.case-card-featured) .link-arrow { margin-top: auto; padding-top: 1.2rem; }
.case-intro { background: var(--bg-subtle); border-bottom: 1px solid var(--border); }
.case-intro .page-head { padding-block: 1.25rem clamp(2.25rem, 5vw, 4.5rem); }
.case-intro .page-head .lede { max-width: 46rem; }
.case-intro .page-head h1 { margin-top: .5rem; }
.case-intro .case-meta { margin-top: .45rem; }
.case-index-actions { margin-top: 2rem; }

.case-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.case-detail-figure { margin: 0; }
.case-detail-media {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  background: var(--dark-surface);
}
.case-detail-figure figcaption {
  margin-top: .65rem;
  color: var(--ink-faint);
  font-size: var(--fs-sm);
}
.case-detail-text-only .case-detail-copy { max-width: 48rem; }
.case-detail-copy h2 { font-size: 1.35rem; margin-bottom: .45rem; }
.case-detail-copy section + section { border-top: 1px solid var(--border); padding-top: 1.35rem; margin-top: 1.35rem; }
.case-detail-copy p, .ar-card p, .process-list p { color: var(--ink-soft); }
.case-detail-actions { margin-top: 1.25rem; }

.ar-head .ar-lead {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.7vw, 2.1rem);
  margin-top: .65rem;
  line-height: 1.55;
  color: var(--interactive);
}
.ar-head .action-row { margin-top: 1.5rem; }
.ar-card h3 { margin-bottom: .6rem; font-size: 1.25rem; }
.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin: 0;
  padding-left: 1.5rem;
}
.process-list li { padding: .35rem .75rem .5rem .2rem; }
.process-list li::marker { color: var(--interactive); font-weight: 700; }
.process-list h3 { margin-bottom: .4rem; font-size: 1.15rem; }

.route:has(> .wrap:last-child) { padding-bottom: clamp(3rem, 5.5vw, 5rem); }
.contact-info .card h2 { margin-bottom: .75rem; font-size: var(--fs-lg); }
.contact-case { border-top: 1px solid var(--border); margin-top: 1.1rem; padding-top: 1rem; font-weight: 700; }
.footer-brand img { width: 39px; height: 39px; }
.footer-brand span { font-size: 1.55rem; font-weight: 700; }

@media (max-width: 900px) {
  .header-inner { height: 66px; }
  .header-inner > nav { display: none; }
  .brand img { width: 35px; height: 35px; }
  .brand .word { font-size: 1.7rem; }
  .home-hero .btn { padding-inline: clamp(.5rem, 2.66vw, .65rem); gap: .4rem; font-size: clamp(.74rem, 3.25vw, .875rem); }
  .home-hero .btn span[aria-hidden] { font-size: .85rem; }
  .desktop-break { display: none; }
  .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .home-hero-backdrop::after {
    background: linear-gradient(180deg, rgb(8 8 8 / 12%), rgb(8 8 8 / 62%) 45%, rgb(8 8 8 / 88%));
  }
  .home-hero-engineering { object-position: 54% center; }
  .home-hero-sales { object-position: 59% center; }
  .home-hero-inner {
    align-items: flex-end;
    min-height: clamp(32rem, 87svh, 50rem);
    padding-block: clamp(4rem, 16svh, 8rem) clamp(5.75rem, 13svh, 8rem);
  }
  .home-hero .action-row { gap: .5rem; }
  .home-hero h1 { font-size: clamp(1.55rem, 7.15vw, 2.95rem); }
  .home-hero .lede { margin: 1rem 0 1.35rem; font-size: clamp(.9rem, 3.9vw, 1rem); line-height: 1.65; }
  .section-row { margin-bottom: 1.2rem; }
  .home-company { min-block-size: clamp(37rem, 83svh, 46rem); padding-block: 4.5rem; }
  .home-company::before { width: 31rem; inset-inline-end: -13rem; opacity: .08; }
  .home-philosophy { font-size: clamp(1.92rem, 7.6vw, 3.25rem); }
  .home-president-layout { grid-template-columns: 1fr; }
  .principles-panels { grid-template-columns: 1fr; }
  .principles-panels > li { min-block-size: 4.75rem; }
  .case-grid, .case-card-featured, .case-detail-layout { grid-template-columns: 1fr; }
  .case-card-featured { grid-template-rows: auto 1fr; }
  .case-card-media img { aspect-ratio: 16 / 10; }
  .case-card-copy { padding: 1.25rem; }
  .process-list { gap: .5rem 1rem; }
}
