/* =====================================================================
   KALOS MK — Design System
   Inspirado en basement.studio (brutalist / grid técnico / grano / neón)
   + thekrakentraining (preloader, líneas que se dibujan, cursor, movimiento)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ---------- Tokens ---------- */
:root {
    --bg:        #0a0a0a;
    --bg-2:      #111113;
    --bg-3:      #17171a;
    --fg:        #f4f4f0;
    --muted:     #86867e;
    --muted-2:   #55554f;
    --line:      #26262a;
    --line-2:    #35353a;
    --acid:      #ffffff;   /* acento neutro (blanco) — sin rojo en la web */
    --acid-dim:  #b8b8b2;

    --brand:     #ef4056;   /* rojo de marca — SOLO en botones */
    --brand-dim: #d4324a;

    --side:      10%;       /* margen lateral → contenido en el 80% */

    --font-display: 'Montserrat', sans-serif;
    --font-body:    'Space Grotesk', sans-serif;
    --font-mono:    'Space Mono', monospace;

    --ease:  cubic-bezier(0.7, 0, 0.2, 1);
    --easeSmooth: cubic-bezier(0.22, 1, 0.36, 1);

    --pad: clamp(1.25rem, 4vw, 4rem);
    --maxw: 1500px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
    overflow-x: hidden;
    font-size: 16px;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--acid); color: #000; }

/* ---------- Typography helpers ---------- */
.display {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
.mono { font-family: var(--font-mono); }
.tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.acid { color: var(--acid); }

/* ---------- Layout ---------- */
.wrap { width: 80%; max-width: var(--maxw); margin: 0 auto; }
@media (max-width: 900px){ .wrap { width: 86%; } }
@media (max-width: 560px){ .wrap { width: 90%; } }

.section { position: relative; padding: clamp(4rem, 9vw, 9rem) 0; border-top: 1px solid var(--line); }

.section-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    flex-wrap: wrap;
}
.section-head .idx {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--acid);
    letter-spacing: 0.1em;
}
.section-head h2 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.95;
    font-size: clamp(2rem, 6vw, 4.5rem);
}
.section-head .sub {
    margin-left: auto;
    max-width: 34ch;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---------- Grain / Noise overlay ---------- */
.noise {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.045;
    mix-blend-mode: screen;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 0.6s steps(2) infinite;
}
@keyframes grain {
    0%,100% { transform: translate(0,0); }
    50% { transform: translate(-4%, 3%); }
}

/* ---------- Custom cursor ---------- */
.cursor {
    position: fixed;
    top: 0; left: 0;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--acid);
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width .25s var(--ease), height .25s var(--ease), background .25s;
    mix-blend-mode: difference;
}
.cursor.grow { width: 46px; height: 46px; background: var(--acid); }
.cursor.hide { opacity: 0; }
@media (hover: none) { .cursor { display: none; } }

