/* =====================================================================
   Sahayya case study — Shivam Soni
   Design tokens mirrored from Figma (Portfolio-Collab, node 13:1399)
   ===================================================================== */

:root {
  /* =================================================================
     Design tokens — single source of truth for the whole site.
     Values mirror the Figma "Mode 1" token export (Grey + Tangy Orange).
     ================================================================= */

  /* ---- Grey ramp (Figma "Grey") ---- */
  --grey-40:  #fbfbfb;
  --grey-50:  #fafafa;
  --grey-100: #f5f5f5;
  --grey-200: #e6e6e6;
  --grey-300: #d6d6d6;
  --grey-400: #a5a5a5;
  --grey-500: #767676;
  --grey-600: #575757;
  --grey-700: #434343;
  --grey-800: #212121;
  --grey-900: #1a1a1a;
  --grey-950: #0a0a0a;

  /* ---- Tangy Orange ramp (Figma "Tangy Orange") — brand accent ---- */
  --tangy-50:  #fff9ec;
  --tangy-100: #fff2d3;
  --tangy-200: #ffe2a5;
  --tangy-300: #ffcc6d;
  --tangy-400: #ffab32;
  --tangy-500: #ff910a;
  --tangy-600: #ff7b00;
  --tangy-700: #cc5902;
  --tangy-800: #a1460b;
  --tangy-900: #823b0c;
  --tangy-950: #461c04;

  /* ---- Semantic aliases (use these in components) ---- */
  --accent:        var(--tangy-600);   /* primary brand accent  #ff7b00 */
  --accent-strong: var(--tangy-700);   /* hover / pressed        #cc5902 */
  --accent-soft:   var(--tangy-400);   /* soft accent rules      #ffab32 */
  --accent-tint:   var(--tangy-50);    /* faint accent surface   #fff9ec */

  /* ---- Product / illustrative colours (NOT brand tokens — see note) ---- */
  --blue:       #3b41e3;      /* Sahayya app UI recreation */
  --blue-10:    #f5f5fe;
  --error:      #ff5630;      /* SQL-error dialog (semantic red) */
  --success:    #1f8a4c;      /* "mandatory/positive" status pill */

  /* ---- Surfaces ---- */
  --bg:            #ffffff;
  --persona-bg:    #f6efe6;   /* warm cream card (illustrative) */
  --lavender:      #f4f0fe;   /* hero placeholder tint (illustrative) */
  --hairline:      rgba(50, 64, 79, 0.10);

  /* ---- Type ---- */
  --font-sans: "Mukta", "Ek Mukta", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Serif display face for headings (Fraunces), matching the Figma design */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  /* Body/UI face for the Home + About pages (Figma uses Sora) */
  --font-body: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* ---- Layout ---- */
  --nav-h: 64px;
  --content-max: 768px;
  --sidebar-w: 200px;
  --gutter: 64px;
  --page-pad-x: 60px;
  --wrap-max: 1200px;
  --section-gap: 88px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--grey-600);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ================================================================= NAV */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--grey-40);            /* Figma grey/40 #fbfbfb */
  border-bottom: 1px solid var(--hairline);
}
.site-nav__inner {
  /* Uniform nav width across every page (1602 content + 60px gutters). */
  max-width: calc(1602px + var(--page-pad-x) * 2);
  margin: 0 auto;
  min-height: var(--nav-h);
  padding: 20px var(--page-pad-x) 21px;
  display: flex;
  align-items: center;
  gap: var(--gutter);
}
/* Rail is legacy (old content-aligned nav); the bar now spans the full inner
   width on all pages, brand hard-left and links hard-right. */
.site-nav__rail { display: none; }
.site-nav__col {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 22.5px;
  text-transform: uppercase;
}
.brand__name  { color: var(--grey-700); font-weight: 500; }
.brand__role  { color: var(--grey-500); }

/* ---- Primary nav wrapper (holds the desktop links + mobile toggle) ---- */
.site-nav__nav { position: relative; display: flex; align-items: center; }

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 22.5px;
  text-transform: uppercase;
  color: var(--grey-500);
}
.site-nav__links a {
  padding: 0 5px;
  color: var(--grey-500);
  transition: color .18s ease;
}
.site-nav__links a:hover { color: var(--grey-700); }
.site-nav__links a.is-current { color: var(--accent); }

/* ---- Mobile dropdown toggle (hidden on desktop) ---- */
.site-nav__toggle {
  display: none;
  align-items: center;
  gap: 2px;
  padding: 0 5px;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 22.5px;
  text-transform: uppercase;
  color: var(--accent);
}
.site-nav__caret {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  transition: transform .18s ease;
}
.site-nav__toggle[aria-expanded="true"] .site-nav__caret { transform: rotate(180deg); }

/* ============================================================== LAYOUT */
.layout {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 72px var(--page-pad-x) 40px;
  display: flex;
  align-items: flex-start;
  gap: var(--gutter);
}

/* ---- Sidebar ---- */
.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
}
.sidebar__back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 22.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--grey-500);
  margin-bottom: 28px;
  transition: color .18s ease;
}
.sidebar__back:hover { color: var(--grey-800); }

.section-nav { display: flex; flex-direction: column; gap: 12px; }
.section-nav__link {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 22.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--grey-400);
  transition: color .18s ease;
  width: fit-content;
}
.section-nav__link:hover { color: var(--grey-600); }
.section-nav__link.is-active { color: var(--grey-900); }

/* ---- Content column ---- */
.content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: var(--content-max);
}

.section { margin-bottom: var(--section-gap); }
.section:last-child { margin-bottom: 0; }

/* ============================================================ TYPE-SETS */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--grey-400);
  margin: 0 0 22px;
}

