/* Casos de estudio (proyectos/<slug>/index.html y proyectos/plantilla.html).
   Una sola familia, Inter Tight; la mono queda solo para la pantalla de cifras y la placa LACAZE. */
:root {
  --paper: #f3f0ea;
  --white: #ffffff;
  --mist: #e6e1d6;
  --line: #d8d2c7;
  --line-strong: #8f897e;
  --ink: #111110;
  --ink-2: #3d3a34;
  --muted: #5f5a52;
  --volt: #d6ff3f;
  --signal: #ff4f1f;
  --sans: 'Inter Tight', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --gap: clamp(64px, 8vw, 112px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- barra superior ---------- */
.cs-bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--gutter); background: rgba(243, 240, 234, 0.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.cs-back { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; }
.cs-onair { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.cs-onair::before { content: ''; width: 7px; height: 7px; border-radius: 9999px; background: var(--signal); }
.cs-bar-end { display: flex; align-items: center; gap: 10px; }
.cs-lang { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 9999px; border: 1px solid var(--line-strong); }
.cs-lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 34px; padding: 0 10px; border-radius: 9999px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink); text-decoration: none; transition: background .2s, color .2s; }
.cs-lang a[aria-current="page"] { background: var(--ink); color: var(--paper); }
@media (hover: hover) { .cs-lang a:not([aria-current]):hover { background: rgba(17, 17, 16, 0.08); color: var(--ink); } }

/* ---------- botones ---------- */
.cs-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 9999px; font-size: 16px; font-weight: 500; text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.cs-btn-ink { background: var(--ink); color: var(--paper); }
.cs-btn-ink:hover { background: var(--volt); color: var(--ink); }
.cs-btn-ghost { padding: 0 22px; border: 1px solid var(--line-strong); color: var(--ink); }
.cs-btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.cs-bar .cs-btn-ghost { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* ---------- página ---------- */
.cs-main { max-width: 1200px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 0; }
.cs-eyebrow { margin: 0; font-size: 15px; font-weight: 500; color: var(--muted); }

/* hero: texto + monitor con la portada */
.cs-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px 64px; align-items: center; }
.cs-hero-text { display: flex; flex-direction: column; gap: 24px; }
.cs-title { margin: 0; font-size: clamp(44px, 6.2vw, 84px); line-height: 0.95; font-weight: 600; letter-spacing: -0.04em; }
.cs-lede { margin: 0; max-width: 560px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 20px; margin: 16px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.cs-meta dt { font-size: 13px; font-weight: 500; color: var(--muted); }
.cs-meta dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; }
.cs-meta a { text-underline-offset: 3px; }
.cs-hero-shot { display: flex; justify-content: center; margin: 0; }
.cs-mon { width: 100%; max-width: 520px; padding: 14px 14px 0; border-radius: 26px 26px 16px 16px; background: linear-gradient(180deg, #e8ddc3 0%, #ddd1b4 55%, #cfc2a2 100%); box-shadow: 0 26px 50px rgba(60, 45, 20, 0.24), inset 0 2px 0 rgba(255, 255, 255, 0.75), inset -10px 0 20px rgba(120, 100, 60, 0.12); }
.cs-mon-bezel { padding: 9px; border-radius: 20px; background: #cdbf9f; box-shadow: inset 0 3px 8px rgba(80, 60, 30, 0.35), 0 1px 0 rgba(255, 255, 255, 0.6); }
.cs-mon-screen { position: relative; aspect-ratio: 4 / 3; border-radius: 16px / 14px; overflow: hidden; background: radial-gradient(ellipse 75% 70% at 50% 45%, #0f2440 0%, #06111f 72%, #04080f 100%); }
.cs-mon-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0% 50%; }
.cs-mon-screen::after, .cs-shot::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0, rgba(0, 0, 0, 0.22) 1px, rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, 0) 3px); }
.cs-mon-screen::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 45% 35% at 24% 14%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%); }
.cs-mon-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 6px 14px; }
.cs-mon-brand { padding: 3px 8px; border-radius: 3px; background: #cfc2a3; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.3em; color: #7d735f; }
.cs-mon-slot { display: flex; align-items: center; gap: 10px; }
.cs-mon-slot::before { content: ''; width: 90px; height: 7px; border-radius: 4px; background: #2b2823; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6); }
.cs-mon-slot::after { content: ''; width: 8px; height: 8px; border-radius: 9999px; background: var(--volt); box-shadow: 0 0 6px var(--volt); }

/* cifras: la pantalla de la radio */
.cs-kpi { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: clamp(48px, 6vw, 80px) 0 0; padding: 14px; border-radius: 22px; background: linear-gradient(180deg, #e9dec4 0%, #d6c9a9 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 0 rgba(80, 65, 40, 0.18); }
.cs-kpi li { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border-radius: 12px; background: #0d0f0c; box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.75); }
.cs-kpi strong { font-family: var(--mono); font-size: 24px; line-height: 1.3; font-weight: 500; letter-spacing: -0.02em; color: var(--volt); text-shadow: 0 0 10px rgba(214, 255, 63, 0.35); }
.cs-kpi span { font-family: var(--mono); font-size: 10px; line-height: 1.5; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: #8d927f; }

/* cuerpo: índice + secciones */
.cs-two { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px 64px; margin-top: var(--gap); }
.cs-idx { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid var(--ink); }
.cs-idx p { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.cs-idx a { display: flex; gap: 12px; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .2s, padding-left .2s; }
.cs-idx a span { font-size: 14px; color: var(--ink); }
.cs-idx a:hover { color: var(--ink); padding-left: 6px; }
.cs-sections { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.cs-section { display: flex; flex-direction: column; gap: 20px; }
.cs-section h2 { margin: 0; max-width: 720px; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }
.cs-text { margin: 0; max-width: 680px; font-size: 17px; line-height: 1.6; color: var(--ink-2); }

/* reglas (tarjetas) */
.cs-rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cs-rules li { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 20px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.cs-rules small { font-size: 14px; font-weight: 500; color: var(--muted); }
.cs-rules strong { font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.cs-rules li > span { font-size: 15px; line-height: 1.5; color: var(--ink-2); }

/* decisiones: texto + captura */
.cs-decisions { display: flex; flex-direction: column; gap: clamp(40px, 5vw, 64px); margin-top: 12px; }
.cs-decision { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px 40px; align-items: start; }
.cs-decision-text { display: flex; flex-direction: column; gap: 10px; }
.cs-decision-text small { font-size: 14px; font-weight: 500; color: var(--muted); }
.cs-decision h3 { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; }
.cs-decision p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.cs-decision figure { margin: 0; }
.cs-shot { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #0d0f0c; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 10px 24px rgba(60, 45, 20, 0.14); transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
.cs-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-shot::after { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0, rgba(0, 0, 0, 0.18) 1px, rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, 0) 3px); }
@media (hover: hover) { .cs-shot:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(60, 45, 20, 0.2); } }
.cs-decision figcaption { margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--muted); }

/* cómo está hecho */
.cs-built { margin-top: 20px; padding: 28px clamp(20px, 3vw, 32px); border-radius: 24px; background: var(--ink); color: var(--paper); }
.cs-built h3 { margin: 0 0 18px; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--volt); }
.cs-built-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cs-built-grid div { display: flex; flex-direction: column; gap: 8px; }
.cs-built-grid strong { font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.cs-built-grid span { font-size: 15px; line-height: 1.5; color: #c9c4b5; }

/* resultado: etiquetas */
.cs-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; }
.cs-chips li { padding: 6px 12px; border-radius: 9999px; background: var(--mist); font-size: 14px; line-height: 1.4; font-weight: 500; }

/* lo que me llevo */
.cs-learn { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
.cs-learn li { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.5; }
.cs-learn li > span:first-child { flex: 0 0 auto; padding-top: 2px; font-size: 14px; font-weight: 500; color: var(--muted); }

/* siguiente proyecto */
.cs-next { margin-top: clamp(80px, 10vw, 128px); }
.cs-next a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 32px; padding: clamp(24px, 3.5vw, 40px); border-radius: 24px; background: linear-gradient(180deg, #e9dec4 0%, #d6c9a9 100%); color: var(--ink); text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 0 rgba(80, 65, 40, 0.18); }
.cs-next-text { display: flex; flex-direction: column; gap: 8px; }
.cs-next-text small { font-size: 15px; font-weight: 500; color: var(--muted); }
.cs-next-text strong { font-size: clamp(28px, 3.6vw, 44px); line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.cs-next-text span { font-size: 16px; color: var(--ink-2); }
.cs-next-arrow { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 9999px; background: var(--ink); color: var(--volt); }
.cs-next-arrow svg { transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.cs-next a:hover .cs-next-arrow svg { transform: translateX(6px); }

/* pie */
.cs-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 28px 4px 36px; font-size: 14px; color: var(--muted); }
.cs-foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.cs-foot a { color: var(--muted); text-underline-offset: 3px; }
.cs-foot a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .cs-shot, .cs-idx a, .cs-next-arrow svg { transition: none; } }

@media (max-width: 900px) {
  .cs-idx { display: none; }
  .cs-hero, .cs-two, .cs-decision, .cs-rules, .cs-built-grid { grid-template-columns: 1fr; }
  .cs-kpi, .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cs-onair { display: none; }
}
@media (max-width: 400px) {
  .cs-bar .cs-btn-ghost { display: none; }
}
