/* ==========================================================================
   Inner pages (Capabilities, Services, Leadership, Contact, Privacy).
   Same visual language as the homepage (site.css): white canvas, grey
   panels/cards, one accent for lead phrases, pills, centered title screens.
   ========================================================================== */

/* ---------- Page hero: centered label + big title + lead ---------- */
.page-hero { padding: calc(var(--header-h) + clamp(56px, 9vh, 104px)) 20px clamp(40px, 6vh, 72px); text-align: center; display: grid; justify-items: center; gap: 22px; }
.page-hero .title-xl { max-width: 18ch; }
.page-hero .lead { max-width: 760px; }
.page-hero .lead a { color: var(--c-accent); text-decoration: none; }
.page-hero .lead a:hover { text-decoration: underline; }

.section { padding: clamp(48px, 7vh, 88px) clamp(20px, 5vw, 72px); }
.section-head { max-width: 820px; margin: 0 auto clamp(28px, 4vh, 48px); text-align: center; display: grid; gap: 18px; justify-items: center; }
.section-head.left { margin-left: 0; text-align: left; justify-items: start; }
.wrap { max-width: 1360px; margin: 0 auto; }

/* ---------- Card grids ---------- */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 26px 24px 28px; border-radius: 20px; background: var(--c-card);
  color: var(--c-ink-2); text-decoration: none; transition: background-color .3s ease;
}
a.card:hover { background: var(--c-panel); }
.card .icon { font-family: "Material Symbols Outlined"; font-size: 28px; line-height: 1; color: var(--c-accent); font-variation-settings: "wght" 300; margin-bottom: 18px; }
.card h3 { font: 400 22px/1.25 var(--font-display); color: var(--c-ink); margin: 0; }
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--c-muted); }
.card .more { margin-top: auto; padding-top: 10px; color: var(--c-accent); font-size: 14px; font-weight: 500; }
.card .num { font: 500 12px/1 var(--font-body); letter-spacing: 1px; color: var(--c-faint); }

/* ---------- Grey split panel (media + text) ---------- */
.gpanel {
  margin: 0 clamp(12px, 2vw, 24px); border-radius: var(--radius-l); background: var(--c-panel);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center;
  padding: clamp(36px, 5vw, 84px) clamp(24px, 6vw, 96px);
}
.gpanel.reverse > :first-child { order: 2; }
.gpanel .copy { display: grid; gap: 20px; align-content: start; }
.gpanel .media { border-radius: 22px; overflow: hidden; }
.gpanel .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (width < 900px) { .gpanel { grid-template-columns: 1fr; } .gpanel.reverse > :first-child { order: 0; } }

