/* ═══════════════════════════════════════════════════════════════════
   TEATRE.COM — sistema visual "Escenari"
   Fosc com una sala abans de la funció; color com un focus de llum.
   ═══════════════════════════════════════════════════════════════════ */
@view-transition { navigation: auto; }

:root {
  --bg: #09080d;
  --bg-2: #110f18;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --surface-solid: #16141f;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);
  --text: #f6f3ff;
  --text-2: #b9b3cc;
  --text-3: #7f7894;
  --red: #ff2e63;
  --red-2: #ff6b8b;
  --gold: #ffd166;
  --cyan: #2de2e6;
  --violet: #8b5cf6;
  --green: #3ddc97;
  --orange: #ff8c42;
  --grad: linear-gradient(115deg, var(--red) 0%, #ff7a59 45%, var(--gold) 100%);
  --grad-2: linear-gradient(135deg, var(--violet), var(--cyan));
  --radius: 22px;
  --radius-s: 14px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --glow: 0 0 0 1px rgba(255, 46, 99, .4), 0 10px 40px -10px rgba(255, 46, 99, .6);
  --f-display: "Unbounded", "Inter Tight", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-body: "Inter Tight", "Inter", system-ui, sans-serif;
  --max: 1320px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fbf8f3;
  --bg-2: #f3eee6;
  --surface: rgba(20, 10, 40, .04);
  --surface-2: rgba(20, 10, 40, .07);
  --surface-solid: #ffffff;
  --line: rgba(20, 10, 40, .1);
  --line-2: rgba(20, 10, 40, .2);
  --text: #16111f;
  --text-2: #4a4458;
  --text-3: #7a7388;
  --red: #e0134a;
  --gold: #c98a00;
  --cyan: #0a9396;
  --shadow: 0 30px 60px -30px rgba(40, 20, 60, .3);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--f-body); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh;
}
body::before { /* gra de pel·lícula */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red-2); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--red); color: #fff; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 7vw, 6.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3.2rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0 0 1em; }
em.serif, .serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--gold); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-2); }
.tiny { font-size: .8rem; color: var(--text-3); }
.eyebrow { font: 600 .74rem/1 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); display: inline-flex; gap: .6em; align-items: center; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }

