/* ==============================================
   KODIO — Premium Design System & Shared Styles
   ============================================== */

/* ── Design Tokens ─────────────────────────── */
:root {
    /* Color System */
    --bg-primary:       #FAF3E1;
    --bg-secondary:     #F5E7C6;
    --bg-tertiary:      #EDD9AB;
    --accent:           #FA8112;
    --accent-hover:     #E6730E;
    --accent-light:     rgba(250, 129, 18, 0.07);
    --accent-glow:      rgba(250, 129, 18, 0.15);
    --text-primary:     #222222;
    --text-secondary:   #5B5145;
    --text-tertiary:    #8A7E6F;
    --border:           #E4D4B2;
    --border-hover:     #D4BF93;
    --surface-card:     rgba(245, 231, 198, 0.5);
    --footer-bg:        #1A1A1A;
    --footer-text:      #FAF3E1;
    --footer-muted:     #A09484;
    --white:            #FFFFFF;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-regular:  400;
    --font-weight-medium:   500;
    --font-weight-semibold: 600;
    --font-weight-bold:     700;
    --font-weight-black:    800;

    /* Spacing — 4/8pt grid */
    --space-1:   4px;
    --space-2:   8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  24px;
    --space-6:  32px;
    --space-7:  48px;
    --space-8:  64px;
    --space-9:  80px;
    --space-10: 96px;
    --space-11: 120px;
    --space-12: 160px;

    /* Radius */
    --radius-xs:  4px;
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  14px;
    --radius-xl:  20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs:   0 1px  2px  rgba(34, 34, 34, 0.04);
    --shadow-sm:   0 2px  8px  rgba(34, 34, 34, 0.05);
    --shadow-md:   0 4px  16px rgba(34, 34, 34, 0.07);
    --shadow-lg:   0 8px  32px rgba(34, 34, 34, 0.09);
    --shadow-xl:   0 16px 48px rgba(34, 34, 34, 0.11);
    --shadow-glow: 0 0 60px rgba(250, 129, 18, 0.12);

    /* Easing & Duration */
    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast:    150ms;
    --dur-base:    300ms;
    --dur-slow:    500ms;
    --dur-slower:  800ms;
    --dur-slowest: 1200ms;
}


/* ── Reset & Base ──────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-regular);
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--dur-fast) ease;
}

ul { list-style: none; }

::selection {
    background-color: var(--accent);
    color: var(--white);
}


/* ── Typography ────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.15;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem);   margin-bottom: var(--space-5); }
h2 { font-size: clamp(2rem, 4vw, 3rem);      margin-bottom: var(--space-5); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: var(--space-3); }

p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.text-accent { color: var(--accent); }

.overline {
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
}


/* ── Container ─────────────────────────────── */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--space-5);
}

@media (min-width: 768px) {
    .container { padding: 0 var(--space-7); }
}


/* ── Buttons ───────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 13px 28px;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
    text-align: center;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition:
        background-color var(--dur-base) var(--ease-out),
        color var(--dur-base) var(--ease-out),
        transform var(--dur-base) var(--ease-spring),
        box-shadow var(--dur-base) var(--ease-out);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* Shine sweep on hover */
.btn::after {
    content: "";
    position: absolute;
    top: -60%;
    left: -75%;
    width: 50%;
    height: 220%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.22) 45%,
        rgba(255, 255, 255, 0.22) 55%,
        transparent 60%
    );
    transform: rotate(25deg);
    transition: left 0.7s var(--ease-out);
    pointer-events: none;
}

.btn:hover::after {
    left: 125%;
}

.btn-primary {
    background: linear-gradient(135deg, #FA8112 0%, #E6730E 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(250, 129, 18, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FF8E24 0%, #E6730E 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(250, 129, 18, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(250, 129, 18, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    box-shadow: none;
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background-color: var(--text-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 34, 34, 0.12);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-primary);
    padding: 13px 16px;
}

.btn-ghost:hover {
    color: var(--accent);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    letter-spacing: 0.01em;
}

.btn-sm {
    padding: 10px 22px;
    font-size: 0.875rem;
}


/* ── Navigation ────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(250, 243, 225, 0.45);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-bottom: 1px solid rgba(228, 212, 178, 0);
    transition:
        background-color var(--dur-slow) var(--ease-out),
        border-color var(--dur-slow) var(--ease-out),
        box-shadow var(--dur-slow) var(--ease-out);
}

.navbar.scrolled {
    background-color: rgba(250, 243, 225, 0.88);
    border-bottom-color: rgba(228, 212, 178, 0.6);
    box-shadow: 0 1px 12px rgba(34, 34, 34, 0.04), 0 0 0 1px rgba(228, 212, 178, 0.15);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    gap: var(--space-6);
    align-items: center;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    position: relative;
    transition: color var(--dur-fast) ease;
    padding: var(--space-1) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--accent);
    transition: width var(--dur-base) var(--ease-out);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--dur-base) var(--ease-out);
    transform-origin: center;
}

/* Mobile Navigation */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-7);
        transition: right var(--dur-slow) var(--ease-out);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu .nav-link {
        font-size: 1.5rem;
        font-weight: var(--font-weight-semibold);
    }

    .nav-cta-btn { display: none; }

    .hamburger { display: flex; }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}


