/* =========================
   HOME.CSS — CLEAN + FRAMER-LIKE (FINAL)
   ✅ Includes:
   - Plan cards styling (Framer-like)
   - Monthly pill = “New Member Offer” (same size/alignment)
   - Prices: old struck + NEW BIG PRICE (WHITE in dark) + /period close
   - Subscribe button centered
   - “Already a member?” (not clickable) + “Sign In” clickable only
   - ✅ 18+ SVG icon centered under social row (same size as social icons)
   - ✅ FIX: 18+ shows ORIGINAL colors in LIGHT mode (no filter)
   - ✅ FIX: in DARK mode swap to /assets/icons/age-18-dark.svg via JS (no filter)
========================= */

/* =========================
   THEME TOKENS
========================= */
:root{
  --text:#0f172a;
  --muted:#667085;
  --line:#e6e8ee;
  --bg:#ffffff;
  --panel:#ffffff;
  --chip:#f2f4f7;
  --shadow: 0 10px 24px rgba(15, 23, 42, .10);

  --font-sans: "Onest", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;

  /* HERO IMAGE */
  --hero-url: url("/assets/hero.jpg");
  --hero-pos: 60% 35%;
  --hero-scale: 1.06;

  /* AVATAR */
  --avatar-size: 85px;
  --avatar-overlap: 44px;
  --avatar-border: 1px solid rgba(255,255,255,.85);
  --avatar-shadow: 0 10px 24px rgba(15, 23, 42, .18);

  /* SOCIAL (also used by 18+ badge sizing) */
  --social-hit: 30px;
  --social-icon: 20px;
  --social-gap: 18px;
  --social-opacity: .92;
  --social-filter: invert(1) brightness(.25);

  /* ✅ 18+ SVG: keep original colors in light mode */
  --age-filter: none;

  /* SUPPORT */
  --support-contrast: #111827;
  --support-muted: #6b7280;
  --support-border: #e5e7eb;
  --support-card: #ffffff;
  --support-top: #f8fafc;

  --support-active-top: #d9fffb;
  --support-active-border: #22c7b8;
  --support-check: #0ea5a0;

  --support-tag-bg: #34d399;
  --support-tag-text: #064e3b;

  /* PRICE COLORS */
  --price-new: #0f172a; /* light mode */
  --price-old: #9aa3b2;
}

:root[data-theme="dark"]{
  --text:#eaeef6;
  --muted:rgba(234,238,246,.72);
  --line:rgba(255,255,255,.10);
  --bg:#0b0b0f;
  --panel:rgba(255,255,255,.06);
  --chip:rgba(255,255,255,.08);
  --shadow: 0 18px 60px rgba(0,0,0,.55);

  --avatar-border: 1px solid rgba(255,255,255,.75);
  --avatar-shadow: 0 16px 36px rgba(0,0,0,.45);

  /* keep social icons as-is in dark (your current setup) */
  --social-filter: none;

  --support-contrast: var(--text);
  --support-muted: var(--muted);
  --support-border: rgba(255,255,255,.10);
  --support-card: rgba(255,255,255,.06);
  --support-top: rgba(255,255,255,.08);

  --support-active-top: rgba(34,199,184,.18);
  --support-active-border: rgba(34,199,184,.85);
  --support-check: #22c7b8;

  --support-tag-bg: #34d399;
  --support-tag-text: #062b2a;

  /* ✅ dark mode: NEW price must be WHITE */
  --price-new: #ffffff;
  --price-old: rgba(234,238,246,.45);

  /* ✅ still no filter: we swap svg file instead (JS) */
  --age-filter: none;
}

/* =========================
   BASE
========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x:hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

a{ color:inherit; text-decoration:none; }
.hidden{ display:none; }
.center{ text-align:center; }
.muted{ color:var(--muted); }

/* =========================
   TOPBAR
========================= */
.topbar{
  position:sticky;
  top:0;
  z-index:10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}

