/* =============================================
   ROOT & TOKENS
============================================= */
:root {
    --bg-main:  #F5EDE6;
    --bg-sec:   #E6D3C3;
    --accent:   #B08973;
    --accent-dark: #8a6a58;
    --text:     #6B4F3A;
    --white:    #FFFFFF;

    --font-serif: 'Playfair Display', serif;
    --font-sans:  'Montserrat', sans-serif;

    --transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow: 0 20px 60px rgba(107,79,58,0.08), 0 4px 16px rgba(107,79,58,0.04);
    --shadow-lg: 0 40px 100px rgba(107,79,58,0.14);
    --radius: 2.5rem;
    --radius-sm: 1.2rem;
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

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

/* Grain texture */
body::before {
    content: "";
    position: fixed; inset: 0;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.035;
    z-index: 9999;
    pointer-events: none;
}

/* =============================================
   TYPOGRAPHY
============================================= */
.serif { font-family: var(--font-serif); }
.sans  { font-family: var(--font-sans); }

h1,h2,h3,h4 { line-height: 1.05; }

.title-xl { font-size: clamp(4.5rem, 14vw, 9.5rem); letter-spacing: -0.02em; }
.title-lg  { font-size: clamp(2.8rem, 8vw,  5.5rem); letter-spacing: -0.02em; }
.title-md  { font-size: clamp(2rem,   5vw,  3.5rem); letter-spacing: -0.01em; }

.section-label {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    font-weight: 700;
    font-family: var(--font-sans);
    opacity: 0.38;
    margin-bottom: 1.5rem;
}

/* =============================================
   LAYOUT
============================================= */
.section {
    padding: 130px 8%;
    position: relative;
}

/* Gradient top-border separator on every section */
.section::before {
    content: "";
    position: absolute;
    top: 0; left: 8%; right: 8%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(176, 137, 115, 0.25) 25%,
        rgba(176, 137, 115, 0.5)  50%,
        rgba(176, 137, 115, 0.25) 75%,
        transparent 100%
    );
}

/* Skip separator on very first section (hero doesn't need it) */
#inicio::before { display: none; }

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

/* =============================================
   COMPONENTS
============================================= */

/* Glass card */
.glass {
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: var(--radius);
}

.card-border {
    border: 1px solid rgba(107,79,58,0.1);
    border-radius: var(--radius);
    background: var(--white);
}

/* Divider accent line */
.accent-line {
    width: 3rem;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    display: block;
}

/* =============================================
   ANIMATIONS & REVEALS
============================================= */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1),
                transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Blob morph */
@keyframes morph {
    0%   { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    50%  { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
}
.morph-blob { animation: morph 12s ease-in-out infinite; }

/* Float */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-22px); }
}
.float { animation: float 7s ease-in-out infinite; }

/* =============================================
   HOVER EFFECTS
============================================= */
.hover-lift { transition: var(--transition); }
.hover-lift:hover { transform: translateY(-12px); box-shadow: var(--shadow-lg); }

.img-scale { overflow: hidden; }
.img-scale img {
    transition: transform 1.4s cubic-bezier(0.16,1,0.3,1);
}
.img-scale:hover img { transform: scale(1.07); }

/* =============================================
   CUSTOM CURSOR
============================================= */
.cursor {
    width: 10px; height: 10px;
    background: var(--text);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: multiply;
    transition: transform 0.15s ease, opacity 0.2s;
    transform: translate(-50%, -50%);
}
.cursor-follower {
    width: 38px; height: 38px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: left 0.12s ease, top 0.12s ease, transform 0.4s ease;
    transform: translate(-50%, -50%);
}

/* =============================================
   PHONE FRAME
============================================= */
.phone-frame {
    width: 240px;
    height: 500px;
    background: #111;
    border: 8px solid #1c1c1c;
    border-radius: 42px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.05);
    transition: var(--transition);
}
.phone-frame::before {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 90px; height: 22px;
    background: #111;
    z-index: 10;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}
.phone-frame:hover { transform: translateY(-18px) rotate(1.5deg); box-shadow: var(--shadow-lg); }

.phone-screen {
    width: 100%; height: 100%;
    border-radius: 34px;
    overflow: hidden;
    position: relative;
}
.phone-screen img, .phone-screen video {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* Video specific adjustment */
.phone-screen video {
    pointer-events: none; /* Let the container handle clicks */
}

/* =============================================
   SERVICE CARDS
============================================= */
.service-item {
    padding: 2.5rem;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid rgba(107,79,58,0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: var(--shadow);
}
.service-item:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(176,137,115,0.3);
}

/* =============================================
   METRICS STRIP
============================================= */
.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
    border-right: 1px solid rgba(176, 137, 115, 0.18);
    flex: 1;
}
.metric-item:last-child { border-right: none; }

/* metrics section separator */
#metricas {
    position: relative;
}
#metricas::before,
#metricas::after {
    content: "";
    position: absolute;
    left: 8%; right: 8%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(176, 137, 115, 0.3) 25%,
        rgba(176, 137, 115, 0.55) 50%,
        rgba(176, 137, 115, 0.3) 75%,
        transparent 100%
    );
}
#metricas::before { top: 0; }
#metricas::after  { bottom: 0; }

/* =============================================
   CONTACT BUTTONS
============================================= */
.contact-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.4rem;
    background: var(--white);
    border: 1px solid rgba(107,79,58,0.12);
    border-radius: 100px;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.contact-btn:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.contact-btn i { font-size: 1.2rem; }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1024px) {
    .section { padding: 90px 6%; }
    .cursor, .cursor-follower { display: none; }
    body { cursor: auto; }
    .metric-item { border-right: none; border-bottom: 1px solid rgba(107,79,58,0.08); }
    .metric-item:last-child { border-bottom: none; }
}

@media (max-width: 640px) {
    .section { padding: 70px 5%; }
    .phone-frame { width: 200px; height: 420px; }
}

/* =============================================
   NICHE CARDS (editorial hover)
============================================= */
.niche-card:hover {
    background: var(--bg-sec) !important;
    border-color: rgba(176,137,115,0.25) !important;
    box-shadow: var(--shadow-lg);
    transform: translateX(6px);
}

/* =============================================
   PROCESS STEPS
============================================= */
.process-step {
    background: var(--white);
}
.process-step:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(176,137,115,0.2) !important;
    background: var(--bg-main);
}

/* =============================================
   VIDEO MODAL
============================================= */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(107, 79, 58, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-container {
    position: relative;
    width: 90%;
    max-width: 400px; /* Vertical mobile focus */
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 2rem;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 50px 100px rgba(0,0,0,0.5);
}

.video-modal.active .video-container {
    transform: scale(1);
}

.video-modal video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.close-video {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #F5EDE6;
    font-size: 2rem;
    cursor: pointer;
    z-index: 5001;
    transition: transform 0.3s ease;
}

.close-video:hover {
    transform: scale(1.1);
}

/* Custom Play Icon pulsing */
@keyframes pulse-play {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255,255,255,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.play-pulse {
    animation: pulse-play 2s infinite;
}
