/* ── CSS Variables ── */
:root {
  --color-primary: #FF5F1F;
  --color-primary-muted: #FF8B5E;
  --color-on-primary: #ffffff;
  --color-surface: #FCFAF7;
  --color-surface-dim: #F4F0E9;
  --color-on-surface: #1A1614;
  --color-on-surface-variant: #4E4642;
  --color-outline-variant: #E0D8D0;
}

/* ── Smooth Scroll ── */
html {
  scroll-behavior: smooth;
}

/* ── Base Typography ── */
body {
  font-family: 'Bricolage Grotesque', sans-serif;
  background-color: #FCFAF7;
  color: #1A1614;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  text-wrap: balance;
}

/* ── Noise Texture Overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ── Utilities ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Shapes ── */
.artsy-border {
  border-radius: 40px 10px 40px 10px;
}

/* ── Focus Visible ── */
*:focus-visible {
  outline: 2px solid #FF5F1F;
  outline-offset: 3px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #FF5F1F;
  outline-offset: 3px;
}

/* ── Button active state ── */
button:active {
  transform: scale(0.97);
}

/* ── Mobile bottom safe area ── */
@media (max-width: 767px) {
  main { padding-bottom: 80px !important; }
}

/* ── Respect Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; }
}

/* ── Glass Nav ── */
.glass-nav {
  background: rgba(252, 250, 247, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(224, 216, 208, 0.5);
}

/* ── Category Tabs ── */
.qbi-cat-tab {
  color: rgba(78, 70, 66, 0.55);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding-bottom: 8px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.qbi-cat-tab:hover { color: #1A1614; }
.qbi-cat-tab.qbi-cat-active {
  color: #1A1614;
  border-bottom-color: #1A1614;
}

/* ── Emoji micro-interactions ── */
@keyframes qbi-wiggle {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-8deg); }
  40%  { transform: rotate(6deg); }
  60%  { transform: rotate(-4deg); }
  80%  { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}
@keyframes qbi-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.qbi-emoji {
  display: inline-block;
  transition: transform 0.2s ease;
}
.qbi-search-field:hover .qbi-emoji { animation: qbi-wiggle 0.5s ease; }
.qbi-cat-tab:active .qbi-emoji     { animation: qbi-pop 0.3s ease; }
@media (hover: hover) {
  .qbi-cat-tab:hover .qbi-emoji { transform: scale(1.15); }
}

/* ── Mobile: emoji for compact mode ── */
.qbi-cat-icon {
  transition: font-size 0.25s ease, opacity 0.2s ease, max-height 0.25s ease;
  display: inline-block;
  max-height: 30px;
  overflow: hidden;
}

/* ── Mobile: search bar compact on scroll ── */
#qbi-header .qbi-mobile-search-wrap { transition: padding 0.2s ease; }
#qbi-header.scrolled .qbi-mobile-search-wrap {
  padding-top: 8px;
  padding-bottom: 4px;
}

/* ── Mobile: compact tabs on scroll ── */
#qbi-mobile-cats { transition: padding 0.2s ease; }
#qbi-mobile-cats.compact {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
#qbi-mobile-cats.compact > div {
  gap: 0 !important;
  justify-content: space-around !important;
  width: 100%;
}
#qbi-mobile-cats.compact .qbi-cat-icon {
  font-size: 0 !important;
  max-height: 0 !important;
  opacity: 0 !important;
  line-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: none !important;
}
#qbi-mobile-cats.compact .qbi-cat-tab {
  gap: 0 !important;
  padding-bottom: 8px !important;
  padding-top: 8px !important;
  flex-direction: row !important;
}
#qbi-mobile-cats.compact .qbi-cat-tab > span:last-child {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: rgba(78, 70, 66, 0.55);
}
#qbi-mobile-cats.compact .qbi-cat-tab.qbi-cat-active > span:last-child {
  color: #1A1614 !important;
  font-weight: 600 !important;
}

/* ── Mobile Bottom Tab Bar ── */
#qbi-bottom-bar {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
#qbi-bottom-bar.qbi-bottom-bar-hidden { transform: translateY(100%); }
.qbi-btab {
  color: rgba(78, 70, 66, 0.55);
  transition: color 0.2s ease;
}
.qbi-btab:hover,
.qbi-btab.qbi-btab-active { color: #FF5F1F; }

/* ── Header scroll shadow ── */
#qbi-header.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

/* ── Mini Pill: tabs ↔ pill geçişi ── */
#qbi-center-tabs {
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#qbi-mini-pill {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.97);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#qbi-header.search-compact #qbi-center-tabs {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}
#qbi-header.search-compact #qbi-mini-pill {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ── Expanded search bar collapse ── */
#qbi-search-expanded.qbi-search-collapsed {
  display: none;
}

/* ── Mobile Search Bottom Sheet ── */
#qbi-search-backdrop {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
#qbi-search-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
#qbi-search-overlay {
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
#qbi-search-overlay.open { transform: translateY(0); }

