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

/* =========================================
   1. CSS Variables (The Palette)
   ========================================= */
:root {
    /* Brand Colors — Premium Gold */
    --primary: #D97706;           /* amber-600 — rich gold */
    --primary-hover: #B45309;     /* amber-700 — deep gold on hover */
    --accent: #FEF3C7;            /* amber-100 — cream gold */

    /* Theme Gradients — Gold Spectrum */
    --gradient-hero-from: #92400E; /* amber-800 — deep warm gold */
    --gradient-hero-via: #D97706;  /* amber-600 — bright gold center */
    --gradient-hero-to: #F59E0B;   /* amber-500 — saffron */
    
    --glow-color-1: rgba(217, 119, 6, 0.2);   /* amber-600 20% */
    --glow-color-2: rgba(245, 158, 11, 0.1);  /* amber-500 10% */

    /* Theme Tokens: Premium Slate */
    --bg-body: #f8fafc;      /* Slate-50 */
    --bg-alternate: #ffffff;  /* White */
    --bg-surface: #ffffff;    /* White */
    
    /* Typography Palette */
    --text-main: #0f172a;    /* Slate-900 */
    --text-muted: #475569;   /* Slate-600 */
    --text-light: #64748b;   /* Slate-500 */
    
    /* Decorative & Semantic */
    --bg-quote: #f8fafc;
    --border-color: rgba(226, 232, 240, 0.6);
    
    --code-bg: #1e293b;
    --code-text: #f1f5f9;

    /* Component Tokens (change once, applies everywhere) */
    --btn-radius: 1rem;          /* rounded-2xl */
    --card-radius: 1.5rem;       /* rounded-3xl */
    --card-padding: 1.75rem;     /* p-7 */
    --card-padding-lg: 2rem;     /* p-8 */
    --section-badge-radius: 9999px;
    --transition-std: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

/* Dark Mode Overrides */
.theme-dark {
    --bg-body: #020617;
    --bg-alternate: #0a0a0a;
    --bg-surface: #0f172a;

    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-light: #94a3b8;
    
    --bg-quote: #0f172a;
    --border-color: rgba(255, 255, 255, 0.1);

    --gradient-hero-from: #78350F;
    --gradient-hero-via: #D97706;
    --gradient-hero-to: #FBBF24;

    --glow-color-1: rgba(217, 119, 6, 0.25);
    --glow-color-2: rgba(251, 191, 36, 0.12);

    --color-body: var(--bg-body);
    --color-alternate: var(--bg-alternate);
    --color-surface: var(--bg-surface);
    --color-main: var(--text-main);
    --color-muted: var(--text-muted);
    --color-light: var(--text-light);
    --color-theme: var(--border-color);
}

/* =========================================
   2. Base Styles
   ========================================= */
body {
    background-color: var(--bg-body);
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    transition: background-color 0.3s, color 0.3s;
}

/* Global Heading Font overrides */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Epilogue', sans-serif !important;
    font-weight: 600 !important;
}

/* Font Utilities */
.font-outfit {
    font-family: 'DM Sans', sans-serif;
}
.font-epilogue {
    font-family: 'Epilogue', sans-serif;
    font-weight: 600;
}
.font-dm-sans {
    font-family: 'DM Sans', sans-serif;
}

/* =========================================
   3. Typography System (Scoped to Content/Blog Pages)
   ========================================= */
.layout-content main h1,
.layout-content main h2,
.layout-content main h3,
.layout-content main h4 {
    color: var(--text-main);
    letter-spacing: -0.025em;
    margin-top: 3rem;
    font-family: 'Epilogue', sans-serif;
    font-weight: 600;
}

.layout-content main h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.2;
    margin-top: 0;
}

.layout-content main h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.layout-content main h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.layout-content main p,
.layout-content main li {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 1.75rem;
}

.layout-content main strong {
    color: var(--text-main);
    font-weight: 700;
}

.layout-content main a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 2px solid rgba(217, 119, 6, 0.2);
    transition: var(--transition-fast);
    font-weight: 500;
}

.layout-content main a:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary);
    background: rgba(217, 119, 6, 0.05);
}

.layout-content main blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg-quote);
    padding: 1.5rem 2rem;
    margin: 3rem 0;
    font-style: italic;
    color: var(--text-main);
    border-radius: 16px;
}

.layout-content main ul {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 1.75rem;
    margin-bottom: 2rem;
}

.layout-content main ol {
    list-style-type: decimal;
    list-style-position: outside;
    padding-left: 1.75rem;
    margin-bottom: 2rem;
}

.layout-content main li::marker {
    color: var(--text-muted);
    font-weight: normal;
}