/* ---------- Preloader ---------- */
.preloader {
    position: fixed; inset: 0; z-index: 10001;
    background: var(--bg);
    display: flex; align-items: flex-end; justify-content: center;
    padding: var(--side);
    transition: transform 1s var(--ease);
}
.preloader.done { transform: translateY(-100%); }
.preloader-grid {
    position: absolute; inset: 0;
    display: grid; grid-template-columns: repeat(6, 1fr);
    pointer-events: none;
}
.preloader-grid span { border-right: 1px solid var(--line); }
.preloader-grid span:last-child { border: none; }
.preloader-inner {
    width: 100%;
    display: flex; align-items: flex-end; justify-content: space-between;
    border-bottom: 2px solid var(--line-2);
    padding-bottom: 1.5rem;
}
.preloader-word {
    font-family: var(--font-display);
    font-weight: 800; text-transform: uppercase;
    font-size: clamp(2.5rem, 10vw, 8rem);
    line-height: 0.85;
    letter-spacing: -0.03em;
}
.preloader-word b { color: var(--acid); }
.preloader-count {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 10vw, 8rem);
    line-height: 0.85;
    color: var(--acid);
}
.preloader-bar {
    position: absolute; left: 0; bottom: 0; height: 2px; width: 0%;
    background: var(--acid);
    transition: width .2s linear;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem var(--side);
    border-bottom: 1px solid transparent;
    transition: background .4s var(--ease), border-color .4s;
    mix-blend-mode: normal;
}
.site-header.scrolled {
    background: rgba(10,10,10,0.72);
    backdrop-filter: blur(14px);
    border-color: var(--line);
}
.brand {
    font-family: var(--font-display);
    font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em;
    text-transform: uppercase; display: flex; align-items: center; gap: .25rem;
}
.brand span { color: var(--acid); font-size: 0.7rem; transform: translateY(-0.7em); }
.main-nav { display: flex; gap: 2rem; }
.main-nav a {
    font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--muted);
    position: relative; padding: .3rem 0; transition: color .3s;
}
.main-nav a::after {
    content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
    background: var(--acid); transition: width .35s var(--ease);
}
.main-nav a:hover, .main-nav a.active { color: var(--fg); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.header-right { display: flex; align-items: center; gap: 1.25rem; }
.status {
    font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: .5rem;
}
.status i {
    width: 7px; height: 7px; border-radius: 50%; background: var(--acid);
    box-shadow: 0 0 0 0 var(--acid); animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.menu-toggle { display: none; font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Buttons ---------- */
.btn {
    position: relative; display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 0.9rem 1.5rem;
    border: 1px solid var(--line-2); border-radius: 100px;
    overflow: hidden; transition: color .4s var(--ease), border-color .4s;
    color: var(--fg); background: transparent; z-index: 1;
}
.btn::before {
    content: ''; position: absolute; inset: 0; background: var(--brand);
    transform: translateY(101%); transition: transform .45s var(--ease); z-index: -1;
}
.btn:hover { color: #fff; border-color: var(--brand); }
.btn:hover::before { transform: translateY(0); }
.btn-fill { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-fill::before { background: #fff; }
.btn-fill:hover { color: var(--brand); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.72rem; }
.btn-lg { padding: 1.2rem 2.2rem; font-size: 0.9rem; }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.link-line {
    font-family: var(--font-mono); font-size: 0.82rem; text-transform: uppercase;
    letter-spacing: 0.06em; display: inline-flex; align-items: center; gap: .5rem;
    border-bottom: 1px solid var(--line-2); padding-bottom: .3rem; transition: border-color .3s, color .3s;
}
.link-line:hover { border-color: var(--acid); color: var(--acid); }

/* ---------- Marquee ---------- */
.marquee {
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    overflow: hidden; padding: 1.1rem 0; background: var(--bg);
}
.marquee-inner { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee:hover .marquee-inner { animation-play-state: paused; }
.marquee span {
    font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
    font-size: clamp(1.4rem, 3.4vw, 2.6rem); letter-spacing: -0.01em;
    padding: 0 1.5rem; display: inline-flex; align-items: center; gap: 1.5rem;
    white-space: nowrap;
}
.marquee span em { color: var(--acid); font-style: normal; }
.marquee .dot { color: var(--acid); }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee.alt .marquee-inner { animation-direction: reverse; animation-duration: 34s; }

/* ---------- HERO ---------- */
.hero {
    position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
    justify-content: flex-end; padding-top: 8rem; padding-bottom: 2.5rem;
    overflow: hidden;
}
.hero-grid-lines {
    position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); pointer-events: none; z-index: 0;
}
.hero-grid-lines span { border-right: 1px solid var(--line); opacity: 0; animation: fadeLine .8s var(--ease) forwards; }
.hero-grid-lines span:nth-child(1){animation-delay:.2s}.hero-grid-lines span:nth-child(2){animation-delay:.3s}
.hero-grid-lines span:nth-child(3){animation-delay:.4s}.hero-grid-lines span:nth-child(4){animation-delay:.5s}
.hero-grid-lines span:nth-child(5){animation-delay:.6s}.hero-grid-lines span:last-child{border:none}
@keyframes fadeLine { to { opacity: 1; } }

.hero-top {
    position: absolute; top: 8rem; left: 0; right: 0;
    display: flex; justify-content: space-between; gap: 2rem; z-index: 2;
}
.hero-top .tag { max-width: 30ch; line-height: 1.7; }
.hero-content { position: relative; z-index: 2; }
.hero h1 {
    font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
    font-size: clamp(2.4rem, 9vw, 8.5rem); line-height: 0.92; letter-spacing: -0.01em;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; transform: translateY(105%); transition: transform 1s var(--ease); }
body.loaded .hero h1 .line > span { transform: translateY(0); }
body.loaded .hero h1 .line:nth-child(2) > span { transition-delay: .08s; }
body.loaded .hero h1 .line:nth-child(3) > span { transition-delay: .16s; }
.hero h1 .outline { -webkit-text-stroke: 1.5px var(--fg); color: transparent; }
.hero h1 em { font-style: normal; color: var(--acid); }

.hero-bottom {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
    margin-top: clamp(1.5rem, 4vw, 3rem); flex-wrap: wrap;
}
.hero-bottom p { max-width: 42ch; color: var(--muted); font-size: clamp(0.95rem, 1.4vw, 1.15rem); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

.scroll-badge {
    position: absolute; right: 0; bottom: 2.5rem; z-index: 2;
    width: 88px; height: 88px; display: grid; place-items: center;
}
.scroll-badge .ring { position: absolute; inset: 0; animation: spin 12s linear infinite; }
.scroll-badge .ring text { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 2.4px; fill: var(--muted); text-transform: uppercase; }
.scroll-badge .arrow-down { color: var(--acid); font-size: 1.1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 720px){ .scroll-badge { display: none; } }

/* ---------- Manifesto / intro (espejo) ---------- */
.manifesto p {
    font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
    font-size: clamp(1.5rem, 4.2vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em;
    max-width: 20ch;
}
.manifesto p .muted { color: var(--muted-2); }
.manifesto p em { color: var(--acid); font-style: normal; }

.mirror-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); margin-top: 3.5rem; }
.mirror-cols h4 { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--acid); margin-bottom: 1.5rem; }
.mirror-cols li { border-top: 1px solid var(--line); padding: 1rem 0; color: var(--muted); font-size: 1rem; display: flex; gap: .8rem; align-items: baseline; transition: color .3s, padding-left .3s; }
.mirror-cols li:hover { color: var(--fg); padding-left: .6rem; }
.mirror-cols li b { color: var(--acid); font-family: var(--font-mono); font-size: 0.75rem; }
@media (max-width: 720px){ .mirror-cols { grid-template-columns: 1fr; } }

/* ---------- Services list (Los 4 modelos) ---------- */
.svc-list { border-top: 1px solid var(--line); }
.svc-row {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
    border-bottom: 1px solid var(--line); padding: clamp(1.3rem, 3vw, 2.4rem) 0;
    position: relative; transition: padding .4s var(--ease);
}
.svc-row::before {
    content: ''; position: absolute; inset: 0; background: var(--bg-2);
    transform: scaleY(0); transform-origin: bottom; transition: transform .4s var(--ease); z-index: -1;
}
.svc-row:hover { padding-left: 1.5rem; padding-right: 1.5rem; }
.svc-row:hover::before { transform: scaleY(1); }
.svc-row .num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--acid); }
.svc-row .svc-name { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem, 4.5vw, 3.2rem); line-height: 1; letter-spacing: -0.02em; }
.svc-row .svc-desc { font-size: 0.92rem; color: var(--muted); max-width: 34ch; margin-top: .4rem; }
.svc-row .svc-go { font-family: var(--font-mono); font-size: 1.4rem; color: var(--muted); transition: color .3s, transform .3s; }
.svc-row:hover .svc-go { color: var(--acid); transform: translate(4px,-4px); }
@media (max-width: 720px){
    .svc-row { grid-template-columns: auto 1fr; }
    .svc-row .svc-go { grid-column: 2; justify-self: end; }
}

/* ---------- Steps / proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step { background: var(--bg); padding: clamp(1.4rem, 2.5vw, 2.2rem); min-height: 260px; display: flex; flex-direction: column; transition: background .4s; }
.step:hover { background: var(--bg-2); }
.step .step-n { font-family: var(--font-mono); font-size: 0.78rem; color: var(--acid); margin-bottom: auto; }
.step h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; letter-spacing: -0.01em; margin: 1.5rem 0 .6rem; }
.step p { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 900px){ .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px){ .steps { grid-template-columns: 1fr; } .step { min-height: auto; } }

/* ---------- Work / portfolio ---------- */
.work-featured {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    border: 1px solid var(--line); position: relative; overflow: hidden;
}
.work-featured .wf-media {
    aspect-ratio: 4/3; background: linear-gradient(135deg, #16213a, #0a0a0a); position: relative; overflow: hidden;
    display: grid; place-items: center;
}
.work-featured .wf-media .idbig { font-family: var(--font-display); font-weight: 800; font-size: 6rem; color: rgba(255,255,255,0.04); text-transform: uppercase; }
.work-featured .wf-info { padding: clamp(1.5rem, 3.5vw, 3rem); display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.work-featured .wf-info h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 3rem); line-height: .95; letter-spacing: -0.02em; }
.work-featured .wf-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.work-featured .wf-meta span { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
@media (max-width: 820px){ .work-featured { grid-template-columns: 1fr; } }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 1px; }
.work-card { background: var(--bg); padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; transition: background .4s; position: relative; }
.work-card:hover { background: var(--bg-2); }
.work-card .wc-media { aspect-ratio: 16/10; background: linear-gradient(135deg,#1a2233,#0a0a0a); border: 1px solid var(--line); position: relative; overflow: hidden; display: grid; place-items: center; }
.work-card .wc-media::after { content:''; position:absolute; inset:0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent); transform: translateX(-100%); transition: transform .7s var(--ease); }
.work-card:hover .wc-media::after { transform: translateX(100%); }
.work-card .wc-media .emoji { font-size: 2.4rem; filter: grayscale(0.2); }
.work-card h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.35rem; letter-spacing: -0.01em; }
.work-card .wc-type { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--acid); }
.work-card p { color: var(--muted); font-size: 0.88rem; }
.work-card .wc-arrow { font-family: var(--font-mono); position: absolute; top: 1.5rem; right: 1.5rem; color: var(--muted); transition: color .3s, transform .3s; }
.work-card:hover .wc-arrow { color: var(--acid); transform: translate(3px,-3px); }
@media (max-width: 900px){ .work-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .work-grid { grid-template-columns: 1fr; } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.5rem); }
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; letter-spacing: -0.03em; color: var(--acid); }
.stat .lbl { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: .8rem; }
@media (max-width: 820px){ .stats { grid-template-columns: repeat(2,1fr); } }

