/* Aristos website styles
   Rules: one typeface (Manrope), Tailwind type scale only, spacing tokens only,
   Tailwind radii only, flat backgrounds, no shadows, no movement on hover.
   Motion curve: cubic-bezier(0.22, 1, 0.36, 1). */
:root {
  /* Light surfaces */
  --bg: #F3F4F0;
  --paper: #FAFAF7;
  --soft: #E9ECE6;
  --line: #DADED8;
  --line-strong: #BFC5BF;
  /* Text */
  --ink: #141614;
  --ink-2: #353936;
  --muted: #4B504C;
  --muted-2: #5B615D;
  /* Brand */
  --green: #1DB08D;
  --green-text: #0B7A60;
  --green-dark: #085C48;
  /* Brand green fields (replace dark surfaces). White text passes AA on all three. */
  --dark: #0A7D61;        /* bright Aristos green field */
  --dark-2: #086B53;      /* cards on the green field */
  --dark-3: #075C48;      /* hover on green, footer */
  --dark-line: #2E9479;
  --on-dark: #FAFAF7;     /* labels and links on green */
  --dark-muted: #E4F4EE;  /* body text on green */
  /* Spacing tokens */
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;
  /* Radii (Tailwind) */
  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px;
  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1240px;
  --header-h: 64px;
  --font: "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s-400)); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 24px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
a { color: var(--green-text); text-decoration: none; transition: color 300ms var(--ease); }
a:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--green-text); outline-offset: 2px; border-radius: var(--r-md); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--s-400); }
.skip-link { position: absolute; left: -9999px; top: var(--s-75); background: var(--ink); color: var(--paper); padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); z-index: 100; }
.skip-link:focus { left: var(--s-200); color: var(--paper); }

/* ================= Named text styles ================= */
.heading-1 { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.03em; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.025em; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.02em; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-1 { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-2 { font-size: 16px; line-height: 24px; font-weight: 500; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-4 { font-size: 14px; line-height: 20px; font-weight: 600; }
.body-5 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; }
.muted { color: var(--muted); }

/* Hero headings: the one place a gradient is used, on text only */
.hero h1, .slide-title, .page-hero .heading-1, .notfound .heading-1 {
  background: linear-gradient(90deg, #000000, #666666);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  max-width: 680px;
  /* Room for descenders (g, p, y) and accents, which background-clip would cut off */
  padding: var(--s-50) 0 var(--s-75);
  margin: calc(var(--s-50) * -1) 0 calc(var(--s-75) * -1);
}
.hero-sub { max-width: 680px; color: var(--muted); }

/* Small reusable pieces */
.eyebrow { color: var(--green-text); }
.eyebrow.light, .on-dark .eyebrow { color: var(--on-dark); }
.label { color: var(--green-text); }
.text-link { color: var(--green-text); }
.text-link.light { color: var(--on-dark); }
.text-link.light:hover { color: var(--paper); }
.note { color: var(--muted-2); }
.tag-new { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--paper); background: var(--green-text); border-radius: var(--r-md); padding: var(--s-25) var(--s-75); margin-left: var(--s-75); vertical-align: 2px; }
.ico { width: 16px; height: 16px; flex-shrink: 0; }

/* Buttons: 8px by 12px padding, Button-md */
.btn { display: inline-flex; align-items: center; gap: var(--s-75); padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); font-size: 16px; line-height: 24px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; transition: background-color 300ms var(--ease), border-color 300ms var(--ease), color 300ms var(--ease); }
.btn:hover { text-decoration: none; }
.btn:active, .arrow:active, .topic:active, .chat-chips button:active { transform: scale(0.98); }
.btn-primary { background: var(--green-text); color: var(--paper); }
.btn-primary:hover { background: var(--green-dark); color: var(--paper); }
.btn-outline { color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); background: var(--soft); }
.btn-dark { background: var(--ink); color: var(--paper); font-size: 14px; line-height: 20px; }
.btn-dark:hover { background: var(--dark-3); color: var(--paper); }
.btn-green { background: var(--green); color: #0A1A14; }
.btn-green:hover { background: #3BC09F; color: #0A1A14; }

/* ================= Header: floating, solid, compact ================= */
.site-header { position: sticky; top: var(--s-100); z-index: 50; padding: 0 var(--s-400); margin-top: var(--s-100); }
.header-bar { position: relative; max-width: calc(var(--max) - 64px); margin: 0 auto; height: var(--header-h); display: flex; align-items: center; gap: var(--s-500); padding: 0 var(--s-75) 0 var(--s-300); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-2xl); }
.nav-logo img { height: 32px; width: auto; }
.main-nav { flex: 1; height: 100%; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; height: 100%; gap: var(--s-50); }
.nav-item { display: flex; align-items: center; }
.nav-trigger, .nav-link { display: flex; align-items: center; gap: var(--s-50); padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.nav-link:hover { text-decoration: none; }
.nav-trigger:hover, .nav-link:hover, .nav-trigger[aria-expanded="true"] { background: var(--soft); color: var(--ink); }
.nav-trigger.is-current, .nav-link.is-current { color: var(--green-text); }
.chev { width: 14px; height: 14px; transition: transform 500ms var(--ease); }
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-mobile-only { display: none; }

.mega { position: absolute; left: 0; right: 0; top: calc(100% + var(--s-75)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-2xl); display: none; }
.nav-trigger[aria-expanded="true"] + .mega { display: block; animation: fadeIn 300ms var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.mega-inner { display: flex; gap: var(--s-600); padding: var(--s-300); }
.mega .container { padding: 0; max-width: none; }
.mega-col { flex: 2; display: flex; flex-direction: column; gap: var(--s-100); }
.mega-head { color: var(--muted-2); padding-left: var(--s-100); }
.mega-links { display: grid; gap: var(--s-50); }
.mega-links.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-200); }
.mega-links a { display: flex; flex-direction: column; gap: var(--s-25); padding: var(--s-100); border-radius: var(--r-xl); color: var(--ink); transition: background-color 300ms var(--ease); }
.mega-links a:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.mega-links strong { font-size: 16px; line-height: 24px; font-weight: 500; }
.mega-links span { font-size: 14px; line-height: 20px; color: var(--muted-2); }
.mega-links a.has-ico { flex-direction: row; align-items: center; gap: var(--s-100); }
.mega-links a.has-ico > div { display: flex; flex-direction: column; gap: var(--s-25); }
.mega-ico { width: 40px; height: 40px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--paper); padding: var(--s-75); object-fit: contain; flex-shrink: 0; }
.mega-promo { flex: 1; max-width: 360px; border-radius: var(--r-xl); background: var(--dark); padding: var(--s-300); display: flex; flex-direction: column; gap: var(--s-100); color: var(--paper); transition: background-color 300ms var(--ease); }
.mega-promo:hover { color: var(--paper); text-decoration: none; background: var(--dark-3); }
.mega-promo strong { font-size: 20px; line-height: 28px; font-weight: 600; flex-grow: 1; }
.mega-promo .more, .promo-label { color: var(--on-dark); }

