/* ============================================
   KLAIO DESIGN SYSTEM — Shared Styles
   Version: 2.0 · April 2026
   ============================================ */

:root {
    --white: #ffffff;
    --off-white: #fafbfd;
    --gray-50: #f8fafc;
    --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;
    --black: #020617;

    --klaio-primary: #6d28d9;
    --klaio-primary-light: #8b5cf6;
    --klaio-primary-soft: #ede9fe;
    --klaio-accent: #2dd4bf;
    --klaio-accent-soft: #ccfbf1;
    --klaio-warm: #f59e0b;
    --klaio-warm-soft: #fef3c7;
    --klaio-blue: #3b82f6;
    --klaio-blue-soft: #dbeafe;
    --klaio-rose: #f43f5e;
    --klaio-rose-soft: #ffe4e6;

    --gradient-hero: linear-gradient(160deg, #fafbfd 0%, #ede9fe 40%, #f0fdfa 70%, #fafbfd 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
    --gradient-cta: linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #8b5cf6 100%);
    --gradient-dark: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(109,40,217,0.06) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 20%, rgba(45,212,191,0.06) 0%, transparent 50%),
                    radial-gradient(ellipse at 50% 80%, rgba(245,158,11,0.04) 0%, transparent 50%);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

    --section-padding: clamp(80px, 10vw, 140px);
    --container-max: 1200px;
    --container-narrow: 800px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 200ms;
    --duration-normal: 400ms;
    --duration-slow: 800ms;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
}

/* ---- RESET ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-sans); font-size: 16px; line-height: 1.7; color: var(--gray-700); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5,h6 { font-weight: 600; line-height: 1.2; color: var(--gray-900); }

/* ---- TYPOGRAPHY ---- */
.heading-display { font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.heading-section { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.heading-card { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; letter-spacing: -0.01em; }
.text-large { font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.7; color: var(--gray-500); }
.text-body { font-size: 1rem; line-height: 1.7; color: var(--gray-600); }
.text-small { font-size: 0.875rem; line-height: 1.6; color: var(--gray-500); }
.serif-italic { font-family: var(--font-serif); font-style: italic; }
.text-gradient { background: linear-gradient(135deg, var(--klaio-primary) 0%, var(--klaio-primary-light) 60%, var(--klaio-accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.eyebrow { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--klaio-primary); margin-bottom: 20px; }

/* ---- LAYOUT ---- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding: var(--section-padding) 0; position: relative; }

/* ---- NAVIGATION ---- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 0 clamp(20px, 4vw, 40px); transition: all var(--duration-normal) var(--ease-out); }
.nav--scrolled { background: rgba(255,255,255,0.85); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid rgba(0,0,0,0.06); }
.nav__inner { max-width: var(--container-max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.04em; color: var(--gray-900); }
.nav__logo-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--gradient-cta); display: flex; align-items: center; justify-content: center; color: white; font-size: 0.875rem; font-weight: 700; }
.nav__links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav__link { font-size: 0.9rem; font-weight: 500; color: var(--gray-600); transition: color var(--duration-fast) ease; position: relative; }
.nav__link:hover { color: var(--gray-900); }
.nav__link--active { color: var(--gray-900); }
.nav__link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--klaio-primary); border-radius: 1px; transition: width var(--duration-normal) var(--ease-out); }
.nav__link:hover::after { width: 100%; }
.nav__cta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; background: var(--gray-900); color: var(--white); font-size: 0.875rem; font-weight: 500; border-radius: var(--radius-full); transition: all var(--duration-normal) var(--ease-out); border: none; cursor: pointer; }
.nav__cta:hover { background: var(--klaio-primary); transform: translateY(-1px); box-shadow: 0 8px 30px rgba(109,40,217,0.25); }
.nav__mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--gray-700); margin: 5px 0; border-radius: 1px; transition: all var(--duration-fast) ease; }

/* ---- BUTTONS ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-weight: 500; border: none; cursor: pointer; transition: all var(--duration-normal) var(--ease-out); text-decoration: none; }
.btn--primary { padding: 16px 36px; background: var(--gradient-cta); color: var(--white); font-size: 1rem; border-radius: var(--radius-full); box-shadow: 0 4px 20px rgba(109,40,217,0.3); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(109,40,217,0.4); }
.btn--secondary { padding: 16px 36px; background: var(--white); color: var(--gray-700); font-size: 1rem; border-radius: var(--radius-full); border: 1px solid var(--gray-200); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.btn--secondary:hover { background: var(--gray-50); border-color: var(--gray-300); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.btn--small { padding: 10px 24px; font-size: 0.875rem; }
.btn--dark { padding: 16px 36px; background: var(--white); color: var(--gray-900); font-size: 1rem; border-radius: var(--radius-full); border: none; }
.btn--dark:hover { background: var(--gray-100); transform: translateY(-1px); }
.btn__arrow { transition: transform var(--duration-fast) ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn-group { display: flex; align-items: center; gap: 16px; }

/* ---- PAGE HERO (inner pages) ---- */
.page-hero { padding: 180px 0 100px; background: var(--gradient-hero); position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: var(--gradient-mesh); }
.page-hero__content { position: relative; z-index: 2; max-width: 780px; }
.page-hero__title { margin-bottom: 24px; }

/* ---- FOOTER ---- */
.footer { padding: 60px 0 40px; background: var(--gray-900); color: var(--gray-400); }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; margin-bottom: 60px; }
.footer__brand-text { font-size: 0.875rem; line-height: 1.7; color: var(--gray-500); margin-top: 16px; max-width: 280px; }
.footer__logo { font-size: 1.5rem; font-weight: 700; color: var(--white); letter-spacing: -0.04em; }
.footer__heading { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-400); margin-bottom: 20px; }
.footer__links { list-style: none; }
.footer__link { display: block; padding: 6px 0; font-size: 0.875rem; color: var(--gray-500); transition: color var(--duration-fast) ease; }
.footer__link:hover { color: var(--white); }
.footer__bottom { padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: space-between; font-size: 0.8125rem; color: var(--gray-500); }
.footer__legal-links { display: flex; gap: 24px; }
.footer__legal-links a { color: var(--gray-500); transition: color var(--duration-fast) ease; }
.footer__legal-links a:hover { color: var(--gray-300); }

/* ---- SCROLL REVEAL ---- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s var(--ease-out); }
.reveal--visible { opacity: 1; transform: translateY(0); }
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

/* ---- CARDS (reusable) ---- */
.card { padding: 40px 36px; background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-lg); transition: all var(--duration-normal) var(--ease-out); }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.05); border-color: var(--klaio-primary-soft); }
.card__icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.card__title { font-size: 1.25rem; font-weight: 600; color: var(--gray-900); margin-bottom: 10px; }
.card__text { font-size: 0.9375rem; color: var(--gray-500); line-height: 1.7; }