/* ---------- Testimonials ---------- */
.tests { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.test { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.5rem); display: flex; flex-direction: column; gap: 1.5rem; }
.test .quote { font-size: 1.05rem; line-height: 1.6; }
.test .quote::before { content: '“'; font-family: var(--font-display); color: var(--acid); font-size: 2.4rem; line-height: 0; display: block; margin-bottom: 1rem; }
.test .who { margin-top: auto; }
.test .who b { font-family: var(--font-mono); font-size: 0.82rem; display: block; }
.test .who span { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 820px){ .tests { grid-template-columns: 1fr; } }

/* ---------- Blog cards ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.post-card { background: var(--bg); display: flex; flex-direction: column; transition: background .4s; }
.post-card:hover { background: var(--bg-2); }
.post-card .pc-media { aspect-ratio: 16/9; background: linear-gradient(135deg,#182033,#0a0a0a); position: relative; overflow: hidden; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.post-card .pc-media .emoji { font-size: 2.6rem; }
.post-card .pc-body { padding: 1.6rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.post-card .pc-cat { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--acid); }
.post-card h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.25rem; line-height: 1.05; letter-spacing: -0.01em; }
.post-card p { color: var(--muted); font-size: 0.88rem; }
.post-card .pc-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); padding-top: 1rem; border-top: 1px solid var(--line); }
.post-card .pc-foot .go { color: var(--acid); }
@media (max-width: 900px){ .blog-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .blog-grid { grid-template-columns: 1fr; } }

/* Featured post (blog page) */
.post-featured { display: grid; grid-template-columns: 1.2fr 1fr; border: 1px solid var(--line); overflow: hidden; }
.post-featured .pf-media { min-height: 340px; background: linear-gradient(135deg,#1c2740,#0a0a0a); display: grid; place-items: center; }
.post-featured .pf-media .emoji { font-size: 4rem; }
.post-featured .pf-body { padding: clamp(1.5rem,3.5vw,3rem); display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.post-featured .pf-body h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem,4vw,3.2rem); line-height: .95; letter-spacing: -0.02em; }
@media (max-width: 820px){ .post-featured { grid-template-columns: 1fr; } }

/* ---------- Article (blog post) ---------- */
.article-hero { padding-top: 9rem; border-bottom: 1px solid var(--line); }
.article-hero .cat { color: var(--acid); }
.article-hero h1 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.2rem, 6.5vw, 5.5rem); line-height: 0.92; letter-spacing: -0.03em; margin: 1.2rem 0; max-width: 18ch; }
.article-hero .meta { display: flex; gap: 1.5rem; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.article-body { max-width: 760px; margin: 0 auto; padding: clamp(3rem,6vw,5rem) 0; }
.article-body > * { margin-bottom: 1.6rem; }
.article-body p { font-size: 1.08rem; line-height: 1.8; color: #d4d4cc; }
.article-body h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem,3.5vw,2.4rem); letter-spacing: -0.01em; margin-top: 3rem; }
.article-body h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.4rem; margin-top: 2rem; color: var(--acid); }
.article-body ul, .article-body ol { padding-left: 1.4rem; color: #d4d4cc; }
.article-body ul li { list-style: none; position: relative; padding-left: 1.4rem; margin-bottom: .8rem; }
.article-body ul li::before { content: '→'; position: absolute; left: 0; color: var(--acid); }
.article-body ol { list-style: decimal; }
.article-body ol li { margin-bottom: .8rem; padding-left: .4rem; }
.article-body ol li::marker { color: var(--acid); font-family: var(--font-mono); }
.article-body blockquote { border-left: 3px solid var(--acid); padding: .5rem 0 .5rem 1.5rem; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.4rem; line-height: 1.2; }
.article-body pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 1.3rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.85rem; color: var(--acid); }
.article-body code { font-family: var(--font-mono); font-size: 0.9em; color: var(--acid); background: var(--bg-2); padding: .1rem .4rem; border-radius: 4px; }
.article-body pre code { background: none; padding: 0; }
.article-body img { border: 1px solid var(--line); border-radius: 8px; }
.article-note { border: 1px solid var(--line-2); border-radius: 10px; padding: 1.5rem; background: var(--bg-2); }
.article-note .tag { color: var(--acid); margin-bottom: .6rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem,5vw,5rem); }
@media (max-width: 820px){ .contact-grid { grid-template-columns: 1fr; } }
.field { position: relative; margin-bottom: 2.4rem; }
.field input, .field textarea, .field select {
    width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--line-2);
    color: var(--fg); font-family: var(--font-body); font-size: 1.05rem; padding: .8rem 0; outline: none;
    transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 90px; }
