/* ROSSO — Base styles (responsive)
   Single file. Desktop default; @media (max-width: 900px) overrides at bottom for mobile.
*/

/* Forziamo light mode — il sito non ha (e non deve avere) dark mode automatica.
   Senza questo, Brave/Chrome con "Force Dark Mode" e Safari iOS auto-invertono i colori. */
:root {
  color-scheme: only light;
  --cream: #F5EFE6;
  --cream2: #EFE7DA;
  --paper: #FBF7F0;
  --red: #C8102E;
  --red-dark: #8A0B1F;
  --red-ink: #3D0810;
  --ink: #2A1418;
  --ink2: #4A2A2F;
  --muted: #857069;
  --muted2: #A89A91;
  --line: #E3D8C8;
  --line2: #D1C2AE;
  --blush: #E8D3C8;
  --ochre: #C9A06E;
  --plasma: #F1E114;

  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ============ WIP BANNER ============ */
.wip-banner {
  background: #1B1F4E;
  color: #FFFFFF;
  padding: 10px 40px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--sans);
  letter-spacing: -0.005em;
}
.wip-banner .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #C8CCEB;
  flex-shrink: 0;
}
.wip-banner .ema-link { color: #FFFFFF; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.wip-banner .ema-link:hover { text-decoration-thickness: 1.5px; }

/* ============ NAV ============ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 56px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.nav-left { display: flex; align-items: center; gap: 44px; }
.nav-logo-link { display: inline-flex; align-items: center; }
.nav-logo { height: 32px; width: auto; transition: transform 0.2s; }
.nav-logo-link:hover .nav-logo { transform: rotate(-2deg); }
.nav-links { display: flex; gap: 28px; color: var(--ink2); }
.nav-links a {
  font-weight: 500;
  cursor: pointer;
  letter-spacing: -0.005em;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--red);
  transition: right 0.25s cubic-bezier(.2,.7,.2,1);
}
.nav-links a:hover::after { right: 0; }
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-right a.login {
  padding: 10px 16px;
  font-weight: 500;
  color: var(--ink);
}
.nav-burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.nav-burger:hover { background: var(--cream2); }
.nav-burger span {
  display: block;
  width: 18px;
  height: 1.6px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.2s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.nav-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 16px;
  flex-direction: column;
  gap: 4px;
  z-index: 29;
  box-shadow: 0 16px 36px -20px rgba(61, 8, 16, 0.2);
}
.nav-menu.open { display: flex; }
.nav-menu a {
  padding: 14px;
  font-size: 16px;
  color: var(--ink);
  font-weight: 500;
  border-radius: 10px;
  letter-spacing: -0.005em;
}
.nav-menu a:active { background: var(--paper); }
.nav-menu .divider-row {
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}
.nav-menu .login { color: var(--ink2); }

/* ============ BUTTONS ============ */
.btn {
  font-family: var(--sans);
  font-weight: 500;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  text-align: center;
}
.btn.size-sm { padding: 10px 16px; font-size: 13px; }
.btn.size-md { padding: 13px 22px; font-size: 14px; }
.btn.size-lg { padding: 17px 28px; font-size: 16px; }
.btn.size-xl { padding: 20px 34px; font-size: 17px; }

.btn.primary { background: var(--red); color: #fff; }
.btn.cream { background: var(--paper); color: var(--ink); border-color: var(--line2); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2); }
.btn.outline { background: transparent; color: var(--red); border-color: var(--red); }
.btn.dark { background: var(--red-ink); color: var(--cream); }
.btn.full { width: 100%; }
.btn .arrow {
  font-size: 15px;
  margin-top: -1px;
  transition: transform 0.2s;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ============ STORE BADGES ============ */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 14px;
  background: #0E0A0B;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  transition: filter 0.15s, transform 0.15s;
}
.store-badge:hover { filter: brightness(1.15); transform: translateY(-1px); }
.store-badge .store-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}
.store-badge .line1 {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.store-badge .line2 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 1px;
}

/* ============ KICKERS ============ */
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted2);
  font-weight: 500;
}
.kicker.red { color: var(--red); }