.layout-content main img {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 3rem 0;
    width: 100%;
    height: auto;
}

.layout-content main pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.9em;
}

/* =========================================
   4. Layout Constraints
   ========================================= */
.layout-content main {
    max-width: 680px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

.layout-landing main {
    max-width: 100%;
    padding: 0;
}

/* =========================================
   5. COMPONENT SYSTEM
   ========================================= */

/* -----------------------------------------
   5a. BUTTONS
   ----------------------------------------- */

/* Base button — shared resets and structure */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-radius: var(--btn-radius);
    transition: var(--transition-std);
    cursor: pointer;
    border: none;
    white-space: nowrap;
    /* Default size: lg */
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Size modifiers */
.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
}

/* Primary: amber gradient — main CTA */
.btn-primary {
    background: linear-gradient(to right, var(--gradient-hero-from), var(--gradient-hero-via));
    color: #ffffff;
    box-shadow: 0 4px 24px rgba(217, 119, 6, 0.2);
}
.btn-primary:hover {
    box-shadow: 0 8px 40px rgba(217, 119, 6, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

/* Ghost: glass button — dark sections */
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Outline: light page secondary */
.btn-outline {
    background: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.btn-outline:hover {
    background: var(--bg-alternate);
    color: var(--text-main);
}

/* Solid: filled with primary color (no gradient) */
.btn-solid {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.2);
}
.btn-solid:hover {
    background: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 8px 28px rgba(217, 119, 6, 0.3);
    transform: translateY(-2px);
}

/* Full-width modifier */
.btn-full {
    width: 100%;
}

/* Arrow icon inside button — auto-animates on hover */
.btn-arrow {
    transition: transform 0.2s;
}
.btn:hover .btn-arrow {
    transform: translateX(3px);
}

/* -----------------------------------------
   5b. CARDS
   ----------------------------------------- */

/* Base card */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

/* Card with hover effects */
.card-hover {
    transition: var(--transition-std);
    transform: translateY(0);
}
.card-hover:hover {
    border-color: rgba(217, 119, 6, 0.3);
    box-shadow: 0 20px 40px rgba(217, 119, 6, 0.05), 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-4px);
}

/* Large-padding variant */
.card-lg {
    padding: var(--card-padding-lg);
}

/* Stat card: big number + label */
.card-stat {
    text-align: center;
}
.card-stat-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}
.card-stat-label {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.card-stat-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Feature card: icon + heading + body */
.card-feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    background: rgba(217, 119, 6, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.25rem;
    transition: transform 0.3s;
}
.card-hover:hover .card-feature-icon {
    transform: scale(1.1);
}
.card-feature-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}
.card-feature-body {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* -----------------------------------------
   5c. SECTION STRUCTURE
   ----------------------------------------- */

/* Pill badge above section headings */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: var(--section-badge-radius);
    background: rgba(217, 119, 6, 0.05);
    border: 1px solid rgba(217, 119, 6, 0.1);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

/* Badge live dot */
.section-badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* Dark-section variant of badge (for use on dark/premium sections) */
.section-badge-dark {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

/* Section main heading */
.section-heading {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
}
@media (min-width: 768px) {
    .section-heading {
        font-size: 2.75rem;
    }
}
@media (min-width: 1024px) {
    .section-heading {
        font-size: 3.25rem;
    }
}

/* Section subheading / description */
.section-subheading {
    color: var(--text-muted);
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.7;
    max-width: 40rem;
}
.section-subheading.centered {
    margin-left: auto;
    margin-right: auto;
}

/* Section header wrapper — centres badge + heading + sub */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-header.left {
    text-align: left;
}
.section-header .section-subheading {
    margin-top: 0;
}

/* -----------------------------------------
   5d. TRUST BADGES & INTEGRATION PILLS
   ----------------------------------------- */

/* Trust badge item */
.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: border-color 0.2s;
}
.trust-badge:hover {
    border-color: rgba(217, 119, 6, 0.2);
}
.trust-badge-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    background: rgba(217, 119, 6, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}
.trust-badge-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-main);
    line-height: 1.2;
}
.trust-badge-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Integration pill */
.integration-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    transition: var(--transition-fast);
}
.integration-pill:hover {
    border-color: rgba(217, 119, 6, 0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.integration-pill-label {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-main);
}

/* -----------------------------------------
   5e. SOCIAL PROOF STRIP
   ----------------------------------------- */
.proof-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    font-size: 0.875rem;
}
.proof-check {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #cbd5e1;
    font-weight: 500;
}
.proof-check svg {
    color: #4ade80;
    flex-shrink: 0;
}

/* =========================================
   6. Special Sections
   ========================================= */

