/* ═══════════════════════════════════════════════
   WorkSiteCRM — Design Tokens
   ═══════════════════════════════════════════════ */

:root {
    /* Brand colors */
    --color-primary:    #1B2A4A; /* Deep Navy */
    --color-secondary:  #E8913A; /* Amber */
    --color-accent:     #E8913A;
    --color-accent-blue:       #5C91FF;
    --color-accent-blue-light: #6AA7FF;
    --color-text:       #111827;
    --color-text-muted: #6B7280;
    --color-bg:         #FFFFFF;
    --color-bg-alt:     #F9FAFB;
    --color-bg-dark:    #0F1729;
    --color-border:     #E5E7EB;
    --color-success:    #16A34A;
    --color-error:      #DC2626;

    /* Typography */
    --font-heading: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', 'Courier New', monospace;

    /* Scale tipografica (base body: 18px — best practice SaaS landing) */
    --text-xs:   0.75rem;   /* 12px — captions, eyebrow */
    --text-sm:   0.875rem;  /* 14px — UI secondaria */
    --text-base: 1.125rem;  /* 18px — body principale */
    --text-lg:   1.25rem;   /* 20px — lead paragraph */
    --text-xl:   1.375rem;  /* 22px — h4 */
    --text-2xl:  1.625rem;  /* 26px — h3 */
    --text-3xl:  2rem;      /* 32px */
    --text-4xl:  2.5rem;    /* 40px — h2 */
    --text-5xl:  3.25rem;   /* 52px */
    --text-6xl:  4rem;      /* 64px — h1 hero */

    /* Line-height tokens */
    --lh-tight:   1.15;
    --lh-snug:    1.35;
    --lh-normal:  1.6;
    --lh-relaxed: 1.75;
    --lh-prose:   1.8;

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  1.5rem;
    --space-lg:  2rem;
    --space-xl:  3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --container-pad: 1.5rem;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Easing tokens — usa questi, non cubic-bezier ad hoc */
    --ease-out-expo:  cubic-bezier(0.22, 1, 0.36, 1);   /* entering  */
    --ease-in-quint:  cubic-bezier(0.64, 0, 0.78, 0);   /* exiting   */
    --ease-standard:  cubic-bezier(0.4, 0, 0.2, 1);     /* standard  */

    /* Transizioni */
    --transition-fast: 150ms var(--ease-standard);
    --transition-base: 250ms var(--ease-out-expo);
    --transition-slow: 400ms var(--ease-out-expo);

    /* Ombra */
    --shadow-sm: 0 1px 3px rgba(15, 23, 41, 0.08);
    --shadow-md: 0 4px 16px rgba(15, 23, 41, 0.1);
    --shadow-lg: 0 12px 40px rgba(15, 23, 41, 0.15);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* Focus ring globale — WCAG focus-visible */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
    border-radius: 4px;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: var(--lh-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

p {
    max-width: 70ch;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: var(--lh-tight);
    letter-spacing: -0.02em;
    color: var(--color-primary);
    font-weight: 700;
}

h2, h3, h4 {
    line-height: var(--lh-snug);
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-sm);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

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

code, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