/* ── Section Utilities ─────────────────────── */
.section {
    padding: var(--space-11) 0;
}

.section--alt {
    background-color: var(--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-9);
}

.section-header .overline {
    margin-bottom: var(--space-4);
    display: block;
}

.section-header p {
    font-size: 1.125rem;
    margin-top: var(--space-3);
}


/* ── Card Base ─────────────────────────────── */
.card {
    background-color: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-7);
    transition:
        transform var(--dur-base) var(--ease-spring),
        box-shadow var(--dur-base) var(--ease-out),
        border-color var(--dur-base) ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}


/* ── CTA Section (shared across pages) ───── */
.cta-section {
    padding: var(--space-12) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(250, 129, 18, 0.06), transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(250, 129, 18, 0.04), transparent 60%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: var(--font-weight-black);
    margin-bottom: var(--space-4);
}

.cta-content p {
    font-size: 1.125rem;
    max-width: 480px;
    margin: 0 auto var(--space-7);
}

.cta-note {
    margin-top: var(--space-4);
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}


/* ── Footer ────────────────────────────────── */
.footer {
    background-color: var(--footer-bg);
    padding: var(--space-9) 0 var(--space-6);
    color: var(--footer-text);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: var(--space-7);
    margin-bottom: var(--space-8);
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: var(--space-4);
}

.footer-tagline {
    font-size: 0.9375rem;
    color: var(--footer-muted);
    line-height: 1.6;
    max-width: 260px;
}

.footer-col h4 {
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--footer-muted);
    margin-bottom: var(--space-5);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-col a {
    font-size: 0.9375rem;
    color: var(--footer-text);
    opacity: 0.7;
    transition: opacity var(--dur-fast) ease, color var(--dur-fast) ease;
}

.footer-col a:hover {
    opacity: 1;
    color: var(--accent);
}

.social-icons {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: rgba(250, 243, 225, 0.06);
    color: var(--footer-text);
    opacity: 0.6;
    transition: all var(--dur-fast) ease;
}

.social-icons a:hover {
    opacity: 1;
    background-color: var(--accent);
    color: var(--white);
}

.social-icons a svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-6);
    border-top: 1px solid rgba(250, 243, 225, 0.08);
    font-size: 0.8125rem;
    color: var(--footer-muted);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-links {
    display: flex;
    gap: var(--space-5);
}

.footer-links a {
    color: var(--footer-muted);
    opacity: 1;
    transition: color var(--dur-fast) ease;
}

.footer-links a:hover {
    color: var(--footer-text);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}


/* ── Scroll Animations ─────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity var(--dur-slower) var(--ease-out),
        transform var(--dur-slower) var(--ease-out);
}

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

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms;   }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 500ms; }


/* ── Hero Entrance Keyframes ───────────────── */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-anim-1 { animation: heroFadeUp 0.9s var(--ease-out) 0.1s both; }
.hero-anim-2 { animation: heroFadeUp 0.9s var(--ease-out) 0.25s both; }
.hero-anim-3 { animation: heroFadeUp 0.9s var(--ease-out) 0.4s both; }
.hero-anim-4 { animation: heroFadeUp 0.9s var(--ease-out) 0.55s both; }
.hero-anim-5 { animation: heroFadeUp 0.9s var(--ease-out) 0.7s both; }


/* ── Page Hero (sub-pages) ─────────────────── */
.page-hero {
    padding: 160px 0 var(--space-9);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(250, 129, 18, 0.06), transparent 70%);
    pointer-events: none;
}

.page-hero h1 {
    font-weight: var(--font-weight-black);
    letter-spacing: -0.03em;
    position: relative;
}

.page-hero p {
    font-size: 1.1875rem;
    max-width: 560px;
    margin: 0 auto;
}


/* ── Reduced Motion ────────────────────────── */
@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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}


/* ── Global Responsive ─────────────────────── */
@media (max-width: 768px) {
    .section {
        padding: var(--space-9) 0;
    }

    .section-header {
        margin-bottom: var(--space-7);
    }

    .btn-lg {
        width: 100%;
        max-width: 320px;
    }
}