/* ==========================================================
   PROYECTO · Vitrina visual de cada proyecto
   Cada página define en <body style="…">: --brand, --brand2, --case-bg,
   --case-display (tipografía de la marca), --bullet y el motivo (.case--*).
   La marca pone el color y la tipografía; ATLAS pone el lenguaje HUD
   (esquinas, etiquetas mono, escaneo y brillo).
   ========================================================== */
body.case { --a-bg: var(--case-bg); background: var(--case-bg); }
.case-page {
    padding: 0 clamp(16px, 4vw, 48px);
    background:
        radial-gradient(ellipse 70% 45% at 85% 0%, rgba(var(--brand-rgb), 0.14), transparent 70%),
        radial-gradient(ellipse 60% 40% at 0% 30%, rgba(var(--brand2-rgb), 0.08), transparent 70%);
    overflow: clip;
}
.case-page > * { width: min(1240px, 100%); margin-left: auto; margin-right: auto; }

/* esquinas HUD reutilizables */
.hud { position: absolute; width: 18px; height: 18px; border: 2px solid var(--brand); pointer-events: none; opacity: 0.85; }
.hud--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud--tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.hud--bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.hud--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.case-overline { margin: 0 0 10px; font-family: var(--a-font-mono); font-size: 0.72rem; letter-spacing: 0.3em; color: var(--brand); }
.case-h2 { margin: 0 0 22px; font-family: var(--case-display); font-weight: 700; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.12; color: #fff; }
.case-hint { margin: 12px 0 0; font-family: var(--a-font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: #8ea39d; }

/* aparición suave al hacer scroll */
.case-js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.case-js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Portada ---------- */
.case-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(28px, 5vw, 72px);
    align-items: center;
    min-height: min(calc(100svh - 72px), 860px);
    padding: clamp(18px, 3vh, 30px) 0 clamp(30px, 5vh, 56px);
    isolation: isolate;
}
.case-hero__bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(var(--brand-rgb), 0.18); align-self: start; }
.case-back { color: rgba(var(--brand-rgb), 0.95); font-size: 0.9rem; text-decoration: none; }
.case-back:hover, .case-back:focus-visible { color: var(--brand); text-decoration: underline; outline: none; }
.case-hero__code { display: inline-flex; align-items: center; gap: 8px; font-family: var(--a-font-mono); font-size: 0.7rem; letter-spacing: 0.24em; color: #b9c9c5; }
.case-hero__code i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.case-hero__copy { padding: clamp(20px, 4vh, 40px) 0; }
.case-kicker { margin: 0 0 14px; font-family: var(--a-font-mono); font-size: 0.72rem; letter-spacing: 0.3em; color: var(--brand); }
.case-title {
    margin: 0;
    font-family: var(--case-display);
    font-weight: 700;
    font-size: clamp(2.6rem, 6.4vw, 5.2rem);
    line-height: 1;
    letter-spacing: 0.02em;
    color: #fff;
    text-shadow: 0 0 34px rgba(var(--brand-rgb), 0.45);
}
.case-title--long { font-size: clamp(2.2rem, 4.4vw, 3.7rem); overflow-wrap: anywhere; }
.case-tagline { margin: 20px 0 0; max-width: 46ch; font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.6; color: #d6e2e0; }
.case-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.case-hero__media { margin: 0; padding: clamp(10px, 2vh, 24px) 0; }

/* mockup de laptop para los proyectos web */
.device--laptop { position: relative; width: 100%; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 40px rgba(var(--brand-rgb), 0.22)); transform: perspective(1600px) rotateY(-8deg) rotateX(3deg); transition: transform 0.6s ease; }
.device--laptop:hover { transform: perspective(1600px) rotateY(-2deg) rotateX(1deg); }
.device__screen { position: relative; padding: 3.2% 3.2% 3.6%; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px 16px 4px 4px; background: linear-gradient(#1b1f24, #0c0f12); }
.device__screen::before { content: ''; position: absolute; top: 1.3%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: #2c3238; transform: translateX(-50%); }
.device__screen video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 4px; background: #000; }
.device__base { position: relative; height: clamp(12px, 1.6vw, 20px); margin: 0 -7%; border-radius: 0 0 18px 18px; background: linear-gradient(#cfd5da, #7d858c); }
.device__base::before { content: ''; position: absolute; top: 0; left: 50%; width: 16%; height: 40%; border-radius: 0 0 10px 10px; background: rgba(0, 0, 0, 0.22); transform: translateX(-50%); }

/* panel holográfico para los proyectos de diseño */
.holo { position: relative; padding: clamp(12px, 2vw, 22px); border: 1px solid rgba(var(--brand-rgb), 0.3); background: linear-gradient(150deg, rgba(var(--brand-rgb), 0.12), rgba(var(--brand2-rgb), 0.06)); box-shadow: 0 0 60px rgba(var(--brand-rgb), 0.2), inset 0 0 40px rgba(var(--brand-rgb), 0.06); overflow: hidden; }
.holo img { display: block; width: 100%; max-height: min(62vh, 560px); object-fit: contain; }
.holo.is-light img { padding: clamp(18px, 4vw, 44px); background: #fff; }
.holo__scan { position: absolute; left: 0; right: 0; top: -30%; height: 30%; background: linear-gradient(transparent, rgba(var(--brand-rgb), 0.16), transparent); animation: scan 5s linear infinite; pointer-events: none; }
@keyframes scan { to { top: 110%; } }
.holo__label { position: absolute; right: 14px; bottom: 10px; font-family: var(--a-font-mono); font-size: 0.62rem; letter-spacing: 0.22em; color: rgba(var(--brand-rgb), 0.9); }
.holo.is-light .holo__label { color: rgba(0, 0, 0, 0.45); }

/* ventana de código para los proyectos de programación */
.codewin { position: relative; border: 1px solid rgba(var(--brand-rgb), 0.35); background: rgba(3, 6, 8, 0.92); box-shadow: 0 0 60px rgba(var(--brand-rgb), 0.18), 0 30px 60px rgba(0, 0, 0, 0.5); overflow: hidden; }
.codewin__bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid rgba(var(--brand-rgb), 0.2); background: rgba(var(--brand-rgb), 0.06); }
.codewin__bar i, .term__bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.codewin__bar i:nth-child(2), .term__bar i:nth-child(2) { background: #febc2e; }
.codewin__bar i:nth-child(3), .term__bar i:nth-child(3) { background: #28c840; }
.codewin__bar span, .term__bar span { margin-left: 8px; font-family: var(--a-font-mono); font-size: 0.72rem; color: #9fb3ad; }
.codewin__body { display: flex; gap: 16px; margin: 0; padding: 16px 18px 20px; overflow-x: auto; font-family: var(--a-font-mono); font-size: clamp(0.72rem, 0.95vw, 0.86rem); line-height: 1.65; color: #dbe5e3; }
.codewin__nums { display: flex; flex-direction: column; text-align: right; color: rgba(255, 255, 255, 0.22); user-select: none; }
.tk-k { color: #ff7ac6; }
.tk-s { color: #a5e075; }
.tk-c { color: #6b7d78; font-style: italic; }
.tk-n { color: #f8c555; }
.tk-t { color: var(--brand); }
.tk-f { color: #7cc7ff; }

/* terminal con la salida real */
.term { position: relative; border: 1px solid rgba(var(--brand-rgb), 0.3); background: #04070a; }
.term__bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.term__body { margin: 0; padding: 18px 20px 22px; overflow-x: auto; font-family: var(--a-font-mono); font-size: clamp(0.74rem, 1vw, 0.9rem); line-height: 1.7; color: #c9d6d2; white-space: pre; }
.tm-cmd { color: var(--brand); }
.tm-pass { padding: 0 6px; background: #15c26b; color: #04110a; font-weight: 700; }
.tm-ok { color: #3ddc84; }

/* ---------- Ficha (telemetría) ---------- */
.telemetry { padding: 18px 0; border-top: 1px solid rgba(var(--brand-rgb), 0.18); border-bottom: 1px solid rgba(var(--brand-rgb), 0.18); }
.telemetry__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); row-gap: 14px; margin: 0; }
.telemetry__item { padding: 4px 18px; border-left: 1px solid rgba(var(--brand-rgb), 0.2); }
.telemetry__item:first-child { padding-left: 0; border-left: 0; }
.telemetry dt { font-family: var(--a-font-mono); font-size: 0.64rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brand); }
.telemetry dd { margin: 6px 0 0; font-size: 0.96rem; line-height: 1.4; color: #f1f5f4; }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.case-tags li { padding: 4px 11px; border: 1px solid rgba(var(--brand-rgb), 0.35); border-radius: 4px; background: rgba(var(--brand-rgb), 0.07); font-family: var(--a-font-mono); font-size: 0.74rem; color: #e6efed; }

/* ---------- Imagen ampliable ---------- */
.case-zoom { position: relative; display: block; width: 100%; padding: 0; border: 1px solid rgba(var(--brand-rgb), 0.28); background: radial-gradient(ellipse at 50% 40%, rgba(var(--brand-rgb), 0.1), rgba(0, 0, 0, 0.35)); overflow: hidden; cursor: zoom-in; }
.case-zoom img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 0.7s ease; }
.case-zoom:hover img, .case-zoom:focus-visible img { transform: scale(1.04); }
.case-zoom:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.case-zoom__cap { position: absolute; left: 0; bottom: 0; padding: 6px 12px; background: rgba(0, 0, 0, 0.72); font-family: var(--a-font-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: #fff; }
.case-zoom__icon { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(var(--brand-rgb), 0.6); background: rgba(0, 0, 0, 0.55); color: var(--brand); opacity: 0; transition: opacity 0.25s; }
.case-zoom:hover .case-zoom__icon, .case-zoom:focus-visible .case-zoom__icon { opacity: 1; }

/* ---------- Misión ---------- */
.case-mission { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(64px, 10vh, 110px) 0 0; }
.case-mission.has-media { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.case-mission__lead { margin: 0; max-width: 62ch; font-size: clamp(1.05rem, 1.5vw, 1.22rem); line-height: 1.7; color: #dbe5e3; }
.case-mission__text { margin: 14px 0 0; max-width: 62ch; line-height: 1.7; color: #b9c9c5; }
.case-mission__media { margin: 0; }
.case-mission__media .case-zoom { aspect-ratio: 4 / 3; }
.case-quote { margin: 22px 0 6px; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); font-family: var(--case-display); font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.45; color: #fff; }

/* ---------- Franjas imagen + texto ---------- */
.case-section { padding: clamp(64px, 10vh, 110px) 0 0; }
.case-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; margin-top: clamp(28px, 5vh, 52px); }
.case-row:nth-of-type(even) .case-row__media { order: 2; }
.case-row__media .case-zoom { aspect-ratio: 16 / 10; }
.case-row__num { display: block; font-family: var(--a-font-display); font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(var(--brand-rgb), 0.7); }
.case-row__title { margin: 10px 0 14px; font-family: var(--case-display); font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 700; color: #fff; }
.case-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.case-list li { position: relative; padding-left: 24px; font-size: 0.96rem; line-height: 1.5; color: #dbe5e3; }
.case-list li::before { content: var(--bullet); position: absolute; left: 0; top: 0; color: var(--brand); font-size: 0.85em; }

/* bloques sin imagen: paneles HUD */
.case-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(28px, 5vh, 52px); }
.case-panels--1 { grid-template-columns: minmax(0, 1fr); }
.case-panels--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-panel { position: relative; padding: 24px; border: 1px solid rgba(var(--brand-rgb), 0.22); background: linear-gradient(165deg, rgba(var(--brand-rgb), 0.08), rgba(4, 8, 10, 0.75)); }
.case-panel .case-row__title { margin-top: 0; color: var(--brand); }
.case-panel--alt { border-color: rgba(var(--brand2-rgb), 0.35); background: linear-gradient(165deg, rgba(var(--brand2-rgb), 0.08), rgba(4, 8, 10, 0.75)); }
.case-panel__text { margin: 0; line-height: 1.65; color: #cfdcd9; }

/* ---------- Secciones de texto desarrollado ---------- */
.section-intro { margin: -6px 0 26px; max-width: 68ch; font-size: clamp(1rem, 1.3vw, 1.12rem); line-height: 1.7; color: #cfdcd9; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.scope { padding: 22px 22px 24px; border-top: 2px solid var(--brand); background: linear-gradient(rgba(var(--brand-rgb), 0.07), rgba(4, 8, 10, 0.55)); }
.scope__num { font-family: var(--a-font-mono); font-size: 0.74rem; letter-spacing: 0.2em; color: var(--brand); }
.scope__title { margin: 10px 0 0; font-family: var(--case-display); font-size: clamp(1.08rem, 1.6vw, 1.25rem); font-weight: 700; color: #fff; }
.scope__text { margin: 10px 0 0; font-size: 0.95rem; line-height: 1.65; color: #cfdcd9; }
.pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.statement { position: relative; padding: clamp(24px, 3vw, 36px); border: 1px solid rgba(var(--brand-rgb), 0.25); background: radial-gradient(ellipse at 0% 0%, rgba(var(--brand-rgb), 0.1), transparent 65%), rgba(4, 8, 10, 0.6); }
.statement__title { margin: 0; font-family: var(--case-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; color: var(--brand); }
.statement__text { margin: 14px 0 0; font-size: clamp(0.98rem, 1.3vw, 1.08rem); line-height: 1.75; color: #dbe5e3; }

/* ---------- Galería deslizable ---------- */
.case-gallery__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.reel__nav { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.reel__btn { width: 46px; height: 46px; border: 1px solid rgba(var(--brand-rgb), 0.5); background: rgba(var(--brand-rgb), 0.06); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; }
.reel__btn:hover, .reel__btn:focus-visible { background: rgba(var(--brand-rgb), 0.22); box-shadow: 0 0 18px rgba(var(--brand-rgb), 0.35); outline: none; }
.reel__btn:disabled { opacity: 0.3; cursor: default; box-shadow: none; }
.reel__count { font-family: var(--a-font-mono); font-size: 0.8rem; letter-spacing: 0.12em; color: #a9bcb7; }
.reel__count b { color: var(--brand); font-weight: 500; }
.reel {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(78%, 820px);
    gap: 18px;
    margin: 0 calc(-1 * clamp(16px, 4vw, 48px));
    padding: 4px clamp(16px, 4vw, 48px) 14px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 clamp(16px, 4vw, 48px);
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--brand-rgb), 0.5) transparent;
}
.reel:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.reel--single { grid-auto-columns: min(100%, 980px); }
.reel__slide { scroll-snap-align: start; }
.case-shot { position: relative; display: block; width: 100%; height: min(62vh, 520px); padding: 0; border: 1px solid rgba(var(--brand-rgb), 0.25); background: radial-gradient(ellipse at 50% 40%, rgba(var(--brand-rgb), 0.1), rgba(0, 0, 0, 0.35)); overflow: hidden; cursor: zoom-in; transition: border-color 0.25s, box-shadow 0.25s; }
.case-shot img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.6s; }
.case-shot:hover, .case-shot:focus-visible { border-color: var(--brand); box-shadow: 0 0 30px rgba(var(--brand-rgb), 0.3); outline: none; }
.case-shot:hover img { transform: scale(1.03); }
.case-shot__cap { position: absolute; left: 0; bottom: 0; padding: 7px 14px; background: rgba(0, 0, 0, 0.75); font-family: var(--a-font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: #fff; }

/* ---------- Archivo de evidencias (Únicos) ---------- */
.archive__note { margin: -8px 0 0; max-width: 64ch; line-height: 1.6; color: #b9c9c5; }
.archive__group { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); margin-top: clamp(30px, 5vh, 48px); padding-top: clamp(22px, 3vh, 30px); border-top: 1px solid rgba(var(--brand-rgb), 0.2); }
.archive__head { position: sticky; top: 96px; align-self: start; }
.archive__title { margin: 0; font-family: var(--case-display); font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 700; color: #fff; }
.archive__count { display: inline-block; margin-top: 6px; font-family: var(--a-font-mono); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--brand); }
.archive__desc { margin: 10px 0 0; font-size: 0.92rem; line-height: 1.55; color: #b9c9c5; }
.archive__link { display: inline-block; margin-top: 12px; color: var(--brand); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.archive__link:hover { text-decoration: underline; }
.archive__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.archive__grid .case-shot { height: 220px; }

/* ---------- Proceso ---------- */
.case-steps { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.case-step { position: relative; padding: 20px 18px 18px; border-top: 2px solid var(--brand); background: linear-gradient(rgba(var(--brand-rgb), 0.08), transparent 70%); }
.case-step__num { font-family: var(--a-font-mono); font-size: 0.8rem; letter-spacing: 0.2em; color: var(--brand); }
.case-step__title { margin: 8px 0 0; font-family: var(--case-display); font-size: 1.08rem; color: #fff; }
.case-step__text { margin: 6px 0 0; font-size: 0.9rem; line-height: 1.5; color: #b9c9c5; }

/* ---------- Sistema visual ---------- */
.case-palette { display: flex; margin: 0; padding: 0; list-style: none; border: 1px solid rgba(255, 255, 255, 0.1); overflow: hidden; }
.case-palette li { flex: 1 1 0; min-width: 0; }
.swatch { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; height: clamp(150px, 26vh, 230px); padding: 14px; border: 0; background: var(--sw); color: #fff; text-align: left; cursor: copy; transition: flex 0.3s, filter 0.2s; }
.case-palette li:hover { flex-grow: 1.6; }
.swatch:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.swatch__name, .swatch__hex { align-self: flex-start; padding: 2px 7px; background: rgba(0, 0, 0, 0.62); }
.swatch__name { font-size: 0.84rem; font-weight: 600; }
.swatch__hex { margin-top: 4px; font-family: var(--a-font-mono); font-size: 0.74rem; color: #d5e0dd; }
.swatch.is-copied .swatch__hex::after { content: '  ✓'; color: var(--brand); }
.case-type { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 22px; }
.type-card { position: relative; padding: 24px; border: 1px solid rgba(var(--brand-rgb), 0.22); background: rgba(4, 8, 10, 0.6); }
.type-card__sample { margin: 0; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.05; color: var(--brand); }
.type-card__alpha { margin: 8px 0 0; font-size: 1.1rem; color: #cfdcd9; letter-spacing: 0.06em; }
.type-card__name { margin: 16px 0 0; font-family: var(--a-font-mono); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; }
.type-card__desc { margin: 4px 0 0; font-size: 0.9rem; color: #b9c9c5; }

/* ---------- Resultados ---------- */
.case-results { position: relative; margin-top: clamp(64px, 10vh, 110px); padding: clamp(26px, 4vw, 44px); border: 1px solid rgba(var(--brand-rgb), 0.3); background: radial-gradient(ellipse at 0% 0%, rgba(var(--brand-rgb), 0.14), transparent 60%), rgba(4, 8, 10, 0.7); }
.case-results__status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-family: var(--a-font-mono); font-size: 0.72rem; letter-spacing: 0.26em; color: var(--brand); }
.case-results__status i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.case-results__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 0; padding: 0; list-style: none; }
.case-results__list li { position: relative; padding-left: 34px; line-height: 1.55; color: #e6efed; }
.case-results__list li::before { content: '✓'; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #0b0b0b; font-size: 0.75rem; font-weight: 800; }

/* ---------- Cierre ---------- */
.case-cta { margin-top: clamp(40px, 7vh, 72px); text-align: center; }
.case-cta__title { margin: 0; font-family: var(--case-display); font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2.3rem); color: #fff; }
.case-cta__lead { margin: 10px 0 0; color: #cfdcd9; }
.case-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.case-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    border: 1px solid rgba(var(--brand-rgb), 0.55);
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.case-btn:hover, .case-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 0 22px rgba(var(--brand-rgb), 0.4); outline: none; }
.case-btn--primary { border-color: transparent; background: var(--brand); color: #0b0b0b; }

/* siguiente proyecto */
.case-next { padding: clamp(48px, 8vh, 80px) 0 clamp(56px, 8vh, 90px); }
.case-next__card { position: relative; display: flex; align-items: flex-end; min-height: clamp(220px, 34vh, 320px); border: 1px solid color-mix(in srgb, var(--next) 45%, transparent); background: var(--next-bg); overflow: hidden; text-decoration: none; isolation: isolate; }
.case-next__card img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; transition: transform 0.8s ease, opacity 0.4s; }
.case-next__card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--next-bg) 10%, transparent 75%); }
.case-next__card:hover img, .case-next__card:focus-visible img { transform: scale(1.05); opacity: 0.65; }
.case-next__card:focus-visible { outline: 2px solid var(--next); outline-offset: 3px; }
.case-next__body { display: flex; flex-direction: column; gap: 6px; padding: clamp(22px, 4vw, 40px); }
.case-next__label { font-family: var(--a-font-mono); font-size: 0.74rem; letter-spacing: 0.26em; color: var(--next); }
.case-next__name { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; color: #fff; }
.case-next__kicker { font-family: var(--a-font-mono); font-size: 0.7rem; letter-spacing: 0.18em; color: #cfdcd9; }
.case-next__links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.case-next__links a { color: #a9bcb7; font-size: 0.9rem; text-decoration: none; }
.case-next__links a:hover, .case-next__links a:focus-visible { color: var(--brand); text-decoration: underline; }

/* ---------- Visor de imágenes ---------- */
.case-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
}
.case-lightbox[hidden] { display: none; }
.case-lightbox figure { margin: 0; text-align: center; }
.case-lightbox img { max-width: 100%; max-height: 80vh; border-radius: 10px; box-shadow: 0 0 60px rgba(var(--brand-rgb), 0.3); background: #fff; }
.case-lightbox figcaption { margin-top: 12px; color: #fff; }
.case-lightbox__close { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 1.8rem; cursor: pointer; }
.case-lightbox__nav { width: 48px; height: 48px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 1.8rem; cursor: pointer; }
.case-lightbox__close:hover, .case-lightbox__nav:hover { background: rgba(var(--brand-rgb), 0.3); }

/* ==========================================================
   Motivos de cada marca en la portada
   ========================================================== */
.motif { position: absolute; z-index: -1; pointer-events: none; }

/* Zohar: olas de plata */
.motif--waves { left: -10%; right: -10%; top: 10%; width: 120%; height: 80%; fill: none; stroke: rgba(var(--brand-rgb), 0.18); stroke-width: 1.2; }
.motif--waves path { animation: wave-drift 9s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.2s); }
@keyframes wave-drift { to { transform: translateX(-60px); } }
.case--waves .case-title { background: linear-gradient(100deg, #f4f6fb, #a9b1c4 40%, #ffffff 55%, #9aa3b8); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: silver-shine 5s ease-in-out infinite alternate; letter-spacing: 0.12em; }
@keyframes silver-shine { to { background-position: 100% 0; } }

/* ODEN: brújula dorada */
.motif--compass { right: 42%; top: 6%; width: min(360px, 40vw); fill: none; stroke: rgba(var(--brand-rgb), 0.22); stroke-width: 1; animation: compass-spin 60s linear infinite; }
.motif--compass .motif__needle { transform-origin: 100px 100px; animation: needle-seek 6s ease-in-out infinite; }
.motif--compass .motif__needle path { fill: rgba(var(--brand2-rgb), 0.12); }
.motif--compass .motif__needle .n { fill: rgba(var(--brand-rgb), 0.35); }
@keyframes compass-spin { to { transform: rotate(360deg); } }
@keyframes needle-seek { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(14deg); } }
.case--compass .case-title { letter-spacing: 0.32em; font-weight: 600; }

/* MetalTec: retícula isométrica */
.motif--iso {
    inset: 0 -50vw;
    background:
        repeating-linear-gradient(30deg, rgba(var(--brand-rgb), 0.08) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(150deg, rgba(var(--brand2-rgb), 0.08) 0 1px, transparent 1px 34px);
    mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent);
    -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent);
    animation: iso-slide 20s linear infinite;
}
@keyframes iso-slide { to { background-position: 68px 0, -68px 0; } }
.case--iso .case-title { text-transform: uppercase; letter-spacing: 0.04em; }

/* Únicos: manchas de creatividad */
.motif--splash { inset: 0; }
.motif--splash i { position: absolute; display: block; background: rgba(var(--brand-rgb), 0.18); filter: blur(2px); animation: blob 12s ease-in-out infinite; }
.motif--splash i:nth-child(1) { width: 260px; height: 240px; right: 6%; top: 4%; }
.motif--splash i:nth-child(2) { width: 140px; height: 130px; left: 38%; bottom: 6%; background: rgba(var(--brand2-rgb), 0.14); animation-delay: -4s; }
.motif--splash i:nth-child(3) { width: 80px; height: 80px; left: -2%; top: 14%; animation-delay: -8s; }
@keyframes blob {
    0%, 100% { border-radius: 58% 42% 63% 37% / 45% 55% 45% 55%; transform: rotate(0); }
    33% { border-radius: 40% 60% 35% 65% / 60% 40% 60% 40%; transform: rotate(40deg); }
    66% { border-radius: 65% 35% 50% 50% / 35% 65% 35% 65%; transform: rotate(-30deg); }
}
.case--splash .case-title { font-weight: 800; letter-spacing: -0.01em; }

/* Little Stars: estrellitas pastel */
.motif--stars { inset: 0; }
.motif--stars i {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    background: var(--brand);
    clip-path: polygon(50% 0, 61% 38%, 100% 38%, 69% 61%, 80% 100%, 50% 76%, 20% 100%, 31% 61%, 0 38%, 39% 38%);
    opacity: 0.5;
    animation: twinkle 3s ease-in-out infinite;
    animation-delay: var(--d);
}
.motif--stars i:nth-child(3n) { background: var(--brand2); }
.motif--stars i:nth-child(4n) { background: #ffe08a; }
@keyframes twinkle { 50% { opacity: 0.1; transform: scale(0.6) rotate(30deg); } }
.case--stars .case-title { font-weight: 700; color: #fff4f8; }
.case--stars .holo, .case--stars .case-panel, .case--stars .case-zoom, .case--stars .case-shot, .case--stars .case-results, .case--stars .case-next__card { border-radius: 22px; }

/* Sports Store: franjas de velocidad */
.motif--sport { inset: 0 -50vw; overflow: hidden; }
.motif--sport i { position: absolute; left: -20%; width: 140%; height: 3px; background: linear-gradient(90deg, transparent, rgba(var(--brand-rgb), 0.5), transparent); transform: rotate(-12deg); animation: dash 3.2s linear infinite; }
.motif--sport i:nth-child(1) { top: 22%; }
.motif--sport i:nth-child(2) { top: 40%; animation-delay: -1s; background: linear-gradient(90deg, transparent, rgba(var(--brand2-rgb), 0.5), transparent); }
.motif--sport i:nth-child(3) { top: 62%; animation-delay: -2s; }
.motif--sport i:nth-child(4) { top: 80%; animation-delay: -0.5s; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent); }
@keyframes dash { from { transform: rotate(-12deg) translateX(-30%); } to { transform: rotate(-12deg) translateX(30%); } }
.case--sport .case-title { font-size: clamp(3rem, 8vw, 6rem); letter-spacing: 0.04em; font-weight: 400; }
.case--sport .case-h2, .case--sport .case-row__title, .case--sport .case-cta__title, .case--sport .case-next__name { font-weight: 400; letter-spacing: 0.04em; }

/* Sell Services: escudo de seguridad y código */
.motif--secure { right: 44%; top: 8%; width: 220px; }
.motif--secure svg { width: 100%; fill: none; stroke: rgba(var(--brand-rgb), 0.3); stroke-width: 1.5; animation: shield 4s ease-in-out infinite; }
@keyframes shield { 50% { filter: drop-shadow(0 0 12px rgba(var(--brand-rgb), 0.6)); } }
.motif--secure span { position: absolute; left: calc(-60px + var(--i) * 30px); top: calc(150px + var(--i) * 22px); font-family: var(--a-font-mono); font-size: 0.72rem; color: rgba(var(--brand-rgb), 0.35); white-space: nowrap; animation: secure-fade 5s ease-in-out infinite; animation-delay: calc(var(--i) * 0.6s); }
@keyframes secure-fade { 50% { opacity: 0.2; } }

/* Smart Agriculture: sensores en el campo */
.motif--field { inset: 0 -50vw; background-image: radial-gradient(rgba(var(--brand-rgb), 0.35) 1.5px, transparent 2px); background-size: 46px 46px; mask-image: radial-gradient(ellipse 55% 65% at 50% 55%, #000, transparent); -webkit-mask-image: radial-gradient(ellipse 55% 65% at 50% 55%, #000, transparent); animation: field-pulse 4s ease-in-out infinite; }
@keyframes field-pulse { 50% { opacity: 0.45; } }

/* Library Management: lomos de libros */
.motif--books { inset: auto -50vw 0; height: 70%; background: repeating-linear-gradient(90deg, rgba(var(--brand-rgb), 0.09) 0 14px, transparent 14px 20px, rgba(var(--brand2-rgb), 0.08) 20px 30px, transparent 30px 38px); mask-image: linear-gradient(transparent, #000 60%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 60%, transparent); }

/* Space Flight Booking: planeta en órbita */
.motif--orbit { right: 40%; top: 8%; width: min(380px, 42vw); aspect-ratio: 1; border: 1px dashed rgba(var(--brand-rgb), 0.3); border-radius: 50%; animation: compass-spin 40s linear infinite; }
.motif--orbit::before { content: ''; position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(var(--brand2-rgb), 0.5), rgba(var(--brand-rgb), 0.15) 60%, transparent 70%); }
.motif--orbit::after { content: ''; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--brand2); box-shadow: 0 0 16px var(--brand2); }

/* Jest CI: pipeline de pasos */
.motif--pipeline { inset: 0 -50vw; background: linear-gradient(90deg, transparent, rgba(var(--brand2-rgb), 0.25), transparent) 0 62% / 100% 1px no-repeat; }
.motif--pipeline::before { content: ''; position: absolute; left: 50%; top: 62%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 14px var(--brand); animation: pipe-run 4s linear infinite; }
@keyframes pipe-run { from { transform: translateX(-60vw); } to { transform: translateX(60vw); } }

/* Taller de IA: círculos de color de la presentación */
.motif--bubbles { inset: 0; }
.motif--bubbles i { position: absolute; display: block; border-radius: 50%; opacity: 0.16; animation: blob-float 10s ease-in-out infinite alternate; }
.motif--bubbles i:nth-child(1) { width: 320px; height: 320px; right: 2%; top: -6%; background: #3b82f6; }
.motif--bubbles i:nth-child(2) { width: 220px; height: 220px; right: 22%; bottom: 4%; background: #ec4899; animation-delay: -3s; }
.motif--bubbles i:nth-child(3) { width: 140px; height: 140px; left: 34%; top: 10%; background: #84cc16; animation-delay: -6s; }

/* Armonía: hojas que flotan */
.motif--leaves { inset: 0; }
.motif--leaves svg { position: absolute; left: var(--x); top: var(--y); width: 46px; height: 46px; fill: rgba(var(--brand2-rgb), 0.16); transform: rotate(var(--r)); animation: leaf-drift 9s ease-in-out var(--d) infinite alternate; }
.motif--leaves svg:nth-child(3n) { width: 72px; height: 72px; fill: rgba(var(--brand-rgb), 0.08); }
@keyframes leaf-drift { to { transform: rotate(calc(var(--r) + 24deg)) translateY(-18px); } }
.case--leaves .case-title { font-weight: 600; letter-spacing: 0.04em; }
@keyframes blob-float { to { transform: translate(-20px, 16px) scale(1.06); } }

/* ATLAS: anillos del orbe */
.motif--orb { right: 30%; top: 4%; width: min(460px, 46vw); aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(var(--brand-rgb), 0.18); box-shadow: inset 0 0 80px rgba(var(--brand-rgb), 0.08); animation: compass-spin 50s linear infinite; }
.motif--orb::before, .motif--orb::after { content: ''; position: absolute; border-radius: 50%; border: 1px dashed rgba(var(--brand2-rgb), 0.3); }
.motif--orb::before { inset: 12%; }
.motif--orb::after { inset: 26%; border-style: solid; border-color: rgba(var(--brand-rgb), 0.22); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .case-hero { grid-template-columns: 1fr; min-height: 0; }
    .case-hero__media { order: 2; }
    .device--laptop { transform: none; }
    .telemetry__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
    .telemetry__item:nth-child(3) { padding-left: 0; border-left: 0; }
    .case-mission.has-media, .case-row { grid-template-columns: 1fr; }
    .case-row:nth-of-type(even) .case-row__media { order: 0; }
    .case-panels { grid-template-columns: 1fr 1fr; }
    .archive__group { grid-template-columns: 1fr; }
    .archive__head { position: static; }
    .motif--compass, .motif--secure, .motif--orbit, .motif--orb { right: 0; opacity: 0.6; }
}
@media (max-width: 640px) {
    .telemetry__grid, .case-panels, .case-panels--2, .case-results__list, .pair-grid { grid-template-columns: 1fr; }
    .telemetry__item { padding-left: 0; border-left: 0; }
    .case-gallery__head { flex-direction: column; align-items: flex-start; }
    .reel { grid-auto-columns: 88%; }
    .case-shot { height: 46vh; }
    .archive__grid { grid-template-columns: 1fr 1fr; }
    .archive__grid .case-shot { height: 160px; }
    .case-palette { flex-wrap: wrap; }
    .case-palette li { flex: 1 1 50%; }
    .case-palette li:hover { flex-grow: 1; }
    .swatch { height: 120px; }
    .case-lightbox { grid-template-columns: 1fr; padding: 60px 12px 24px; }
    .case-lightbox__nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .motif, .motif *, .case-title, .holo__scan, .case-hero__code i { animation: none !important; }
    .case-js .reveal { opacity: 1; transform: none; transition: none; }
    .device--laptop { transform: none; }
}

/* fotos que solo se abren desde la misión o las franjas, fuera del carrusel */
.case-shots-hidden, .case-shots-hidden[hidden] { display: none !important; }