.header-utils { display: flex; align-items: center; gap: var(--s-75); }
.util-link { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); }
.util-link:hover { color: var(--ink); background: var(--soft); text-decoration: none; }
.menu-toggle { display: none; width: 40px; height: 40px; border-radius: var(--r-lg); position: relative; }
.menu-toggle span { position: absolute; left: 12px; width: 16px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 500ms var(--ease), opacity 300ms var(--ease); }
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { display: none; }
.menu-toggle span:nth-child(3) { top: 23px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

/* ================= Hero ================= */
.hero { padding: var(--s-900) 0 var(--s-400); }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-700); }
.slides { flex: 999 1 520px; min-width: 0; display: grid; }
.slide { grid-area: 1 / 1; }
.slide[hidden] { display: block; visibility: hidden; opacity: 0; }
.slide.is-active { animation: fadeIn 500ms var(--ease) both; }
.slide-text { display: flex; flex-direction: column; gap: var(--s-300); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-100); padding-top: var(--s-75); }

/* Portfolio board: the Aristos mark and the five product logos */
.board { flex: 1 1 360px; min-width: 0; max-width: 448px; margin-left: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-75); background: var(--soft); border-radius: var(--r-3xl); padding: var(--s-75); }
.board-tile { aspect-ratio: 1 / 1; background: var(--paper); border-radius: var(--r-2xl); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-75); color: var(--ink); font-size: 12px; line-height: 16px; font-weight: 600; border: 1px solid transparent; transition: border-color 300ms var(--ease); }
.board-tile:hover { text-decoration: none; color: var(--ink); border-color: var(--green-text); }
.board-tile img { width: 40%; height: auto; }
.board-main { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; background: var(--dark); color: var(--paper); align-items: flex-start; justify-content: space-between; padding: var(--s-300); }
.board-main:hover { color: var(--paper); }
.board-main img { width: 40%; }
.board-main span { font-size: 20px; line-height: 28px; font-weight: 600; }

.hero-controls { display: flex; justify-content: space-between; align-items: center; padding-top: var(--s-500); }
.dots { display: flex; gap: var(--s-75); }
.dot-btn { width: 24px; height: 40px; position: relative; }
.dot-btn::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 2px; border-radius: 2px; background: var(--line-strong); }
.dot-btn.is-active::before { background: var(--green-text); }
.arrows { display: flex; gap: var(--s-75); }
.arrow { width: 40px; height: 40px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; color: var(--ink); transition: background-color 300ms var(--ease), border-color 300ms var(--ease); }
.arrow:hover { border-color: var(--ink); background: var(--soft); }
.arrow svg { width: 16px; height: 16px; }
.pause .i-play { display: none; }
.pause.is-paused .i-pause { display: none; }
.pause.is-paused .i-play { display: block; }

/* ================= Sections ================= */
.section { padding-top: var(--s-900); padding-bottom: var(--s-900); }
.section-head { display: flex; flex-direction: column; gap: var(--s-100); margin-bottom: var(--s-500); }
.section-head.row { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-200); }
.section-head.row > div { display: flex; flex-direction: column; gap: var(--s-100); max-width: 680px; }
.band { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.on-dark { background: var(--dark); color: var(--paper); }
.on-dark .muted, .on-dark p { color: var(--dark-muted); }

/* Intro + facts */
.intro { display: flex; flex-direction: column; gap: var(--s-400); }
.intro-big { color: var(--muted-2); max-width: 1000px; }
.intro-big .hl { color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-300); padding-top: var(--s-400); border-top: 1px solid var(--line); }
.fact { display: flex; flex-direction: column; gap: var(--s-50); }
.fact span { color: var(--muted-2); }

/* Rows: heading left, text right */
.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.row-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-300); padding: var(--s-300) 0; border-bottom: 1px solid var(--line); }
.row-item p { color: var(--muted); }

