/* =====================================================================
   Gratia Corp — landing page
   Type, colour and proportion follow the Figma frame
   "Gratia Website - Landing Page" (node 204:22). The page runs full
   width; --pad (side padding) and --page-max come from the CMS under
   Settings -> Layout & spacing and are injected in the document head.
   ===================================================================== */

/* ---------------------------------------------------------------- *
   Fonts — Space Grotesk, self-hosted, matching the Figma type styles
 * ---------------------------------------------------------------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}

/* ---------------------------------------------------------------- *
   Design tokens
 * ---------------------------------------------------------------- */
:root {
  --accent:        #f25930;
  --accent-dark:   #d9451f;
  --dark:          #262626;
  --light:         #f2f2f2;
  --line:          #3b3b3b;
  --line-soft:     rgba(59, 59, 59, 0.4);
  --ink:           rgba(0, 0, 0, 0.8);
  --ink-muted:     rgba(0, 0, 0, 0.4);
  --paper:         #ffffff;
  --paper-60:      rgba(255, 255, 255, 0.6);
  --paper-50:      rgba(255, 255, 255, 0.5);
  --paper-40:      rgba(255, 255, 255, 0.4);

  --font: 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Overridden by the CMS layout tokens injected in <head> */
  --pad: 100px;
  --page-max: none;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------------------------------------------------------------- *
   Reset
 * ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 130px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  background: var(--dark);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 999;
  background: var(--accent); color: #fff;
  padding: 10px 18px; font-size: 12px; letter-spacing: .04em;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 8px; }

.page {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  position: relative;
  overflow-x: clip;
}

/* Below-the-fold sections skip rendering work until they are near the
   viewport. The size hints keep the scrollbar honest while they are skipped. */
.services, .why, .cta-banner, .contact, .site-footer {
  content-visibility: auto;
}
.services     { contain-intrinsic-size: auto 1000px; }
.why          { contain-intrinsic-size: auto 843px; }
.cta-banner   { contain-intrinsic-size: auto 507px; }
.contact      { contain-intrinsic-size: auto 726px; }
.site-footer  { contain-intrinsic-size: auto 485px; }

/* ---------------------------------------------------------------- *
   Scroll reveal
   Elements start hidden only once JS has confirmed it can reveal them,
   so the page is fully readable without JavaScript.
 * ---------------------------------------------------------------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }
.js-reveal [data-reveal='fade'] { transform: none; }
.js-reveal [data-reveal='left']  { transform: translateX(-28px); }
.js-reveal [data-reveal='right'] { transform: translateX(28px); }
.js-reveal [data-reveal='scale'] { transform: scale(.96); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- *
   Shared components
 * ---------------------------------------------------------------- */

/* Orange action button — 48px tall, 16px padding, 12px label (Figma) */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 41px;
  height: 48px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  text-align: center;
  overflow: hidden;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
/* A sheen that sweeps across on hover */
.btn::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-18deg);
  transition: left .55s var(--ease);
  pointer-events: none;
}
.btn:hover::before { left: 120%; }
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn__arrow { flex: 0 0 auto; transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(5px); }
.btn--gap-15 { gap: 15px; }
.btn--gap-10 { gap: 10px; }
.btn--outline { background: transparent; border: 1px solid #fff; }
.btn--outline:hover { background: rgba(255, 255, 255, .12); }
.btn--block { width: 100%; }

/* Eyebrow label with its hairline tick (circle + diagonal + rule) */
.eyebrow {
  position: relative;
  display: block;
  min-height: 29.5px;
  padding-left: 31px;
  color: var(--accent);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.51px;
  line-height: normal;
  white-space: nowrap;
}
.eyebrow__tick {
  position: absolute;
  left: 0;
  top: 5px;
  height: 24.5px;
  max-width: none;
  pointer-events: none;
}

/* Section heading — 42/45, tracking -1.26 at the design size */
.section-title {
  font-size: clamp(28px, 2.917vw, 42px);
  font-weight: 500;
  line-height: 1.0715;      /* 45 / 42 */
  letter-spacing: -0.03em;  /* -1.26 / 42 */
}
.section-intro {
  font-weight: 400;
  font-size: clamp(16px, 1.32vw, 19px);
  line-height: 1.474;       /* 28 / 19 */
  letter-spacing: -0.03em;
}

/* Two-column section header: title left, intro right */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px;
  align-items: start;
}
.section-head__title { max-width: 407px; }
.section-head__intro { max-width: 537px; }