.hero__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(32px, 4.8vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--grey-800);
  font-weight: 400;
  margin: 0 0 22px;
}
.hero__subtitle {
  font-size: clamp(19px, 2.2vw, 22px);
  line-height: 1.45;
  color: var(--grey-400);
  margin: 0 0 40px;
  max-width: 680px;
}

.section__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.005em;
  color: var(--grey-800);
  font-weight: 400;
  margin: 0 0 20px;
}

.body {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.45;
  color: var(--grey-500);
  margin: 0 0 22px;
  max-width: var(--content-max);
}
.body:last-child { margin-bottom: 0; }
.body strong { color: var(--grey-800); font-weight: 600; }

.caption {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--grey-400);
  margin: 12px 0 28px;
}

/* ================================================================ META */
.meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  margin: 0;
  padding-top: 8px;
}
.meta__col dt {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--grey-500);
  margin-bottom: 8px;
}
.meta__col dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--grey-600);
}

/* ======================================================= ASSET SLOTS */
/* Framed placeholders that "just work" whether or not the real
   exported image is present. When the <img> loads, it covers the
   placeholder; when it 404s, main.js reveals a labelled panel.       */
.asset-slot {
  position: relative;
  margin: 0 0 32px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
  background: var(--lavender);
}
.asset-slot img { width: 100%; height: auto; display: block; }

.asset-slot.is-missing { background: var(--grey-40); }
.asset-slot.is-missing img { display: none; }
.asset-slot.is-missing::after {
  content: attr(data-caption) " — add to /images";
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  min-height: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--grey-400);
  background:
    repeating-linear-gradient(45deg, transparent, transparent 11px, rgba(0,0,0,.02) 11px, rgba(0,0,0,.02) 12px);
}
/* Give empty slots a sensible height via aspect ratios */
.hero__image { aspect-ratio: 766 / 512; }
.diagram { aspect-ratio: 761 / 325; }
.diagram--matrix { aspect-ratio: 768 / 630; background: var(--grey-40); }
.diagram--wide { aspect-ratio: 768 / 158; }
.asset-slot.is-missing { aspect-ratio: auto; }
/* When a real image is present, let it define the height (avoids crop/gap
   when an export's ratio differs slightly from the placeholder box). */
.asset-slot:has(img) { aspect-ratio: auto; border: none; background: transparent; border-radius: 0; }
.asset-slot.is-missing.hero__image::after { min-height: 320px; }
.asset-slot.is-missing.diagram::after { min-height: 240px; }
.asset-slot.is-missing.diagram--matrix::after { min-height: 420px; }
.asset-slot.is-missing.diagram--wide::after { min-height: 120px; }

/* Small dialog image — keep it dialog-sized, not full width */
.error-slot { max-width: 420px; }

/* ============================================================ PERSONA */
.persona {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  background: var(--persona-bg);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 40px;
}
.persona__media {
  position: relative;
  min-height: 340px;
  background: #e9ddcb;
}
.persona__photo {
  margin: 0;
  border: none;
  border-radius: 0;
  height: 100%;
  background: #e2d4bf;
}
.persona__photo,
.persona__photo img { height: 100%; }
.persona__photo img { object-fit: cover; }
.persona__photo.is-missing { aspect-ratio: auto; }
.persona__photo.is-missing::after { min-height: 340px; }

.persona__body { padding: 32px 34px; }
.persona__kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.persona__name {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--grey-800);
  margin: 0 0 14px;
}
.persona__name span { color: var(--accent); }
.persona__desc {
  font-size: 16px;
  color: var(--grey-600);
  margin: 0 0 20px;
}
.persona__quote {
  margin: 0 0 22px;
  padding-left: 16px;
  border-left: 2px solid var(--accent-soft);
  font-size: 16px;
  font-style: italic;
  color: var(--grey-700);
}

/* ---- chips ---- */
.chip-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--grey-600);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}
.chip--overlay {
  position: absolute;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.chip--a { top: 16px; left: 16px; }
.chip--b { bottom: 16px; left: 16px; }

/* =============================================================== HMW */
.hmw { list-style: none; margin: 22px 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.hmw__item {
  border-left: 2px solid var(--accent-soft);
  padding: 2px 0 2px 18px;
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--grey-600);
}
.hmw__item strong { color: var(--grey-800); font-weight: 600; }

/* ========================================================= UI CARD */
.ui-card {
  border: 1px solid var(--grey-300);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  margin: 8px 0 4px;
}
.ui-card__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 14px 0;
  background: var(--blue-10);
  border-bottom: 1px solid var(--grey-300);
}
.ui-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey-500);
  padding: 8px 12px;
  border-radius: 6px 6px 0 0;
}
.ui-tab.is-active { color: var(--blue); background: #fff; font-weight: 500; box-shadow: inset 0 -2px 0 var(--blue); }
.ui-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey-500);
}
.ui-status {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 999px;
}
.ui-status--positive { color: var(--success); background: rgba(31, 138, 76, 0.10); }
.ui-status--mandatory { color: var(--accent); background: var(--accent-tint); }

.ui-table-wrap { overflow-x: auto; }
.ui-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.ui-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--grey-400);
  font-weight: 500;
  padding: 10px 18px;
  border-bottom: 1px solid var(--grey-300);
  background: var(--grey-40);
}
.ui-table td { padding: 11px 18px; color: var(--grey-700); border-bottom: 1px solid var(--grey-300); }
.ui-table__section td {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--grey-500);
  background: var(--blue-10);
}
.ui-table tbody tr:last-child td { border-bottom: none; }
.ui-card__remark {
  margin: 0;
  padding: 14px 18px 16px;
  font-size: 14px;
  color: var(--grey-600);
  border-top: 1px solid var(--grey-300);
}
.ui-card__remark span {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--grey-400);
  margin-right: 10px;
}

