/* ===== VARIABLES ===== */
:root {
    --navy: #1C3A5E;
    --sand: #C9A96E;
    --terracotta: #A0674A;
    --cream: #F5F0E8;
    --text: #1A1A1A;
    --cream-dark: #EDE7DB;
    --navy-light: #2A5080;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.7;
    font-size: 17px;
}

/* ===== NAV ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(28, 58, 94, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow 0.3s;
}

nav.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
}

.nav-brand {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--cream);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    list-style: none;
}

.nav-links a {
    color: rgba(245, 240, 232, 0.8);
    text-decoration: none;
    font-family: 'Source Serif 4', serif;
    font-size: 0.88rem;
    transition: color 0.3s;
    letter-spacing: 0.03em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--sand);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--cream);
    transition: all 0.3s;
}

/* ===== HERO (index only) ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(28, 58, 94, 0.1) 0%,
        rgba(28, 58, 94, 0.15) 40%,
        rgba(28, 58, 94, 0.5) 70%,
        rgba(28, 58, 94, 0.85) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem 6rem;
    max-width: 800px;
}

.hero-content h1 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    color: var(--cream);
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

.hero-tagline {
    font-family: 'Source Serif 4', serif;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--sand);
    font-weight: 300;
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
}

.hero-scroll {
    display: inline-block;
    color: rgba(245, 240, 232, 0.6);
    font-size: 0.8rem;
    text-decoration: none;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: float 3s ease-in-out infinite;
}

.hero-scroll::after {
    content: '';
    display: block;
    width: 1px;
    height: 40px;
    background: rgba(245, 240, 232, 0.4);
    margin: 0.8rem auto 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ===== PAGE HEADER (inner pages) ===== */
.page-header {
    padding-top: 5rem;
    padding-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header.navy-bg {
    background: var(--navy);
}

.page-header.cream-bg {
    background: var(--cream);
}

.page-header.dark-bg {
    background: #0F2440;
}

.page-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.page-header.navy-bg h1,
.page-header.dark-bg h1 {
    color: var(--cream);
}

.page-header.cream-bg h1 {
    color: var(--navy);
}

.page-header .subtitle {
    font-style: italic;
    font-size: 1.05rem;
    margin-bottom: 0;
}

.page-header.navy-bg .subtitle,
.page-header.dark-bg .subtitle {
    color: var(--sand);
}

.page-header.cream-bg .subtitle {
    color: var(--terracotta);
}

.page-header-line {
    width: 60px;
    height: 2px;
    margin: 1.2rem auto 0;
}

.page-header.navy-bg .page-header-line,
.page-header.dark-bg .page-header-line {
    background: var(--terracotta);
}

.page-header.cream-bg .page-header-line {
    background: var(--sand);
}

/* ===== SECTIONS ===== */
section {
    padding: 5rem 2rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--navy);
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
}

.section-line {
    width: 60px;
    height: 2px;
    background: var(--sand);
    margin-bottom: 2.5rem;
}

.section-line.center {
    margin-left: auto;
    margin-right: auto;
}

/* ===== BIO ===== */
.bio-text {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #333;
}

.bio-text p {
    margin-bottom: 1.5rem;
}

.bio-highlight {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--navy);
    line-height: 1.6;
    padding: 1.5rem 0 1.5rem 2rem;
    border-left: 3px solid var(--sand);
    margin: 2.5rem 0;
}

/* ===== LIBRO (AIRE) ===== */
.libro-info h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 1.4rem;
    color: var(--sand);
    margin-bottom: 1rem;
}

.libro-info p {
    color: rgba(245, 240, 232, 0.85);
    margin-bottom: 1.5rem;
    line-height: 1.85;
}

.libro-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(201, 169, 110, 0.3);
}

.libro-meta-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.libro-meta-item .label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sand);
    margin-bottom: 0.3rem;
}

.libro-meta-item .value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    color: var(--cream);
}

.fragmento {
    background: rgba(245, 240, 232, 0.06);
    border-left: 3px solid var(--terracotta);
    padding: 2rem;
    margin-top: 2.5rem;
    border-radius: 0 4px 4px 0;
}

.fragmento-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1rem;
}

.fragmento p {
    font-style: italic;
    color: rgba(245, 240, 232, 0.8);
    line-height: 1.9;
    font-size: 1.02rem;
}