/* Section wrapper — full width with the CMS side padding */
.section { padding-inline: var(--pad); }

/* ---------------------------------------------------------------- *
   Header / navigation
 * ---------------------------------------------------------------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 40;
  height: 220px;
  pointer-events: none;
}
.site-header__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 220px;
  object-fit: fill;   /* a pure vertical gradient — stretching keeps the fade */
  pointer-events: none;
}
.site-header__inner {
  position: relative;
  height: 120px;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  gap: 40px;
  pointer-events: auto;
}
.site-header__logo { flex: 0 0 auto; width: 205px; height: 60px; }
.site-header__logo img { width: 205px; height: 60px; object-fit: contain; }

.site-nav {
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 70px;
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  white-space: nowrap;
}
.site-nav a { position: relative; padding-bottom: 4px; }
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.is-current::after { transform: scaleX(1); }

.site-header__cta { flex: 0 0 auto; width: 282px; }

/* The nav's own button only exists for the mobile drawer */
.site-nav__cta { display: none; }

/* Header condenses once the page is scrolled */
.site-header.is-stuck {
  position: fixed;
  height: 84px;
  background: rgba(28, 28, 28, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  animation: header-drop .45s var(--ease);
}
.site-header.is-stuck .site-header__scrim { opacity: 0; }
.site-header.is-stuck .site-header__inner { height: 84px; }
.site-header.is-stuck .site-header__logo,
.site-header.is-stuck .site-header__logo img { width: 158px; height: 46px; }
.site-header.is-stuck .site-header__cta { height: 42px; }
.site-header.is-stuck .btn { height: 42px; }
@keyframes header-drop { from { transform: translateY(-100%); } to { transform: none; } }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: var(--accent);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; }
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(6px); }
.nav-toggle[aria-expanded='true'] span { background: transparent; }
.nav-toggle[aria-expanded='true'] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded='true'] span::after  { transform: rotate(-45deg); }

/* ---------------------------------------------------------------- *
   Hero — 900px tall at the design size
 * ---------------------------------------------------------------- */
.hero {
  position: relative;
  height: 900px;
  overflow: hidden;
  background: var(--dark);
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-zoom 18s var(--ease) forwards;
}
@keyframes hero-zoom { from { transform: scale(1.07); } to { transform: scale(1); } }

.hero__scrim {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 507px;
  transform: scaleY(-1);
  opacity: .63;
  object-fit: fill;
  pointer-events: none;
}
.hero__play {
  /* A <button> when a video is set, a <span> when one is not — declaring the
     box explicitly keeps both laying out identically. */
  display: block;
  position: absolute;
  left: 50%;
  top: 363px;
  width: 104px;
  height: 104px;
  padding: 0;
  z-index: 3;
  transform: translateX(-50%);
  transition: transform .3s var(--ease);
}
.hero__play::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: .55;
  animation: play-pulse 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes play-pulse {
  0%   { transform: scale(1);    opacity: .5; }
  70%  { transform: scale(1.32); opacity: 0; }
  100% { transform: scale(1.32); opacity: 0; }
}
.hero__play:hover { transform: translateX(-50%) scale(1.07); }
/* Shown when no video URL has been set in the CMS */
.hero__play--idle { cursor: default; pointer-events: none; }
.hero__play--idle:hover { transform: translateX(-50%); }
.hero__play img { width: 104px; height: 104px; }

