/* =================================================================
   MAIN.CSS — Variables · Reset · Base · Typography · Utilities
   ================================================================= */

/* -----------------------------------------------------------------
   CSS Custom Properties
   ----------------------------------------------------------------- */
:root {
    /* Typography */
    --font-heading: 'Baloo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Baloo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    /* Aliases kept for compatibility */
    --font-primary: var(--font-heading);
    --font-secondary: var(--font-body);

    /* Brand colors */
    --primary: #3B9FDB;
    --primary-light: #7DC3ED;
    --primary-dark: #2980B9;
    --secondary: #3A8690;
    --accent-green: #52C6D4;
    --secondary-light: #F9FAFB;
    --accent-beige: #2980B9;
    --accent-orange: #7DC3ED;
    --color-orange: #FF8A50;
    --color-green: #2DBB76;
    --accent-pink: #F167D6;
    --accent-purple: #8A4AA0;
    --dark-blue: #3A8690;
    --accent: var(--accent-beige);
    --warning: var(--accent-orange);

    /* Neutral palette */
    --white: #ffffff;
    --gray-50: #F9FAFB;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic tokens */
    --surface: var(--white);
    --background: var(--gray-50);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
    --border: var(--gray-200);
    --shadow: rgba(0, 0, 0, 0.1);

    /* 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;

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, .25);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    --transition-bounce: 250ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-index scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
    --z-toast: 1070;

    /* Fluid font scale */
    --fs-base: clamp(14px, 1.35vw + 0.5rem, 18px);
    --fs-sm: calc(var(--fs-base) * 0.875);
    --fs-md: calc(var(--fs-base) * 1);
    --fs-lg: calc(var(--fs-base) * 1.125);
    --fs-xl: calc(var(--fs-base) * 1.35);
    --fs-2xl: calc(var(--fs-base) * 1.8);
}

/* Dark theme overrides */
[data-theme="dark"] {
    --surface: var(--gray-800);
    --background: var(--gray-900);
    --text-primary: var(--gray-100);
    --text-secondary: var(--gray-300);
    --text-muted: var(--gray-400);
    --border: var(--gray-700);
    --shadow: rgba(0, 0, 0, .3);
    --primary: #5AADDB;
    --primary-light: #8CCDEE;
    --primary-dark: #2F7DA5;
    --secondary: #4FA9B5;
    --accent-green: #65D4E1;
    --primary-dark-bg: #1D5A7A;
    --primary-accent: #4FA9B5;
    --color-orange: #FFB266;
    --color-green: #5FD697;
}

/* -----------------------------------------------------------------
   Reset
   ----------------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--fs-base);
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* -----------------------------------------------------------------
   Base
   ----------------------------------------------------------------- */
body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--background);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Mobile menu scroll lock */
body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

html:has(body.menu-open) {
    overflow: hidden !important;
    position: relative !important;
    height: 100% !important;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: all var(--transition-fast);
    position: relative;
}

a:hover {
    color: var(--primary-dark);
}

/* -----------------------------------------------------------------
   Typography — Playfair Display for headings, DM Sans for body
   ----------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(2.4rem, 5vw + 0.8rem, 5.5rem);
    font-weight: 900;
}

h2 {
    font-size: clamp(1.7rem, 3.2vw + 0.5rem, 3.2rem);
}

h3 {
    font-size: clamp(1.2rem, 2vw + 0.3rem, 1.9rem);
}

h4 {
    font-size: clamp(1rem, 1.4vw + 0.25rem, 1.3rem);
}

p {
    font-family: var(--font-body);
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    font-size: var(--fs-md);
    line-height: 1.7;
}

/* -----------------------------------------------------------------
   Accessibility
   ----------------------------------------------------------------- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px;
    border-radius: var(--radius-md);
    text-decoration: none;
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 6px;
}

/* -----------------------------------------------------------------
   Layout utilities
   ----------------------------------------------------------------- */
.container {
    width: min(90%, 75rem);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Pages with a fixed header need this on <main> */
.page-main {
    padding-top: 120px;
}

/* Section chrome */
.section {
    padding: var(--space-3xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto var(--space-3xl);
}

.section-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-family: var(--font-heading);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: var(--space-lg);
}

.section-description {
    font-size: var(--fs-lg);
    color: var(--text-muted);
    max-width: 36rem;
    margin: 0 auto;
}

/* -----------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    outline: none;
    transform: translateY(0);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* -----------------------------------------------------------------
   Misc utilities
   ----------------------------------------------------------------- */
.responsive-text {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.5;
    display: block;
}

.pricing_description {
    white-space: pre-line;
}

/* -----------------------------------------------------------------
   Inline SVG icon sizing (replaces FontAwesome icon elements)
   ----------------------------------------------------------------- */
svg.icon {
    width: 0.9em;
    height: 0.9em;
    display: inline-block;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

/* Ensure HTML hidden attribute is never overridden by display:inline-block */
svg.icon[hidden] {
    display: none !important;
}

[hidden] {
    display: none !important;
}