/* =========================================================
   Hexadata Systems — Recent Work
   Theme tokens taken from hexadatasystems.com
   Breakpoints: 1200 · 1024 · 768 · 600 · 420
   ========================================================= */
:root {
  --page: #FAF9FF;
  --surface: #F4F2FF;
  --surface-2: #EAE6FC;
  --tint: #EEEBFF;
  --tint-2: #DDD7FE;
  --card: #FFFFFF;
  --fg: #1E1B3A;
  --ink: #1E1B4B;
  --ink-2: #2A2660;
  --muted: #605D7A;
  --line: #E6E2F5;
  --brand: #6D5DF6;
  --brand-strong: #5848E6;
  --brand-text: #5B4BE0;
  --brand-soft: #8F7CFB;
  --sky: #7CC7FF;
  --coral: #FF9A76;
  --coral-strong: #FF6B4A;
  --green: #34C38F;

  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-brand: "Outfit", "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(1rem, 4vw, 1.5rem);
  --section-y: clamp(4rem, 9vw, 6.5rem);
  --header-h: 84px;
  --r-lg: clamp(22px, 3vw, 32px);
  --shadow-sm: 0 1px 2px rgba(30, 27, 75, .05), 0 4px 14px rgba(30, 27, 75, .05);
  --shadow-md: 0 10px 40px -12px rgba(30, 27, 75, .18);
  --shadow-lg: 0 30px 80px -24px rgba(46, 38, 140, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  background: var(--page);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: clamp(15.5px, 1.1vw, 16.5px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.025em; line-height: 1.08; margin: 0; color: var(--fg); overflow-wrap: break-word; }
h1 em, h2 em { font-style: italic; color: var(--brand); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.mono { font-family: var(--font-mono); font-size: .82em; letter-spacing: .02em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 1rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 1rem; }

/* ---------- Eyebrow ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: 13.5px; font-weight: 600; color: var(--brand-text); margin-bottom: 1.1rem; letter-spacing: .01em; }
.eyebrow .dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 3px; background: linear-gradient(135deg, var(--brand), var(--sky)); transform: rotate(45deg); }
.eyebrow.light { color: #B7ACFD; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: .8rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: 15.5px; border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s; white-space: nowrap; }
.btn .ico { transition: transform .25s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
.btn-sm { min-height: 42px; padding: .55rem 1.1rem; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 24px -8px rgba(109, 93, 246, .7); }
.btn-primary:hover { background: var(--brand-strong); transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(109, 93, 246, .8); }
.btn-ghost { background: #fff; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--tint-2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: background .3s, box-shadow .3s; }
.site-header.scrolled { background: rgba(250, 249, 255, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
/* backdrop-filter would trap the fixed mobile menu inside the header, so drop it while the menu is open */
body.menu-open .site-header { background: var(--page); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 1px 0 var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }
.logo-link { flex-shrink: 0; }
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo-mark { width: 42px; height: 42px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; }
.logo-word { font-family: var(--font-brand); font-size: 29px; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.w-light { font-weight: 200; }
.w-bold { font-weight: 800; }
.logo-sub { font-size: 8.5px; font-weight: 700; letter-spacing: .52em; margin-top: 6px; padding-left: .1em; color: var(--muted); line-height: 1; }
.nav-links { display: flex; gap: .15rem; font-size: 15px; }
.nav-links a { position: relative; display: block; padding: .5rem .85rem; color: var(--muted); transition: color .2s; white-space: nowrap; }
.nav-links a:hover { color: var(--fg); }
.nav-links a::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: -3px; height: 2px; border-radius: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a.is-active { color: var(--fg); font-weight: 600; }
.nav-links a.is-active::after, .nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: flex; align-items: center; gap: .75rem; }
.burger { display: none; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: #fff; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.burger span { width: 18px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu { position: fixed; inset: var(--header-h) 0 0 0; display: flex; flex-direction: column; gap: 1rem; padding: 1rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom)); background: var(--page); overflow-y: auto; animation: menuIn .3s var(--ease); }
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { display: flex; justify-content: space-between; align-items: center; padding: 1.05rem 0; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: clamp(24px, 7vw, 30px); letter-spacing: -.02em; }
.mobile-menu nav a .ico { color: var(--brand); }
.mobile-menu nav a.is-active { color: var(--brand-text); }
.mobile-menu .btn { margin-top: .75rem; }
.mobile-contact { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding-top: .25rem; }
.mobile-contact a { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: 15px; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3.5rem, 7vw, 5rem); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.b1 { width: min(520px, 90vw); aspect-ratio: 1; background: radial-gradient(circle, #DDD7FE, transparent 70%); top: -180px; right: -80px; }
.b2 { width: min(420px, 80vw); aspect-ratio: 1; background: radial-gradient(circle, #D6ECFF, transparent 70%); bottom: -160px; left: -120px; }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%); opacity: .55; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 3.5rem); align-items: center; }
.hero h1 { font-size: clamp(38px, 6.2vw, 72px); line-height: 1.03; letter-spacing: -.02em; margin-bottom: 1.5rem; }
em.grad { background: linear-gradient(90deg, var(--brand), var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }
.scribble-wrap { position: relative; display: inline-block; }
.scribble { position: absolute; left: 0; bottom: -.18em; width: 100%; height: .25em; overflow: visible; }
.scribble path { fill: none; stroke: var(--coral); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw 1.1s .7s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lead { font-size: clamp(16.5px, 1.5vw, 19px); color: var(--muted); max-width: 36rem; line-height: 1.7; }
.lead.narrow { max-width: 26rem; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 2.4rem; }
.hero-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(1.25rem, 4vw, 2.5rem); margin: 0; padding-top: 1.6rem; border-top: 1px solid var(--line); max-width: 34rem; }
.hero-stats dt { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; color: var(--ink); line-height: 1.05; white-space: nowrap; }
.hero-stats dd { margin: .35rem 0 0; font-size: 14px; color: var(--muted); line-height: 1.4; }

/* stacked browser cards — sized by the container's width */
.hero-stack { position: relative; width: 100%; aspect-ratio: 1.15 / 1; }
.stack-card { position: absolute; width: 80%; border-radius: clamp(10px, 1.6vw, 18px); overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.7); transition: transform .6s var(--ease); }
.stack-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.stack-card.s0 { top: 2%; right: 0; transform: rotate(3deg); z-index: 1; }
.stack-card.s1 { top: 30%; left: 0; transform: rotate(-4deg); z-index: 2; }
.stack-card.s2 { bottom: 2%; right: 5%; transform: rotate(1.5deg); z-index: 3; }
.hero-stack:hover .s0 { transform: rotate(5deg) translate(12px, -10px); }
.hero-stack:hover .s1 { transform: rotate(-6deg) translate(-14px, 0); }
.hero-stack:hover .s2 { transform: rotate(0deg) translate(0, 10px); }

.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #F6F5FC; border-bottom: 1px solid var(--line); min-width: 0; }
.browser-bar i { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: #E1DCF4; }
.browser-bar i:nth-child(1) { background: #FF8A7A; }
.browser-bar i:nth-child(2) { background: #FFCB5C; }
.browser-bar i:nth-child(3) { background: #5BD4A0; }
.browser-bar span { margin-left: 10px; flex: 1; min-width: 0; max-width: 300px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Industry strip ---------- */
.clients { border-block: 1px solid var(--line); background: rgba(255,255,255,.55); }
.clients-row { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; padding-block: 1.2rem; }
.client-chip { padding: .45rem 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 500; transition: border-color .2s, color .2s; }
.client-chip:hover { border-color: var(--brand); color: var(--brand-text); }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-tint { background: linear-gradient(180deg, var(--surface), var(--page)); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.25rem 2rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head h2 { font-size: clamp(32px, 4.4vw, 52px); }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head.center .lead { margin: .6rem auto 0; }

/* ---------- Project cards ---------- */
.projects { display: flex; flex-direction: column; gap: clamp(1.25rem, 3vw, 2rem); }
.project { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; padding: clamp(1rem, 2.5vw, 2rem); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: box-shadow .4s var(--ease), border-color .4s; }
.project:hover { box-shadow: var(--shadow-md); border-color: var(--tint-2); }
.project.flip .project-media { order: 2; }
.project-media { position: relative; display: block; border-radius: clamp(14px, 2vw, 22px); padding: clamp(1rem, 3vw, 2.2rem); background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 14%, #fff), color-mix(in srgb, var(--accent-2) 18%, #fff)); overflow: hidden; isolation: isolate; }
.media-glow { position: absolute; inset: auto -20% -40% auto; width: 70%; height: 80%; border-radius: 50%; background: var(--accent); filter: blur(80px); opacity: .25; z-index: -1; transition: opacity .5s; }
.project:hover .media-glow { opacity: .45; }
.browser { border-radius: clamp(10px, 1.4vw, 14px); overflow: hidden; background: #fff; box-shadow: 0 24px 50px -18px color-mix(in srgb, var(--pdark, #1E1B4B) 55%, transparent); transition: transform .6s var(--ease); }
.browser img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; transition: transform 1.2s var(--ease); }
.project:hover .browser { transform: translateY(-6px) rotate(-.6deg); }
.project:hover .browser img { transform: scale(1.04); }

.project-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; font-size: 14px; margin-bottom: 1rem; }
.tag { padding: .28rem .75rem; border-radius: 999px; background: var(--tint); color: var(--brand-text); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.tag-project { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }
.tag-nda { display: inline-flex; align-items: center; gap: .3rem; background: var(--ink); color: #fff; }
.nda-note { display: inline-flex; align-items: center; gap: .4rem; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.project-body { min-width: 0; }
.project-body h3 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: .5rem; }
.project-body h3 a { padding-block: .3rem; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .4s var(--ease); }
.project-body h3 a:hover { background-size: 100% 2px; }
.project-tagline { font-family: var(--font-display); font-style: italic; font-size: clamp(17px, 1.6vw, 19px); color: var(--accent); margin-bottom: .9rem; }
.project-body > p:not(.project-tagline) { color: var(--muted); }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: 1.4rem 0; }
.mini-stats li { padding: .85rem 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.mini-stats strong { display: block; white-space: nowrap; font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 2vw, 24px); color: var(--ink); line-height: 1.1; }
.mini-stats span { font-size: 12.5px; color: var(--muted); line-height: 1.35; display: block; margin-top: .25rem; }
.stack { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.5rem; }
.stack li { font-family: var(--font-mono); font-size: 12px; padding: .3rem .7rem; border-radius: 8px; border: 1px dashed var(--tint-2); color: var(--ink-2); background: #fff; }
.stack-lg li { font-size: 13px; padding: .45rem .9rem; }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.3rem; }
.link-ext { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: 15px; color: var(--brand-text); padding-block: .5rem; }
.link-ext:hover { text-decoration: underline; text-underline-offset: 4px; }

.next-up { display: flex; align-items: center; gap: 1.25rem 1.5rem; padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem); border-radius: var(--r-lg); border: 1.5px dashed var(--tint-2); background: rgba(255,255,255,.6); }
.next-up > div { flex: 1; }
.next-up h3 { font-size: clamp(22px, 2.4vw, 26px); margin-bottom: .3rem; }
.next-up p { margin: 0; }

/* ---------- What we do ---------- */
.caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.cap { padding: clamp(1.4rem, 2.5vw, 1.8rem); border-radius: 24px; background: #fff; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.cap:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.cap h3 { font-size: 22px; margin: 1.2rem 0 .6rem; }
.cap p { color: var(--muted); font-size: 15px; margin: 0; }
.cap-ico { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--tint); color: var(--brand); flex-shrink: 0; }
.cap-ico.alert { background: #FFF1EF; color: var(--coral-strong); }

/* ---------- How we work ---------- */
.process { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; position: relative; }
.process::before { content: ""; position: absolute; top: 22px; left: 2%; right: 2%; height: 1px; background: repeating-linear-gradient(90deg, var(--tint-2) 0 8px, transparent 8px 14px); }
.process li { position: relative; padding-top: 3.6rem; }
.step-n { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13px; box-shadow: 0 0 0 6px var(--page); }
.process h3 { font-size: 22px; margin-bottom: .5rem; }
.process p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: #fff; padding: 1.3rem 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2rem); width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 26px); color: var(--ink); white-space: nowrap; }
.marquee-track i { color: var(--brand-soft); font-style: normal; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- CTA ---------- */
.cta { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 2rem 2.5rem; flex-wrap: wrap; padding: clamp(2rem, 5vw, 4rem); border-radius: var(--r-lg); background: radial-gradient(circle at 85% 20%, rgba(124, 199, 255, .25), transparent 40%), radial-gradient(circle at 10% 100%, rgba(109, 93, 246, .55), transparent 50%), var(--ink); color: rgba(255,255,255,.75); overflow: hidden; }
.cta h2 { color: #fff; font-size: clamp(30px, 4.4vw, 54px); margin-bottom: 1rem; }
.cta h2 em { color: #B7ACFD; }
.cta-copy { max-width: 40rem; }
.cta-copy p:last-child { margin: 0; }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.link-light { padding-block: .4rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.35); overflow-wrap: anywhere; }
.link-light:hover { border-color: #fff; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--ink); color: rgba(255,255,255,.68); padding: clamp(3.5rem, 7vw, 5rem) 0 calc(2rem + env(safe-area-inset-bottom)); font-size: 15px; }
.site-footer .logo-word { color: #fff; }
.site-footer .logo-sub { color: rgba(255,255,255,.55); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2.5rem; position: relative; z-index: 1; }
.footer-brand p { margin: 1.4rem 0 1.2rem; max-width: 21rem; }
.footer-mail { display: flex; width: fit-content; min-height: 44px; align-items: center; gap: .5rem; color: #fff; overflow-wrap: anywhere; }
.footer-mail:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer h4 { font-family: var(--font-sans); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; }
.site-footer li { margin-bottom: .1rem; }
.site-footer li a { display: inline-block; padding-block: .45rem; }
.site-footer li a:hover, .footer-bottom a:hover { color: #fff; }
.footer-alert { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1.4rem; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); align-self: start; }
.footer-alert .mono { color: var(--coral); }
.footer-alert p { margin: 0 0 .5rem; font-size: 14.5px; }
.footer-bottom a { display: inline-block; padding-block: .5rem; font-size: 12.5px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px; position: relative; z-index: 1; }
.footer-hex { position: absolute; right: -60px; bottom: -80px; width: 340px; color: rgba(255,255,255,.05); pointer-events: none; }

/* =========================================================
   Project page
   ========================================================= */
.case-hero { position: relative; padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2rem, 4vw, 3rem); overflow: hidden; }
.project-blob { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%); }
.crumbs { display: flex; flex-wrap: wrap; gap: .6rem; color: var(--muted); margin-bottom: clamp(1.5rem, 4vw, 2.4rem); }
.crumbs a { color: var(--brand-text); }
.crumbs a:hover { text-decoration: underline; }
.case-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.case-head h1 { font-size: clamp(40px, 6.5vw, 84px); line-height: 1; margin-bottom: 1rem; }
.case-tagline { font-family: var(--font-display); font-style: italic; font-size: clamp(19px, 2vw, 26px); color: var(--accent); margin: 0; }
.case-head .lead { margin: 0; }
.case-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.case-facts div { padding: 1.2rem 1.3rem; border-right: 1px solid var(--line); min-width: 0; }
.case-facts div:last-child { border-right: 0; }
.case-facts dt { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .4rem; }
.case-facts dd { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.case-facts dd a { display: inline-flex; min-height: 40px; align-items: center; gap: .3rem; color: var(--accent); }
.case-shot { padding-bottom: 1rem; }
.case-frame { position: relative; padding: clamp(.9rem, 4vw, 4rem); border-radius: var(--r-lg); background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 16%, #fff), color-mix(in srgb, var(--accent-2) 20%, #fff)); overflow: hidden; isolation: isolate; }
.case-frame .media-glow { opacity: .35; }
.browser-lg { max-width: 1000px; margin: 0 auto; border-radius: clamp(10px, 1.8vw, 18px); }
.case-highlights { padding: clamp(1.5rem, 4vw, 3rem) 0 0; }
.case-highlights ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 2vw, 1.25rem); }
.case-highlights li { padding: clamp(1.3rem, 3vw, 2rem); border-radius: 24px; background: var(--pdark); color: rgba(255,255,255,.72); position: relative; overflow: hidden; }
.case-highlights li::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: var(--accent); opacity: .35; filter: blur(30px); }
.case-highlights strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(34px, 4.5vw, 56px); color: #fff; line-height: 1; margin-bottom: .6rem; }
.story { display: flex; flex-direction: column; gap: clamp(2.5rem, 6vw, 4.5rem); }
.story-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.25rem 3rem; padding-top: clamp(1.5rem, 3vw, 2.5rem); border-top: 1px solid var(--line); }
.story-label { font-size: clamp(26px, 3vw, 30px); }
.story-label .mono { display: block; color: var(--accent); font-size: 14px; margin-bottom: .6rem; font-family: var(--font-mono); font-style: normal; }
.story-text.big { font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 28px); line-height: 1.45; color: var(--ink); margin: 0; }
.approach { display: flex; flex-direction: column; gap: 1.2rem; }
.approach li { display: flex; gap: 1rem; font-size: clamp(16px, 1.4vw, 17.5px); color: var(--fg); }
.check { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); margin-top: 1px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.feature { padding: clamp(1.4rem, 2.5vw, 1.9rem); border-radius: 24px; background: #fff; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 30%, #fff); }
.feature-ico { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 11%, #fff); color: var(--accent); }
.feature h3 { font-size: 22px; margin: 1.2rem 0 .55rem; }
.feature p { color: var(--muted); font-size: 15px; margin: 0; }
.lead .ico, .nda-note .ico, .tag .ico { display: inline-block; vertical-align: -2px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); }
.shot { margin: 0; }
.shot-wide { grid-column: 1 / -1; }
.shot-open { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in; border-radius: clamp(10px, 1.4vw, 14px); }
.shot .browser { border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.shot img { aspect-ratio: 1800 / 1125; }
.shot-open:hover .browser { transform: translateY(-4px); }
.shot figcaption { margin-top: .85rem; font-size: 14.5px; color: var(--muted); }
.lightbox { width: min(1400px, 96vw); max-height: 94vh; padding: 0; border: 0; border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); overflow: auto; }
.lightbox::backdrop { background: rgba(17, 15, 46, .72); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; }
.lightbox-cap { margin: 0; padding: .9rem 1.2rem; font-size: 14.5px; color: var(--muted); }
.lightbox-close { position: sticky; top: 10px; float: right; margin: 10px 10px -50px 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 24px; line-height: 1; z-index: 1; }
.outcome-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2.5rem 3rem; align-items: start; }
.outcome { margin: 0; padding: clamp(1.75rem, 4vw, 3rem); border-radius: var(--r-lg); background: radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--accent) 50%, transparent), transparent 55%), var(--ink); color: #fff; }
.outcome-text { font-family: var(--font-display); font-size: clamp(21px, 2.4vw, 30px); line-height: 1.4; margin-bottom: 2rem; }
.outcome .btn { white-space: normal; text-align: center; }
.next-wrap { padding-top: 0; }
.next { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; align-items: center; padding: clamp(1.5rem, 3.5vw, 2.5rem); border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); transition: box-shadow .4s, border-color .4s; overflow: hidden; }
.next:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 35%, #fff); }
.next h2 { font-size: clamp(28px, 4vw, 52px); margin: .6rem 0; display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1rem; }
.next-arrow { color: var(--accent); transition: transform .35s var(--ease); }
.next:hover .next-arrow { transform: translateX(8px); }
.next img { border-radius: 14px; aspect-ratio: 1200/630; object-fit: cover; transform: rotate(2deg); box-shadow: var(--shadow-md); transition: transform .5s var(--ease); }
.next:hover img { transform: rotate(0) scale(1.03); }
.notfound { padding: clamp(5rem, 12vw, 8rem) 0; }
.notfound h1 { font-size: clamp(34px, 5vw, 60px); margin-bottom: 1rem; }
.notfound .lead { margin: 0 auto 2rem; }

/* =========================================================
   Contact page
   ========================================================= */
.contact-hero { padding-bottom: var(--section-y); }
.copy-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 48px; padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--page); color: var(--fg); font-size: 14.5px; font-weight: 600; transition: background .2s, border-color .2s, color .2s; }
.copy-btn:hover { border-color: var(--tint-2); }
.copy-btn.copied { background: #E3F8EF; border-color: #BDEBD6; color: #047857; }

/* contact page layout: intro → two cards → steps */
.contact-wrap { display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 3rem); }
.contact-intro { max-width: 760px; }
.contact-intro h1 { font-size: clamp(36px, 5.5vw, 64px); margin-bottom: 1.1rem; }
.contact-intro .lead { margin: 0; }
.contact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.5rem); }
.contact-card { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); min-width: 0; }
.contact-card h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 1.1rem 0 .4rem; }
.contact-card > p { margin: 0 0 1.2rem; font-size: 15.5px; }
.contact-value { padding-block: .45rem; margin-top: -.45rem; font-family: var(--font-display); font-size: clamp(21px, 2.6vw, 30px); color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; margin-bottom: .95rem; }
.contact-value:hover { color: var(--brand-text); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: auto; }
.contact-wrap .next-steps { margin-top: 0; padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: var(--r-lg); background: rgba(255,255,255,.65); border: 1px dashed var(--tint-2); }
.contact-wrap .next-steps ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.contact-wrap .next-steps ol::before { display: none; }

/* what happens next */
.next-steps { margin-top: 2.2rem; }
.next-steps h2 { font-size: clamp(22px, 2.4vw, 26px); margin-bottom: 1.1rem; }
.next-steps ol { display: flex; flex-direction: column; gap: 1rem; position: relative; }
.next-steps ol::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 1px; background: repeating-linear-gradient(180deg, var(--tint-2) 0 6px, transparent 6px 11px); }
.next-steps li { display: flex; gap: 1rem; position: relative; }
.step-dot { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-mono); font-size: 13px; box-shadow: 0 0 0 5px var(--page); }
.next-steps strong { display: block; font-size: 16px; margin: .35rem 0 .15rem; }
.next-steps p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .scribble path { stroke-dashoffset: 0; }
}
/* Touch screens: no hover lifts that stick after a tap */
@media (hover: none) {
  .project:hover .browser, .project:hover .browser img, .cap:hover, .feature:hover, .btn:hover { transform: none; }
}

/* =========================================================
   Responsive
   ========================================================= */

/* Small laptops */
@media (max-width: 1200px) {
  .nav-links a { padding-inline: .65rem; }
  .nav-links a::after { left: .65rem; right: .65rem; }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-facts div { border-bottom: 1px solid var(--line); }
  .case-facts div:nth-child(3) { border-right: 0; }
  .case-facts div:nth-child(4), .case-facts div:nth-child(5) { border-bottom: 0; }
}

/* Tablets (landscape) and below: burger menu, single-column layouts */
@media (max-width: 1024px) {
  :root { --header-h: 76px; }
  .nav-main { display: none; }
  .burger { display: flex; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 680px; }
  .hero-stack { max-width: 560px; margin-inline: auto; }
  .project, .project.flip { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .project.flip .project-media { order: 0; }
  .project-body { padding: 0 .25rem .25rem; }
  .process { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 680px; }
  .process::before { top: 22px; bottom: 22px; left: 22px; right: auto; width: 1px; height: auto; background: repeating-linear-gradient(180deg, var(--tint-2) 0 8px, transparent 8px 14px); }
  .process li { padding: 0 0 2rem 4.5rem; min-height: 64px; }
  .process li:last-child { padding-bottom: 0; }
  .case-head, .outcome-grid { grid-template-columns: minmax(0, 1fr); }
  .story-row { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tablets (portrait) */
@media (max-width: 768px) {
  .nav-cta .btn-sm { display: none; }
  /* Contact: cards and steps stack */
  .contact-cards { grid-template-columns: minmax(0, 1fr); }
  .contact-wrap .next-steps ol { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .contact-wrap .next-steps ol::before { display: block; }
  .section-head { align-items: flex-start; }
  .next { grid-template-columns: minmax(0, 1fr); }
  .next img { transform: none; }
  .cta-actions { width: 100%; }
}

/* Phones */
@media (max-width: 600px) {
  .logo-word { font-size: 25px; }
  .logo-mark { width: 38px; height: 38px; }
  .logo-sub { font-size: 7.5px; margin-top: 5px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .hero-stats dt { white-space: normal; }
  .hero-stats dd { font-size: 13px; }
  .hero-stack { aspect-ratio: 1.05 / 1; }
  .stack-card { width: 84%; }
  .browser-bar { padding: 7px 10px; gap: 5px; }
  .browser-bar i { width: 8px; height: 8px; }
  .browser-bar span { font-size: 10.5px; margin-left: 6px; padding: 2px 8px; }
  .clients-row .mono { flex-basis: 100%; }
  .project { border-radius: 22px; }
  .project-actions .btn { flex: 1 1 100%; }
  .project-actions .link-ext { margin-inline: auto; }
  .next-up { flex-direction: column; align-items: flex-start; }
  .next-up .btn { width: 100%; }
  .caps, .features { grid-template-columns: minmax(0, 1fr); }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-facts div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .case-facts div:nth-child(2n) { border-right: 0; }
  .case-facts div:nth-child(4) { border-bottom: 1px solid var(--line); }
  .case-facts div:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .case-highlights ul { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .cta-actions .btn { width: 100%; }
  .contact-actions { width: 100%; }
  .contact-actions .btn, .contact-actions .copy-btn { flex: 1 1 100%; }
  :root { --section-y: 3.5rem; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.25rem; }
  .footer-brand, .footer-alert { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: .25rem; }
}

/* Small phones */
@media (max-width: 420px) {
  .hero-stats { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .hero-stats div { display: flex; align-items: baseline; gap: .75rem; }
  .hero-stats dd { margin: 0; }
  .mini-stats { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .mini-stats li { display: flex; align-items: baseline; gap: .75rem; padding: .7rem .9rem; }
  .mini-stats strong { flex-shrink: 0; min-width: 0; }
  .mini-stats span { margin: 0; }
  .case-facts { grid-template-columns: minmax(0, 1fr); }
  .case-facts div { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .case-facts div:last-child { border-bottom: 0; }
}

/* Very small phones: footer back to one column */
@media (max-width: 340px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Contact page: the footer's "Have a project?" box would just point back to this page */
.page-contact .footer-alert { display: none; }
