/**
 * SiteCare Design System
 * Shared between sitecare.cz and app.sitecare.cz
 * Edit here — copy to both projects for deployment.
 */

/* Self-hosted fonts */
@font-face {
    font-family: 'Sora';
    src: url('../fonts/sora-400.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Mono';
    src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Mono';
    src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Mono';
    src: url('../fonts/ibm-plex-mono-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* =============================================
   TOKENS
   ============================================= */
:root {
    --h: 247;
    /* Base Hue: indigo */

    /* Surface */
    --bg: hsl(247, 20%, 99%);
    --bg-subtle: hsl(247, 18%, 97%);
    --bg-card: hsl(0, 0%, 100%);
    --bg-card-hover: hsl(247, 15%, 96%);

    /* Primary — ~#6554E8, contrast 5.1:1 on white */
    --primary: hsl(247, 72%, 58%);
    --primary-hover: hsl(247, 72%, 51%);
    --primary-light: hsl(247, 90%, 95%);
    --primary-dim: hsl(247, 100%, 98%);

    /* Neutrals */
    --text: hsl(247, 25%, 11%);
    --text-secondary: hsl(247, 12%, 30%);
    --text-muted: hsl(247, 8%, 52%);
    --border: hsl(247, 18%, 90%);
    --border-hover: hsl(247, 18%, 82%);

    /* Semantic */
    --success: hsl(152, 72%, 32%);
    --success-muted: hsla(152, 72%, 32%, 0.09);
    --danger: hsl(4, 82%, 50%);
    --danger-muted: hsla(4, 82%, 50%, 0.08);
    --info: hsl(210, 80%, 52%);
    --info-muted: hsla(210, 80%, 52%, 0.09);

    /* Text flavors */
    --white: hsl(0, 0%, 100%);
    --slate-50: hsl(210, 40%, 96%);

    /* Dark theme (Legal/Error) */
    --bg-dark: hsl(222, 47%, 11%);
    --bg-dark-light: hsl(222, 47%, 15%);

    /* Spacing */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 20px;
    --s-6: 24px;
    --s-8: 32px;
    --s-10: 40px;
    --s-12: 48px;
    --s-16: 64px;
    --s-20: 80px;
    --s-24: 96px;

    /* Border Radius */
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 20px;
    --r-2xl: 32px;
    --r-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.09), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 0 0 1px var(--primary);
    --glow-primary: 0 0 0 3px hsla(247, 72%, 58%, 0.2), 0 8px 24px hsla(247, 72%, 58%, 0.14);

    /* Layout */
    --container: 1280px;
    --section-py: var(--s-24);
    --section-py-sm: var(--s-16);

    /* Legacy aliases */
    --accent: var(--primary);
    --accent-hover: var(--primary-hover);
    --accent-glow: hsla(247, 72%, 58%, 0.2);
    --purple: var(--primary);
    --purple-light: var(--primary-hover);
    --purple-dim: var(--primary-dim);
    --blue: var(--info);
    --green: var(--success);
    --green-muted: var(--success-muted);
    --red: var(--danger);
    --red-muted: var(--danger-muted);
    --amber: hsl(36, 88%, 46%);
    --r: var(--r-lg);
}

/* =============================================
   RESET & BASE
   ============================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    transition: color 0.3s ease, opacity 0.3s ease;
    text-decoration: none;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--s-8);
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1,
h2,
h3,
h4,
.t-title,
.nav-brand {
    font-family: 'Sora', sans-serif;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin-bottom: var(--s-4);
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

p {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 1.05rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), hsl(247, 80%, 78%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.accent-word {
    color: var(--primary);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    border-radius: var(--r-lg);
    padding: 14px 28px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary);
    color: hsl(0, 0%, 100%);
    box-shadow: 0 4px 12px hsla(247, 72%, 58%, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.btn-ghost {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--primary);
    background: var(--bg-subtle);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-lg {
    padding: var(--s-4) var(--s-8);
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* =============================================
   CHIPS
   ============================================= */
.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    border: 1px solid hsla(247, 72%, 58%, 0.15);
    background: var(--primary-dim);
    border-radius: var(--r-full);
    padding: 6px 14px;
    margin-bottom: var(--s-5);
    align-self: flex-start;
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.chip:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.chip i {
    width: 14px;
    height: 14px;
}

.chip-blue {
    color: var(--info);
    border-color: var(--info-muted);
    background: var(--info-muted);
}

.chip-green {
    color: var(--success);
    border-color: var(--success-muted);
    background: var(--success-muted);
}

.chip-purple {
    color: var(--primary);
    border-color: hsla(247, 72%, 58%, 0.15);
    background: var(--primary-dim);
}

/* =============================================
   NAVIGATION — shared base
   ============================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--s-5) 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-scrolled {
    padding: var(--s-3) 0;
    background: hsla(0, 0%, 100%, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: var(--s-2);
    color: var(--text);
    text-decoration: none;
}

.nav-brand i,
.nav-brand svg {
    color: var(--primary);
    width: 28px;
    height: 28px;
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
    padding: var(--section-py) 0;
}

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

.section-header {
    max-width: 680px;
    margin: 0 auto var(--s-12);
    text-align: center;
}

.section-header p {
    margin-top: var(--s-4);
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* =============================================
   HERO EYEBROW & SUB
   ============================================= */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-dim);
    border: 1px solid hsla(247, 72%, 58%, 0.22);
    border-radius: var(--r-full);
    padding: 6px 16px;
    margin-bottom: var(--s-8);
}

.hero-eyebrow i {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.hero-sub {
    max-width: 500px;
    margin: 0 auto var(--s-12);
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

/* =============================================
   SCROLL INDICATOR
   ============================================= */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--border);
    border-radius: var(--r-full);
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: var(--r-full);
    position: absolute;
    top: 8px;
    left: 50%;
    margin-left: -2px;
    animation: scroll-wheel 2s infinite;
}

@keyframes scroll-wheel {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        transform: translateY(12px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 0;
    }
}

/* =============================================
   BACK TO TOP
   ============================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary);
    color: hsl(0, 0%, 100%);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.back-to-top i {
    width: 20px;
    height: 20px;
}

/* =============================================
   REVEAL ANIMATIONS
   ============================================= */
.reveal-up {
    opacity: 0;
    transform: translateY(30px) scale(0.99);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

.stagger-5 {
    transition-delay: 0.5s;
}

.stagger-6 {
    transition-delay: 0.6s;
}

.stagger-7 {
    transition-delay: 0.7s;
}

.stagger-8 {
    transition-delay: 1.0s;
}

.stagger-9 {
    transition-delay: 1.2s;
}

.stagger-10 {
    transition-delay: 1.4s;
}

@media (max-width: 768px) {

    .reveal-left,
    .reveal-right {
        transform: translateY(40px);
    }

    .container {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
}

/* =============================================
   EMBLA CAROUSEL CONTROLS
   ============================================= */
.embla__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
    padding: 0 20px;
}

.embla__buttons {
    display: flex;
    gap: 12px;
}

.embla__button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.embla__button:hover:not(:disabled) {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px hsla(247, 72%, 58%, 0.15);
}

.embla__button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.embla__button svg {
    width: 20px;
    height: 20px;
}