/* ============================================================================
   LIPOCI FRONTEND DESIGN SYSTEM TOKENS (SYSTEM.CSS)
   ============================================================================ */

:root {
    /* Colors System */
    --c-primary: #00A699;
    --c-secondary: #A2DBF6;
    --c-tertiary: #2b2825;
    --c-accent: #00A699;
    --c-dark: #2b2825;
    --c-light: #FFFFFF;
    --c-white: #FFFFFF;
    --c-black: #000000;
    --c-brand: #00A699;

    /* Typography Scale */
    --font-primary: 'Inter', sans-serif;
    --text-xs: 10px;
    --text-sm: 12px;
    --text-base: 14px;
    --text-md: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 32px;
    --text-4xl: 40px;
    --text-5xl: 48px;
    --text-6xl: 64px;
    --text-7xl: 72px;
    --text-8xl: 100px;

    /* Spacing Scale (Margin/Padding) */
    --space-2xs: 4px;
    --space-xs: 5px;
    --space-sm: 10px;
    --space-md: 20px;
    --space-lg: 30px;
    --space-xl: 40px;
    --space-2xl: 60px;
    --space-3xl: 80px;
    --space-4xl: 120px;
    --space-5xl: 150px;

    /* Grid & Layout Metrics - Mobile first */
    --grid-gap: var(--space-sm);
    --padding-container: var(--space-sm);

    --border-width: 2px;
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
}

@media (min-width: 1024px) {
    :root {
        /* Desktop override: 20px/20px grid system */
        --grid-gap: var(--space-md);
        --padding-container: var(--space-md);
    }
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* =========================================
   LENIS SMOOTH SCROLL REQUIRED CSS
   ========================================= */
html.lenis, html.lenis body {
    height: auto;
}
.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis.lenis-stopped {
    overflow: hidden;
}
.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--c-light);
    color: var(--c-black);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: clip; /* Dùng clip thay vì hidden để tránh biến body thành scroll container gây liệt chuột Lenis trên màn hình lớn */
    /* Cuộn mượt trên mobile (iOS) */
    -webkit-overflow-scrolling: touch;
    /* Ngăn kéo ngang trang gây nhảy layout */
    overscroll-behavior-x: none;
    font-weight: 400;
}

/* ============================================================================
   SYNCHRONIZED UNIFORM TEXT WEIGHT (FONT-WEIGHT: 400 REGULAR FOR ALL TEXT)
   ============================================================================ */
body, h1, h2, h3, h4, h5, h6, p, span, a, button, input, select, textarea, label, div,
.font-light, .font-normal, .font-medium, .font-semibold, .font-bold, .font-extrabold,
[class*="font-"] {
    font-weight: 400 !important;
}

/* ============================================================================
   GLOBAL TYPOGRAPHY SCALE (DIVIDE BY 3)
   Desktop (≤ 1440px): Title = 48px | Body/Small = 48 ÷ 3 = 16px
   Tablet/Mobile (< 1024px): Title = 36px | Body/Small = 36 ÷ 3 = 12px
   ============================================================================ */

/* L1 — Hero / Page Title */
.hero-title-reveal, [class*="hero-title"] {
    font-size: 48px !important;
    line-height: 1.2 !important;
}

/* L2 — Section Title: also 48px (same as hero) */
.section-title-reveal, [class*="section-title"] {
    font-size: 48px !important;
    line-height: 1.2 !important;
}

/* L3 — Body text: 48 ÷ 3 = 16px (Default for all text) */
body, p, .hero-desc-reveal, .fluid-body,
.hdr-nav-item, .nav-item, button, .btn-text-a, .btn-text-b, input, textarea,
.team-row-name, .team-row-role, .team-bio-btn,
footer a, footer p, footer span, footer li, footer div.pt-5,
.stat-text, #inn-display-card-title, #inn-display-num {
    font-size: 16px !important;
    line-height: 1.4 !important;
}