/* ======================================================= ERROR CARD */
.error-card {
  border: 1px solid rgba(255, 86, 48, 0.35);
  border-radius: 8px;
  background: #fff;
  max-width: 420px;
  margin: 8px 0 32px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}
.error-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 86, 48, 0.08);
  color: var(--error);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 86, 48, 0.2);
}
.error-card__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--error); flex: 0 0 auto; }
.error-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--grey-400);
  margin: 16px 18px 6px;
}
.error-card__body { margin: 0; padding: 0 18px 18px; font-size: 14px; color: var(--grey-600); line-height: 1.6; }

/* ============================================================= FOOTER */
.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 40px;
}
.site-footer__inner {
  /* Match the nav width so the footer aligns with the bar on every page. */
  max-width: calc(1602px + var(--page-pad-x) * 2);
  margin: 0 auto;
  padding: 26px var(--page-pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-footer__credit {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--grey-500);
  margin: 0;
}
.heart { color: var(--accent); }
.site-footer__links {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--grey-500);
}
.site-footer__links a { transition: color .18s ease; }
.site-footer__links a:hover { color: var(--grey-800); }

/* ============================================================== HOME */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Homepage has no sidebar, so its content is a single column centred on
   the page (not offset by an empty rail like the case-study layout). */
.home-layout {
  max-width: calc(var(--content-max) + var(--page-pad-x) * 2);
  margin: 0 auto;
  padding: 72px var(--page-pad-x) 40px;
}
.home-rail { display: none; }
.home-content { min-width: 0; max-width: none; }

/* Centre the shared nav on the homepage so it lines up with that column */
.home .site-nav__rail { display: none; }
.home .site-nav__col { margin: 0 auto; }

/* =====================================================================
   HOME PAGE (Figma 273:76 desktop / 313:3715 mobile)
   Wide two-column layout: hero (heading + intro), then case rows pairing
   a text column with a MacBook browser mockup. Two-column >=1280px,
   single-column stack below (tablet + mobile).
   ===================================================================== */
/* Full-width nav on the homepage (no sidebar rail; not the centred About nav).
   The nav wrap matches the homepage content wrap so the brand + links line up
   with the content edges at full width. */
.hp .site-nav__rail { display: none; }
.hp .site-nav__col { max-width: none; }
.hp .site-nav__inner,
.hp .site-footer__inner { max-width: calc(1602px + var(--page-pad-x) * 2); }

.hp-main {
  max-width: calc(1602px + var(--page-pad-x) * 2);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 120px) var(--page-pad-x);
}
.hp-stack { display: flex; flex-direction: column; gap: 44px; }

/* ---- Hero ---- */
.hp-hero {
  display: flex;
  gap: 60px;
  align-items: flex-end;
  padding-bottom: 40px;
}
.hp-hero__title {
  flex: 642 1 0;
  min-width: 0;
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 45px);
  line-height: 1.3;
  letter-spacing: -0.023em;
  color: var(--grey-900);
}
.hp-hero__title strong { font-weight: 600; }
.hp-hero__intro {
  flex: 900 1 0;
  min-width: 0;
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(14px, 1.15vw, 18px);
  line-height: 1.56;
  letter-spacing: 0.005em;
  color: var(--grey-700);
}
.hp-hero__intro strong { font-weight: 600; }

.hp-divider { border: 0; border-top: 1px solid var(--grey-300); margin: 0; }

/* ---- Work ---- */
.hp-work { display: flex; flex-direction: column; gap: 60px; padding-top: 40px; }
/* Each project is a grey card (Figma: grey-100 panel, 30px padding, 60px text/image gap) */
.hp-case {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  padding: 30px;
  background: var(--grey-100);
  text-decoration: none;
  color: inherit;
  outline-offset: 4px;
}
.hp-case__text {
  flex: 582 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.hp-case__head { display: flex; flex-direction: column; gap: 22px; }
.hp-eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1vw, 16px);
  line-height: 1.4;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--grey-400);
  margin: 0;
}
.hp-case__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.235;
  letter-spacing: -0.01em;
  color: var(--grey-900);
  margin: 0;
}
/* Hover "underline reveal" on the inline title span (background-image technique,
   not text-decoration). currentColor matches the text; box-decoration-break keeps
   the underline continuous per line when the title wraps. */
.hp-case__title-u {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 90%;
  background-size: 0 1.5px;
  transition: background-size 0.583s cubic-bezier(0.16, 1, 0.2, 1);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hp-case:hover .hp-case__title-u,
.hp-case:focus-visible .hp-case__title-u { background-size: 100% 1.5px; }
@media (prefers-reduced-motion: reduce) {
  .hp-case__title-u { transition: none; }
}
.hp-case__subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(14px, 1.15vw, 18px);
  line-height: 1.667;
  color: var(--grey-700);
  margin: 0;
}
.hp-meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; }
.hp-meta__col { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; width: 180px; }
.hp-meta__col dt {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1vw, 16px);
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--grey-600);
}
.hp-meta__col dd {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 24px;
  color: var(--grey-500);
}
.hp-meta__col dd span { display: block; }
.hp-meta__col dd span + span { margin-top: 2px; }
.hp-case:focus-visible { outline: 2px solid var(--accent); }