.field select { color: var(--muted); }
.field label {
    position: absolute; left: 0; top: .8rem; font-family: var(--font-mono); font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); pointer-events: none;
    transition: transform .3s var(--ease), color .3s;
}
.field input:focus + label, .field textarea:focus + label,
.field input:not(:placeholder-shown) + label, .field textarea:not(:placeholder-shown) + label {
    transform: translateY(-1.8rem) scale(.85); color: var(--acid);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--acid); }
.field.select-field label { top: -1.1rem; transform: scale(.85); color: var(--acid); }
.contact-info dl { border-top: 1px solid var(--line); }
.contact-info div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.contact-info dt { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.contact-info dd { text-align: right; font-size: 0.95rem; }
.contact-info dd a:hover { color: var(--acid); }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem 0; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.1rem, 2.4vw, 1.6rem); letter-spacing: -0.01em; transition: color .3s; }
.faq-q:hover { color: var(--acid); }
.faq-q .plus { font-family: var(--font-mono); color: var(--acid); font-size: 1.4rem; transition: transform .4s var(--ease); flex-shrink: 0; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease); }
.faq-a p { color: var(--muted); padding-bottom: 1.5rem; max-width: 70ch; }
.faq-item.open .faq-a { max-height: 340px; }

/* ---------- Big CTA ---------- */
.cta-final { text-align: center; padding: clamp(5rem, 12vw, 11rem) 0; border-top: 1px solid var(--line); }
.cta-final h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.4rem, 10vw, 9rem); line-height: 0.9; letter-spacing: -0.03em; }
.cta-final h2 em { color: var(--acid); font-style: normal; }
.cta-final .sub { color: var(--muted); max-width: 46ch; margin: 1.5rem auto 2.5rem; }