/* Products grid (home) */
.product-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--s-200); }
.product { border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-300); display: flex; flex-direction: column; gap: var(--s-200); color: var(--ink); background: var(--paper); min-height: 240px; transition: border-color 300ms var(--ease), background-color 300ms var(--ease); }
.product:hover { border-color: var(--green-text); color: var(--ink); text-decoration: none; }
.product p { color: var(--muted-2); flex-grow: 1; }
.product .more { color: var(--green-text); }
.product-feature { grid-row: span 2; background: var(--dark); color: var(--paper); border-color: var(--dark); }
.product-feature:hover { color: var(--paper); background: var(--dark-2); border-color: var(--dark-line); }
.product-feature .label, .product-feature .more { color: var(--on-dark); }
.product-feature p { color: var(--dark-muted); }
.product-icon { width: 48px; height: 48px; border-radius: var(--r-xl); display: flex; align-items: center; justify-content: center; background: var(--paper); border: 1px solid var(--line); padding: var(--s-75); flex-shrink: 0; }
.product-icon img { width: 100%; height: 100%; object-fit: contain; }
.product-feature .product-icon { border-color: transparent; }

/* Capabilities (dark): four bordered boxes, 2 by 2 */
.cap-inner { display: flex; flex-wrap: wrap; gap: var(--s-700); }
.cap-intro { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-300); align-items: flex-start; }
.cap-grid { flex: 1.4 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-100); }
.cap { padding: var(--s-300); display: flex; flex-direction: column; gap: var(--s-75); border: 1px solid var(--dark-line); border-radius: var(--r-2xl); background: var(--dark-2); color: var(--paper); transition: background-color 300ms var(--ease); }
a.cap:hover { color: var(--paper); text-decoration: none; background: var(--dark-3); }
.cap p { color: var(--dark-muted); }

/* Work list (home) */
.work-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.work-row { display: grid; grid-template-columns: 64px minmax(0, 1.3fr) minmax(0, 1.4fr) auto; gap: var(--s-300); align-items: center; padding: var(--s-300) 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.work-row:hover { color: var(--ink); text-decoration: none; }
.work-row:hover .heading-6 { color: var(--green-text); }
.work-row .product-icon { width: 64px; height: 64px; padding: var(--s-100); }
.work-row p { color: var(--muted); }
.work-row .heading-6 { transition: color 300ms var(--ease); margin-top: var(--s-50); }

/* Games band + video */
.games { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-600); }
.games-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-300); align-items: flex-start; }
.video-facade { flex: 1.2 1 460px; min-width: 0; aspect-ratio: 16 / 9; border-radius: var(--r-2xl); overflow: hidden; position: relative; background: #000000; border: 1px solid var(--dark-line); }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #0A1A14; display: flex; align-items: center; justify-content: center; transition: background-color 300ms var(--ease); }
.video-facade .play:hover { background: #3BC09F; }
.video-facade .play svg { width: 24px; height: 24px; margin-left: var(--s-50); }

/* Technologies */
.tech { display: flex; flex-direction: column; gap: var(--s-300); align-items: flex-start; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-75); }
.chips li { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-75) var(--s-100); font-size: 14px; line-height: 20px; font-weight: 500; background: var(--paper); }
.stack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-400); width: 100%; }
.stack-grid .heading-6 { margin-bottom: var(--s-100); }

/* Tagline reveal */
.tagline { display: flex; flex-direction: column; gap: var(--s-300); align-items: center; text-align: center; }
.tagline img { width: 48px; height: 48px; }
.tagline-text { max-width: 900px; color: var(--ink); }
.tagline-text .w { opacity: 0.3; transition: opacity 500ms var(--ease); }
.tagline-text .w.on { opacity: 1; }

/* Careers + contact pair */
.cta-pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-200); }
.cta-card { border-radius: var(--r-3xl); overflow: hidden; display: flex; }
.cta-careers { border: 1px solid var(--line); background: var(--paper); }
.cta-photo { flex: 1 1 45%; min-height: 320px; position: relative; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.cta-photo-mark { width: 80px; height: 80px; }
.cta-body { flex: 1 1 55%; padding: var(--s-500); display: flex; flex-direction: column; gap: var(--s-200); align-items: flex-start; justify-content: center; }
.cta-body p { color: var(--muted); }
.cta-contact { background: var(--dark); color: var(--paper); }
.cta-contact p { color: var(--dark-muted); }

/* Optional photos sit over a designed fallback */
.prod-visual img[data-optional], .case-visual img[data-optional], .cta-photo img[data-optional] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }

/* ================= Inner pages ================= */
.page-hero { padding: var(--s-900) 0 var(--s-700); }
.page-hero .container { display: flex; flex-direction: column; gap: var(--s-300); align-items: flex-start; }
.jump { display: flex; flex-wrap: wrap; gap: var(--s-75); padding-top: var(--s-75); }
.jump a { border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: var(--s-75) var(--s-100); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); transition: background-color 300ms var(--ease), border-color 300ms var(--ease); }
.jump a:hover { border-color: var(--ink); background: var(--soft); text-decoration: none; }

/* Product sections */
.prod { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-700); }
.prod.reverse { flex-direction: row-reverse; }
.prod-text { flex: 1.2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-300); align-items: flex-start; }
.prod-head { display: flex; align-items: center; gap: var(--s-200); }
.prod-head > div { display: flex; flex-direction: column; gap: var(--s-50); }
.points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-100); }
.points li { position: relative; padding-left: var(--s-300); color: var(--muted); }
.points li strong { color: var(--ink); font-weight: 600; }
.points li::before { content: ""; position: absolute; left: 0; top: 11px; width: 12px; height: 2px; background: var(--green-text); }
.mini-facts { display: flex; flex-wrap: wrap; gap: var(--s-400); padding: var(--s-75) 0; }
.mini-facts div { display: flex; flex-direction: column; gap: var(--s-25); }
.mini-facts strong { color: var(--green-text); }
.mini-facts span { color: var(--muted-2); max-width: 160px; }
.prod-visual, .case-visual { flex: 1 1 400px; min-width: 0; aspect-ratio: 4 / 3; border-radius: var(--r-3xl); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--soft); }
.band .prod-visual, .band .case-visual { background: var(--bg); border: 1px solid var(--line); }
.vis-logo { position: relative; width: clamp(120px, 34%, 192px); aspect-ratio: 1 / 1; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-3xl); display: flex; align-items: center; justify-content: center; padding: var(--s-400); }
.vis-logo img { width: 100%; height: 100%; object-fit: contain; }

