/* ============================================================
   LA GUIDA DEL BENESSERE — style.css
   ============================================================ */

/* ── GOOGLE FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500;1,9..144,600&family=Inter:wght@400;500;600;700&display=swap');

/* ── ROOT VARIABLES ───────────────────────────────────────── */
:root {
  --color-bg:         #faf6f2;
  --color-dark:       #2b2422;
  --color-accent:     #8c5e6b;
  --color-accent-mid: #6b4451;
  --color-warm:       #f0e1de;
  --color-tan:        #d9bfc2;
  --color-text:       #2f2a28;
  --color-muted:      #756f6b;
  --color-border:     #e6dad5;
  --color-accent-soft: rgba(140,94,107,0.10);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --nav-h:    0px; /* no sticky nav in this mode */
  --max-article: 720px;
  --max-wide:   1000px;

  --radius: 14px;
  --transition: 0.25s ease;
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--color-accent-mid); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }

/* ── CONTAINER ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-article);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}
.container--wide {
  max-width: var(--max-wide);
}

/* ── ON-DARK SCOPE ────────────────────────────────────────── */
.on-dark { color: rgba(255,255,255,0.85); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark p { color: rgba(255,255,255,0.75); }
.on-dark a:not(.btn) { color: rgba(255,255,255,0.9); }

/* ── PHOTO PLACEHOLDER ────────────────────────────────────── */
.photo-placeholder {
  background: linear-gradient(135deg, #ff6eb4, #ff3d9a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 260px;
  border-radius: inherit;
}
.photo-placeholder__icon { font-size: 32px; }
.photo-placeholder__label {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: sans-serif;
  text-align: center;
  padding: 0 16px;
}

/* ── ADVERTORIAL DISCLOSURE BAR ───────────────────────────── */
.disclosure-bar {
  background: var(--color-warm);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  padding: 8px 20px;
}
.disclosure-bar p {
  font-size: 12px;
  color: var(--color-muted);
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

/* ── ARTICLE HEADER ───────────────────────────────────────── */
.article-header {
  padding: 52px 0 32px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}
.article-header .container { max-width: var(--max-article); }

.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.article-header h1 em {
  font-style: italic;
  color: var(--color-accent);
}

/* ── BYLINE / AUTHOR ──────────────────────────────────────── */
.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.author-avatar {
  display: inline-flex;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  border: 2px solid var(--color-border);
}
.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.byline__text { display: flex; flex-direction: column; gap: 2px; }
.byline__name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-dark);
}
.byline__bio {
  font-size: 13px;
  color: var(--color-muted);
  font-style: italic;
}
.byline__meta {
  font-size: 12px;
  color: var(--color-muted);
  margin-left: auto;
}

/* ── ARTICLE BODY ─────────────────────────────────────────── */
.article-body {
  padding: 48px 0 64px;
}
.article-body .container { max-width: var(--max-article); }

.article-body p {
  margin-bottom: 22px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--color-text);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 700;
  color: var(--color-dark);
  margin: 52px 0 20px;
  line-height: 1.25;
  padding-top: 20px;
  border-top: 2px solid var(--color-border);
}

.article-body h2:first-of-type {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-dark);
  margin: 32px 0 12px;
}

/* ── INLINE FIGURE ────────────────────────────────────────── */
.article-body figure {
  margin: 36px 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.article-body figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

/* ── CHAPTER DIVIDER ──────────────────────────────────────── */
.chapter-divider {
  text-align: center;
  margin: 40px 0;
  color: var(--color-border);
  font-size: 20px;
  letter-spacing: 12px;
}

/* ── INLINE CTA ───────────────────────────────────────────── */
.inline-cta {
  background: var(--color-dark);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.inline-cta p {
  margin: 0;
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  flex: 1 1 200px;
}
.inline-cta strong { color: #fff; }
.inline-cta a.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1.5px solid rgba(255,255,255,0.5);
  padding: 11px 22px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: border-color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.inline-cta a.cta-link:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
}
.inline-cta a.cta-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── FACTS TABLE ──────────────────────────────────────────── */
.facts {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px;
  margin: 36px 0;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(43,36,34,0.06);
}
.facts__row {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  border-radius: calc(var(--radius) - 8px);
  transition: background var(--transition);
}
.facts__row:last-child { border-bottom: none; }
.facts__row:hover { background: var(--color-accent-soft); }
.facts dt {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-accent-mid);
  background: transparent;
  padding: 16px 10px 16px 18px;
  width: 38%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--color-border);
  position: relative;
}
.facts dt::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: var(--color-accent);
}
.facts dd {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  padding: 16px 18px;
  flex: 1;
  display: flex;
  align-items: center;
}

