/* =============================================================
   Kerva - Homepage
   ============================================================= */

:root {
  --green: #E4EADC;
  --grey:  #BDC7AD;
  --black: #000000;
  --white: #FFFFFF;

  --radius: 28px;        /* asymmetric - bottom-right only */
  --radius-sm: 14px;     /* small buttons / pills */

  --container-max: 1440px;
  --container-pad: 48px;

  --label-tracking: -0.02em;
  --body-tracking: -0.03em;

  --font-display: "Nixie One", serif;
  --font-sans: "Work Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }

/* ---- Base ---- */
html { scroll-behavior: smooth; }
html, body { overscroll-behavior-y: none; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 2;          /* 200% */
  letter-spacing: var(--body-tracking);
  color: var(--black);
  background: var(--grey);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Green page surface - curves into grey footer */
main {
  display: block;
  background: var(--green);
  border-radius: 0 0 40px 0;
}
.page-news main,
.page-article main { overflow: hidden; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* ---- Typography ---- */
.h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 104px;
  line-height: 1;          /* 100% */
  letter-spacing: -0.01em;
  margin: 0;
  -webkit-text-stroke: 1px currentColor;
  paint-order: stroke fill;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 58px;
  line-height: 1.2;        /* 120% */
  letter-spacing: -0.01em;
  margin: 0;
}
.h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
}
.body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 2;
  letter-spacing: var(--body-tracking);
  margin: 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}
.square {
  width: 10px;
  height: 10px;
  background: var(--black);
  display: inline-block;
  flex-shrink: 0;
}

/* ---- Buttons ---- */
.btn {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  display: inline-flex;
  align-items: stretch;
  height: 40px;                       /* fixed button height drives the arrow square */
  border: 1px solid var(--black);
  background: transparent;
  border-radius: 0 0 var(--radius-sm) 0;
  line-height: 1;
  overflow: hidden;
}
.btn > span:first-child {
  display: flex;
  align-items: center;
  padding: 0 22px;
}
.btn-light { background: transparent; color: var(--black); }
.btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;                        /* matches button height - square */
  border-left: 1px solid var(--black);
  border-radius: 0 0 var(--radius-sm) 0;
  line-height: 1;
  flex-shrink: 0;
}
.btn-arrow svg {
  width: 21px;
  height: 21px;
  display: block;
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(5px); }
}
.btn:hover .btn-arrow svg,
.news-card:hover .news-arrow svg {
  animation: arrow-bounce 0.6s ease-in-out infinite;
}

/* =============================================================
   REGISTRATION MARKS / SECTION FRAMING
   L-marks at 4 corners, T-marks at top-center & bottom-center
   ============================================================= */
.framed { position: relative; }

.frame-marks {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  pointer-events: none;
  z-index: 1;
}
.frame-marks .mark {
  position: absolute;
  width: 16px;
  height: 16px;
}

/* Corner L-marks */
.mark-tl { top: 0;    left: 0;     border-top: 1px solid var(--black); border-left:  1px solid var(--black); }
.mark-tr { top: 0;    right: 0;    border-top: 1px solid var(--black); border-right: 1px solid var(--black); }
.mark-bl { bottom: 0; left: 0;     border-bottom: 1px solid var(--black); border-left:  1px solid var(--black); }
.mark-br { bottom: 0; right: 0;    border-bottom: 1px solid var(--black); border-right: 1px solid var(--black); }

/* Center T-marks */
.mark-tc, .mark-bc {
  left: 50%;
  transform: translateX(-50%);
}
.mark-tc { top: 0;    border-top: 1px solid var(--black); }
.mark-bc { bottom: 0; border-bottom: 1px solid var(--black); }
.mark-tc::before, .mark-bc::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 100%;
  background: var(--black);
  transform: translateX(-50%);
}
.mark-tc::before { top: 0; }
.mark-bc::before { bottom: 0; }

/* =============================================================
   NAV
   ============================================================= */
.nav {
  position: sticky;
  top: 0;
  background: var(--green);
  padding: 35px 0 35px;             /* symmetric: top mark at 20px, bottom mark at nav.height - 20 */
  z-index: 100;
  transition: background-color 250ms ease;
}
.nav-inner {
  align-items: center;
  position: relative;
  z-index: 2;                /* above the sliding white panel */
}

.nav .frame-marks {
  transition: bottom 320ms ease;
  z-index: 3;                /* above white panel and nav-inner */
}
.nav.is-open .frame-marks {
  bottom: -182px;            /* panel_height(300) - 20px gap - nav_height(98) */
}

/* expanded white panel - fixed height, slides DOWN from above viewport.
   The panel acts as a mask: dropdowns counter-translate so they stay still
   while the panel slides over them, revealing them progressively. */
.nav-expand {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: var(--white);
  overflow: hidden;
  visibility: hidden;
  transform: translateY(-302px);
  transition: transform 320ms ease, visibility 0s linear 320ms;
  z-index: 1;
}
.nav.is-open .nav-expand {
  visibility: visible;
  transform: translateY(0);
  transition: transform 320ms ease, visibility 0s;
}

.nav-close {
  position: absolute;
  bottom: 30px;
  right: 0;                              /* set by JS to align with sub-buttons */
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--black);
  cursor: pointer;
  padding: 0;
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  transform: translateY(300px);          /* counter the panel's slide so the X stays still */
  transition: transform 320ms ease, opacity 200ms ease, visibility 0s linear 200ms;
}
.nav.is-open .nav-close {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: transform 320ms ease, opacity 200ms ease 100ms, visibility 0s;
}
.nav-close svg { width: 22px; height: 22px; display: block; }
.nav-close:hover { color: var(--grey); }
@media (min-width: 1200px) {
  .nav-close { display: none; }
}

.nav-dropdown {
  position: absolute;
  top: 66px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(300px);            /* counter the panel's translate, stays stationary */
  transition: transform 320ms ease, opacity 200ms ease, visibility 0s linear 200ms;
}
@media (min-width: 1200px) {
  .nav-dropdown { top: 86px; }
}
.nav-dropdown a { transition: color 180ms ease; }
.nav-dropdown a:hover { color: var(--grey); }
.nav-stryder { cursor: default; transition: color 180ms ease; }
.nav-stryder-hover { display: none; }
.nav-stryder:hover .nav-stryder-default { display: none; }
.nav-stryder:hover .nav-stryder-hover { display: inline; }
.nav-stryder:hover { color: var(--grey); }
.nav.is-open .nav-dropdown {
  transform: translateY(0);
}
.nav.is-open[data-active="products"] .nav-dropdown[data-menu="products"] {
  opacity: 1;
  visibility: visible;
  transition: transform 320ms ease, opacity 200ms ease, visibility 0s;
}
.nav.is-open[data-active="products"] .nav-dropdown[data-menu="products"] {
  display: flex;
}

