/* ==========================================================================
   La Sociedad Psicodélica — design system
   Serif display: Fraunces / Sans body: Inter
   Brand gradient: sunset orange → magenta → indigo (see img/lsp-mark-gradient.png)
   ========================================================================== */

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

:root {
  /* brand gradient stops, sampled from the LSP mark */
  --grad-orange: #f0873c;
  --grad-coral: #d95a6a;
  --grad-magenta: #a83a7c;
  --grad-indigo: #362a7a;
  --grad-deep: #241d54;

  --ink: #241f3d;
  --ink-soft: #4a4460;
  --paper: #faf6ee;
  --cream: #f4ecd9;
  --cream-line: #e4d7bb;
  --line: rgba(36, 31, 61, 0.12);

  --radius: 18px;
  --radius-sm: 10px;
  --container: 1080px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }

p { margin: 0 0 1em; }
a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grad-magenta);
}

/* ---------- brand gradient ---------- */

.gradient-bg,
.hero {
  background: linear-gradient(135deg, var(--grad-orange) 0%, var(--grad-coral) 32%, var(--grad-magenta) 58%, var(--grad-indigo) 82%, var(--grad-deep) 100%);
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 246, 238, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.brand img { height: 34px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--grad-magenta); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  background: var(--paper);
}

.lang-switch button {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  color: #fff;
  padding: 96px 0 84px;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 90% at 15% 10%, rgba(255, 255, 255, 0.16), transparent 60%);
  pointer-events: none;
}

.hero .container { position: relative; }

.hero-mark {
  width: 72px;
  height: auto;
  margin-bottom: 28px;
  opacity: 0.95;
}