/* ── BADGE ROW ────────────────────────────────────────────── */
.badge-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
  margin: 36px 0;
  padding: 28px 24px;
  background: var(--color-warm);
  border-radius: var(--radius);
}
.badge-row__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.badge-row__item svg {
  width: 26px;
  height: 26px;
  padding: 7px;
  box-sizing: content-box;
  color: var(--color-accent-mid);
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(43,36,34,0.07);
}
.badge-row__label {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-dark);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-section {
  padding: 56px 0;
  border-top: 1px solid var(--color-border);
}
.faq-section h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 30px);
  color: var(--color-dark);
  margin-bottom: 32px;
  font-weight: 700;
}
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item:first-of-type { border-top: 1px solid var(--color-border); }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-dark);
  list-style: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.faq-question::after {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238c5e6b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
}
.faq-item.faq--open .faq-question::after {
  transform: rotate(180deg);
}
.faq-answer {
  display: none;
  padding: 0 0 20px;
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.75;
}
.faq-item.faq--open .faq-answer {
  display: block;
}

/* ── CLOSING CTA ──────────────────────────────────────────── */
.closing-cta {
  padding: 56px 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.closing-cta .container { max-width: var(--max-article); }
.closing-cta__eyebrow {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 14px;
  display: block;
}
.closing-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 32px);
  color: var(--color-dark);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.25;
}
.closing-cta p {
  font-size: 16px;
  color: var(--color-muted);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.btn-external {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-accent-mid);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 15px 32px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  overflow: hidden;
}
.btn-external:hover {
  background: var(--color-accent);
  color: #fff;
}
.btn-external svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.closing-cta__price {
  display: block;
  margin-top: 16px;
  font-size: 14px;
  color: var(--color-muted);
}

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.65);
  padding: 40px 0;
}
.site-footer .container { max-width: var(--max-article); }

.footer-brand {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.footer-links {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
  line-height: 2;
}
.footer-links a {
  color: rgba(255,255,255,0.65);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin: 0 4px;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.footer-sep {
  color: rgba(255,255,255,0.25);
  margin: 0 4px;
  user-select: none;
}

.footer-disclosure {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  margin-top: 8px;
}
.footer-disclosure p { margin-bottom: 10px; }
.footer-disclosure p:last-child { margin-bottom: 0; }

.footer-copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ── COOKIE CONSENT BANNER ────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: var(--color-dark);
  color: rgba(255,255,255,0.85);
  padding: 20px 24px;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.25);
  display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner__inner {
  max-width: 900px;
  margin: 0 auto;
}
.cookie-banner__text {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
  line-height: 1.6;
}
.cookie-banner__text a {
  color: rgba(255,255,255,0.9);
}
.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.cookie-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.cookie-btn--accept {
  background: var(--color-accent);
  color: #fff;
}
.cookie-btn--accept:hover { background: var(--color-accent-mid); }
.cookie-btn--reject {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.3);
}
.cookie-btn--reject:hover { border-color: rgba(255,255,255,0.6); }
.cookie-btn--configure {
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.15);
}
.cookie-btn--configure:hover { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.3); }

.cookie-config-panel {
  display: none;
  margin-top: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px;
}
.cookie-config-panel.is-open { display: block; }
.cookie-config-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
.cookie-config-row:last-child { border-bottom: none; }
.cookie-config-row label { display: flex; flex-direction: column; gap: 2px; }
.cookie-config-row .cat-name { font-weight: 600; color: rgba(255,255,255,0.9); }
.cookie-config-row .cat-desc { font-size: 11px; color: rgba(255,255,255,0.45); }

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-track::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}
.toggle-switch input:checked + .toggle-track { background: var(--color-accent); }
.toggle-switch input:checked + .toggle-track::before { transform: translateX(16px); }
.toggle-switch input:disabled + .toggle-track { cursor: not-allowed; opacity: 0.5; }

.cookie-save-btn {
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}
.cookie-save-btn:hover { background: var(--color-accent-mid); }

/* ── SCROLL REVEAL ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── PRIVACY PAGE ─────────────────────────────────────────── */
.legal-page {
  padding: 56px 0 80px;
}
.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  color: var(--color-dark);
  font-weight: 700;
  margin-bottom: 32px;
  line-height: 1.25;
}
.legal-page h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-dark);
  margin: 36px 0 12px;
}
.legal-page p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-muted);
  margin-bottom: 16px;
}
.legal-page ul {
  padding-left: 24px;
  margin-bottom: 16px;
}
.legal-page ul li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-muted);
  margin-bottom: 6px;
}
.legal-page .last-updated {
  font-size: 12px;
  color: var(--color-border);
  margin-bottom: 40px;
  display: block;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .byline { flex-wrap: wrap; }
  .byline__meta { margin-left: 0; margin-top: 4px; width: 100%; }
  .inline-cta { flex-direction: column; align-items: flex-start; }
  .facts dt { width: 44%; font-size: 12px; }
  .facts dd { font-size: 14px; }
  .badge-row { grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 16px; }
  .closing-cta h2 { font-size: 22px; }
  .cookie-banner__actions { flex-direction: column; align-items: flex-start; }
}

/* Progressive-enhancement safety (injected by builder): scroll-reveal blocks stay VISIBLE
   unless JS confirms it can animate them by adding .js-anim to <html>. Guarantees a
   truncated page or a failed script can never leave content permanently hidden. */
html:not(.js-anim) .reveal,
html:not(.js-anim) .reveal-left,
html:not(.js-anim) .reveal-right,
html:not(.js-anim) .reveal-scale,
html:not(.js-anim) .stagger-child {
  opacity: 1 !important;
  transform: none !important;
}
