/* Fran García · portfolio público. Sistema propio: papel cálido, tinta, un azul cobalto y líneas de construcción.
   Sin dependencias: fuentes del sistema (SF / Segoe), serif itálica como contrapunto y monoespaciada para los datos. */
@view-transition { navigation: auto; }
:root {
  --paper: #f2f0ea; --paper-2: #e9e6de; --card: #fbfaf7; --ink: #111115; --ink-2: #2c2c33; --muted: #6b6963; --faint: #9c998f;
  --line: rgba(17, 17, 21, 0.12); --line-2: rgba(17, 17, 21, 0.22);
  --accent: #2b3cff; --accent-2: #1b25b8; --accent-soft: rgba(43, 60, 255, 0.09);
  --night: #0d0d11; --night-2: #16161c; --night-line: rgba(242, 240, 234, 0.12); --night-text: #ece9e1; --night-muted: #9b988f;
  --ok: #16a34a; --warn: #b45309;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "New York", "Iowan Old Style", Charter, Georgia, "Times New Roman", serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --ease-io: cubic-bezier(0.65, 0, 0.35, 1); --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter: clamp(20px, 5vw, 72px); --max: 1320px; --radius: 22px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: fixed; z-index: 300; left: 12px; top: -60px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 650; transition: top 0.3s; }
.skip:focus { top: calc(12px + var(--safe-t)); }

/* ---------- Tipografía ---------- */
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.display { margin: 0; font-size: clamp(48px, 9vw, 152px); line-height: 0.9; letter-spacing: -0.058em; font-weight: 750; text-wrap: balance; }
.h1 { margin: 0; font-size: clamp(42px, 6.6vw, 112px); line-height: 0.92; letter-spacing: -0.052em; font-weight: 750; text-wrap: balance; }
.h2 { margin: 0; font-size: clamp(32px, 4.4vw, 70px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 720; text-wrap: balance; }
.h3 { margin: 0; font-size: clamp(21px, 1.9vw, 28px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 680; }
.lead { margin: 0; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.5; color: var(--ink-2); letter-spacing: -0.012em; max-width: 58ch; text-wrap: pretty; }
.prose p { margin: 0 0 1em; font-size: 18px; line-height: 1.65; color: var(--ink-2); max-width: 64ch; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }
.accent { color: var(--accent); }

/* Texto que entra por líneas/palabras (fg.js lo prepara). */
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.sw > span { display: inline-block; transform: translateY(105%); transition: transform 1.05s var(--ease); transition-delay: calc(var(--i, 0) * 45ms + var(--d, 0ms)); }
.in .sw > span, .sw.in > span { transform: none; }
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Botones y enlaces ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; font-weight: 640; font-size: 16px; letter-spacing: -0.01em; background: var(--ink); color: var(--paper); overflow: hidden; isolation: isolate; transition: transform 0.5s var(--ease), color 0.35s; touch-action: manipulation; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); border-radius: inherit; transform: scale(0, 1); transform-origin: left; transition: transform 0.6s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:active { transform: scale(0.96); }
.btn .arr { display: inline-block; transition: transform 0.5s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn.ghost::before { background: var(--ink); }
.btn.ghost:hover { color: var(--paper); }
.btn.light { background: var(--night-text); color: var(--night); }
.btn.light:hover { color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.link { position: relative; text-decoration: none; font-weight: 600; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.5s var(--ease); padding-bottom: 2px; }
.link:hover, .link:focus-visible { background-size: 100% 1.5px; }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; font-weight: 640; }
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.5s var(--ease); }
.link-arrow:hover svg { transform: translate(3px, -3px); }

/* ---------- Estado de cada funcionalidad: la honestidad como parte del diseño ---------- */
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; background: var(--paper-2); color: var(--ink-2); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.85; flex: none; }
.chip[data-s="prod"] { background: rgba(22, 163, 74, 0.11); color: #157a3c; }
.chip[data-s="local"] { background: var(--accent-soft); color: var(--accent-2); }
.chip[data-s="dev"] { background: rgba(180, 83, 9, 0.11); color: #9a4a08; }
.chip[data-s="plan"] { background: rgba(17, 17, 21, 0.06); color: var(--muted); }
.chip[data-s="plan"]::before { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.chip[data-s="demo"] { background: rgba(17, 17, 21, 0.06); color: var(--ink-2); }
.dark .chip { background: rgba(242, 240, 234, 0.08); color: var(--night-text); }
.dark .chip[data-s="prod"] { background: rgba(74, 222, 128, 0.14); color: #86efac; }
.dark .chip[data-s="local"] { background: rgba(140, 150, 255, 0.16); color: #b9c0ff; }
.dark .chip[data-s="dev"] { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
.dark .chip[data-s="plan"] { color: var(--night-muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.status-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.status-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.status-list b { font-size: 17.5px; letter-spacing: -0.015em; }
.status-list p { grid-column: 1; margin: 0; color: var(--muted); font-size: 15.5px; max-width: 62ch; }
.status-list .chip { grid-row: 1 / span 2; grid-column: 2; align-self: start; margin-top: 2px; }
.dark .status-list { border-color: var(--night-line); }
.dark .status-list li { border-color: var(--night-line); }
.dark .status-list p { color: var(--night-muted); }

/* ---------- Cabecera ---------- */
.fg-head { position: fixed; z-index: 80; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(14px + var(--safe-t)) var(--gutter) 14px; transition: background 0.45s, box-shadow 0.45s, color 0.45s, padding 0.45s var(--ease); }
.fg-head.solid { background: rgba(242, 240, 234, 0.82); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); box-shadow: 0 1px 0 var(--line); padding-block: 10px; }
.on-dark .fg-head:not(.solid) { color: var(--night-text); }
.on-dark .fg-head.solid { background: rgba(13, 13, 17, 0.78); color: var(--night-text); box-shadow: 0 1px 0 var(--night-line); }
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 16px; }
.mark i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: currentColor; font-style: normal; position: relative; }
.mark i::after { content: "FG"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; letter-spacing: -0.02em; color: var(--paper); }
.on-dark .fg-head:not(.solid) .mark i::after, .on-dark .fg-head.solid .mark i::after { color: var(--night); }
.mark small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.on-dark .mark small { color: var(--night-muted); }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a { position: relative; padding: 9px 13px; border-radius: 999px; text-decoration: none; font-size: 14.5px; font-weight: 560; opacity: 0.82; transition: opacity 0.3s, background 0.3s; }
.nav a:hover { opacity: 1; background: rgba(17, 17, 21, 0.06); }
.on-dark .nav a:hover { background: rgba(242, 240, 234, 0.08); }
.nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 1.5px; background: currentColor; }
.nav .btn { min-height: 42px; padding: 0 18px; margin-left: 8px; font-size: 14.5px; }
.on-dark .fg-head .nav .btn { background: var(--night-text); color: var(--night); }
.menu-btn { display: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(17, 17, 21, 0.07); color: inherit; cursor: pointer; position: relative; z-index: 2; }
.on-dark .menu-btn { background: rgba(242, 240, 234, 0.1); }
.menu-btn span { position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.5s var(--ease), top 0.5s var(--ease); }
.menu-btn span:nth-child(1) { top: 18px; } .menu-btn span:nth-child(2) { top: 26px; }
.menu-open .menu-btn span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { top: 22px; transform: rotate(-45deg); }
.sheet { position: fixed; inset: 0; z-index: 70; background: var(--ink); color: var(--paper); padding: calc(96px + var(--safe-t)) var(--gutter) calc(32px + var(--safe-b)); display: grid; align-content: start; gap: 2px; overflow-y: auto; clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path 0.7s var(--ease-io), visibility 0s 0.7s; }
.menu-open .sheet { clip-path: inset(0); visibility: visible; transition: clip-path 0.7s var(--ease-io); }
.menu-open .fg-head { color: var(--paper); background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.menu-open .mark i::after { color: var(--ink); }
.menu-open .mark small { color: #9b988f; }
.sheet a { font-size: clamp(36px, 10vw, 64px); font-weight: 720; letter-spacing: -0.045em; line-height: 1.12; text-decoration: none; opacity: 0; transform: translateY(24px); transition: opacity 0.5s, transform 0.7s var(--ease), color 0.3s; }
.sheet a[aria-current="page"], .sheet a:hover { color: #9aa3ff; }
.menu-open .sheet a { opacity: 1; transform: none; transition-delay: calc(var(--i) * 50ms + 200ms); }
.sheet p { margin: 28px 0 0; color: #9b988f; font-size: 15px; }

/* ---------- Guías de construcción (la firma visual) ---------- */
.guides { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.guides i { position: absolute; background: var(--line); }
.guides .v { top: 0; bottom: 0; width: 1px; transform: scaleY(0); transform-origin: top; transition: transform 1.6s var(--ease); transition-delay: calc(var(--k) * 90ms + 200ms); }
.guides .h { left: 0; right: 0; height: 1px; transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease); transition-delay: calc(var(--k) * 90ms + 300ms); }
.ready .guides i { transform: none; }
.guides .tag { position: absolute; font-family: var(--mono); font-size: 11px; color: var(--faint); opacity: 0; transition: opacity 0.8s 1.2s; }
.ready .guides .tag { opacity: 1; }
.cross { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity 0.4s; }
.cross.on { opacity: 1; }
.cross .cx, .cross .cy { position: absolute; background: rgba(43, 60, 255, 0.35); }
.cross .cx { top: 0; bottom: 0; width: 1px; }
.cross .cy { left: 0; right: 0; height: 1px; }
.cross .read { position: absolute; font-family: var(--mono); font-size: 11px; color: var(--accent); background: var(--paper); padding: 2px 6px; border-radius: 4px; white-space: nowrap; transform: translate(10px, 10px); }

/* ---------- Secciones ---------- */
.section { position: relative; padding: clamp(80px, 14vh, 160px) 0; }
.section.tight { padding: clamp(56px, 9vh, 110px) 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); gap: 24px 40px; align-items: start; margin-bottom: clamp(36px, 6vh, 72px); }
.sec-head .label { padding-top: 12px; }
.sec-head .lead { margin-top: 18px; }
.rule { height: 1px; background: var(--line); }
.dark { background: var(--night); color: var(--night-text); }
.dark .label { color: var(--night-muted); }
.dark .lead, .dark .prose p { color: #cfcbc1; }
.dark .rule { background: var(--night-line); }

/* ---------- Portada ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-content: end; padding: calc(120px + var(--safe-t)) 0 clamp(40px, 7vh, 80px); overflow: hidden; isolation: isolate; }
.hero > .wrap { position: relative; z-index: 1; }
.hero .display { max-width: 15ch; }
.hero-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; margin-top: clamp(28px, 5vh, 56px); padding-top: 22px; border-top: 1px solid var(--line); }
.hero-meta .lead { max-width: 46ch; }
.hero-roles { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hero-roles span { padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 560; }
.hero-top { position: absolute; top: calc(96px + var(--safe-t)); left: 0; right: 0; }
.hero-top .wrap { display: flex; justify-content: space-between; gap: 20px; }

/* ---------- Trabajo seleccionado ---------- */
.work { display: grid; gap: clamp(80px, 14vh, 160px); }
.work-item { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 80px); align-items: center; text-decoration: none; }
.work-item:nth-child(even) .work-visual { order: -1; }
.work-copy { display: grid; gap: 18px; justify-items: start; }
.work-copy .num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.work-copy h3 { margin: 0; font-size: clamp(48px, 7vw, 116px); line-height: 0.9; letter-spacing: -0.06em; font-weight: 760; }
.work-copy p { margin: 0; font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); max-width: 40ch; }
.work-copy .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.work-visual { position: relative; aspect-ratio: 16 / 11; }
.frame { position: absolute; border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: 0 40px 80px -40px rgba(17, 17, 21, 0.45), 0 0 0 1px var(--line); }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.frame.desk { inset: 0 8% 10% 0; }
.frame.desk::before { content: ""; display: block; height: 26px; background: var(--paper-2); border-bottom: 1px solid var(--line); background-image: radial-gradient(circle at 16px 13px, #d6d2c8 4px, transparent 4.5px), radial-gradient(circle at 32px 13px, #d6d2c8 4px, transparent 4.5px), radial-gradient(circle at 48px 13px, #d6d2c8 4px, transparent 4.5px); }
.frame.desk img { height: calc(100% - 26px); }
.frame.phone { width: 27%; aspect-ratio: 390 / 844; right: 0; bottom: 0; border-radius: 26px; box-shadow: 0 40px 70px -30px rgba(17, 17, 21, 0.6), 0 0 0 6px #111115; }
.work-item:hover .frame.desk { transform: translateY(-6px); }
.frame { transition: transform 0.9s var(--ease); will-change: transform; }
.parallax { transform: translate3d(0, var(--py, 0px), 0); }

/* ---------- Capacidades ---------- */
.caps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.caps li { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 0.9fr); gap: 20px; align-items: baseline; padding: clamp(22px, 3.4vh, 34px) 0; border-bottom: 1px solid var(--line); }
.caps .n { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.caps h3 { margin: 0; font-size: clamp(26px, 3.4vw, 50px); letter-spacing: -0.045em; font-weight: 720; line-height: 1; transition: transform 0.7s var(--ease), color 0.4s; }
.caps p { margin: 0; color: var(--muted); font-size: 16.5px; }
.caps li:hover h3 { transform: translateX(10px); color: var(--accent); }

/* ---------- Proceso ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps li { position: relative; padding: 26px 26px 0 0; border-top: 1.5px solid currentColor; }
.steps li::before { counter-increment: s; content: "0" counter(s); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.dark .steps li::before { color: var(--night-muted); }
.steps h3 { margin: 18px 0 8px; font-size: 22px; letter-spacing: -0.03em; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }
.dark .steps p { color: var(--night-muted); }

/* ---------- Cierre ---------- */
.cta { padding: clamp(90px, 16vh, 180px) 0; text-align: left; }
.cta .display { max-width: 14ch; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: clamp(28px, 5vh, 48px); }

/* ---------- Casos (páginas de proyecto) ---------- */
.case-hero { position: relative; padding: calc(150px + var(--safe-t)) 0 clamp(50px, 8vh, 90px); overflow: hidden; isolation: isolate; }
.crumb { display: inline-flex; gap: 8px; color: var(--muted); font-size: 14px; text-decoration: none; margin-bottom: 26px; }
.dark .crumb { color: var(--night-muted); }
.crumb:hover { color: currentColor; }
.case-title { margin: 0; font-size: clamp(64px, 13vw, 220px); line-height: 0.84; letter-spacing: -0.065em; font-weight: 780; }
.case-sub { margin: 26px 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.6vw, 40px); line-height: 1.2; letter-spacing: -0.02em; max-width: 26ch; }
.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: clamp(40px, 7vh, 80px); border-top: 1px solid var(--line); }
.dark .meta-grid { border-color: var(--night-line); }
.meta-grid div { padding: 18px 20px 0 0; }
.meta-grid dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.dark .meta-grid dt { color: var(--night-muted); }
.meta-grid dd { margin: 8px 0 0; font-size: 16px; font-weight: 560; }
.case-visual { position: relative; margin-top: clamp(40px, 8vh, 90px); aspect-ratio: 16 / 9; }
.case-visual .frame.desk { inset: 0 10% 0 0; }
.case-visual .frame.phone { width: 22%; bottom: -6%; }
.case-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(30px, 5vw, 80px); align-items: start; }
.toc { position: sticky; top: 110px; display: grid; gap: 4px; }
.toc a { text-decoration: none; font-size: 14.5px; color: var(--muted); padding: 6px 0 6px 14px; border-left: 1.5px solid var(--line); transition: color 0.3s, border-color 0.3s; }
.toc a.on { color: var(--ink); border-color: var(--accent); }
.dark .toc a { color: var(--night-muted); border-color: var(--night-line); }
.dark .toc a.on { color: var(--night-text); border-color: #9aa3ff; }
.chapter { padding-bottom: clamp(60px, 10vh, 110px); }
.chapter + .chapter { padding-top: clamp(60px, 10vh, 110px); border-top: 1px solid var(--line); }
.dark .chapter + .chapter { border-color: var(--night-line); }
.chapter > .label { display: block; margin-bottom: 16px; }
.chapter > .h2 { margin-bottom: 26px; max-width: 18ch; }
figure.shot { margin: clamp(30px, 5vh, 50px) 0 0; }
figure.shot .frame { position: relative; inset: auto; }
figure.shot figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); }
.dark figure.shot figcaption { color: var(--night-muted); }
.shot-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.34fr); gap: 20px; align-items: end; margin-top: clamp(30px, 5vh, 50px); }
.shot-pair .frame { position: relative; inset: auto; }
.shot-pair .frame.phone { width: 100%; right: auto; bottom: auto; }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 30px 0 0; padding: 0; list-style: none; }
.points li { padding: 18px 0; border-top: 1px solid var(--line); }
.dark .points li { border-color: var(--night-line); }
.points b { display: block; font-size: 17.5px; letter-spacing: -0.015em; margin-bottom: 4px; }
.points span { color: var(--muted); font-size: 15.5px; }
.dark .points span { color: var(--night-muted); }
/* Diagrama de arquitectura (HTML, no imagen) */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 30px; counter-reset: f; }
.flow > div { position: relative; padding: 16px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); min-height: 140px; display: grid; align-content: space-between; gap: 12px; }
.dark .flow > div { background: var(--night-2); box-shadow: inset 0 0 0 1px var(--night-line); }
.flow > div::before { counter-increment: f; content: counter(f, decimal-leading-zero); font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.flow b { font-size: 16px; letter-spacing: -0.015em; }
.flow small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 4px; }
.dark .flow small, .dark .flow > div::before { color: var(--night-muted); }
.flow > div:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 50%; width: 8px; height: 8px; border-top: 1.5px solid var(--faint); border-right: 1.5px solid var(--faint); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.stack span { font-family: var(--mono); font-size: 12.5px; padding: 7px 11px; border-radius: 8px; background: var(--paper-2); color: var(--ink-2); }
.dark .stack span { background: var(--night-2); color: #d7d3ca; }
.next { display: block; text-decoration: none; padding: clamp(60px, 11vh, 120px) 0; border-top: 1px solid var(--line); }
.next .label { display: block; margin-bottom: 18px; }
.next strong { display: block; font-size: clamp(54px, 10vw, 170px); line-height: 0.86; letter-spacing: -0.065em; font-weight: 780; transition: transform 0.9s var(--ease), color 0.4s; }
.next:hover strong { transform: translateX(20px); color: var(--accent); }

/* ---------- Diseño web (demos) ---------- */
.demos { display: grid; gap: clamp(70px, 12vh, 140px); }
.demo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 70px); align-items: center; }
.demo:nth-child(even) .demo-visual { order: 2; }
.demo-visual { position: relative; aspect-ratio: 16 / 11; display: block; }
.demo-copy { display: grid; gap: 16px; justify-items: start; }
.demo-copy h2 { margin: 0; font-size: clamp(36px, 4.6vw, 72px); letter-spacing: -0.05em; line-height: 0.95; font-weight: 740; }
.demo-copy .level { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.1em; }
.demo-copy ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.demo-copy li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--ink-2); font-size: 16px; }
.demo-copy li::before { content: ""; width: 6px; height: 6px; margin-top: 10px; border-radius: 50%; background: var(--accent); }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 15px; }
.note svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.service { background: var(--paper); padding: clamp(24px, 3vw, 40px); display: grid; gap: 14px; align-content: start; min-height: 260px; transition: background 0.4s; }
.service:hover { background: var(--card); }
.service .n { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.service h3 { margin: 0; font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -0.04em; line-height: 1.02; font-weight: 720; }
.service p { margin: 0; color: var(--ink-2); font-size: 16.5px; max-width: 46ch; }
.service ul { margin: 4px 0 0; padding: 0 0 0 18px; color: var(--muted); font-size: 15px; display: grid; gap: 4px; }
.service:last-child:nth-child(odd) { grid-column: span 2; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(30px, 6vw, 90px); align-items: start; }
.composer { display: grid; gap: 22px; padding: clamp(22px, 3vw, 36px); border-radius: 28px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -60px rgba(17, 17, 21, 0.5); }
.composer fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.composer legend { font-weight: 640; font-size: 16px; margin-bottom: 4px; padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label { position: relative; cursor: pointer; }
.pills input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pills span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 560; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s var(--spring); }
.pills input:checked + span { background: var(--ink); color: var(--paper); box-shadow: none; }
.pills input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.pills label:active span { transform: scale(0.96); }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field textarea { width: 100%; padding: 14px 16px; border-radius: 14px; border: 0; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px; transition: box-shadow 0.3s; }
.field textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft); }
.composer .hint { margin: 0; color: var(--muted); font-size: 14px; }
.config-warn { padding: 14px 16px; border-radius: 14px; background: rgba(180, 83, 9, 0.1); color: #8a4207; font-size: 14.5px; box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.25); }
.direct { display: grid; gap: 10px; margin-top: 30px; }
.direct a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); text-decoration: none; font-size: clamp(18px, 1.8vw, 24px); font-weight: 600; letter-spacing: -0.02em; }
.direct a:last-child { border-bottom: 1px solid var(--line); }
.direct a span { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Sobre mí ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 90px); align-items: start; }
.portrait { position: sticky; top: 110px; aspect-ratio: 4 / 5; border-radius: 24px; background: var(--ink); color: var(--paper); display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.portrait b { font-size: clamp(120px, 16vw, 240px); font-weight: 800; letter-spacing: -0.08em; line-height: 1; }
.portrait b .serif { font-weight: 400; color: #9aa3ff; }
.portrait .guides i { background: rgba(242, 240, 234, 0.12); }
.portrait small { position: absolute; left: 20px; bottom: 18px; font-family: var(--mono); font-size: 11.5px; color: #9b988f; }
.principles { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 0; }
.principles li { padding: 22px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 50px 1fr; gap: 16px; }
.principles li > span { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 4px; }
.principles b { display: block; font-size: 20px; letter-spacing: -0.025em; margin-bottom: 4px; }
.principles p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- Pie ---------- */
.fg-foot { padding: clamp(50px, 9vh, 90px) 0 calc(40px + var(--safe-b)); border-top: 1px solid var(--line); }
.dark .fg-foot, .fg-foot.dark { border-color: var(--night-line); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr)); gap: 30px; }
.foot-grid b { display: block; margin-bottom: 12px; font-size: 15px; }
.foot-grid a { display: block; text-decoration: none; padding: 4px 0; color: var(--muted); }
.foot-grid a:hover { color: currentColor; }
.foot-grid p { margin: 0; color: var(--muted); font-size: 15px; max-width: 40ch; }
.foot-note { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; color: var(--faint); font-size: 13.5px; }

/* Indicador de sección (escritorio) */
.where { position: fixed; z-index: 60; left: var(--gutter); bottom: calc(22px + var(--safe-b)); font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.where.on { opacity: 1; }
.where i { width: 26px; height: 1px; background: currentColor; }
.progress { position: fixed; z-index: 90; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

@media (max-width: 1080px) {
  .nav a:not(.btn) { display: none; }
  .menu-btn { display: block; }
  .nav .btn { display: none; }
  .case-body { grid-template-columns: 1fr; }
  .toc { display: none; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow > div:not(:last-child)::after { display: none; }
  .where { display: none; }
}
@media (max-width: 900px) {
  .work-item, .demo, .contact, .about-grid, .sec-head { grid-template-columns: 1fr; }
  .work-item:nth-child(even) .work-visual, .demo:nth-child(even) .demo-visual { order: 0; }
  .work-visual, .demo-visual { order: -1; }
  .hero-meta { grid-template-columns: 1fr; }
  .hero-roles { justify-content: flex-start; }
  .caps li { grid-template-columns: 40px 1fr; }
  .caps p { grid-column: 2; }
  .steps { grid-template-columns: 1fr 1fr; gap: 30px 0; }
  .meta-grid { grid-template-columns: 1fr 1fr; gap: 0 0; }
  .points { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .service:last-child:nth-child(odd) { grid-column: auto; }
  .portrait { position: relative; top: 0; aspect-ratio: 16 / 10; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: span 2; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .shot-pair { grid-template-columns: 1fr; }
  .shot-pair .frame.phone { width: 62%; justify-self: center; }
  .status-list li { grid-template-columns: 1fr; }
  .status-list .chip { grid-row: auto; grid-column: 1; justify-self: start; }
  .hero-top .wrap span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  [data-reveal], .sw > span, .guides i { opacity: 1 !important; transform: none !important; }
  .parallax { transform: none !important; }
  @view-transition { navigation: none; }
}
.dark .caps, .dark .caps li { border-color: var(--night-line); }
.dark .caps p, .dark .caps .n { color: var(--night-muted); }
.dark .caps li:hover h3 { color: #9aa3ff; }
.dark .next { border-color: var(--night-line); }
.dark .next:hover strong { color: #9aa3ff; }
.dark .note { background: var(--night-2); box-shadow: inset 0 0 0 1px var(--night-line); color: #cfcbc1; }
.dark .note svg { color: #9aa3ff; }
.dark .frame { background: var(--night-2); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--night-line); }
.dark .frame.desk::before { background-color: #1d1d24; border-color: var(--night-line); background-image: radial-gradient(circle at 16px 13px, #3a3a44 4px, transparent 4.5px), radial-gradient(circle at 32px 13px, #3a3a44 4px, transparent 4.5px), radial-gradient(circle at 48px 13px, #3a3a44 4px, transparent 4.5px); }
.dark .frame.phone { box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.8), 0 0 0 6px #2a2a31; }
.dark .link-arrow, .dark .link { color: inherit; }
.dark .guides i { background: var(--night-line); }
.shot-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.shot-duo .frame { aspect-ratio: 16 / 11; }
@media (max-width: 560px) { .shot-duo { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .guides .tag { display: none; } }
.nav .btn[aria-current="page"]::after { display: none; }
@media (pointer: coarse) { .nav a { min-height: 44px; display: inline-flex; align-items: center; } .nav a[aria-current="page"]::after { bottom: 6px; } }

/* =====================================================================
   Dirección cinematográfica (oct 2026)
   Un objeto protagonista con profundidad, tipografía enorme apilada, una columna editorial
   numerada y un movimiento continuo y tranquilo que cuenta la historia: mensajes → citas.
   ===================================================================== */
/* Cortina de entrada: solo CSS, una vez por sesión (la activa un script en <head>). */
.intro { display: none; }
.intro-on .intro { display: grid; place-items: center; position: fixed; inset: 0; z-index: 400; background: var(--ink); color: var(--paper); pointer-events: none; animation: intro-out 0.9s var(--ease-io) 1.35s forwards; }
.intro-in { display: grid; gap: 14px; justify-items: center; }
.intro-mark { font-size: clamp(40px, 7vw, 92px); font-weight: 760; letter-spacing: -0.055em; line-height: 1; animation: intro-rise 0.9s var(--ease) both; }
.intro-line { width: min(260px, 50vw); height: 1px; background: rgba(242, 240, 234, 0.18); overflow: hidden; }
.intro-line i { display: block; height: 100%; background: #9aa3ff; transform-origin: left; animation: intro-line 1.1s var(--ease-io) 0.15s both; }
.intro-sub { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #9b988f; animation: intro-rise 0.9s var(--ease) 0.2s both; }
@keyframes intro-out { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
@keyframes intro-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes intro-line { from { transform: scaleX(0); } }
.intro-on .cine .sw > span { transition-delay: calc(var(--i, 0) * 70ms + 1500ms); }
.intro-on .cine [data-reveal] { transition-delay: 1900ms; }

/* Portada */
.cine { position: relative; min-height: 100svh; padding: calc(104px + var(--safe-t)) 0 0; overflow: hidden; isolation: isolate; background: radial-gradient(120% 80% at 62% 38%, #faf8f3 0%, var(--paper) 46%, #e7e3d9 100%); }
.cine::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(to top, rgba(17, 17, 21, 0.06), transparent); pointer-events: none; z-index: 0; }
.cine-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.85fr) minmax(220px, 0.5fr); gap: clamp(16px, 2.4vw, 40px); align-items: center; min-height: calc(100svh - 190px); }
.cine-title { position: relative; z-index: 4; transform: translate3d(0, calc(var(--hp, 0) * -90px), 0); }
.mega { margin: 18px 0 0; font-size: clamp(64px, 10.4vw, 188px); line-height: 0.84; letter-spacing: -0.068em; font-weight: 800; }
.mega .br { display: block; height: 0; }
.mega .serif { font-weight: 400; letter-spacing: -0.045em; color: var(--accent); }
.cine-stage { position: relative; align-self: stretch; min-height: 560px; transform: translate3d(0, calc(var(--hp, 0) * -150px), 0) scale(calc(1 + var(--hp, 0) * 0.06)); }
.cine-aside { display: grid; gap: 12px; justify-items: start; transform: translate3d(0, calc(var(--hp, 0) * -40px), 0); }
.big-n { font-family: var(--serif); font-size: clamp(48px, 5vw, 76px); line-height: 0.8; color: var(--ink); }
.aside-t { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; letter-spacing: -0.02em; }
.cine-aside p:not(.label) { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; max-width: 32ch; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 640; font-size: 15px; transition: transform 0.5s var(--ease), background 0.35s; }
.pill:hover { background: var(--accent); transform: translateY(-2px); }
.pill:active { transform: scale(0.96); }
.cine-foot { position: relative; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 0 clamp(22px, 4vh, 40px); border-top: 1px solid var(--line); background: linear-gradient(to bottom, transparent, rgba(231, 227, 217, 0.7)); }
.cine-foot p { margin: 0; color: var(--muted); font-size: 15px; max-width: 52ch; text-align: right; }

/* El objeto: un móvil con la conversación y, debajo, la agenda en la que caen las citas. */
.stage { position: relative; margin: 0; height: 100%; min-height: inherit; isolation: isolate; }
.stage-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.phone3d { position: absolute; z-index: 3; left: 50%; top: 2%; width: clamp(214px, 17vw, 268px); aspect-ratio: 9 / 18.5; transform: translateX(-50%) rotate(-5deg); border-radius: 38px; background: #0d0d11; padding: 9px; box-shadow: 0 1px 0 1px #2a2a31, 0 60px 90px -40px rgba(17, 17, 21, 0.65), 0 30px 40px -30px rgba(17, 17, 21, 0.5); animation: float 7s ease-in-out infinite; }
.phone3d::before { content: ""; position: absolute; top: 15px; left: 50%; width: 30%; height: 18px; transform: translateX(-50%); border-radius: 999px; background: #0d0d11; z-index: 2; }
.ph-screen { position: relative; height: 100%; border-radius: 30px; overflow: hidden; background: linear-gradient(180deg, #f6f3ec, #efeae0); display: grid; grid-template-rows: auto 1fr auto; color: var(--ink); }
.ph-top { display: flex; align-items: center; gap: 10px; padding: 44px 14px 12px; border-bottom: 1px solid rgba(17, 17, 21, 0.08); background: rgba(255, 255, 255, 0.55); }
.ph-top i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-style: normal; font-weight: 750; font-size: 13px; flex: none; }
.ph-top b { display: block; font-size: 13px; letter-spacing: -0.01em; }
.ph-top small { display: block; font-size: 10.5px; color: var(--muted); }
.ph-chat { display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; padding: 12px 11px; overflow: hidden; }
.msg { margin: 0; max-width: 84%; padding: 8px 11px; border-radius: 15px; font-size: 12.2px; line-height: 1.35; letter-spacing: -0.005em; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.msg.in { align-self: flex-start; background: #fff; border-bottom-left-radius: 5px; box-shadow: 0 1px 2px rgba(17, 17, 21, 0.06); }
.msg.out { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.msg.typing { display: inline-flex; gap: 4px; padding: 11px 13px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.5; animation: blink 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing i:nth-child(3) { animation-delay: 0.3s; }
.msg.enter { opacity: 0; transform: translateY(10px) scale(0.96); }
.ph-input { display: flex; align-items: center; justify-content: space-between; margin: 0 10px 12px; padding: 9px 12px; border-radius: 999px; background: #fff; font-size: 11.5px; color: var(--faint); }
.ph-input i { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); }
.slab { position: absolute; z-index: 1; left: 50%; top: 56%; width: min(118%, 400px); transform: translateX(-50%) perspective(900px) rotateX(16deg); transform-origin: top center; border-radius: 22px 22px 0 0; padding: 16px 16px 140px; background: rgba(251, 250, 247, 0.94); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 50px 80px -50px rgba(17, 17, 21, 0.45); }
.slab-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 12px; font-size: 13px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #157a3c; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16); animation: blink 2s infinite; }
.slab-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.slab-rows li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; align-items: center; font-size: 12.5px; }
.slab-rows time { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.appt, .free { display: flex; justify-content: space-between; gap: 8px; padding: 9px 11px; border-radius: 10px; }
.appt { background: #fff; box-shadow: inset 3px 0 0 var(--ink), 0 1px 2px rgba(17, 17, 21, 0.06); font-weight: 560; }
.appt em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--accent); font-weight: 500; }
.free { border: 1px dashed var(--line-2); color: var(--faint); }
.appt.new { box-shadow: inset 3px 0 0 var(--accent), 0 10px 24px -10px rgba(43, 60, 255, 0.45); transition: opacity 0.5s var(--ease), transform 0.8s var(--spring), box-shadow 0.6s; }
.appt.new.wait { opacity: 0; transform: translateY(-18px) scale(0.94); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes blink { 50% { opacity: 0.25; } }

/* Manifiesto: las palabras se encienden con el scroll. */
.manifesto { padding: clamp(90px, 16vh, 180px) 0; }
.mani { margin: 22px 0 0; font-size: clamp(32px, 4.6vw, 76px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 720; max-width: 22ch; text-wrap: balance; }
.mani .w { color: rgba(17, 17, 21, 0.16); transition: color 0.5s; }
.mani .w.on { color: var(--ink); }
.mani .w.hot.on { color: var(--accent); }

/* Trabajo: nombre gigante detrás de cada proyecto, para dar profundidad. */
.work-item { position: relative; isolation: isolate; }
.work-item[data-ghost]::before { content: attr(data-ghost); position: absolute; z-index: -1; left: -0.04em; top: 50%; transform: translateY(-50%); font-size: clamp(110px, 21vw, 360px); font-weight: 800; letter-spacing: -0.07em; line-height: 0.8; color: transparent; -webkit-text-stroke: 1px rgba(17, 17, 21, 0.09); white-space: nowrap; pointer-events: none; }
.work-item:nth-child(even)[data-ghost]::before { left: auto; right: -0.04em; }
#trabajo { overflow: hidden; }

/* Galería de las tres webs: fijada y horizontal en escritorio; deslizable en táctil. */
.reel { position: relative; background: var(--night); color: var(--night-text); }
.reel-pin { position: relative; padding: clamp(70px, 11vh, 120px) 0 clamp(40px, 6vh, 70px); overflow: hidden; }
.reel-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 36px; align-items: end; margin-bottom: clamp(30px, 5vh, 54px); }
.reel-head .label { color: var(--night-muted); padding-bottom: 10px; }
.reel-note { margin: 0; color: var(--night-muted); font-size: 14px; padding-bottom: 10px; }
.reel-track { display: flex; gap: clamp(20px, 3vw, 44px); padding: 0 var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.reel-track::-webkit-scrollbar { display: none; }
.reel-track:focus-visible { outline-offset: -6px; }
.reel-card { position: relative; flex: none; width: min(78vw, 1040px); scroll-snap-align: center; isolation: isolate; display: grid; gap: 18px; }
.ghost { position: absolute; z-index: -1; right: 2%; top: -0.32em; font-size: clamp(90px, 15vw, 250px); font-weight: 800; letter-spacing: -0.07em; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(242, 240, 234, 0.16); pointer-events: none; white-space: nowrap; }
.reel-shot { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--tone); box-shadow: 0 0 0 1px var(--night-line), 0 50px 100px -50px rgba(0, 0, 0, 0.9); transition: box-shadow 0.5s; }
.reel-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transform: scale(1.04); transition: transform 1.4s var(--ease); }
.reel-shot:hover img, .reel-shot:focus-visible img { transform: scale(1); }
.reel-shot:hover { box-shadow: 0 0 0 1px rgba(154, 163, 255, 0.5), 0 60px 110px -50px rgba(0, 0, 0, 0.95); }
.reel-meta { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: end; }
.reel-meta .label { color: var(--night-muted); grid-column: 1; }
.reel-meta h3 { margin: 0; grid-column: 1; font-size: clamp(28px, 3.4vw, 52px); letter-spacing: -0.05em; line-height: 1; font-weight: 740; }
.reel-meta .pill { grid-column: 2; grid-row: 1 / span 2; background: var(--night-text); color: var(--night); }
.reel-meta .pill:hover { background: #9aa3ff; color: var(--night); }
.reel-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: clamp(26px, 4vh, 44px); }
.reel-foot .link-arrow { color: var(--night-text); }
.reel-progress { width: min(240px, 40vw); height: 2px; background: var(--night-line); overflow: hidden; border-radius: 2px; }
.reel-progress i { display: block; height: 100%; background: #9aa3ff; transform-origin: left; transform: scaleX(var(--rp, 0.33)); }
/* Fijada en escritorio con ratón: el scroll vertical desplaza la galería en horizontal (fg.js). */
.reel.pinned { height: var(--reel-h, 300vh); }
.reel.pinned .reel-pin { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-block: 80px 30px; }
.reel.pinned .reel-track { overflow: visible; scroll-snap-type: none; transform: translate3d(var(--rx, 0px), 0, 0); will-change: transform; }
.reel.pinned .reel-card { width: min(62vw, 980px); }
.reel.pinned .reel-shot { aspect-ratio: 16 / 9.4; max-height: 56vh; }

/* Caso de Nexia: el mismo objeto acompaña al titular (continuidad desde la portada). */
.case-hero.with-stage .case-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.75fr); gap: 0 clamp(20px, 4vw, 60px); align-items: center; }
.case-hero.with-stage .case-stage { position: relative; min-height: 600px; }

/* Transición entre páginas: la página que sale se aleja; la que entra sube. */
::view-transition-old(root) { animation: vt-out 0.45s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in 0.7s var(--ease) both; }
::view-transition-group(stage) { animation-duration: 0.8s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; transform: scale(0.985); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(28px); } }

@media (max-width: 1180px) {
  .cine-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr); }
  .cine-title { grid-column: 1 / -1; }
  .mega { font-size: clamp(64px, 12.5vw, 150px); }
  .mega .br { display: none; }
}
@media (max-width: 760px) {
  .cine { padding-top: calc(88px + var(--safe-t)); }
  .cine-grid { grid-template-columns: 1fr; min-height: 0; gap: 26px; }
  .mega { font-size: clamp(56px, 17vw, 96px); }
  .mega .br { display: block; }
  .cine-stage { min-height: 540px; transform: none; }
  .cine-title, .cine-aside { transform: none; }
  .cine-foot { flex-direction: column; align-items: flex-start; }
  .cine-foot p { text-align: left; }
  .slab { width: 100%; top: 58%; }
  .reel-head { grid-template-columns: 1fr; }
  .reel-card { width: 84vw; }
  .reel-meta { grid-template-columns: 1fr; }
  .reel-meta .pill { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
  .case-hero.with-stage .case-top { grid-template-columns: 1fr; }
  .case-hero.with-stage .case-stage { min-height: 540px; margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-on .intro { display: none; }
  .phone3d { animation: none; }
  .cine-title, .cine-stage, .cine-aside { transform: none !important; }
  .appt.new.wait { opacity: 1; transform: none; }
  .mani .w { color: var(--ink); }
  .mani .w.hot { color: var(--accent); }
  .live::before, .msg.typing i { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root), ::view-transition-group(stage) { animation: none; }
}
/* Composición en diagonal: el móvil delante y a la izquierda; la agenda detrás, a la derecha y más abajo. */
.phone3d { left: 40%; top: 1%; width: clamp(196px, 14.5vw, 240px); }
.slab { left: 58%; top: 50%; width: min(112%, 380px); }
.slab-rows li:first-child { visibility: hidden; }
@media (max-width: 760px) {
  .phone3d { left: 38%; width: 200px; }
  .slab { left: 60%; top: 46%; width: 84%; }
}
@media (max-width: 760px) {
  .cine-stage, .case-hero.with-stage .case-stage { min-height: 610px; }
  .phone3d { left: 42%; width: 188px; }
  .slab { left: 56%; top: 60%; width: 88%; }
}
