:root {
  --bg: #0e0818;
  --bg-elevated: #160f24;
  --surface: #1f1530;
  --text: #f5f0ff;
  --muted: #a89bc4;
  /* Primary: Kitdy purple */
  --accent: #9b6dff;
  --accent-dim: #6b3dcc;
  /* Accents: gold */
  --gold: #e4bc5a;
  --gold-dim: #b8923d;
  --line: #2d2240;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 15% -15%, rgba(155, 109, 255, 0.18), transparent 52%),
    radial-gradient(ellipse 90% 70% at 100% 20%, rgba(228, 188, 90, 0.07), transparent 48%);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--gold);
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 8, 24, 0.88);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--gold);
  text-decoration: none;
}

.logo:hover {
  color: #f0d78c;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--gold);
}

.nav-external {
  text-transform: capitalize;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}

.nav-dropdown__summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown__summary::after {
  content: "";
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  display: inline-block;
  padding: 2.5px;
  transform: rotate(45deg);
  margin-top: -2px;
  opacity: 0.75;
}

.nav-dropdown[open] .nav-dropdown__summary::after {
  transform: rotate(225deg);
  margin-top: 2px;
}

.nav-dropdown__summary:hover {
  color: var(--gold);
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 12.5rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 60;
}

.nav-dropdown__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-dropdown__link:hover {
  color: var(--gold);
  background: rgba(155, 109, 255, 0.12);
}

.nav-social-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.nav-social-icon--fallback {
  display: inline-block;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 2px;
  background: var(--muted);
  opacity: 0.5;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.clip-watch {
  max-width: 960px;
}

.clip-watch-back {
  margin: 0 0 1rem;
}

.clip-watch-back a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

.clip-watch-back a:hover {
  text-decoration: underline;
}

.clip-watch-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.clip-watch-meta {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.clip-embed-frame {
  margin-bottom: 1rem;
}

.clip-watch-external {
  margin: 0;
  font-size: 0.9rem;
}

.clip-watch-external a {
  color: var(--gold);
  font-weight: 600;
}

.hero {
  margin-bottom: 3rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 0.75rem;
  color: var(--gold);
  text-shadow:
    0 0 48px rgba(228, 188, 90, 0.35),
    0 0 72px rgba(155, 109, 255, 0.25);
}

.lede {
  color: var(--muted);
  max-width: 36ch;
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
}

.mock-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  max-width: 42rem;
}

.mock-banner strong {
  color: var(--gold);
}

.live-pill,
.offline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.95rem;
}

.live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(155, 109, 255, 0.85), 0 0 8px var(--gold-dim);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.6;
  }
}

.offline-pill {
  color: var(--muted);
}

.stream-title {
  font-weight: 600;
  margin: 0.75rem 0 0.25rem;
}

.stream-game {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.embed-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 16 / 9;
  /* Twitch Embedded Experiences: min 400×300; helps visibility / autoplay checks */
  min-height: 300px;
  min-width: min(100%, 400px);
}

.embed-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
  display: block;
}

.embed-twitch-note {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 48ch;
  line-height: 1.4;
}

.offline-thumb {
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.hero-placeholder {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--surface), var(--bg-elevated));
  border: 1px dashed var(--line);
}

.section {
  margin-bottom: 3.5rem;
}

.section-alt {
  padding: 2rem 0;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.section-sub {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

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

.section-link:hover {
  color: #f0d78c;
  text-decoration: underline;
}

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.media-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.media-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.media-card-img {
  display: block;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #000;
}

.media-card-body {
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.media-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-card-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.media-card-img--empty {
  background: linear-gradient(135deg, var(--surface), var(--bg-elevated));
  border-bottom: 1px solid var(--line);
}

.merch-product-grid {
  margin-top: 1.5rem;
}

.merch-product-grid--page {
  margin-top: 2rem;
}

.merch-product-card .media-card-meta {
  min-height: 1.25rem;
}

.merch-empty {
  margin-top: 1rem;
  max-width: 50ch;
}

.merch-empty a {
  color: var(--gold);
  font-weight: 600;
}

.empty {
  color: var(--muted);
  margin: 0;
}

.merch-note {
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 52ch;
  margin: 1rem 0 0;
}

.merch-note a {
  color: var(--gold);
  font-weight: 600;
}

.merch-callout {
  padding: 1.5rem 1.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--surface) 0%, var(--bg-elevated) 100%);
  box-shadow: 0 0 0 1px rgba(155, 109, 255, 0.08);
  max-width: 40rem;
}

.merch-callout--hero {
  max-width: 44rem;
  padding: 2rem 2rem;
}

.merch-callout-lead {
  margin: 0 0 1.25rem;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.55;
}

.merch-callout-lead code {
  font-size: 0.82em;
}

.merch-callout-lead a {
  color: var(--gold);
  font-weight: 600;
}

.btn-merch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--bg);
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dim) 100%);
  border-radius: 10px;
  border: 1px solid var(--gold-dim);
  box-shadow: 0 2px 16px rgba(228, 188, 90, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-merch:hover {
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(155, 109, 255, 0.35);
}

.btn-merch--large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

button.btn-merch {
  cursor: pointer;
  font-family: var(--font-display);
}

.btn-merch--ghost {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold-dim);
  box-shadow: none;
}

.btn-merch--ghost:hover {
  color: var(--gold);
  background: rgba(228, 188, 90, 0.08);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-text:hover {
  color: var(--gold);
}

.discord-gate h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.03em;
}

.card-surface {
  margin-top: 1.5rem;
  padding: 1.35rem 1.5rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.gate-flow-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.gate-flow-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.6;
}

.gate-flow-list li {
  margin-bottom: 0.5rem;
}

.gate-flow-list strong {
  color: var(--text);
}

.gate-demo-copy {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.demo-login-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.gate-session-meta {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.gate-result {
  margin-top: 1.5rem;
}

.gate-result--ok {
  border-color: rgba(155, 109, 255, 0.45);
}

.gate-result--wait {
  border-color: var(--line);
}

.gate-note {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.merch-fullpage {
  min-height: calc(100vh - 10rem);
}

.merch-fullpage-head h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  margin: 0;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.feature-card:hover {
  border-color: var(--gold);
}

.feature-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0.35rem 0;
}

.site-footer a {
  color: var(--gold);
}

.site-footer-copyright {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

.dress-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 360px);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 820px) {
  .dress-layout {
    grid-template-columns: 1fr;
  }
}

.dress-panel .dress-layer-field {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 1rem 1rem;
  margin-bottom: 1rem;
}

.dress-panel legend {
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0 0.35rem;
}

.dress-variant-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dress-variant-btn--active {
  background: rgba(155, 109, 255, 0.2) !important;
  border-color: var(--accent) !important;
  color: var(--text) !important;
}

.dress-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.dress-name-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.dress-name-input {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}

.dress-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.dress-saved-heading {
  margin-top: 1.5rem;
}

.dress-saved-box {
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 2rem;
}

.dress-saved-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dress-saved-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.dress-saved-name {
  font-weight: 600;
  color: var(--text);
}

.dress-saved-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.dress-preview .dress-canvas-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--line);
}

#dress-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

code {
  font-size: 0.88em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
