/* 
    IDEAPRENEUR GLOBAL DESIGN SYSTEM 
    Version: Expert Refactor v2 (Pro Max)
*/

:root {
    /* Sophisticated Navy Palette */
    --color-navy-darker: #0f1927;
    --color-navy-dark: #172340;
    --color-navy: #223254;
    --color-navy-light: #2b3e63;
    
    /* Strategic Accents */
    --color-teal: #2a9d8f;
    --color-teal-muted: rgba(42, 157, 143, 0.2);
    --color-gold: #f4a400;
    --color-gold-light: #ffb82e;
    
    /* Neutrals */
    --color-white: #ffffff;
    --color-body: #cbd5e8;
    --color-muted: #7a8ba8;
    
    /* Fonts */
    --font-display: "Clash Display", "Plus Jakarta Sans", system-ui, sans-serif;
    --font-body: "DM Sans", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", monospace;
    
    /* Layout */
    --max-content: 1200px;
    --nav-height: 80px;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-xl: 2rem;

    /* Semantic surface tokens */
    --bg-primary: #0f1927;
    --bg-secondary: #172340;
    --bg-tertiary: #223254;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e8;
    --text-muted: #7a8ba8;
    --border: rgba(42, 157, 143, 0.15);
    --accent: #f4a400;
    --green: #22c55e;

    /* Typography scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-7: 1.75rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Typography utilities */
    --weight-semi: 600;
    --tracking-wide: 0.1em;
    --leading-normal: 1.5;
    --leading-loose: 1.75;
}

[data-theme="light"] {
    --color-navy-darker: #e6edf5;
    --color-navy-dark:   #dce5f0;
    --color-navy:        #d0deed;
    --color-navy-light:  #f0f5fb;
    --color-white:       #0f172a;
    --color-body:        #334155;
    --color-muted:       #64748b;
    --color-teal-muted:  rgba(42, 157, 143, 0.12);
    --bg-primary:        #d9e6f2;
    --bg-secondary:      rgba(240, 248, 255, 0.55);
    --bg-tertiary:       rgba(220, 235, 248, 0.45);
    --text-primary:      #0c1a2e;
    --text-secondary:    #2d4060;
    --text-muted:        #5a7090;
    --border:            rgba(42, 157, 143, 0.18);
    --hero-bg:           linear-gradient(135deg, #b8c8d8, #cdd6e0);
}

[data-theme="light"] body {
    background: linear-gradient(155deg,
        #cddae9 0%,
        #bdd1e6 20%,
        #bfd8d5 45%,
        #c9ded9 70%,
        #d5e1e6 100%);
    background-attachment: fixed;
}

[data-theme="light"] .bg-grid {
    opacity: 0.06;
    background-image:
        linear-gradient(rgba(20, 70, 120, 1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 70, 120, 1) 1px, transparent 1px);
}

[data-theme="light"] .bg-noise {
    opacity: 0.025;
}

[data-theme="light"] .orb {
    opacity: 0.18;
    filter: blur(160px) saturate(0.7);
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4 {
    color: #223254;
}

[data-theme="light"] .bg-secondary {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
}

[data-theme="light"] .bg-tertiary {
    background: rgba(220, 238, 235, 0.4);
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-teal), var(--color-gold));
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Background Systems */
.bg-system {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.012;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-grid {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image:
        linear-gradient(var(--color-teal) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-teal) 1px, transparent 1px);
    background-size: 60px 60px;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.11;
    -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 40%, transparent 80%);
    mask-image: radial-gradient(circle, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 40%, transparent 80%);
}

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--color-white); font-weight: 700; line-height: 1.1; }
.text-display-xl { font-size: clamp(2.5rem, 8vw, 4.5rem); letter-spacing: -0.02em; }
.text-display-lg { font-size: clamp(2rem, 6vw, 3.5rem); }
.text-display-md { font-size: clamp(1.75rem, 5vw, 2.5rem); }

