/* Gestu web. Dark-only by brand decision: the navy (#060731) ground is part of
   the identity. Color roles: red = actions (CTAs), cyan = links and focus,
   blue/orange only inside brand marks and ambient light.
   Shape rule: interactive controls are pills, containers 20px, inputs 12px. */

:root {
  --navy-950: #03041a;
  --navy-900: #060731;
  --navy-800: #0c0e46;
  --navy-700: #15185c;
  --red: #ff3333;
  --orange: #f65734;
  --cyan: #00d2fb;
  --blue: #0575f7;
  --ink: #f3f4ff;
  --ink-soft: #c9cbe8;
  --muted: #9a9dc6;
  --line: rgb(255 255 255 / 0.09);
  --line-strong: rgb(255 255 255 / 0.18);
  --surface: rgb(255 255 255 / 0.035);
  --surface-strong: rgb(255 255 255 / 0.06);
  --danger: #ff8a8a;
  --success: #5ef0c1;

  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter Tight", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Tight", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-box: 20px;
  --radius-input: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --header-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --z-ambient: 0;
  --z-content: 1;
  --z-header: 50;
  --z-skip: 100;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy-950);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--red); color: var(--navy-900); }
main, .site-footer { position: relative; z-index: var(--z-content); }
main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: fixed; top: 8px; left: 8px; z-index: var(--z-skip);
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--navy-900);
  transform: translateY(-160%); transition: transform 0.2s var(--ease-out);
}
.skip:focus { transform: none; }

/* Ambient light: three slow blobs in brand colors behind everything. */
.ambient { position: fixed; inset: 0; z-index: var(--z-ambient); pointer-events: none; overflow: hidden; }
.ambient span {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  filter: blur(100px); opacity: 0.14; will-change: transform;
}
.ambient span:nth-child(1) { background: var(--red); top: -18vmax; right: -12vmax; animation: drift-a 26s var(--ease-in-out) infinite alternate; }
.ambient span:nth-child(2) { background: var(--blue); bottom: -22vmax; left: -16vmax; opacity: 0.22; animation: drift-b 32s var(--ease-in-out) infinite alternate; }
.ambient span:nth-child(3) { background: var(--cyan); top: 40%; left: 45%; width: 24vmax; height: 24vmax; opacity: 0.1; animation: drift-c 22s var(--ease-in-out) infinite alternate; }
@keyframes drift-a { to { transform: translate(-14vmax, 12vmax) scale(1.1); } }
@keyframes drift-b { to { transform: translate(16vmax, -10vmax) scale(0.92); } }
@keyframes drift-c { to { transform: translate(-20vmax, 14vmax); } }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: var(--z-header);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgb(3 4 26 / 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line);
}
.header-row { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; padding: 8px 0; }
.brand img { width: 120px; height: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.nav a:not(.btn):hover { color: var(--ink); }
.nav .lang {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em;
  padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px;
}
.nav-toggle { display: none; }

/* Buttons */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border-radius: 999px;
  font: 600 1rem/1.1 var(--font-body); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; touch-action: manipulation;
  transform: translate(var(--mx), var(--my));
  transition: transform 0.35s var(--ease-out), background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.3s;
}
.btn:active { transform: translate(var(--mx), var(--my)) scale(0.97); }
.btn--primary { background: var(--red); color: var(--navy-900); box-shadow: 0 10px 30px -12px rgb(255 51 51 / 0.7); }
.btn--primary:hover { background: #ff4d4d; color: var(--navy-900); box-shadow: 0 14px 40px -12px rgb(255 51 51 / 0.85); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--ink); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 0.92rem; }
.btn--lg { min-height: 52px; padding: 14px 28px; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Typography */
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
.section-title {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1.02;
}
.section-intro { color: var(--ink-soft); max-width: 56ch; margin: 18px 0 0; font-size: 1.12rem; }
.text-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 4px; }
.text-link span { transition: transform 0.25s var(--ease-out); display: inline-block; }
.text-link:hover span { transform: translateX(4px); }

/* Hero */
.hero { min-height: min(100dvh, 920px); display: flex; align-items: center; padding-block: calc(var(--header-h) + 32px) 64px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; align-items: center; gap: 48px; }
.hero-title {
  font-size: clamp(2.5rem, 5.2vw, 4.4rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1.04;
}
.hero-title em { font-style: normal; }
/* Gradient sits on the innermost text box so it survives the per-word split. */
.hero-title em, .hero-title em .word > span {
  background: linear-gradient(100deg, var(--red), var(--orange) 55%, #ff8a5c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-title.is-split em { background: none; color: inherit; }
.hero-eyebrow { margin: 0 0 20px; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.hero-text { color: var(--ink-soft); font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 44ch; margin: 28px 0 36px; }
.hero-visual { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero-mark { width: 62%; height: auto; overflow: visible; position: relative; z-index: 1; filter: drop-shadow(0 30px 60px rgb(255 51 51 / 0.25)); }
.hero-rings { position: absolute; inset: 0; display: grid; place-items: center; }
.hero-rings span {
  position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgb(0 210 251 / 0.35); opacity: 0;
}

/* Services bento: 4 cells on a 6-column grid (4+2 / 2+4). */
.section { padding-block: clamp(80px, 12vw, 150px); }
.services { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 48px; }
.service {
  --x: 50%; --y: 50%;
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(28px, 3vw, 40px); border-radius: var(--radius-box);
  background: var(--surface); border: 1px solid var(--line);
  min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
}
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--x) var(--y), rgb(0 210 251 / 0.14), transparent 60%);
}
.service:hover::before { opacity: 1; }
.service h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 800; letter-spacing: -0.02em; }
.service p { margin: 0; color: var(--ink-soft); max-width: 46ch; }
.service--1 { grid-column: span 4; min-height: 300px; background: linear-gradient(135deg, rgb(255 51 51 / 0.2), rgb(246 87 52 / 0.04) 55%), var(--surface); }
.service--2 { grid-column: span 2; }
.service--3 { grid-column: span 2; }
.service--4 { grid-column: span 4; background: linear-gradient(315deg, rgb(5 117 247 / 0.26), rgb(0 210 251 / 0.04) 60%), var(--surface); }

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; margin: 0; padding: 0; list-style: none; animation: marquee 38s linear infinite; }
.marquee-track li { font-family: var(--font-mono); font-size: 0.95rem; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 56px; }
.marquee-track li::after { content: "›"; color: var(--cyan); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Projects: 2 columns, the right column offset to break the grid. */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 64px 40px; margin-top: 56px; }
.project:nth-child(even) { transform: translateY(96px); }
.project-shot {
  display: block; border-radius: var(--radius-box); overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--navy-800);
  box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.8);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease-out), border-color 0.3s;
}
.project-shot:hover { border-color: rgb(0 210 251 / 0.5); }
.project-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; transition: transform 0.8s var(--ease-out); }
.project-shot:hover img { transform: scale(1.035); }
.project-body { padding-top: 24px; }
.project-kind { margin: 0 0 6px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--cyan); }
.project-body h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 900; letter-spacing: -0.03em; }
.project-body > p:not(.project-kind) { color: var(--ink-soft); margin: 10px 0 14px; max-width: 52ch; }
.section#work { padding-bottom: clamp(140px, 16vw, 220px); }

