/* =====================================================================
   ZampaGentile · Website v2 — refresh editoriale + nature-first
   ===================================================================== */
@import url('colors_and_type.css');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--zg-blue-900);
  background: var(--zg-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; max-width: 100%; vertical-align: bottom; }

/* —— Containers —— */
.container { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.container-narrow { max-width: 920px; margin: 0 auto; padding: 0 40px; }
section { padding: 120px 0; position: relative; }

.eyebrow {
  font-family: var(--font-ui);
  font-weight: 600; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--zg-orange-500);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: ''; width: 28px; height: 1px;
  background: currentColor;
}

.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  margin: 0 0 28px;
  color: var(--zg-blue-900);
  text-wrap: balance;
}
.h-display em {
  font-style: italic;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--zg-orange-500);
}

.lead {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.2vw, 20px);
  line-height: 1.55;
  color: var(--zg-stone-500);
  max-width: 640px;
}

/* —— Cookie banner —— */
.cookie {
  position: fixed; left: 24px; right: 24px; bottom: 24px; z-index: 200;
  max-width: 720px; margin: 0 auto;
  background: var(--zg-blue-900); color: #fff;
  border-radius: 18px; padding: 22px 26px;
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  font-family: var(--font-body); font-size: 14px; line-height: 1.5;
}
.cookie h4 { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin: 0 0 6px; color: #fff; }
.cookie p { margin: 0; color: var(--zg-blue-100); }
.cookie a { color: var(--zg-orange-400); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cookie .link-btn { background: transparent; border: 0; color: var(--zg-blue-100); font-family: var(--font-ui); font-size: 13px; cursor: pointer; padding: 8px 4px; text-decoration: underline; }
.cookie .link-btn:hover { color: #fff; }

/* —— Buttons —— */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-ui); font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: 999px; border: none;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.btn-primary { background: var(--zg-orange-500); color: #fff; box-shadow: 0 6px 18px rgba(255,122,0,0.28); }
.btn-primary:hover { background: var(--zg-orange-600); transform: translateY(-1px); }
.btn-secondary { background: var(--zg-blue-900); color: #fff; }
.btn-secondary:hover { background: var(--zg-blue-800); }
.btn-outline { background: transparent; color: var(--zg-blue-900); border: 1.5px solid var(--zg-blue-900); }
.btn-outline:hover { background: var(--zg-blue-900); color: #fff; }
.btn-ghost { background: transparent; color: var(--zg-orange-500); padding: 8px 4px; font-weight: 700; }
.btn-ghost::after { content: ' →'; transition: transform .15s; display: inline-block; }
.btn-ghost:hover::after { transform: translateX(4px); }

.btn-on-dark.btn-outline { color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-on-dark.btn-outline:hover { background: #fff; color: var(--zg-blue-900); }

/* —— Top nav —— */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  transition: background .25s ease, padding .25s ease, box-shadow .25s ease;
}
.nav.on-hero { background: transparent; }
.nav.on-hero .nav-link, .nav.on-hero .brand-text { color: #fff; }
.nav.scrolled { background: rgba(250, 246, 241, 0.92); backdrop-filter: saturate(140%) blur(14px); padding: 12px 0; box-shadow: 0 1px 0 rgba(13,27,42,0.06); }
.nav.scrolled .nav-link, .nav.scrolled .brand-text { color: var(--zg-blue-900); }

.nav-inner {
  display: flex; align-items: center; gap: 36px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { height: 38px; width: auto; max-width: none; object-fit: contain; display: block; }
.nav-links { display: flex; gap: 30px; margin-left: 24px; }
.nav-link {
  font-family: var(--font-ui); font-weight: 500; font-size: 14px;
  text-decoration: none; letter-spacing: 0.01em;
  transition: color .15s;
}
.nav-link:hover { color: var(--zg-orange-500) !important; }
.nav-cta {
  margin-left: auto;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.nav-phone {
  font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  text-decoration: none; letter-spacing: 0.02em;
  white-space: nowrap; transition: color .15s;
  order: 2;
}
.nav.on-hero .nav-phone { color: rgba(255,255,255,0.85); }
.nav.scrolled .nav-phone { color: var(--zg-stone-500); }
.nav-phone:hover { color: var(--zg-orange-500) !important; }
.nav-cta .btn { order: 1; }

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  color: #fff;
  overflow: hidden;
  display: flex; align-items: flex-end;
  padding-bottom: 120px;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13,27,42,0.55) 0%,
    rgba(13,27,42,0.25) 35%,
    rgba(13,27,42,0.45) 75%,
    rgba(13,27,42,0.85) 100%
  );
}
.hero-content { position: relative; z-index: 2; width: 100%; }
.hero-eyebrow { color: rgba(255,255,255,0.9); }
.hero-eyebrow::before { background: rgba(255,255,255,0.9); }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  color: #fff;
  max-width: 16ch;
}
.hero h1 em {
  font-style: italic;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--zg-orange-400);
}
.hero p {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.5;
  color: rgba(255,255,255,0.92);
  max-width: 560px;
  margin: 0 0 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions .btn-primary { padding: 16px 30px; font-size: 16px; }
.hero .hero-tagline { font-size: 13px; color: rgba(255,255,255,0.55); margin: 14px 0 0; letter-spacing: 0.02em; }

.hero-credit {
  position: absolute; right: 32px; bottom: 24px;
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  z-index: 2;
}
.hero-credit a { color: rgba(255,255,255,0.9); text-decoration: underline; text-underline-offset: 2px; }

.hero-scroll {
  position: absolute; left: 50%; bottom: 36px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255,255,255,0.85);
  z-index: 2;
}
.hero-scroll .line { width: 1px; height: 36px; background: rgba(255,255,255,0.5); position: relative; overflow: hidden; }
.hero-scroll .line::before {
  content: ''; position: absolute; top: -36px; left: 0; width: 100%; height: 100%;
  background: #fff;
  animation: scrollPulse 2.4s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(72px); }
  100% { transform: translateY(72px); }
}

.hero-rplus {
  position: absolute; right: 64px; top: 50%; transform: translateY(-50%);
  z-index: 2;
  width: 180px; height: 180px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff;
  backdrop-filter: blur(6px) saturate(120%);
  background: rgba(255,255,255,0.06);
}
.hero-rplus .big {
  font-family: var(--font-display); font-weight: 800; font-size: 56px; letter-spacing: -0.02em; line-height: 1;
  color: var(--zg-orange-400);
}
.hero-rplus .small {
  font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  text-align: center; margin-top: 6px; line-height: 1.3;
  color: rgba(255,255,255,0.9);
}

/* —— Marquee —— */
.marquee {
  background: var(--zg-blue-900); color: #fff;
  padding: 22px 0; overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.marquee-track {
  display: flex; gap: 56px; white-space: nowrap;
  animation: marquee 32s linear infinite;
  font-family: var(--font-display);
  font-weight: 500; font-size: 16px; letter-spacing: 0.02em;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 56px; }
.marquee-track span::after {
  content: '✺'; color: var(--zg-orange-500); font-size: 12px;
  display: inline-block; margin-left: 56px;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* —— Section: Chi sono —— */
.about { background: var(--zg-cream); padding-top: 140px; }
.about-grid {
  display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: start;
}
.about-photo-sticky {
  position: sticky; top: 100px;
}
.about-photo {
  position: relative;
  border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
  background-color: var(--zg-blue-900);
  background-image: url('../../assets/photos/bjorn-caoimhe.jpg');
  background-size: auto 140%;
  background-position: 50% 0%;
}
.about-photo img { display: none; }
.about-photo .credit {
  position: absolute; left: 16px; bottom: 14px; color: #fff;
  font-family: var(--font-ui); font-size: 11px; line-height: 1.4; letter-spacing: 0.04em;
  background: rgba(13,27,42,0.6); padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.about-photo .credit a { color: rgba(255,255,255,0.9); text-decoration: underline; }
.about-text h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.06; letter-spacing: -0.025em;
  margin: 0 0 12px;
}
.about-text .subhead {
  font-family: var(--font-body); font-weight: 300; font-style: italic;
  font-size: clamp(20px, 1.6vw, 24px);
  color: var(--zg-stone-500); margin: 0 0 28px;
}
.about-text p {
  font-family: var(--font-body); font-size: 17px; line-height: 1.7;
  color: var(--zg-stone-500); margin: 0 0 18px;
}
.about-text p strong { color: var(--zg-blue-900); font-weight: 700; }
.about-text p em { font-style: italic; color: var(--zg-orange-500); font-weight: 500; }

.about-pullquote {
  border-left: 3px solid var(--zg-orange-500);
  padding: 6px 0 6px 20px;
  margin: 36px 0;
  font-family: var(--font-display);
  font-weight: 500; font-style: italic;
  font-size: 20px; line-height: 1.45;
  color: var(--zg-blue-900);
}

/* —— Qualifiche —— */
.creds {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid rgba(13,27,42,0.12);
}
.creds-title {
  font-family: var(--font-ui); font-weight: 700; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--zg-orange-500); margin: 0 0 22px;
}
.cred {
  padding: 18px 0;
  border-bottom: 1px solid rgba(13,27,42,0.08);
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline;
}
.cred:last-child { border-bottom: 0; }
.cred .name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--zg-blue-900); }
.cred .detail { font-family: var(--font-body); font-size: 14px; color: var(--zg-stone-500); margin-top: 4px; }
.cred .year { font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--zg-orange-500); letter-spacing: 0.02em; }
.cred a.link { color: var(--zg-orange-500); text-decoration: none; font-weight: 600; }
.cred a.link::after { content: ' ↗'; }

/* —— Cert link button —— */
.cert-link {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  color: var(--zg-orange-500); letter-spacing: 0.01em;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
}
.cert-link:hover { text-decoration-color: var(--zg-orange-500); }

/* —— Certificate modal overlay —— */
.cert-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(13,27,42,0.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: certFadeIn 0.2s ease;
}
@keyframes certFadeIn { from { opacity: 0; } to { opacity: 1; } }

.cert-modal {
  position: relative;
  background: var(--zg-cream);
  border-radius: 20px;
  max-width: 600px; width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(13,27,42,0.35);
  animation: certSlideUp 0.25s cubic-bezier(0.22,1,0.36,1);
}
@keyframes certSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.cert-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: rgba(13,27,42,0.08); border: none; border-radius: 50%;
  width: 34px; height: 34px; cursor: pointer;
  font-size: 13px; color: var(--zg-blue-900);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.cert-close:hover { background: rgba(13,27,42,0.16); }

.cert-modal-head {
  padding: 32px 32px 20px;
  border-bottom: 1px solid rgba(13,27,42,0.08);
}
.cert-modal-issuer {
  font-family: var(--font-ui); font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--zg-orange-500); margin-bottom: 6px;
}
.cert-modal-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: 22px; color: var(--zg-blue-900);
  letter-spacing: -0.02em; margin-bottom: 4px;
}
.cert-modal-sub {
  font-family: var(--font-body); font-size: 15px;
  color: var(--zg-blue-900); margin-bottom: 6px; line-height: 1.4;
}
.cert-modal-speaker {
  font-family: var(--font-body); font-size: 13px;
  color: var(--zg-stone-500); font-style: italic; margin-bottom: 4px;
}
.cert-modal-date {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  color: var(--zg-stone-500); letter-spacing: 0.04em; margin-top: 6px;
}
.cert-modal-verify {
  display: inline-block; margin-top: 10px;
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  color: var(--zg-orange-500); text-decoration: none; letter-spacing: 0.02em;
}
.cert-modal-verify:hover { text-decoration: underline; }