/* ---------- Legal pages ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: clamp(3rem,6vw,5rem) 0; }
.legal h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.4rem,3vw,2rem); margin: 2.5rem 0 1rem; letter-spacing: -0.01em; }
.legal h2 .n { color: var(--acid); font-family: var(--font-mono); font-size: 0.9rem; margin-right: .6rem; }
.legal p, .legal li { color: #cfcfc7; line-height: 1.8; margin-bottom: 1rem; }
.legal ul { padding-left: 1.4rem; }
.legal ul li { list-style: none; position: relative; padding-left: 1.3rem; }
.legal ul li::before { content: '—'; position: absolute; left: 0; color: var(--acid); }
.page-hero { padding-top: 9rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.4rem, 8vw, 6.5rem); line-height: 0.9; letter-spacing: -0.03em; }
.page-hero .page-subtitle { font-size: 1.3rem; line-height: 1.4; color: var(--muted); margin-top: 0.75rem; max-width: 60ch; }
.page-hero .crumb { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 1.5rem; }
.page-hero .crumb a:hover { color: var(--acid); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(3rem,6vw,5rem); }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2rem; padding-bottom: 4rem; }
.footer-col h4, .footer-col h3 { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 1.4rem; }
.footer-col li { margin-bottom: .7rem; }
.footer-col a, .footer-col p { color: var(--fg); font-size: 0.95rem; transition: color .3s; }
.footer-col a:hover { color: var(--acid); }
.footer-col .muted { color: var(--muted); }
.footer-intro p { color: var(--muted); max-width: 34ch; margin-top: 1rem; }
.footer-wordmark { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(3rem, 19vw, 18rem); line-height: 0.8; letter-spacing: -0.04em; text-align: center; padding: 1rem 0; overflow: hidden; }
.footer-wordmark span { display: inline-block; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.5rem 0; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.footer-bottom a:hover { color: var(--acid); }
@media (max-width: 820px){ .footer-top { grid-template-columns: 1fr 1fr; } }

/* ---------- Login modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 9500; background: rgba(5,5,5,0.8); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 1.5rem; }
.modal-overlay.open { display: flex; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    width: 100%; max-width: 440px; background: var(--bg-2); border: 1px solid var(--line-2);
    border-radius: 14px; padding: clamp(1.8rem, 4vw, 2.8rem); position: relative;
    animation: modalUp .45s var(--ease);
}
@keyframes modalUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.modal .modal-close { position: absolute; top: 1.2rem; right: 1.2rem; font-family: var(--font-mono); color: var(--muted); font-size: 1.1rem; transition: color .3s; }
.modal .modal-close:hover { color: var(--acid); }
.modal .m-tag { color: var(--acid); }
.modal h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.8rem; letter-spacing: -0.01em; margin: .6rem 0 1.8rem; }
.modal .field { margin-bottom: 2rem; }
.modal .m-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.modal .m-lines { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; border-radius: 0 0 14px 14px; }
.modal .m-lines span { display: block; height: 100%; width: 40%; background: var(--acid); animation: slideLine 1.8s var(--ease) infinite; }
@keyframes slideLine { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ---------- Mobile menu ---------- */
.mobile-menu { position: fixed; inset: 0; z-index: 890; background: var(--bg); transform: translateY(-100%); transition: transform .6s var(--ease); display: flex; flex-direction: column; justify-content: center; padding: var(--side); }
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 10vw, 4rem); line-height: 1.1; letter-spacing: -0.02em; border-bottom: 1px solid var(--line); padding: 1rem 0; transition: color .3s, padding-left .3s; }
.mobile-menu a:hover { color: var(--acid); padding-left: 1rem; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--easeSmooth), transform .8s var(--easeSmooth); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-line] { position: relative; }
[data-reveal-line]::after { content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%; background: var(--acid); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease); }
[data-reveal-line].is-visible::after { transform: scaleX(1); }