.text-gold-gradient {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.font-mono { font-family: var(--font-mono); }

/* Containers */
.container { max-width: var(--max-content); width: 100%; margin: 0 auto; padding: 0 1.5rem; position: relative; }
.section { padding: 8rem 0; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary { background: var(--color-gold); color: var(--color-navy-darker); border: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(244, 164, 0, 0.3); }

.btn-outline { border: 1px solid var(--color-teal-muted); color: var(--color-teal); background: transparent; }
.btn-outline:hover { background: var(--color-teal-muted); border-color: var(--color-teal); }

/* Utilities */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.8s ease-out; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

.text-center { text-align: center; }
.mb-16 { margin-bottom: 4rem; }
.mt-12 { margin-top: 3rem; }
.mt-24 { margin-top: 6rem; }
.max-w-xl { max-w: 36rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Social proof — hidden until real clients confirmed */
.proof-hidden { display: none !important; }

/* Section backgrounds */
.bg-secondary { background: var(--bg-secondary); }
.bg-tertiary { background: var(--bg-tertiary); }

/* Section dividers */
.section-divided {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* Typography weight hierarchy */
.font-display { font-family: var(--font-display); }
.font-mono    { font-family: var(--font-mono); }
.font-bold    { font-weight: 700; }
.font-semi    { font-weight: var(--weight-semi); }

.text-xs  { font-size: var(--text-xs); }
.text-sm  { font-size: var(--text-sm); }
.text-base{ font-size: var(--text-base); }
.text-lg  { font-size: var(--text-lg); }
.text-xl  { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-teal      { color: var(--color-teal); }
.text-gold      { color: var(--color-gold); }

/* Layout utilities */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }
.inline-flex  { display: inline-flex; }
.grid         { display: grid; }
.block        { display: block; }
.hidden       { display: none; }

.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.justify-end    { justify-content: flex-end; }

.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-5  { gap: var(--space-5); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }
.gap-14 { gap: 3.5rem; }
.gap-16 { gap: var(--space-16); }

.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }
.mt-14 { margin-top: 3.5rem; }
.mt-16 { margin-top: var(--space-16); }
.mt-24 { margin-top: 6rem; }

.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }

.w-full  { width: 100%; }
.max-w-sm  { max-width: 24rem; margin-left: auto; margin-right: auto; }
.max-w-xl  { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }

.uppercase       { text-transform: uppercase; }
.lowercase       { text-transform: lowercase; }
.tracking-widest { letter-spacing: 0.12em; }
.leading-normal  { line-height: var(--leading-normal); }
.leading-loose   { line-height: var(--leading-loose); }

.opacity-40 { opacity: 0.4; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }

.rounded    { border-radius: 0.5rem; }
.rounded-lg { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Nav links — desktop horizontal */
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
    margin: 0 0 0 2.5rem;
    padding: 0;
}

.nav-link {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active { color: var(--color-teal); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-left: auto;
}

.nav-actions .btn {
    padding: 0.55rem 1.25rem;
    font-size: var(--text-sm);
}

/* Tooltip terms */
.tooltip-term {
    cursor: help;
    border-bottom: 1px dashed currentColor;
    text-decoration: none;
    position: relative;
}

.tooltip-term:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--color-teal);
    color: var(--text-primary);
    font-size: 0.75rem;
    line-height: 1.5;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    width: max-content;
    max-width: 280px;
    white-space: normal;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tooltip-term:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-teal);
    z-index: 101;
    pointer-events: none;
}

/* FAQ Definition Blocks — S06/S07 */
.faq-definitions__item {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.faq-definitions__item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 0.5rem;
}
.faq-definitions__item p {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--color-body);
}

/* Answer-First Chunking — S06 */
p.answer {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-body);
    border-left: 3px solid var(--color-teal);
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    background: rgba(42, 157, 143, 0.06);
    border-radius: 0 0.5rem 0.5rem 0;
    max-width: 48rem;
}

/* Disable expensive blur on mobile */
@media (max-width: 768px) {
    .orb { display: none; }

    /* Collapse multi-column inline grids to single column */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: repeat(2, 1fr)"],
    [style*="grid-template-columns: repeat(4, 1fr)"],
    [style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
    }

    /* Comparison table: card stack layout */
    .comparison-table thead { display: none; }

    .comparison-table tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        background: var(--bg-secondary);
    }

    .comparison-table tbody tr td {
        display: block;
        padding: 0.625rem 0.75rem !important;
        white-space: normal !important;
        border-bottom: 1px solid var(--border);
    }

    .comparison-table tbody tr td.ct-dimension {
        grid-column: 1 / -1;
        background: rgba(0,201,167,0.07);
        font-weight: 600 !important;
        opacity: 1 !important;
        color: var(--color-teal);
        border-bottom: 1px solid var(--color-teal);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .comparison-table tbody tr td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--color-teal);
        opacity: 0.7;
        margin-bottom: 0.25rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
}
