/* ============================================
   TOKENS  —  Apple-style design system
   ============================================ */
:root {
  /* Backgrounds */
  --black: #000000;
  --white: #ffffff;
  --gray: #f5f5f7;          /* Apple signature light gray */

  /* Text on light */
  --ink: #1d1d1f;           /* near-black */
  --ink-soft: #6e6e73;      /* secondary gray */

  /* Text on dark */
  --snow: #f5f5f7;
  --snow-soft: #86868b;

  /* Accent */
  --blue: #0071e3;          /* Apple button blue (light) */
  --blue-hover: #0077ed;
  --blue-link: #0066cc;     /* link blue on light */
  --blue-bright: #2997ff;   /* link/accent on dark */
  --logo-blue: #1e86e0;     /* brand mark */

  --border-light: #d2d2d7;
  --border-dark: rgba(255,255,255,0.14);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display',
          'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --content: 980px;
  --wide: 1180px;
  --edge: clamp(22px, 5vw, 48px);
  --radius: 18px;
  --nav-h: 52px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -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 {
  background: var(--black);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--edge);
  width: 100%;
}
.container--narrow { max-width: 720px; }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav-inner {
  max-width: var(--wide);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}
.nav-brand:hover { opacity: 0.7; }

.brand-logo {
  height: 26px;
  width: auto;
  display: block;
  fill: var(--logo-blue);
}

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 34px);
  font-size: 0.82rem;
  font-weight: 400;
}

.nav-links a {
  transition: color 0.4s ease, opacity 0.2s ease;
  opacity: 0.85;
}
.nav-links a:hover { opacity: 1; }

/* Nav theme: over dark hero (top of page) */
.nav[data-theme="dark"] {
  color: var(--snow);
}
.nav[data-theme="dark"] .nav-brand,
.nav[data-theme="dark"] .nav-links a { color: var(--snow); }

/* Nav theme: scrolled -> translucent light bar (apple.com) */
.nav.scrolled {
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: rgba(0,0,0,0.1);
  color: var(--ink);
}
.nav.scrolled .nav-brand,
.nav.scrolled .nav-links a { color: var(--ink); }
.nav.scrolled .nav-toggle span { background: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--snow);
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.4s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ============================================
   HERO  (full-bleed black, typographic)
   ============================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) var(--edge) 80px;
  color: var(--snow);
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(41,151,255,0.16), transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 120%, rgba(41,151,255,0.10), transparent 60%),
    var(--black);
}

.hero-inner { max-width: 860px; }

.hero-eyebrow {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 500;
  color: var(--blue-bright);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 12ch;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 0.12em;
  margin-bottom: 34px;
  background: linear-gradient(180deg, #ffffff 40%, #c7c7cc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--snow-soft);
  max-width: 620px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 26px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Scroll hint */
.hero-scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  opacity: 0.55;
  transition: opacity 0.25s ease;
}
.hero-scroll:hover { opacity: 1; }
.hero-scroll-arrow {
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--snow);
  border-bottom: 1.5px solid var(--snow);
  transform: rotate(45deg);
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: rotate(45deg) translate(0,0); }
  50%      { transform: rotate(45deg) translate(3px,3px); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  padding: 13px 26px;
  border-radius: 980px;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--blue-hover);
  transform: scale(1.02);
}

.btn-link {
  color: var(--blue-bright);
  padding: 6px 2px;
}
.btn-link .chev {
  transition: transform 0.2s ease;
  font-weight: 400;
}
.btn-link:hover .chev,
.btn-link:focus-visible .chev { transform: translateX(3px); }

/* On light sections the text link uses the darker blue */
.section--light .btn-link,
.section--gray  .btn-link { color: var(--blue-link); }

/* ============================================
   SECTIONS  (shared)
   ============================================ */
.section {
  padding: clamp(80px, 12vw, 140px) 0;
}
.section--light { background: var(--white); color: var(--ink); }
.section--gray  { background: var(--gray);  color: var(--ink); }
.section--dark  { background: var(--black); color: var(--snow); }

.eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-link);
  letter-spacing: 0;
  margin-bottom: 10px;
}
.eyebrow--center { text-align: center; }
.section--dark .eyebrow { color: var(--blue-bright); }