.cert-modal-img {
  padding: 0;
  background: #f0ede8;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
}
.cert-modal-img img {
  display: block;
  width: 100%;
  height: auto;
}

/* =====================================================================
   RESPONSIVE — breakpoint 900px (tablet) e 640px (mobile)
   ===================================================================== */

/* —— Hamburger button —— */
.nav-ham {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent; border: none; cursor: pointer;
  padding: 8px; border-radius: 8px;
  flex: none; margin-left: auto;
}
.nav-ham span {
  display: block; width: 22px; height: 2px;
  background: currentColor;
  transition: transform 0.28s ease, opacity 0.2s ease;
}
.nav.on-hero .nav-ham { color: #fff; }
.nav.scrolled .nav-ham { color: var(--zg-blue-900); }
.nav-ham.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-ham.open span:nth-child(2) { opacity: 0; }
.nav-ham.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* —— Mobile drawer —— */
.nav-drawer {
  position: fixed; inset: 0; z-index: 99;
  background: var(--zg-blue-900);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 8px;
  animation: drawerIn 0.22s ease;
}
@keyframes drawerIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.nav-drawer a {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  color: #fff; text-decoration: none; padding: 10px 24px;
  transition: color 0.15s;
}
.nav-drawer a:hover { color: var(--zg-orange-400); }
.nav-drawer .drawer-cta {
  margin-top: 16px;
  background: var(--zg-orange-500); color: #fff;
  border-radius: 999px; padding: 14px 32px;
  font-size: 1.1rem;
}
.nav-drawer .drawer-cta:hover { background: var(--zg-orange-600); }
.nav-drawer .drawer-phone {
  font-size: 1rem; color: var(--zg-blue-100); font-weight: 500; margin-top: 8px;
}

/* —— Tablet (≤ 900px) —— */
@media (max-width: 900px) {
  .container, .container-narrow { padding: 0 24px; }
  section { padding: 80px 0; }

  /* Nav */
  .nav-links, .nav-cta { display: none; }
  .nav-ham { display: flex; }

  /* Hero */
  .hero { padding-bottom: 80px; }
  .hero-rplus { display: none; }
  .hero-scroll { display: none; }

  /* About */
  .about { padding-top: 80px; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-photo-sticky { position: static; }
  .about-photo { aspect-ratio: 3/2; }

  /* Cookie */
  .cookie { grid-template-columns: 1fr; gap: 16px; }
}

/* —— Mobile (≤ 640px) —— */
@media (max-width: 640px) {
  .container, .container-narrow { padding: 0 18px; }
  section { padding: 64px 0; }

  /* Nav */
  .nav { padding: 14px 0; }

  /* Hero */
  .hero { padding-bottom: 64px; align-items: flex-end; }
  .hero h1 { font-size: clamp(36px, 10vw, 52px); margin-bottom: 16px; }
  .hero p { font-size: 16px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-credit { display: none; }

  /* About */
  .about-photo { aspect-ratio: 4/3; }
  .about-pullquote { font-size: 17px; }
}

/* ── Prevent white band under all photo containers ── */
.about-photo,
.cert-modal-img {
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}