.fragmento .firma {
    margin-top: 1.2rem;
    font-style: normal;
    font-size: 0.9rem;
    color: var(--sand);
}

/* ===== COMPANEROS ===== */
.companeros-intro {
    font-size: 1.05rem;
    color: #333;
    line-height: 1.85;
    margin-bottom: 2.5rem;
}

.companeros-group-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    color: var(--navy);
    margin-bottom: 1.2rem;
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.companeros-group-title:first-of-type {
    margin-top: 0;
}

.companeros-group-title .emoji {
    font-size: 1.4rem;
}

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

.companero-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.companero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.companero-card.gato::before {
    background: var(--terracotta);
}

.companero-card.perro::before {
    background: var(--navy);
}

.companero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.companero-card .card-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.companero-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 0.3rem;
}

.companero-card .card-type {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 0.8rem;
}

.companero-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
}

/* ===== COCINA ===== */
.recetas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.receta-card {
    background: white;
    border-radius: 6px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 3px solid var(--terracotta);
}

.receta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.receta-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.receta-card .origin {
    font-size: 0.8rem;
    color: var(--terracotta);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.receta-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
}

/* ===== BIBLIOTECA ===== */
.libros-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.libro-rec {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 6px;
    transition: transform 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.libro-rec:hover {
    transform: translateY(-3px);
}

.libro-rec .emoji {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.libro-rec h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    color: var(--navy);
    margin-bottom: 0.2rem;
}

.libro-rec .autor {
    font-size: 0.85rem;
    color: var(--terracotta);
    margin-bottom: 0.4rem;
}

.libro-rec p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.cat-label {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--navy);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.cat-label:first-of-type {
    margin-top: 0;
}

/* ===== CONTACTO ===== */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contacto-text p {
    color: rgba(245, 240, 232, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.contacto-aviso {
    font-style: italic;
    color: var(--sand) !important;
    font-size: 0.95rem;
    padding: 1.2rem;
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 4px;
    margin-top: 1rem;
}

.contacto-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contacto-form input,
.contacto-form textarea {
    background: rgba(245, 240, 232, 0.08);
    border: 1px solid rgba(245, 240, 232, 0.2);
    color: var(--cream);
    padding: 0.9rem 1.1rem;
    font-family: 'Source Serif 4', serif;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.contacto-form input::placeholder,
.contacto-form textarea::placeholder {
    color: rgba(245, 240, 232, 0.4);
}

.contacto-form input:focus,
.contacto-form textarea:focus {
    outline: none;
    border-color: var(--sand);
}

.contacto-form textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-enviar {
    background: var(--terracotta);
    color: var(--cream);
    border: none;
    padding: 0.9rem 2.5rem;
    font-family: 'Source Serif 4', serif;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s, transform 0.2s;
    align-self: flex-start;
    letter-spacing: 0.03em;
}

.btn-enviar:hover {
    background: #8B5A3E;
    transform: translateY(-2px);
}

.redes {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.redes a {
    color: rgba(245, 240, 232, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    letter-spacing: 0.05em;
}

.redes a:hover {
    color: var(--sand);
}

/* ===== HOME CARDS ===== */
.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.home-card {
    background: white;
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text);
}

.home-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.home-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.home-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.home-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

/* ===== FOOTER ===== */
footer {
    background: #0F2440;
    text-align: center;
    padding: 2.5rem 2rem;
}

.footer-brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

footer p {
    color: rgba(245, 240, 232, 0.4);
    font-size: 0.85rem;
}

footer .footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

footer .footer-links a {
    color: rgba(245, 240, 232, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

footer .footer-links a:hover {
    color: var(--sand);
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(28, 58, 94, 0.98);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1.2rem;
    }

    .nav-links.open {
        display: flex;
    }

    section {
        padding: 3.5rem 1.5rem;
    }

    .hero-content {
        padding: 0 1.5rem 4rem;
    }

    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .recetas-grid,
    .companero-grid,
    .libros-list {
        grid-template-columns: 1fr;
    }

    .bio-highlight {
        font-size: 1.25rem;
        padding-left: 1.5rem;
    }

    .fragmento {
        padding: 1.5rem;
    }

    .home-cards {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
    }

    .page-header {
        padding-top: 4.5rem;
        padding-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .nav-brand {
        font-size: 1.1rem;
    }

    .libro-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .redes {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