.section-title {
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-title--center { text-align: center; }

.section-sub {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 400;
  color: var(--ink-soft);
  text-align: center;
  max-width: 640px;
  margin: 14px auto 0;
  line-height: 1.4;
}
.section--dark .section-sub { color: var(--snow-soft); }

/* ============================================
   CHI SONO
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
  margin-top: 56px;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}
.about-caption {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

.about-body p {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 22px;
}
.about-body p:first-child { color: var(--ink); }
.about-body p:last-child { margin-bottom: 0; }

/* ============================================
   ESPERIENZA  (timeline)
   ============================================ */
.timeline {
  list-style: none;
  max-width: 720px;
  margin: 60px auto 0;
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border-light);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 22px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 26px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--blue);
}

.timeline-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(0,0,0,0.05);
  padding: 4px 11px;
  border-radius: 980px;
  margin-bottom: 12px;
}
.timeline-tag.current {
  color: #fff;
  background: var(--blue);
}

.timeline-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}
.timeline-card h3 {
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}
.timeline-org {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--blue-link);
  margin-bottom: 12px;
}
.timeline-desc {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ============================================
   CERTIFICAZIONI  (dark cards)
   ============================================ */
.cert-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 56px;
}
.cert-card a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 26px;
  border-radius: var(--radius);
  background: #161617;
  border: 1px solid var(--border-dark);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.cert-card a:hover,
.cert-card a:focus-visible {
  transform: translateY(-4px);
  background: #1d1d1f;
  border-color: rgba(255,255,255,0.28);
}
.cert-date {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue-bright);
}
.cert-card h3 {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--snow);
}
.cert-authority {
  font-size: 0.82rem;
  color: var(--snow-soft);
  margin-top: auto;
}

/* ============================================
   GUIDA  (product-showcase)
   ============================================ */
.guide-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  margin-top: 64px;
}
.guide-grid + .guide-grid {
  margin-top: clamp(64px, 9vw, 110px);
}
.guide-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.guide-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 480px;
  margin-bottom: 28px;
}
.guide-price-old {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: line-through;
  margin-left: 4px;
}
@media (min-width: 861px) {
  .guide-grid--reverse .guide-cover { order: 2; }
}
.guide-cover img {
  width: 100%;
  max-width: 380px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 30px 70px rgba(0,0,0,0.18);
}

.guide-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}
.guide-features li {
  position: relative;
  padding-left: 32px;
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--ink);
}
.guide-features li:not(.guide-feature-ai)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue);
  /* white checkmark */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px;
}

.guide-feature-ai {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 0 !important;
}
.ai-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #0071e3, #42a5ff);
  padding: 4px 9px;
  border-radius: 6px;
  flex-shrink: 0;
}

.guide-note {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 520px;
  padding: 18px 22px;
  background: var(--gray);
  border-radius: 14px;
  margin-bottom: 32px;
}

.guide-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.guide-price {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.guide-price-note {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ============================================
   IN BREVE  (dati / spec grid)
   ============================================ */
.facts-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 56px;
}
.fact-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  border-radius: var(--radius);
  background: #161617;
  border: 1px solid var(--border-dark);
}
.fact-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue-bright);
}
.fact-value {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--snow);
}
.fact-langs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fact-lang {
  font-size: 1.05rem;
  color: var(--snow-soft);
}
.fact-lang strong {
  font-weight: 600;
  color: var(--snow);
}

/* ============================================
   CONTATTI
   ============================================ */
.contact-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
}
.contact-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 34px;
  min-width: 260px;
  border-radius: var(--radius);
  background: #161617;
  border: 1px solid var(--border-dark);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.contact-link:hover,
.contact-link:focus-visible {
  transform: translateY(-4px);
  background: #1d1d1f;
  border-color: rgba(255,255,255,0.28);
}
.contact-label {
  font-size: 0.8rem;
  color: var(--snow-soft);
}
.contact-value {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--blue-bright);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--gray);
  color: var(--ink-soft);
  padding: 34px 0;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.82rem;
}
.footer-nav a {
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.footer-nav a:hover { color: var(--ink); }
.footer-copy {
  font-size: 0.78rem;
  color: #86868b;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
              transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 300px; margin: 0 auto; }
  .guide-grid { grid-template-columns: 1fr; text-align: center; }
  .guide-cover { order: -1; }
  .guide-features { text-align: left; max-width: 420px; margin-left: auto; margin-right: auto; }
  .guide-note { margin-left: auto; margin-right: auto; }
  .guide-cta { justify-content: center; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 12px var(--edge) 20px;
    background: rgba(255,255,255,0.92);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transform: translateY(-140%);
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
    font-size: 1rem;
  }
  .nav-links a {
    color: var(--ink) !important;
    opacity: 1;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-toggle { display: flex; }
}
