:root {
  --ink: #1a1f1c;
  --ink-soft: #3d453f;
  --muted: #6b746e;
  --paper: #f7f5f0;
  --paper-deep: #efece4;
  --green: #1e4d3a;
  --green-mid: #2a6b50;
  --gold: #b08d3e;
  --line: rgba(30, 77, 58, 0.12);
  --white: #ffffff;
  --radius: 2px;
  --font-display: "Bodoni Moda", Georgia, serif;
  --font-body: "Figtree", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(176, 141, 62, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(30, 77, 58, 0.06), transparent 45%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(247, 245, 240, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 0.15rem;
}

.logo-mark {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--green);
}

.logo-sub {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.15rem;
}

.nav-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.nav-btn:hover {
  color: var(--green);
}

.nav-btn.is-active {
  color: var(--green);
  border-bottom-color: var(--gold);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    url("images/schiamazzi-230000-euro.png")
      center / cover no-repeat;
  transform: scale(1.05);
  animation: hero-drift 28s var(--ease) infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 31, 28, 0.15) 0%, rgba(26, 31, 28, 0.55) 55%, rgba(26, 31, 28, 0.82) 100%),
    linear-gradient(90deg, rgba(30, 77, 58, 0.25) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 1.5rem 3.5rem;
  color: var(--white);
  animation: rise 1s var(--ease) both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.25);
}

.hero-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.45rem);
  font-weight: 600;
  font-style: normal;
  margin: 0 0 0.85rem;
  max-width: 28ch;
  line-height: 1.2;
  opacity: 0.98;
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 36ch;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
}

.hero-cta {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  background: var(--white);
  color: var(--green);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 0.35s var(--ease), background 0.25s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  background: var(--paper);
}

/* Feed */
.feed {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

.feed-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.feed-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  margin: 0;
  color: var(--green);
  letter-spacing: -0.02em;
}

.feed-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 720px) {
  .articles {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 2.5rem;
  }
}

@media (min-width: 980px) {
  .articles {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-item {
  display: block;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s var(--ease) forwards;
  transition: opacity 0.25s ease;
  text-align: left;
  width: 100%;
}

.article-item:hover .article-headline {
  color: var(--green-mid);
}

.article-item:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

.article-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 1rem;
  background: var(--paper-deep);
  filter: saturate(0.92);
  transition: filter 0.4s var(--ease), transform 0.5s var(--ease);
}

.article-item:hover .article-thumb {
  filter: saturate(1.05);
  transform: scale(1.015);
}

.article-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.45rem;
}

.article-headline {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.55rem;
  letter-spacing: -0.015em;
  transition: color 0.25s var(--ease);
}

.article-excerpt {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-time {
  font-size: 0.8rem;
  color: var(--muted);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.load-more {
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--green);
  color: var(--green);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.load-more:hover {
  background: var(--green);
  color: var(--white);
}

.load-more[hidden] {
  display: none;
}

/* Dedicated article page */
.article-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4.5rem;
}

.article-back {
  display: inline-block;
  margin: 0 0 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
}

.article-back:hover {
  color: var(--gold);
}

.article-page-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
}

.article-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 0.85rem;
  color: var(--green);
  letter-spacing: -0.02em;
}

.article-page-meta {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.article-page-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 1.85rem;
  background: var(--paper-deep);
}

.article-page-body p {
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.article-page-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.2rem;
  float: left;
  line-height: 0.85;
  padding-right: 0.5rem;
  color: var(--green);
  font-weight: 600;
}

.article-page-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--green);
  margin: 2rem 0 0.85rem;
  line-height: 1.3;
  clear: both;
}

.article-page-body a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-page-body a:hover {
  color: var(--gold);
}

.article-page-body .editorial-note {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1.5rem;
  clear: both;
}

.article-not-found {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.article-not-found a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
}

.article-page .nav-btn {
  display: inline-block;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--green);
  color: rgba(255, 255, 255, 0.85);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--white);
}

.footer-note {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift {
  from {
    transform: scale(1.05) translate(0, 0);
  }
  to {
    transform: scale(1.12) translate(-1.5%, -1%);
  }
}

@media (max-width: 719px) {
  .nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .nav-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}