/* ── Navegació ───────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 70px; }
.logo { font: 800 1.25rem/1 var(--f-display); letter-spacing: -.04em; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; box-shadow: var(--glow); position: relative; overflow: hidden; }
.logo-mark svg { width: 20px; height: 20px; }
.logo b { color: var(--red); }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { padding: 9px 14px; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--text-2); transition: .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.nav-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.kbd-search {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-3); font: inherit; font-size: .9rem; cursor: pointer; min-width: 210px; transition: .2s;
}
.kbd-search:hover { border-color: var(--line-2); color: var(--text-2); }
.kbd-search kbd { margin-left: auto; font: 600 .7rem var(--f-body); padding: 3px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer; transition: .2s; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.avatar-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--grad-2); display: grid; place-items: center; font: 700 .85rem var(--f-display); color: #fff; overflow: hidden; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ── Botons ──────────────────────────────────────────── */
.btn {
  --b: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; gap: .55em; padding: 13px 22px; border-radius: 999px;
  font: 600 .98rem/1 var(--f-body); border: 1px solid var(--line); background: var(--b); color: var(--text); cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, background .2s; white-space: nowrap; position: relative;
}
.btn:hover { transform: translateY(-2px); color: var(--text); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--grad); color: #16060c; border: 0; box-shadow: var(--glow); }
.btn-primary:hover { color: #16060c; box-shadow: 0 0 0 1px rgba(255, 46, 99, .6), 0 18px 50px -12px rgba(255, 46, 99, .8); }
.btn-ghost { background: transparent; }
.btn-light { background: var(--text); color: var(--bg); border: 0; }
.btn-light:hover { color: var(--bg); }
.btn-lg { padding: 18px 30px; font-size: 1.08rem; }
.btn-sm { padding: 9px 15px; font-size: .86rem; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ── Hero ────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(60px, 10vw, 130px) 0 70px; overflow: hidden; isolation: isolate; }
.spot {
  position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 60%) var(--my, 30%), rgba(255, 209, 102, .16), transparent 60%);
  transition: background .1s;
}
.blob { position: absolute; z-index: -2; border-radius: 50%; filter: blur(90px); opacity: .55; animation: float 18s ease-in-out infinite alternate; }
.blob.b1 { width: 520px; height: 520px; background: var(--red); top: -160px; right: -120px; }
.blob.b2 { width: 420px; height: 420px; background: var(--violet); bottom: -200px; left: -140px; animation-delay: -6s; }
.blob.b3 { width: 260px; height: 260px; background: var(--cyan); top: 30%; left: 45%; opacity: .25; animation-delay: -12s; }
@keyframes float { to { transform: translate(60px, 40px) scale(1.15); } }
.curtain { position: absolute; top: 0; bottom: 0; width: 7vw; z-index: -1; opacity: .5;
  background: repeating-linear-gradient(90deg, #4a0418 0 14px, #6b0a25 14px 26px, #3a0313 26px 40px); mask: linear-gradient(to bottom, #000 30%, transparent); }
.curtain.l { left: 0; } .curtain.r { right: 0; }
.hero h1 { max-width: 13ch; }
.hero h1 .rot { display: inline-block; position: relative; min-width: 4ch; }
.hero h1 .rot span { display: inline-block; animation: wordIn .7s var(--ease) both; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
@keyframes wordIn { from { opacity: 0; transform: translateY(.4em) rotateX(60deg); filter: blur(8px); } }
.hero-lead { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--text-2); max-width: 46ch; margin: 22px 0 34px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 50px; align-items: center; }
.hero-search { display: flex; gap: 8px; padding: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); max-width: 620px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.hero-search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: 500 1.08rem var(--f-body); padding: 0 18px; outline: none; }
.hero-search input::placeholder { color: var(--text-3); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 500; color: var(--text-2); transition: .2s; cursor: pointer; }
.chip:hover, .chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip input { display: none; }
.hero-stage { position: relative; height: 520px; perspective: 1200px; }
.stage-card {
  position: absolute; width: 300px; padding: 22px; border-radius: var(--radius); background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(14px); transition: transform .6s var(--ease);
}
.stage-card:nth-child(1) { top: 10px; left: 0; transform: rotate(-6deg); }
.stage-card:nth-child(2) { top: 150px; right: 0; transform: rotate(5deg); z-index: 2; }
.stage-card:nth-child(3) { bottom: 10px; left: 40px; transform: rotate(-2deg); }
.hero-stage:hover .stage-card:nth-child(1) { transform: rotate(-9deg) translate(-10px, -8px); }
.hero-stage:hover .stage-card:nth-child(2) { transform: rotate(8deg) translate(10px, 0); }
.hero-stage:hover .stage-card:nth-child(3) { transform: rotate(0) translate(0, 10px); }

/* ── Ticker ──────────────────────────────────────────── */
.ticker { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 16px 0; position: relative; }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 1; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.ticker::after { right: 0; background: linear-gradient(-90deg, var(--bg-2), transparent); }
.ticker-track { display: flex; gap: 46px; width: max-content; animation: tick 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a { display: inline-flex; gap: 12px; align-items: center; font-weight: 500; white-space: nowrap; color: var(--text-2); }
.ticker a:hover { color: var(--text); }
.ticker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ── Seccions ────────────────────────────────────────── */
section { padding: clamp(60px, 9vw, 120px) 0; position: relative; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 40px; flex-wrap: wrap; }
.sec-head h2 { margin: 12px 0 0; max-width: 18ch; }
.sec-head p { color: var(--text-2); max-width: 42ch; margin: 0; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.tile {
  grid-column: span 4; position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  overflow: hidden; min-height: 240px; display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .3s; isolation: isolate;
}
.tile:hover { transform: translateY(-4px); border-color: var(--line-2); color: var(--text); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(400px circle at var(--tx, 50%) var(--ty, 50%), rgba(255, 255, 255, .08), transparent 50%); }
.tile:hover::after { opacity: 1; }
.tile.w8 { grid-column: span 8; } .tile.w6 { grid-column: span 6; } .tile.w5 { grid-column: span 5; } .tile.w7 { grid-column: span 7; } .tile.w3 { grid-column: span 3; }
.tile .big { font: 800 clamp(3rem, 6vw, 5.2rem)/1 var(--f-display); letter-spacing: -.05em; margin-top: auto; }
.tile .tile-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 18px; }
.tile h3 { font-size: 1.45rem; margin-bottom: 8px; }
.tile p { color: var(--text-2); margin: 0; }
.tile .go { margin-top: auto; padding-top: 20px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.tile.red { background: linear-gradient(160deg, rgba(255, 46, 99, .22), rgba(255, 46, 99, .02)); border-color: rgba(255, 46, 99, .3); }
.tile.gold { background: linear-gradient(160deg, rgba(255, 209, 102, .2), rgba(255, 209, 102, .02)); border-color: rgba(255, 209, 102, .28); }
.tile.violet { background: linear-gradient(160deg, rgba(139, 92, 246, .24), rgba(139, 92, 246, .02)); border-color: rgba(139, 92, 246, .3); }
.tile.cyan { background: linear-gradient(160deg, rgba(45, 226, 230, .18), rgba(45, 226, 230, .02)); border-color: rgba(45, 226, 230, .26); }

/* ── Targetes de càsting ─────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.card {
  position: relative; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px; transition: transform .35s var(--ease), border-color .3s, background .3s; min-height: 250px;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); background: var(--surface-2); }
.card h3 { font-size: 1.18rem; margin: 0; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-3); font-size: .86rem; }
.card .meta span { display: inline-flex; gap: 6px; align-items: center; }
.card .foot { margin-top: auto; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.card .save { position: relative; z-index: 2; }
.card.featured { border-color: rgba(255, 209, 102, .45); background: linear-gradient(170deg, rgba(255, 209, 102, .1), var(--surface)); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font: 600 .74rem/1 var(--f-body); letter-spacing: .02em; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.badge.hot { background: rgba(255, 46, 99, .16); color: var(--red-2); border-color: rgba(255, 46, 99, .35); }
.badge.new { background: rgba(61, 220, 151, .14); color: var(--green); border-color: rgba(61, 220, 151, .3); }
.badge.gold { background: rgba(255, 209, 102, .14); color: var(--gold); border-color: rgba(255, 209, 102, .35); }
.badge.paid { background: rgba(45, 226, 230, .12); color: var(--cyan); border-color: rgba(45, 226, 230, .3); }
.countdown { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--text-2); }
.ring { --p: 50; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 700 .72rem var(--f-display);
  background: conic-gradient(var(--c, var(--gold)) calc(var(--p) * 1%), var(--surface-2) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg-2); }
.ring b { position: relative; }
.heart { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer; transition: .25s var(--ease); font-size: 1.05rem; }
.heart:hover { transform: scale(1.1); color: var(--red); }
.heart.on { background: var(--red); border-color: var(--red); color: #fff; animation: pop .4s var(--ease); }
@keyframes pop { 50% { transform: scale(1.3); } }

/* ── Llistes amb filtres ─────────────────────────────── */
.page-hero { padding: 70px 0 30px; position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
.page-hero .blob { opacity: .35; }
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 36px; align-items: start; padding-bottom: 100px; }
.filters { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 22px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.filters h4 { font: 600 .76rem var(--f-body); text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); margin: 0 0 10px; }
.filters .chips { margin: 0; }
.filters .chip { font-size: .84rem; padding: 7px 12px; }
.field, .filters select, .filters input[type="search"] {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-s); background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: 500 1rem var(--f-body); transition: .2s;
}
.field:focus, .filters select:focus, .filters input:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 4px rgba(255, 46, 99, .15); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.count { font: 700 1.1rem var(--f-display); }
.htmx-request .results, .results.htmx-request { opacity: .45; transition: opacity .2s; }
.empty { padding: 60px 30px; text-align: center; border-radius: var(--radius); border: 1px dashed var(--line-2); color: var(--text-2); }
.empty .big-emoji { font-size: 3.2rem; margin-bottom: 10px; }

/* ── Formularis ──────────────────────────────────────── */
.form { display: grid; gap: 20px; }
.form label, .form legend { font-weight: 600; font-size: .92rem; display: block; margin-bottom: 8px; }
.form .help { font-size: .82rem; color: var(--text-3); margin-top: 6px; }
.form input[type="text"], .form input[type="email"], .form input[type="url"], .form input[type="date"], .form input[type="number"],
.form select, .form textarea, .form input[type="file"] {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-s); background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: 500 1rem var(--f-body);
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 4px rgba(255, 46, 99, .15); }
.form .fld > div:has(input[type="checkbox"]), .form .fld > div:has(input[type="radio"]) { display: flex; flex-wrap: wrap; gap: 8px; }
.form .fld > div:has(input[type="checkbox"]) label, .form .fld > div:has(input[type="radio"]) label { margin: 0; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: .2s; }
.form .fld > div label:has(input:checked) { background: var(--text); color: var(--bg); border-color: var(--text); }
.form .fld input[type="checkbox"], .form .fld input[type="radio"] { accent-color: var(--red); }
.form ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.form ul li label { margin: 0; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: .2s; }
.form ul li label:has(input:checked) { background: var(--text); color: var(--bg); border-color: var(--text); }
.form ul li input { accent-color: var(--red); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.errorlist { color: var(--red-2); font-size: .86rem; margin-top: 6px !important; }
.panel { padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.narrow { max-width: 760px; margin-inline: auto; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.honey { position: absolute; left: -9999px; }

/* ── Detall ──────────────────────────────────────────── */
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; padding-bottom: 100px; }
.prose { font-size: 1.08rem; color: var(--text-2); }
.prose h2 { font-size: 1.6rem; color: var(--text); margin-top: 1.6em; }
.prose h3 { color: var(--text); margin-top: 1.4em; }
.prose a { color: var(--red-2); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { border-left: 3px solid var(--red); margin: 1.5em 0; padding: .2em 0 .2em 1.2em; font-family: var(--f-serif); font-size: 1.4em; font-style: italic; color: var(--text); }
.prose li { margin-bottom: .4em; }
.aside { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 16px; }
.facts { display: grid; gap: 14px; }
.fact { display: flex; gap: 14px; align-items: flex-start; }
.fact .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
.fact small { display: block; color: var(--text-3); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.fact strong { font-weight: 600; }
.unknown { color: var(--text-3); font-style: italic; font-weight: 400 !important; }
.breadcrumb { display: flex; gap: 8px; font-size: .88rem; color: var(--text-3); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--text); }

/* ── Comunitat ───────────────────────────────────────── */
.tabs { display: inline-flex; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--text-2); display: inline-flex; gap: 8px; align-items: center; }
.tabs a.on { background: var(--text); color: var(--bg); }
.tabs a small { font-size: .74rem; opacity: .7; }
.post-kind { font: 700 .72rem var(--f-body); letter-spacing: .12em; text-transform: uppercase; }
.post-kind.seeking { color: var(--cyan); } .post-kind.offering { color: var(--gold); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split > div { padding: 32px; border-radius: var(--radius); border: 1px solid var(--line); }
.split .seek { background: linear-gradient(160deg, rgba(45, 226, 230, .14), transparent 70%); }
.split .offer { background: linear-gradient(160deg, rgba(255, 209, 102, .14), transparent 70%); }
.mini-list { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 4px; }
.mini-list a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.mini-list small { color: var(--text-3); white-space: nowrap; }

/* ── Perfils ─────────────────────────────────────────── */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 16px; }
.person { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-align: center; position: relative; transition: .35s var(--ease); }
.person:hover { transform: translateY(-4px) rotate(-.5deg); border-color: var(--line-2); }
.person .av { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font: 800 1.6rem var(--f-display); color: #fff; overflow: hidden; position: relative; }
.person .av img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 1.05rem; margin-bottom: 4px; }
.person p { font-size: .88rem; color: var(--text-2); margin: 0 0 12px; }
.person a::after { content: ""; position: absolute; inset: 0; }
.founder-tag { position: absolute; top: 14px; right: 14px; font: 800 .7rem var(--f-display); background: var(--gold); color: #000; padding: 5px 8px; border-radius: 8px; }
.av-1 { background: linear-gradient(135deg, #ff2e63, #ff8c42); } .av-2 { background: linear-gradient(135deg, #8b5cf6, #2de2e6); }
.av-3 { background: linear-gradient(135deg, #ffd166, #ff2e63); } .av-4 { background: linear-gradient(135deg, #3ddc97, #2de2e6); }
.av-0 { background: linear-gradient(135deg, #6d28d9, #ff2e63); }
.profile-hero { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; padding: 60px 0 40px; }
.profile-hero .av { width: 200px; height: 200px; font-size: 3.6rem; border-radius: 40px; transform: rotate(-4deg); box-shadow: var(--shadow); }

/* ── Biblioteca ──────────────────────────────────────── */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.book { position: relative; padding: 26px 24px 24px 38px; border-radius: 6px 18px 18px 6px; min-height: 300px; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(160deg, hsl(var(--h) 70% 30%), hsl(calc(var(--h) + 40) 60% 14%)); box-shadow: inset 8px 0 0 rgba(0, 0, 0, .25), var(--shadow); transition: .4s var(--ease); color: #fff; }
.book:hover { transform: translateY(-6px) rotate(-1deg); color: #fff; }
.book::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, .25); }
.book h3 { font-family: var(--f-serif); font-weight: 400; font-style: italic; font-size: 1.9rem; letter-spacing: 0; line-height: 1.05; }
.book .author { font-weight: 600; opacity: .85; font-size: .92rem; }
.book .foot { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.book .badge { background: rgba(0, 0, 0, .3); color: #fff; border-color: rgba(255, 255, 255, .2); }

/* ── Revista ─────────────────────────────────────────── */
.mag-lead { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; margin-bottom: 50px; }
.cover { aspect-ratio: 4/3; border-radius: var(--radius); position: relative; overflow: hidden; display: grid; place-items: end start; padding: 26px;
  background: radial-gradient(circle at 30% 20%, hsl(var(--h) 90% 60%), transparent 55%), radial-gradient(circle at 80% 80%, hsl(calc(var(--h) + 60) 80% 45%), transparent 50%), hsl(calc(var(--h) + 200) 40% 10%); }
.cover .kind { font: 700 .74rem var(--f-body); letter-spacing: .14em; text-transform: uppercase; background: rgba(0, 0, 0, .45); color: #fff; padding: 7px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
.cover::after { content: attr(data-initial); position: absolute; right: -10px; top: -40px; font: 900 16rem/1 var(--f-display); color: rgba(255, 255, 255, .1); }
.article-card .cover { aspect-ratio: 16/10; margin-bottom: 18px; }
.article-card h3 { font-size: 1.3rem; }

/* ── Fundadors / Pro ─────────────────────────────────── */
.ticket {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; padding: clamp(28px, 5vw, 56px);
  border-radius: 28px; background: linear-gradient(120deg, #2a0a17, #1b0b2e 60%, #0d1b2a); border: 1px solid rgba(255, 209, 102, .35); overflow: hidden;
}
.ticket::before, .ticket::after { content: ""; position: absolute; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); top: 50%; translate: 0 -50%; }
.ticket::before { left: -22px; } .ticket::after { right: -22px; }
.ticket .stub { text-align: center; padding-left: 40px; border-left: 2px dashed rgba(255, 209, 102, .4); }
.ticket .num { font: 900 clamp(4rem, 9vw, 7.5rem)/0.9 var(--f-display); letter-spacing: -.06em; }
.bar { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; margin: 18px 0 8px; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width 1.2s var(--ease); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.plan.hl { border-color: var(--gold); background: linear-gradient(170deg, rgba(255, 209, 102, .12), var(--surface)); transform: scale(1.03); }
.plan .price { font: 800 2.6rem var(--f-display); letter-spacing: -.04em; }
.plan ul { padding: 0; margin: 0; list-style: none; display: grid; gap: 10px; color: var(--text-2); }
.plan li::before { content: "✦"; color: var(--gold); margin-right: 10px; }

/* ── Territoris ──────────────────────────────────────── */
.terr { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.terr a { padding: 20px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); text-align: center; transition: .3s var(--ease); }
.terr a:hover { transform: translateY(-4px); background: var(--surface-2); }
.terr b { display: block; font: 800 2rem var(--f-display); letter-spacing: -.04em; }
.terr span { font-size: .82rem; color: var(--text-2); }

/* ── Alertes CTA ─────────────────────────────────────── */
.alert-cta { padding: 30px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(139, 92, 246, .25), rgba(255, 46, 99, .18)); border: 1px solid rgba(139, 92, 246, .35); }
.alert-cta form { display: grid; gap: 10px; }
.alert-cta .field { background: rgba(0, 0, 0, .25); }
.done-box { padding: 20px; border-radius: var(--radius-s); background: rgba(61, 220, 151, .12); border: 1px solid rgba(61, 220, 151, .35); }

.duo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }

/* ── Messages ────────────────────────────────────────── */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: grid; gap: 10px; max-width: min(420px, calc(100% - 32px)); }
.toast { padding: 16px 20px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; gap: 12px; align-items: start; animation: toastIn .5s var(--ease); }
.toast.success { border-color: rgba(61, 220, 151, .5); } .toast.error { border-color: rgba(255, 46, 99, .6); } .toast.info { border-color: rgba(45, 226, 230, .45); }
.toast button { margin-left: auto; background: none; border: 0; color: var(--text-3); cursor: pointer; font-size: 1.1rem; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.note { padding: 14px 18px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); font-size: .92rem; }
.note.ok { border-color: rgba(61, 220, 151, .4); } .note.warn { border-color: rgba(255, 209, 102, .4); }

/* ── Modals / paleta ─────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 300; background: rgba(5, 3, 10, .7); backdrop-filter: blur(10px); display: grid; place-items: start center; padding: 12vh 16px 16px; }
.palette { width: min(680px, 100%); border-radius: 24px; background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: 0 40px 120px -20px #000; overflow: hidden; animation: toastIn .3s var(--ease); }
.palette input { width: 100%; padding: 22px 24px; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: 500 1.25rem var(--f-body); outline: none; }
.palette .res { max-height: 60vh; overflow: auto; padding: 10px; }
.palette .grp { padding: 10px 14px 4px; font: 700 .7rem var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.palette .res a { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; }
.palette .res a:hover, .palette .res a:focus { background: var(--surface-2); outline: none; color: var(--text); }
.palette .res a small { margin-left: auto; color: var(--text-3); }
.palette .hint { padding: 14px 24px; color: var(--text-3); font-size: .85rem; display: flex; gap: 18px; border-top: 1px solid var(--line); }
.modal { width: min(480px, 100%); padding: 36px; border-radius: 28px; background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: 0 40px 120px -20px #000; animation: toastIn .3s var(--ease); position: relative; }
.modal .close { position: absolute; top: 16px; right: 16px; }
[x-cloak] { display: none !important; }

/* ── Peu ─────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 70px 0 120px; margin-top: 40px; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font: 600 .76rem var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--text-2); }
.wordmark { font: 900 clamp(4rem, 17vw, 16rem)/.8 var(--f-display); letter-spacing: -.07em; margin-top: 60px; background: linear-gradient(180deg, var(--surface-2), transparent); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; user-select: none; }

/* ── Navegació mòbil ─────────────────────────────────── */
.tabbar { display: none; }

/* ── Revelat en scroll ───────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { display: none; }
  .tile, .tile.w8, .tile.w6, .tile.w5, .tile.w7, .tile.w3 { grid-column: span 6; }
  .terr { grid-template-columns: repeat(4, 1fr); }
  .plans { grid-template-columns: 1fr; } .plan.hl { transform: none; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav-links, .kbd-search span, .kbd-search kbd { display: none; }
  .kbd-search { min-width: 0; width: 42px; height: 42px; padding: 0; justify-content: center; }
  .layout, .detail, .mag-lead, .split, .footer-grid, .profile-hero { grid-template-columns: 1fr; }
  .filters, .aside { position: static; }
  .tile, .tile.w8, .tile.w6, .tile.w5, .tile.w7, .tile.w3 { grid-column: span 12; min-height: 200px; }
  .terr { grid-template-columns: repeat(2, 1fr); }
  .form .row2 { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr; } .ticket .stub { border-left: 0; border-top: 2px dashed rgba(255, 209, 102, .4); padding: 24px 0 0; }
  .curtain { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 12px; left: 12px; right: 12px; z-index: 60; padding: 8px;
    border-radius: 22px; background: color-mix(in srgb, var(--surface-solid) 85%, transparent); backdrop-filter: blur(16px); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--text-3); padding: 6px 0; border-radius: 14px; }
  .tabbar a span { font-size: 1.25rem; }
  .tabbar a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
  .toasts { bottom: 96px; }
  .profile-hero .av { width: 140px; height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