/* Services */
.svc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-200); }
.svc { border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-400); display: flex; flex-direction: column; gap: var(--s-200); background: var(--paper); }
.svc p { color: var(--muted); }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-75); }
.pills li { background: var(--soft); border-radius: var(--r-md); padding: var(--s-50) var(--s-100); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.sector-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-200); }
.sector { border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-300); display: flex; flex-direction: column; gap: var(--s-75); background: var(--paper); }
.sector p { color: var(--muted); }
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-200); }
.process li { padding: var(--s-300); display: flex; flex-direction: column; gap: var(--s-75); border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--bg); }
.process span { color: var(--green-text); }
.process p { color: var(--muted); }

/* Case studies */
.case { display: flex; flex-wrap: wrap; gap: var(--s-600); align-items: flex-start; }
.case.reverse { flex-direction: row-reverse; }
.case-visual { flex: 1 1 340px; aspect-ratio: 4 / 5; position: sticky; top: calc(var(--header-h) + var(--s-500)); }
.case-body { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-200); align-items: flex-start; }
.case-client { color: var(--ink-2); }
.case-grid { display: flex; flex-direction: column; width: 100%; border-top: 1px solid var(--line); }
.case-grid > div { border-bottom: 1px solid var(--line); padding: var(--s-200) 0; display: grid; grid-template-columns: 176px 1fr; gap: var(--s-300); }
.case-grid p { color: var(--muted); }

/* About */
.founder { display: flex; flex-wrap: wrap; gap: var(--s-700); align-items: center; }
.founder-photo { flex: 0 0 176px; min-width: 0; }
.founder-photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.founder-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-200); align-items: flex-start; }
.founder-role { color: var(--green-text); }
.founder-text p { color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: var(--s-300); padding: var(--s-300) 0; border-bottom: 1px solid var(--line); }
.t-year { color: var(--green-text); }
.timeline p { color: var(--muted); margin-top: var(--s-50); }

/* Careers */
.roles { display: flex; flex-direction: column; gap: var(--s-100); }
.role { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2xl); }
.role summary { list-style: none; cursor: pointer; padding: var(--s-300); display: flex; justify-content: space-between; align-items: center; gap: var(--s-200); border-radius: var(--r-2xl); }
.role summary::-webkit-details-marker { display: none; }
.role-meta { color: var(--muted-2); margin-top: var(--s-50); }
.role-toggle { width: 32px; height: 32px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); position: relative; flex-shrink: 0; }
.role-toggle::before, .role-toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--ink); transform: translate(-50%, -50%); }
.role-toggle::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 500ms var(--ease); }
.role[open] .role-toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.role-body { padding: 0 var(--s-300) var(--s-300); display: flex; flex-direction: column; gap: var(--s-100); align-items: flex-start; }
.role-body > p { color: var(--muted); max-width: 760px; }
.role-body h4 { margin-top: var(--s-75); }
.role-general { margin-top: var(--s-300); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-200); padding: var(--s-300); border-radius: var(--r-2xl); border: 1px solid var(--line); }
.role-general p { color: var(--muted); margin-top: var(--s-50); }
.roles-note { margin-top: var(--s-300); }

/* Contact */
.contact-wrap { flex-direction: row !important; flex-wrap: wrap; gap: var(--s-600) !important; align-items: flex-start; }
.contact-intro { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-300); }
.contact-list { margin: var(--s-75) 0 0; display: grid; grid-template-columns: max-content 1fr; border-top: 1px solid var(--line); width: 100%; max-width: 520px; }
.contact-list dt, .contact-list dd { margin: 0; padding: var(--s-100) 0; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--muted-2); padding-right: var(--s-400); }
.contact-card { flex: 1 1 440px; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-3xl); padding: var(--s-400); display: flex; flex-direction: column; gap: var(--s-200); }
.contact-card > p { color: var(--muted); }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-75); }
.topic { text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-xl); padding: var(--s-200); display: flex; flex-direction: column; gap: var(--s-50); min-height: 96px; transition: border-color 300ms var(--ease), background-color 300ms var(--ease); }
.topic:hover { border-color: var(--green-text); background: var(--paper); }
.topic span { color: var(--muted-2); }

/* CTA wide, legal, 404 */
.cta-wide { margin-bottom: var(--s-900); padding: var(--s-600) var(--s-400); border-radius: var(--r-3xl); background: var(--dark); color: var(--paper); display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-100); max-width: calc(var(--max) - 64px); }
.cta-wide p { color: var(--dark-muted); }
.cta-wide .btn { margin-top: var(--s-75); }
.legal-page { max-width: 820px; padding-top: var(--s-900); padding-bottom: var(--s-900); }
.legal-page .heading-2 { margin: var(--s-100) 0 var(--s-75); }
.legal-date { color: var(--muted-2); margin-bottom: var(--s-300); }
.legal-page h2 { margin: var(--s-400) 0 var(--s-75); }
.legal-page p, .legal-page li { color: var(--muted); }
.legal-page p + p { margin-top: var(--s-75); }
.legal-page ul { padding-left: var(--s-300); }
.notfound { padding-top: var(--s-900); padding-bottom: var(--s-900); display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-200); }
.notfound .heading-1 { margin: 0 auto; }