/* Pains: the red half-ring color marks problems; reasons use the cyan chevron. */
.pains { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.pain { padding: 28px 0 32px; border-top: 1px solid var(--line); position: relative; }
.pain::before { content: ""; position: absolute; top: -1px; left: 0; width: 56px; height: 2px; background: linear-gradient(90deg, var(--red), var(--orange)); }
.pain h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.pain p { margin: 0; color: var(--ink-soft); max-width: 48ch; }

.reasons { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reason { display: flex; gap: 20px; align-items: flex-start; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-box); background: var(--surface); border: 1px solid var(--line); }
.reason-mark { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font: 900 1.6rem/1 var(--font-display); color: var(--navy-900); background: linear-gradient(160deg, var(--blue), var(--cyan)); }
.reason h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.reason p { margin: 0; color: var(--ink-soft); }

.narrow { max-width: 880px; }
.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: clamp(1.1rem, 1.7vw, 1.3rem); font-weight: 700; letter-spacing: -0.01em; }
.faq-item summary:hover h3 { color: var(--cyan); }
.faq-icon { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; transition: transform 0.3s var(--ease-out), border-color 0.2s; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; background: var(--ink); transform: translate(-50%, -50%); border-radius: 2px; }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.3s var(--ease-out); }
.faq-item[open] .faq-icon { border-color: var(--cyan); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-item p { margin: 0 0 24px; color: var(--ink-soft); max-width: 68ch; }
.about-copy em { font-style: normal; color: var(--ink); font-weight: 600; }

/* Process: a sequence, so a line fills as each step is reached. */
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.steps::before, .steps::after {
  content: ""; position: absolute; top: 0; left: 0; height: 2px; border-radius: 2px;
}
.steps::before { right: 0; background: var(--line); }
.steps::after { width: 100%; background: linear-gradient(90deg, var(--red), var(--orange), var(--cyan)); transform-origin: left; transform: scaleX(var(--progress, 1)); transition: transform 1.2s var(--ease-out); }
.step { padding-top: 32px; }
.step-verb { display: block; font-family: var(--font-display); font-weight: 900; font-size: clamp(1.8rem, 3.2vw, 2.6rem); letter-spacing: -0.035em; margin-bottom: 10px; }
.step p { margin: 0; color: var(--ink-soft); max-width: 34ch; }

/* About */
.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-photo { margin: 0; position: relative; border-radius: var(--radius-box); padding: 2px; background: linear-gradient(160deg, var(--red), var(--orange) 35%, var(--blue) 70%, var(--cyan)); }
.about-photo img { border-radius: calc(var(--radius-box) - 2px); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; margin: 28px 0 0; letter-spacing: -0.02em; }
.about-role { margin: 2px 0 20px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--cyan); }
.about-copy > p:not(.about-name):not(.about-role) { color: var(--ink-soft); max-width: 58ch; }