/* ============ PRESS ============ */
.press {
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 44px 40px 52px;
}
.press-header {
  margin-bottom: 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.press-header h3 {
  font-family: var(--sans);
  font-size: 44px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.035em;
  line-height: 1;
}
.press-header h3 em {
  font-style: italic;
  color: var(--red);
}
.press-header .label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.press-card {
  background: var(--cream);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
  cursor: pointer;
  transition: background 0.18s;
}
.press-card:hover { background: var(--cream2); }
.press-thumb {
  display: block;
  width: calc(100% + 48px);
  margin: -28px -24px 4px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--ink2);
}
.press-name {
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.press-name.forbes { font-family: var(--serif); font-weight: 700; }
.press-name.repubblica { font-family: var(--serif); font-weight: 700; font-style: italic; }
.press-name.espresso { font-family: var(--serif); font-weight: 600; font-style: italic; }
.press-name.wired { font-family: var(--sans); font-weight: 900; }
.press-name.today { font-family: var(--sans); font-weight: 800; }
.press-name.tv2000 { font-family: var(--sans); font-weight: 800; }
.press-name.rai { font-family: var(--sans); font-weight: 800; }
.press-name.vaticana { font-family: var(--serif); font-weight: 600; font-style: italic; }
.press-quote {
  flex: 1;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink2);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.press-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.press-meta .date {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.press-meta .read {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--red);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--cream2);
  color: var(--ink);
  padding: 44px 40px 22px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}
