/* The company pages' palette (start.mjs brand, from docs/brand.md) and page CSS.
   Loaded after the design kit in public/assets; see app/components/Kit.tsx. */
:root {
  --p-bg: #f7f9fc;
  --p-surface: #dce6ff;
  --p-ink: #13213b;
  --p-muted: #5a667a;
  --p-accent: #315eea;
  --p-accent-ink: #f7f9fc;
  --p-action: #315eea;
  --p-action-ink: #f7f9fc;
  --p-inv-bg: #13213b;
  --p-inv-surface: #202e47;
  --p-inv-ink: #f7f9fc;
  --p-inv-muted: #98a0ae;
  --p-inv-accent: #f7f9fc;
  --p-inv-accent-ink: #13213b;
  --p-inv-action: #f7f9fc;
  --p-inv-action-ink: #13213b;
  --font-display: "Epilogue", system-ui, sans-serif;
  --font-text: "Epilogue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 400;
  --display-tracking: -0.035em;
  --display-tracking-xl: -0.045em;
  --ly-scale: 0.97;
}

/* Below 1024 the Work menu is a list (system.css hides its pictures when open); Navigation.tsx gives
   phones a blank picture source, so the artwork is never downloaded there. */
@media (max-width: 1023px) {
  .nav .menu-card .panel {
    display: none;
  }
}
.menu-card picture.frame__img > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The logo is the client's lockup file (docs/brand.md); its SVG carries its own clear space. */
.nav__logo img {
  display: block;
  height: 40px;
  width: auto;
}
/* On a phone the logo, the button and the menu do not fit one bar: the hero carries the button there. */
@media (max-width: 639px) {
  .nav:not(.is-open) .nav__actions {
    display: none;
  }
  .nav:not(.is-open) .nav__actions + .nav__toggle {
    margin-left: auto;
  }
}
.footer__legal-links {
  display: inline-flex;
  gap: var(--s-5);
}

/* Hero: the generative flight fills the film frame (docs/hero-art.md). */
.hero-space {
  background: #050b1c;
}
.hero-space__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* The pause control takes the film hero's play-control look (layout.css .ly-play__disc and __label);
   its own class, since layout.js hides a .ly-play button that has no film. */
.hero-pause {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.hero-pause .ly-play__label {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--p-inv-bg);
  color: var(--p-inv-ink);
}
.hero-pause:hover .ly-play__disc,
.hero-pause:focus-visible .ly-play__disc {
  transform: scale(1.06);
}
@media (max-width: 1023px) {
  /* above the words' box, on the picture, at its right edge */
  .hero-pause {
    position: absolute;
    right: var(--s-4);
    bottom: calc(100% - var(--s-2));
  }
  .hero-pause .ly-play__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Process: the Three.js flight. Four screens live; the .wrap (the scene and the words) sticks for three of them. */
#process {
  --h: 4;
  padding: 0;
  background: #050b1c;
  overflow-x: clip;
}
#process > .flight__wrap {
  position: sticky;
  top: 0;
  height: 100svh;
  z-index: 1;
}
/* The stage runs the full screen width behind the words from inside the .wrap. */
.flight__stage {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  overflow: hidden;
  background: #050b1c;
}
.flight__still {
  position: absolute;
  right: 0;
  top: 0;
  width: 64%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
@media (max-width: 899px) {
  .flight__still {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 46%;
  }
}
.flight[data-state="failed"] .flight__canvas {
  visibility: hidden;
}
.flight__words {
  position: relative;
  padding-top: var(--padt);
}
.flight__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* From 900px the words keep the left side: the scene starts beside them and fades in, so nothing moves under the text. */
@media (min-width: 900px) {
  .flight__canvas {
    left: 36%;
    width: 64%;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 22%);
    mask-image: linear-gradient(to right, transparent, #000 22%);
  }
}
.flight__words {
  position: relative;
  z-index: 1;
  padding-top: var(--padt);
}
.flight__words h2 {
  max-width: 13ch;
}
.flight__steps {
  list-style: none;
  padding: 0;
  margin: var(--s-7) 0 0;
  display: grid;
  gap: var(--s-5);
  max-width: 410px;
}
.flight__step {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: var(--s-3);
  color: var(--p-inv-muted);
  transition: color var(--m-image) var(--ease);
}
.flight__title {
  font-size: var(--t-card, 20px);
  font-weight: 500;
  line-height: 1.3;
}
.flight__body {
  grid-column: 2;
  margin-top: var(--s-2);
}
.flight__num {
  font-family: var(--font-mono);
  font-size: 14px;
  padding-top: 4px;
}
.flight__step[data-active] {
  color: var(--p-inv-ink);
}
.flight__step[data-active] .flight__num {
  color: #6d8cff;
}
.flight[data-state="still"] .flight__step,
.flight[data-state="poster"] .flight__step {
  color: var(--p-inv-ink);
}
@media (max-width: 899px) {
  .flight__canvas {
    top: auto;
    bottom: 0;
    height: 46%;
  }
  .flight__steps {
    gap: var(--s-3);
    max-width: none;
  }
  .flight[data-state="live"] .flight__step:not([data-active]) .flight__body {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #process {
    --h: 1;
  }
  .flight__stage {
    position: relative;
  }
}

/* Services: the three questions each service starts with, on a lit panel. */
#services .panel {
  --p-h: 272px;
}
/* Below 1280 the four cards no longer fit one screen: two screens, two cards a row. */
@media (min-width: 640px) and (max-width: 1279px) {
  #services {
    --h: 2;
  }
  #services .service {
    grid-column: span 6;
  }
}
@media (max-width: 639px) {
  #services {
    --hm: 2;
  }
  #services .panel {
    --p-h: 150px;
  }
  #services .service__questions li:nth-child(n + 3) {
    display: none;
  }
}
.service__panel {
  padding: var(--s-5);
  display: flex;
  align-items: flex-start;
}
.service__questions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
  font-size: 13px;
  line-height: 1.4;
  width: 100%;
}
.service__questions li {
  position: relative;
  padding: 8px 10px 8px 28px;
  background: #fff;
  color: var(--p-ink);
  border-radius: var(--r-sm);
  border: 1px solid rgb(19 33 59 / 0.12);
}
.service__questions li::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #315eea;
}

