/* ------------------------------------------------------------------
   Tokens (from Figma: CP / PT_export)
   ------------------------------------------------------------------ */
:root {
  --bg: #ffffff;
  --bg-soft: #f9f9f9;
  --panel: #fafafa;
  --band: #466282;

  --text-strong: #000000;
  --text: #454545;
  --text-body: #5e5e5e;
  --text-muted: #8a8a8a;
  --text-faint: #b4b4b4;
  --text-ghost: #bdbdbd;
  --btn-text: #111827;
  --accent: #32909e;

  --border: #cacaca;
  --border-btn: #e0e0e0;
  --border-card: #dcdcdc;
  --border-soft: #e1e1e1;
  --border-tab: #d3d3d3;
  --rule: #d0d0d0;
  --divider: #e6e6e6;

  /* Component surfaces (solid, as in Figma) */
  --surface: #fff;
  --surface-strong: #fff;
  --surface-soft: transparent;

  --radius: 8px;
  --shadow-field: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-btn: 0 4px 6px rgba(0, 0, 0, 0.08);

  --font-body: 'Manrope', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, sans-serif;

  --column: 398px;
  --page: 1232px;
  --gutter: 24px;

  /* Page frame from Figma (1440 wide): every page puts the Header component
     at x 104, y 50, 395 × 55, so the navigation never moves between pages */
  --inset-x: clamp(var(--gutter), 7.22vw, 104px);
  --inset-top: 50px;
  --header-w: 395px;
  --header-h: 55px;
  --header-shadow: 0 4px 16px rgba(0, 0, 0, 0.045), 0 1px 2px rgba(0, 0, 0, 0.04);
  --header-shadow-scrolled: 0 6px 22px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; } /* no sideways jump between short and long pages */

