/* ============================================================
   BASE.CSS — Reset · Variabili · Tipografia
   Triticum Pizzachef
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');

/* ── Variabili CSS ────────────────────────────────────────── */
:root {
    /* Colori */
    --color-beige:       #c9b49c;
    --color-brown:       #392711;
    --color-beige-light: #e8d0ac;
    --color-brown-mid:   #baa373;
    --color-white:       #faf7f2;
    --color-text:        #2b1d0e;
    --color-text-muted:  #7a6350;

    /* Font */
    --font-display: 'Codec Pro', 'Georgia', serif;
    --font-body:    'Raleway', 'Helvetica Neue', sans-serif;

    /* Scala tipografica */
    --text-xs:   0.75rem;    /* 12px */
    --text-sm:   0.875rem;   /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-md:   1.125rem;   /* 18px */
    --text-lg:   1.25rem;    /* 20px */
    --text-xl:   1.5rem;     /* 24px */
    --text-2xl:  2rem;       /* 32px */
    --text-3xl:  2.75rem;    /* 44px */
    --text-4xl:  3.75rem;    /* 60px */
    --text-5xl:  5rem;       /* 80px */

    /* Spaziatura */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Layout */
    --container-max: 1200px;
    --container-pad: clamp(1.25rem, 5vw, 2.5rem);

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Ombre calde ton-matched */
    --shadow-sm:  0 1px 4px rgba(57, 39, 17, 0.06);
    --shadow-md:  0 4px 16px rgba(57, 39, 17, 0.08);
    --shadow-lg:  0 8px 32px rgba(57, 39, 17, 0.12);

    /* Transizioni */
    --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --duration-fast:   200ms;
    --duration-base:   300ms;
    --duration-slow:   500ms;
    --transition-base: var(--duration-base) var(--ease);

    /* Z-index */
    --z-below:   -1;
    --z-base:     0;
    --z-sticky:  100;
    --z-overlay: 200;
    --z-modal:   300;
}

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

button,
input,
textarea,
select {
    font: inherit;
    border: none;
    background: none;
    outline: none;
}

button {
    cursor: pointer;
}

/* ── Tipografia ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-brown);
    letter-spacing: -0.01em;
}

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

p {
    line-height: 1.75;
}

p + p {
    margin-top: var(--space-4);
}

strong {
    font-weight: 600;
}

em {
    font-style: italic;
    font-weight: 300;
}

small {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* ── Layout utility ───────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.section {
    padding-block: var(--space-20);
}

.section--large {
    padding-block: var(--space-32);
}

/* ── Visibilità accessibilità ─────────────────────────────── */
.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;
}

/* ── Scroll reveal (stato iniziale) ──────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity var(--duration-slow) var(--ease),
        transform var(--duration-slow) var(--ease);
}

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

.reveal--delay-1 { transition-delay: 100ms; }
.reveal--delay-2 { transition-delay: 200ms; }
.reveal--delay-3 { transition-delay: 300ms; }

/* ── Responsive fluid type ────────────────────────────────── */
@media (max-width: 768px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl);  }

    .section       { padding-block: var(--space-16); }
    .section--large { padding-block: var(--space-20); }
}

@media (max-width: 480px) {
    h1 { font-size: var(--text-2xl); }
    h2 { font-size: var(--text-xl);  }
}