.footer-brand img.brand-logo { height: 38px; width: auto; }
.footer-brand .tagline {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  max-width: 300px;
  line-height: 1.55;
}
.footer-socials {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.footer-socials a {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, transform 0.18s;
}
.footer-socials a:hover {
  background: var(--paper);
  transform: translateY(-2px);
}
.footer-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--muted2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col li {
  font-size: 13px;
  color: var(--ink2);
}
.footer-col li a {
  color: var(--ink2);
  transition: color 0.15s;
}
.footer-col li a:hover { color: var(--red); }
.footer-sedi {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.footer-sedi .kind {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.footer-sedi .city {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 2px;
}
.footer-sedi .addr {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.footer-eu {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
}
.footer-eu img { height: 44px; }
.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-bottom .legal {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}
.footer-bottom .legal strong { color: var(--ink); font-weight: 600; }
.footer-bottom .legal .label { color: var(--muted2); }
.footer-brand-by {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
}
.footer-brand-by .label {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.footer-brand-by a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.footer-brand-by .ema-logo {
  height: 18px;
  width: auto;
  display: block;
  transition: opacity 0.15s;
}
.footer-brand-by a:hover .ema-logo { opacity: 0.78; }
/* Legacy text fallback (no longer used) */
.footer-brand-by .ema {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.footer-brand-by .ema span { color: var(--red); }

/* ============ MOBILE SCROLL PROGRESS BAR ============ */
.mobile-scroll-progress {
  display: none;
}

/* ============ MOBILE STICKY BOTTOM CTA ============ */
/* Hidden on desktop, fixed bottom on mobile */
.mobile-sticky-cta {
  display: none;
}

/* ============ DESKTOP / MOBILE UTILITY VISIBILITY ============ */
.show-mobile { display: none; }
.show-desktop { display: block; }
@media (max-width: 900px) {
  .show-desktop { display: none !important; }
  .show-mobile { display: block !important; }
}

/* ====================================================== */
/* ============ MOBILE OVERRIDES (≤ 900px) ============== */
/* ====================================================== */
@media (max-width: 900px) {

  /* Scroll progress bar — thin red line at top */
  .mobile-scroll-progress {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--red) 0%, var(--red-dark) 100%);
    box-shadow: 0 0 12px rgba(200, 16, 46, 0.45);
    z-index: 100;
    will-change: width;
    transition: width 0.08s linear;
  }

  .mobile-sticky-cta {
    display: block;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 50;
    transform: translateY(140%);
    transition: transform 0.45s cubic-bezier(.2,.7,.2,1);
    pointer-events: none;
  }
  .mobile-sticky-cta.is-visible {
    transform: translateY(0);
    pointer-events: auto;
  }
  .mobile-sticky-cta-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px 12px 14px;
    background: linear-gradient(135deg, #0E0A0B 0%, #1a0f12 100%);
    color: #fff;
    border-radius: 16px;
    box-shadow:
      0 12px 30px -10px rgba(61, 8, 16, 0.5),
      0 2px 0 rgba(255, 255, 255, 0.06) inset;
    text-decoration: none;
    position: relative;
    overflow: hidden;
  }
  .mobile-sticky-cta-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 80px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    animation: rosso-shimmer 3.2s ease-in-out infinite;
  }
  .mobile-sticky-cta-ico {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 4px 12px -4px rgba(200, 16, 46, 0.6);
  }
  .mobile-sticky-cta-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
  }
  .mobile-sticky-cta-text .line1 {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
    margin-bottom: 2px;
  }
  .mobile-sticky-cta-text .line2 {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
  }
  .mobile-sticky-cta-arrow {
    font-size: 18px;
    color: var(--red);
    font-weight: 600;
    flex-shrink: 0;
  }
  .mobile-sticky-cta:active .mobile-sticky-cta-inner {
    transform: scale(0.97);
    transition: transform 0.1s ease-out;
  }

  /* When sticky CTA is visible, pad body so footer doesn't get covered */
  body.has-sticky-cta { padding-bottom: 84px; }


  .wip-banner {
    padding: 10px 16px;
    font-size: 11.5px;
    gap: 8px;
    text-align: center;
    line-height: 1.35;
  }

  /* Nav */
  .nav {
    padding: 14px 16px;
  }
  .nav-logo { height: 26px; }
  .nav-left { gap: 0; }
  .nav-links { display: none; }
  .nav-right { display: none; }
  .nav-burger { display: flex; }

  /* Press — auto-marquee compact on mobile (logos + date only) */
  .press {
    padding: 32px 0 40px;
  }
  .press-header {
    padding: 0 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 16px;
  }
  .press-header h3 { font-size: 32px; }
  .press-header .label { font-size: 10px; }

  /* Auto-scroll marquee (JS-driven on mobile, so user can also swipe) */
  .press-marquee-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
  }
  .press-marquee-wrap::-webkit-scrollbar { display: none; }
  .press-marquee {
    animation: none !important;
    transform: none !important;
    display: flex !important;
    width: max-content !important;
    gap: 10px;
    background: none;
    border: none;
    padding: 4px 0 4px;
  }
  .press-marquee .press-card {
    width: 160px !important;
    flex: 0 0 160px;
    border-right: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 12px 10px;
    gap: 6px;
    min-height: 90px;
    background: var(--cream);
    overflow: hidden;
  }
  .press-marquee .press-card.dup { display: flex !important; }
  .press-marquee .press-thumb {
    width: calc(100% + 24px);
    margin: -14px -12px 4px;
    border-radius: 0;
  }
  .press-name { font-size: 17px; line-height: 1; }
  /* Hide quote on mobile — just name + date */
  .press-marquee .press-quote { display: none; }
  .press-meta { padding-top: 6px; }
  .press-meta .date { font-size: 9px; }
  .press-meta .read { display: none; }

  /* Footer — compact mobile */
  .footer {
    padding: 24px 16px 96px; /* extra bottom-padding for sticky CTA */
  }
  .footer-top {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px 14px;
    padding-bottom: 16px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }
  .footer-brand img.brand-logo { height: 24px; }
  .footer-brand .tagline {
    max-width: none;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.45;
  }
  .footer-socials { margin-top: 12px; gap: 8px; }
  .footer-socials a { width: 32px; height: 32px; }
  .footer-col h5 {
    font-size: 9px;
    margin-bottom: 6px;
    letter-spacing: 0.08em;
  }
  .footer-col ul { gap: 5px; }
  .footer-col li { font-size: 11px; }

  /* Sedi: 1-col compact stacked, addresses visible but tight */
  .footer-sedi {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 0;
  }
  .footer-sedi .kind { font-size: 8.5px; margin-bottom: 3px; letter-spacing: 0.1em; }
  .footer-sedi .city { font-size: 12px; font-weight: 600; }
  .footer-sedi .addr { font-size: 11px; line-height: 1.4; color: var(--muted); }

  .footer-eu { padding: 12px 0; }
  .footer-eu img { height: 26px; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 12px;
  }
  .footer-bottom .legal { font-size: 10px; line-height: 1.45; }
  .footer-brand-by .label { font-size: 11px; }
  .footer-brand-by .ema-logo { height: 14px; }
}

@media (max-width: 460px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-col h5 { font-size: 9.5px; }
  .footer-col li { font-size: 11.5px; }
  .footer-sedi { grid-template-columns: 1fr 1fr 1fr; }
  .footer-sedi .city { font-size: 11px; }
}