/* --page-bg: the current page's background; the header rests in the same colour */
body {
  --page-bg: var(--bg);
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease;
}
body[data-view='work'] { --page-bg: #f6f6f6; } /* Figma: Case Studies frame */
body[data-view='services'],
body[data-view='about'],
body[data-view='contact'] { --page-bg: var(--bg-soft); }

img { display: block; max-width: 100%; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
main:focus { outline: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------------
   Brand card (Header component)
   ------------------------------------------------------------------ */
.brand {
  /* Stays at its Figma spot (x 104, y 50) while the page scrolls beneath it */
  position: sticky;
  top: var(--inset-top);
  z-index: 30;
  width: var(--header-w);
  max-width: 100%;
  view-transition-name: brand;
}
.brand-card {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header-h);
  padding: 0 18px;
  background: var(--page-bg); /* same grey as the page at rest; white on hover */
  border: 1px solid #ececec; /* lighter hairline, as in the shadow reference (80:7785) */
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s ease, background-color 0.2s ease;
}
/* Tooltip under the resume icon (outside the card, which clips its content) */
.brand-tip {
  position: absolute;
  top: calc(100% + 6px);
  left: 77px; /* centred under the icon */
  transform: translate(-50%, -2px);
  padding: 5px 10px;
  border-radius: 6px;
  background: #4d5858;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.brand:has(.js-cv:hover) .brand-tip,
.brand:has(.js-cv:focus-visible) .brand-tip { opacity: 1; transform: translate(-50%, 0); }
.brand:has(.js-menu[aria-expanded='true']) .brand-tip { display: none; } /* not over the open menu */

/* Once the page has scrolled, the header lifts off the content */
/* Soft floating shadow (Figma reference 80:7785): a wide, very light falloff below,
   a little at the sides, plus a hairline that's slightly darker along the bottom */
.brand-card { box-shadow: var(--header-shadow); }
.is-scrolled .brand-card { background: #faffef; box-shadow: var(--header-shadow-scrolled); } /* pale yellow-green while the page is scrolled */
/* Header hover: turns white (the header rests in the page's own grey) with a soft grey shadow.
   Also while its menu is open or it has keyboard focus. */
.brand-card:hover,
.brand-card:focus-within,
.brand-card:has(.js-menu[aria-expanded='true']) {
  background: #fff;
  box-shadow: var(--header-shadow), 0 3px 5px rgba(206, 206, 206, 0.16);
}
.is-scrolled .brand-card:hover { box-shadow: var(--header-shadow-scrolled), 0 3px 5px rgba(206, 206, 206, 0.16); }
.brand-card .icon-btn:hover { background: rgba(0, 0, 0, 0.05); }
.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.icon-btn:hover { background: #f2f2f2; }
.brand-name {
  font-weight: 600;
  font-size: 24px;
  color: #636363;
  text-decoration: none;
  white-space: nowrap;
  line-height: 32px;
}
.brand-role { color: var(--text-faint); margin-left: 0.45em; }

.site-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  min-width: 200px;
  padding: 6px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-field);
  transform-origin: top left;
  animation: pop-in 0.18s var(--ease-out);
}
.site-menu[hidden] { display: none; }
.site-menu a {
  padding: 9px 12px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  color: var(--btn-text);
  text-decoration: none;
}
.site-menu a:hover,
.site-menu a[aria-current='page'] { background: var(--bg-soft); }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
/* Main button (Figma 7:1265): white → teal on hover */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 12px 24px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12));
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  line-height: normal;
  color: #636363;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover,
.btn:active { background: #5e8f98; color: #fff; } /* border stays #e0e0e0, as in the component */
.btn:focus-visible { outline: 2px solid #5e8f98; outline-offset: 2px; }

/* ------------------------------------------------------------------
   Ask field (Input Field component)
   ------------------------------------------------------------------ */
/* Input Field component (Figma 7:2408): default → hover → focused */
.ask {
  position: relative;
  width: 100%;
  height: 107px;
  background: var(--page-bg);          /* default: the page's own grey, no border, no shadow */
  border: 1px solid transparent;       /* reserved so focusing doesn't shift the content */
  border-radius: var(--radius);
  view-transition-name: ask;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ask:hover { box-shadow: var(--shadow-field); }                                  /* hover */
.ask:focus-within { background: #fff; border-color: #3c8392; box-shadow: var(--shadow-field); } /* focused */
.ask.has-text { background: #fff; }    /* keep typed text on white after leaving the field */

/* Blinking cursor shown while the field is empty and waiting (Figma: 1 × 15 at 12, 12) */
.ask::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 12px;
  width: 1px;
  height: 15px;
  background: var(--text-strong);
  animation: caret 1.1s steps(1) infinite;
  pointer-events: none;
}
.ask:focus-within::before,
.ask.has-text::before { display: none; } /* the real caret takes over */

.ask-input {
  display: block;
  width: 100%;
  height: 66px;
  padding: 10px 44px 0 12px;
  border: 0;
  background: transparent;
  resize: none;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-strong);
  caret-color: var(--text-strong);
}
.ask-input:focus { outline: none; }
.ask-input::placeholder { color: transparent; }
.ask-input:focus::placeholder { color: #c4c4c4; }
.ask-send {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #3c8392;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}
.ask.has-text .ask-send { opacity: 1; transform: none; pointer-events: auto; }
.ask-rule { display: none; } /* the rule is the chip row's top border */

/* Suggestion row: 360 wide, top rule #e0e0e0, 8px padding, chips 19px apart */
.chips {
  position: absolute;
  left: 17px;
  top: 66px;
  display: flex;
  align-items: center;
  gap: 19px;
  width: min(360px, calc(100% - 34px));
  padding: 8px 0;
  border-top: 1px solid #e0e0e0;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 4px 2px;
  border: 0;
  border-radius: 4px;
  background: none;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: normal;
  color: #8a8a8a;
  cursor: pointer;
  transition: color 0.15s ease;
}
.chip:hover { color: #3c8392; }
.chip[aria-pressed='true'] { font-weight: 700; color: #5f5f5f; }
.chip:focus-visible { outline: 2px solid #3c8392; outline-offset: 1px; }
.chip-sep {
  flex: none;
  width: 1px;
  height: 15px;
  background: #e0e0e0;
}

/* ------------------------------------------------------------------
   Home
   ------------------------------------------------------------------ */
.home {
  width: 100%;
  padding: var(--inset-top) var(--gutter) 96px var(--inset-x);
}
.home-col {
  display: flex;
  flex-direction: column;
  width: var(--column);
  max-width: 100%;
}
.home-greeting {
  margin: 32px 2px 0;
  font-size: 16px;
  color: var(--text-strong);
}
.home-intro {
  margin: 6px 2px 0;
  font-size: 14px;
  color: var(--text);
  min-height: 133px;
}
.home-prompt {
  margin: 23px 2px 0;
  font-size: 16px;
  color: var(--accent);
  min-height: 20px;
}
.home .ask { margin: 9px 2px 0; width: auto; }
.home-status {
  height: 0;
  margin: 0 2px;
  overflow: visible;
  font-size: 13px;
  color: var(--accent);
}
.home-actions {
  display: grid;
  grid-template-columns: 133px 133px 103px;
  justify-content: space-between;
  margin: 16px 2px 0;
}
.home-actions .btn { width: 100%; padding-inline: 8px; }

.thinking-dots span {
  display: inline-block;
  animation: blink 1s infinite both;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

/* Intro animation ------------------------------------------------- */
.intro-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: currentColor;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.is-intro [data-intro] { opacity: 0; }
/* Intro: pieces fade in one after another (only the question types itself) */
.fade-in { animation: fade-in 0.7s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }


.rise { animation: rise 0.6s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }


/* ------------------------------------------------------------------
   Inner pages shell
   ------------------------------------------------------------------ */
.page {
  width: 100%;
  max-width: calc(var(--page) + var(--inset-x) + var(--gutter));
  padding: var(--inset-top) var(--gutter) 96px var(--inset-x);
}
.page-top { display: contents; } /* the header sticks within the whole page, not just its row */

/* ------------------------------------------------------------------
   Case studies (results)
   ------------------------------------------------------------------ */
/* Case Studies field: 68px tall, grows to the regular 107px on hover or while typing,
   pushing the cards down smoothly as it grows. */
.work-ask-slot {
  width: 396px;
  max-width: 100%;
  margin-top: 16px;
}
.work-ask {
  height: 68px;
  overflow: hidden;
  transition: height 0.25s var(--ease-out), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.work-ask .ask-input { height: 29px; padding-top: 5px; transition: height 0.25s var(--ease-out), padding-top 0.25s var(--ease-out); }
.work-ask .chips { top: 28px; transition: top 0.25s var(--ease-out); }
.work-ask::before { top: 7px; transition: top 0.25s var(--ease-out); }
.work-ask .ask-send { top: 4px; transform: scale(0.85); }
.work-ask:hover,
.work-ask:focus-within { height: 107px; }
.work-ask:hover .ask-input,
.work-ask:focus-within .ask-input { height: 66px; padding-top: 10px; }
.work-ask:hover .chips,
.work-ask:focus-within .chips { top: 66px; }
.work-ask:hover::before { top: 12px; }
.work-ask:hover .ask-send,
.work-ask:focus-within .ask-send { top: 10px; }
.work-ask.has-text .ask-send { transform: none; }
.work-reply {
  margin: 16px 0 -10px;
  font-size: 14px;
  color: var(--accent);
}
.cards {
  display: grid;
  /* Each card is exactly as wide as the header; as many columns as fit */
  grid-template-columns: repeat(auto-fill, var(--header-w));
  gap: 21px;
  margin-top: 26px;
}
/* Card component (Figma 3:71): 397 × 257, thumbnail to the edges, white title
   bar that casts a soft shadow up onto the thumbnail */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 257px;
  border: 1px solid var(--border-btn);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  animation: card-in 0.55s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms + 60ms);
  transition: box-shadow 0.25s ease, transform 0.25s var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-field);
  transform: translateY(-2px);
}
.card-thumb {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: top left;
  background: var(--bg-soft);
  transition: transform 0.5s var(--ease-out);
}
.card:hover .card-thumb { transform: scale(1.02); }
.card-title {
  position: relative;
  z-index: 1;
  padding: 14px 20px;
  background: #fff;
  box-shadow: 0 -4px 4px rgba(210, 203, 203, 0.25); /* the shadow falls onto the thumbnail */
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  line-height: normal;
  color: #727a79;
}
.card-soon {
  position: absolute;
  right: 20px;
  bottom: 18px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-ghost);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.work-actions { margin-top: 20px; }
.work-actions .btn { width: 113px; padding-inline: 8px; }

/* ------------------------------------------------------------------
   Services / About / Contact
   ------------------------------------------------------------------ */
.text-col { width: 398px; max-width: 100%; }
.services-intro { margin-top: 32px; color: var(--text); }
.services-intro p + p { margin-top: 19px; }
.services-list { display: grid; gap: 24px; margin-top: 18px; }
.service h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--text-body);
}
.service h2 small { font-weight: 400; font-size: 14px; }
.service p { color: var(--text); }

.about-body { margin-top: 40px; color: var(--text); }
.about-body p + p { margin-top: 19px; }
.connect {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--text-body);
  text-underline-position: from-font;
}

.contact-title { margin: 40px 0 8px; font-size: 24px; font-weight: 600; color: var(--text-body); }
.contact-skills { color: var(--text-muted); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.page-enter > * { animation: rise 0.5s var(--ease-out) both; }
.page-enter > *:nth-child(2) { animation-delay: 60ms; }
.page-enter > *:nth-child(3) { animation-delay: 120ms; }
.page-enter > *:nth-child(4) { animation-delay: 180ms; }

/* ------------------------------------------------------------------
   Case study detail
   ------------------------------------------------------------------ */
body[data-view='case'] { --page-bg: var(--bg); }
.case-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin-top: 24px;
}
.crumb { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text-strong); }
.crumb .icon-btn img { width: 32px; height: 32px; }
.crumb-path { white-space: pre; }
.tabs { display: flex; gap: 8px; margin-left: 3px; } /* project tags sit close together */
/* Project tab button (Figma "Case Studies button" 7:1280): default → hover → pressed */
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  background: #fff;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  line-height: normal;
  color: #b2b2b2;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.tab:hover { background: #5e8f98; color: #fff; }  /* border stays #e0e0e0 in every state */
/* Pressed: the project being viewed, and the moment a tab is clicked */
.tab[aria-current='page'],
.tab:active { background: #4d5858; color: #fff; }
.tab:focus-visible { outline: 2px solid #5e8f98; outline-offset: 2px; }

.case-hero {
  display: grid;
  grid-template-columns: minmax(0, 793px) 396px;
  justify-content: space-between;
  gap: 40px;
  margin-top: 64px;
}
.case-hero-img { width: 100%; aspect-ratio: 793 / 383; object-fit: cover; }
.facts { display: flex; flex-direction: column; gap: 24px; font-size: 14px; } /* top lines up with the image */
.facts .lead { color: var(--text); }
.fact h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--text-body); }
.fact p, .fact li { color: var(--text-body); }
.fact ol { margin: 0; padding-left: 21px; color: var(--text); }
.fact ol li { color: var(--text); }

.section-rule {
  margin: 14px 0 0;
  padding: 10px 20px;
  border-bottom: 1px solid var(--rule);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-ghost);
}

.features {
  display: grid;
  grid-template-columns: minmax(0, 778px) minmax(0, 448px);
  justify-content: space-between;
  gap: 0 6px;
  margin-top: 25px;
}
.features-crop { width: 100%; aspect-ratio: 778 / 166; object-fit: cover; object-position: top; }
.features-left-bottom {
  display: grid;
  grid-template-columns: minmax(0, 463px) 1fr;
  align-items: center;
  margin-top: 25px;
}
.features-dialog { width: 100%; border-radius: var(--radius); }
.customer {
  justify-self: center;
  text-align: center;
}
.customer-box {
  display: grid;
  place-items: center;
  width: 183px;
  height: 74px;
  border: 4px solid #dedede;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  color: #ddd;
}
.customer p { margin-top: 14px; color: var(--text-body); }

.workspaces {
  position: relative;
  display: grid;
  gap: 40px;
  margin-top: 83px;
  padding-left: 24px;
  border-left: 1px solid var(--rule);
}
.workspace {
  display: grid;
  grid-template-columns: 126px 274px;
  justify-content: space-between;
  align-items: center;
}
.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-body);
  white-space: nowrap;
}
.pill.label { font-weight: 700; color: var(--text-ghost); text-transform: uppercase; }
.pill-stack { display: grid; gap: 8px; }

.wide-img { width: 100%; margin-top: 58px; }

.panel {
  display: grid;
  grid-template-columns: minmax(0, 490px) minmax(0, 234px) minmax(0, 225px);
  justify-content: space-between;
  align-items: start;
  gap: 32px;
  padding: 51px 81px 28px 50px;
  background: var(--panel);
}
.panel-text { padding-top: 45px; color: var(--text-body); }
.panel-text h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.panel-folders { margin-top: 45px; }

.shot {
  width: calc(100% - 152px);
  max-width: 1091px;
  margin: 72px auto 0;
  border-radius: var(--radius);
}
.shot + .shot { margin-top: 127px; }
/* mOS: the two campaign-manager screens on a full-width white band (Figma 1:328) */
.shots-band { padding: 82px 0 88px; background: #fff; }
.shots-band .shot { margin-top: 0; }
.shots-band .shot + .shot { margin-top: 60px; }

.split {
  /* same columns as the top of the page, so both texts line up with the first image and the facts */
  display: grid;
  grid-template-columns: minmax(0, 793px) 396px;
  justify-content: space-between;
  gap: 0 40px;
  margin-top: 77px;
}
.split-col:first-of-type { max-width: 493px; }
.split h2 { grid-column: 1 / -1; margin: 0 0 16px; font-size: 24px; font-weight: 600; color: var(--text-body); }
.split-col h3 { margin: 0 0 9px; font-size: 14px; font-weight: 700; color: var(--text-body); }
.split-col p { color: var(--text); }
.split-col + .split-col { position: relative; }
.split-col + .split-col::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  height: 405px;
  width: 1px;
  background: var(--rule);
}
.split-img { width: 100%; max-width: 493px; margin-top: 37px; }

.band {
  margin-top: 77px;
  padding: 113px 24px 114px;
  background: var(--band);
}
.band img,
.band video { display: block; width: 100%; max-width: 989px; height: auto; margin: 0 auto; border-radius: var(--radius); }

.conclusions { padding: 46px 24px 124px; background: var(--panel); }
.conclusions-inner { padding-left: calc(var(--inset-x) - 24px); } /* lines up with the first image */
.conclusions h3 { margin: 0 0 17px; font-size: 14px; font-weight: 700; color: var(--text-body); }
.conclusions p { max-width: 527px; color: var(--text-body); }
.conclusions p + p { margin-top: 19px; }

.soon {
  margin-top: 64px;
  max-width: 480px;
  color: var(--text-body);
}
.soon h2 { margin: 0 0 8px; font-size: 24px; font-weight: 600; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------
   View transitions (home ⇄ results morph)
   ------------------------------------------------------------------ */
::view-transition-group(brand),
::view-transition-group(ask) { animation-duration: 0.55s; animation-timing-function: var(--ease-out); }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.3s; }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .case-hero { grid-template-columns: 1fr; }
  .facts { max-width: 560px; }
  .features { grid-template-columns: 1fr; }
  .workspaces { margin-top: 40px; max-width: 448px; }
  .panel { grid-template-columns: 1fr 1fr; padding: 40px; }
  .panel-text { grid-column: 1 / -1; padding-top: 0; }
  .panel-folders { margin-top: 0; }
  .shot { width: 100%; }
  .split { grid-template-columns: 1fr; padding-inline: 0; gap: 32px; }
  .split-col + .split-col::before { display: none; }
}
@media (max-width: 900px) {
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .brand-name { font-size: 20px; }
  .cards { grid-template-columns: 1fr; }
  :root { --inset-top: 16px; } /* the pinned header sits close to the top on phones */
  .home-actions { grid-template-columns: repeat(3, auto); gap: 8px; justify-content: stretch; }
  .features-left-bottom { grid-template-columns: 1fr; gap: 32px; }
  .workspace { grid-template-columns: 1fr; gap: 8px; }
  .pill { white-space: normal; text-align: center; }
  .panel { grid-template-columns: 1fr; padding: 24px; }
  .band { padding: 40px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

.case-page { padding-bottom: 0; }


/* ------------------------------------------------------------------
   AI LAB panel (Home, Services, About): the animation lab in the
   right half, expandable to the whole window. See js/lab-panel.js.
   ------------------------------------------------------------------ */
body[data-lab] { --page-bg: var(--bg-soft); }
body[data-lab] #app { width: 50%; }

.lab-panel {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid var(--divider);
  background: var(--bg-soft);
  transition: left 0.55s var(--ease-out), border-color 0.55s ease;
}
.lab-panel[hidden] { display: none; }
.lab-panel.is-expanded { left: 0; border-color: transparent; }
.lab-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg-soft);
}
.lab-head {
  position: absolute;
  z-index: 2;
  top: 32px;
  left: 38px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.lab-panel-label {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: #749cac;
  cursor: help;
}
.lab-panel-sub { font-weight: 400; } /* "AI LAB / Music box": the experiment's name in a lighter weight */
.lab-panel.is-expanded .lab-panel-sub { display: none; } /* expanded: just "AI LAB" (the sidebar lists the experiments) */
/* "AI LAB" tooltip: what the lab is about (Figma "AI LAB tooltip") */
.lab-about {
  position: absolute;
  top: calc(100% + 10px);
  left: -14px;
  width: min(398px, calc(100vw - 48px));
  padding: 20px 34px 24px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(219, 211, 211, 0.15), 0 8px 28px rgba(0, 0, 0, 0.06);
  font-size: 14px;
  color: #636363;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease-out), visibility 0s linear 0.2s;
}
.lab-about p + p { margin-top: 19px; }
.lab-panel-label:hover + .lab-about,
.lab-panel-label:focus + .lab-about { /* :focus so a tap opens it on touch screens */
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.lab-side-toggle {
  display: none;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: #9aa3a6;
  cursor: pointer;
}
.lab-side-toggle:hover { color: #4f7d8e; }
.lab-side {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 167px;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 68px 0 0 38px;
  border-right: 1px solid var(--divider);
  background: var(--bg-soft);
}
.lab-exp {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: #636363;
  cursor: pointer;
}
.lab-exp:hover { color: #4f7d8e; }
.lab-exp[aria-current='true'] { font-weight: 600; color: #749cac; }
.lab-soon {
  position: absolute;
  z-index: 2;
  left: calc(167px + 38px);
  top: 32px;
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
/* Expanded (Figma "AI Lab Expanded"): menu icon + label top-left, sidebar, lab beside it */
.is-expanded .lab-head { top: 30px; left: 35px; }
.is-expanded .lab-side-toggle { display: grid; }
.is-expanded .lab-side { display: flex; }
.is-expanded .lab-frame { margin-left: 167px; width: calc(100% - 167px); }
.lab-menu { top: calc(100% + 8px); left: -3px; z-index: 5; } /* same dropdown as the header's ☰ */
.lab-panel:not(.is-expanded) .lab-soon { line-height: 18px; white-space: nowrap; } /* placed beside the project menu by js/lab-panel.js */
.lab-panel-toggle {
  position: absolute;
  z-index: 1;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #749cac;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lab-panel-toggle:hover { background: rgba(116, 156, 172, 0.12); color: #4f7d8e; }
.lab-icon-collapse,
.is-expanded .lab-icon-expand { display: none; }
.is-expanded .lab-icon-collapse { display: block; }
body.lab-expanded { overflow: hidden; }

/* Narrow screens: content first, then the lab as a block below it */
@media (max-width: 900px) {
  body[data-lab] #app { width: auto; }
  .lab-panel {
    position: relative;
    left: auto;
    height: 72vh;
    min-height: 420px;
    border-left: 0;
    border-top: 1px solid var(--divider);
    transition: none;
  }
  .lab-panel.is-expanded {
    position: fixed;
    inset: 0;
    height: auto;
    border-top: 0;
  }
  .lab-head { top: 24px; left: 20px; }
  .lab-panel-toggle { top: 12px; right: 12px; }
}

/* ------------------------------------------------------------------
   Case study pages built from js/cases.js rows
   ------------------------------------------------------------------ */
.cs-rows {
  --cs-text: 370px;
  display: grid;
  gap: 48px;
  margin-top: 64px;
}
.cs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cs-text);
  gap: 32px 40px;
  align-items: start;
}
.cs-row--reverse { grid-template-columns: var(--cs-text) minmax(0, 1fr); }
.cs-row--reverse .cs-text { order: -1; }
.cs-row--media { grid-template-columns: minmax(0, 1fr) var(--cs-text); }
.cs-row--text { grid-template-columns: minmax(0, 1fr) var(--cs-text); }
.cs-row--text.cs-row--right .cs-text { grid-column: 2; }
.cs-row--text.cs-row--left { grid-template-columns: minmax(0, 488px); }
/* Rows with spacing copied from a Figma page (row.fig in cases.js): image width, gap to the text, indent */
.cs-row--fig { column-gap: var(--fig-gap, 40px); padding-left: var(--fig-inset, 0px); }
.cs-row--fig-cols { grid-template-columns: minmax(0, var(--fig-img)) var(--cs-text); }

.cs-media { display: grid; gap: 24px; }
.cs-media img,
.cs-media video {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.cs-media--pair { grid-template-columns: 1fr 1fr; gap: 32px; max-width: 730px; }
.cs-media--pair img,
.cs-media--pair video { border-radius: 24px; }
/* Videos fill their slot edge to edge (trims the recording's faint bottom edge line) */
.cs-media video { object-fit: cover; object-position: center top; clip-path: inset(0 0 4px 0 round 24px); }
.cs-media--phone { justify-items: center; }
.cs-media--phone img { width: min(100%, 330px); border-radius: 28px; }

/* The text column scrolls together with its image */
.cs-text {
  display: grid;
  gap: 24px;
  color: var(--text);
  font-size: 14px;
}
.cs-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.cs-block p + p { margin-top: 14px; }
.cs-block ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.cs-block a { color: var(--accent); font-weight: 600; }

/* Edge-to-edge images break out of the page column */
/* Edge-to-edge sections: pages are left-aligned at --inset-x, so pull back by that much */
.bleed {
  width: 100vw;
  margin-left: calc(-1 * var(--inset-x));
  max-width: none;
}
.cs-full { margin-right: 0; }
.cs-full img { width: 100%; height: auto; }
.cs-rule { width: 100%; margin: 8px 0; border: 0; border-top: 1px solid var(--rule); }

.cs-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin: 72px 0 0;
  padding: 32px 0 96px;
  border-top: 1px solid var(--divider);
}
.cs-end .case-nav { margin-top: 0; }
.cs-next-link {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.cs-next-link span { color: var(--text-muted); font-weight: 400; margin-right: 4px; }
.cs-next-link:hover { color: var(--accent); }

.tabs { flex-wrap: wrap; row-gap: 8px; }

@media (max-width: 1000px) {
  .cs-row,
  .cs-row--reverse,
  .cs-row--media,
  .cs-row--text,
  .cs-row--fig-cols { grid-template-columns: minmax(0, 1fr); }
  .cs-row--fig { padding-left: 0; }
  .cs-media--phone { justify-items: center; } /* stacked: the phone is centred above its text */
  .cs-row--reverse .cs-text { order: 0; }
  .cs-row--text.cs-row--right .cs-text { grid-column: auto; }
  .cs-text { position: static; max-width: 560px; }
  .cs-media--pair { gap: 16px; }
}
.case { overflow-x: clip; }

/* ------------------------------------------------------------------
   Phones and touch screens
   ------------------------------------------------------------------ */
/* 16px text in the field stops iPhones zooming the page when it's focused */
@media (max-width: 900px), (pointer: coarse) {
  .ask-input { font-size: 16px; }
}
/* Bigger tap areas without changing how things look */
.chip { position: relative; }
.chip::after { content: ''; position: absolute; inset: -8px -6px; }
@media (pointer: coarse) {
  .tab { padding: 8px 14px; }
  .site-menu a { padding: 12px 14px; }
}
@media (max-width: 640px) {
  .brand { width: 100%; }
  .brand-card { padding: 0 12px; gap: 6px; }
  .brand-tip { left: 67px; } /* under the resume icon with the tighter header */
  .chips { gap: 12px; }
  .tabs { gap: 8px; }
  .case-nav { gap: 12px; }
  .cs-rows { gap: 36px; margin-top: 40px; }
  .cs-end { margin-top: 48px; padding-bottom: 64px; }
  .cs-media--pair { gap: 12px; }
  .cs-media--pair img { border-radius: 14px; }
  .lab-panel { height: 62vh; min-height: 360px; }
  /* Expanded lab: the experiments list becomes a row across the top */
  .is-expanded .lab-side {
    right: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    gap: 20px;
    padding: 64px 20px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--divider);
  }
  .is-expanded .lab-frame { margin: 104px 0 0; width: 100%; height: calc(100% - 104px); }
  .is-expanded .lab-head { top: 20px; left: 20px; }
  .is-expanded .lab-soon { left: 20px !important; top: 112px !important; }
}

/* Tap an image in a case study to see it full screen (and tap again to zoom in) */
.case-page img:not(.card-thumb):not(.icon-btn img) { cursor: zoom-in; }
.zoom {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  overflow: auto;
  background: rgba(24, 28, 30, 0.94);
  overscroll-behavior: contain;
  animation: zoom-in 0.2s ease;
}
.zoom[hidden] { display: none; }
@keyframes zoom-in { from { opacity: 0; } }
.zoom img {
  margin: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 96px);
  object-fit: contain;
  border-radius: 6px;
  cursor: zoom-in;
}
.zoom.is-zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.zoom-close {
  position: fixed;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 28, 30, 0.72); /* stays visible over white screenshots when zoomed in */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
}
.zoom-close:hover { background: rgba(24, 28, 30, 0.9); }
.zoom-hint {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-ui);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

/* ------------------------------------------------------------------
   Footer: one quiet line under every page. The body is a column so the
   line sits at the bottom of the window on short pages.
   ------------------------------------------------------------------ */
body { display: flex; flex-direction: column; min-height: 100vh; }
#app { flex: 1 0 auto; }
.site-footer {
  padding: 24px var(--gutter) 28px var(--inset-x);
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
}
body[data-lab] .site-footer { width: 50%; } /* stays in the left column beside the AI lab */
.cs-end { padding-bottom: 48px; }
.page:not(.case-page) { padding-bottom: 72px; }
@media (max-width: 900px) {
  body[data-lab] .site-footer { width: auto; }
}

/* Copyright line at the foot of the expanded lab's sidebar */
.lab-copy {
  margin: auto 0 0;          /* pushed to the bottom of the sidebar */
  padding: 0 20px 26px 0;
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .lab-copy { display: none; } /* the sidebar is a row across the top on phones */
}

/* During the landing intro the AI lab stays hidden; it fades in with the typing field */
.lab-panel { transition: left 0.55s var(--ease-out), border-color 0.55s ease, opacity 0.7s ease, visibility 0s; }
body.intro-running .lab-panel { opacity: 0; visibility: hidden; transition: none; }

/* Collapsed AI lab: "AI LAB / Music box" — hovering "/ Music box" lists the lab's projects
   in the same font and colour as that text */
.lab-project { position: relative; margin-left: -9px; } /* sits a space's width after AI LAB */
.lab-project-btn,
.lab-proj {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: normal;
  color: #749cac;
  cursor: pointer;
  white-space: nowrap;
}
.lab-projects {
  position: absolute;
  top: 100%;
  left: -14px;
  z-index: 3;
  display: grid;
  gap: 8px;
  min-width: 150px;
  margin: 0;
  padding: 18px 14px 12px 20px; /* the top padding bridges the gap so the menu stays open on the way down */
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s var(--ease-out), visibility 0s linear 0.18s;
}
.lab-projects::before { /* the card behind the list */
  content: '';
  position: absolute;
  inset: 8px 0 0;
  z-index: -1;
  background: var(--bg-soft);
  border: 1px solid #ececec;
  border-radius: var(--radius);
  box-shadow: var(--header-shadow);
}
.lab-project:hover .lab-projects,
.lab-project:focus-within .lab-projects,
.lab-project.is-open .lab-projects {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.lab-proj:hover { color: #4f7d8e; }
.lab-proj { display: inline-block; } /* inline text, so the dot can align to the letters */
.lab-proj[aria-current='true']::before { /* marks the project that's showing, left of its name */
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 6px 0 -11px; /* sits in the card's margin; net width 0, so all names stay lined up */
  vertical-align: middle; /* centred on the lowercase letters (baseline + half the x-height) */
  border-radius: 50%;
  background: currentColor;
}
.is-expanded .lab-project { display: none; } /* the expanded view lists projects in its sidebar */

/* Thumbnail with a video over one part of it (Situ: the event-card phone plays on hover) */
.card-thumb--layered { position: relative; overflow: hidden; }
.card-thumb--layered img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card-thumb--layered video {
  position: absolute;
  object-fit: cover;
  object-position: center top;
  border-radius: 7% / 3.4%; /* follows the phone's rounded corners */
  clip-path: inset(0 0 1% 0 round 7% / 3.4%); /* trims the recording's faint bottom edge line */
}