/* ---------- Responsive header ---------- */
@media (max-width: 900px){
    .main-nav, .header-right .status, .header-right .btn { display: none; }
    .menu-toggle { display: block; }
}

/* ---------- Logos de marca (SVG en blanco, sin rojo) ---------- */
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 26px; width: auto; display: block; filter: brightness(0) invert(1); }
.footer-intro .brand-logo { height: 40px; margin-bottom: .4rem; }
.preloader-logo { width: min(46vw, 480px); height: auto; display: block; filter: brightness(0) invert(1); }
@media (max-width: 560px){ .brand-logo { height: 21px; } }

/* Tipografía display sans-serif (Montserrat, impacto tipo thekrakentraining) */
.hero h1, .section-head h2, .cta-final h2, .page-hero h1, .article-hero h1,
.footer-wordmark, .svc-name, .stat .num, .faq-q, .mobile-menu a, .legal h2,
.post-featured .pf-body h2, .work-featured .wf-info h3, .article-body h2 {
    letter-spacing: -0.02em;
}
/* Los títulos grandes van en peso máximo para el look condensado/bold de Kraken */
.hero h1, .section-head h2, .cta-final h2, .page-hero h1, .article-hero h1,
.footer-wordmark, .svc-name, .post-featured .pf-body h2 { font-weight: 900; }