/* ---- Case media (single browser-mockup image supplied by the designer) ---- */
.hp-case__media { flex: 900 1 0; min-width: 0; margin: 0; }
.hp-case__media.asset-slot { border: 0; border-radius: 0; background: transparent; }
.hp-case__media.asset-slot:not(.is-missing) { aspect-ratio: auto; }
.hp-case__media img { width: 100%; height: auto; display: block; }
/* Placeholder box until the mockup image is uploaded */
.hp-case__media.is-missing { aspect-ratio: 1600 / 1000; background: var(--grey-100); }
.hp-case__media.is-missing::after { min-height: 200px; }
/* Agentic Design System card: a plain screen image (white, square top, 11.25px bottom corners) */
.hp-case__media--screen { background: #fff; border-radius: 0 0 11.25px 11.25px; overflow: hidden; }
.hp-case__media--screen img { aspect-ratio: 900 / 371; object-fit: cover; }

/* Stack to a single column on tablet + mobile; laptop mockup goes on top */
@media (max-width: 1279px) {
  /* Stacked column: reset the desktop flex ratios (flex-basis:0 would collapse
     the height of each item — notably the mockup image — to 0 in a column). */
  .hp-hero { flex-direction: column; align-items: flex-start; gap: 30px; padding-bottom: 0; }
  .hp-hero__title, .hp-hero__intro { flex: 0 0 auto; width: 100%; }
  .hp-case { flex-direction: column; gap: 24px; }
  .hp-case__text { flex: 0 0 auto; width: 100%; }
  .hp-case__media { flex: 0 0 auto; width: 100%; order: -1; }
  .hp-work { gap: 44px; }
}
@media (max-width: 640px) {
  /* Meta columns shrink so Role + Timeline still sit side by side on phones */
  .hp-meta__col { width: auto; min-width: 108px; }
  .hp-case { padding: 20px; }
}

/* ========================================================= ANIMATION */
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ========================================================= RESPONSIVE */
@media (max-width: 1080px) {
  :root { --page-pad-x: 40px; --gutter: 44px; --sidebar-w: 176px; }
}

@media (max-width: 900px) {
  :root { --page-pad-x: 32px; --section-gap: 64px; }
  /* Sidebar collapses, so the nav spans the full width too */
  .site-nav__rail { display: none; }
  .site-nav__col { max-width: none; }
  /* align-items:stretch pins the content column to the screen width so
     wide children (e.g. the Kickfurther blueprint strip) scroll inside
     their own box instead of blowing the page out horizontally. */
  .layout { flex-direction: column; align-items: stretch; padding-top: 40px; gap: 0; }
  .sidebar {
    position: static;
    width: 100%;
    flex-basis: auto;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hairline);
  }
  .sidebar__back { margin-bottom: 18px; }
  .section-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 18px;
  }
  .content { max-width: none; }
  .persona { grid-template-columns: 1fr; }
  .persona__media { min-height: 260px; }
  .persona__photo.is-missing::after { min-height: 220px; }
}

@media (max-width: 640px) {
  :root { --page-pad-x: 20px; --nav-h: 60px; }
  body { font-size: 16px; }
  .site-nav__inner { padding: 20px var(--page-pad-x) 21px; }

  /* Collapse the inline links into a dropdown revealed by the toggle */
  .site-nav__toggle { display: inline-flex; }
  .site-nav__links {
    display: none;
    position: absolute;
    top: calc(100% + 21px);
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 120px;
    padding: 20px;
    background: var(--grey-100);                  /* Figma grey/100 */
    box-shadow: 0 2px 1px rgba(165, 165, 165, 0.1);
    z-index: 110;
  }
  .site-nav__links.is-open { display: flex; }

  .meta { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .persona__body { padding: 24px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 400px) {
  .meta { grid-template-columns: 1fr; }
}

/* ---- Home responsive ---- */
@media (max-width: 900px) {
  .home-layout { padding-top: 40px; gap: 0; }
  .home-rail { display: none; }
  .home-content { max-width: none; }
}


/* =====================================================================
   Kickfurther case study — page-specific overrides
   Type system differs from Sahayya: Fraunces (display, serif) for
   headings, Ek Mukta for body, mono for labels. Merged into this single stylesheet (scoped to body.kf).
   ===================================================================== */

body.kf {
  /* Redefine the shared font tokens for this page only */
  --font-sans: "Mukta", "Ek Mukta", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Kickfurther-specific tokens */
  --kf-purple: #8b3fa3;
  --red-200: #fee5ea;
  --red-700: #ed3355;
  --red-800: #c72850;

  font-size: 18px;
}

/* ---- Type tuning for the serif/sans pairing ---- */
.kf .eyebrow { font-size: 16px; line-height: 22.5px; color: var(--grey-500); }  /* Figma "Mono 16", Grey/500 */

.kf .hero__title {
  font-weight: 400;
  font-size: clamp(32px, 4.8vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
}
.kf .hero__subtitle {
  font-family: var(--font-body);      /* Sora Regular (Figma hero subtitle) */
  font-weight: 400;
  font-size: 24px;
  line-height: 32px;
  color: var(--grey-700);             /* Figma grey/700 #434343 */
  max-width: none;                    /* fill the content column, like the body copy */
}
.kf .section__title {
  font-weight: 400;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.005em;
  font-optical-sizing: auto;
}
.kf .body {
  font-family: var(--font-body);      /* Sora (Figma "Body Regular 22") */
  font-weight: 300;                    /* Light */
  font-size: 18px;
  line-height: 26px;
  color: var(--grey-700);
}

/* ---- Sub-section headings (Ek Mukta Medium 26) ---- */
.kf-subhead {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(21px, 2.6vw, 26px);
  line-height: 1.25;
  color: var(--grey-700);
  margin: 10px 0 20px;
}

/* ---- The "in the dark" statements: Ek Mukta 22 / grey-700, bold lead-in,
       subtle grey-40 fill + orange left rule (per Figma) ---- */
.kf .hmw { gap: 30px; }
.kf .hmw__item {
  font-family: var(--font-body);
  font-weight: 300;
  font-style: normal;
  font-size: 18px;
  line-height: 26px;
  color: var(--grey-600);
  background: var(--grey-100);
  border-left: 2px solid var(--tangy-500);   /* Figma Tangy Orange/500 #ff910a */
  padding: 6px 15px;
}
.kf .hmw__item strong { color: var(--grey-700); font-weight: 700; }

/* ===================================================== PROMISE CARDS */
.kf-cards {
  list-style: none;
  margin: 32px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.kf-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--grey-50);
  border-radius: 12px;
  padding: 24px;
}
.kf-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--kf-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
}
.kf-card__icon svg { width: 20px; height: 20px; display: block; }
.kf-card__title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  color: var(--grey-900);
  margin: 0;
}
.kf-card__desc {
  font-size: 16px;
  line-height: 1.5;
  color: var(--grey-500);
  margin: 0;
}

