/* ==========================================================================
   Tarvant Vision Empresarial — Design System
   Based on MÁA Brand Identity Manual
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    /* ── MÁA Brand Colors ── */
    --brand-black:    #1E1E1E;
    --brand-gray:     #77777A;
    --brand-teal:     #18A5B7;
    --brand-teal-light: #1FBDD1;
    --brand-teal-dark:  #148E9E;
    --brand-gold:     #D0DE8A;

    /* ── Backgrounds (white-first) ── */
    --bg-white:       #FFFFFF;
    --bg-light:       #F7F8FA;
    --bg-subtle:      #F0F1F3;
    --bg-dark:        #1E1E1E;

    /* ── Text ── */
    --text-primary:   #1E1E1E;
    --text-secondary: #77777A;
    --text-muted:     #A0A0A3;
    --text-inverse:   #FFFFFF;

    /* ── Accent (teal from brand) ── */
    --accent-primary:    #18A5B7;
    --accent-hover:      #1FBDD1;
    --accent-pressed:    #148E9E;
    --accent-subtle:     rgba(24, 165, 183, 0.08);
    --accent-medium:     rgba(24, 165, 183, 0.15);

    /* ── Level colors ── */
    --level-1: #18A5B7;
    --level-2: #77777A;
    --level-3: #1E1E1E;

    /* ── Borders ── */
    --border-subtle:  #F0F1F3;
    --border-default: #E2E3E5;
    --border-strong:  #CCCCCF;

    /* ── Typography (Zona Pro → Poppins) ── */
    --font-body:    'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

    /* ── Fluid type scale ── */
    --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
    --text-sm:   clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
    --text-base: clamp(0.9375rem, 0.875rem + 0.3vw, 1.0625rem);
    --text-lg:   clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
    --text-xl:   clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
    --text-2xl:  clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --text-3xl:  clamp(1.75rem, 1.3rem + 2.2vw, 2.5rem);
    --text-4xl:  clamp(2rem, 1.4rem + 3vw, 3rem);
    --text-5xl:  clamp(2.5rem, 1.8rem + 3.5vw, 4rem);

    /* ── Spacing ── */
    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* ── Layout ── */
    --max-width:        1120px;
    --max-width-narrow: 720px;
    --nav-height:       72px;

    /* ── Motion ── */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 500ms;

    /* ── Radius ── */
    --radius-sm:   6px;
    --radius-md:   8px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-full: 9999px;
}

/* ==========================================================================
   Reset (scoped)
   ========================================================================== */

.tve-page *,
.tve-page *::before,
.tve-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.tve-page {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Full-width breakout — escape MasterStudy .container */
.tve-landing {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Remove MasterStudy theme container spacing on landing page */
#main > .container:has(.tve-landing) {
    padding: 0;
    margin: 0;
    max-width: none;
    width: 100%;
}

.tve-page img {
    max-width: 100%;
    height: auto;
    display: block;
}

.tve-page a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

.tve-page a:hover {
    color: var(--accent-hover);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.tve-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.tve-container--narrow {
    max-width: var(--max-width-narrow);
}

.tve-section {
    padding: var(--space-2xl) 0;
    position: relative;
}

.tve-section--tight {
    padding: var(--space-xl) 0;
}

.tve-section--alt {
    background: var(--bg-light);
}

/* ==========================================================================
   Typography
   ========================================================================== */

.tve-heading {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.tve-heading--accent {
    color: var(--accent-primary);
}

.tve-label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-primary);
}

.tve-body {
    font-family: var(--font-body);
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 300;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.tve-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.03em;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.tve-btn--primary {
    background: var(--accent-primary);
    color: var(--text-inverse);
    border-color: var(--accent-primary);
}

.tve-btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(24, 165, 183, 0.3);
}

.tve-btn--primary:active {
    background: var(--accent-pressed);
    border-color: var(--accent-pressed);
    transform: translateY(0);
}

.tve-btn--outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.tve-btn--outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tve-btn--dark {
    background: var(--brand-black);
    color: var(--text-inverse);
    border-color: var(--brand-black);
}

.tve-btn--dark:hover {
    background: #333;
    border-color: #333;
    color: var(--text-inverse);
}

.tve-btn--lg {
    padding: 18px 40px;
    font-size: var(--text-base);
}

/* Outline buttons on dark backgrounds — ensure contrast */
.tve-cta .tve-btn--outline,
.tve-about .tve-btn--outline {
    color: var(--text-inverse);
    border-color: rgba(255, 255, 255, 0.4);
}

.tve-cta .tve-btn--outline:hover,
.tve-about .tve-btn--outline:hover {
    border-color: var(--text-inverse);
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.1);
}

/* Ensure primary buttons never inherit link colors */
.tve-page .tve-btn--primary,
.tve-page .tve-btn--primary:hover,
.tve-page .tve-btn--primary:active {
    color: var(--text-inverse);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.tve-card {
    background: var(--bg-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--duration-normal) var(--ease-out);
}

.tve-card:hover {
    border-color: var(--border-default);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Animations
   ========================================================================== */

.tve-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

.tve-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.tve-level-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 4px 12px;
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tve-level-badge--1 {
    background: var(--accent-subtle);
    color: var(--accent-primary);
}

.tve-level-badge--2 {
    background: rgba(119, 119, 122, 0.1);
    color: var(--brand-gray);
}

.tve-level-badge--3 {
    background: rgba(30, 30, 30, 0.08);
    color: var(--brand-black);
}

.tve-badge-free {
    display: inline-block;
    padding: 3px 10px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--accent-primary);
    background: var(--accent-subtle);
    border-radius: var(--radius-sm);
    letter-spacing: 0.03em;
}

/* ==========================================================================
   Separator
   ========================================================================== */

.tve-separator {
    width: 48px;
    height: 3px;
    background: var(--accent-primary);
    margin: var(--space-lg) 0;
    border-radius: 2px;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.tve-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