.hero__content {
  position: absolute;
  left: 0;
  right: 0;
  top: 502px;
  padding-inline: var(--pad);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 60px;
  align-items: flex-start;
}
.hero__text { display: flex; flex-direction: column; gap: 30px; max-width: 798px; }
.hero__title {
  font-size: clamp(34px, 4.167vw, 60px);
  font-weight: 500;
  line-height: 1;             /* 60 / 60 */
  letter-spacing: -0.03em;    /* -1.8 / 60 */
  color: #fff;
}
.hero__description {
  max-width: 590px;
  font-size: 16px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.03em;
  color: #fff;
}
.hero__cta { width: 260px; }

/* ---------------------------------------------------------------- *
   Ticker strip
 * ---------------------------------------------------------------- */
.ticker {
  background: var(--dark);
  height: 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.ticker::before, .ticker::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}
.ticker::before { left: 0;  background: linear-gradient(to right, var(--dark), transparent); }
.ticker::after  { right: 0; background: linear-gradient(to left,  var(--dark), transparent); }

.ticker__viewport { display: flex; width: 100%; justify-content: center; }
.ticker__track {
  display: flex;
  align-items: center;
  gap: 24px;                  /* the three spaces around each bullet */
  font-size: clamp(15px, 2.014vw, 29px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: normal;
  white-space: nowrap;
  color: #fff;
  padding-inline: 12px;
}
.ticker__dot { color: var(--accent); }

/* Once the phrases no longer fit, they scroll instead of being clipped */
.ticker.is-marquee .ticker__viewport {
  justify-content: flex-start;
  width: max-content;
  animation: ticker-scroll var(--ticker-duration, 30s) linear infinite;
  will-change: transform;
}
.ticker.is-marquee .ticker__track { flex: 0 0 auto; }
.ticker.is-marquee:hover .ticker__viewport { animation-play-state: paused; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- *
   Industries — light, tabbed
 * ---------------------------------------------------------------- */
.industries {
  background: var(--light);
  color: var(--ink);
  padding: 115px var(--pad) 122px;
  display: flex;
  flex-direction: column;
  gap: 84px;
}
.industries__head { display: flex; flex-direction: column; gap: 42px; }
.industries__head .section-head { padding-left: 31px; }

.industries__body {
  display: grid;
  grid-template-columns: minmax(0, 560fr) minmax(0, 588fr);
  gap: 52px;
  align-items: start;
}

.industry-panels { position: relative; }
.industry-card {
  position: relative;
  height: 408px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 135px 241px 31px 31px;
  background: var(--dark);
}
.industry-card[hidden] { display: none; }
.industry-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.industry-card:hover .industry-card__img { transform: scale(1.05); }
.industry-card__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .12) 46%, rgba(0, 0, 0, 0) 72%);
  pointer-events: none;
}
.industry-card__body { position: relative; z-index: 2; width: 276px; max-width: 100%; display: flex; flex-direction: column; gap: 9px; }
.industry-card__number {
  font-size: 60px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.06em;     /* 3.6 / 60 */
  color: var(--accent);
}
.industry-card__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 26px;
  letter-spacing: -0.03em;
  color: #fff;
  margin-top: 8px;
}
.industry-card__text {
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.03em;
  color: var(--paper-60);
}
/* content fades in when a tab is switched */
.industry-card.is-entering .industry-card__body { animation: panel-in .5s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.industry-list { min-width: 0; }
.industry-list__item {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  height: 68px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-family: inherit;
  transition: padding-left .3s var(--ease);
}
.industry-list__item:first-child { border-top: 1px solid var(--line-soft); }
.industry-list__num {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: normal;
  color: var(--ink-muted);
  transition: color .3s var(--ease);
}
.industry-list__label {
  font-size: clamp(17px, 1.667vw, 24px);
  font-weight: 500;
  line-height: 27px;
  letter-spacing: -0.03em;
  color: var(--ink);
  transition: color .3s var(--ease);
}
.industry-list__item[aria-selected='true'] { gap: 27px; }
.industry-list__item[aria-selected='true'] .industry-list__num,
.industry-list__item[aria-selected='true'] .industry-list__label { color: var(--accent); }
.industry-list__item.is-clickable { cursor: pointer; }
.industry-list__item.is-clickable:hover { padding-left: 6px; }
.industry-list__item.is-clickable:hover .industry-list__label { color: var(--accent); }

/* ---------------------------------------------------------------- *
   Products — dark, tabbed
 * ---------------------------------------------------------------- */
.products {
  position: relative;
  background: var(--dark);
  padding: 115px var(--pad) 117px;
}
.products__head { display: flex; flex-direction: column; gap: 43px; }
.products__head .section-head { padding-left: 31px; }
.products__head .section-head__intro { color: var(--paper-40); }
.products__head .section-title { color: #fff; }

.products__body {
  position: relative;
  margin-top: 124px;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr) minmax(240px, 279px);
  gap: 61px;
  align-items: start;
}

/* Vertical rail: hairline with a sliding orange marker */
.product-rail {
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
}
.product-rail__line { position: absolute; left: 2px; top: 0; width: 1px; height: 100%; background: var(--line); }
.product-rail__thumb {
  position: absolute;
  left: 0;
  width: 5px;
  background: var(--accent);
  transition: top .45s var(--ease), height .45s var(--ease);
}

.product-list {
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 43px;
  min-height: 663px;
}
.product-list__item {
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 19px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.03em;
  color: var(--paper-50);
  transition: color .3s var(--ease), transform .3s var(--ease);
}
.product-list__item:first-child { min-height: 70px; display: flex; flex-direction: column; justify-content: flex-end; }
.product-list__item[aria-selected='true'] { color: #fff; }
.product-list__item.is-clickable { cursor: pointer; }
.product-list__item.is-clickable:hover { color: #fff; transform: translateX(5px); }

.product-panel {
  position: relative;
  min-height: 663px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 51px;
}
.product-panel__counter {
  position: absolute;
  left: 31px;
  top: 24px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: normal;
  color: #fff;
  white-space: nowrap;
}
.product-panel__counter b { font-weight: 500; color: var(--accent); }
.product-panel__stage { width: 485px; max-width: 100%; aspect-ratio: 1; position: relative; }
.product-panel__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .8s var(--ease);
}
.product-panel__img[hidden] { display: none; }
.product-panel:hover .product-panel__img { transform: scale(1.03); }
.product-panel.is-entering .product-panel__img { animation: product-in .55s var(--ease); }
@keyframes product-in { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }

.product-detail-wrap { min-width: 0; }

.product-detail {
  min-height: 663px;
  padding: 25px 0;
  display: flex;
  flex-direction: column;
  gap: 60px;
}
.product-detail[hidden] { display: none; }
.product-detail.is-entering { animation: panel-in .55s var(--ease); }
.product-detail__head { display: flex; flex-direction: column; gap: 15px; }
.product-detail__title {
  font-size: 28px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.product-detail__text {
  max-width: 243px;
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.03em;
  color: var(--paper-40);
}
.product-detail__body { display: flex; flex-direction: column; gap: 40px; }
.product-features { display: flex; flex-direction: column; gap: 29px; }
.product-features li {
  position: relative;
  min-height: 29px;
  padding-left: 33px;
  font-size: 16px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.03em;
  color: #fff;
}
.product-features li span {
  position: absolute;
  left: 0;
  top: -9px;
  color: var(--accent);
}
.product-detail__cta { width: 215px; }

/* ---------------------------------------------------------------- *
   Services — light, six cards, hover flip
 * ---------------------------------------------------------------- */
.services {
  background: var(--light);
  color: var(--ink);
  padding: 122px var(--pad) 134px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.services__head { display: flex; flex-direction: column; gap: 43px; }
.services__head .section-head { padding-left: 31px; }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px 20px;
}

.service-card {
  position: relative;
  aspect-ratio: 386.67 / 240.25;
  min-height: 200px;
  perspective: 1400px;
}
.service-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .7s var(--ease);
}
.service-card.can-flip:hover .service-card__inner,
.service-card.can-flip:focus-within .service-card__inner { transform: rotateY(180deg); }

.service-card__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--dark);
}
.service-card__face--back {
  transform: rotateY(180deg);
  background: var(--dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 28px 31px;
  border: 1px solid var(--line);
}
.service-card--accent .service-card__face--front,
.service-card--accent .service-card__face--back { background: var(--accent); }
.service-card--accent .service-card__face--back { border-color: rgba(255, 255, 255, .35); }

.service-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.service-card:hover .service-card__img { transform: scale(1.06); }
.service-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .5) 100%);
}
.service-card__body {
  position: absolute;
  left: 31px;
  top: 22.5px;
  right: 31px;
  bottom: 27px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.service-card__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 26px;
  letter-spacing: -0.03em;
  color: #fff;
}
.service-card--accent .service-card__pattern {
  position: absolute;
  left: 43%;
  top: 38.5%;
  width: 221px;
  max-width: 60%;
  height: 148px;
  object-fit: cover;
  object-position: left top;
  pointer-events: none;
}
.service-card__group { display: flex; flex-direction: column; gap: 12px; max-width: 209px; }
.service-card__text {
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.03em;
  color: #fff;
}
.service-card__icon { flex: 0 0 auto; width: 47px; height: 60px; }
.service-card__icon img { width: 47px; height: 60px; }
.service-card__back-title {
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.service-card--accent .service-card__back-title { color: #fff; }
.service-card__back-text {
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.03em;
  color: var(--paper-60);
}
.service-card--accent .service-card__back-text { color: rgba(255, 255, 255, .88); }
/* A hint that the card has a back side */
.service-card.can-flip .service-card__face--front::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(242, 89, 48, .6);
  animation: dot-pulse 2.4s ease-out infinite;
}
.service-card--accent.can-flip .service-card__face--front::after { background: #fff; }
@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(242, 89, 48, .55); }
  70%  { box-shadow: 0 0 0 11px rgba(242, 89, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 89, 48, 0); }
}

