@font-face { font-family: "Geist"; src: url("fonts/geist-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* Shape rule: buttons and nav are full pill, every surface and image is 20px. */
:root {
  --bg: #f3f4f5;
  --surface: #e8eaec;
  --text: #121315;
  --muted: #55595f;
  --line: #d3d6da;
  --accent: #c2410c;
  --on-accent: #fdfdfc;
  --accent-soft: #f6e1d6;
  --glow: rgb(194 65 12 / .14);
  --shadow: 0 10px 30px -12px rgb(40 45 52 / .18);
  --radius: 20px;
  --max: 1240px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --surface: #1a1c1f;
    --text: #eceef0;
    --muted: #a1a6ad;
    --line: #2c2f33;
    --accent: #fb8a4c;
    --on-accent: #1a0d05;
    --accent-soft: #2e1a10;
    --glow: rgb(251 138 76 / .16);
    --shadow: 0 10px 30px -12px rgb(0 0 0 / .6);
  }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { background: var(--bg); color: var(--text); font: 400 1rem/1.6 "Geist", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
p { color: var(--muted); max-width: 60ch; }

/* Scroll progress: shows position on the page (scroll-driven, progressive) */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 20; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; padding: .85rem 1.4rem; border-radius: 999px; font-weight: 500; text-decoration: none; border: 1px solid transparent; transition: transform .35s var(--ease), background-color .25s, box-shadow .35s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 8px 24px -10px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 14px 30px -10px var(--accent); }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Floating pill nav */
header { position: sticky; top: 12px; z-index: 10; }
nav { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 8px 0 20px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.03em; text-decoration: none; }
.brand i { width: 14px; height: 14px; background: var(--accent); border-radius: 4px; transition: transform .6s var(--ease); }
.brand:hover i { transform: rotate(90deg); }
.nav-links { display: none; gap: .25rem; list-style: none; padding: 0; }
.nav-links a { display: block; padding: .45rem .9rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface); }
@media (min-width: 768px) { .nav-links { display: flex; } }
nav .btn { padding: .6rem 1.1rem; font-size: .9rem; }

/* Hero: asymmetric split */
.hero { display: grid; gap: 40px; align-items: center; padding-block: 56px 64px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.15rem; margin: 1.5rem 0 2rem; max-width: 34ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.media { position: relative; border-radius: var(--radius); overflow: hidden; }
.media img { width: 100%; object-fit: cover; }
.hero .media img { aspect-ratio: 4 / 5; max-height: 72dvh; }
.hero .media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); pointer-events: none; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr .85fr; gap: 72px; min-height: calc(100dvh - 72px); padding-block: 24px 40px; }
}
/* Headline words rise from a mask. Padding keeps descenders unclipped. */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.w > span { display: inline-block; }

/* Tool marquee (the only marquee on the page) */
.stack { padding: 32px 0 40px; overflow: hidden; }
.stack p { font-size: .9rem; margin-bottom: 24px; }
.marquee { -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.track { display: flex; gap: 72px; width: max-content; }
.logo { width: 30px; height: 30px; flex: none; background: var(--muted); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; transition: background-color .3s; }
.logo:hover { background: var(--accent); }

/* Services: 3-cell bento with cursor spotlight */
section { padding: 104px 0; }
.section-head { margin-bottom: 48px; }
.section-head p { margin-top: 1rem; font-size: 1.1rem; }
.bento { display: grid; gap: 16px; }
.cell { --x: 50%; --y: 50%; border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; gap: .75rem; min-height: 300px; overflow: hidden; position: relative; isolation: isolate; border: 1px solid var(--line); transition: translate .5s var(--ease), box-shadow .5s var(--ease); }
.cell::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; background: radial-gradient(420px circle at var(--x) var(--y), var(--glow), transparent 60%); transition: opacity .4s; }
.cell:hover { translate: 0 -4px; box-shadow: var(--shadow); }
.cell:hover::after { opacity: 1; }
.cell h3 { font-size: 1.7rem; }
.cell .tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin-top: .5rem; }
.cell .tags li { font-size: .75rem; padding: .25rem .65rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.cell-eng { color: #f3f4f5; background: #121315; padding: 0; border-color: transparent; }
.cell-eng img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .6; transition: transform 1.2s var(--ease); }
.cell-eng:hover img { transform: scale(1.05); }
.cell-eng .body { padding: 32px; background: linear-gradient(transparent, rgb(10 10 12 / .88) 45%); }
.cell-eng p { color: #d5d8dc; }
.cell-eng .tags li { color: #d5d8dc; border-color: rgb(255 255 255 / .2); }
.cell-ds { background: var(--accent-soft); border-color: transparent; }
.cell-ai { background-color: var(--surface); background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px); background-size: 18px 18px; }
@media (min-width: 900px) {
  .bento { grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; }
  .cell-eng { grid-row: span 2; min-height: 640px; }
}

/* Approach: large verb rows, divider draws in on reveal */
.steps { list-style: none; padding: 0; }
.steps li { position: relative; display: grid; gap: .5rem 48px; padding: 40px 0; }
.steps li::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--line); transform-origin: left; transition: transform 1.1s var(--ease); }
.steps h3 { font-size: clamp(2rem, 4.4vw, 3.4rem); transition: color .3s, translate .5s var(--ease); }
.steps li:hover h3 { color: var(--accent); translate: 8px 0; }
.steps p { font-size: 1.1rem; }
@media (min-width: 768px) { .steps li { grid-template-columns: 1fr 1.4fr; align-items: baseline; } }