/* ---------- Showreel ---------- */
.reel { position: relative; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; aspect-ratio: 16/9; background: var(--bg-2); }
.reel-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; cursor: pointer; display: grid; place-items: center; }
.reel-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .68; transition: opacity .4s var(--ease), transform 6s var(--ease); }
.reel-play:hover .reel-thumb { opacity: .82; transform: scale(1.04); }
.reel-btn { position: relative; z-index: 2; width: 92px; height: 92px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.5rem; padding-left: 5px; transition: transform .35s var(--ease), background .3s; }
.reel-play:hover .reel-btn { transform: scale(1.09); }
.reel-tag { position: absolute; left: 1.3rem; bottom: 1.3rem; z-index: 2; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; mix-blend-mode: difference; }
.reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }

/* ---------- Selector de idioma ---------- */
.lang-toggle { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 100px; padding: .5rem .8rem; transition: color .3s, border-color .3s; }
.lang-toggle:hover { color: var(--fg); border-color: var(--fg); }

/* =====================================================================
   Animaciones con máscara (estilo thekrakentraining)
   ===================================================================== */
/* Texto que se revela con un barrido (clip-path) */
[data-mask] { clip-path: inset(0 100% 0 0); opacity: .001; transition: clip-path 1s var(--ease), opacity .2s; }
[data-mask].is-visible { clip-path: inset(0 0 0 0); opacity: 1; }

/* Imagen que se revela: un panel barre y descubre, con leve zoom */
.mask-img { position: relative; overflow: hidden; }
.mask-img img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.3s var(--ease); }
.mask-img::after { content: ''; position: absolute; inset: 0; background: var(--fg); transform-origin: right; transform: scaleX(1); transition: transform 1s var(--ease); z-index: 2; }
.mask-img.is-visible::after { transform: scaleX(0); }
.mask-img.is-visible img { transform: scale(1); }
.mask-img.brand::after { background: var(--brand); }

/* Líneas que se dibujan (barra fina) */
.draw-line { position: relative; height: 1px; background: var(--line); overflow: hidden; }
.draw-line::after { content: ''; position: absolute; inset: 0; background: var(--fg); transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease); }
.draw-line.is-visible::after { transform: scaleX(1); }

/* =====================================================================
   Franja de clientes (logos)
   ===================================================================== */
