/* ============================================================
   GrowYourTribe — Blog design system (dark luxe)
   Riusa lo stesso linguaggio della landing: Fraunces + Hanken,
   palette espresso/oro/smeraldo, decorazioni ambientali.
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/Fraunces-latin.woff2') format('woff2'); font-weight: 300 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('/assets/fonts/HankenGrotesk-latin.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  --bg: #12100C; --bg-alt: #1A160F; --card: #201B13;
  --ink: #F1E8D7; --ink-soft: #C7BAA4; --muted: #94876F;
  --gold: #C6A96B; --terra: #C0703F;
  --cta: #1F7A5E; --cta-deep: #17654D; --cta-ink: #F4EBD8; --jungle: #8B9A6C;
  --line: rgba(241,232,215,0.13);
  --sans: 'Hanken Grotesk', Helvetica, Arial, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}
body { font-family: var(--sans); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 720px; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 1.2rem; }

/* ---------- NAV ---------- */
nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 2rem; background: rgba(18,16,12,0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
nav .logo svg { height: 44px; width: auto; display: block; }
nav .logo svg text { fill: currentColor; }
nav .logo .logo-tri { fill: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 1.1rem; }
.lang-switcher { display: flex; align-items: center; gap: 0.4rem; }
.lang-btn { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; opacity: 0.6; transition: opacity 0.2s; }
.lang-btn:hover, .lang-active { opacity: 1; }
.lang-sep { opacity: 0.35; font-size: 0.78rem; }
.nav-cta { background: var(--cta); color: var(--cta-ink); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.01em;
  padding: 0.6rem 1.2rem; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 16px -4px rgba(31,122,94,0.5);
  transition: background 0.2s, transform 0.2s; }
.nav-cta:hover { background: var(--cta-deep); transform: translateY(-1px); }

/* ---------- BUTTONS ---------- */
.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--cta); color: var(--cta-ink);
  font-weight: 500; letter-spacing: 0.01em; padding: 0.95rem 2rem; border-radius: 0.6rem; font-size: 0.98rem;
  box-shadow: 0 6px 22px -6px rgba(31,122,94,0.55), inset 0 1px 0 rgba(255,255,255,0.12); transition: background 0.2s, transform 0.2s; }
.btn-primary:hover { background: var(--cta-deep); transform: translateY(-1px); }
.btn-secondary { display: inline-flex; align-items: center; gap: 0.5rem; background: transparent; color: var(--ink); font-weight: 500;
  padding: 0.9rem 1.75rem; border-radius: 0.6rem; font-size: 0.98rem; border: 1px solid rgba(198,169,107,0.45); transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.btn-secondary:hover { background: rgba(198,169,107,0.1); border-color: var(--gold); transform: translateY(-1px); }
.link-back { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.link-back:hover { color: var(--gold); }

/* ---------- DECORAZIONI AMBIENTALI ---------- */
.deco-grain { position: absolute; inset: -50%; opacity: 0.05; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.deco-glow { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }

/* ---------- BLOG: HEADER LISTA ---------- */
.blog-head { position: relative; overflow: hidden; padding: 5.5rem 0 3rem; border-bottom: 1px solid var(--line); }
.blog-head .glow-a { left: -6vmax; top: -8vmax; width: 42vmax; height: 42vmax; background: radial-gradient(circle, rgba(150,105,55,0.22), transparent 66%); }
.blog-head .glow-b { right: -8vmax; bottom: -14vmax; width: 34vmax; height: 34vmax; background: radial-gradient(circle, rgba(31,122,94,0.14), transparent 66%); }
.blog-head .container { position: relative; z-index: 1; }
.blog-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.06; letter-spacing: -0.006em; text-wrap: balance; max-width: 16ch; }
.blog-head p { color: var(--ink-soft); font-size: clamp(1.05rem, 1.5vw, 1.22rem); line-height: 1.7; max-width: 560px; margin-top: 1.3rem; }

/* ---------- BLOG: GRIGLIA POST ---------- */
.posts { padding: 3.5rem 0 6rem; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s; }
.post-card:hover { border-color: rgba(198,169,107,0.4); box-shadow: 0 22px 50px -30px rgba(120,70,35,0.7); transform: translateY(-3px); }
.post-card__cover { aspect-ratio: 3 / 2; overflow: hidden; }
.post-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.post-card:hover .post-card__cover img { transform: scale(1.05); }
.post-card__body { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.5rem 1.4rem 1.6rem; flex: 1; }
.post-tag { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
/* Titolo: max 3 righe, spazio riservato costante → card tutte uguali */
.post-card__body h2, .post-card__body h3 { font-family: var(--serif); font-weight: 500; font-size: 1.28rem; line-height: 1.24; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.24em * 3); }
/* Estratto (esclude la meta): max 2 righe, altezza riservata */
.post-card__body p:not(.post-meta) { font-size: 0.9rem; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.6em * 2); }
.post-meta { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; margin-top: auto; }
.post-read { font-size: 0.85rem; color: var(--gold); font-weight: 600; margin-top: 0.2rem; }

/* ---------- ARTICOLO ---------- */
.article-head { position: relative; overflow: hidden; padding: 3rem 0 2.4rem; }
.article-head .glow-a { left: 50%; top: -10vmax; transform: translateX(-50%); width: 60vmax; height: 40vmax; background: radial-gradient(circle, rgba(198,169,107,0.12), transparent 68%); }
.article-head .container { position: relative; z-index: 1; }
.article-head .post-tag { display: block; margin: 1.6rem 0 1rem; }
.article-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.006em; text-wrap: balance; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.1rem; margin-top: 1.6rem; color: var(--muted); font-size: 0.88rem; }
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.article-author { display: flex; align-items: center; gap: 0.6rem; }
.article-author .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--terra), var(--gold)); display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; color: #1a130b; }
.article-cover { margin: 0 auto 2.8rem; max-width: 1000px; }
.article-cover img { width: 100%; border-radius: 1rem; aspect-ratio: 16 / 8; object-fit: cover; }
.article-cover figcaption { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 0.7rem; }