/* ================= Footer ================= */
.site-footer { background: var(--dark); color: var(--dark-muted); margin-top: 0; }
.site-footer .container { padding-top: var(--s-800); padding-bottom: var(--s-500); display: flex; flex-direction: column; gap: var(--s-600); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-600); }
.footer-brand { display: flex; flex-direction: column; gap: var(--s-200); max-width: 320px; }
.footer-brand img { height: 32px; width: auto; align-self: flex-start; }
.footer-cols { display: flex; flex-wrap: wrap; gap: var(--s-700); }
.footer-col { display: flex; flex-direction: column; gap: var(--s-75); }
.footer-col h4 { color: var(--paper); margin-bottom: var(--s-50); }
.footer-col a, .legal a { color: var(--dark-muted); }
.footer-col a:hover, .legal a:hover { color: var(--paper); }
.footer-bottom { border-top: 1px solid var(--dark-line); padding-top: var(--s-300); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-100); }
.legal { display: flex; gap: var(--s-300); }

/* ================= Chat ================= */
.chat-launcher { position: fixed; right: var(--s-300); bottom: var(--s-300); z-index: 80; display: flex; align-items: center; gap: var(--s-75); padding: var(--s-75) var(--s-100) var(--s-75) var(--s-75); border-radius: var(--r-xl); background: var(--dark); color: var(--paper); font-size: 14px; line-height: 20px; font-weight: 600; transition: background-color 300ms var(--ease); }
.chat-launcher:hover { background: var(--dark-3); }
.chat-launcher .cl-avatar { width: 32px; height: 32px; border-radius: var(--r-md); background: var(--paper); display: flex; align-items: center; justify-content: center; }
.chat-launcher .cl-avatar img { width: 20px; height: 20px; }
.chat-launcher[hidden] { display: none; }
.chat-panel { position: fixed; right: var(--s-300); bottom: var(--s-300); z-index: 90; width: 384px; max-width: calc(100vw - 32px); height: min(624px, calc(100vh - 48px)); background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r-2xl); display: flex; flex-direction: column; overflow: hidden; animation: fadeIn 300ms var(--ease) both; }
.chat-panel[hidden] { display: none; }
.chat-head { background: var(--dark); color: var(--paper); padding: var(--s-200); display: flex; align-items: center; gap: var(--s-100); }
.chat-head .ch-avatar { width: 40px; height: 40px; border-radius: var(--r-lg); background: var(--paper); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-head .ch-avatar img { width: 24px; height: 24px; }
.chat-head .ch-title { flex: 1; display: flex; flex-direction: column; }
.chat-head .ch-title span { color: var(--dark-muted); }
.chat-head button { height: 32px; padding: 0 var(--s-75); border-radius: var(--r-md); color: var(--paper); border: 1px solid var(--dark-line); display: flex; align-items: center; justify-content: center; transition: background-color 300ms var(--ease); }
.chat-head button:hover { background: var(--dark-3); }
.chat-head .ch-close { width: 32px; padding: 0; }
.chat-head button svg { width: 16px; height: 16px; }
.chat-log { flex: 1; overflow-y: auto; padding: var(--s-300) var(--s-200); display: flex; flex-direction: column; gap: var(--s-75); background: var(--bg); }
.msg { max-width: 82%; padding: var(--s-75) var(--s-100); border-radius: var(--r-xl); font-size: 14px; line-height: 20px; white-space: pre-wrap; word-wrap: break-word; animation: fadeIn 300ms var(--ease) both; }
.msg.bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.msg.user { align-self: flex-end; background: var(--green-text); color: var(--paper); }
.msg a { color: inherit; text-decoration: underline; }
/* Loading: a skeleton shaped like the reply bubble */
.msg.skeleton { width: 60%; display: flex; flex-direction: column; gap: var(--s-75); padding: var(--s-100); }
.msg.skeleton i { display: block; height: 8px; border-radius: var(--r-md); background: var(--soft); animation: pulse 1200ms var(--ease) infinite; }
.msg.skeleton i:last-child { width: 60%; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.chat-chips { display: flex; flex-wrap: wrap; gap: var(--s-75); padding: 0 var(--s-200) var(--s-100); background: var(--bg); }
.chat-chips button { border: 1px solid var(--green-text); color: var(--green-text); background: var(--paper); border-radius: var(--r-lg); padding: var(--s-75) var(--s-100); font-size: 14px; line-height: 20px; font-weight: 600; transition: background-color 300ms var(--ease); }
.chat-chips button:hover { background: var(--soft); }
.chat-input { display: flex; gap: var(--s-75); padding: var(--s-100); border-top: 1px solid var(--line); background: var(--paper); }
.chat-input textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-75) var(--s-100); font: inherit; font-size: 16px; line-height: 24px; height: 42px; max-height: 120px; outline: none; background: var(--paper); color: var(--ink); caret-color: var(--green-text); overflow-y: hidden; scrollbar-width: thin; }
.chat-input textarea::placeholder { color: var(--muted-2); opacity: 1; }
.chat-input textarea::selection { background: var(--green-text); color: var(--paper); }
.chat-input textarea:focus { border-color: var(--green-text); }
.chat-input textarea:disabled { background: var(--bg); }
.chat-input button { height: 42px; padding: 0 var(--s-100); border-radius: var(--r-lg); background: var(--green-text); color: var(--paper); font-size: 14px; line-height: 20px; font-weight: 600; flex-shrink: 0; align-self: flex-end; transition: background-color 300ms var(--ease); }
.chat-input button:hover { background: var(--green-dark); }
.chat-input button:disabled { background: #C3C9C4; cursor: default; }
.chat-foot { font-size: 12px; line-height: 16px; color: var(--muted-2); text-align: center; padding: 0 var(--s-100) var(--s-75); background: var(--paper); }
.chat-foot a { color: var(--muted-2); text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================= Scroll reveal ================= */
.js-reveal .reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* ================= Responsive ================= */
@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-feature { grid-row: auto; grid-column: span 2; }
  .cta-pair { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack-grid, .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-row { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .work-row p { grid-column: 2 / -1; }
}

@media (max-width: 960px) {
  .header-bar { gap: var(--s-200); justify-content: space-between; }
  .util-link { display: none; }
  .menu-toggle { display: block; }
  .main-nav { position: fixed; inset: calc(var(--header-h) + var(--s-300)) 0 0 0; height: auto; background: var(--bg); overflow-y: auto; padding: var(--s-200) var(--s-400) var(--s-500); display: none; }
  .main-nav.is-open { display: block; }
  .nav-list { flex-direction: column; height: auto; gap: 0; }
  .nav-item { display: block; border-bottom: 1px solid var(--line); }
  .main-nav.is-open .nav-item { animation: navIn 500ms var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
  @keyframes navIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .nav-trigger, .nav-link { width: 100%; justify-content: space-between; padding: var(--s-200) 0; font-size: 18px; line-height: 28px; font-weight: 600; color: var(--ink); border-radius: 0; }
  .nav-trigger:hover, .nav-link:hover, .nav-trigger[aria-expanded="true"] { background: none; }
  .nav-mobile-only { display: block; }
  .mega { position: static; border: 0; background: none; }
  .nav-trigger[aria-expanded="true"] + .mega { animation: none; }
  .mega-inner { flex-direction: column; gap: var(--s-200); padding: 0 0 var(--s-200); }
  .mega-links.two-col { grid-template-columns: 1fr; }
  .mega-links a { padding-left: 0; }
  .mega-head { padding-left: 0; }
  .mega-promo { max-width: none; }
  .board { margin-left: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-list { grid-template-columns: 1fr; }
  .case-visual { position: relative; top: 0; aspect-ratio: 16 / 9; }
  .case-grid > div { grid-template-columns: 1fr; gap: var(--s-75); }
  .row-item { grid-template-columns: 1fr; gap: var(--s-75); }
  .heading-1 { font-size: 48px; line-height: 48px; }
  .heading-2 { font-size: 36px; line-height: 40px; }
}

@media (max-width: 640px) {
  .container { padding: 0 var(--s-200); }
  .site-header { padding: 0 var(--s-100); }
  .header-utils .btn-dark { display: none; }
  .main-nav { padding: var(--s-200) var(--s-200) var(--s-500); }
  .hero { padding-top: var(--s-600); }
  .hero-controls { padding-top: var(--s-400); }
  .page-hero { padding: var(--s-600) 0 var(--s-500); }
  .section { padding-top: var(--s-700); padding-bottom: var(--s-700); }
  .heading-1 { font-size: 36px; line-height: 40px; }
  .heading-2 { font-size: 30px; line-height: 36px; }
  .heading-3 { font-size: 30px; line-height: 36px; }
  .heading-4 { font-size: 24px; line-height: 32px; }
  .cap-grid, .product-grid, .process, .stack-grid, .sector-grid, .topic-grid { grid-template-columns: 1fr; }
  .product-feature { grid-column: auto; }
  .work-row { grid-template-columns: 48px minmax(0, 1fr); gap: var(--s-200); }
  .work-row .product-icon { width: 48px; height: 48px; padding: var(--s-75); }
  .work-row .more { grid-column: 2; }
  .timeline li { grid-template-columns: 64px 1fr; gap: var(--s-200); }
  .svc, .contact-card { padding: var(--s-300); }
  .cta-card { flex-direction: column; }
  .cta-photo { min-height: 200px; }
  .cta-body { padding: var(--s-300); }
  .cta-wide { margin-left: var(--s-200); margin-right: var(--s-200); padding: var(--s-500) var(--s-300); margin-bottom: var(--s-700); }
  .chat-launcher { right: var(--s-200); bottom: var(--s-200); }
  .chat-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js-reveal .reveal { opacity: 1; transform: none; }
  .tagline-text .w { opacity: 1; }
}
.cta-section { padding-top: 0; }
.cta-wide { margin-bottom: 0; }
.mega .container.mega-inner { padding: var(--s-300); max-width: none; }
@media (max-width: 960px) { .mega .container.mega-inner { padding: 0 0 var(--s-200); } }
.mega-links .tag-new { color: var(--paper); font-size: 12px; line-height: 16px; }

/* ================= Redesign pass ================= */
/* Buttons that sit on the green field */
.on-dark .btn-green, .cta-contact .btn-green, .cta-wide .btn-green, .mega-promo .btn-green { background: var(--paper); color: var(--green-dark); }
.on-dark .btn-green:hover, .cta-contact .btn-green:hover, .cta-wide .btn-green:hover { background: #E4F4EE; color: var(--green-dark); }
.on-dark .text-link, .on-dark a.text-link { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.on-dark .eyebrow, .cta-contact .eyebrow { color: var(--paper); opacity: 1; }
.site-footer { background: var(--dark-3); }
.site-footer .footer-col a, .site-footer .legal a { color: var(--dark-muted); }
.chat-launcher { background: var(--dark); }
.chat-launcher:hover { background: var(--dark-3); }
.chat-head { background: var(--dark); }
.chat-head button { border-color: var(--dark-line); }

/* CTA block: a proper inset card inside the page container */
.cta-wide { max-width: none; margin: 0; }
.cta-wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s-400); }
.cta-wide { padding: var(--s-800) var(--s-500); gap: var(--s-200); }

/* Section head with intro text on the right */
.section-head.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-600); align-items: end; }
.section-head.split > div { display: flex; flex-direction: column; gap: var(--s-100); }
.section-head.split p { color: var(--muted); max-width: 520px; }

/* Hero visual: green stage with the product logo board */
.hero-stage { flex: 1 1 400px; min-width: 0; max-width: 520px; margin-left: auto; position: relative; border-radius: var(--r-3xl); overflow: hidden; background: var(--dark); aspect-ratio: 1 / 1; display: flex; align-items: flex-end; padding: var(--s-300); }
.hero-stage > img[data-optional] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-stage .stage-mark { position: absolute; top: var(--s-400); left: var(--s-400); width: 96px; height: 96px; }
.hero-stage .stage-copy { position: absolute; top: var(--s-400); right: var(--s-400); left: 160px; color: var(--paper); text-align: right; }
.stage-logos { position: relative; width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-75); background: var(--paper); border-radius: var(--r-2xl); padding: var(--s-75); }
.stage-logos a { display: flex; flex-direction: column; align-items: center; gap: var(--s-50); padding: var(--s-100) var(--s-50); border-radius: var(--r-lg); color: var(--ink); text-align: center; transition: background-color 300ms var(--ease); }
.stage-logos a:hover { background: var(--soft); text-decoration: none; color: var(--ink); }
.stage-logos img { width: 32px; height: 32px; object-fit: contain; }

/* Client strip */
.clients { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.clients .container { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-300) var(--s-600); padding-top: var(--s-400); padding-bottom: var(--s-400); }
.clients-label { color: var(--muted-2); }
.client-names { display: flex; flex-wrap: wrap; gap: var(--s-200) var(--s-500); list-style: none; margin: 0; padding: 0; }
.client-names li { color: var(--ink-2); }

/* Photo mosaic */
.mosaic { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: var(--s-200); min-height: 480px; }
.mosaic .ph:first-child { grid-row: span 2; }
.ph { position: relative; border-radius: var(--r-3xl); overflow: hidden; background: var(--soft); display: flex; align-items: flex-end; padding: var(--s-300); min-height: 200px; }
.ph > img[data-optional] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph .ph-cap { position: relative; z-index: 1; background: var(--paper); border-radius: var(--r-lg); padding: var(--s-50) var(--s-100); color: var(--ink-2); }
.ph.green { background: var(--dark); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-700); align-items: center; }
.intro-grid .intro { gap: var(--s-300); }

/* Page hero with an optional photo on the right */
.page-hero.has-media .container { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-700); align-items: center; }
.page-hero.has-media .page-hero-text { display: flex; flex-direction: column; gap: var(--s-300); align-items: flex-start; }
.page-hero-media { aspect-ratio: 4 / 3; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--s-700); align-items: start; }
.faq-grid .section-head { position: sticky; top: calc(var(--header-h) + var(--s-500)); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-200); padding: var(--s-300) 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--muted); padding: 0 var(--s-700) var(--s-300) 0; }
.faq .role-toggle { width: 32px; height: 32px; }
.faq details[open] .role-toggle::after { transform: translate(-50%, -50%) rotate(0deg); }

