/* =====================================================
   Base Apple-style typography & layout
   Paleta de marca intacta: primary #E6B3CC, secondary #9B6B9E, accent #E6CCE6
   ===================================================== */

:root {
    --brand-primary: #E6B3CC;
    --brand-secondary: #9B6B9E;
    --brand-accent: #E6CCE6;

    /* Apple-inspired neutrals */
    --apple-bg: #FBFBFD;
    --apple-surface: #FFFFFF;
    --apple-border: #D2D2D7;
    --apple-border-soft: #E5E5EA;
    --apple-text-primary: #1D1D1F;
    --apple-text-secondary: #6E6E73;
    --apple-text-tertiary: #86868B;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
                 "Helvetica Neue", "Helvetica", Arial, sans-serif;
    color: var(--apple-text-primary);
    font-feature-settings: "kern", "liga", "calt";
    letter-spacing: -0.003em;
    line-height: 1.47059;
}

/* Mantener el font-serif de Tailwind para headings de marca, pero
   refinar letter-spacing al estilo Apple (ligeramente tight). */
h1, h2, h3, h4, h5, h6,
.font-serif {
    letter-spacing: -0.02em;
    line-height: 1.14;
    font-weight: 600;
}

p {
    color: var(--apple-text-secondary);
}

/* Scroll suave y experiencia Apple */
html { scroll-behavior: smooth; }

/* =====================================================
   Apple-style refinements
   ===================================================== */

/* Suavizar las sombras — Apple usa sombras muy discretas */
.shadow-lg,
.shadow-xl {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04),
                0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

.shadow-md {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04),
                0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

.shadow,
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.hover\:shadow-xl:hover,
.hover\:shadow-lg:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06),
                0 8px 24px rgba(0, 0, 0, 0.06) !important;
}

/* Nav superior — translúcido estilo Apple (sin gradiente, solo blur) */
nav.fixed {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--apple-border-soft);
    box-shadow: none !important;
}

/* Botones — estilo Apple rounded + transición */
a, button {
    transition: all 0.2s ease;
}

/* Tarjetas más cuadradas-redondeadas al estilo Apple (ya usamos rounded-xl/2xl) */
.rounded-xl { border-radius: 16px !important; }
.rounded-2xl { border-radius: 20px !important; }

/* Inputs y details — look Apple */
details summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding-right: 2rem;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--apple-text-secondary);
    transition: transform 0.2s ease;
}
details[open] summary::after {
    content: "−";
}

/* =====================================================
   Animaciones (se mantienen, con easing Apple)
   ===================================================== */
.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menú móvil */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-100%);
}
.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 300ms cubic-bezier(0.42, 0, 0.58, 1),
                transform 300ms cubic-bezier(0.42, 0, 0.58, 1);
}
.mobile-menu-exit { opacity: 1; transform: translateY(0); }
.mobile-menu-exit-active {
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 300ms, transform 300ms;
}

.table-row-animate {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease-out;
}
.table-row-animate.show { opacity: 1; transform: translateX(0); }

.reference-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}
.reference-animate.show { opacity: 1; transform: translateY(0); }

.button-hover {
    transition: all 0.3s ease;
}
.button-hover:hover {
    transform: translateY(-1px);
}

.image-hover { transition: all 0.4s ease; }
.image-hover:hover { transform: scale(1.02); }

.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: pageLoad 0.7s cubic-bezier(0.42, 0, 0.58, 1) forwards;
}
@keyframes pageLoad {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.42, 0, 0.58, 1);
}
.section-animate.show { opacity: 1; transform: translateY(0); }

.fade-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}
.fade-scroll.show { opacity: 1; transform: translateY(0); }

.mobile-menu {
    transition: transform 0.3s cubic-bezier(0.42, 0, 0.58, 1),
                opacity 0.3s ease;
}

a {
    transition: color 0.2s ease, background-color 0.2s ease;
}

.card-hover {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-2px);
}

/* =====================================================
   Clases utilitarias Apple-style
   ===================================================== */
.apple-bg { background-color: var(--apple-bg); }
.apple-surface { background-color: var(--apple-surface); }
.apple-border { border-color: var(--apple-border-soft); }
.apple-text-secondary { color: var(--apple-text-secondary); }

/* Section dividers muy sutiles al estilo Apple */
.apple-divider {
    height: 1px;
    background-color: var(--apple-border-soft);
    border: none;
}

/* Inputs focus estilo Apple */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(155, 107, 158, 0.25);
}