.page-blur {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
  z-index: 50;
}
.page-blur.is-active { opacity: 1; }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 22px; display: block; }
.nav-logo .logo-mark { display: none; filter: invert(1); }     /* file is white; default to black to match dark nav text */
.page-aipop    .nav:not(.is-scrolled):not(.is-open) .nav-logo .logo-mark,
.page-speedrun .nav:not(.is-scrolled):not(.is-open) .nav-logo .logo-mark,
.page-commitirl .nav:not(.is-scrolled):not(.is-open) .nav-logo .logo-mark { filter: none; }
@media (max-width: 639px) {
  .nav-logo .logo-full { display: none; }
  .nav-logo .logo-mark { display: block; }
}
.nav-links {
  display: flex;
  gap: 40px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav-link {
  background: none;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  cursor: pointer;
  transition: color 180ms ease;
}
.nav-link:focus { outline: none; }
@media (hover: hover) {
  .nav-link:hover { color: var(--grey); }
}
.nav-link.is-current { color: var(--grey); }
/* Active state - only applies while the slider is open */
.nav.is-open[data-active="products"] .nav-link[data-menu="products"] {
  color: var(--grey);
}

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  min-height: min(calc(100vh - 118px), 600px);  /* fills viewport below nav, capped at 600 on tall screens */
  padding-bottom: 60px;                          /* clear space for fixed scroll arrow (40 + 20) */
  display: flex;
  align-items: center;
  background: #DDE3D6;
  z-index: 0;
}
main > section:not(.hero) { position: relative; z-index: 1; }
.hero-inner {
  position: relative;
  width: 100%;
}
.hero-text { position: relative; z-index: 2; }
.hero-tagline {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 32px 0 76px;
}
.hero-visual {
  position: absolute;
  top: 0;
  right: var(--container-pad);
  transform: translateX(-18px);                /* shift left 18px from container edge */
  z-index: 1;
  pointer-events: none;
}
.hero-visual img {
  width: 595px;          /* fixed size on desktop - does not shrink with viewport */
  max-width: none;
  display: block;
}
.hero-visual video {
  width: 1100px;
  max-width: none;
  display: block;
  margin-top: -100px;
  transform: translateX(150px);
}
.hero-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--black);
  border-radius: 0 0 10px 0;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  transition: opacity 200ms ease;
}
.hero-scroll svg {
  width: 21px;
  height: 21px;
  display: block;
  transform: rotate(90deg);
}
@media (max-width: 1199px) {
  .hero-scroll { display: none; }
}

/* =============================================================
   PRODUCTS
   ============================================================= */
.products {
  padding: 0 0 80px;
  position: relative;
  background: #DDE3D6;
}

/* Sideways T-marks at left/right of viewport, aligning with nav crosshair gutters */
.section-mark {
  position: absolute;
  top: -60px;                /* lift into hero, midway between button and section label */
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.section-mark--left  { left:  20px; border-left:  1px solid var(--black); }
.section-mark--right { right: 20px; border-right: 1px solid var(--black); }
.section-mark--hero   { top: 0; }
.section-mark::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--black);
  transform: translateY(-50%);
}
.products .section-label { margin-bottom: 22px; }

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.product-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 40px;
  border: 1px solid var(--black);
  border-radius: 0 0 var(--radius) 0;
  position: relative;
  transition: border-radius 250ms ease;
}
.product-card:hover {
  border-radius: var(--radius);
  z-index: 1;
}
/* Desktop 2x2: collapse touching borders to a single 1px line via overlap */
.product-card:nth-child(2n)  { margin-left: -1px; }   /* col 2 overlaps col 1 */
.product-card:nth-child(n+3) { margin-top: -1px; }    /* row 2 overlaps row 1 */

.product-card img {
  max-height: 64px;
  width: auto;
  opacity: 1;
  transform: scale(0.8);                    /* 20% smaller across all logos, regardless of native size */
  transition: opacity 250ms ease 250ms;     /* fade IN waits for text to fade out */
}
.product-card--green img { transform: scale(0.88); }   /* Vargus a touch bigger to match visual weight */

.product-tagline {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;           /* fade OUT happens first */
}

/* Hover-to-reveal only on devices that actually have hover */
@media (hover: hover) {
  .product-card:hover img {
    opacity: 0;
    transition: opacity 250ms ease;         /* fade OUT happens first */
  }
  .product-card:hover .product-tagline {
    opacity: 1;
    transition: opacity 250ms ease 250ms;   /* fade IN waits for logo to fade out */
  }
}

.product-card--dark  .product-tagline { color: var(--green); }
.product-card--grey  .product-tagline { color: var(--black); }
.product-card--green .product-tagline { color: var(--black); }
.product-card--white .product-tagline { color: var(--black); }
.product-card--pink  .product-tagline { color: var(--black); }
.product-card--dark  { background: var(--black); }
.product-card--grey  { background: var(--grey); }
.product-card--white { background: var(--white); }
.product-card--green { background: var(--green); }
.product-card--pink  { background: #F3DEDF; }

/* =============================================================
   META PILLS
   ============================================================= */
.meta-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  border: 1px solid var(--black);
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  line-height: 1;
  white-space: nowrap;
}
.meta-pill + .meta-pill { margin-left: -1px; }

/* =============================================================
   NEWS CARDS
   ============================================================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.news-card { display: flex; flex-direction: column; gap: 18px; }
.news-media {
  position: relative;
  display: block;
  border-radius: 0 0 var(--radius) 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.news-media img,
.news-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-media video { object-fit: cover; }
.news-media img[src*="news-speedrun-1"] { object-fit: cover; }
.news-arrow {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: 0 0 var(--radius-sm) 0;
  line-height: 1;
}
.news-arrow svg { width: 21px; height: 21px; display: block; }
.news-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.news-copy {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: var(--body-tracking);
  margin: 0;
}

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  background: var(--grey);
  padding: 52px 0 34px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: var(--label-tracking);
  line-height: 1.6;
  text-transform: uppercase;
}

.footer-top { margin-bottom: 30px; }
.footer-top img { height: 32px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr 1fr;
  gap: 0;
  align-items: stretch;
}

.footer-cell {
  border: 1px solid var(--black);
  border-radius: 0 0 var(--radius) 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  margin-left: -1px;        /* collapse adjacent borders to 1px */
  position: relative;
}
.footer-cell:first-child { margin-left: 0; }

.footer-cell p { margin: 0 0 14px; }
.footer-cell p:last-child { margin-bottom: 0; }
.footer-cell a { text-decoration: underline; text-underline-offset: 3px; transition: color 180ms ease; }
.footer a:hover { color: var(--green); }

.footer-heading { text-transform: uppercase; }

.footer-cell--copyright {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
}
.footer-copyright-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  min-height: 96px;
  padding: 22px;
  border-bottom: 1px solid var(--black);
}
.footer-copyright-row:last-child {
  border-bottom: none;
}