/* ---------------------------------------------------------------- *
   Why Gratia — dark, four facts, hover flip
 * ---------------------------------------------------------------- */
.why {
  position: relative;
  background: var(--dark);
  padding: 115px var(--pad) 0;
  min-height: 843px;
  overflow: hidden;
}
.why__decor {
  position: absolute;
  right: -71px;
  top: -225px;
  width: 528px;
  height: 543px;
  object-fit: cover;
  opacity: .9;
  pointer-events: none;
  animation: decor-drift 26s ease-in-out infinite alternate;
}
@keyframes decor-drift { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(26px) rotate(7deg); } }

.why__inner { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 86px; }
.why__head { display: flex; flex-direction: column; gap: 44px; }
.why__head .section-title { color: #fff; margin-left: 31px; }

.why__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.fact { position: relative; min-height: 360px; perspective: 1400px; }
.fact__inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  transform-style: preserve-3d;
  transition: transform .7s var(--ease);
}
.fact.can-flip:hover .fact__inner,
.fact.can-flip:focus-within .fact__inner { transform: rotateY(180deg); }

.fact__face {
  position: absolute;
  inset: 0;
  padding: 28px 31px 33px 28px;
  display: flex;
  flex-direction: column;
  gap: 63px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.fact__face--back {
  transform: rotateY(180deg);
  gap: 12px;
  justify-content: center;
  background: var(--dark);
  border: 1px solid var(--line);
}
.fact--highlight .fact__face--front,
.fact--highlight .fact__face--back { background: var(--accent); }
.fact--highlight .fact__face--back { border-color: rgba(255, 255, 255, .35); }

.fact__number { position: relative; padding-top: 7px; color: var(--accent); flex: 0 0 auto; }
.fact--highlight .fact__number { color: #fff; }
.fact__kicker {
  position: absolute;
  left: 3px;
  top: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4em;      /* 4.8 / 12 */
  line-height: normal;
}
.fact__digits {
  display: block;
  font-size: 60px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.06em;
}
.fact__body { display: flex; flex-direction: column; gap: 12px; }
.fact__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 26px;
  letter-spacing: -0.03em;
  color: #fff;
}
.fact__text {
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: -0.03em;
  color: var(--paper-40);
}
.fact--highlight .fact__text { color: #fff; }
.fact__note {
  margin-top: 9px;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: -0.03em;
  color: var(--paper-40);
}
.fact--highlight .fact__note { color: rgba(255, 255, 255, .8); }
.fact__back-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.fact--highlight .fact__back-title { color: #fff; }
.fact__back-text {
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.03em;
  color: var(--paper-60);
}
.fact--highlight .fact__back-text { color: rgba(255, 255, 255, .9); }
.fact.can-flip .fact__face--front::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 22px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-pulse 2.4s ease-out infinite;
}
.fact--highlight.can-flip .fact__face--front::after { background: #fff; }

/* ---------------------------------------------------------------- *
   CTA banner
 * ---------------------------------------------------------------- */
.cta-banner {
  position: relative;
  min-height: 507px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 142px var(--pad);
  overflow: hidden;
  background: var(--dark);
}
.cta-banner__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-banner__body {
  position: relative;
  z-index: 2;
  width: 643px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 47px;
  text-align: center;
}
.cta-banner__text {
  font-size: clamp(18px, 1.667vw, 24px);
  font-weight: 500;
  line-height: 1.334;         /* 32 / 24 */
  color: #fff;
}
.cta-banner__button { width: 230px; }

/* ---------------------------------------------------------------- *
   Contact
 * ---------------------------------------------------------------- */
.contact {
  position: relative;
  min-height: 726px;
  padding: 115px var(--pad);
  background: rgba(0, 0, 0, .9);
  overflow: hidden;
}
.contact__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .07;
  mix-blend-mode: luminosity;
  transform: scaleY(-1);
  pointer-events: none;
}
.contact__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 519fr) minmax(0, 565fr);
  gap: 122px;
  align-items: start;
}
.contact__intro { display: flex; flex-direction: column; gap: 48px; }
.contact__title {
  max-width: 488px;
  margin-left: 31px;
  font-size: clamp(28px, 2.917vw, 42px);
  font-weight: 500;
  line-height: 1.0715;
  letter-spacing: -0.03em;
  color: #fff;
}
.contact__text {
  max-width: 488px;
  margin-left: 31px;
  margin-top: 36px;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.03em;
  color: var(--paper-40);
}
.contact__actions {
  width: 291px;
  max-width: 100%;
  margin-left: 31px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__form { display: flex; flex-direction: column; gap: 30px; }
.form-grid { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; gap: 25px; }
.form-field { display: flex; flex-direction: column; gap: 9px; flex: 1 1 0; min-width: 0; }
.form-field--full { flex: 1 1 100%; }
.form-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: normal;
  color: var(--paper-40);
}
.form-label .req { color: var(--accent); }