/* Product grid: feature card on green */
.product-feature { background: var(--dark); border-color: var(--dark); }
.product-feature:hover { background: var(--dark-2); border-color: var(--dark-2); }
.product-feature p, .product-feature .label, .product-feature .more { color: var(--paper); }

@media (max-width: 960px) {
  .section-head.split, .intro-grid, .page-hero.has-media .container, .faq-grid { grid-template-columns: 1fr; gap: var(--s-400); }
  .faq-grid .section-head { position: static; }
  .hero-stage { margin-left: 0; max-width: none; aspect-ratio: 4 / 3; }
  .mosaic { min-height: 400px; }
}
@media (max-width: 640px) {
  .cta-wrap { padding: 0 var(--s-200); }
  .cta-wide { margin: 0; padding: var(--s-600) var(--s-300); }
  .stage-logos { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: var(--s-50); gap: 0; }
  .stage-logos a { padding: var(--s-75) 0; font-size: 12px; }
  .stage-logos img { width: 24px; height: 24px; }
  .hero-stage .stage-copy { display: none; }
  .mosaic { grid-template-columns: 1fr 1fr; min-height: 0; }
  .mosaic .ph:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
  .ph { min-height: 160px; }
  .faq details p { padding-right: 0; }
}
.intro-grid .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-hero.has-media .hero-sub { max-width: 560px; }
/* Placeholders until photos arrive: a quiet Aristos mark, never an empty box */
.ph, .prod-visual, .case-visual, .cta-photo { background-image: url("../assets/aristos-mark.svg"); background-repeat: no-repeat; background-position: center; background-size: 64px; }
.ph.green, .hero-stage { background-image: none; }
.ph.green::before { content: ""; position: absolute; inset: 0; background: url("../assets/aristos-mark-white.svg") center / 64px no-repeat; }
.prod-visual, .case-visual { background-image: none; }
.cta-photo { background-image: none; }
.video-facade { background: var(--dark-2); border-color: var(--dark-line); }
.btn-dark { background: var(--green-text); }
.btn-dark:hover { background: var(--green-dark); }
/* Footer: a huge, faint, flat wordmark as a background layer */
.site-footer { position: relative; overflow: hidden; }
.footer-wordmark { position: absolute; left: 50%; top: var(--s-600); transform: translateX(-50%); width: min(92%, calc(var(--max) - 64px)); height: auto; opacity: 0.08; pointer-events: none; user-select: none; }
.site-footer .container { position: relative; padding-top: clamp(160px, 22vw, 320px); padding-bottom: var(--s-900); }
.footer-brand .heading-5 { color: var(--paper); }
@media (max-width: 640px) {
  .footer-wordmark { top: var(--s-400); width: calc(100% - 32px); }
  .site-footer .container { padding-top: 120px; padding-bottom: var(--s-900); }
}
/* Wordmark is 4:1, so reserve exactly its height plus a gap above the footer content */
.site-footer { --wm-w: min(92vw, calc(var(--max) - 64px)); --wm-top: var(--s-600); }
.footer-wordmark { top: var(--wm-top); width: var(--wm-w); }
.site-footer .container { padding-top: calc(var(--wm-top) + var(--wm-w) / 4 + var(--s-600)); }
@media (max-width: 640px) {
  .site-footer { --wm-w: calc(100vw - 32px); --wm-top: var(--s-400); }
  .site-footer .container { padding-top: calc(var(--wm-top) + var(--wm-w) / 4 + var(--s-400)); }
}