.topbar__inner{
  width:min(1200px, 94vw);
  margin:0 auto;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{ font-weight:700; font-size:14px; }

.topbar__nav{
  display:flex;
  gap:16px;
  font-size:13px;
  color: color-mix(in srgb, var(--text) 80%, transparent);
}
.topbar__nav a{ opacity:.9; }
.topbar__nav a:hover{ opacity:1; }

.topbar__right{
  display:flex;
  gap:10px;
  align-items:center;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:30px;
  padding:0 10px;
  border-radius:8px;
  border:1px solid var(--line);
  background: var(--panel);
  font-size:12px;
  font-weight:600;
  color: var(--text);
}
.btn--ghost{ background: var(--panel); }

.btn--black{
  background:#111827;
  color:#fff;
  border-color:#111827;
}
:root[data-theme="dark"] .btn--black{
  background:#ffffff;
  color:#0b0b0f;
  border-color:#ffffff;
}

.btn--full{ width:100%; }

.iconbtn{
  width:30px;
  height:30px;
  border-radius:8px;
  border:1px solid var(--line);
  background: var(--panel);
  cursor:pointer;
  color: var(--text);
}

/* =========================
   HERO
========================= */
.heroimg{
  height:220px;
  position:relative;
  overflow:hidden;
  border-bottom:1px solid var(--line);
  background: var(--bg);
  z-index:1;
}
.heroimg__media{
  position:absolute;
  inset:0;
  background-image: var(--hero-url);
  background-size: cover;
  background-position: var(--hero-pos);
  background-repeat:no-repeat;
  transform: scale(var(--hero-scale));
  transform-origin:center;
  filter: saturate(1.05) contrast(1.03);
  z-index:0;
}
.heroimg::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.10) 0%,
    rgba(0,0,0,.18) 40%,
    rgba(0,0,0,.55) 100%
  );
  pointer-events:none;
  z-index:1;
}
:root[data-theme="dark"] .heroimg::after{
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.22) 0%,
    rgba(0,0,0,.35) 45%,
    rgba(0,0,0,.75) 100%
  );
}

/* =========================
   LAYOUT
========================= */
.page{ padding:0 0 40px; }
.wrap{
  width:min(520px, 92vw);
  margin:-54px auto 0;
}

/* =========================
   PROFILE
========================= */
.profile{
  text-align:center;
  position:relative;
  z-index:3;
  margin-top: calc(var(--avatar-overlap) * -1);
}
.avatar{
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius:999px;
  object-fit:cover;
  display:block;
  margin:0 auto;
  position:relative;
  z-index:4;
  border: var(--avatar-border);
  box-shadow: var(--avatar-shadow);
}
.name{ margin:10px 0 6px; font-size:18px; }
.bio{
  margin:0 auto;
  max-width:420px;
  font-size:12px;
  color:var(--muted);
  line-height:1.45;
}

/* SOCIAL */
.social{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: var(--social-gap);
  margin-top:12px;
}
.social__icon{
  width: var(--social-hit);
  height: var(--social-hit);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: transparent;
  border:0;
  padding:0;
  opacity: var(--social-opacity);
  transition: opacity .12s ease, transform .12s ease;
}
.social__icon:hover{ opacity:1; transform: translateY(-1px); }
.social__icon img{
  width: var(--social-icon);
  height: var(--social-icon);
  display:block;
  filter: var(--social-filter);
}

/* ✅ 18+ badge (centered under socials, same sizing)
   - light mode: original svg colors
   - dark mode: swapped via JS to age-18-dark.svg
*/
.ageBadge{
  margin-top: 10px;
  display:flex;
  justify-content:center;
  align-items:center;
}
.ageBadge__icon{
  width: var(--social-icon);
  height: var(--social-icon);
  display:block;
  filter: var(--age-filter); /* none */
  opacity: .92;
  /* evita “salti”/distorsioni */
  object-fit: contain;
}

.about{
  margin:14px auto 0;
  max-width:460px;
  font-size:12px;
  color: color-mix(in srgb, var(--text) 82%, transparent);
  line-height:1.55;
}

/* =========================
   SUPPORT (Full-bleed)
========================= */
.support{
  width:100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 72px 16px;
  background: transparent;
}

.supportTitle{
  margin: 0 0 46px;
  text-align:center;
  font-size:40px;
  line-height:1.15;
  letter-spacing:-.02em;
  font-weight:700;
  color: var(--support-contrast);
}

.supportLayout{
  max-width: 980px;
  margin: 0 auto;
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 70px;
  align-items:start;
}

.supportKicker{
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color: var(--support-muted);
  margin-bottom:10px;
}
.supportHeadline{
  margin: 0 0 22px;
  font-size:24px;
  line-height:1.35;
  letter-spacing:-.01em;
  font-weight:650;
  color: var(--support-contrast);
  max-width:520px;
}