/* ---- DARK SECTION ---- */
.section--dark { background: var(--gradient-dark); color: var(--white); position: relative; overflow: hidden; }
.section--dark::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(109,40,217,0.15) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(45,212,191,0.1) 0%, transparent 50%); }
.section--dark .container { position: relative; z-index: 2; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .text-large { color: var(--gray-400); }
.section--dark .eyebrow { color: var(--klaio-accent); }

/* ---- GLASS CARD (dark bg) ---- */
.glass-card { padding: 36px 28px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-lg); backdrop-filter: blur(10px); transition: all var(--duration-normal) var(--ease-out); }
.glass-card:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.15); transform: translateY(-4px); }
.glass-card__icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(109,40,217,0.2); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.glass-card__title { font-size: 1.125rem; font-weight: 600; color: var(--white); margin-bottom: 10px; }
.glass-card__text { font-size: 0.875rem; color: var(--gray-400); line-height: 1.7; }

/* ---- TAGS ---- */
.tag { display: inline-flex; padding: 6px 14px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 500; }
.tag--primary { background: var(--klaio-primary-soft); color: var(--klaio-primary); }
.tag--accent { background: var(--klaio-accent-soft); color: #0d9488; }
.tag--warm { background: var(--klaio-warm-soft); color: #d97706; }
.tag--muted { background: var(--gray-100); color: var(--gray-500); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .footer__inner { grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
}
@media (max-width: 768px) {
    .nav__links { display: none; }
    .nav__mobile-toggle { display: block; }
    .footer__inner { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer__bottom { flex-direction: column; gap: 16px; text-align: center; }
    .btn-group { flex-direction: column; width: 100%; }
    .btn-group .btn { width: 100%; justify-content: center; }
    .page-hero { padding: 140px 0 80px; }
}
@media (max-width: 480px) {
    .footer__inner { grid-template-columns: 1fr; }
}
