/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-titulo);
    background-color: var(--beige-crema);
    color: var(--cafe-oscuro);
    overflow-x: hidden;
    line-height: 1.6;
}

::selection {
    background-color: var(--naranja-calido);
    color: var(--blanco-calido);
}

/* Textura Orgánica (Noise) */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

/* Tipografía */
h1,
h2,
h3,
h4 {
    font-family: var(--font-titulo);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.font-drama {
    font-family: var(--font-drama);
    font-style: italic;
    font-weight: 600;
}

.font-datos {
    font-family: var(--font-datos);
}

/* Botones y Enlaces */
a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--radio-medio);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion-suave);
    border: none;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(0);
}

.btn-primary {
    background-color: var(--naranja-calido);
    color: var(--blanco-calido);
}

.btn-primary:hover {
    background-color: #E65100;
    box-shadow: 0 10px 25px rgba(245, 124, 0, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--blanco-calido);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    border-color: var(--blanco-calido);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Contenedores */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.view-section {
    display: none;
    opacity: 0;
    animation: fadeInView 0.5s forwards;
}

.view-section.active {
    display: block;
}

@keyframes fadeInView {
    to {
        opacity: 1;
    }
}

/* Botón Volver Arriba */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--naranja-calido);
    color: var(--blanco-calido);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    transform: translateY(20px);
}

.back-to-top img {
    width: 100%;
    height: 100%;
    filter: brightness(0) invert(1);
    /* Hack para que el SVG negro se vea blanco */
    transition: transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--cafe-oscuro);
    transform: translateY(-5px) scale(1.1);
}

.back-to-top:hover img {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
        padding: 0.6rem;
    }
}