/* ==========================================================================
   Calíope — shared styles
   Tokens inherited from src/constants/theme.ts (Brand / Colors / Fonts) of
   the Calíope app. Do not invent a new palette — extend this one.
   ========================================================================== */

:root {
  --tomato: #C42B34;
  --bubblegum: #FF4D8D;
  --tangerine: #FC9A2D;
  --custard: #FCE9AB;
  --pistachio: #9E9820;
  --sky: #BAD2E8;
  --cream: #FBF3E2;
  --wine: #8B162B;
  --ink: #2A1A16;
  --muted: #8B7A72;
  --hairline: rgba(42, 26, 22, 0.14);

  --bg: var(--wine);
  --surface: #FFFFFF;
  --surface-2: var(--custard);
  --text: var(--ink);
  --text-secondary: #7A6A5C;
  --accent: var(--tomato);
  --accent-ink: var(--wine);
  --ring: var(--wine);
  --shadow: 42, 26, 22;

  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Work Sans', ui-sans-serif, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --surface: #3A2A22;
    --surface-2: #4A3830;
    --text: var(--cream);
    --text-secondary: #C4B6A8;
    --accent: #FF6E5E;
    --accent-ink: #FFB199;
    --ring: #C98B78;
    --hairline: rgba(251, 243, 226, 0.14);
    --shadow: 0, 0, 0;
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink);
  --surface: #3A2A22;
  --surface-2: #4A3830;
  --text: var(--cream);
  --text-secondary: #C4B6A8;
  --accent: #FF6E5E;
  --accent-ink: #FFB199;
  --ring: #C98B78;
  --hairline: rgba(251, 243, 226, 0.14);
  --shadow: 0, 0, 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
  background: none;
}
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.btn-primary { background: var(--wine); color: var(--cream); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(var(--shadow), 0.45); }
.btn-ghost { border-color: var(--hairline); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-ink); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Blobs ---------- */
.blob { position: absolute; z-index: 0; filter: blur(0.5px); opacity: 0.9; pointer-events: none; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(2%, -3%) rotate(4deg); }
}
.blob-anim { animation: drift 22s ease-in-out infinite; }

/* ---------- Nav ---------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.nav-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 24px 2px; gap: 16px; }
.nav-spacer { width: 1px; }
.wordmark { display: inline-flex; align-items: center; justify-self: center; text-decoration: none; flex-shrink: 0; }
.wordmark img { height: 44px; width: auto; display: block; }
.nav-tabs { display: flex; justify-content: center; align-items: center; gap: 26px; font-weight: 500; font-size: 0.9rem; padding: 6px 24px 12px; }
.nav-right { display: flex; align-items: center; gap: 14px; justify-self: end; }
.nav-tabs a {
  text-decoration: none;
  color: var(--wine);
  opacity: 0.75;
  letter-spacing: 0.02em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.nav-tabs a:hover { opacity: 1; }
.nav-tabs a.active { opacity: 1; border-color: var(--wine); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none; position: relative;
  transition: border-color 0.15s ease;
}
.nav-icon-btn:hover { border-color: var(--ring); }
.lang-btn { font-size: 1.05rem; }
.lang-switch { position: relative; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 150px; z-index: 60;
  background: var(--cream); border: 1px solid var(--hairline); border-radius: 14px;
  box-shadow: 0 12px 28px -10px rgba(var(--shadow), 0.35);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border-radius: 9px; border: none; background: none;
  font-family: var(--font-body); font-size: 0.86rem; font-weight: 600; color: var(--wine);
  cursor: pointer; text-align: left;
}
.lang-option:hover { background: color-mix(in srgb, var(--wine) 8%, transparent); }
.lang-option.active { background: color-mix(in srgb, var(--wine) 14%, transparent); }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: var(--cream);
  font-size: 0.62rem; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nav-toggle { display: none; }
.nav-menu-mobile { display: none; }
@media (max-width: 900px) {
  .nav-tabs { display: none; }
  .wordmark img { height: 34px; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn-primary { display: none; }
  .nav-row { gap: 8px; padding: 12px 16px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--hairline); background: var(--surface); color: var(--text); cursor: pointer;
  }
  .nav-menu-mobile.open {
    display: flex; flex-direction: column; gap: 2px;
    padding: 4px 24px 18px; border-bottom: 1px solid var(--hairline);
  }
  .nav-menu-mobile a { text-decoration: none; color: var(--wine); padding: 12px 4px; border-bottom: 1px solid var(--hairline); font-weight: 500; opacity: 0.85; }
  .nav-menu-mobile a.active { color: var(--tomato); font-weight: 700; opacity: 1; }
}

/* ---------- Horizontal scroll carousel (gallery / event cards) ---------- */
.gallery-wrap { position: relative; }
.gallery-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item {
  flex: 0 0 260px; aspect-ratio: 4/3; scroll-snap-align: start;
  border-radius: 20px; border: 2px dashed var(--hairline);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--text-secondary);
}
.gallery-item .cap { font-size: 0.8rem; font-weight: 600; color: var(--accent-ink); }
.gallery-arrows { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.gallery-arrow {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--hairline);
  background: var(--surface); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
}
.gallery-arrow:hover { border-color: var(--ring); }

/* ---------- Page hero (secondary pages) ---------- */
.page-hero {
  padding: 64px 24px 52px; position: relative; overflow: hidden;
  background: var(--wine);
}
.page-hero .eyebrow { display: block; margin-bottom: 10px; color: var(--custard); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; color: var(--cream); max-width: 20ch; }
.page-hero p { margin-top: 14px; color: color-mix(in srgb, var(--cream) 82%, transparent); font-size: 1.05rem; max-width: 56ch; }

/* ---------- Sections ---------- */
section { position: relative; padding: 72px 0; }
section.divider-top { border-top: 1px solid var(--hairline); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; margin-top: 10px; color: var(--cream); }
.section-head p { margin-top: 12px; color: color-mix(in srgb, var(--cream) 78%, transparent); font-size: 1.02rem; max-width: 58ch; }

/* ---------- Join band: unified "become a member / reserve your spot" block ---------- */
.founding-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--wine); color: var(--cream);
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 14px;
}
.join-band {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 30px;
  padding: 44px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 36px;
}
.join-path { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; height: 100%; }
.join-divider { width: 2px; align-self: stretch; background: var(--hairline); }
@media (max-width: 760px) {
  .join-band { grid-template-columns: 1fr; padding: 36px 28px; }
  .join-divider { display: none; }
}
.join-band h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.join-band p { margin-top: 12px; color: var(--text-secondary); max-width: 42ch; }
.join-band .btn-primary { margin-top: 20px; background: var(--wine); color: var(--cream); }

/* ---------- Footer ---------- */
footer { background: var(--wine); padding: 44px 0 36px; margin-top: 40px; color: var(--cream); }
.footer-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-brand .wordmark { margin-bottom: 8px; }
.footer-brand .wordmark img { height: 30px; }
.footer-brand p { color: var(--cream); font-size: 0.9rem; max-width: 32ch; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }
.footer-col .eyebrow { color: var(--cream); }
.footer-col a { text-decoration: none; color: var(--cream); opacity: 0.85; }
.footer-col a:hover { color: var(--custard); opacity: 1; }
.footer-fine { margin-top: 30px; font-size: 0.8rem; color: var(--cream); }

::selection { background: var(--custard); color: var(--ink); }