/* Corpo long-form */
.prose { font-size: 1.12rem; line-height: 1.85; color: var(--ink-soft); overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.4rem; }
.prose .lead { font-size: 1.32rem; line-height: 1.6; color: var(--ink); font-weight: 300; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; color: var(--ink); margin-top: 2.8rem; letter-spacing: -0.004em; }
.prose h3 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; color: var(--ink); margin-top: 2rem; }
.prose p { text-wrap: pretty; }
.prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(198,169,107,0.4); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-top: 0.6rem; }
.prose li::marker { color: var(--gold); }
.prose blockquote { border-left: 2px solid var(--gold); padding: 0.4rem 0 0.4rem 1.5rem; margin: 2rem 0; font-family: var(--serif); font-weight: 300; font-size: 1.5rem; line-height: 1.4; color: var(--ink); font-style: italic; }
.prose figure { margin: 2.4rem 0; }
.prose figure img { border-radius: 0.8rem; }
.prose figcaption { text-align: center; font-size: 0.82rem; color: var(--muted); margin-top: 0.7rem; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.6rem 0; }

/* CTA di fine articolo */
.article-cta { position: relative; overflow: hidden; margin: 4rem auto 0; max-width: 720px; text-align: center; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 1.2rem; padding: 3rem 2rem; }
.article-cta .glow-a { left: 50%; top: 20%; transform: translateX(-50%); width: 40vmax; height: 24vmax; background: radial-gradient(circle, rgba(31,122,94,0.18), transparent 66%); }
.article-cta > * { position: relative; z-index: 1; }
.article-cta h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; margin-bottom: 0.8rem; }
.article-cta p { color: var(--ink-soft); max-width: 460px; margin: 0 auto 1.6rem; }

/* Articoli correlati */
.related { padding: 5rem 0 6rem; border-top: 1px solid var(--line); margin-top: 5rem; }
.related h2 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; margin-bottom: 2rem; }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--line); padding: 2.5rem 0; text-align: center; color: var(--muted); font-size: 0.85rem; }
footer a:hover { color: var(--gold); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  nav { padding: 0.8rem 1.2rem; }
  nav .logo svg { height: 38px; }
  .posts-grid { grid-template-columns: 1fr; gap: 1.3rem; }
  .article-cover img { aspect-ratio: 4 / 3; }
}