/* ================= Illustrations ================= */
/* Drawings sit on the same paper colour as the page and are shown whole, never cropped */
.ph:has(> img[data-optional]), .prod-visual:has(> img[data-optional]), .case-visual:has(> img[data-optional]), .cta-photo:has(> img[data-optional]) { background: var(--bg); background-image: none; }
.ph > img[data-optional], .prod-visual > img[data-optional], .case-visual > img[data-optional], .cta-photo > img[data-optional] { object-fit: contain; padding: var(--s-200); }
.ph:has(> img[data-optional])::before { display: none; }
.prod-visual:has(> img[data-optional]) .vis-logo, .case-visual:has(> img[data-optional]) .vis-logo, .cta-photo:has(> img[data-optional]) .cta-photo-mark { display: none; }
.ph:has(> img[data-optional]) { border: 1px solid var(--line); }
.band .ph:has(> img[data-optional]) { background: var(--bg); }

/* Hero: the drawing framed inside the green stage, product logos underneath */
.hero-stage:has(> img[data-optional]) { aspect-ratio: auto; flex-direction: column; align-items: stretch; gap: var(--s-75); padding: var(--s-75); }
.hero-stage > img[data-optional] { position: static; width: 100%; height: auto; border-radius: var(--r-2xl); background: var(--bg); }
.hero-stage:has(> img[data-optional]) .stage-mark { display: none; }

