/* ============================================================
   AINARA ARRIOLA — EDITORIAL PORTFOLIO
   ============================================================ */

:root {
    --accent:       #C41E3A;
    --accent-dim:   rgba(196, 30, 58, 0.12);
    --bg:           #080808;
    --surface:      #101010;
    --surface-2:    #181818;
    --border:       rgba(255, 255, 255, 0.06);
    --text:         #f0ede8;
    --text-dim:     #999;
    --font-display: 'Playfair Display', serif;
    --font-body:    'Montserrat', sans-serif;
    --nav-h:        72px;
    --ease:         cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
ul    { list-style: none; }
a     { text-decoration: none; transition: color 0.35s var(--ease); }

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar             { width: 3px; }
::-webkit-scrollbar-track       { background: var(--bg); }
::-webkit-scrollbar-thumb       { background: var(--accent); border-radius: 2px; }

/* ── NAVIGATION ────────────────────────────────────────────── */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    padding: 0 5%;
    transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
}

header.scrolled {
    background: rgba(8, 8, 8, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 3px;
    text-transform: uppercase;
}

nav ul { display: flex; gap: 2.5rem; }

nav ul a {
    color: rgba(240, 237, 232, 0.6);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding-bottom: 5px;
    position: relative;
}

nav ul a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease);
}

nav ul a:hover { color: var(--text); }
nav ul a:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px; height: 1.5px;
    background: var(--text);
    transition: 0.35s var(--ease);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── HERO ──────────────────────────────────────────────────── */
#hero {
    height: 100vh;
    min-height: 620px;
    display: flex;
    align-items: center;
    background:
        url('../images/1000321872.jpg') no-repeat right center / auto 100%;
    background-color: #111110;
    position: relative;
    overflow: hidden;
}

/* gradient veil — dark left, fade to transparent right */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(8, 8, 8, 0.75) 0%, rgba(8, 8, 8, 0) 18%),
        linear-gradient(
            105deg,
            rgba(8, 8, 8, 1)    0%,
            rgba(8, 8, 8, 0.92) 30%,
            rgba(8, 8, 8, 0.55) 55%,
            rgba(8, 8, 8, 0)    82%
        );
    z-index: 1;
}

/* bottom fade into next section */
#hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    z-index: 1;
}

.hero-text {
    position: relative;
    z-index: 2;
    padding-left: 8%;
    max-width: 54%;
}

.hero-eyebrow {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.8rem;
}

#hero h1 {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 7vw, 7.5rem);
    font-weight: 700;
    line-height: 1.0;
    color: var(--text);
    letter-spacing: -2px;
    margin-bottom: 1.8rem;
}

.hero-subtitle {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* animated scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 8%;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-dim);
    font-size: 0.58rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.hero-scroll::before {
    content: '';
    display: block;
    width: 40px; height: 1px;
    background: var(--text-dim);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; width: 40px; }
    50%       { opacity: 1;   width: 60px; }
}

/* ── SECTION LAYOUT ────────────────────────────────────────── */
section { padding: 7rem 0; }
section:nth-child(even) { background-color: var(--surface); }

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header { margin-bottom: 4rem; }

.section-eyebrow {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.05;
    letter-spacing: -0.5px;
}

h3 { font-family: var(--font-display); }

/* ── TRAYECTORIA ───────────────────────────────────────────── */
.trayectoria-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    overflow: hidden;
}

.column {
    background: var(--surface-2);
    padding: 2.8rem;
    transition: background 0.3s;
}

.column:hover { background: #1e1e1e; }

.column h3 {
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    padding-bottom: 1.2rem;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid rgba(196, 30, 58, 0.4);
}

.column p { font-size: 0.83rem; color: rgba(240, 237, 232, 0.75); margin-bottom: 0.8rem; }

.column ul li {
    font-size: 0.82rem;
    color: rgba(240, 237, 232, 0.75);
    padding-left: 1.4rem;
    position: relative;
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

.column ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.65rem;
    top: 4px;
}

/* ── GALERÍA ───────────────────────────────────────────────── */
#galeria { background-color: var(--bg); }

.photo-grid {
    columns: 3;
    column-gap: 6px;
}

/* Remove all nth-child spanning rules — not needed with columns layout */

.photo-grid img {
    width: 100%;
    display: block;
    margin-bottom: 6px;
    break-inside: avoid;
    filter: grayscale(20%);
    transition: filter 0.5s var(--ease), transform 0.5s var(--ease);
}

.photo-grid img:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
    position: relative;
    z-index: 1;
}

/* ── VIDEOBOOK ─────────────────────────────────────────────── */
#videobook { background: var(--surface); }

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.5rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--border);
    pointer-events: none;
    z-index: 1;
}

.video-container video,
.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

/* ── CONTACTO ──────────────────────────────────────────────── */
#contacto { background: var(--bg); }

.contacto-inner {
    max-width: 540px;
}

.contacto-intro {
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 3rem;
    line-height: 1.9;
}

.contact-item { margin-bottom: 0; }

.contact-label {
    display: block;
    font-size: 0.58rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.contact-value {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: color 0.3s, border-color 0.3s;
}

.contact-value:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.contact-location {
    display: block;
    margin-top: 2.5rem;
    font-size: 0.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
    padding: 2rem 5%;
    border-top: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    #hero { background-position: 72% center; }
    .hero-text { max-width: 65%; }
}

@media (max-width: 768px) {
    section { padding: 4.5rem 0; }
    .section-header { margin-bottom: 2.5rem; }

    #hero {
        background-position: center top;
        background-size: auto 55%;
        background-color: #0c0c0b;
        align-items: flex-end;
        padding-bottom: 5rem;
    }

    #hero::before {
        background: linear-gradient(
            to top,
            rgba(8,8,8,1)    0%,
            rgba(8,8,8,0.96) 35%,
            rgba(8,8,8,0.5)  60%,
            rgba(8,8,8,0)    100%
        );
    }

    .hero-text {
        max-width: 100%;
        padding: 0 6%;
        text-align: center;
    }

    .hero-scroll { left: 50%; transform: translateX(-50%); }

    .photo-grid {
        columns: 2;
        column-gap: 4px;
    }
    .photo-grid img {
        margin-bottom: 4px;
    }

    .video-grid { grid-template-columns: 1fr; }

    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--nav-h);
        flex-direction: column;
        background: rgba(8, 8, 8, 0.97);
        backdrop-filter: blur(16px);
        width: 100%;
        padding: 3rem 0;
        border-top: 1px solid var(--border);
        transition: left 0.35s var(--ease);
        gap: 0;
    }

    .nav-menu.active { left: 0; }
    .nav-menu li { text-align: center; }

    .nav-menu a {
        font-size: 0.85rem;
        padding: 1rem 2rem;
        display: block;
        color: var(--text-dim);
    }

    footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