.benefitsList{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:22px;
  max-width:520px;
}
.benefitRow{
  display:grid;
  grid-template-columns:16px 1fr;
  gap:14px;
  align-items:start;
}
.benefitCheck{
  color:#10b981;
  font-weight:900;
  font-size:15px;
  line-height:1;
  margin-top:2px;
}
.benefitName{
  font-weight:650;
  color: var(--support-contrast);
  margin-bottom:4px;
}
.benefitDesc{
  font-size:12px;
  line-height:1.5;
  color: var(--support-muted);
}

.supportRight{
  width: 484px;
  max-width:100%;
}
.planKicker{
  font-size:13px;
  font-weight:500;
  color: var(--support-contrast);
  margin-bottom:10px;
}

.plans2{ display:grid; gap:16px; }

/* =========================
   PLAN CARDS
========================= */
.plan2{
  width:100%;
  text-align:left;
  border:1px solid var(--support-border);
  border-radius:12px;
  background: var(--support-card);
  padding:0;
  overflow:hidden;
  cursor:pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .06s ease;
}
.plan2:active{ transform: translateY(1px); }

/* Top band */
.plan2Top{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  padding: 10px 14px 10px;
  gap: 8px;
  border-bottom:1px solid color-mix(in srgb, var(--support-border) 70%, transparent);
  background: var(--support-top);
}

.plan2TopRow{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:-2px;
}
.plan2Spacer{ flex:1; }

/* Title in TOP band */
.plan2TopTitle{
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--support-contrast);
}

/* Pills */
.plan2Tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 12px;
  border-radius:999px;
  font-size:11px;
  font-weight:500;
  line-height:1;
  background: var(--support-tag-bg);
  color: var(--support-tag-text);
  white-space:nowrap;
}

/* Monthly: ghost -> real pill */
.plan2Tag--ghost{ visibility:hidden; }

.plan2[data-plan="monthly"] .plan2Tag--ghost{
  visibility: visible;
  font-size: 0;
  padding:4px 12px;
  background: var(--support-tag-bg);
  color: var(--support-tag-text);
}

.plan2[data-plan="monthly"] .plan2Tag--ghost::before{
  content:"New Member Offer";
  font-size:11px;
  font-weight:500;
  line-height:1;
  white-space:nowrap;
}

/* Check box */
.plan2Check{
  width:26px;
  height:26px;
  border-radius:8px;
  border:1px solid color-mix(in srgb, var(--support-border) 90%, transparent);
  background: color-mix(in srgb, var(--support-card) 85%, transparent);
  display:inline-grid;
  place-items:center;
}

/* Active */
.plan2.is-active{
  border-color: var(--support-active-border);
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
}
.plan2.is-active .plan2Top{
  background: var(--support-active-top);
  border-bottom-color: color-mix(in srgb, var(--support-active-border) 35%, transparent);
}
.plan2.is-active .plan2Check{
  border-color: var(--support-check);
  background: var(--support-check);
}
.plan2.is-active .plan2Check::before{
  content:"✓";
  color:#062b2a;
  font-weight:900;
  font-size:14px;
}
:root[data-theme="dark"] .plan2.is-active .plan2Check::before{
  color:#041a19;
}

/* =========================
   BODY + PRICES
========================= */
.plan2Body{
  padding: 12px 16px 14px;
  background: transparent;
}