/* Final image polish */
/* Captions never sit on top of a drawing */
.ph:has(> img[data-optional]) .ph-cap { display: none; }
/* Page header drawings keep their own proportions instead of being letterboxed */
.page-hero-media:has(> img[data-optional]) { aspect-ratio: auto; min-height: 0; padding: 0; }
.page-hero-media > img[data-optional] { position: static; width: 100%; height: auto; }
/* Every illustrated panel gets the same quiet frame, whatever section it sits in */
.prod-visual:has(> img[data-optional]), .case-visual:has(> img[data-optional]) { border: 1px solid var(--line); }
.band .prod-visual:has(> img[data-optional]), .band .case-visual:has(> img[data-optional]) { background: var(--bg); }
.section:not(.band) .prod-visual:has(> img[data-optional]), .section:not(.band) .case-visual:has(> img[data-optional]), .section:not(.band) .ph:has(> img[data-optional]) { background: var(--bg); }
@media (max-width: 960px) {
  /* On tablets and phones, drawings keep their own shape instead of a fixed box */
  .ph:has(> img[data-optional]), .prod-visual:has(> img[data-optional]), .case-visual:has(> img[data-optional]) { aspect-ratio: auto; min-height: 0; }
  .ph > img[data-optional], .prod-visual > img[data-optional], .case-visual > img[data-optional] { position: static; width: 100%; height: auto; max-height: 520px; }
}
@media (max-width: 640px) {
  .mosaic { grid-template-columns: 1fr; grid-template-rows: none; }
  .mosaic .ph:first-child { grid-column: auto; aspect-ratio: auto; }
}
@media (max-width: 640px) {
  .chat-launcher { padding: var(--s-75); }
  .chat-launcher .cl-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ================= Case Number 66: scattered screenshots ================= */
.shots { position: relative; flex: 1.2 1 460px; min-width: 0; aspect-ratio: 4 / 3; }
.shot { position: absolute; left: var(--x); top: var(--y); width: var(--w); z-index: var(--z); padding: var(--s-75); background: var(--paper); border-radius: var(--r-md); transform: rotate(var(--r)); transform-origin: var(--o, center); transition: transform 500ms var(--ease); cursor: zoom-in; }
.shot img { display: block; width: 100%; height: auto; border-radius: 2px; }
.shot:hover, .shot:focus-visible, .shot.is-open { transform: rotate(0deg) scale(1.55); z-index: 20; }
.shot:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.shots-hint { color: var(--dark-muted); }
@media (hover: none) { .shot:hover { transform: rotate(var(--r)); z-index: var(--z); } .shot.is-open { transform: rotate(0deg) scale(1.55); z-index: 20; } }
@media (max-width: 640px) {
  .shots { aspect-ratio: 1 / 1; }
  .shot { padding: var(--s-50); }
  .shot.is-open, .shot:focus-visible { transform: rotate(0deg) scale(1.9); }
}
@media (prefers-reduced-motion: reduce) { .shot { transition: none; } }
/* Links and buttons never break word by word */
.more, .text-link, .btn, .jump a, .chips li, .pills li { white-space: nowrap; }
@media (max-width: 1080px) {
  .work-row { grid-template-columns: 64px minmax(0, 1fr); }
  .work-row p, .work-row .more { grid-column: 2; }
}
.work-row .more { color: var(--green-text); }
