/* ---------- Header (dark violet, continuous with the hero) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--violet);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  margin-right: auto;
  color: var(--white);
}

.brand__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__line {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.brand__line--sub {
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  color: #d9d0ee;
}

.primary-nav ul {
  display: flex;
  gap: var(--space-5);
}

.primary-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--white);
  padding-block: var(--space-2);
  position: relative;
  white-space: nowrap;
}

.primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 3px;
  background: var(--gold);
  border-radius: var(--radius-pill);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-header__actions::before {
  content: "";
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.25);
  margin-right: var(--space-2);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: inherit;
}

.site-header .icon-btn { color: var(--white); }
.site-header .icon-btn:hover { background: rgba(255, 255, 255, 0.12); }

.menu-toggle { display: none; }
.menu-toggle .icon--close { display: none; }
.menu-toggle[aria-expanded="true"] .icon--menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon--close { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 12px 22px;
  min-height: 44px;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.btn--primary { background: var(--mint); color: var(--violet-dark); }
.btn--primary:hover { background: #a6f0c2; }

.btn--gold { background: var(--gold); color: var(--violet-dark); }
.btn--gold:hover { background: #edb84f; }

.btn--outline { background: var(--white); color: var(--ink); border: 1.5px solid var(--border); }
.btn--outline:hover { background: var(--lilac); }

.hero__card .btn--outline { border-color: #c9c0dc; }

.btn--small { padding: 10px 18px; font-size: 0.88rem; }
.btn:active { transform: translateY(1px); }

/* Search panel */
.search-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--violet-dark);
  padding-block: var(--space-4);
}

.search-panel[hidden] { display: none; }

.search-panel input[type="search"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  min-height: 44px;
  background: var(--white);
  color: var(--ink);
}

.search-results { margin-top: var(--space-3); display: grid; gap: var(--space-2); }

.search-results a {
  display: block;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}

.search-results a small { display: block; font-weight: 400; color: var(--muted); }
.search-empty { color: #cfc6e3; padding: var(--space-2); }
.error-page .search-empty { color: var(--muted); }

/* ---------- Hero (full-bleed violet with the draw machine on the right) ---------- */
.hero {
  background: radial-gradient(120% 160% at 15% 0%, #4a3573 0%, var(--violet) 45%, #241640 100%);
  color: var(--white);
  position: relative;
  overflow: clip;
}

.hero__art {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%), linear-gradient(180deg, transparent 0%, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%), linear-gradient(180deg, transparent 0%, #000 22%);
  mask-composite: intersect;
}

.hero::after {
  /* soften the seam between the artwork and the gradient */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--violet) 0%, rgba(50, 32, 86, 0.7) 30%, rgba(50, 32, 86, 0) 52%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--space-7);
  max-width: var(--content);
}

.hero__inner > div:first-child { max-width: 540px; }
.hero__inner > div:last-child:not(:first-child) { display: none; }

.hero h1 {
  color: var(--white);
  margin-bottom: var(--space-3);
  font-size: clamp(2.6rem, 5.2vw + 1rem, 4.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero h1 .accent { color: var(--gold); display: block; font-size: 0.86em; }

.hero__lede { color: #f1ecfa; font-size: 1.15rem; max-width: 44ch; }

.hero__card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: var(--space-5);
  max-width: 440px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  margin-top: var(--space-5);
}

.hero__card--wide { max-width: 580px; }
.hero__card .filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hero__card .filter-form .btn { grid-column: 1 / -1; justify-self: end; }

.hero__card--glass {
  background: rgba(70, 48, 110, 0.72);
  color: var(--white);
  backdrop-filter: blur(6px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  align-items: center;
  max-width: 540px;
}

.hero__card--glass h2 { color: var(--white); font-size: 1.9rem; margin: 0 0 var(--space-2); }
.hero__card--glass p { color: #e6e0f2; }
.hero__card--glass .hero__card-icon {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  margin: 0;
}
.hero__card--glass .hero__card-icon .icon { width: 56px; height: 56px; }
.hero__card--glass .hero__actions { grid-column: 1 / -1; }
.hero__card--glass .btn--outline { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.5); }

.hero__card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--violet-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.hero__card-icon .icon { width: 26px; height: 26px; }

.hero__card-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.hero__card h2 { margin: var(--space-1) 0; font-size: 1.85rem; }
.hero__card > p { margin-bottom: var(--space-2); }

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }

/* ---------- Footer (single row like the mockup) ---------- */
.site-footer {
  background: var(--violet-dark);
  color: #cfc6e3;
  margin-top: var(--space-8);
}

.site-footer__main {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-6);
  flex-wrap: wrap;
}

.site-footer__brand p {
  color: #d9d0ee;
  font-size: 0.9rem;
  margin: 0;
  max-width: 48ch;
}

.site-footer__brand { display: flex; align-items: center; gap: var(--space-5); flex: 1 1 520px; }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-left: auto;
}

.site-footer__links a,
.site-footer__legal a {
  color: #e6e0f2;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-footer__links a:hover,
.site-footer__legal a:hover { color: var(--gold); }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
}

.site-footer__legal a { font-weight: 500; font-size: 0.82rem; color: #b9aed4; }

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: var(--space-4);
  font-size: 0.82rem;
  color: #9c8fbb;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .primary-nav {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: var(--violet);
    padding: var(--space-5);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
    overflow-y: auto;
  }

  .primary-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity .15s ease, transform .15s ease;
  }

  .primary-nav ul { flex-direction: column; gap: 0; }

  .primary-nav a {
    display: block;
    padding: 14px var(--space-2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 1.05rem;
  }

  .primary-nav a[aria-current="page"]::after { display: none; }
  .primary-nav a[aria-current="page"] { color: var(--gold); }

  .menu-toggle { display: inline-flex; }
  .site-header__actions .btn--primary { display: none; }

  .hero__art { height: auto; width: 92%; right: -26%; top: 8%; bottom: auto; opacity: 0.9; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%); -webkit-mask-composite: source-over; mask-composite: add; }
  .hero__inner { position: relative; }
  .hero::after { background: linear-gradient(180deg, var(--violet) 0%, rgba(50, 32, 86, 0.6) 45%, rgba(50, 32, 86, 0) 100%); }
  .hero__inner { min-height: 0; padding-block: var(--space-6) var(--space-7); }
  .hero__inner > div:first-child { max-width: none; }
  .hero__card { max-width: 84%; }
  .hero__card--glass { grid-template-columns: 1fr; }

  .site-footer__main { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .site-footer__brand { flex-basis: auto; }
  .site-footer__brand { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .site-footer__links { margin-left: 0; }
}
