/* ==================================================
   IVANIAGENCY — SITO UFFICIALE
   style.css — Design tokens, reset, tipografia, layout
   ================================================== */

:root {
  /* --- PALETTE --- */
  --color-navy: #0A192F;
  --color-navy-soft: #112240;
  --color-navy-softer: #1B2D4F;
  --color-orange: #FF6800;
  --color-orange-soft: rgba(255, 104, 0, 0.14);
  --color-gold: #FFC107;
  --color-white: #FFFFFF;
  --color-gray-light: #F4F4F4;
  --color-gray-dark: #1E1E1E;
  --color-muted-on-navy: #8B9BB8;
  --color-muted: #5B6472;
  --color-border-on-navy: rgba(139, 155, 184, 0.18);
  --color-border: #E4E4E4;

  /* --- TIPOGRAFIA --- */
  --font-heading: 'Fraunces', 'Iowan Old Style', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-hero: clamp(2.6rem, 4vw + 1.4rem, 5rem);
  --fs-h1: clamp(2rem, 2.6vw + 1rem, 3.1rem);
  --fs-h2: clamp(1.7rem, 1.6vw + 1rem, 2.5rem);
  --fs-h3: clamp(1.15rem, 0.7vw + 1rem, 1.4rem);
  --fs-body-lg: clamp(1.05rem, 0.3vw + 1rem, 1.2rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-caption: 0.75rem;

  --lh-tight: 1.1;
  --lh-heading: 1.26;
  --lh-body: 1.7;

  /* --- SPACING --- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1.25rem;
  --space-md: 2rem;
  --space-lg: 3.5rem;
  --space-xl: 6rem;
  --space-2xl: 9rem;

  --container-max: 1240px;
  --container-narrow: 720px;

  /* --- FORME / OMBRE / TRANSIZIONI --- */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --border-hairline: 1px solid var(--color-border);

  --shadow-sm: 0 2px 8px rgba(10, 25, 47, 0.06);
  --shadow-md: 0 18px 44px -18px rgba(10, 25, 47, 0.35);
  --shadow-lg: 0 34px 80px -28px rgba(10, 25, 47, 0.5);
  --glow-orange: 0 0 0 0 rgba(255, 104, 0, 0);
  --glow-orange-active: 0 8px 28px -6px rgba(255, 104, 0, 0.45);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 180ms;
  --t-med: 380ms;
  --t-slow: 750ms;
}

/* --------------------------------------------------
   RESET
   -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-gray-dark);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------
   TIPOGRAFIA
   -------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: var(--lh-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-h3); font-weight: 600; }

.on-navy h1, .on-navy h2, .on-navy h3, .on-navy h4 { color: var(--color-white); }

.text-lead { font-size: var(--fs-body-lg); color: var(--color-muted); line-height: var(--lh-body); max-width: 50ch; }
.on-navy .text-lead { color: var(--color-muted-on-navy); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  font-family: var(--font-body); font-size: var(--fs-caption); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-navy);
}
.eyebrow::before { content: ''; display: inline-block; width: 24px; height: 2px; background: var(--color-orange); }
.on-navy .eyebrow { color: var(--color-white); }

.accent { color: var(--color-orange); }

/* --------------------------------------------------
   LAYOUT
   -------------------------------------------------- */
.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--space-sm); }
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-xl); position: relative; }
.section--tight { padding-block: var(--space-lg); }
.section--navy { background: var(--color-navy); }
.section--gray { background: var(--color-gray-light); }

.section-head { max-width: 640px; margin-bottom: var(--space-lg); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

/* --------------------------------------------------
   BOTTONI
   -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  padding: 0.95rem 2rem; font-size: var(--fs-small); font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase; border-radius: var(--radius-sm);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease);
  white-space: nowrap; position: relative;
}
.btn-primary {
  background: var(--color-orange); color: var(--color-white);
  box-shadow: var(--glow-orange);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--glow-orange-active); filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--color-navy); border: 1.5px solid var(--color-navy); }
.btn-ghost:hover { background: var(--color-navy); color: var(--color-white); }
.on-navy .btn-ghost { color: var(--color-white); border-color: var(--color-border-on-navy); }
.on-navy .btn-ghost:hover { background: var(--color-white); color: var(--color-navy); border-color: var(--color-white); }
.btn-outline-orange { background: transparent; color: var(--color-orange); border: 1.5px solid var(--color-orange); }
.btn-outline-orange:hover { background: var(--color-orange); color: var(--color-white); }

.link-underline {
  position: relative; font-weight: 600; font-size: var(--fs-small); color: var(--color-navy);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.on-navy .link-underline { color: var(--color-white); }
.link-underline::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1.5px;
  background: var(--color-orange); transition: right var(--t-med) var(--ease);
}
.link-underline:hover::after { right: 0; }
.link-underline svg { width: 15px; height: 15px; transition: transform var(--t-fast) var(--ease); }
.link-underline:hover svg { transform: translateX(4px); }

/* --------------------------------------------------
   IMMAGINE PLACEHOLDER
   -------------------------------------------------- */
.img-placeholder {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, var(--color-navy) 0%, var(--color-navy-soft) 55%, var(--color-navy-softer) 100%);
  display: flex; align-items: flex-end; padding: var(--space-sm);
  border-radius: var(--radius-md); overflow: hidden;
}
.img-placeholder::before {
  content: ''; position: absolute; inset: 0; opacity: 0.55;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 26px);
}
.img-placeholder::after {
  content: ''; position: absolute; top: 0; right: 0; width: 46px; height: 3px; background: var(--color-orange);
}
.img-placeholder span { position: relative; font-size: var(--fs-caption); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted-on-navy); font-weight: 600; }
.img-placeholder--light { background: linear-gradient(150deg, #EDEFF3 0%, #E2E6ED 100%); }
.img-placeholder--light span { color: var(--color-muted); }
.img-placeholder--light::after { background: var(--color-orange); }

/* --------------------------------------------------
   UTILITY
   -------------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link {
  position: absolute; left: var(--space-sm); top: -60px; background: var(--color-orange); color: var(--color-white);
  padding: 0.75rem 1.25rem; border-radius: var(--radius-sm); z-index: 300; transition: top var(--t-fast) var(--ease); font-weight: 600;
}
.skip-link:focus { top: var(--space-sm); }
.demo-flag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  color: var(--color-navy); background: var(--color-gold); padding: 0.28rem 0.6rem 0.28rem 0.5rem;
  border-radius: 999px;
}
.demo-flag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--color-navy); }