/* stats + check lists */
.stats { display: flex; flex-wrap: wrap; gap: 20px 48px; margin: 6px 0; }
.stat .n { font: 400 clamp(44px, 4.6vw, 68px)/1 var(--font-display); color: var(--c-ink); letter-spacing: -.02em; }
.stat .l { margin-top: 8px; font-size: 13px; color: var(--c-muted); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: var(--c-muted); line-height: 1.55; font-size: 15px; }
.checks li::before { content: "check"; font-family: "Material Symbols Outlined"; font-size: 20px; color: var(--c-accent); line-height: 1.3; }
.checks b { color: var(--c-ink); font-weight: 500; }
.on-dark .checks li { color: #bdc1c6; }
.on-dark .checks b { color: #fff; }
.on-dark .checks li::before { color: var(--c-accent-2); }

/* ---------- Horizontal product rail ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 22%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px clamp(20px, 5vw, 72px) 20px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail figure { margin: 0; scroll-snap-align: start; }
.rail .ph { aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--c-card); }
.rail .ph img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--base-ease); }
.rail figure:hover .ph img { scale: 1.05; }
.rail figcaption { margin-top: 12px; font-size: 15px; color: var(--c-ink-2); }
.tagline { text-align: center; color: var(--c-faint); font-size: 13px; letter-spacing: .6px; margin-top: 22px; }
@media (width < 700px) { .rail { grid-auto-columns: 72%; } }

/* ---------- Photo tiles with captions ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { margin: 0; }
.tile fx-parallax { aspect-ratio: 4 / 3; --radius: 20px; }
.tile figcaption { margin-top: 12px; font-size: 15px; color: var(--c-ink-2); }
@media (width < 800px) { .tiles { grid-template-columns: 1fr 1fr; } }

/* ---------- Dark block (Google's black sections) ---------- */
.dark-block { background: #000; color: #fff; padding: clamp(56px, 9vh, 104px) clamp(20px, 6vw, 96px); }
.dark-block .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; max-width: 1360px; margin: 0 auto; }
.dark-block .label { color: #9aa0a6; }
.dark-block .lead { color: #e8eaed; }
.dark-block .stat .n { color: #fff; }
.dark-block .stat .l { color: #9aa0a6; }
.dark-block .media { border-radius: 24px; overflow: hidden; }
.dark-block .media img { width: 100%; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { border-radius: 999px; padding: 8px 14px; font-size: 13px; background: var(--c-panel); color: var(--c-ink-2); }
.on-dark .chips span { background: #202124; color: #e8eaed; border: 1px solid #3c4043; }
@media (width < 900px) { .dark-block .grid2 { grid-template-columns: 1fr; } }

/* ---------- Spec rows (definition list, FAQ-like lines) ---------- */
.spec { margin: 0; border-top: 1px solid var(--c-line); }
.spec > div { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--c-line); }
.spec dt { font: 400 18px/1.4 var(--font-display); color: var(--c-ink); }
.spec dd { margin: 0; color: var(--c-muted); line-height: 1.6; }
@media (width < 700px) { .spec > div { grid-template-columns: 1fr; gap: 6px; } }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.photo-pair img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; display: block; }

/* ---------- Landed-cost bars ---------- */
.bars { display: grid; gap: 14px; max-width: 1100px; margin: 0 auto; }
.bar-row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; padding: 22px 26px; border-radius: 20px; background: var(--c-card); }
.bar-row.best { background: #e8f3fa; }
.bar-row h3 { margin: 0; font: 400 20px/1.25 var(--font-display); color: var(--c-ink); }
.bar-row .duty { font-size: 13px; color: var(--c-muted); margin-top: 4px; }
.bar-track { position: relative; height: 44px; }
.bar-fill {
  position: absolute; inset: 0 auto 0 0; width: calc(var(--w) * 1%); border-radius: 999px;
  background: var(--c-line); display: flex; align-items: center; justify-content: flex-end; padding-right: 16px;
  font: 500 16px/1 var(--font-body); color: var(--c-ink); transform-origin: left; transform: scaleX(0);
  transition: transform 1.4s var(--base-ease);
}
.bar-row.best .bar-fill { background: var(--c-accent); color: #fff; }
fx-reveal[inview] .bar-fill { transform: scaleX(1); }
.bar-row .note { grid-column: 2; margin: 0; font-size: 13px; color: var(--c-muted); }
.fineprint { max-width: 1100px; margin: 22px auto 0; color: var(--c-muted); font-size: 14px; line-height: 1.6; display: grid; gap: 8px; }
.fineprint b { color: var(--c-ink); font-weight: 500; }
@media (width < 700px) { .bar-row { grid-template-columns: 1fr; gap: 12px; } .bar-row .note { grid-column: 1; } }

/* ---------- Screenshots ---------- */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; margin-bottom: 40px; }
.shots fx-tilt > .inner { border-radius: 16px; box-shadow: 0 8px 40px #3c404326; }
.shots img { width: 100%; display: block; }
@media (width < 800px) { .shots { grid-template-columns: 1fr; } }

/* ---------- People ---------- */
.founders { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); max-width: 1200px; margin: 0 auto; text-align: center; }
.person .portrait { width: min(200px, 60%); aspect-ratio: 1; margin: 0 auto 24px; border-radius: 50%; overflow: hidden; background: var(--c-panel); }
.person .portrait img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font: 400 28px/1.2 var(--font-display); margin: 0 0 4px; }
.person .role { color: var(--c-accent); font-size: 14px; font-weight: 500; margin: 0 0 14px; }
.person .bio { color: var(--c-muted); font-size: 15px; line-height: 1.6; margin: 0 auto; max-width: 340px; }
.team .card { padding-top: 28px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #e8f3fa; color: var(--c-accent); font: 500 18px/1 var(--font-body); margin-bottom: 10px; }
.team .card .role { color: var(--c-accent); font-size: 13px; font-weight: 500; margin: -4px 0 4px; }
@media (width < 900px) { .founders { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; padding: calc(var(--header-h) + clamp(40px, 7vh, 88px)) clamp(20px, 6vw, 96px) clamp(48px, 7vh, 88px); max-width: 1360px; margin: 0 auto; }
.contact .copy { display: grid; gap: 22px; position: sticky; top: calc(var(--header-h) + 40px); }
.contact .copy .links { display: grid; gap: 8px; }
.form { background: var(--c-card); border-radius: var(--radius-l); padding: clamp(24px, 4vw, 44px); display: grid; gap: 18px; scroll-margin-top: calc(var(--header-h) + 24px); }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--c-ink-2); }
.field input, .field textarea {
  font: 400 16px/1.4 var(--font-body); color: var(--c-ink);
  background: var(--c-panel); border: 0; border-bottom: 2px solid transparent; border-radius: 10px 10px 4px 4px;
  padding: 14px 16px; transition: border-color .3s ease, background-color .3s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--c-accent); background: #e8eaed; }
.field textarea { resize: vertical; min-height: 120px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form .pill { justify-self: start; height: 44px; }
.form .status { margin: 0; font-size: 14px; color: var(--c-muted); }
@media (width < 900px) { .contact { grid-template-columns: 1fr; } .contact .copy { position: static; } .form .row2 { grid-template-columns: 1fr; } }

/* ---------- Privacy ---------- */
.policy { max-width: 780px; margin: 0 auto; padding: 0 20px clamp(64px, 10vh, 120px); }
.policy section { display: grid; grid-template-columns: 56px 1fr; gap: 8px 20px; padding: 28px 0; border-top: 1px solid var(--c-line); }
.policy .num { font: 500 13px/2.2 var(--font-body); color: var(--c-accent); letter-spacing: 1px; }
.policy h2 { font: 400 26px/1.25 var(--font-display); margin: 0 0 10px; }
.policy p { margin: 0 0 12px; color: var(--c-muted); line-height: 1.7; }
.policy a { color: var(--c-accent); }
.policy .aside { margin-top: 20px; padding: 18px 22px; border-radius: 16px; background: var(--c-card); font-size: 14px; color: var(--c-muted); }

/* ---------- Closing call to action ---------- */
.cta-band { text-align: center; padding: clamp(56px, 10vh, 112px) 20px; display: grid; justify-items: center; gap: 28px; }
.cta-band .mark { width: 44px; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ==========================================================================
   Symmetric card grids: every card in a row is the same height, and
   five-card sets split 5 across (short cards) or 3 + 2 (long cards).
   ========================================================================== */
.cards > fx-reveal { display: block; height: 100%; }
.cards > fx-reveal > .card { height: 100%; }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c5 { grid-template-columns: repeat(5, 1fr); }
.cards.c3x2 { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 1fr; }
.cards.c3x2 > * { grid-column: span 2; }
.cards.c3x2 > :nth-child(n+4) { grid-column: span 3; }
@media (width < 1200px) {
  .cards.c5 { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 1fr; }
  .cards.c5 > * { grid-column: span 2; }
  .cards.c5 > :nth-child(n+4) { grid-column: span 3; }
}
@media (width < 900px) {
  .cards.c3, .cards.c5, .cards.c3x2 { grid-template-columns: 1fr; }
  .cards.c5 > *, .cards.c3x2 > *, .cards.c5 > :nth-child(n+4), .cards.c3x2 > :nth-child(n+4) { grid-column: auto; }
}

/* ---------- Product grid with hover cycling (replaces the scrolling rails) ---------- */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1360px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 72px); }
.products.p3 { grid-template-columns: repeat(3, 1fr); }
.product { margin: 0; cursor: pointer; }
.product .ph { position: relative; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px #0000000d; }
.product .ph.wide { aspect-ratio: 4 / 3; }
.product fx-cycle { display: block; width: 100%; height: 100%; }
.product img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease, scale 1.2s var(--base-ease); }
.product:hover img { scale: 1.03; }
.product figcaption { margin-top: 12px; font-size: 15px; color: var(--c-ink-2); display: flex; justify-content: space-between; align-items: center; }
.product figcaption::after { content: "360"; font-family: "Material Symbols Outlined"; font-size: 18px; color: var(--c-faint); opacity: 0; transition: opacity .3s; }
.product:hover figcaption::after { opacity: 1; }
@media (width < 900px) { .products, .products.p3 { grid-template-columns: 1fr 1fr; } }

/* ---------- Auto-rotating carousel: fade out left, fade in from right ---------- */
fx-carousel { position: relative; display: block; }
fx-carousel .slide {
  position: absolute; inset: 0 0 56px; margin: 0; display: grid; grid-template-rows: 1fr auto; gap: 12px;
  opacity: 0; transform: translateX(48px); pointer-events: none;
  transition: opacity .8s ease, transform .9s var(--base-ease);
}
fx-carousel.back .slide { transform: translateX(-48px); }
fx-carousel .slide.on { opacity: 1; transform: none; pointer-events: auto; }
fx-carousel .slide.out { opacity: 0; transform: translateX(-48px); }
fx-carousel.back .slide.out { transform: translateX(48px); }
fx-carousel .slide .frame { position: relative; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px #3c40430f, 0 8px 32px #3c404314; min-height: 0; }
fx-carousel .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
fx-carousel .slide img[src*="-model"] { object-position: center bottom; }  /* on-model shots: keep the product in frame */
fx-carousel .slide figcaption { font-size: 14px; color: var(--c-muted); text-align: center; }
.car-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.car-arrow { font-family: "Material Symbols Outlined"; font-size: 22px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--c-panel); color: var(--c-ink-2); cursor: pointer; }
.car-arrow:hover { background: #e8eaed; }
.car-dots { display: flex; gap: 6px; }
.car-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--c-line); cursor: pointer; transition: width .4s var(--base-ease), background-color .3s; }
.car-dots button[aria-current] { width: 24px; background: var(--c-accent); }
@media (prefers-reduced-motion: reduce) { fx-carousel .slide { transform: none !important; } }

/* ---------- Category galleries: story on the left, rotating products on the right ---------- */
fx-story-modal .track.split {
  display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; gap: clamp(32px, 5vw, 80px); align-items: center;
  padding: calc(var(--header-h) + 8px) clamp(24px, 6vw, 96px) 32px; overflow: hidden;
}
fx-story-modal .story-copy { display: grid; gap: 18px; align-content: center; max-width: 520px; }
fx-story-modal .story-copy .title-l { margin: 0; }
fx-story-modal .story-copy .body { font-size: 16px; }
fx-story-modal .story-copy .facts { margin-top: 6px; }
fx-story-modal fx-carousel { height: min(76vh, 760px); }
@media (width <= 899.98px) {
  fx-story-modal .track.split { grid-template-columns: 1fr; overflow: hidden auto; align-items: start; padding-top: 88px; }
  fx-story-modal fx-carousel { height: 64vh; order: -1; }
}

/* ==========================================================================
   Motion for the inner pages
   ========================================================================== */

/* Split hero: copy left, Rive right (Services) */
.page-hero.split { grid-template-columns: 1fr 1fr; text-align: left; justify-items: start; align-items: center; gap: 24px clamp(32px, 5vw, 80px); padding-left: clamp(20px, 6vw, 96px); padding-right: clamp(20px, 6vw, 96px); max-width: 1440px; margin: 0 auto; min-height: 92vh; }
.page-hero.split .copy { display: grid; gap: 22px; justify-items: start; }
.page-hero.split .art { width: 100%; max-width: 620px; aspect-ratio: 1; justify-self: center; }
.page-hero.split .art fx-rive { width: 100%; height: 100%; }
@media (width < 900px) { .page-hero.split { grid-template-columns: 1fr; text-align: center; justify-items: center; } .page-hero.split .copy { justify-items: center; } .page-hero.split .art { max-width: 380px; order: -1; } }

/* Scroll turntable */
.turntable fx-scroll-progress { height: 340vh; }
.turntable .sticky { display: grid; grid-template-columns: 5fr 7fr; align-items: center; gap: clamp(32px, 5vw, 80px); padding: var(--header-h) clamp(20px, 6vw, 96px) 0; }
.tt-copy { display: grid; gap: 20px; align-content: center; }
.tt-copy .lead { font-size: 19px; }
.tt-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tt-tabs button { border: 0; border-radius: 999px; padding: 10px 16px; font: 500 14px/1 var(--font-body); background: var(--c-panel); color: var(--c-ink-2); cursor: pointer; transition: background-color .3s, color .3s; }
.tt-tabs button.active { background: var(--c-accent); color: #fff; }
.tt-progress { height: 2px; background: var(--c-line); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.tt-progress i { display: block; height: 100%; background: var(--c-accent); transform-origin: left; transform: scaleX(0); }
.tt-stage { display: grid; gap: 14px; justify-items: center; }
.tt-stage fx-sequence { position: relative; display: block; width: min(100%, calc(100vh - var(--header-h) - 140px)); aspect-ratio: 1; border-radius: 28px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px #3c40430f, 0 12px 48px #3c404314; }
.tt-stage figure { position: absolute; inset: 0; margin: 0; opacity: 0; transform: scale(1.03); transition: opacity .45s ease, transform .9s var(--base-ease); }
.tt-stage figure.on { opacity: 1; transform: none; }
.tt-stage img { width: 100%; height: 100%; object-fit: cover; }
.tt-stage img[src*="-model"] { object-position: center bottom; }
.tt-stage [data-sequence-caption] { margin: 0; font-size: 14px; color: var(--c-muted); min-height: 1.4em; }
@media (width < 900px) {
  .turntable .sticky { grid-template-columns: 1fr; align-content: center; gap: 16px; }
  .tt-copy .lead, .tt-copy .tagline { display: none; }
  .tt-stage { order: -1; }
  .tt-stage fx-sequence { width: min(100%, 44vh); }
}
