/* ============================================================
   Balbini Life — estils principals
   Tema fosc per defecte, amb tema clar via [data-theme="light"]
   ============================================================ */

:root {
  --bg: #17120e;
  --bg-soft: #1b1511;
  --surface: #211a15;
  --surface-2: #281f19;
  --border: rgba(255, 255, 255, 0.08);
  --text: #ede6dc;
  --muted: #a89d8f;
  --accent: #d9b98a;
  --accent-soft: rgba(217, 185, 138, 0.14);
  --pill-bg: rgba(23, 18, 14, 0.72);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 20px;
  --radius-sm: 14px;
  --font-serif: "Playfair Display", "Georgia", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  --bg: #f6f1ea;
  --bg-soft: #f0e9e0;
  --surface: #ffffff;
  --surface-2: #f8f3ec;
  --border: rgba(40, 30, 20, 0.1);
  --text: #241c14;
  --muted: #77695a;
  --accent: #a97e42;
  --accent-soft: rgba(169, 126, 66, 0.12);
  --pill-bg: rgba(255, 255, 255, 0.78);
  --shadow: 0 20px 50px rgba(60, 40, 20, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

/* ---------- Navbar flotant ---------- */
.navbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(1180px, 96vw);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 20px;
  border-radius: 999px;
  background: var(--pill-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.brand .brand-script {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  font-size: 1.25rem;
}

.brand .brand-caps {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  align-self: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin-left: auto;
  flex-wrap: nowrap;
}

.nav-links a {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 6px 9px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.lang-switch a {
  padding: 5px 10px;
  color: var(--muted);
}

.lang-switch a.active {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 8px;
  border-radius: 50%;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--accent-soft);
}

/* ---------- Botons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

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

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 70px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 11, 8, 0.55) 0%,
    rgba(15, 11, 8, 0.25) 40%,
    rgba(15, 11, 8, 0.78) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(217, 185, 138, 0.45);
  color: var(--accent);
  font-size: 0.8rem;
  background: rgba(15, 11, 8, 0.4);
  backdrop-filter: blur(6px);
  margin-bottom: 26px;
}

.hero-socials {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.hero-socials a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  color: #ded6cb;
}

.hero-socials .icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15, 11, 8, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  font-size: 1.05rem;
  transition: border-color 0.2s, transform 0.15s;
}

.hero-socials a:hover .icon-circle {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 600;
  color: #f4ede3;
  line-height: 1.05;
  margin-bottom: 10px;
}

.hero .hero-tags {
  color: #cfc5b8;
  font-size: 1rem;
  margin-bottom: 28px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero .btn-primary {
  background: #f4ede3;
  color: #17120e;
}

.hero .btn-ghost {
  color: #f4ede3;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(15, 11, 8, 0.35);
}

/* ---------- Fotos ---------- */
.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media .photo {
  position: absolute;
  inset: 0;
  object-position: center 25%;
}

.bento .card .photo {
  position: absolute;
  inset: 0;
}

.card-media .photo {
  position: absolute;
  inset: 0;
}

/* Fotos verticals amb la cara al quart superior: pugem l'enquadrament */
.photo[src$="directe.jpg"] {
  object-position: 62% 16%;
}

.photo[src$="rutines.jpg"] {
  object-position: 62% 16%;
}

.photo[src$="viatge.jpg"] {
  object-position: 44% 20%;
}

.photo[src$="restaurants.jpg"] {
  object-position: 38% 20%;
}

.photo[src$="llocs.jpg"] {
  object-position: 54% 18%;
}

/* ---------- Placeholders de fotos ---------- */
.ph {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 180px;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(217, 185, 138, 0.16), transparent 55%),
    linear-gradient(145deg, #2b221b 0%, #1c1610 60%, #241c15 100%);
  display: grid;
  place-items: center;
}

[data-theme="light"] .ph {
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(169, 126, 66, 0.16), transparent 55%),
    linear-gradient(145deg, #e9e0d3 0%, #ddd2c2 60%, #e5dccd 100%);
}

.ph::before {
  content: "📷";
  font-size: 1.6rem;
  opacity: 0.45;
}

.ph::after {
  content: attr(data-label);
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.8;
}

.hero-media .ph {
  min-height: 100vh;
}

.hero-media .ph::before,
.hero-media .ph::after {
  opacity: 0.3;
}

/* ---------- Seccions ---------- */
section {
  padding: 110px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.12;
}

.section-head p {
  color: var(--muted);
  margin-top: 10px;
  max-width: 560px;
}

/* ---------- Cards genèriques ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 185, 138, 0.35);
}

.card-media {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(15, 11, 8, 0.65);
  color: #e9e1d5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.card-body {
  padding: 18px 20px 20px;
}

.card-body h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.card-body p {
  font-size: 0.85rem;
  color: var(--muted);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 12px;
}

.card-meta .arrow {
  color: var(--accent);
}

/* ---------- Activitat (grid de 4) ---------- */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ---------- Directes ---------- */
.stream-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.stream-featured {
  display: flex;
  flex-direction: column;
}

.stream-featured .card-media {
  aspect-ratio: 16 / 10;
}

.stream-tags {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.stream-tags .card-badge {
  position: static;
}

.stream-title-overlay {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
  z-index: 2;
  font-weight: 600;
  color: #f2ebe0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.stream-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 12px;
}

.stream-footer span {
  color: var(--muted);
  font-size: 0.85rem;
}

.schedule {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.schedule h3 {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.schedule-item:hover {
  background: var(--accent-soft);
}

.schedule-date {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}

.schedule-date .dow {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.schedule-date .day {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.schedule-info strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.schedule-info span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Lifestyle bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 300px 240px;
  gap: 20px;
}

.bento .card {
  position: relative;
}

.bento .card .ph {
  position: absolute;
  inset: 0;
  min-height: 0;
}

.bento .card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 7, 5, 0.75), transparent 55%);
  pointer-events: none;
}

.bento-label {
  position: absolute;
  bottom: 18px;
  left: 20px;
  right: 20px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.bento-label h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.5rem;
  color: #f4ede3;
}

.bento-label p {
  font-size: 0.8rem;
  color: #cfc5b8;
}

.bento-label .arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #f4ede3;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
}

.bento .b-wide {
  grid-column: span 2;
}

.bento .b-tall {
  grid-row: span 2;
  grid-column: 3;
}

/* ---------- Feed de contingut ---------- */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feed-grid .card-media {
  aspect-ratio: 3 / 4;
}

.feed-grid .card.is-article .card-media {
  aspect-ratio: 3 / 2;
}

/* ---------- En què estic treballant ---------- */
.working-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  margin-bottom: 56px;
}

.status-card,
.goals-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.status-item + .status-item {
  border-top: 1px solid var(--border);
}

.status-item .status-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.status-item strong {
  display: block;
  font-size: 0.92rem;
}

.status-item span {
  font-size: 0.78rem;
  color: var(--muted);
}

.goal {
  padding: 12px 0;
}

.goal + .goal {
  border-top: 1px solid var(--border);
}

.goal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.goal-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  color: var(--bg);
}

.goal.done .goal-check {
  background: var(--accent);
  border-color: var(--accent);
}

.goal-row strong {
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
}

.goal-row .pct {
  font-size: 0.78rem;
  color: var(--muted);
}

.goal-bar {
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}

.goal-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #e8d4ae);
}

/* ---------- Estadístiques ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 14px;
  text-align: center;
}

.stat .stat-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.stat .stat-value {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  line-height: 1.2;
}

.stat .stat-label {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 70px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}

.footer-brand h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 340px;
  margin-bottom: 22px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s, border-color 0.2s;
}

.footer-socials a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .activity-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stream-layout,
  .working-layout {
    grid-template-columns: 1fr;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .bento .b-wide {
    grid-column: span 2;
  }

  .bento .b-tall {
    grid-row: auto;
    grid-column: auto;
    min-height: 280px;
  }

  .bento .card {
    min-height: 240px;
  }

  .feed-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  section {
    padding: 70px 0;
  }

  .activity-grid,
  .feed-grid,
  .bento {
    grid-template-columns: 1fr;
  }

  .bento .b-wide {
    grid-column: auto;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .navbar {
    padding-left: 16px;
  }
}
