@font-face {
  font-family: "CookieRun KR";
  src: url("cookie-dex/assets/fonts/CookieRun-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* =========================================
   FEATURE PAGE LAYOUT & VARS
   ========================================= */

:root {
  --bg-deep: #060305;
  --bg-mid: #10060c;
  --surface: rgba(22, 10, 20, 0.85);
  --surface-strong: rgba(14, 5, 12, 0.92);
  --line: rgba(255, 51, 120, 0.22);
  --text: #ffffff;
  --text-soft: #dfc8d5;
  --brand-warm: #ff1a66;
  --brand-cool: #00eaff;
  --brand-violet: #d61aff;
  --brand-gold: #ffcc00;
  --radius-lg: 1.25rem;
  --radius-md: 0.95rem;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.65), 0 0 35px rgba(214, 26, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, rgba(255, 26, 102, 0.20), transparent 45%),
    radial-gradient(circle at 90% -5%, rgba(214, 26, 255, 0.18), transparent 40%),
    radial-gradient(circle at 50% 110%, rgba(0, 234, 255, 0.08), transparent 50%),
    linear-gradient(170deg, #060305 0%, #0d040a 40%, #150610 100%);
}

.bento-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(111, 242, 255, 0.24);
  background: linear-gradient(180deg, rgba(8, 3, 10, 0.96), rgba(8, 3, 10, 0.76));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.34),
    inset 0 -1px 0 rgba(214, 26, 255, 0.2);
  padding: 0 1.5rem;
}

.bento-header-inner {
  max-width: 1600px;
  margin: 0 auto;
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transition: filter 200ms ease;
}

.brand-link-image {
  display: block;
  width: clamp(10rem, 14vw, 13rem);
  height: auto;
}

.brand-link:hover {
  filter: drop-shadow(0 0 8px rgba(255, 26, 102, 0.5));
}

.bento-nav {
  display: flex;
  gap: 1.5rem;
}

.bento-nav a {
  font-family: 'CookieRun KR', 'Outfit', sans-serif;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: color 200ms ease, text-shadow 200ms ease;
}

.bento-nav a:hover,
.bento-nav a:focus-visible,
.bento-nav a[aria-current="page"] {
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.6);
  outline: none;
}

/* =========================================
   FEATURE GRID ARCHITECTURE
   ========================================= */

.route-main {
  max-width: 1600px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  gap: 2rem;
  min-height: calc(100vh - 9rem);
}

.premium-glass {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    145deg,
    rgba(30, 12, 26, 0.65) 0%,
    rgba(16, 6, 14, 0.80) 50%,
    rgba(10, 4, 8, 0.90) 100%
  );
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  padding: 2rem;
}

/* Specific Accent Colors for Sections */
.accent-arena { border-color: rgba(0, 234, 255, 0.4); }
.accent-guild { border-color: rgba(255, 204, 0, 0.4); }
.accent-dex { border-color: rgba(255, 26, 102, 0.4); }
.accent-resonant { border-color: rgba(214, 26, 255, 0.4); }

.feature-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.eyebrow {
  margin: 0;
  font-family: 'CookieRun KR', 'Outfit', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 1rem;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

h1, h2, h3 {
  margin: 0;
  font-family: 'CookieRun KR', 'Outfit', sans-serif;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.8rem); }

.hero-copy {
  font-size: 1.15rem;
  color: var(--text-soft);
  max-width: 800px;
  line-height: 1.6;
}

/* =========================================
   PLACEHOLDER GRIDS
   ========================================= */

.feature-grid-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.placeholder-card {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background: rgba(10, 4, 8, 0.5);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.placeholder-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

.slot-container {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.cookie-slot {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-glow {
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-family: 'CookieRun KR', 'Outfit', sans-serif;
  display: inline-block;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 200ms ease, box-shadow 200ms ease;
  margin-top: 1rem;
}

.btn-glow:hover {
  background: rgba(255,255,255,0.15);
  box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

.route-footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Hamburger toggle button (hidden on desktop) */
.feature-nav-toggle {
  display: none;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  border: 1px solid rgba(111, 242, 255, 0.42);
  border-radius: 0.72rem;
  background: linear-gradient(145deg, rgba(11, 20, 36, 0.94), rgba(26, 9, 31, 0.96));
  color: #f4fbff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(214, 26, 255, 0.14),
    0 0 18px rgba(0, 234, 255, 0.16),
    0 10px 24px rgba(0, 0, 0, 0.28);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.feature-nav-toggle:hover,
.feature-nav-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(214, 153, 255, 0.72);
  background: linear-gradient(145deg, rgba(14, 26, 46, 0.98), rgba(35, 12, 42, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(214, 26, 255, 0.2),
    0 0 22px rgba(0, 234, 255, 0.24),
    0 12px 28px rgba(0, 0, 0, 0.3);
}

.feature-nav-toggle:focus-visible {
  outline: 2px solid rgba(111, 242, 255, 0.5);
  outline-offset: 2px;
}

.feature-nav-toggle-icon,
.feature-nav-toggle-icon::before,
.feature-nav-toggle-icon::after {
  display: block;
  width: 0.88rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ff7ff 0%, #d697ff 55%, #ff88b0 100%);
  box-shadow:
    0 0 8px rgba(0, 234, 255, 0.42),
    0 0 14px rgba(214, 26, 255, 0.2);
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.feature-nav-toggle-icon {
  position: relative;
}

.feature-nav-toggle-icon::before,
.feature-nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.feature-nav-toggle-icon::before {
  transform: translateY(-6px);
}

.feature-nav-toggle-icon::after {
  transform: translateY(6px);
}

@media (max-width: 860px) {
  .bento-header {
    overflow: visible;
  }

  .bento-header-inner {
    position: relative;
    overflow: visible;
    flex-wrap: nowrap;
    gap: 0.75rem;
    min-height: 3.5rem;
    padding: 0.75rem 0;
  }

  .feature-nav-toggle {
    display: flex;
    order: -1;
  }

  .brand-link {
    margin-right: auto;
  }

  .bento-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    right: 0;
    z-index: 60;
    flex-basis: auto;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.7rem;
    border: 1px solid rgba(255, 188, 210, 0.16);
    border-radius: 0.95rem;
    background: linear-gradient(180deg, rgba(14, 6, 12, 0.96), rgba(10, 4, 8, 0.9));
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px) saturate(1.12);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
  }

  .feature-nav-toggle.is-open ~ .bento-nav {
    display: flex;
  }

  .bento-nav a {
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    transition: background 150ms ease;
  }

  .bento-nav a:hover,
  .bento-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.06);
  }

  /* Hamburger icon animation when open */
  .feature-nav-toggle.is-open .feature-nav-toggle-icon {
    background: transparent;
    box-shadow: none;
  }

  .feature-nav-toggle.is-open .feature-nav-toggle-icon::before {
    transform: rotate(45deg);
  }

  .feature-nav-toggle.is-open .feature-nav-toggle-icon::after {
    transform: rotate(-45deg);
  }

  .brand-link-image {
    width: min(10.5rem, 48vw);
  }
}