.footer-cell--links {
  padding: 0;
}
.footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 96px;
  padding: 22px;
  border-bottom: 1px solid var(--black);
  text-decoration: none;
}
.footer-link:last-child { border-bottom: none; }

.footer-cell--contact .footer-heading {
  margin-bottom: 18px;
}
.footer-cell--contact p:not(.footer-heading),
.footer-cell--contact a {
  text-transform: none;
}
.footer-contact-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: start;
}
.footer-contact-columns p {
  margin: 0;
}
.footer-contact-columns p:last-child {
  justify-self: end;
  text-align: right;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.footer-social-link img {
  width: 16px;
  height: auto;
  display: block;
}
.footer-social-link span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-cell--legal p { margin-bottom: 6px; }

/* =============================================================
   HOME RESPONSIVE
   ============================================================= */
@media (max-width: 1199px) {
  :root {
    --container-pad: 32px;
  }

  .h1 { font-size: 86px; }
  .h2 { font-size: 41px; }

  .hero-visual { position: static; }
  .hero-visual img { width: 100%; max-width: 520px; margin: 0 auto; }
  .hero-visual video { width: 100%; max-width: 624px; margin: -50px auto 0; }
}
@media (min-width: 640px) and (max-width: 1199px) {
  .hero-visual video { max-width: 811px; margin-top: -90px; transform: translateX(0); }

  .news-grid { grid-template-columns: 1fr 1fr; gap: 42px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 0; }
}

/* =============================================================
   PAGE THEMES
   ============================================================= */
.page-hero {
  position: relative;
  padding: 70px 0 100px;
  background: var(--white);                  /* revealed through the rounded corner */
}
.page-team .nav { background: transparent; transition: background-color 250ms ease; }
.page-team .nav.is-open { background: var(--white); }
.page-team .nav.is-scrolled { background: var(--green); }   /* solid green once user scrolls */
.page-roles .nav.is-scrolled { background: #F3DEDF; }
.page-product .nav.is-scrolled { background: var(--white); }
.page-product { background: var(--white); }
.page-product main { background: var(--white); }

/* AI Pop: blue → green → white */
.page-aipop { background: linear-gradient(to bottom, #0A60D9 0, #76FF69 540px, #fff 1080px, #fff 100%); }
.page-aipop main { background: transparent; }
.page-aipop .product-hero { background: transparent; }
.page-aipop .nav.is-scrolled { background: var(--white); }
.page-aipop .nav:not(.is-scrolled):not(.is-open) .nav-logo .logo-full { filter: invert(1); }
.page-aipop .nav:not(.is-scrolled):not(.is-open) .nav-link { color: var(--white); }
.page-aipop .nav:not(.is-scrolled) .frame-marks .mark { border-color: var(--white); }
.page-aipop .nav:not(.is-scrolled) .mark-tc::before,
.page-aipop .nav:not(.is-scrolled) .mark-bc::before { background: var(--white); }
.page-aipop .product-hero .section-mark--left,
.page-aipop .product-hero .section-mark--right { border-color: var(--white); }
.page-aipop .product-hero .section-mark::before { background: var(--white); }
@media (hover: hover) {
  .page-aipop .nav:not(.is-scrolled) .nav-link:hover { color: var(--grey); }
}
@media (min-width: 640px) and (max-width: 1199px) {
  .page-aipop { background: linear-gradient(to bottom, #0A60D9 0, #76FF69 360px, #fff 800px, #fff 100%); }
}
@media (max-width: 639px) {
  .page-aipop { background: linear-gradient(to bottom, #0A60D9 0, #76FF69 280px, #fff 600px, #fff 100%); overflow-x: clip; }
  .page-aipop .product-hero-media .browser-frame {
    width: 180%;
    transform-origin: top left;
  }
}

/* Vargus: animated wireframe terrain (40% black) over a beige→white gradient */
.page-vargus { background: linear-gradient(to bottom, #FBF3E7 0, #FBF3E7 540px, #fff 1080px, #fff 100%); }
@media (min-width: 640px) and (max-width: 1199px) {
  .page-vargus { background: linear-gradient(to bottom, #FBF3E7 0, #FBF3E7 360px, #fff 800px, #fff 100%); }
}
@media (max-width: 639px) {
  .page-vargus { background: linear-gradient(to bottom, #FBF3E7 0, #FBF3E7 220px, #fff 480px, #fff 100%); overflow-x: clip; }
  .page-vargus .product-hero-media .browser-frame {
    width: 180%;
    transform-origin: top left;
  }
}
.page-vargus main { background: transparent; }
.page-vargus .product-hero { background: transparent; position: relative; }
.vargus-terrain {
  position: fixed;
  top: 0;
  left: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}
.page-vargus .vargus-terrain { z-index: -1; }

/* CommitIRL: 4-band gradient fading to white, with a white nav */
.page-commitirl {
  background: linear-gradient(to bottom, #C5382E 0%, #F76F25 6%, #EACC52 13%, #fff 22%, #fff 100%);
}
@media (min-width: 640px) and (max-width: 1199px) {
  .page-commitirl {
    background: linear-gradient(to bottom, #C5382E 0%, #F76F25 5%, #EACC52 10%, #fff 17%, #fff 100%);
  }
}
@media (max-width: 639px) {
  .page-commitirl {
    background: linear-gradient(to bottom, #C5382E 0%, #F76F25 4%, #EACC52 8%, #fff 12%, #fff 100%);
    overflow-x: clip;
  }
  .page-commitirl .product-hero-media .browser-frame {
    width: 180%;
    transform-origin: top left;
  }
}
.page-commitirl main { background: transparent; }
.page-commitirl .product-hero { background: transparent; }
.page-commitirl .product-hero-title { color: var(--white); -webkit-text-stroke-color: var(--white); }
.page-commitirl .product-hero-tagline { color: var(--white); }
.page-commitirl .product-hero-inner .btn-light,
.page-commitirl .product-hero-inner .btn-light .btn-arrow {
  border-color: var(--white);
  color: var(--white);
}
.page-commitirl .nav.is-scrolled { background: var(--white); }
.page-commitirl .nav:not(.is-scrolled):not(.is-open) .nav-logo .logo-full { filter: invert(1); }
.page-commitirl .nav:not(.is-scrolled):not(.is-open) .nav-link { color: var(--white); }
.page-commitirl .nav:not(.is-scrolled) .frame-marks .mark { border-color: var(--white); }
.page-commitirl .nav:not(.is-scrolled) .mark-tc::before,
.page-commitirl .nav:not(.is-scrolled) .mark-bc::before { background: var(--white); }
.page-commitirl .product-hero .section-mark--left,
.page-commitirl .product-hero .section-mark--right { border-color: var(--white); }
.page-commitirl .product-hero .section-mark::before { background: var(--white); }
@media (hover: hover) {
  .page-commitirl .nav:not(.is-scrolled) .nav-link:hover { color: var(--grey); }
}

/* Speedrun-only: black hero fading to white through the hero image */
.page-speedrun { background: linear-gradient(to bottom, #000 0, #000 540px, #fff 1080px, #fff 100%); }
.page-speedrun main { background: transparent; }
.page-speedrun .product-hero { background: transparent; }
.page-speedrun .product-hero-title { color: var(--white); -webkit-text-stroke-color: var(--white); }
.page-speedrun .product-hero-tagline { color: var(--white); }
.page-speedrun .product-hero-inner .btn-light,
.page-speedrun .product-hero-inner .btn-light .btn-arrow {
  border-color: var(--white);
  color: var(--white);
}
.page-speedrun .nav:not(.is-scrolled):not(.is-open) .nav-logo .logo-full { filter: invert(1); }
.page-speedrun .nav:not(.is-scrolled):not(.is-open) .nav-link { color: var(--white); }
.page-speedrun .nav:not(.is-scrolled) .frame-marks .mark { border-color: var(--white); }
.page-speedrun .nav:not(.is-scrolled) .mark-tc::before,
.page-speedrun .nav:not(.is-scrolled) .mark-bc::before { background: var(--white); }
@media (hover: hover) {
  .page-speedrun .nav:not(.is-scrolled) .nav-link:hover { color: var(--grey); }
}
@media (max-width: 1199px) {
  .page-speedrun { background: linear-gradient(to bottom, #000 0, #000 460px, #fff 920px, #fff 100%); }
}
@media (min-width: 640px) and (max-width: 1199px) {
  .page-speedrun { background: linear-gradient(to bottom, #000 0, #000 360px, #fff 800px, #fff 100%); }
}
@media (max-width: 639px) {
  .page-speedrun { background: linear-gradient(to bottom, #000 0, #000 280px, #fff 600px, #fff 100%); }
  .product-pitch .h2 { font-size: 35px; line-height: 1.1; white-space: normal !important; }
  .page-speedrun .product-hero-media .browser-frame {
    width: 180%;
    transform-origin: top left;
  }
  .page-speedrun { overflow-x: clip; }
}

/* On the news pages, the nav is white */
.page-news .nav,
.page-article .nav { background: var(--white); }

.page-hero::before {
  content: "";
  position: absolute;
  inset: -118px 0 0 0;                       /* extend 118px up so image reaches viewport top */
  background:
    url('../Assets/3d-white-centre.png') right top / auto 100% no-repeat,
    #F3DEDF;
  border-radius: 0 0 40px 0;
  z-index: 0;
  pointer-events: none;
}
.page-roles .page-hero::before { background: #F3DEDF; }
.page-roles { overflow-x: clip; }
.page-roles main { background: var(--white); }
.page-roles .page-hero { overflow: clip; }
.page-roles .roles-list {
  position: relative;
  background: var(--white);
  border-radius: 0 0 40px 0;
}
.page-roles .roles-list::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 40px;
  height: 40px;
  background: var(--green);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle 40px at 0 0, transparent 40px, #000 40px);
  mask-image: radial-gradient(circle 40px at 0 0, transparent 40px, #000 40px);
}
.page-roles .page-hero .roles-cubes {
  position: absolute;
  inset: -118px 0 -400px -50vw;
  background: url('../Assets/cube-pyramid.png') right -100px / auto 78% no-repeat;
  transform: rotate(-20deg);
  transform-origin: right top;
  z-index: 0;
  pointer-events: none;
}
.page-roles .page-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 40px;
  height: 40px;
  background: var(--white);
  z-index: 2;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle 40px at 0 0, transparent 40px, #000 40px);
  mask-image: radial-gradient(circle 40px at 0 0, transparent 40px, #000 40px);
}
.page-roles main > section:not(.page-hero) { position: relative; z-index: 1; }
@media (max-width: 639px) {
  .page-roles .page-hero .roles-cubes {
    background: url('../Assets/cube-pyramid.png') right 20px / auto 67% no-repeat;
  }
}
.page-hero > *:not(.section-mark) { position: relative; z-index: 1; }
.page-hero .container { width: 100%; }
.page-hero .section-label { margin-bottom: 36px; }
.page-hero .h1 { margin-bottom: 36px; }
.page-intro {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  max-width: 640px;
  margin: 0 0 56px;
}
@media (min-width: 1200px) {
  .page-intro { max-width: 90%; }
}
.page-intro a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Active state in nav dropdown */
.nav-dropdown a.is-current { color: var(--grey); font-weight: 600; }

@media (max-width: 1199px) {
  .page-hero   { min-height: auto; padding: 80px 0 60px; }
}

@media (max-width: 639px) {
  .page-intro  { font-size: 18px; }
  .page-hero::before {
    background-position: calc(100% + 700px) top, 0 0;
  }
}

/* =============================================================
   KERVA BLOG LISTING PAGE
   ============================================================= */
.newsroom-header {
  padding: 72px 0 78px;
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
}
.newsroom-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.88fr);
  gap: clamp(56px, 8vw, 150px);
  align-items: start;
}
.newsroom-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(62px, 7vw, 110px);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
  text-align: left;
  -webkit-text-stroke: 1px currentColor;
  paint-order: stroke fill;
}
.newsroom-intro {
  max-width: 620px;
  margin: 24px 0 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: var(--body-tracking);
  color: rgba(0, 0, 0, 0.72);
}
.newsroom-contact-list {
  border-top: 1px solid rgba(0, 0, 0, 0.18);
}
.newsroom-contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  color: rgba(0, 0, 0, 0.68);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  text-decoration: none;
}
.newsroom-contact-row:hover {
  color: var(--black);
}
.newsroom-contact-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: inherit;
  white-space: nowrap;
}
.newsroom-contact-value svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.featured-article { padding: 40px 0 50px; background: var(--white); }
.featured-article--news { padding: 76px 0 72px; }
.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.featured-article--news .featured-media {
  grid-column: 1;
  grid-row: 1;
}
.featured-article--news .featured-text {
  grid-column: 2;
  grid-row: 1;
}
.featured-text .section-label { margin-bottom: 28px; }
.featured-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 47px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  -webkit-text-stroke: 1px var(--black);
}
.featured-date {
  display: block;
  margin: -14px 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.62);
}
.featured-summary {
  max-width: 620px;
  margin: -12px 0 32px;
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: rgba(0, 0, 0, 0.74);
}
.featured-media {
  display: block;
  border-radius: 0 0 var(--radius) 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Article list rows */
.article-list { padding: 40px 0 48px; background: var(--white); }
.article-list--news { padding-top: 40px; }
.article-list .section-label { margin-bottom: 32px; }
.article-rows { list-style: none; padding: 0; margin: 0; }
.article-rows > li { border-top: 1px solid rgba(0, 0, 0, 0.1); }
.article-row {
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  align-items: center;
  gap: 32px;
  padding: 24px 0;
  text-decoration: none;
  color: var(--black);
}
.article-thumb {
  width: 120px;
  aspect-ratio: 4 / 3;
  border-radius: 0 0 var(--radius-sm) 0;
  overflow: hidden;
}
.article-thumb img,
.article-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-row-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0;
}
.article-row-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  white-space: nowrap;
}
.article-row-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--black);
  border-radius: 0 0 var(--radius-sm) 0;
}
.article-row-arrow svg { width: 21px; height: 21px; display: block; }
.article-row:hover .article-row-arrow svg {
  animation: arrow-bounce 0.6s ease-in-out infinite;
}
.article-row--summary {
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 44px;
  padding: 36px 0;
}
.article-row--summary .article-thumb {
  width: 100%;
  border-radius: 0 0 var(--radius) 0;
}
.article-row-content {
  min-width: 0;
  max-width: 680px;
}
.article-row--summary .article-row-title {
  font-size: 31px;
  line-height: 1.15;
  margin-bottom: 14px;
}
.article-row--summary .article-row-meta {
  display: inline-block;
  margin-bottom: 12px;
  color: rgba(0, 0, 0, 0.62);
}
.article-row-summary {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  margin: 0;
  color: rgba(0, 0, 0, 0.74);
}

/* =============================================================
   PILLARS
   ============================================================= */
.pillars { padding: 80px 0 60px; background: var(--white); }
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.pillar-card {
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: 0 0 var(--radius) 0;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}
.pillar-card:nth-child(n+2) { margin-left: -1px; }
.pillar-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 12ch;
}
.pillar-body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: var(--body-tracking);
  margin: 0;
}
@media (max-width: 1199px) {
  .pillars { padding: 60px 0 40px; }
  .pillars-grid { grid-template-columns: 1fr; gap: 0; }
  .pillar-card { padding: 32px; gap: 20px; }
  .pillar-card:nth-child(n+2) { margin-left: 0; margin-top: -1px; }
  .pillar-title { font-size: 26px; max-width: none; }
}
@media (max-width: 639px) {
  .pillars { padding: 40px 0 20px; }
  .pillar-card { padding: 28px; }
  .pillar-title { font-size: 22px; }
}

/* =============================================================
   COMPANY PAGE
   ============================================================= */
.page-company { background: var(--grey); overflow-x: clip; }
.page-company main {
  background: var(--white);
  border-radius: 0 0 40px 0;
}
.page-company .nav {
  background: #DDE3D6;
  transition: background-color 250ms ease;
}
.page-company .nav.is-open { background: #DDE3D6; }
.page-company .nav.is-scrolled { background: #DDE3D6; }

.company-hero {
  background: #DDE3D6;
}
.company-hero-inner {
  display: block;
  position: relative;
}
.company-hero-copy { max-width: none; }
.company-hero-copy {
  position: relative;
  z-index: 2;
}
.company-hero-visual {
  z-index: 1;
}
.page-company .company-hero .h1 {
  font-size: 124px;
  max-width: 15em;
  margin-bottom: 0;
  text-wrap: balance;
}
.page-company .company-hero .hero-tagline {
  max-width: 460px;
  margin: 32px 0 76px;
}

.company-thesis,
.company-operated {
  padding: 104px 0;
  background: var(--white);
}
.company-split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 88px;
  align-items: start;
}
.company-split .section-label,
.company-section-head .section-label,
.company-layer-copy .section-label,
.company-pillars .section-label { margin-bottom: 28px; }
.company-copy-stack,
.company-layer-copy,
.company-section-head {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: var(--body-tracking);
}
.company-copy-stack p,
.company-layer-copy p,
.company-section-head p { margin: 0; }
.company-copy-stack p + p,
.company-layer-copy p + p { margin-top: 24px; }

.company-layer {
  padding: 104px 0;
  background: var(--white);
  border-radius: 0 0 40px 0;
}
.company-layer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.company-layer-media {
  border-radius: 0 0 var(--radius) 0;
  overflow: hidden;
}
.company-layer-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.company-layer-media--contained {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2vw, 28px);
}
.company-layer-media--contained img {
  width: 92%;
  max-width: 620px;
  aspect-ratio: auto;
  object-fit: contain;
}
.company-layer-copy .h2,
.company-section-head .h2 { margin-bottom: 28px; }

.company-pillars {
  padding: 104px 0;
}
.company-pillars .pillars-grid { margin-top: 28px; }

.company-products {
  padding: 104px 0;
  background: var(--white);
}
.company-section-head {
  max-width: 900px;
  margin-bottom: 44px;
}
.company-pillars .company-section-head {
  max-width: none;
}
.company-products .company-section-head {
  max-width: none;
}
.company-product-grid .product-card {
  min-height: 210px;
}
.company-product-wordmark {
  font-family: var(--font-mono);
  font-size: 26px;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  transition: opacity 250ms ease 250ms;
}
@media (hover: hover) {
  .company-product-grid .product-card:hover .company-product-wordmark {
    opacity: 0;
    transition: opacity 250ms ease;
  }
}

.company-operated {
  background: var(--white);
  border-radius: 0 0 40px 0;
}
.page-company .company-operated.company-why-us {
  background: #DDE3D6;
}
.page-company .company-why-us .company-copy-stack .btn {
  margin-top: 18px;
}

@media (max-width: 1199px) {
  .company-split,
  .company-layer-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .page-company .company-image-copy {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .page-company .company-hero .h1 {
    font-size: 76px;
    max-width: 13em;
  }
  .company-thesis,
  .company-layer,
  .company-pillars,
  .company-products,
  .company-operated {
    padding: 72px 0;
  }
}
@media (max-width: 639px) {
  .page-company .company-hero .h1 {
    font-size: 56px;
    max-width: 100%;
  }
  .page-company .company-hero .hero-tagline {
    max-width: 22em;
    margin: 12px 0 28px;
  }
  .company-copy-stack,
  .company-layer-copy,
  .company-section-head {
    font-size: 16px;
    line-height: 1.65;
  }
  .company-thesis,
  .company-layer,
  .company-pillars,
  .company-products,
  .company-operated {
    padding: 52px 0;
  }
  .company-layer-media img { aspect-ratio: 4 / 3; }
  .page-company .company-image-copy {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .company-layer-media--contained {
    padding: 12px;
  }
  .company-layer-media--contained img {
    width: 100%;
    aspect-ratio: auto;
  }
  .company-product-wordmark { font-size: 20px; }
}

/* =============================================================
   PRODUCT PAGE TEMPLATE
   ============================================================= */
.product-hero {
  position: relative;
  padding: 60px 0 40px;
  background: var(--white);
  text-align: center;
}
.product-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.product-hero-logo { width: 96px; height: 96px; display: block; }
.product-hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 80px;
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 8px 0 0;
  -webkit-text-stroke: 1px var(--black);
}
.product-hero-tagline {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: var(--body-tracking);
  margin: 0;
  max-width: 60ch;
}
.product-hero-inner .btn { margin-top: 8px; }
.product-hero-media {
  margin-top: 60px;
  position: relative;
  z-index: 2;              /* let the browser-frame's drop shadow paint over the next section */
}
.product-hero { z-index: 2; }
.page-product .product-hero,
.page-product .product-hero-media { z-index: 5; }
@media (min-width: 1200px) {
  .product-hero-media .browser-frame { width: 80%; margin: 0 auto; }
}

/* Simplified macOS Safari window mock */
.browser-frame {
  border-radius: 12px;
  overflow: hidden;
  background: #f4f4f5;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}
.browser-frame-bar {
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 14px;
  background: #ECECEE;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px 12px 0 0;
}
.browser-frame-dots { display: inline-flex; gap: 4px; flex-shrink: 0; }
.browser-frame-dots span { width: 8px; height: 8px; border-radius: 50%; display: block; }
.browser-frame-dots span:nth-child(1) { background: #ff5f57; }
.browser-frame-dots span:nth-child(2) { background: #febc2e; }
.browser-frame-dots span:nth-child(3) { background: #28c840; }
.browser-frame-url {
  flex: 1;
  max-width: 320px;
  margin: 0 auto;
  height: 22px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 10px;
  color: rgba(0,0,0,0.75);
}
.browser-frame-content {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: top center;
}
.product-feature-media .browser-frame-content { aspect-ratio: 16 / 9; }
.product-feature-media--bare img {
  width: 100%;
  display: block;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.product-pitch { padding: 100px 0 60px; background: var(--white); text-align: center; }
.product-pitch .h2 { max-width: none; margin: 0 auto; white-space: nowrap; -webkit-text-stroke: 1px var(--black); }

.product-features { padding: 10px 0 100px; margin-top: -12px; background: var(--white); }
.product-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 25px 0;
}
.product-feature-text { max-width: 70ch; }
.product-feature--media-left .product-feature-text { justify-self: end; }
.product-feature-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.product-feature-body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: var(--body-tracking);
  margin: 0;
}
@media (max-width: 1199px) {
  .product-hero { padding: 40px 0 30px; }
  .product-hero-logo { width: 72px; height: 72px; }
  .product-hero-title { font-size: 60px; }
  .product-hero-tagline { font-size: 18px; }
  .product-hero-media { margin-top: 40px; }

  .product-pitch { padding: 70px 0 10px; }

  .product-features { padding: 20px 0 80px; }
  .product-feature { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .product-feature--media-left .product-feature-media { order: -1; }
  .product-feature--text-left  .product-feature-media { order: -1; }
  .product-feature-text { max-width: none; justify-self: stretch !important; }
  .product-feature-title { font-size: 26px; }
  .product-feature-media img { aspect-ratio: 4 / 3; }
}
@media (max-width: 639px) {
  .product-hero { padding: 24px 0 20px; }
  .product-hero-logo { width: 60px; height: 60px; }
  .product-hero-title { font-size: 44px; }
  .product-hero-tagline { font-size: 16px; margin-top: -12px; }
  .product-hero-media { margin-top: 28px; }

  .product-pitch { padding: 50px 0 30px; }

  .product-features { padding: 10px 0 60px; }
  .product-feature { padding: 28px 0; gap: 20px; }
  .product-feature-title { font-size: 22px; margin-bottom: 14px; }
  .product-feature-body { font-size: 15px; }
}

/* =============================================================
   ROLES PAGE
   ============================================================= */
.roles-list { padding: 60px 0 80px; background: var(--white); }
.roles-list .section-label { margin-bottom: 32px; }
.role-rows { list-style: none; padding: 0; margin: 0; }
.roles-empty {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.roles-empty-body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: var(--body-tracking);
  margin: 0;
  max-width: 60ch;
}
.roles-empty-body a { text-decoration: underline; }
@media (max-width: 1199px) {
  .roles-empty { font-size: 20px; }
}
@media (max-width: 639px) {
  .roles-empty { font-size: 17px; }
  .roles-empty-body { font-size: 15px; }
}
.role-rows > li { border-top: 1px solid rgba(0, 0, 0, 0.1); }
.role-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 28px 0;
  text-decoration: none;
  color: var(--black);
}
.role-row-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0;
}
.role-row-cta {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  white-space: nowrap;
}
.role-row-cta > span:first-child {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--black);
}
.role-row-cta .btn-arrow {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--black);
  border-radius: 0 0 var(--radius-sm) 0;
  margin-left: -1px;
}
.role-row-cta .btn-arrow svg { width: 18px; height: 18px; display: block; }
.role-row:hover .btn-arrow svg { animation: arrow-bounce 0.6s ease-in-out infinite; }

/* FAQ */
.what-to-know { padding: 60px 0 100px; background: #E4EADC; border-radius: 0 0 40px 0; }
.what-to-know .section-label { margin-bottom: 24px; }
.what-to-know .h2 { margin-bottom: 48px; max-width: 18ch; -webkit-text-stroke: 1px var(--black); }
.faq-list { display: flex; flex-direction: column; interpolate-size: allow-keywords; }
.faq-item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 500ms ease, content-visibility 500ms allow-discrete;
}
.faq-item[open]::details-content { block-size: auto; }
.faq-item {
  border: 1px solid var(--black);
  border-radius: 0 0 var(--radius) 0;
  background: #E4EADC;
}
.faq-item + .faq-item { margin-top: -1px; }
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 24px 28px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-q {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.faq-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--black);
  border-radius: 0 0 var(--radius-sm) 0;
  background: #E4EADC;
  transition: transform 200ms ease;
}
.faq-icon svg { width: 18px; height: 18px; display: block; }
.faq-item[open] .faq-icon svg line:last-child { display: none; }
.faq-a {
  padding: 0 28px 24px 28px;
  max-width: 80ch;
}
.faq-a p {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: var(--body-tracking);
  margin: 0;
}

@media (max-width: 1199px) {
  .roles-list { padding: 45px 0 60px; }
  .role-row { padding: 22px 0; gap: 20px; }
  .role-row-title { font-size: 20px; }
  .what-to-know { padding: 40px 0 60px; }
  .what-to-know .h2 { margin-bottom: 32px; }
  .faq-item > summary { padding: 22px 24px; gap: 20px; }
  .faq-a { padding: 0 24px 22px 24px; }
  .faq-q { font-size: 18px; }
}
@media (max-width: 639px) {
  .roles-list { padding: 36px 0 40px; }
  .role-row { padding: 18px 0; gap: 14px; }
  .role-row-title { font-size: 17px; line-height: 1.35; }
  .role-row-cta > span:first-child { display: none; }
  .role-row-cta .btn-arrow { width: 32px; height: 32px; }
  .role-row-cta .btn-arrow svg { width: 14px; height: 14px; }
  .what-to-know { padding: 30px 0 40px; }
  .faq-item > summary { padding: 18px 20px; gap: 14px; }
  .faq-a { padding: 0 20px 18px 20px; }
  .faq-q { font-size: 16px; }
  .faq-icon { width: 32px; height: 32px; }
  .faq-icon svg { width: 14px; height: 14px; }
  .faq-a p { font-size: 15px; }
}

/* =============================================================
   ARTICLE DETAIL PAGE
   ============================================================= */
.article { background: var(--white); }
.article-header { padding: 60px 0 40px; }
.article-news-label {
  display: flex;
  justify-content: center;
  margin: 0 0 34px;
}
.page-news-article .article-header > .container:first-child {
  max-width: calc(var(--container-max) * 0.75);
}
.page-news-article .article-news-label {
  justify-content: flex-start;
  margin-bottom: 28px;
  font-size: 14px;
}
.page-news-article .article-title {
  width: auto;
  max-width: min(100%, 13.5em);
  font-size: clamp(42px, 4.7vw, 78px);
  line-height: 1.03;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
  white-space: normal;
  text-wrap: balance;
}
.article-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 67px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 auto 56px;
  max-width: 1100px;
  text-align: center;
}
.article-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
}
@media (min-width: 1200px) {
  .article-meta-row {
    max-width: 75%;                    /* match the hero image width */
    margin: 0 auto 30px;
    justify-content: space-between;
  }
}

/* Pill group - pills touch with a single shared 1px border */
.meta-pill-group { display: inline-flex; }
.meta-pill-group .meta-pill + .meta-pill { margin-left: -1px; }

/* Back button - height matches the meta pills, arrow box is a square on the LEFT */
.btn--back {
  height: 34px;                             /* matches .meta-pill computed height */
}
.btn--back > span:first-child {
  padding: 0 18px;                          /* matches .meta-pill horizontal padding */
}
.btn-back-short { display: none; }
@media (max-width: 639px) {
  .btn-back-long  { display: none; }
  .btn-back-short { display: inline; }
}
.btn--back .btn-arrow {
  order: -1;                                /* arrow flexes to the left */
  width: 34px;                              /* square - matches button height */
  border-left: none;
  border-right: 1px solid var(--black);
  border-radius: 0;                         /* no rounded corner on the left-side arrow */
}
.btn--back .btn-arrow svg { width: 16px; height: 16px; }
@keyframes arrow-bounce-left {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-5px); }
}
.btn--back:hover .btn-arrow svg {
  animation: arrow-bounce-left 0.6s ease-in-out infinite;
}
.article-hero-image {
  margin-bottom: 42px;
}
.article-hero-image img,
.article-hero-image video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0 0 var(--radius) 0;
  display: block;
}
.article-hero-image.article-hero-image--wide img {
  aspect-ratio: unset;
  height: auto;
  object-fit: contain;
}
@media (min-width: 1200px) {
  .article-hero-image img,
  .article-hero-image video {
    width: 75%;
    margin: 0 auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    height: auto;
  }
  .article-hero-image.article-hero-image--wide img {
    aspect-ratio: unset;
    object-fit: contain;
  }
}

.article-body { padding: 20px 0 60px; }
.article-body .container { max-width: 800px; margin: 0 auto; }
.article-body .container > p:first-of-type { font-weight: 600; }
.article-body p {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.8;
  letter-spacing: var(--body-tracking);
  margin: 0 0 28px;
}
.article-body h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 56px 0 28px;
}
.article-body h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 36px 0 18px;
}
.article-body ul,
.article-body ol {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: var(--body-tracking);
  padding-left: 22px;
  margin: 0 0 28px;
}
.article-body li { margin: 0 0 8px; }
.article-body li:last-child { margin-bottom: 0; }
.article-body strong { font-weight: 600; }
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
}
.article-body a { text-decoration: underline; }
.page-legal .article-body .container > p:first-of-type { font-weight: 400; }
.article-meta-row--centered { justify-content: center !important; }
.page-legal .article-header { padding-bottom: 0; }
.page-legal .article-title { -webkit-text-stroke: 1px var(--black); }
.article-figure {
  margin: 48px 0;
}
.article-figure img,
.article-figure video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0 0 var(--radius) 0;
  display: block;
  margin-bottom: 12px;
}
.article-figure figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  color: var(--black);
  opacity: 0.7;
}
.article-quote-meta {
  display: block;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  -webkit-text-stroke: 0;
}
.article-quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  -webkit-text-stroke: 1px var(--black);
  margin: 56px 0;
  padding: 24px 0 24px 32px;
  border-left: 1px solid var(--black);
}

.related-articles { padding: 80px 0 120px; background: var(--white); border-top: 1px solid rgba(0,0,0,0.08); }
.related-articles .section-label { margin-bottom: 24px; }
.related-articles .h2 {
  margin-bottom: 48px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
@media (max-width: 639px) {
  .related-articles .h2 { font-size: 28px; }
}

/* Tablet - news + article */
@media (max-width: 1199px) {
  .featured { grid-template-columns: 1fr; gap: 0; }
  .featured-text { display: contents; }
  .featured-media                { order: 1; margin-bottom: 28px; }
  .featured-title                { order: 2; }
  .featured-date                 { order: 3; margin: -8px 0 14px; }
  .featured-summary              { order: 4; margin: 0 0 24px; font-size: 17px; }
  .featured-text .btn            { order: 5; justify-self: start; width: fit-content; }
  .featured-media { aspect-ratio: 4 / 3; max-width: 720px; }
  .featured-title { font-size: 39px; }
  .article-row { grid-template-columns: 80px 1fr auto; gap: 20px; }
  .article-thumb { width: 80px; }
  .article-row-meta { display: none; }   /* hide date on tablet to fit */
  .article-row-title { font-size: 18px; }
  .article-row--summary { grid-template-columns: 170px 1fr auto; gap: 28px; padding: 30px 0; }
  .article-row--summary .article-thumb { width: 100%; }
  .article-row--summary .article-row-title { font-size: 24px; line-height: 1.2; margin-bottom: 10px; }
  .article-row--summary .article-row-meta { display: inline-block; margin-bottom: 8px; }
  .article-row-summary { font-size: 16px; line-height: 1.45; }
  .article-title { font-size: 64px; }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .newsroom-header-inner {
    grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
    gap: 48px;
  }
  .newsroom-title {
    font-size: 76px;
  }
  .newsroom-contact-row {
    min-height: 52px;
    font-size: 11px;
  }
  .featured-article--news .featured {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
  }
  .featured-article--news .featured-media {
    grid-column: 1;
    grid-row: 1;
    max-width: none;
    margin-bottom: 0;
  }
  .featured-article--news .featured-text {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }
  .featured-article--news .featured-title {
    font-size: 34px;
    line-height: 1.14;
  }
  .featured-article--news .featured-summary {
    font-size: 16px;
  }
}

/* Mobile - news + article */
@media (max-width: 639px) {
  .featured-article  { padding: 24px 0 30px; }
  .newsroom-header { padding: 40px 0 36px; }
  .newsroom-header-inner { grid-template-columns: 1fr; gap: 30px; }
  .newsroom-title { font-size: 56px; }
  .newsroom-intro {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.5;
  }
  .newsroom-contact-row {
    grid-template-columns: 1fr;
    gap: 7px;
    min-height: 0;
    padding: 14px 0;
    font-size: 11px;
  }
  .newsroom-contact-value {
    justify-content: flex-start;
    white-space: normal;
  }
  .newsroom-contact-value svg {
    width: 15px;
    height: 15px;
  }
  .featured-title    { font-size: 31px; }
  .featured-summary  { font-size: 15px; line-height: 1.45; }
  .featured-media    { aspect-ratio: 4 / 3; }

  .article-list      { padding: 30px 0 24px; }
  .article-row       { grid-template-columns: 64px 1fr auto; gap: 14px; padding: 18px 0; }
  .article-thumb     { width: 64px; }
  .article-row-title { font-size: 16px; line-height: 1.35; }
  .article-row-arrow { width: 32px; height: 32px; }
  .article-row-arrow svg { width: 16px; height: 16px; }
  .article-row--summary {
    grid-template-columns: 96px 1fr auto;
    align-items: start;
    gap: 14px;
    padding: 22px 0;
  }
  .article-row--summary .article-thumb {
    width: 100%;
    border-radius: 0 0 var(--radius-sm) 0;
  }
  .article-row--summary .article-row-title {
    font-size: 18px;
    line-height: 1.24;
    margin-bottom: 7px;
  }
  .article-row--summary .article-row-meta {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 11px;
  }
  .article-row-summary {
    font-size: 14px;
    line-height: 1.4;
  }
  .article-row--summary .article-row-arrow {
    margin-top: 2px;
  }

  .article-header    { padding: 40px 0 20px; }
  .article-news-label { justify-content: flex-start; margin-bottom: 24px; }
  .page-news-article .article-header > .container:first-child { max-width: var(--container-max); }
  .page-news-article .article-news-label { font-size: 12px; }
  .page-news-article .article-title { max-width: 100%; font-size: clamp(33px, 10vw, 42px); }
  .article-title     { font-size: 40px; }
  .article-hero-image { margin-bottom: 22px; }
  .article-body p    { font-size: 16px; }
  .article-body h2   { font-size: 28px; margin: 36px 0 20px; }
  .article-quote     { font-size: 22px; padding: 16px 0 16px 20px; margin: 32px 0; }
  .related-articles  { padding: 40px 0 60px; }
}

/* =============================================================
   TABLET ONLY (640-1199px)
   ============================================================= */
@media (min-width: 640px) and (max-width: 1199px) {
  /* Nav - match mobile: no crosshairs; extra 12px green above the logo and below it */
  .nav { padding: 30px 0 30px; top: 0; }
  .nav .frame-marks { display: none; }
  .nav-dropdown { top: 86px; }

  /* Drawer - 20px taller, X 20px further from sub-buttons */
  .nav-expand   { height: 320px; transform: translateY(-322px); }
  .nav-dropdown { transform: translateY(320px); }
  .nav-close    { transform: translateY(320px); }

  /* Hero - headline 15% smaller, pushed down 40px */
  .h1 { font-size: 73px; }
  .hero-text .h1 { margin-top: 40px; }

  /* Product cards - no hover, tagline always shown beneath the logo */
  .product-card {
    flex-direction: column;
    gap: 8px;
    min-height: 240px;
  }
  .product-tagline {
    position: static;
    inset: auto;
    padding: 0;
    opacity: 1;
    font-size: 16px;
  }

  /* Footer - collapse touching borders across wrapped rows */
  .footer-cell { margin-left: 0; margin-top: 0; }
  .footer-cell:nth-child(2n)  { margin-left: -1px; }
  .footer-cell:nth-child(n+3) { margin-top: -1px; }
  .footer-cell:not(:last-child) { border-radius: 0; }

  /* Hero 3D background - shift right on tablet */
  .page-hero::before {
    background-position: calc(100% + 500px) top, 0 0;
  }
}

/* Mobile */
@media (max-width: 639px) {
  :root {
    --container-pad: 20px;
    --radius: 20px;
  }

  .h1 { font-size: 51px; }
  .h2 { font-size: 27px; }

  .nav { padding: 18px 0; }
  .nav .frame-marks { display: none; }
  .nav-links { gap: 20px; }

  .hero { padding: 24px 0 60px; }
  .hero-tagline { margin: 24px 0 48px; }
  .hero-text .h1 { margin-top: 60px; }
  .hero-visual video { max-width: 811px; margin-top: -50px; transform: translateX(10px); }
  .page-company .company-hero-visual {
    width: calc(100vw - 40px);
    max-width: none;
    overflow: hidden;
  }
  .page-company .company-hero-visual video {
    width: 118%;
    max-width: none;
    margin-top: 0;
    transform: translateX(-9%);
  }
  /* Mobile-only: shift hero crosshairs down 20px */
  .section-mark--hero { top: 20px; }
  .hero .hero-inner { display: flex; flex-direction: column; }
  .hero .hero-text { display: contents; }
  .hero .hero-text .h1 { order: 1; }
  .hero .hero-text .hero-tagline { order: 2; }
  .hero .hero-visual { order: 3; }
  .hero .hero-text > .btn { order: 4; margin-top: 24px; margin-bottom: 20px; align-self: flex-start; }

  .product-grid { grid-template-columns: 1fr; }
  .product-card {
    min-height: 200px;
    padding: 36px 24px;
    flex-direction: column;
    gap: 2px;
  }
  /* Mobile single-column: every card (after first) overlaps the previous on the top edge */
  .product-card:nth-child(2n)  { margin-left: 0; }
  .product-card:nth-child(n+3) { margin-top: 0; }
  .product-card:nth-child(n+2) { margin-top: -1px; }

  .product-tagline {
    position: static;
    inset: auto;
    padding: 0;
    opacity: 1;
    font-size: 13px;
  }

  .news-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  /* Stacked: cell above's bottom border is the divider - drop top border on cells 2+ */
  .footer-cell { margin-left: 0; margin-top: 0; }
  .footer-cell:not(:first-child) { border-top: none; }
  .footer-contact-columns { grid-template-columns: 1fr; gap: 14px; }
  /* Only the last stacked cell keeps the rounded bottom-right; others stay square so the right border runs uninterrupted */
  .footer-cell:not(:last-child) { border-radius: 0; }
  main { border-radius: 0 0 60px 0; }
}