/* ============================================== COMPLIANCE / ALERTS */
.kf-status {
  border: 1px solid var(--grey-200);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  margin: 8px 0 40px;
}
.kf-status__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--grey-200);
  background: var(--grey-40);
}
.kf-status__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--grey-600);
}
.kf-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red-700);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}
.kf-alerts { list-style: none; margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.kf-alert {
  background: var(--red-200);
  color: var(--red-800);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.45;
}
.kf-alert a { color: var(--red-800); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ===================================================== BLUEPRINT STRIP */
.kf-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin: 8px 0 32px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.kf-strip__item {
  flex: 0 0 auto;
  height: clamp(240px, 40vw, 380px);
  margin: 0;
  scroll-snap-align: start;
}
.kf-strip__item img { width: auto; height: 100%; max-width: none; }

/* ===================================================== STAT TILES */
.kf-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 28px 0 8px;
}
.kf-stat {
  background: var(--grey-50);
  border: none;
  border-top: 3px solid var(--accent-soft);
  border-radius: 0;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kf-stat__icon { width: 29px; height: 29px; color: var(--accent); flex: 0 0 auto; }
.kf-stat__icon svg { width: 100%; height: 100%; display: block; }
.kf-stat__num {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 42px);
  line-height: 1;
  color: var(--grey-700);
}
.kf-stat__label {
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.35;
  color: var(--grey-700);
}

/* ===================================================== ASSET ASPECTS */
.kf .diagram--marketplace { aspect-ratio: 768 / 337; }
.kf .diagram--flow        { aspect-ratio: 768 / 420; }
.kf .diagram--investor    { aspect-ratio: 768 / 253; }
.kf .diagram--business    { aspect-ratio: 768 / 456; }
.kf .diagram--wide        { aspect-ratio: 840 / 193; }

.kf .asset-slot.is-missing.diagram--marketplace::after { min-height: 220px; }
.kf .asset-slot.is-missing.diagram--flow::after        { min-height: 280px; }
.kf .asset-slot.is-missing.diagram--investor::after    { min-height: 180px; }
.kf .asset-slot.is-missing.diagram--business::after    { min-height: 320px; }
.kf .asset-slot.is-missing.diagram--wide::after        { min-height: 150px; }
.kf .asset-slot.is-missing.kf-strip__item::after       { min-height: 220px; }

/* ===================================================== RESPONSIVE */
@media (max-width: 900px) {
  .kf-cards { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  body.kf { font-size: 17px; }
  .kf-stats { grid-template-columns: 1fr; }
  .kf-strip__item { flex-basis: 92%; }
}

/* =====================================================================
   Case-study updates (Figma "KF Page" resync)
   ===================================================================== */

/* Nav on case-study pages now inherits the uniform base width (see
   .site-nav__inner) so every page's nav has identical left/right gutters. */

/* Introduction marketplace diagram */
.kf .diagram--intro { aspect-ratio: 848 / 372; }
.kf .asset-slot.is-missing.diagram--intro::after { min-height: 240px; }

/* Wide flow maps / service blueprints — readable height, scroll horizontally */
.kf .kf-scroll {
  margin: 8px 0 32px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.kf .kf-scroll:has(img) {
  border: 1px solid var(--grey-300);   /* Figma image frame */
  border-radius: 11px;
  background: var(--grey-40);
}
.kf .kf-scroll img {
  height: clamp(280px, 46vw, 460px);
  width: auto;
  max-width: none;
}
.kf .asset-slot.is-missing.kf-scroll::after { min-height: 300px; }

/* Two-up screenshot row (Go deeper into the cancellation flow) */
.kf .kf-duo {
  display: flex;
  gap: 20px;
  align-items: stretch;
  margin: 8px 0 32px;
}
.kf .kf-duo__item { flex: 1 1 0; min-width: 0; margin: 0; }
.kf .asset-slot.is-missing.kf-duo__item::after { min-height: 220px; }

@media (max-width: 640px) {
  .kf .kf-duo { flex-direction: column; }
  /* In a column, flex-basis:0 collapses the items to ~0 height (and the
     framed overflow:hidden then clips the image away) — reset to content height. */
  .kf .kf-duo__item { flex: 0 0 auto; }
  .kf .kf-scroll img { height: 260px; }
  /* Hide the case-study side nav (Back + section links) on mobile only */
  .cs .sidebar { display: none; }
}

/* ---------------------------------------------------------------------
   Kickfurther revised layout (Figma) — fractional 3-column grid,
   framed images, investor gallery. Max page width 1722px.
   --------------------------------------------------------------------- */

/* Main is now a 3-col grid: sidebar 0.25fr | content 1fr | empty 0.25fr */
.kf .layout {
  max-width: 1722px;
  display: grid;
  grid-template-columns: 0.25fr 1fr 0.25fr;
  gap: 32px;
  align-items: start;
}
.kf .sidebar { width: auto; }        /* fills col 1 (fluid) */
.kf .content { max-width: none; }    /* fills col 2 (fluid) */
/* Body copy fills the full content column edge-to-edge, like the images
   (Figma body nodes span the whole column). */
.kf .body { max-width: none; }

@media (max-width: 900px) {
  .kf .layout { grid-template-columns: 1fr; gap: 0; }   /* stack on tablet/mobile */
}

/* Framed images — 1px Grey/300 border + 11px radius (Figma) */
.kf .asset-slot:has(img) {
  border: 1px solid var(--grey-300);
  border-radius: 11px;
  overflow: hidden;
  background: transparent;
  aspect-ratio: auto;
}
/* wide scroll maps keep their frame but stay horizontally scrollable */
.kf .kf-scroll:has(img) { overflow-x: auto; overflow-y: hidden; }

/* Investor gallery (single combined image) */
.kf .kf-gallery { margin: 8px 0 32px; }
.kf .asset-slot.is-missing.kf-gallery::after { min-height: 480px; }


/* =====================================================================
   About page (Figma node 236:2569) — centred column, photo bento,
   display heading + body. Reuses .home-layout / .home-content centring.
   ===================================================================== */
body.about .home-layout { padding-top: 47px; padding-bottom: 48px; }

.about-stack { display: flex; flex-direction: column; gap: 44px; width: 100%; }

/* Photo bento — 768 × 428, two rows of three (widths per Figma). */
.about-bento {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  aspect-ratio: 768 / 428;
}
.about-bento__row { display: flex; gap: 16px; flex: 1 1 0; min-height: 0; }
.about-bento__cell {
  position: relative;
  min-width: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 0;
}
.about-bento__cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Flex-grow ratios reproduce the exact column widths at 768 and scale down. */
.about-bento__row--1 .about-bento__cell:nth-child(1) { flex: 187 0 0; }
.about-bento__row--1 .about-bento__cell:nth-child(2) { flex: 231 0 0; }
.about-bento__row--1 .about-bento__cell:nth-child(3) { flex: 318 0 0; }
.about-bento__row--2 .about-bento__cell:nth-child(1) { flex: 299 0 0; }
.about-bento__row--2 .about-bento__cell:nth-child(2) { flex: 133 0 0; }
.about-bento__row--2 .about-bento__cell:nth-child(3) { flex: 304 0 0; }
/* Keep the missing-image placeholder filling its cell until photos are added */
.about-bento__cell.is-missing { aspect-ratio: auto; }
.about-bento__cell.is-missing::after { min-height: 100%; }

.about-text { display: flex; flex-direction: column; gap: 32px; width: 100%; }
.about-heading {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(24px, 4.8vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--grey-800);
  margin: 0;
}
/* Body switches to Sora (Figma) — 18/25 desktop, 14/24 mobile */
.about-body p {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.45;
  color: var(--grey-700);
  margin: 0 0 25px;
}
.about-body p:last-child { margin-bottom: 0; }
.about-body ul { margin: 0; padding-left: 27px; list-style: disc; }
.about-body li {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.45;
  color: var(--grey-700);
}

/* "Lets Chat" button — bordered pill, only the bottom-right corner rounded */
.about-cta-wrap { margin-top: 40px; }
.about-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: var(--grey-40);
  border: 1px solid var(--grey-900);
  border-radius: 0 0 9px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--grey-900);
  transition: background .18s ease, color .18s ease;
}
.about-cta:hover { background: var(--grey-900); color: var(--grey-40); }

@media (max-width: 640px) {
  .about-bento { aspect-ratio: auto; }
  .about-bento__row { height: 150px; flex: 0 0 auto; gap: 4px; }
  .about-bento { gap: 8px; }
}

/* =====================================================================
   Sahayya case study (Figma node 534:6485) — reuses the Kickfurther kit
   (body.kf) and adds: a shader hero stage, image+text splits, numbered
   notes, a four-bucket list, and a two-up "what I learned" grid.
   Scoped to body.sa.
   ===================================================================== */

/* Thin section divider (Figma "Line 1" after Scope) */
.sa .sa-rule {
  border: 0;
  border-top: 1px solid var(--grey-200);
  margin: 8px 0 56px;
  width: 100%;
}

/* ---- Figma image treatment --------------------------------------- *
 * Every screenshot sits on a soft grey panel with the image inset,
 * square corners and no stroke (overrides the kit's framed-image rule). */
.sa .sa-shot:has(img) {
  background: var(--grey-100);
  border: 0;
  border-radius: 0;
  padding: 25px;
}
.sa .sa-split__media:has(img) {
  border: 0;
  border-radius: 0;
  background: var(--grey-100);   /* grey container sits behind the image only */
  padding: 20px;
}

/* ---- Image + text split (The customer, Solution 02 blocks) --------- *
 * The grey panel spans the whole row; image left, text vertically
 * centred on the right. */
.sa .sa-split {
  display: flex;
  gap: 40px;
  align-items: center;
  margin: 8px 0 32px;
}
.sa .sa-split__media { flex: 1 1 0; min-width: 0; margin: 0; }
.sa .sa-split__text  { flex: 1 1 0; min-width: 0; }
.sa .sa-split__text .body:last-child { margin-bottom: 0; }
.sa .asset-slot.is-missing.sa-split__media::after { min-height: 320px; }

/* ---- Hero stage: animated shader gradient + laptop mockup ---------- *
 * Container clips the canvas; mockup (transparent PNG) sits on top so the
 * moving gradient shows around and behind it. Square corners (match Figma).
 * aspect-ratio matches the mockup so the laptop lands exactly as before.
 * Un-scoped so it works in the Sahayya hero AND the home Sahayya card. */
.sa-hero-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2051 / 1426;
  margin: 8px 0 40px;
}
.sa-hero-stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;                 /* never blocks clicks */
  /* Fallback shown until WebGPU starts, and if it's unsupported.
     Matches the Figma gradient palette. */
  background: linear-gradient(135deg, #d7ddef 0%, #f5f5f5 50%, #d1cbfd 100%);
}
.sa-hero-stage__mockup {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;                         /* preserve aspect; no distortion */
}
/* In the home project card the stage has no extra vertical margin. */
.hp-case__media .sa-hero-stage { margin: 0; }
/* Home card hover: only the mockup zooms 5%; the shader canvas stays still.
   The stage's overflow:hidden clips the zoomed image to the container. */