/* Tablet & Mobile (< 1024px) */
@media (max-width: 1023px) {
    .hero-title-reveal, [class*="hero-title"],
    .section-title-reveal, [class*="section-title"] { 
        font-size: 36px !important; 
    }
    body, p, .hero-desc-reveal, .fluid-body,
    .hdr-nav-item, .nav-item, button, .btn-text-a, .btn-text-b, input, textarea,
    .team-row-name, .team-row-role, .team-bio-btn,
    footer a, footer p, footer span, footer li, footer div.pt-5,
    .stat-text, #inn-display-card-title, #inn-display-num { 
        font-size: 12px !important; 
    }
}

/* =========================================
   LAYOUT COMPONENTS
========================================= */
.main-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: transparent;
}

.floating-header-wrapper {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    right: var(--space-md);
    z-index: 50;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.floating-header-wrapper.is-hidden {
    transform: translateY(calc(-100% - var(--space-md) - 10px));
    opacity: 0;
    pointer-events: none;
}

.content-overlay-wrapper {
    position: absolute;
    top: auto;
    bottom: var(--space-xl);
    left: 0;
    z-index: 10;
    width: 100%;
    padding-left: var(--padding-container);
    padding-right: var(--padding-container);
}

/* --- Floating Header Elements --- */
.header-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.header-left-box {
    background: var(--c-light);
    padding: var(--space-2xs) var(--space-sm);
    border-radius: var(--radius-md);
}

.header-right {
    display: flex;
    gap: var(--space-2xs);
    align-items: flex-start;
    width: 100%;
}

.nav-item {
    background: var(--c-light);
    padding: var(--space-sm);
    font-size: 14.84px;
    border-radius: var(--radius-sm);
    color: var(--c-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item:hover {
    background: var(--c-primary);
    color: var(--c-white);
}

/* =========================================
   COLORS UTILITIES
========================================= */
.text-primary { color: var(--c-primary); }
.text-secondary { color: var(--c-secondary); }
.text-tertiary { color: var(--c-tertiary); }
.text-accent { color: var(--c-accent); }
.text-dark { color: var(--c-dark); }
.text-light { color: var(--c-light); }

.bg-primary { background-color: var(--c-primary); }
.bg-secondary { background-color: var(--c-secondary); }
.bg-tertiary { background-color: var(--c-tertiary); }
.bg-accent { background-color: var(--c-accent); }
.bg-dark { background-color: var(--c-dark); }
.bg-light { background-color: var(--c-light); }

/* Grid System moved to master.css */
@media (max-width: 1023px) {

    .hide-on-mobile {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .content-overlay-wrapper {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }
}

/* =========================================
   UTILITIES
========================================= */
@media (max-width: 1023px) {
    .hide-on-mobile {
        display: none !important;
    }
    .big-text-indent {
        text-indent: calc(25% + var(--grid-gap));
        text-align: left !important;
    }
    .m-text-indent {
        padding-left: calc(25% + var(--grid-gap));
    }
}

@media (min-width: 1024px) {
    .big-text-indent {
        text-indent: calc(16.666% + var(--grid-gap));
    }
}

/* Scrollbar Hide */
html, body, .hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
html::-webkit-scrollbar, body::-webkit-scrollbar, .hide-scrollbar::-webkit-scrollbar {
    display: none;
}


/* =========================================
   STANDARD SECTION TEMPLATE
========================================= */
.section-standard {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
    position: relative;
    overflow: hidden;
    background-color: var(--c-light);
}

.section-standard .container {
    position: relative;
    z-index: 10;
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    margin-bottom: var(--space-xl);
    color: var(--c-dark);
}

.section-subtitle {
    font-size: var(--text-xl);
    color: var(--c-primary);
    margin-bottom: var(--space-md);
}

@media (max-width: 1023px) {
    .section-standard {
        padding-top: var(--space-2xl);
        padding-bottom: var(--space-2xl);
    }
    .section-title {
        font-size: var(--text-3xl);
    }
}

@media (max-width: 767px) {
    .section-standard {
        padding-top: var(--space-xl);
        padding-bottom: var(--space-xl);
    }
    .section-title {
        font-size: var(--text-2xl);
    }
    .section-subtitle {
        font-size: var(--text-lg);
    }
}


/* Tailwind black utility overrides to match brand dark color */
.text-black { color: var(--c-black) !important; }
.bg-black { background-color: var(--c-black) !important; }
.border-black { border-color: var(--c-black) !important; }


/* Tailwind white utility overrides to match brand light color */
.text-white { color: var(--c-light) !important; }
.bg-white { background-color: var(--c-light) !important; }
.border-white { border-color: var(--c-light) !important; }


/* SVG utility overrides */
.fill-white { fill: var(--c-light) !important; }
.stroke-white { stroke: var(--c-light) !important; }
.fill-black { fill: var(--c-black) !important; }
.stroke-black { stroke: var(--c-black) !important; }


/* Ẩn mũi tên của input type number */
.hide-arrows::-webkit-outer-spin-button,
.hide-arrows::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.hide-arrows {
  -moz-appearance: textfield;
}

/* =========================================
   ULTRA-WIDE SCREENS (> 1440px): 
   1. FULL-WIDTH SECTION BACKGROUNDS (0 SECTION PADDING)
   2. SYNCHRONIZED 20PX CONTENT PADDING FOR ALL INNER CONTAINERS
   3. PROPORTIONAL FLUID SECTION TITLE & HERO STAT SCALING
   ========================================= */
@media (min-width: 1441px) {
    /* 1. Ensure section backgrounds span 100% FULL WIDTH with zero outer side padding */
    section,
    .hero-inner,
    .hero-bg,
    .hero-pinned-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 2. Synchronize all inner content containers to 100% width with 20px side margins matching Hero */
    .hero-content,
    .max-w-\[1440px\],
    .container {
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .max-w-\[800px\] {
        max-width: clamp(800px, 58vw, 1300px) !important;
    }

    .max-w-\[1100px\] {
        max-width: clamp(1100px, 75vw, 1700px) !important;
    }

    /* 3. Proportional Fluid Title Scaling for > 1440px (base = 48px at 1440) */
    .hero-title-reveal, [class*="hero-title"],
    .section-title-reveal, [class*="section-title"] {
        font-size: clamp(48px, 3.8vw, 78px) !important;
        line-height: 1.2 !important;
    }

    /* Section sub-headings: 29.67px base → fluid to ~48px */
    .fluid-h3 {
        font-size: clamp(29.67px, 2.1vw, 48px) !important;
        line-height: 1.2 !important;
    }

    /* 4. Proportional Fluid Scaling for Hero Stats */
    .stat-number {
        font-size: clamp(48px, 4.0vw, 84px) !important;
        line-height: 1 !important;
    }

    /* Body text (Default): Title ÷ 3 -> clamp(16px, 1.26vw, 26px) */
    body, p, .hero-desc-reveal, .fluid-body,
    .hdr-nav-item, .nav-item, .fluid-sub, button, .btn-text-a, .btn-text-b, input, textarea,
    .team-row-name, .team-row-role, .team-bio-btn,
    footer a, footer p, footer span, footer li, footer div.pt-5,
    .stat-text, #inn-display-card-title, #inn-display-num {
        font-size: clamp(16px, 1.26vw, 26px) !important;
        line-height: 1.4 !important;
    }

    /* 5. FutureVision Section Fluid Scaling for > 1440px */
    #vision-section .sticky-img-card {
        padding: clamp(28px, 2.5vw, 48px) !important;
        min-height: clamp(640px, 45vw, 850px) !important;
    }

    #vision-section .vision-card {
        padding: clamp(28px, 2.4vw, 46px) !important;
        min-height: clamp(250px, 18vw, 340px) !important;
    }

    #vision-section .vision-card h3 {
        font-size: clamp(24px, 1.9vw, 36px) !important;
        line-height: 1.2 !important;
        max-width: 100% !important;
    }

    #vision-section .vision-card p {
        font-size: clamp(14px, 1.0vw, 18px) !important;
        line-height: 1.4 !important;
        max-width: clamp(480px, 35vw, 750px) !important;
    }
}
