/*
Theme Name: Officine Serena
Theme URI: https://officineserena.it
Author: NIITA STUDIO
Author URI: https://niita.studio
Description: Tema personalizzato per Officine Serena — Ingegneria meccanica dal 1807.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: officine-serena
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --color-beige:       #EDEBDF;
  --color-beige-rgb:   237, 235, 223; /* componenti RGB — usare in rgba(var(--color-beige-rgb), X) */
  --color-yellow:      #EFDF80;
  --color-green:       #24483A;
  --color-brown:       #312E29;
  --color-light-green:     #B1C1A7;
  --color-light-green-rgb: 177, 193, 167; /* componenti RGB — usare in rgba(var(--color-light-green-rgb), X) */
  --color-mid-green:       #759870;        /* bordo inferiore card certificazioni */
  --color-black:           #000000;
  --color-white:       #FFFFFF;
  --color-gray-light:  #C4C4C4;

  /* Typography — Family */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Typography — Sizes */
  --text-supertitle: 1.3125rem;  /* 21px */
  --text-title-big:  4.5rem;     /* 72px */
  --text-title-mid:  3rem;       /* 48px */
  --text-body-big:   1.125rem;   /* 18px */
  --text-body-mid:   1rem;       /* 16px */
  --text-body-small: 0.875rem;   /* 14px */

  /* Typography — Line heights */
  --leading-tight:   1.1;
  --leading-normal:  1.2;

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

  /* Layout */
  --container-max:   1920px;
  --container-pad:       3.125rem;   /* 50px  — padding standard (configurabile da Site Options) */
  --container-pad-large: 3.125rem;   /* 50px  — padding ampio per sezioni che richiedono rientro maggiore */
  --radius:          12px;
  --btn-radius:      100px;
  --section-spacing: 5rem;       /* 80px */

  /* Navigation */
  --nav-height: 78px;  /* padding-top 20 + contenuto ~42 + padding-bottom 16 */
}

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

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

body {
  position: relative; /* Rende body il containing block per .site-brand (position:absolute) */
  background-color: var(--color-beige);
  color: var(--color-black);
  font-family: var(--font-body);
  font-size: var(--text-body-big);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.font-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
}

.supertitle {
  font-family: var(--font-body);
  font-size: var(--text-supertitle);
  font-weight: 600;
  line-height: var(--leading-normal);
  letter-spacing: 0;
}

.title-big {
  font-size: clamp(2.5rem, 5vw, var(--text-title-big));
  letter-spacing: -0.03em;
}

.title-mid {
  font-size: clamp(1.75rem, 3vw, var(--text-title-mid));
}

.body-big {
  font-size: var(--text-body-big);
  line-height: var(--leading-normal);
}

.body-mid {
  font-family: var(--font-body);
  font-size: var(--text-body-mid);
  font-weight: 500;
  line-height: var(--leading-normal);
}

.body-small {
  font-family: var(--font-body);
  font-size: var(--text-body-small);
  font-weight: 500;
  line-height: var(--leading-normal);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: var(--section-spacing) 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--btn-radius);
  font-family: var(--font-body);
  font-size: var(--text-body-mid);
  font-weight: 400;
  line-height: var(--leading-normal);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-black);
  color: var(--color-white);
  border: 1px solid var(--color-black);
}

.btn-primary:hover {
  background-color: var(--color-green);
  border-color: var(--color-green);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-black);
  border: 1px solid var(--color-black);
}

.btn-outline:hover {
  background-color: var(--color-black);
  color: var(--color-white);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-white);
}

.btn-outline-white:hover {
  background-color: var(--color-white);
  color: var(--color-black);
}

/* ============================================================
   CARDS
   ============================================================ */
.card-image {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 400 / 540;
  background-color: var(--color-gray-light);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-image:hover img {
  transform: scale(1.03);
}

/* ============================================================
   DIVIDERS
   ============================================================ */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--color-brown);
  opacity: 0.3;
}

/* ============================================================
   SKIP LINK (accessibility)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 0.5rem 1rem;
  background: var(--color-green);
  color: var(--color-white);
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   SCREEN READER ONLY
   ============================================================ */
.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;
}