/* ── Mobile Search Accordion ── */
.qbi-search-card { transition: box-shadow 0.2s ease; }
.qbi-search-card.open { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }
.qbi-search-card.open .qbi-card-chevron { transform: rotate(180deg); }

/* ── Mobile Chip Selection ── */
.qbi-age-chip.selected,
.qbi-cat-chip.selected,
.qbi-time-chip.selected {
  border-color: #FF5F1F;
  background: rgba(255, 95, 31, 0.08);
  color: #FF5F1F;
  font-weight: 600;
}

/* ── Desktop Search Field Dropdowns ── */
.qbi-ara-cat-chip.selected {
  border-color: #FF5F1F;
  background: rgba(255, 95, 31, 0.08);
  color: #FF5F1F;
  font-weight: 600;
}
.qbi-desktop-field.qbi-field-active {
  background-color: #F4F0E9;
  border-radius: 9999px;
}
.qbi-desktop-field:not(.qbi-field-active):hover {
  background-color: rgba(244, 240, 233, 0.5);
  border-radius: 9999px;
}
#qbi-desktop-search-bar {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
#qbi-desktop-search-bar.qbi-search-bar-active {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border-color: transparent;
}
/* ── Separator hide on active adjacent field ── */
.qbi-sep-1, .qbi-sep-2 {
  transition: opacity 0.2s ease;
}
#qbi-desktop-search-bar[data-active="ara"] .qbi-sep-1 { opacity: 0; }
#qbi-desktop-search-bar[data-active="yas"] .qbi-sep-1,
#qbi-desktop-search-bar[data-active="yas"] .qbi-sep-2 { opacity: 0; }
#qbi-desktop-search-bar[data-active="gun"] .qbi-sep-2 { opacity: 0; }

/* ── Selected subtitle value ── */
.has-value {
  color: #FF5F1F !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

/* ── Focus ring on search bar when a field has focus ── */
#qbi-desktop-search-bar:focus-within {
  outline: 2px solid rgba(255, 95, 31, 0.3);
  outline-offset: 2px;
}

.qbi-desktop-panel {
  animation: qbi-panel-in 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes qbi-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Workshop Card ── */
.workshop-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) {
  .workshop-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(26, 22, 20, 0.08);
  }
}
@media (max-width: 639px) {
  .workshop-card {
    border: 1px solid rgba(26, 22, 20, 0.06);
  }
  .workshop-card h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 15px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .workshop-card .card-rating:has(.text-amber-400) {
    display: none;
  }
}

/* ── Scroll Reveal ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

[data-reveal] { opacity: 0; }
[data-reveal].revealed          { animation: fadeUp  0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
[data-reveal="fade"].revealed   { animation: fadeIn  0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
[data-reveal="scale"].revealed  { animation: scaleIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }

[data-reveal-stagger] > [data-reveal].revealed:nth-child(1) { animation-delay:   0ms; }
[data-reveal-stagger] > [data-reveal].revealed:nth-child(2) { animation-delay: 100ms; }
[data-reveal-stagger] > [data-reveal].revealed:nth-child(3) { animation-delay: 200ms; }
[data-reveal-stagger] > [data-reveal].revealed:nth-child(4) { animation-delay: 300ms; }
[data-reveal-stagger] > [data-reveal].revealed:nth-child(5) { animation-delay: 400ms; }
[data-reveal-stagger] > [data-reveal].revealed:nth-child(6) { animation-delay: 500ms; }
[data-reveal-stagger] > [data-reveal].revealed:nth-child(7) { animation-delay: 600ms; }
[data-reveal-stagger] > [data-reveal].revealed:nth-child(8) { animation-delay: 700ms; }

/* ── Fluid Headlines ── */
.fluid-hero {
  font-size: clamp(2.5rem, 6vw, 7rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.fluid-section-title {
  font-size: clamp(2rem, 4.5vw, 4rem);
  letter-spacing: -0.02em;
}

/* ── Marquee ── */
.marquee-wrapper {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  will-change: transform;
  animation: marquee-left 60s linear infinite;
}
.marquee-track.marquee-reverse {
  animation: marquee-right 36s linear infinite;
}
.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.marquee-logo { mix-blend-mode: multiply; }
.marquee-track:not(.marquee-reverse) > div {
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.marquee-track:not(.marquee-reverse) > div p:first-child {
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 640px) {
  .marquee-wrapper {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  }
  .marquee-track:not(.marquee-reverse) > div {
    width: 72vw !important;
    max-width: 260px !important;
  }
  .marquee-track.marquee-reverse { gap: 1rem !important; }
  .marquee-track.marquee-reverse > div {
    height: 64px !important;
    min-width: 120px !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  .marquee-track.marquee-reverse > div img { width: 110px !important; height: 38px !important; }
  .marquee-track.marquee-reverse > div img[style*="border-radius:50%"] {
    width: 38px !important;
    height: 38px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}