.hero h1 { color: #fff; max-width: 15ch; }

.hero .lede {
  font-size: 1.2rem;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.btn-primary { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-outline { background: transparent; color: currentColor; border-color: currentColor; }
.btn-outline.on-dark { color: #fff; border-color: rgba(255, 255, 255, 0.55); }

/* ---------- sections ---------- */

section { padding: 72px 0; }
section.tight { padding: 48px 0; }

.section-head { max-width: 60ch; margin-bottom: 40px; }

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ---------- editorial card (cream, orange-arc accent) ---------- */

.card {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -20%;
  width: 140%;
  height: 120%;
  background: radial-gradient(circle at 30% 0%, var(--grad-orange) 0%, transparent 55%);
  opacity: 0.35;
  pointer-events: none;
}

.card > * { position: relative; }

.card h3 { margin-bottom: 10px; }
.card .eyebrow { display: block; margin-bottom: 14px; }
.card .read-more { font-weight: 600; font-size: 0.9rem; color: var(--grad-magenta); text-decoration: none; }

/* whole-card click target: cards whose only action is a single teaser/CTA
   link get the entire box made clickable (not just the link text), via the
   "stretched link" pattern — the real <a> stays focusable/tabbable as-is. */
.card:has(> a.read-more),
.card:has(> a.btn) {
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:has(> a.read-more):hover,
.card:has(> a.btn):hover {
  box-shadow: 0 10px 28px rgba(20, 15, 50, 0.08);
  transform: translateY(-2px);
}

.card > a.read-more,
.card > a.btn {
  position: static;
}

.card > a.read-more::after,
.card > a.btn::after {
  content: '';
  position: absolute;
  inset: 0;
}

.event-flyer {
  display: block;
  width: calc(100% + 56px);
  margin: -32px -28px 18px;
  max-width: none;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.photo-banner {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 0 0 12px;
}

.photo-inset {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- swirl / event card ---------- */

.card-swirl {
  border-radius: var(--radius);
  padding: 36px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(165deg, rgba(36, 26, 74, 0.55), rgba(90, 30, 70, 0.35) 55%, rgba(20, 15, 50, 0.55)),
    url('/img/texture-swirl.jpg');
  background-size: cover;
  background-position: center;
}

.card-swirl h3 { color: #fff; }
.card-swirl .eyebrow { color: rgba(255, 255, 255, 0.85); }

.card-swirl:has(> a.btn) {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.card-swirl:has(> a.btn):hover { transform: translateY(-2px); }

.card-swirl > a.btn { position: static; }

.card-swirl > a.btn::after {
  content: '';
  position: absolute;
  inset: 0;
}

/* ---------- ring badge (Sin juicio / Sin dogma / Sin prisa motif) ---------- */

.ring-badge {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
  padding: 18px;
}

.ring-badge p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.7;
  font-weight: 500;
}

/* ---------- values / flat-structure strip ---------- */

.value-strip {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.value-strip .value {
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

/* ---------- forms ---------- */

form.stack {
  display: grid;
  gap: 18px;
  max-width: 560px;
}

.field { display: grid; gap: 6px; }

.field label { font-size: 0.88rem; font-weight: 600; }

.field input,
.field textarea,
.field select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.field textarea { min-height: 130px; resize: vertical; }

.form-note { font-size: 0.85rem; color: var(--ink-soft); }

.form-success {
  display: none;
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-weight: 500;
}

.form-success.visible { display: block; }

/* ---------- homepage quiz ("find your place") ---------- */

.quiz-card { max-width: 640px; }

.quiz-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}

.quiz-progress span {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--cream-line);
}

.quiz-progress span.done { background: var(--grad-magenta); }

.quiz-question { margin-bottom: 18px; }

.quiz-options {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.quiz-option:hover {
  border-color: var(--grad-magenta);
  background: var(--cream);
}

.quiz-option:active { transform: scale(0.99); }

.quiz-back {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
}

.quiz-back:hover { color: var(--ink); }

.quiz-result h3 { margin-bottom: 8px; }

.quiz-result-links {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.quiz-restart {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ---------- video cards ---------- */
/* Deliberately NOT using .read-more/.btn here: those trigger the whole-card
   stretched-link click target (see the .card:has(> a.read-more) rule above),
   which would sit on top of the iframe and block clicks on the video player
   itself. .video-link is a plain, non-stretched text link instead. */

.video-embed {
  position: relative;
  width: calc(100% + 56px);
  margin: -32px -28px 18px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Same idea, but for embedding a video inline in ordinary article content
   (e.g. a blog post) rather than inside a .card, so no negative-margin
   bleed is needed. */
.video-embed-inline {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}

.video-embed-inline iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--grad-magenta);
  text-decoration: none;
}

/* ---------- todo flag (visible until real content lands) ---------- */

.todo-flag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a83a3a;
  background: #fbe7e7;
  border: 1px solid #f0c6c6;
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  padding: 56px 0 32px;
  margin-top: 40px;
}

.site-footer a { color: #fff; text-decoration: none; }
.site-footer .brand { color: #fff; }

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1.3fr 1fr 1fr;
  margin-bottom: 36px;
}

.footer-grid h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 20px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- language toggle visibility ---------- */

html[data-lang="es"] .lang-en { display: none !important; }
html[data-lang="en"] .lang-es { display: none !important; }

/* ---------- utility ---------- */

.muted { color: var(--ink-soft); }
.center { text-align: center; }
.stack-lg { display: grid; gap: 48px; }

/* ---------- cookie consent banner ---------- */

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: 640px;
  margin: 0 auto;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.cookie-banner__text { flex: 1 1 280px; font-size: 0.9rem; line-height: 1.5; }
.cookie-banner__text a { color: #fff; text-decoration: underline; }

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-banner .btn-outline { color: #fff; border-color: rgba(255, 255, 255, 0.5); }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .site-header .container { position: relative; }

  .nav-toggle { display: flex; }

  /* Beats any inline grid-template-columns override too — a fixed 2-column
     split (e.g. a contact form + sidebar) must never survive onto a phone
     screen, no matter how the columns were originally set. */
  .grid { grid-template-columns: 1fr !important; }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    box-shadow: 0 12px 24px rgba(36, 31, 61, 0.08);
  }

  .nav-links.open { display: flex; }

  .nav-links li {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-links li:last-child { border-bottom: none; }

  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
}