/* Contact */
.contact { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-copy { position: sticky; top: calc(var(--header-h) + 32px); }
.contact-alt { color: var(--muted); margin-top: 24px; }
/* The pictograma (idea + signal arcs) sends out waves next to the form. */
.contact-visual { position: relative; width: min(240px, 60%); aspect-ratio: 1; margin-top: 48px; display: grid; place-items: center; }
.contact-mark { width: 78%; height: auto; position: relative; z-index: 1; filter: drop-shadow(0 24px 48px rgb(255 51 51 / 0.22)); }
.signal { position: absolute; inset: 0; display: grid; place-items: center; }
.signal span { position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgb(246 87 52 / 0.45); opacity: 0; }
.contact-form {
  padding: clamp(24px, 3.5vw, 44px); border-radius: var(--radius-box);
  background: rgb(12 14 70 / 0.55); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  display: grid; gap: 20px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field-optional { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.field-required { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius-input);
  background: rgb(3 4 26 / 0.6); border: 1px solid var(--line-strong); color: var(--ink);
  font: 400 1rem/1.4 var(--font-body); transition: border-color 0.2s, box-shadow 0.2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field select option { background: var(--navy-900); }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgb(0 210 251 / 0.2); }
.field-help { margin: 0; font-size: 0.88rem; color: var(--muted); }
.field-error { margin: 0; font-size: 0.88rem; color: var(--danger); min-height: 0; }
.field-error:empty { display: none; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--danger); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--red); flex: none; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-status { margin: 0; font-size: 0.95rem; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 32px; margin-top: 40px; background: rgb(3 4 26 / 0.6); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand img { width: 112px; }
.footer-brand p { color: var(--muted); margin: 14px 0 0; max-width: 36ch; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--cyan); }
.footer-legal { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.footer-mark .pictograma { width: 28px; height: auto; display: block; }

/* Legal pages */
.legal { padding-block: calc(var(--header-h) + 64px) 96px; }
.legal-grid { display: grid; grid-template-columns: 260px 1fr; gap: 24px 64px; }
.legal-head { grid-column: 1 / -1; margin-bottom: 24px; }
.legal-head h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 900; letter-spacing: -0.04em; }
.legal-updated { color: var(--muted); font-family: var(--font-mono); font-size: 0.88rem; margin: 12px 0 0; }
.legal-toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.legal-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-size: 0.92rem; }
.legal-toc a { color: var(--ink-soft); text-decoration: none; }
.legal-toc a:hover { color: var(--cyan); }
.legal-body { max-width: 72ch; min-width: 0; }
.legal-body section + section { margin-top: 40px; }
.legal-body h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.legal-body p, .legal-body li { color: var(--ink-soft); }
.legal-body ul { padding-left: 20px; display: grid; gap: 6px; }
.legal-body strong { color: var(--ink); }

/* 404 */
.not-found { min-height: 100dvh; display: grid; place-items: center; padding-block: calc(var(--header-h) + 40px) 80px; text-align: center; }
.not-found-inner { display: grid; justify-items: center; gap: 12px; }
.not-found-mark { width: 110px; height: auto; margin-bottom: 16px; }
.not-found h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: -0.04em; }
.not-found p { color: var(--ink-soft); margin: 0; max-width: 46ch; }
.not-found-en { color: var(--muted) !important; font-size: 0.95rem; }
.not-found .actions { justify-content: center; margin-top: 20px; }

