@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --ice: #e4f8f6;
  --cyan: #9ce8e4;
  --dark: #050a0d;
  --muted: #afbec0;
  --panel: #081014;
  --panel2: #0a1519;
  --line: rgba(156,232,228,.14);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--dark); color: #eef7f6; font-family: Inter, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.nav { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px 5vw; background: linear-gradient(180deg, rgba(3,8,11,.92), rgba(3,8,11,.48) 58%, transparent); backdrop-filter: blur(6px); }
.brand { font-family: "Barlow Condensed", sans-serif; font-size: 1.35rem; font-weight: 700; letter-spacing: .12em; }
.nav nav { display: flex; gap: 18px; align-items: center; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.lang { display: flex; gap: 7px; }
.lang a { padding: 7px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; }
.lang .active { background: var(--ice); color: #071013; }
.hero { min-height: 100svh; position: relative; display: flex; align-items: flex-end; overflow: hidden; background: url("hero.png") center / cover no-repeat; }
.hero:after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2,7,10,.9), rgba(2,7,10,.45) 45%, rgba(2,7,10,.08) 78%), linear-gradient(0deg, rgba(2,7,10,.92), transparent 55%); }
.hero-content { position: relative; z-index: 1; padding: 0 7vw 11vh; max-width: 850px; }
.eyebrow { font-size: .72rem; letter-spacing: .25em; color: var(--cyan); font-weight: 600; margin: 0 0 18px; }
.hero h1, h2 { font-family: "Barlow Condensed", Impact, sans-serif; text-transform: uppercase; }
.hero h1 { font-size: clamp(5rem, 14vw, 11rem); line-height: .8; margin: 0; letter-spacing: .01em; }
.subtitle { font-family: "Barlow Condensed", sans-serif; font-size: clamp(1.4rem, 3vw, 2.55rem); line-height: 1.03; letter-spacing: .08em; margin: 28px 0 10px; }
.author { letter-spacing: .25em; font-size: .8rem; color: #d1dedf; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.button { display: inline-block; padding: 14px 22px; border-radius: 3px; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; transition: .2s ease; }
.button:hover { transform: translateY(-1px); }
.primary { background: var(--ice); color: #071013; }
.ghost { border: 1px solid rgba(238,247,246,.55); background: rgba(0,0,0,.18); }
.section { padding: 110px 7vw; }
.section-inner { max-width: 1100px; margin: auto; }
.narrow { max-width: 760px; }
.experiment { background: linear-gradient(120deg, #09171a, #071015); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(3rem, 7vw, 6rem); line-height: .88; margin: 0 0 28px; }
.section p:not(.eyebrow):not(.excerpt-meta):not(.microcopy) { font-size: 1.04rem; line-height: 1.8; color: var(--muted); max-width: 760px; }
.impact-line { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; font-size: clamp(2rem, 5vw, 3.5rem) !important; line-height: .95 !important; color: #eef7f6 !important; letter-spacing: .03em; margin-top: 36px; }
.book { background: var(--panel); }
.book-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 70px; align-items: center; }
.book-copy h2 { max-width: 700px; }
.edition-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.edition-group { border: 1px solid var(--line); background: rgba(255,255,255,.015); padding: 20px; }
.edition-group h3 { margin: 0 0 14px; font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: 1.25rem; }
.edition-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.06); font-size: .88rem; }
.status { color: var(--cyan); text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; align-self: center; }
.microcopy { color: #758487; font-size: .78rem; line-height: 1.6; margin-top: 16px; }
.cover-web { display:block; width:100%; height:auto; min-height:0 !important; object-fit:contain; background:none !important; border:1px solid rgba(156,232,228,.22); box-shadow:0 26px 60px rgba(0,0,0,.38); }
.excerpt-section { background: #050b0e; }
.excerpt-card { margin-top: 28px; border-left: 2px solid var(--cyan); padding: 30px 32px; background: rgba(255,255,255,.02); }
.excerpt-card p { font-family: Georgia, 'Times New Roman', serif; color: #d8e1e0 !important; line-height: 1.9 !important; font-size: 1.06rem !important; }
.excerpt-meta { font-family: Inter, Arial, sans-serif !important; color: #7e9395 !important; font-size: .75rem !important; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 25px; }
.excerpt-end { color: #fff !important; }
.goodnews-home { background: linear-gradient(180deg, #081014, #071114); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 36px; }
.section-heading-row h2 { margin-bottom: 18px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-card { display: block; min-height: 300px; padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.018); transition: .2s ease; }
.news-card:hover { transform: translateY(-3px); border-color: rgba(156,232,228,.35); background: rgba(255,255,255,.03); }
.news-topic { display: block; color: var(--cyan); font-size: .66rem; letter-spacing: .13em; margin-bottom: 22px; }
.news-card h3 { font-family: "Barlow Condensed", sans-serif; font-size: 1.75rem; line-height: 1.05; margin: 0 0 16px; text-transform: uppercase; }
.news-card p { font-size: .9rem !important; line-height: 1.65 !important; }
.read-more { display: inline-block; margin-top: 12px; font-size: .7rem; letter-spacing: .12em; color: #d9efed; }
.author-section { max-width: 1100px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; }
.author-copy { max-width: 650px; }
.author-copy h2 { margin-bottom: 28px; }
.author-lead { font-size: 1.25rem !important; line-height: 1.7 !important; color: #e7f3f3 !important; margin-bottom: 28px; }
.author-copy p { line-height: 1.8; margin-bottom: 22px; }
.author-question { font-size: 1.25rem !important; font-weight: 600; color: #8fe7df !important; margin: 30px 0; }
.author-copy a { color: #8fe7df; }
.author-copy a:hover { text-decoration: underline; }
.author-visual { position:relative; width: 100%; max-width: 390px; justify-self: end; overflow:hidden; border:1px solid rgba(143,231,223,.28); box-shadow:0 22px 55px rgba(0,0,0,.35); background:#061014; }
.author-visual img { display: block; width: 100%; height: auto; border:0; filter:brightness(1.12) contrast(1.12); }
.author-visual::after { content:"JASON BARKLEY"; position:absolute; left:0; right:0; bottom:0; padding:34px 18px 16px; background:linear-gradient(transparent, rgba(0,0,0,.88)); color:#fff; font-family:"Barlow Condensed",sans-serif; font-size:1.55rem; font-weight:700; letter-spacing:.13em; text-align:center; text-shadow:0 2px 8px #000; pointer-events:none; }
.goodnews-page { padding-top: 150px; }
.goodnews-intro { max-width: 820px; }
.goodnews-list { margin-top: 50px; display: grid; gap: 18px; }
.goodnews-list .news-card { min-height: auto; }
.article-wrap { max-width: 820px; margin: auto; }
.article-kicker { color: var(--cyan); letter-spacing: .16em; font-size: .7rem; text-transform: uppercase; }
.article-title { font-family: "Barlow Condensed", sans-serif; font-size: clamp(3.2rem, 8vw, 6rem); line-height: .92; text-transform: uppercase; margin: 18px 0 24px; }
.article-deck { font-size: 1.2rem; line-height: 1.65; color: #c4d1d1; }
.article-body { margin-top: 42px; }
.article-body h2 { font-size: 2.2rem; line-height: 1; margin-top: 48px; }
.article-body p { color: #b6c4c5; font-size: 1.02rem; line-height: 1.85; }
.stage-box { margin: 34px 0; padding: 20px 22px; border: 1px solid var(--line); background: #081216; }
.stage-label { color: var(--cyan); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.source-box { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line); color: #92a4a5; font-size: .88rem; line-height: 1.7; }
.source-box a { color: var(--cyan); text-decoration: underline; }
.plastophage-connection { margin-top: 40px; padding: 24px; border-left: 2px solid var(--cyan); background: rgba(156,232,228,.04); }
footer { display: flex; justify-content: space-between; align-items:center; gap: 22px; padding: 34px 7vw; font-size: .88rem; line-height:1.5; color: #a7b8ba; border-top: 1px solid rgba(255,255,255,.10); }
footer a { color:#c4d5d6; }
footer a:hover { color:var(--cyan); }
@media (max-width: 980px) {
  .nav nav > a { display: none; }
  .nav nav .lang { display: flex; }
  .book-grid, .author-section { grid-template-columns: 1fr; gap: 45px; }
  .author-visual { justify-self: center; }
  .news-grid { grid-template-columns: 1fr; }
  .edition-groups { grid-template-columns: 1fr; }
  .section-heading-row { align-items: flex-start; flex-direction: column; }
  .cover-web { max-width: 460px; width: 100%; margin: auto; }
}
/* ============================================================
   Menu mobile (hamburger) — struttura iniettata da menu.js
   ============================================================ */

/* Desktop: il wrapper dei link non deve toccare il layout esistente. */
.nav .nav-links { display: contents; }
.nav-toggle { display: none; }

@media (max-width: 980px) {
  /* Pulsante hamburger nella barra, accanto alle pill IT/EN. */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(0, 0, 0, .18);
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle:hover { border-color: rgba(156, 232, 228, .45); }
  .nav-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

  .nav-toggle-box { position: relative; display: block; width: 18px; height: 12px; }
  .nav-toggle-box span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: top .25s ease, transform .25s ease, opacity .15s ease;
  }
  .nav-toggle-box span:nth-child(1) { top: 0; }
  .nav-toggle-box span:nth-child(2) { top: 5px; }
  .nav-toggle-box span:nth-child(3) { top: 10px; }
  .nav.nav-open .nav-toggle-box span:nth-child(1) { top: 5px; transform: rotate(45deg); }
  .nav.nav-open .nav-toggle-box span:nth-child(2) { opacity: 0; }
  .nav.nav-open .nav-toggle-box span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

  /* Pannello a tendina sotto la barra: sono i link di sezione raggruppati. */
  .nav .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(4, 9, 12, .98), rgba(4, 9, 12, .96));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 50px rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
  }
  .nav.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity .22s ease, transform .22s ease, visibility 0s;
  }
  .nav .nav-links > a {
    display: block;
    padding: 14px 22px;
    font-size: .82rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #dbe9e8;
    border-top: 1px solid var(--line);
  }
  .nav .nav-links > a:first-child { border-top: 0; }
  .nav .nav-links > a:hover,
  .nav .nav-links > a:focus-visible {
    color: var(--cyan);
    background: rgba(156, 232, 228, .06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-box span,
  .nav .nav-links { transition: none; }
}

@media (max-width: 760px) {
  .nav { padding: 15px 5vw; }
  .nav nav { gap: 8px; }
  .hero { background-position: 85% 55%; }
  .hero-content { padding: 0 24px 9vh; width: 100%; max-width: 100%; }
  .hero h1 { font-size: clamp(3.2rem, 15vw, 5rem); line-height: .9; }
  .subtitle { font-size: 1.45rem; }
  .section { padding: 80px 6vw; }
  .excerpt-card { padding: 24px 20px; }
  footer { flex-direction: column; align-items: center; text-align: center; gap: 14px; font-size:.94rem; padding:32px 7vw; }
  footer a, footer span { width: 100%; }
}
@media (max-width: 480px) {
  /* Schermi molto stretti: ancora il ritaglio al bordo destro della foto,
     dove sta la figura, così resta sempre interamente in campo. */
  .hero { background-position: 100% 55%; }
}