.plan2Row{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.plan2Meta{ display:none; }

.plan2Prices{
  display:flex;
  align-items:baseline;
  gap: 10px;
  flex-wrap:nowrap;
  justify-content:flex-end;
  text-align:right;
  margin-left:auto;
}

.plan2Old{
  font-size: 14px;
  color: var(--price-old);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.plan2New{
  font-size: 20px;
  font-weight: 700;
  color: var(--price-new);
  white-space: nowrap;
}

.plan2Per{
  font-size: 13px;
  color: var(--support-muted);
  white-space: nowrap;
  margin-left: 2px;
}

.plan2Note{
  font-size: 12px;
  line-height: 1.45;
  color: var(--support-muted);
  font-weight: 400;
}

/* =========================
   Cancel note
========================= */
.cancelNote{
  margin: 14px 0 16px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--support-muted);
}

/* =========================
   Subscribe button
========================= */
.support .btn--full{
  display:flex;
  width:100%;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  justify-content:center;
  align-items:center;
}

/* =========================
   Already a member block
========================= */
.already{
  margin-top: 14px;
  text-align:center;
  font-size: 12px;
  line-height: 1.25;
  color: var(--support-muted);
}
.alreadyTitle{
  margin-bottom:6px;
  font-weight:600;
  color: var(--support-contrast);
  opacity:.85;
  pointer-events:none;
}
.smalllink{
  display:inline-block;
  font-weight:650;
  color: var(--support-muted);
}
.smalllink:hover{ text-decoration: underline; }

/* =========================
   Quote
========================= */
.support .quote{
  max-width: 980px;
  margin: 16px auto 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 14px;
  display:flex;
  gap:12px;
  align-items:center;
}
.quote__avatar{
  width:34px;
  height:34px;
  border-radius:999px;
  object-fit:cover;
}
.quote__text p{
  margin:4px 0 0;
  font-size:13px;
  color: color-mix(in srgb, var(--text) 82%, transparent);
  line-height:1.45;
}

/* =========================
   POSTS
========================= */
.posts{ margin-top:22px; }
.postsTitle{
  text-align:center;
  font-size:13px;
  margin:16px 0 10px;
}
.searchbar{
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 10px;
  display:flex;
  align-items:center;
  gap:10px;
  background: var(--panel);
}
.searchbar__icon{
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}
.searchbar input{
  border:0;
  outline:0;
  width:100%;
  font-size:12px;
  background: transparent;
  color: var(--text);
}
.postsList{
  margin-top:12px;
  display:grid;
  gap:12px;
}
.postCard{
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background: var(--panel);
  cursor:pointer;
}
.postThumb{
  position:relative;
  aspect-ratio: 16 / 9;
  background: color-mix(in srgb, var(--chip) 72%, transparent);
}
.postThumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.lockOverlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}
.lockPill{
  font-size:11px;
  font-weight:900;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border:1px solid color-mix(in srgb, var(--text) 10%, transparent);
  padding:6px 10px;
  border-radius:999px;
  box-shadow: 0 8px 20px rgba(15,23,42,.12);
}
.postBody{ padding:10px 12px 12px; }
.postTitle{ margin:0 0 4px; font-size:12px; font-weight:900; }
.postMeta{ font-size:11px; color:var(--muted); line-height:1.35; }

/* =========================
   FOOTER
========================= */
.footer{
  margin-top:26px;
  border-top:1px solid var(--line);
  padding-top:16px;
}
.footer__left{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:12px;
  margin-bottom:12px;
}
.miniIcons{
  display:flex;
  gap:8px;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}
.newsletter{ display:flex; gap:10px; }
.newsletter input{
  flex:1;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 12px;
  font-size:12px;
  background: var(--panel);
  color: var(--text);
}
.footer__bottom{
  margin-top:12px;
  font-size:11px;
  display:flex;
  justify-content:center;
  gap:8px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px){
  .supportLayout{ grid-template-columns: 1fr; gap: 34px; }
  .supportTitle{ font-size: 34px; margin-bottom: 36px; }
  .supportRight{ width: 100%; }
  .plan2TopTitle{ font-size: 26px; }
  .plan2New{ font-size: 19px; }
}

@media (max-width: 780px){
  .topbar__nav{ display:none; }
  .heroimg{ height:200px; }
}

@media (max-width: 540px){
  .wrap{ margin:-46px auto 0; }

  :root{
    --hero-pos: 55% 30%;
    --hero-scale: 1.04;

    --avatar-size: 86px;
    --avatar-overlap: 50px;

    --social-hit: 30px;
    --social-icon: 20px;
    --social-gap: 18px;
  }
}
/* =========================
   FOOTER SOCIAL (replace miniIcons)
========================= */
.footerSocial{
  display:flex;
  gap:8px;                 /* stesso “ritmo” di miniIcons */
  align-items:center;
  justify-content:flex-end; /* sta a destra come miniIcons */
}

.footerSocial__icon{
  width: 22px;
  height: 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity: .8;
  transition: opacity .12s ease, transform .12s ease;
}

.footerSocial__icon:hover{
  opacity: 1;
  transform: translateY(-1px);
}

.footerSocial__icon img{
  width: 16px;
  height: 16px;
  display:block;
  filter: var(--social-filter); /* coerente con tema */
}