.hp-case__media .sa-hero-stage__mockup {
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.2, 1);
  will-change: transform;
}
.hp-case:hover .hp-case__media .sa-hero-stage__mockup,
.hp-case:focus-visible .hp-case__media .sa-hero-stage__mockup { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) {
  .hp-case__media .sa-hero-stage__mockup { transition: none; }
}

/* ---- Full-width screenshots --------------------------------------- */
.sa .asset-slot.is-missing.sa-shot::after { min-height: 300px; }

/* ---- HMW bars: tighter spacing (match Figma) ---------------------- */
.sa .hmw { gap: 16px; }

/* ---- Big bold number for numbered notes (Figma: dark sans) --------- */
.sa .sa-note__num {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--grey-900);
  margin-bottom: 14px;
}

/* ---- "What I learned" — two-up grid ------------------------------- */
.sa .sa-lessons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 24px;
}
.sa .sa-lesson__num {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--grey-900);
  margin-bottom: 36px;
}
.sa .sa-lesson__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  color: var(--grey-900);
  margin: 0 0 10px;
}

@media (max-width: 860px) {
  .sa .sa-split { flex-direction: column; gap: 24px; align-items: stretch; }
  /* stacked: size to content so the image doesn't collapse to a strip */
  .sa .sa-split__media, .sa .sa-split__text { flex: 0 0 auto; }
  .sa .sa-lessons { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .sa .sa-note__num, .sa .sa-lesson__num { font-size: 46px; }
  .sa .sa-split__media:has(img), .sa .sa-shot:has(img) { padding: 16px; }
}


/* =====================================================================
   Agentic Design Systems (Figma node 728:6952) — reuses the case-study kit
   (body.kf) and the grey-panel screenshots (.sa-shot). Adds the Setup cards
   and the 3-up Impact block. Spacing follows the Figma frame: 60px between
   sections, 30px body leading. The shared case-study rules (section rhythm, body
   copy, hero header, screenshot panels, and their phone versions) are scoped to
   body.cs so Sahayya, Kickfurther and this page stay in step; the rest is body.ag.
   ===================================================================== */

/* Section rhythm: 60px gap. flow-root keeps a panel's bottom margin inside the
   section (Figma: 20px panel padding + 60px gap = 80px before the next title). */
.cs .section { margin-bottom: 60px; display: flow-root; }
.cs .section:last-child { margin-bottom: 0; }

/* Body copy: Sora Light 18 / 30 (Figma "Body Regular 22") */
.cs .body { line-height: 30px; margin: 0 0 20px; }
.cs .body:last-child { margin-bottom: 0; }

/* Hero header (Figma): eyebrow 22.5 / title 48 (59px line box, -0.01em) / subtitle 24/32,
   with 10px eyebrow→title, 20px title→subtitle and 32px subtitle→image gaps. */
.cs .eyebrow { margin: 0 0 10px; }
.cs .hero__title { line-height: 1.229; letter-spacing: -0.01em; margin: 0 0 20px; }
.cs .hero__subtitle { margin: 0 0 32px; }
/* Hero image: plain square-cornered slot */
.ag .hero__image { margin: 0; }
.ag .hero__image:has(img) { border: 0; border-radius: 0; }
.ag .hero__image.is-missing { aspect-ratio: 16 / 9; }
.ag .asset-slot.is-missing.hero__image::after { min-height: 100%; height: 100%; }

/* Screenshot panels: 40px above (20 frame gap + 20 inset), 20px below */
.cs .sa-shot { margin: 40px 0 20px; }

/* Sahayya: divider after Scope = 60px above, 1px line, 59px below (Figma: 60 + line + 60);
   hero image to the Role/Timeline row = 32px (8px of it is the meta row's own padding). */
.sa .sa-rule { margin: 0 0 59px; }
.sa .sa-hero-stage { margin: 8px 0 24px; }

/* ---- Setup cards ---------------------------------------------------- */
.ag-cards {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.ag-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 15px;
  background: var(--grey-100);
  border: 1px solid #ededed;
  border-radius: 10px;
}
.ag-card__icon { width: 40px; height: 40px; flex: 0 0 auto; display: block; }
.ag-card__text { display: flex; flex-direction: column; gap: 10px; }
.ag-card__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 22px;
  line-height: 28px;
  color: var(--grey-700);
  margin: 0;
}
.ag-card__desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px;
  line-height: 30px;
  color: var(--grey-600);
  margin: 0;
}