.form-control {
  width: 100%;
  height: 40px;
  padding: 10px 17px 11px 16px;
  background: var(--line);
  border: 1px solid transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: normal;
  border-radius: 0;
  transition: border-color .22s var(--ease), background-color .22s var(--ease);
}
.form-control::placeholder { color: var(--paper-40); }
.form-control:hover { background: #45454a; }
.form-control:focus { border-color: var(--accent); background: #45454a; outline: none; }
.form-control[aria-invalid='true'] { border-color: #ff6b4a; }

textarea.form-control { height: 124px; padding-top: 12px; resize: vertical; }

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url('../img/select-caret-down.svg');
  background-repeat: no-repeat;
  background-position: right 17px center;
  background-size: 16px 8px;
  padding-right: 45px;
  color: var(--paper-40);
  cursor: pointer;
}
select.form-control.has-value { color: #fff; }
select.form-control option { background: var(--dark); color: #fff; }

.form-alert {
  padding: 14px 16px;
  font-size: 14px;
  line-height: 20px;
  border-left: 3px solid var(--accent);
  background: rgba(242, 89, 48, .12);
  color: #fff;
  animation: panel-in .4s var(--ease);
}
.form-alert--ok { border-left-color: #37b26a; background: rgba(55, 178, 106, .12); }
.form-error { font-size: 12px; line-height: 16px; color: #ff8a6d; }

/* Honeypot — never shown to a human */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- *
   Footer
 * ---------------------------------------------------------------- */
.site-footer {
  background: var(--light);
  color: var(--ink);
  padding: 42px var(--pad) 33px;
}
.site-footer__inner { display: flex; flex-direction: column; gap: 38px; }
.site-footer__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.site-footer__brand { width: 266px; max-width: 100%; display: flex; flex-direction: column; gap: 43px; }
.site-footer__logo { width: 234px; height: 69px; object-fit: contain; }
.site-footer__about {
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.site-footer__col { width: 181px; flex: 0 0 auto; }
.site-footer__heading {
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: 0.2em;      /* 2.4 / 12 */
  color: var(--accent);
  margin-bottom: 28px;
}
.site-footer__list { display: flex; flex-direction: column; gap: 11px; }
.site-footer__list a, .site-footer__list span {
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--ink);
  transition: color .22s var(--ease);
}
.site-footer__list a:hover { color: var(--accent); }
.site-footer__inline { display: inline-flex; align-items: center; gap: 10px; color: var(--accent) !important; }
.site-footer__inline img { width: 14px; transition: transform .3s var(--ease); }
.site-footer__inline:hover img { transform: translateX(4px); }

.site-footer__divider { height: 1px; background: var(--ink-muted); opacity: .55; }
.site-footer__meta { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 23px 0; }
.site-footer__disclaimer {
  max-width: 326px;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: -0.03em;
  color: var(--ink-muted);
}
.site-footer__top-link { display: inline-flex; align-items: center; gap: 23px; }
.site-footer__top-link span { font-size: 12px; font-weight: 500; line-height: 18px; color: var(--ink-muted); }
.site-footer__top-link img { width: 28px; height: 28px; transition: transform .3s var(--ease); }
.site-footer__top-link:hover img { transform: translateY(-4px); }

.site-footer__legal {
  display: flex;
  align-items: center;
  gap: 51px;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0.1em;      /* 1.2 / 12 */
  color: var(--ink-muted);
  flex-wrap: wrap;
}
.site-footer__legal a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- *
   Video popup
 * ---------------------------------------------------------------- */
.videomodal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 64px);
}
.videomodal.is-open { display: flex; }
.videomodal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, .88);
  backdrop-filter: blur(6px);
  animation: fade-in .3s var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.videomodal__frame {
  position: relative;
  width: min(1120px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  animation: modal-in .42s var(--ease);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.videomodal__frame > iframe,
.videomodal__frame > video { width: 100%; height: 100%; border: 0; background: #000; }

.videomodal__close {
  position: absolute;
  top: -46px;
  right: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  transition: background-color .22s var(--ease), transform .22s var(--ease);
}
.videomodal__close:hover { background: var(--accent-dark); transform: rotate(90deg); }

body.is-locked { overflow: hidden; }

/* ================================================================== *
   Responsive
 * ================================================================== */

@media (max-width: 1279px) {
  .section-head { gap: 40px; }
  .products__body { grid-template-columns: 210px minmax(0, 1fr); gap: 40px; }
  .product-detail-wrap { grid-column: 1 / -1; }
  .product-detail { min-height: 0; padding-top: 0; }
  .product-detail__text { max-width: none; }
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact__inner { gap: 56px; }
}

@media (max-width: 1023px) {
  .site-header { height: 120px; }
  .site-header__scrim { height: 120px; }
  .site-header__logo, .site-header__logo img { width: 164px; height: 48px; }
  .nav-toggle { display: flex; }
  .site-header__cta { display: none; }
  .site-header.is-stuck .site-header__logo,
  .site-header.is-stuck .site-header__logo img { width: 140px; height: 41px; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad) 24px;
    background: rgba(28, 28, 28, .98);
    border-top: 1px solid var(--line);
    font-size: 14px;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .site-nav__cta { display: block; margin-top: 16px; }
  .site-nav .btn { width: 100%; }

  .hero { height: auto; min-height: 640px; padding: 210px 0 72px; }
  .hero__content { position: static; gap: 40px; }
  .hero__scrim { height: 62%; }
  .hero__play { position: static; margin: 0 auto 48px; transform: none; width: 76px; height: 76px; }
  .hero__play:hover { transform: scale(1.07); }
  .hero__play img { width: 76px; height: 76px; }
  .hero__title { line-height: 1.05; }

  .section-head { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .section-head__title, .section-head__intro { max-width: none; }

  .industries { padding-block: 72px; gap: 48px; }
  .industries__head .section-head,
  .products__head .section-head,
  .services__head .section-head { padding-left: 0; }
  .industries__body { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .industry-card { height: 340px; padding: 120px 31px 31px; }

  .products { padding-block: 72px; }
  .products__body { margin-top: 48px; grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .product-rail { display: none; }
  .product-list {
    padding-left: 20px;
    border-left: 1px solid var(--line);
    gap: 24px;
    min-height: 0;
  }
  .product-list__item:first-child { min-height: 0; }
  .product-panel { min-height: 0; padding: 48px 24px; }
  .product-panel__stage { width: 100%; max-width: 420px; }
  .product-detail { min-height: 0; padding: 0; gap: 40px; }

  .services { padding-block: 72px; gap: 40px; }
  .why { padding-block: 72px; min-height: 0; }
  .why__inner { gap: 48px; }
  .why__head .section-title { margin-left: 0; }
  .why__decor { display: none; }
  .why__facts { border-top: 0; }
  .fact, .fact__inner { min-height: 330px; }
  .fact__face { border-top: 1px solid var(--line); padding-left: 0; padding-right: 20px; }
  .fact--highlight .fact__face { padding-left: 20px; border-top-color: transparent; }
  .fact__face--back { padding-left: 20px; border: 1px solid var(--line); }

  .cta-banner { padding-block: 88px; min-height: 0; }

  .contact { padding-block: 72px; min-height: 0; }
  .contact__inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .contact__title, .contact__text, .contact__actions { margin-left: 0; max-width: none; }
  .contact__actions { width: 100%; }

  .site-footer { padding-block: 48px 33px; }
  .site-footer__top { flex-direction: column; align-items: flex-start; gap: 40px; }
  .site-footer__meta { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 767px) {
  .hero { min-height: 560px; padding: 168px 0 56px; }
  .hero__content { gap: 32px; }
  .hero__cta, .cta-banner__button, .product-detail__cta { width: 100%; max-width: 320px; }
  .btn { gap: 20px; }
  .ticker { height: auto; min-height: 64px; }
  .ticker::before, .ticker::after { width: 32px; }

  .industry-card { height: 300px; padding: 90px 24px 24px; }
  .industry-card__number { font-size: 44px; }
  .industry-card__body { width: 100%; }
  .industry-list__item { height: auto; padding: 16px 0; align-items: flex-start; }

  .services__grid { grid-template-columns: minmax(0, 1fr); }
  .service-card { aspect-ratio: auto; height: 220px; }

  .why__facts { grid-template-columns: minmax(0, 1fr); }
  .fact, .fact__inner { min-height: 300px; }

  .site-footer__legal { gap: 16px 24px; }
  .videomodal__close { top: auto; bottom: -46px; right: 50%; transform: translateX(50%); }
  .videomodal__close:hover { transform: translateX(50%) rotate(90deg); }
}

@media (max-width: 519px) {
  .form-row { flex-direction: column; gap: 12px; }
  .site-header__logo, .site-header__logo img { width: 140px; height: 41px; }
}

@media print {
  .site-header, .nav-toggle, .hero__play, .cta-banner__button, .videomodal { display: none !important; }
  body { background: #fff; color: #000; }
  .js-reveal [data-reveal] { opacity: 1 !important; transform: none !important; }
}