.clients-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 2.4rem 0; }
.clients-track { display: flex; align-items: center; gap: clamp(2.5rem, 6vw, 6rem); width: max-content; animation: marquee 34s linear infinite; }
.clients-band:hover .clients-track { animation-play-state: paused; }
.clients-track img { height: clamp(28px, 4vw, 44px); width: auto; object-fit: contain; opacity: .5; filter: brightness(0) invert(1); transition: opacity .35s var(--ease); }
.clients-track img:hover { opacity: 1; }

/* Grilla de clientes (estilo basement.studio: celdas grandes) */
.clients-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.clients-grid .client { background: var(--bg); display: grid; place-items: center; padding: clamp(2rem, 4vw, 4rem); min-height: clamp(140px, 18vw, 220px); transition: background .35s; }
.clients-grid .client:hover { background: var(--bg-2); }
.clients-grid .client img { height: clamp(42px, 6vw, 84px); width: auto; max-width: 78%; object-fit: contain; opacity: .55; filter: brightness(0) invert(1); transition: opacity .35s, transform .35s var(--ease); }
.clients-grid .client:hover img { opacity: 1; transform: scale(1.06); }
@media (max-width: 900px){ .clients-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px){ .clients-grid { grid-template-columns: repeat(2, 1fr); } }

/* =====================================================================
   Hero — slider de fondo
   ===================================================================== */
.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.07); transition: opacity 1.6s var(--ease), transform 7s var(--ease); }
.hero-slide.active { opacity: .42; transform: scale(1); }
.hero-slides::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,.8) 68%, var(--bg) 100%); }

/* =====================================================================
   Banda de marca — símbolo arameo (elemento de diseño)
   ===================================================================== */
.arameo-band { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(4.5rem, 11vw, 10rem) 0; overflow: hidden; text-align: center; }
.arameo-mark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.arameo-mark img { width: min(72vw, 900px); filter: brightness(0) invert(1); opacity: .05; animation: floaty 10s ease-in-out infinite; }
.arameo-inner { position: relative; z-index: 1; }
.arameo-inner .glyph { display: block; width: min(30vw, 220px); margin: 0 auto 2rem; filter: brightness(0) invert(1); opacity: .92; animation: floaty 7s ease-in-out infinite; }
.arameo-inner .kalos-word { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2rem, 6vw, 4.2rem); letter-spacing: -0.02em; }
.arameo-inner p { color: var(--muted); max-width: 46ch; margin: 1.2rem auto 0; }
.arameo-inner p em { color: var(--fg); font-style: normal; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* =====================================================================
   Página de proyecto (case study)
   ===================================================================== */
.case-hero { padding-top: 9rem; padding-bottom: 2.5rem; }
.case-hero .crumb { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 1.5rem; }
.case-hero .crumb a:hover { color: var(--acid); }
.case-hero h1 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.6rem, 9vw, 7rem); line-height: .9; letter-spacing: -0.03em; }
.case-hero .lead { max-width: 52ch; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.25rem); margin-top: 1.5rem; }
.case-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 3rem; }
.case-meta > div { background: var(--bg); padding: 1.4rem; }
.case-meta .k { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .5rem; }
.case-meta .v { font-weight: 600; font-size: .95rem; }
@media (max-width: 720px){ .case-meta { grid-template-columns: repeat(2, 1fr); } }

.case-cover { aspect-ratio: 16/9; border: 1px solid var(--line); border-radius: 4px; }
.case-section { display: grid; grid-template-columns: 35% 65%; gap: clamp(1.5rem, 4vw, 4rem); }
.case-section .c-label { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--acid); }
.case-section h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem, 3.5vw, 2.6rem); letter-spacing: -0.02em; line-height: 1; margin: .8rem 0 1.2rem; }
.case-section p { color: var(--muted); font-size: 1.02rem; line-height: 1.8; margin-bottom: 1rem; }
@media (max-width: 720px){ .case-section { grid-template-columns: 1fr; } }

.case-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.case-gallery .g-wide { grid-column: 1 / -1; }
.case-gallery .mask-img { aspect-ratio: 16/10; border: 1px solid var(--line); border-radius: 4px; }
.case-gallery .g-wide.mask-img { aspect-ratio: 21/9; }
@media (max-width: 720px){ .case-gallery { grid-template-columns: 1fr; } }