/* ---- Impact: three numbered columns -------------------------------- */
.ag-lessons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}
.ag-lesson {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 40px 0;
  color: var(--grey-700);
}
.ag-lesson__num {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 60px;
  line-height: 1.2667;        /* Figma text box is 76px tall at 60px */
}
.ag-lesson__text { display: flex; flex-direction: column; gap: 10px; }
.ag-lesson__title,
.ag-lesson__desc {
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 32px;
  margin: 0;
}
.ag-lesson__title { font-weight: 600; }
.ag-lesson__desc { font-weight: 300; }

/* ---- Banner: "Try the agent yourself" (Figma 746:10086 / mobile 746:10113) ---- */
.ag-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 20px;
  margin: 0 0 60px;
  background: var(--grey-200);
  border: 1px solid var(--grey-300);
}
.ag-banner:last-child { margin-bottom: 0; }
.ag-banner__text { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.ag-banner__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.229;
  color: var(--grey-800);
  margin: 0;
}
/* "agent" is set larger than the rest of the title (Figma: 28px vs 24px) */
.ag-banner__em { font-size: 28px; }
.ag-banner__desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 20px;
  line-height: 30px;
  color: var(--grey-700);
  margin: 0;
}
.ag-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--grey-900);
  color: var(--grey-40);
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 22px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.ag-banner__icon { width: 21px; height: 21px; flex: 0 0 auto; display: block; object-fit: contain; }
.ag-banner__btn:hover { background: var(--grey-40); color: var(--grey-900); box-shadow: inset 0 0 0 1px var(--grey-900); }
.ag-banner__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .ag-banner__btn { transition: none; } }

