/* ==========================================================================
   Ciro Sannino — design tokens
   ========================================================================== */
:root{
  --ink: #17140F;
  --ink-soft: #221D16;
  --paper: #F5F2EA;
  --paper-alt: #EBE5D6;
  --paper-line: #DCD5C4;
  --text-on-paper: #2A251C;
  --text-muted: #6B6255;
  --text-on-ink: #F5F2EA;
  --text-on-ink-muted: #B9B2A4;
  --orange: #F0500F;
  --orange-ink: #C93F0B;
  --blue: #2F62E8;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --shadow-card: 0 1px 2px rgba(23,20,15,.06), 0 12px 28px -14px rgba(23,20,15,.22);
  --ease: cubic-bezier(.22,.9,.32,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--text-on-paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3{
  font-family: var(--font-display);
  color: inherit;
  margin: 0;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -.01em;
}
h2{ font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
h3{ font-size: 1.25rem; }
p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
img{ display:block; max-width:100%; }
ul{ list-style:none; margin:0; padding:0; }

.wrap{ max-width: 1180px; margin: 0 auto; padding: 0 28px; }

:focus-visible{
  outline: 2.5px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link{
  position:absolute; left:-999px; top:0; z-index:100;
  background: var(--ink); color: var(--text-on-ink);
  padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus{ left:0; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 14px 26px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .97rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn-sm{ padding: 10px 20px; font-size: .89rem; }
.btn-primary{ background: var(--orange); color: #fff; }
.btn-primary:hover{ background: var(--orange-ink); }
.btn-outline{ border-color: rgba(245,242,234,.4); color: var(--text-on-ink); }
.btn-outline:hover{ border-color: var(--text-on-ink); background: rgba(245,242,234,.08); }
.btn-outline-dark{ border-color: var(--paper-line); color: var(--text-on-paper); }
.btn-outline-dark:hover{ border-color: var(--ink); background: rgba(23,20,15,.05); }
.btn-dark{ background: var(--ink); color: var(--text-on-ink); }
.btn-dark:hover{ background: var(--ink-soft); }

/* ---------- eyebrow / section head ---------- */
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-body);
  font-size: .85rem; font-weight: 600;
  color: var(--orange-ink);
  background: rgba(240,80,15,.09);
  padding: 6px 14px 6px 10px;
  border-radius: 100px;
  margin: 0 0 16px;
}
.eyebrow .dot{ width:7px; height:7px; border-radius:50%; background: var(--orange); flex:none; }
.eyebrow-light{ color: #FFD9C4; background: rgba(255,255,255,.1); }
.eyebrow-light .dot{ background: var(--orange); }

.section-head{ max-width: 640px; margin-bottom: 44px; }
.section-head h2{ margin-bottom: 14px; }
/* This heading is longer than the others — give it more room so it
   wraps to two lines instead of three on desktop widths. */
#blog .section-head{ max-width: 880px; }
.section-lede{ color: var(--text-muted); font-size: 1.05rem; max-width: 56ch; }
.section-head.with-nav{
  display:flex; align-items:flex-end; justify-content:space-between; gap: 24px; max-width:none;
}
.section-head.with-nav > div:first-child{ max-width: 620px; }
.section-head.with-nav h2{ margin-bottom: 0; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position: sticky; top:0; z-index:50;
  background: rgba(245,242,234,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--paper-line);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  height: 76px;
}
.brand{
  font-family: var(--font-display); font-weight:700; font-size: 1.2rem;
  color: var(--ink); letter-spacing: -.02em;
}
.brand span{ color: var(--orange); }
.main-nav{ display:flex; gap: 30px; }
.main-nav a{
  font-size: .96rem; font-weight:500; color: var(--text-on-paper);
  padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.main-nav a:hover{ border-color: var(--orange); }
.header-actions{ display:flex; align-items:center; gap:16px; }

.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:38px; height:38px; background:none; border:none; cursor:pointer;
}
.nav-toggle span{ width:22px; height:2px; background: var(--ink); display:block; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  background: radial-gradient(120% 140% at 12% -10%, #241f18 0%, var(--ink) 46%, #100e0a 100%);
  color: var(--text-on-ink);
  padding: 84px 0 70px;
}
.hero-grid{
  display:grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items:center;
}
.hero h1{
  font-size: clamp(2.65rem, 1.73rem + 3.68vw, 4.03rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--text-on-ink);
  margin-bottom: 20px;
}
.hero-lede{
  font-size: 1.12rem; color: var(--text-on-ink-muted); max-width: 46ch; margin-bottom: 34px;
}
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom: 46px; }

.hero-stats{
  display:flex; gap: 40px; margin:0; padding-top: 28px;
  border-top: 1px solid rgba(245,242,234,.14);
}
.hero-stats > div{ display:flex; flex-direction:column; gap:2px; }
.hero-stats dt{
  font-family: var(--font-display); font-weight:700; font-size:3rem; line-height:1.2; color: var(--text-on-ink);
}
.hero-stats dd{ margin:0; font-size:.86rem; color: var(--text-on-ink-muted); }

@property --shape-angle{
  syntax: '<angle>';
  inherits: false;
  initial-value: 210deg;
}

.hero-media{ position:relative; }
.hero-media-shape{
  position:absolute; inset: -8% -12% -8% 6%;
  background: conic-gradient(from var(--shape-angle), var(--orange), #F5A25C 35%, var(--blue) 70%, var(--orange) 100%);
  filter: blur(2px);
  border-radius: 32px;
  opacity: .55;
  z-index:0;
  transition: --shape-angle 3.15s cubic-bezier(.45,0,.15,1),
              opacity 1.54s cubic-bezier(.45,0,.15,1),
              filter 1.54s cubic-bezier(.45,0,.15,1);
}
.hero-media:hover .hero-media-shape{
  --shape-angle: 570deg;
  opacity: .8;
  filter: blur(3px);
}
.hero-media img{
  position:relative; z-index:1;
  width:100%; height:auto; aspect-ratio: 1/1; object-fit:cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55);
}
.hero-badge{
  position:absolute; z-index:2; left: -18px; bottom: -18px;
  background: var(--paper); color: var(--text-on-paper);
  padding: 16px 20px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display:flex; flex-direction:column; gap:2px;
  max-width: 220px;
}
.hero-badge strong{ font-family: var(--font-display); font-size: 1rem; line-height: 1.12; }
.hero-badge span{ font-size: .82rem; color: var(--text-muted); line-height: 1.12; }

/* ==========================================================================
   Trust strip
   ========================================================================== */
.trust-strip{ background: var(--paper); border-bottom: 1px solid var(--paper-line); }
.trust-inner{
  display:flex; align-items:center; justify-content:center; gap: 44px; flex-wrap:wrap;
  padding: 26px 28px; text-align:center;
}
.trust-label{ font-size:.82rem; color: var(--text-muted); flex: none; }
.trust-logos{ display:flex; flex-wrap:wrap; justify-content:center; }
.trust-logos li{
  display:flex; align-items:center;
  font-family: var(--font-display); font-weight:600; font-size: 1rem;
  color: var(--text-muted); opacity:.75;
  transition: opacity .18s var(--ease), color .18s var(--ease);
}
.trust-logos li:hover{ opacity:1; color: var(--ink); }
.trust-logos li:not(:last-child)::after{
  content: "·";
  margin: 0 20px;
  color: var(--paper-line);
  font-weight: 700;
}

/* ==========================================================================
   Sections generic
   ========================================================================== */
.section{ padding: 88px 0; }
.section-tight{ padding-top: 70px; }
.section-alt{ background: var(--paper-alt); }

/* Chi sono */
.chi-sono-grid{ display:grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items:start; }
.timeline{ display:flex; flex-direction:column; gap: 26px; }
.timeline li{
  display:grid; grid-template-columns: 120px 1fr; gap: 20px;
  padding-bottom: 26px; border-bottom: 1px solid var(--paper-line);
}
.timeline li:last-child{ border-bottom:none; padding-bottom:0; }
.timeline-year{
  font-family: var(--font-display); font-weight:600; color: var(--orange-ink); font-size: .95rem;
}
.timeline p{ color: var(--text-on-paper); }

/* ==========================================================================
   Corsi — horizontal scroller
   ========================================================================== */
.scroller-nav{ display:flex; gap:10px; flex:none; }
.scroller-nav[hidden]{ display:none; }
.arrow-btn{
  width:44px; height:44px; border-radius:50%;
  border: 1.5px solid var(--paper-line); background: var(--paper);
  font-size: 1.3rem; color: var(--ink); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.arrow-btn:hover{ background: var(--ink); color: var(--text-on-ink); border-color: var(--ink); }

.card-scroller{
  display:flex; gap: 22px; overflow-x:auto; padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.card-scroller::-webkit-scrollbar{ display:none; }

.course-card{
  scroll-snap-align: start;
  flex: 1 0 340px;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-lg);
  overflow:hidden;
  box-shadow: var(--shadow-card);
  display:flex; flex-direction:column;
}
.course-media{ position:relative; aspect-ratio: 4/3; overflow:hidden; background:#111; }
.course-media img{
  width:100%; height:100%; object-fit:cover;
  transition: transform .5s var(--ease);
}
.course-card:hover .course-media img,
.course-card:hover .course-media .social-tile{ transform: scale(1.06); }
.tag{
  position:absolute; top:14px; left:14px;
  font-size:.76rem; font-weight:700; letter-spacing:.01em;
  padding: 6px 12px; border-radius: 100px; color:#fff;
}
.tag-ai{ background: var(--blue); }
.tag-render{ background: var(--orange); }
.course-body{ padding: 24px; display:flex; flex-direction:column; gap:12px; flex:1; }
.course-body h3 em{ font-style:normal; color: var(--text-muted); font-weight:400; }
.course-body p{ color: var(--text-muted); font-size: .95rem; flex:1; }
.course-body .btn{ align-self:flex-start; margin-top:4px; }

.resource-note{ color: var(--text-muted); font-size: .92rem; margin-top: 30px; }
.resource-note a{ color: var(--orange-ink); font-weight:600; }

/* Second row: YouTube / video / Instagram — same card, no scroller needed */
.card-row{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 22px;
}
.social-tile{
  width:100%; height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  transition: transform .5s var(--ease);
}
.social-tile-youtube{ background: linear-gradient(155deg, #1A1A1A 0%, #2B0E0E 100%); }
.social-tile-instagram{ background: linear-gradient(135deg, #4F5BD5, #962FBF 40%, #D62976 70%, #FA7E1E); }
.social-tile-word{ font-family: var(--font-display); font-weight:700; font-size: 1.25rem; color:#fff; letter-spacing:-.01em; }
.play-badge{
  width:58px; height:58px; border-radius:16px; background:#FF2D2D;
  display:flex; align-items:center; justify-content:center;
}
.play-icon{
  width:0; height:0; margin-left:5px;
  border-top:14px solid transparent; border-bottom:14px solid transparent; border-left:22px solid #fff;
}
.insta-ring{ width:50px; height:50px; border:3px solid #fff; border-radius:15px; position:relative; }
.insta-ring::after{ content:""; position:absolute; inset:12px; border:3px solid #fff; border-radius:50%; }
.insta-ring::before{ content:""; position:absolute; top:7px; right:7px; width:6px; height:6px; background:#fff; border-radius:50%; }

/* ==========================================================================
   Certificazioni — badge grid
   ========================================================================== */
.badge-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.badge-card{
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  display:flex; flex-direction:column; gap: 4px;
}
.badge-medal{
  width:44px; height:44px;
  object-fit: contain;
  display:block;
  margin-bottom: 14px;
}
.badge-card strong{ font-family: var(--font-display); font-size: 1.02rem; }
.badge-card span{ color: var(--text-muted); font-size: .88rem; }
.badge-card a{
  color: var(--orange-ink); font-size: .88rem; font-weight:400;
  text-decoration: underline; text-underline-offset: 2px;
}
.badge-card a:hover{ color: var(--ink); }

/* ==========================================================================
   Libri
   ========================================================================== */
.libri-grid{ }
.book-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.book-card{
  display:grid; grid-template-columns: 150px 1fr; gap: 22px; align-items:start;
}
.book-card img{
  width:150px; border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
}
.book-cover-css{
  width:150px; aspect-ratio: 3/4.2;
  background: linear-gradient(155deg, var(--ink) 0%, #2b2419 100%);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
  color: var(--text-on-ink);
  display:flex; flex-direction:column; justify-content:space-between;
  padding: 16px 14px;
}
.book-cover-kicker{ font-size:.68rem; letter-spacing:.03em; color: var(--text-on-ink-muted); }
.book-cover-title{ font-family: var(--font-display); font-weight:600; font-size: 1.05rem; line-height:1.2; }
.book-cover-pub{ font-size:.66rem; color: var(--orange); font-weight:700; }
.book-info p{ color: var(--text-muted); font-size: .93rem; margin-top:8px; }
.book-info h3{ margin-bottom:2px; }
.book-info .btn{ margin-top: 14px; }

/* ==========================================================================
   Blog spotlight
   ========================================================================== */
.blog-spotlight{
  display:grid; grid-template-columns: 220px 1fr; gap: 40px; align-items:center;
  background: var(--paper); border: 1px solid var(--paper-line); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow-card);
}
.blog-logo{ width:100%; max-width:180px; margin:0 auto; }
.blog-spotlight-body p{ color: var(--text-on-paper); font-size: 1.02rem; max-width: 56ch; }
.chip-row{ display:flex; flex-wrap:wrap; gap:10px; margin: 18px 0; }
.chip-row li{
  font-size:.83rem; font-weight:600; color: var(--text-on-paper);
  border:1px solid var(--paper-line); padding: 6px 14px; border-radius: 100px;
}

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band{ background: var(--ink); color: var(--text-on-ink); padding: 70px 0; overflow:hidden; }
.cta-inner{
  display:grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items:center;
}
.cta-text h2{ color:var(--text-on-ink); margin-bottom:8px; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
.cta-text p{ color: var(--text-on-ink-muted); }
.cta-graphic{ position:relative; width:84px; height:84px; }
.cta-graphic span{
  position:absolute; inset:0; border-radius:50%; border: 1.5px solid var(--orange);
}
.cta-graphic span:nth-child(2){ inset:14px; border-color: var(--blue); }
.cta-graphic span:nth-child(3){ inset:28px; background: var(--orange); border:none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{ background: var(--paper-alt); border-top: 1px solid var(--paper-line); padding-top: 64px; }
.footer-grid{
  display:grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 50px;
  padding-bottom: 44px;
}
.footer-brand p{ color: var(--text-muted); margin: 14px 0 20px; max-width: 32ch; }
.brand-footer{ font-size: 1.35rem; }
.social-row{ display:flex; flex-direction:column; gap:8px; }
.social-row a{ font-size:.92rem; color: var(--text-on-paper); }
.social-row a:hover{ color: var(--orange-ink); }
.footer-col h4{ font-family: var(--font-display); font-size:.92rem; margin-bottom: 16px; color: var(--text-muted); font-weight:600; }
.footer-col{ display:flex; flex-direction:column; gap:10px; }
.footer-col a{ font-size:.94rem; color: var(--text-on-paper); }
.footer-col a:hover{ color: var(--orange-ink); }
.footer-bottom{
  border-top: 1px solid var(--paper-line);
  padding: 22px 28px; font-size:.85rem; color: var(--text-muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-media{ order:-1; max-width: 300px; margin: 0 auto 40px; }
  .hero-badge{ max-width: 190px; padding: 12px 16px; left:-14px; bottom:-14px; }
  .chi-sono-grid{ grid-template-columns: 1fr; }
  .book-row{ grid-template-columns: 1fr; }
  .card-row{ grid-template-columns: 1fr; }
  .badge-grid{ grid-template-columns: repeat(2, 1fr); }
  .blog-spotlight{ grid-template-columns: 1fr; text-align:left; }
  .blog-logo{ max-width:120px; margin:0; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .footer-brand{ grid-column: 1 / -1; }
}

@media (max-width: 700px){
  .main-nav{ position:absolute; top:76px; left:0; right:0; background: var(--paper); flex-direction:column; gap:0; border-bottom:1px solid var(--paper-line); max-height:0; overflow:hidden; transition: max-height .28s var(--ease); }
  .main-nav.open{ max-height: 340px; }
  .main-nav a{ padding: 16px 28px; border-bottom:1px solid var(--paper-line); }
  .nav-toggle{ display:flex; }
  .header-actions{ gap: 10px; }
  .header-actions .btn{ padding: 8px 14px; font-size: .78rem; }
  .brand{ font-size: 1.05rem; }
  .section{ padding: 60px 0; }
  .hero{ padding: 40px 0 46px; }
  .hero-stats{ gap: 26px; flex-wrap:wrap; }
  .section-head.with-nav{ flex-direction:column; align-items:flex-start; }
  .badge-grid{ grid-template-columns: 1fr 1fr; }
  .book-card{ grid-template-columns: 110px 1fr; }
  .book-card img, .book-cover-css{ width:110px; }
  .cta-inner{ grid-template-columns: 1fr; text-align:left; }
  .cta-graphic{ display:none; }
  .footer-grid{ grid-template-columns: 1fr; }
}

/* nav open state uses JS toggling .open on #mainNav; icon animates via aria-expanded */
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
.nav-toggle span{ transition: transform .2s var(--ease), opacity .2s var(--ease); }