/* -----------------------------------------
   5f. SECTION THEMES & LAYOUTS
   ----------------------------------------- */

/* Light Background Section */
.section-light {
    background-color: var(--bg-body);
    color: var(--text-muted);
}

/* Dark Background Section */
.section-dark {
    background-color: #020617 !important; /* Deepest slate */
    color: #94a3b8;
}

/* Alternate Section Background (adds subtle color variation on long light or dark pages) */
.section-alternate {
    background-color: rgba(248, 250, 252, 0.6) !important; /* Soft warm/gray tint on light mode */
    border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
}
.theme-dark .section-alternate {
    background-color: rgba(15, 23, 42, 0.3) !important; /* Soft slate/blue tint on dark mode */
    border-top: 1px solid rgba(51, 65, 85, 0.4) !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4) !important;
}

/* Section Borders */
.section-border-t {
    border-top: 1px solid var(--border-color) !important;
}
.section-border-b {
    border-bottom: 1px solid var(--border-color) !important;
}
.theme-dark .section-border-t {
    border-top: 1px solid rgba(51, 65, 85, 0.4) !important;
}
.theme-dark .section-border-b {
    border-bottom: 1px solid rgba(51, 65, 85, 0.4) !important;
}

/* Hero Background Glow */
.hero-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(217, 119, 6, 0.12) 0%, rgba(245, 158, 11, 0.05) 30%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    display: none;
}

.theme-dark .hero-glow {
    background: radial-gradient(circle at 50% 0%, rgba(217, 119, 6, 0.18) 0%, rgba(251, 191, 36, 0.06) 40%, transparent 80%);
}

@media (min-width: 768px) {
    .hero-glow {
        display: block;
    }
}

/* Premium Dark Section */
.bg-premium-dark-section {
    position: relative;
    background-color: #020617 !important;
    border: 1px solid rgba(217, 119, 6, 0.15) !important;
    overflow: hidden;
}
.bg-premium-dark-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 50% 0%, rgba(217, 119, 6, 0.22) 0%, rgba(180, 83, 9, 0.08) 35%, rgba(2, 6, 23, 0) 70%),
        radial-gradient(circle at 50% 100%, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.02) 50%, rgba(2, 6, 23, 0) 100%) !important;
    pointer-events: none;
    z-index: 0;
}

/* Premium Box Gradient */
.bg-premium-box-gradient {
    position: relative;
    background: linear-gradient(135deg, #0b1329 0%, #020617 100%) !important;
    border: 1px solid rgba(217, 119, 6, 0.25) !important;
    overflow: hidden;
}
.bg-premium-box-gradient::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.4), transparent) !important;
    z-index: 1;
}
.bg-premium-box-gradient::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(217, 119, 6, 0.16) 0%, transparent 60%),
                radial-gradient(circle at 100% 100%, rgba(245, 158, 11, 0.08) 0%, transparent 50%) !important;
    pointer-events: none;
    z-index: 0;
}

/* =========================================
   7. Animations (Typewriter — keep here as it's globally used)
   ========================================= */
@keyframes blink { 50% { opacity: 0; } }
.cursor::after {
    content: '|';
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    color: var(--primary);
}

/* =========================================
   8. Custom Input & Selection Components
   ========================================= */

/* Range Slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}
input[type=range]:focus {
    outline: none;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.4);
    margin-top: -6px;
    border: 2px solid white;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 4px;
}
.theme-dark input[type=range]::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.1);
}

/* Text selection */
.theme-light ::selection {
    background: #FEF3C7;
    color: #78350F;
}
.theme-dark ::selection {
    background: #D97706;
    color: #ffffff;
}

/* Form input */
.form-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}
.form-input::placeholder {
    color: var(--text-light);
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.375rem;
}

/* =========================================
   9. Gold Wave Hover Effect
   ========================================= */
@keyframes gold-wave-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hover-gold-wave {
    transition: color 0.3s ease, background-position 0.3s ease;
}
.group:hover .hover-gold-wave,
.hover-gold-wave:hover {
    background: linear-gradient(90deg, #78350F 0%, #D97706 25%, #FBBF24 50%, #D97706 75%, #78350F 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gold-wave-flow 2s linear infinite;
    display: inline-block;
}

/* =========================================
   10. Safari Mobile Performance Overrides
   ========================================= */
html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

@media (max-width: 639px) {
    #pain .absolute[class*="bg-[radial-gradient"] {
        display: none;
    }
    .sm\:-rotate-2 {
        transform: none !important;
    }
    [class*="blur-3xl"],
    [class*="blur-2xl"] {
        filter: none;
    }
    .transition-all {
        transition-duration: 150ms !important;
    }
}