/* About: image + text split */
.about { display: grid; gap: 40px; align-items: center; }
.about .media img { aspect-ratio: 4 / 3; }
.about p { font-size: 1.1rem; margin-top: 1.25rem; }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1fr; gap: 80px; } }

/* Contact: soft accent glow drifts slowly behind the block */
.contact { position: relative; overflow: hidden; isolation: isolate; background: var(--surface); border-radius: calc(var(--radius) + 8px); padding: 64px 32px; display: grid; gap: 32px; }
.contact::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 65%); }
.contact h2 { font-size: clamp(2.3rem, 5vw, 4.2rem); max-width: 16ch; }
.contact p { font-size: 1.15rem; margin-top: 1rem; }
.contact .ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.contact .mail { color: var(--muted); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .4s var(--ease), color .2s; }
.contact .mail:hover { color: var(--text); background-size: 0 1px; background-position: 100% 100%; }
@media (min-width: 900px) { .contact { padding: 96px 72px; grid-template-columns: 1.4fr 1fr; align-items: end; } .contact .ctas { justify-content: flex-end; } }

footer { padding: 40px 0; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* Motion. Everything below only runs when the visitor allows motion. */
@media (prefers-reduced-motion: no-preference) {
  .anim .w > span { transform: translateY(110%); animation: up 1s var(--ease) forwards; animation-delay: calc(var(--d) * 70ms + 100ms); }
  .anim .hero-copy > p, .anim .hero-copy > .ctas { opacity: 0; animation: rise .9s var(--ease) forwards; }
  .anim .hero-copy > p { animation-delay: .55s; }
  .anim .hero-copy > .ctas { animation-delay: .68s; }
  .anim .hero .media { clip-path: inset(100% 0 0 0); animation: unclip 1.4s var(--ease) .2s forwards; }
  .anim .hero .media img { transform: scale(1.18); animation: settle 1.8s var(--ease) .2s forwards; }
  .anim header { animation: rise .8s var(--ease) both; }

  .anim .reveal { opacity: 0; }
  .anim .reveal.in { animation: rise .9s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms); }
  /* Clip the img, not the observed wrapper: a clipped target never reports as intersecting. */
  .anim .about .media.reveal { opacity: 1; }
  .anim .about .media.reveal.in { animation: none; }
  .anim .about .media img { clip-path: inset(0 0 100% 0); }
  .anim .about .media.in img { animation: unclip 1.3s var(--ease) forwards; }
  .anim .steps li::before { transform: scaleX(0); }
  .anim .steps li.in::before { transform: scaleX(1); }

  .track { animation: marquee 45s linear infinite; }
  .stack:hover .track { animation-play-state: paused; }
  .contact::before { animation: drift 16s ease-in-out infinite alternate; }

  @supports (animation-timeline: scroll()) {
    .progress { animation: grow linear both; animation-timeline: scroll(root); }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track { flex-wrap: wrap; width: auto; gap: 40px; padding: 0 16px; }
  .marquee { -webkit-mask: none; mask: none; }
  .track [aria-hidden] { display: none; }
  .progress { display: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes up { to { transform: none; } }
@keyframes unclip { to { clip-path: inset(0); } }
@keyframes settle { to { transform: scale(1); } }
@keyframes grow { to { transform: scaleX(1); } }
@keyframes marquee { to { transform: translateX(calc(-50% - 36px)); } }
@keyframes drift { to { transform: translate(-260px, 180px) scale(1.2); } }

/* Footer links and legal pages */
.legal-links { display: flex; gap: 1.5rem; }
.legal-links a { text-decoration: none; }
.legal-links a:hover { color: var(--text); }
.legal { max-width: 68ch; padding: 72px 0 96px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 40px; }
.legal h2 { font-size: 1.25rem; letter-spacing: -0.02em; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--text); max-width: none; }
.legal p + p { margin-top: 1rem; }
.legal ul { padding-left: 1.2rem; }
.legal .muted { color: var(--muted); }
