/* Powerup AI. Tokens first, then base, layout and components in page order. */

:root {
  --paper: #f7f5f0;
  --paper-2: #efebe3;
  --card: #ffffff;
  --ink: #15181d;
  --ink-2: #3a3f47;
  --muted: #62686f;
  --line: #e2ddd3;
  --line-strong: #cec6b8;
  --accent: #1f5a43;
  --accent-hover: #174634;

  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 16px;
  --radius-sm: 12px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 9vw, 128px);
  --header-h: 72px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.4rem, 3.4vw + 1.3rem, 4.5rem); line-height: 1.04; }
h2 { font-size: clamp(2rem, 1.6vw + 1.3rem, 3rem); line-height: 1.1; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #fff; }

/* Type helpers */
.label { margin-bottom: 16px; font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.lede { font-size: clamp(1.125rem, 0.3vw + 1.05rem, 1.3rem); line-height: 1.55; color: var(--ink-2); }
.link { font-weight: 600; color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: 999px; font: 600 1rem/1.2 var(--sans); text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--paper-2); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-outline-light:hover { border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 479px) {
  .actions .btn { flex: 1 1 100%; white-space: normal; overflow-wrap: anywhere; padding-block: 12px; }
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 245, 240, 0.92); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav-menu ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-size: 0.9375rem; font-weight: 500; text-decoration: none; }
.nav-menu a:hover { background: var(--paper-2); color: var(--ink); }
.nav-menu a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.menu-toggle path { transition: transform 0.2s; transform-box: fill-box; transform-origin: center; }
.menu-toggle[aria-expanded="true"] .bar-1 { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar-2 { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 899px) {
  .menu-toggle { display: inline-grid; }
  .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 24px 32px -24px rgba(21, 24, 29, 0.25); }
  .nav-menu.is-open { display: block; }
  .nav-menu ul { flex-direction: column; gap: 0; width: min(100% - 2 * var(--gutter), 1200px); margin: 0 auto; padding: 4px 0 12px; }
  .nav-menu a { padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
  .nav-menu li:last-child a { border-bottom: 0; }
  .nav-menu a:hover { background: none; }
}
@media (max-width: 399px) { .nav-actions .btn { display: none; } }

/* Sections */
.section { padding-block: var(--section); }
.section-tint { background: var(--paper-2); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head > p:not(.label) { max-width: 68ch; margin-top: 20px; color: var(--ink-2); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.split-head { position: sticky; top: calc(var(--header-h) + 32px); }
.split-head > p:not(.label) { max-width: 62ch; margin-top: 20px; color: var(--ink-2); }
@media (max-width: 959px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-head { position: static; }
}

/* Hero */
.hero { padding: clamp(28px, 6vw, 88px) 0 var(--section); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 3.2vw + 1rem, 4rem); }
.hero h1 .accent { font-style: italic; color: var(--accent); }
.hero .lede { max-width: 34rem; margin-top: 24px; }
.hero .actions { margin-top: 36px; }
.hero-visual { position: relative; margin-bottom: 32px; }
.hero-photo { margin: 0; overflow: hidden; aspect-ratio: 3 / 4; max-height: calc(100vh - var(--header-h) - 96px); border-radius: var(--radius); background: var(--paper-2); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 22% 50%; }
.proof-card { position: absolute; left: clamp(-48px, -3vw, -20px); bottom: -32px; width: min(300px, 80%); padding: 16px 18px; background: var(--card); border-radius: var(--radius-sm); box-shadow: 0 24px 48px -24px rgba(21, 24, 29, 0.45), 0 2px 6px rgba(21, 24, 29, 0.06); }
.proof-title { margin-bottom: 2px; font-size: 0.8125rem; font-weight: 600; color: var(--accent); }
.proof-list { margin: 0; padding: 0; list-style: none; }
.proof-list li { display: grid; padding: 7px 0; border-top: 1px solid var(--line); line-height: 1.4; }
.proof-list li:first-child { border-top: 0; }
.proof-list strong { font-size: 0.875rem; font-weight: 600; }
.proof-list span { font-size: 0.8125rem; color: var(--muted); }
.proof-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 0.8125rem; }
.proof-foot span { color: var(--ink-2); }
.proof-foot a { padding-block: 4px; }
@media (max-width: 1099px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { aspect-ratio: 4 / 3; max-height: 75vh; }
  .hero-visual { margin-bottom: 0; }
  .proof-card { position: relative; left: auto; bottom: auto; width: auto; max-width: 420px; margin: -56px 16px 0; }
}

/* What we automate */
.split-note { font-size: 0.9375rem; }
.hairline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.hairline-grid li { padding: 22px 0 28px; border-top: 1px solid var(--line-strong); }
.hairline-grid h3 { margin-bottom: 6px; }
.hairline-grid p { font-size: 0.975rem; color: var(--ink-2); }
.hairline-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1099px) { .hairline-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .hairline-grid, .hairline-grid--4 { grid-template-columns: minmax(0, 1fr); } }

/* Hiring vs AI comparison: a table on wide screens, stacked cards on phones */
.compare { width: 100%; margin-top: clamp(48px, 6vw, 80px); border-collapse: collapse; table-layout: fixed; }
.compare .col-label { width: 20%; }
.compare caption { margin-bottom: 20px; font-family: var(--serif); font-size: clamp(1.6rem, 1vw + 1.25rem, 2.1rem); font-weight: 500; line-height: 1.15; text-align: left; }
.compare th, .compare td { padding: 16px 20px; border-top: 1px solid var(--line-strong); text-align: left; vertical-align: top; }
.compare thead th, .compare thead td { padding-block: 12px; border-top: 0; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.compare tbody th { padding-left: 0; font-weight: 600; }
.compare td { color: var(--ink-2); }
.compare .us { background: rgba(31, 90, 67, 0.08); color: var(--ink); }
.compare thead .us { color: var(--accent); }
@media (max-width: 699px) {
  .compare thead, .compare colgroup { display: none; }
  .compare caption { display: block; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tr { padding: 18px 0; border-top: 1px solid var(--line-strong); }
  .compare th, .compare td { padding: 0; border: 0; }
  .compare td { margin-top: 10px; }
  .compare td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
  .compare td.us { padding: 10px 12px; border-radius: 8px; }
  .compare td.us::before { color: var(--accent); }
}

/* Case studies: one card list shared by the home page (#work) and /work/. With an odd number of cards the first one
   becomes a wide feature, so a single case study shows as a feature and more fall into a two-column grid. */
.case-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(56px, 6vw, 80px) clamp(24px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.case-card { position: relative; display: grid; grid-template-rows: auto 1fr; gap: 28px; }
.case-media { margin: 0; overflow: hidden; aspect-ratio: 3 / 2; border-radius: var(--radius); background: var(--paper-2); }
.case-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.product-media { border: 1px solid var(--line); background: #e9eef4; }
.product-media img { object-position: left top; }
.case-meta { margin-bottom: 12px; font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.case-title { font-family: var(--serif); font-size: clamp(1.6rem, 0.8vw + 1.3rem, 2rem); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; }
.case-title a { text-decoration: none; }
.case-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }  /* whole card is the link */
.case-title a:focus-visible { outline: 0; }
.case-title a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 6px; }
.case-body { display: flex; flex-direction: column; }
.case-summary { max-width: 62ch; margin-top: 16px; color: var(--ink-2); }
.case-card .stats, .case-card .quote { margin-top: 28px; }
.case-more { margin-top: auto; padding-top: 28px; font-weight: 600; color: var(--accent); }  /* bottom-aligned across a row */
.case-more span { display: inline-block; transition: transform 0.2s; }
.case-card:hover .case-media img { transform: scale(1.03); }
.case-card:hover .case-title a { text-decoration: underline; }
.case-card:hover .case-more span { transform: translateX(4px); }
.case-card:first-child:nth-last-child(odd) { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; gap: clamp(40px, 5vw, 80px); align-items: center; }
.case-card:first-child:nth-last-child(odd) .case-media { aspect-ratio: 4 / 5; }
.case-card:first-child:nth-last-child(odd) .case-title { font-size: clamp(2rem, 1.6vw + 1.3rem, 3rem); line-height: 1.1; }
@media (max-width: 959px) {
  .case-card:first-child:nth-last-child(odd) { grid-template-columns: minmax(0, 1fr); }
  .case-card:first-child:nth-last-child(odd) .case-media { aspect-ratio: 16 / 10; max-height: 75vh; }
}
@media (max-width: 767px) { .case-list { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .case-media img, .case-more span { transition: none; } }
.work-list { padding-bottom: var(--section); }

/* Stats and quotes (case cards and case study pages) */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.stat-value { font-family: var(--serif); font-size: clamp(2.4rem, 1.6vw + 1.7rem, 3.2rem); line-height: 1; color: var(--ink); }
.stat-label { margin-top: 10px; font-weight: 600; }
.stat-note { margin-top: 2px; font-size: 0.875rem; color: var(--muted); }
.quote { margin: 0; padding-left: 20px; border-left: 2px solid var(--accent); }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.2rem, 0.5vw + 1.1rem, 1.45rem); font-style: italic; line-height: 1.45; color: var(--ink); }
.quote figcaption { margin-top: 12px; font-size: 0.9375rem; color: var(--muted); }
@media (max-width: 399px) { .stats { grid-template-columns: minmax(0, 1fr); } }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-top: 68px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; z-index: 1; top: 0; left: 0; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--accent); border-radius: 50%; background: var(--paper); font-family: var(--serif); font-size: 1.25rem; color: var(--accent); }
.steps li::after { content: ""; position: absolute; top: 22px; left: 56px; right: -20px; height: 1px; background: var(--line-strong); }
.steps li:last-child::after { display: none; }
.step-meta { margin: 6px 0 12px; font-size: 0.9375rem; font-weight: 600; color: var(--accent); }
.steps li > p:last-child { color: var(--ink-2); }
@media (max-width: 767px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps li { padding: 8px 0 36px 68px; }
  .steps li:last-child { padding-bottom: 0; }
  .steps li::after { top: 52px; bottom: 6px; left: 22px; right: auto; width: 1px; height: auto; }
}

/* About */
.about-body > p { max-width: 62ch; color: var(--ink-2); }
.about-body > p + p { margin-top: 20px; }
.about-body > .lede { color: var(--ink); }
.experience { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.experience-title { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.logo-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: center; max-width: 680px; margin: 8px 0 0; padding: 0; list-style: none; }
.logo-row li { display: grid; place-items: center; }
.logo-row img { display: block; width: 100%; height: auto; }
@media (max-width: 599px) { .logo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; } }

/* FAQ */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { position: relative; padding: 22px 48px 22px 0; font-size: 1.0625rem; font-weight: 600; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { max-width: 64ch; padding: 0 48px 24px 0; color: var(--ink-2); }

/* Closing call to action */
.section-cta { padding-bottom: var(--section); }
.cta-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 48px; align-items: end; padding: clamp(32px, 5vw, 72px); border-radius: calc(var(--radius) + 8px); background: var(--accent); color: #fff; }
.cta-block h2 { max-width: 18ch; color: #fff; }
.cta-block p { max-width: 44ch; margin-top: 16px; color: rgba(255, 255, 255, 0.84); }
.cta-block .actions { justify-content: flex-end; }
.cta-block :focus-visible { outline-color: #fff; }
@media (max-width: 899px) {
  .cta-block { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .cta-block .actions { justify-content: flex-start; }
}

/* Footer */
.site-footer { padding: clamp(48px, 6vw, 72px) 0 32px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.footer-brand p { max-width: 32ch; margin-top: 14px; color: var(--muted); }
.footer-title { margin-bottom: 12px; font-size: 0.875rem; font-weight: 600; }
.footer-grid ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-grid ul a { display: inline-block; padding-block: 3px; color: var(--ink-2); text-decoration: none; }
.footer-grid ul a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
@media (max-width: 767px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

/* Page hero (case studies index and case study pages) */
.page-hero { padding: clamp(32px, 5vw, 72px) 0 clamp(32px, 4vw, 56px); }
.crumb { margin-bottom: 24px; font-size: 0.875rem; color: var(--muted); }
.crumb a { color: var(--ink-2); }
.page-hero h1 { max-width: 18ch; font-size: clamp(2.4rem, 3vw + 1.2rem, 4rem); }
.page-hero .lede { max-width: 46rem; margin-top: 24px; }
.case-hero-actions { margin-top: 32px; }

/* Case study page */
.glance { padding-top: clamp(40px, 5vw, 64px); }
.glance-title { margin-bottom: 16px; font-family: var(--sans); letter-spacing: 0; line-height: 1.4; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.stat-tile { padding: 24px 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.check-list { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 28px; color: var(--ink-2); }
.check-list li::before { content: ""; position: absolute; left: 3px; top: 0.4em; width: 12px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 28px; margin: 28px 0 0; }
.facts dt { font-size: 0.8125rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.facts dd a { display: inline-block; padding-block: 2px; font-weight: 400; color: var(--accent); }
.prose { max-width: 68ch; padding-block: clamp(48px, 6vw, 88px); }
.prose h2 { margin-bottom: 16px; font-size: clamp(1.75rem, 1vw + 1.35rem, 2.25rem); }
.prose p { margin-top: 16px; color: var(--ink-2); }
.prose .quote { margin-top: 40px; }
@media (max-width: 959px) {
  .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-tile:last-child { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .stat-tiles, .facts { grid-template-columns: minmax(0, 1fr); }
}

/* What we built: a sticky diagram that fills in as the steps scroll past (states set by assets/js/site.js).
   Without the script the whole diagram simply shows. */
.scrolly { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.scrolly-graphic { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + 32px); }
.scrolly-steps { grid-column: 1; grid-row: 1; margin: 0; padding: 0; list-style: none; }
.scrolly-step { display: flex; flex-direction: column; justify-content: center; min-height: 60vh; }
.scrolly-step:last-child { min-height: 70vh; }
.product-scrolly .scrolly-step:last-child { min-height: 100vh; }
.step-kicker { font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.scrolly-step h3 { margin: 6px 0 10px; font-family: var(--serif); font-size: clamp(1.5rem, 0.8vw + 1.2rem, 1.9rem); font-weight: 500; line-height: 1.15; }
.scrolly-step p:last-child { max-width: 40ch; color: var(--ink-2); }
.flow-svg { display: block; width: 100%; height: auto; max-height: calc(100vh - var(--header-h) - 64px); overflow: visible; }
.flow-svg text { font-family: var(--sans); dominant-baseline: central; text-anchor: middle; }
.rails path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 3 6; }
.link { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.node rect { fill: var(--card); stroke: var(--accent); stroke-width: 1.5; transition: fill 0.4s, stroke 0.4s, stroke-width 0.4s; }
.node text { font-size: 17px; font-weight: 600; fill: var(--ink); }
.node .sub { font-size: 12.5px; fill: var(--accent); }
.tag rect { fill: var(--accent); }
.tag text { font-size: 13px; font-weight: 600; fill: #fff; }
.pulse { fill: var(--accent); opacity: 0; }
.is-scrolly .node { opacity: 0.3; transition: opacity 0.4s; }
.is-scrolly .node rect { stroke: var(--line-strong); }
.is-scrolly .node.on { opacity: 1; }
.is-scrolly .node.on rect { stroke: var(--accent); }
.is-scrolly .node.now rect { fill: #e3eee8; stroke-width: 2.5; }
.is-scrolly .link { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s ease; }
.is-scrolly .link.on { stroke-dashoffset: 0; }
.is-scrolly .tag { opacity: 0; transition: opacity 0.4s 0.5s; }
.is-scrolly .tag.on { opacity: 1; }
.is-scrolly .pulse.now { opacity: 1; }
.is-scrolly .scrolly-step { opacity: 0.35; transition: opacity 0.3s; }
.is-scrolly .scrolly-step.now { opacity: 1; }
.is-scrolly.product-scrolly .scrolly-step { padding-inline-start: 22px; border-inline-start: 2px solid var(--line-strong); opacity: 1; transition: border-color 0.3s; }
.is-scrolly.product-scrolly .scrolly-step.now { border-inline-start-color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .is-scrolly .link, .is-scrolly .tag, .is-scrolly .node, .is-scrolly .scrolly-step, .node rect { transition: none; }
  .pulse { display: none; }
}
@media (max-width: 959px) {
  .scrolly { display: block; }
  .scrolly-graphic { position: sticky; top: var(--header-h); z-index: 2; margin: 0 calc(-1 * var(--gutter)); padding: 12px var(--gutter); background: var(--paper-2); border-bottom: 1px solid var(--line); }
  .flow-svg { max-height: 40vh; margin-inline: auto; }
  .product-scrolly .flow-svg { max-height: min(38vh, 320px); }
  .scrolly-step { justify-content: flex-start; min-height: 48vh; padding-top: 16px; }
  .is-scrolly.product-scrolly .scrolly-step { min-height: 100vh; padding: 0; border-inline-start: 0; }
  .product-scrolly .scrolly-copy { position: sticky; top: calc(var(--header-h) + min(38vh, 320px) + 48px); padding: 0 0 40px 22px; border-inline-start: 2px solid var(--line-strong); }
  .is-scrolly.product-scrolly .scrolly-step.now .scrolly-copy { border-inline-start-color: var(--accent); }
  .product-scrolly .scrolly-step:last-child { min-height: 115vh; }
}

/* Photo carousel: CSS scroll-snap track; arrow and dot controls come from assets/js/site.js */
.carousel-frame { position: relative; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: var(--radius); }
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; margin: 0; aspect-ratio: 16 / 9; max-height: 72vh; scroll-snap-align: start; background: var(--paper-2); }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide .crop-low { object-position: 50% 66%; }
.product-carousel .carousel-track { border: 1px solid var(--line); background: #e9eef4; }
.product-carousel .slide { background: #e9eef4; }
.product-carousel .slide img { object-position: left top; }
.platform-table { margin-top: 0; }
.carousel-btn { position: absolute; top: 50%; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 1.1rem; cursor: pointer; box-shadow: 0 2px 12px rgba(21, 24, 29, 0.3); transform: translateY(-50%); }
.carousel-btn:hover { background: #fff; }
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }
.carousel-dots { display: flex; justify-content: center; gap: 4px; margin-top: 10px; }
.carousel-dots button { width: 26px; height: 26px; padding: 8px; border: 0; border-radius: 50%; background: var(--line-strong); background-clip: content-box; cursor: pointer; }
.carousel-dots button[aria-current="true"] { background-color: var(--ink); }
@media (max-width: 699px) {
  .slide { aspect-ratio: 4 / 3; }
  .slide .crop-low { object-position: 50% 85%; }
  .product-carousel .slide img { object-fit: contain; }
  .carousel-btn { width: 40px; height: 40px; }
  .carousel-btn.prev { left: 10px; }
  .carousel-btn.next { right: 10px; }
}
@media (prefers-reduced-motion: reduce) { .carousel-track { scroll-behavior: auto; } }