/* Statement: the liquid-type moment. */
.statement__type {
  font-size: clamp(44px, 8vw, 128px);
  line-height: 0.98;
  letter-spacing: var(--display-tracking-xl);
  max-width: 14ch;
}
.statement__body {
  margin-top: var(--s-8);
  row-gap: var(--s-5);
}

/* Work: product artwork at its own 1.91:1 ratio. */
#work .panel {
  --p-h: auto;
}
/* The card keeps the artwork's own shape at every screen size: it never grows to fill the screen,
   which would crop the artwork's words and mark. */
#work .grid {
  align-content: start;
}
/* the shorter summary grows, so both cards' artwork starts on one line */
#work .product > p {
  flex-grow: 1;
}
#work .product > .product__art {
  flex: 0 0 auto;
  aspect-ratio: 3420 / 1792;
  height: auto;
}
.product__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.work__more {
  list-style: none;
  margin: var(--s-6) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--s-5);
}
.work__more li {
  border-top: 1px solid rgb(19 33 59 / 0.14);
}
.work__row {
  display: grid;
  gap: 2px;
  padding: 12px 0 0;
  font-size: 15px;
  line-height: 1.4;
}
.work__name {
  font-weight: 500;
}
@media (max-width: 1023px) {
  .work__more {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--s-4);
  }
}
@media (max-width: 639px) {
  .work__more {
    display: none;
  }
  #work .product p {
    display: none;
  }
}

/* Subpages: a split hero, then one section per screen (services, work, about, contact). */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  list-style: none;
  margin: 0 0 var(--s-5);
  padding: 0;
  font-size: var(--t-small);
  color: var(--muted);
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: var(--s-2);
}
.breadcrumbs a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--dur) var(--ease);
}
.breadcrumbs a:hover {
  text-decoration-color: currentColor;
}
.hero__media:has(> .space-still) {
  background: #050b1c;
}
.space-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Work: the four lead products' artwork as one 2 x 2 picture. */
.work-art {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: var(--s-3);
  padding: var(--s-3);
}
.hero__media.work-art > img {
  position: static;
  width: 100%;
  height: auto;
  aspect-ratio: 3420 / 1792;
  object-fit: cover;
  border-radius: var(--r-md);
}
/* centred in the screen: the id-less selector needs main > to outrank the kit's align-content: start */
main > .sub > .wrap.grid {
  align-items: center;
  align-content: center;
}
.project__art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
}
.ask {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-6);
  border-radius: var(--r-lg);
  background: var(--p-surface);
}
.ground-surface .ask {
  background: var(--p-bg);
}
.steps .rows__name {
  display: flex;
  gap: var(--s-4);
}
.steps__num {
  font-family: var(--font-mono);
  font-size: 14px;
  padding-top: 3px;
  color: #6d8cff;
}
.steps p {
  padding-left: calc(14px * 1.6 + var(--s-4));
}
.contact__email {
  display: inline-block;
  margin-top: var(--s-6);
  font: var(--display-weight) clamp(24px, 2.6vw, 36px) / 1.2 var(--font-display);
  letter-spacing: var(--display-tracking);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.contact__note {
  margin-top: var(--s-5);
}
.contact__note a {
  text-decoration: underline;
}
@media (max-width: 1023px) {
  .sub .wrap.grid > * + * {
    margin-top: var(--s-6);
  }
}

/* Legal pages: one reading column that grows with the text (the id outranks the kit's screen heights). */
main > #doc {
  height: auto;
  min-height: 0;
  padding-top: calc(var(--nav) + var(--s-8));
}
.doc__head,
.doc__body {
  max-width: 720px;
}
.doc__head {
  display: grid;
  gap: var(--s-4);
  padding-bottom: var(--s-7);
  border-bottom: 1px solid var(--line);
}
.doc__head h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
}
.doc__body > section {
  padding-block: var(--s-7) 0;
}
.doc__body h2 {
  font-size: var(--t-h3, 28px);
  line-height: 1.2;
  margin-bottom: var(--s-4);
}
.doc__body p + p,
.doc__body ul + p,
.doc__body p + ul {
  margin-top: var(--s-4);
}
.doc__body ul {
  list-style: disc;
  padding-left: 1.25em;
  display: grid;
  gap: var(--s-2);
}
:is(.doc__head > p, .doc__body) a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
@media (max-width: 639px) {
  /* the hero stays one screen on a phone: the email button carries the address, the X link is in the footer */
  .hero .breadcrumbs ol {
    margin-bottom: var(--s-3);
  }
  .hero .contact__email,
  .contact__note {
    display: none;
  }
}