/* ---- Stacked layout (large phones / small tablets) ---- */
@media (max-width: 760px) {
  .ag-cards { grid-template-columns: 1fr; gap: 20px; }
  .ag-lessons { grid-template-columns: 1fr; gap: 15px; }
  .ag-lesson { padding: 10px 0; gap: 20px; }
}

/* ---- Phone (Figma "Home Page - Mobile", 390 wide) ---- */
@media (max-width: 640px) {
  .cs .section { margin-bottom: 25px; }
  .cs .section__title { font-size: 24px; line-height: 34px; letter-spacing: -1.04px; margin: 0 0 15px; }
  .cs .body { font-weight: 400; font-size: 14px; line-height: 24px; letter-spacing: 0.07px; color: var(--grey-600); margin: 0 0 15px; }

  /* hero header */
  .cs .hero__title { font-size: 24px; letter-spacing: -0.24px; margin: 0 0 20px; }
  .cs .hero__subtitle { font-size: 18px; line-height: 28px; color: var(--grey-600); margin: 0 0 20px; }

  /* image panels: 5px inset, 20px above / 5px below */
  .cs .sa-shot { margin: 20px 0 5px; }
  .cs .sa-shot:has(img) { padding: 5px; }
  .sa .sa-split__media:has(img) { padding: 5px; }
  /* framed images on every case study share the same phone rhythm: 20px above, 5px below */
  .cs .content .asset-slot:not(.hero__image):not(.kf-duo__item),
  .cs .kf-scroll, .cs .kf-gallery, .cs .kf-duo { margin: 20px 0 5px; }
  .sa .sa-rule { margin: 0 0 24px; }

  /* Setup cards */
  .ag-cards { margin-top: 15px; }
  .ag-card__title { font-size: 18px; color: var(--grey-600); }
  .ag-card__desc { font-size: 14px; line-height: 24px; letter-spacing: 0.07px; }

  /* Learning columns */
  .ag-lessons { margin-top: 0; }
  .ag-lesson { color: var(--grey-600); }
  .ag-lesson__num { font-size: 40px; line-height: 1.25; }
  .ag-lesson__title { font-size: 18px; line-height: 32px; }
  .ag-lesson__desc { font-weight: 400; font-size: 14px; line-height: 24px; letter-spacing: 0.07px; }

  /* banner */
  .ag-banner { padding: 10px; gap: 18px; margin-bottom: 25px; }
  .ag-banner__title { font-size: 22px; }
  .ag-banner__em { font-size: inherit; }
  .ag-banner__desc { font-size: 16px; line-height: 22px; }
  .ag-banner__btn { padding: 10.08px 14.4px; gap: 7.2px; font-size: 12.96px; line-height: 15.84px; }
  .ag-banner__icon { width: 15.12px; height: 15.12px; }
}

/* Hero video (silent autoplay loop): fills the Figma 1026 x 526 slot, cropped to fit */
.ag .hero__image:has(video), .ag .hero__image.has-fallback { border: 0; border-radius: 0; background: transparent; }
.hero__video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }   /* same shape as the 1920x1080 recording */
.asset-slot.is-missing video { display: none; }
.hero__fallback { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero__fallback[hidden], .hero__video[hidden], .vc__btn[hidden] { display: none; }

/* ---- Hero video controls: slim dark bar (matches the banner button), flush at the bottom ---- */
.vc {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding-right: 6px;
  background: rgba(26, 26, 26, 0.88);
  color: var(--grey-40);
}
.vc[hidden] { display: none; }
.vc__btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.vc__btn:hover { background: var(--grey-40); color: var(--grey-900); }
.vc__btn:focus-visible, .vc__seek:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.vc__icon { display: none; width: 24px; height: 24px; }
.vc[data-state="paused"]  .vc__icon--play,
.vc[data-state="playing"] .vc__icon--pause,
.vc[data-state="ended"]   .vc__icon--replay,
.vc[data-muted="true"]    .vc__icon--mute,
.vc[data-muted="false"]   .vc__icon--volume { display: block; }
.vc__time {
  flex: 0 0 auto;
  min-width: 9ch;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.hero__video { cursor: pointer; }

/* timeline */
.vc__seek {
  --p: 0%;
  flex: 1 1 auto;
  min-width: 0;
  height: 24px;
  margin: 0 8px;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.vc__seek::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--grey-40) var(--p), rgba(251, 251, 251, .35) var(--p)); }
.vc__seek::-moz-range-track { height: 2px; background: rgba(251, 251, 251, .35); }
.vc__seek::-moz-range-progress { height: 2px; background: var(--grey-40); }
.vc__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; margin-top: -4px; background: var(--grey-40); border: 0; border-radius: 0; }
.vc__seek::-moz-range-thumb { width: 10px; height: 10px; background: var(--grey-40); border: 0; border-radius: 0; }

@media (max-width: 640px) {
  .vc { height: 40px; padding-right: 4px; }
  .vc__btn { width: 40px; height: 40px; }
  .vc__time { font-size: 12px; min-width: 8ch; }
  .vc__seek { margin: 0 6px; }
}
@media (prefers-reduced-motion: reduce) { .vc__btn { transition: none; } }