/* Motion. Content is visible without JS; animations are opt-in through .js
   and fully disabled for people who ask for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .project:nth-child(even).reveal { transform: translateY(128px); }
  .js .project:nth-child(even).reveal.is-in { transform: translateY(96px); }

  .js .rise { opacity: 0; transform: translateY(20px); animation: rise 0.9s var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * 110ms + 150ms); }
  .js .hero-title .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
  .js .hero-title .word > span { display: inline-block; transform: translateY(105%); animation: word-up 1s var(--ease-out) forwards; animation-delay: calc(var(--w) * 70ms + 100ms); }
  @keyframes rise { to { opacity: 1; transform: none; } }
  @keyframes word-up { to { transform: none; } }

  /* Isotipo: the ring sweeps in, then the chevron "points" forward on a loop,
     echoing the brand idea of a gesture that develops an idea. */
  .hero-mark .isotipo-ring, .hero-mark .isotipo-chevron { transform-box: fill-box; }
  .hero-mark .isotipo-ring { transform-origin: 0% 50%; animation: ring-in 1.2s var(--ease-out) both 0.2s; }
  .hero-mark .isotipo-chevron { animation: chevron-in 0.9s var(--ease-out) both 0.75s, chevron-point 2.8s var(--ease-in-out) infinite 2s; }
  @keyframes ring-in { from { opacity: 0; transform: rotate(-70deg) scale(0.8); } to { opacity: 1; transform: none; } }
  @keyframes chevron-in { from { opacity: 0; transform: translateX(-120%); } to { opacity: 1; transform: none; } }
  @keyframes chevron-point { 0%, 60%, 100% { transform: none; } 30% { transform: translateX(28%); } }
  .hero-rings span { animation: ring-pulse 4.2s var(--ease-out) infinite; }
  .hero-rings span:nth-child(2) { animation-delay: 1.4s; }
  .hero-rings span:nth-child(3) { animation-delay: 2.8s; }
  @keyframes ring-pulse { 0% { opacity: 0.7; transform: scale(0.55); } 100% { opacity: 0; transform: scale(1.45); } }
  .hero-visual { transform: translate(var(--px, 0), var(--py, 0)); transition: transform 0.6s var(--ease-out); }
  .signal span { animation: ring-pulse 3.6s var(--ease-out) infinite; }
  .signal span:nth-child(2) { animation-delay: 1.2s; }
  .signal span:nth-child(3) { animation-delay: 2.4s; }
  .contact-mark { animation: float 6s var(--ease-in-out) infinite; }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

  .js .steps::after { --progress: 0; }
  .js .steps.is-in::after { --progress: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ambient span, .marquee-track { animation: none; }
  .btn, .project-shot { transform: none !important; }
}

/* Responsive */
@media (max-width: 1024px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 32px 32px; }
  .nav { gap: 20px; }
  .services { grid-template-columns: 1fr 1fr; }
  .service--1, .service--2, .service--3, .service--4 { grid-column: span 1; }
  .service--1, .service--4 { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .nav-toggle {
    display: inline-grid; place-content: center; gap: 6px; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease-out); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px var(--gutter) 28px; background: rgb(3 4 26 / 0.96); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), visibility 0.25s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: 12px 0; font-size: 1.1rem; }
  .nav a.lang { align-self: flex-start; margin-block: 8px; padding: 6px 12px; font-size: 0.85rem; }
  .nav .btn { margin-top: 8px; }
  .site-header.menu-open { background: rgb(3 4 26 / 0.96); }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 24px); }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-visual { order: -1; width: min(240px, 60vw); margin-inline: auto; }
  .projects { grid-template-columns: 1fr; gap: 56px; }
  .project:nth-child(even), .js .project:nth-child(even).reveal, .js .project:nth-child(even).reveal.is-in { transform: none; }
  .section#work { padding-bottom: clamp(80px, 12vw, 150px); }
  .steps { grid-template-columns: 1fr; gap: 0; padding-left: 28px; }
  .steps::before, .steps::after { top: 0; bottom: 0; left: 0; width: 2px; height: auto; right: auto; }
  .steps::after { transform-origin: top; transform: scaleY(var(--progress, 1)); }
  .step { padding: 0 0 32px; }
  .about, .contact { grid-template-columns: 1fr; }
  .pains, .reasons { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; }
  .contact-copy { position: static; }
  .contact-visual { display: none; }
  .legal-grid { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
  .service--1, .service--2, .service--3, .service--4 { grid-column: 1 / -1; min-height: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 100%; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}
