/* ═══════════════════════════════════════════════════════════
   GRAPHLY COLOR SYSTEM v4 · Enhanced Design
   Fonts:  Clash Display (headings) + Bricolage Grotesque (body) + DM Mono (code/labels)
   Modern file structure with improved UI/UX patterns
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── CORE PALETTE ── */
  --indigo-950: #160D3D;
  --indigo-800: #2A1A70;
  --indigo-600: #4830B8;
  --indigo-500: #5C42D9;
  /* ★ brand */
  --indigo-400: #7B64E8;
  --indigo-300: #A594F0;
  --indigo-100: #DDD7FC;
  --indigo-50: #F2F0FF;
  --coral-600: #C93318;
  --coral-500: #E84828;

  /* ★ gamification */
  --coral-400: #F06A4D;
  --coral-100: #FCD5CC;
  --coral-50: #FFF2EF;
  --mint-600: #008A66;
  --mint-500: #00B887;

  /* ★ success */
  --mint-400: #26D4A0;
  --mint-100: #9EEEDD;
  --mint-50: #E5FAF4;

  --lemon-500: #F0C000;
  /* ★ XP/coins */
  --lemon-300: #FFE066;
  --lemon-50: #FFFBE6;

  /* ── SEMANTIC ── */
  --error: #E83257;
  --caution: #F59E0B;
  --info: #3B7EF6;

  /* ── NEUTRALS ── */
  --ink-950: #0C0A18;
  --ink-800: #1C1833;
  --ink-600: #3F3A5C;
  --ink-400: #7E789E;
  --ink-200: #CBC7E0;
  --ink-100: #ECEAF6;
  --ink-50: #F7F6FC;

  /* ── SURFACES ── */
  --bg: #F8F7FD;
  --card: #FFFFFF;

  /* ── DARK MODE ── */
  --dm-bg: #0A0816;
  --dm-surface: #120F24;
  --dm-card: #1A1730;
  --dm-elevated: #24203E;
  --dm-border: rgba(92, 66, 217, .22);
  --dm-text-1: #EAE6FF;
  --dm-text-2: #9E98C0;
  --dm-text-3: #5A557A;
  --dm-indigo: #7C66F5;
  --dm-coral: #FF6E50;
  --dm-mint: #00E8A8;
  --dm-lemon: #FFD000;

  /* ── TYPOGRAPHY ── */
  --ff-display: 'Bricolage Grotesque', 'Georgia', sans-serif;
  --ff-body: 'Bricolage Grotesque', 'Georgia', sans-serif;
  --ff-sub: 'Poppins', 'Bricolage Grotesque', 'Georgia', sans-serif;
  --ff-mono: 'Bricolage Grotesque', 'Georgia', sans-serif;
  /* ── RADII ── */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 18px;

  /* ── SHADOWS ── */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .08);
  --shadow-md: 0 6px 14px rgba(73, 73, 73, 0.12);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, .15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0px;
  padding: 0px;
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--ink-800);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Animations extracted from main.js */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* Enhanced focus states for accessibility */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--indigo-500);
  outline-offset: 2px;
}

/* Selection styling */
::selection {
  background-color: var(--indigo-500);
  color: white;
}

/* Improve cursor for interactive elements and remove blue tap highlight */
a,
button,
[role="button"],
[data-clickable] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(92, 66, 217, .10), transparent 38%),
    radial-gradient(circle at 84% 12%, rgba(232, 72, 40, .07), transparent 32%);
}

/* ═══════════════════════════════════
   HERO — STATIC GEOMETRIC COMPOSITION
═══════════════════════════════════ */
.hero {
  background: var(--ink-950);
  min-height: 460px;
  display: grid;
  grid-template-columns: 1fr 660px 110px;
  gap: 0;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

.site-nav {
  position: fixed;
  top: 50%;
  left: 20px;
  right: auto;
  transform: translateY(-50%);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  padding: 24px 9px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 30px;
  box-shadow: 0 14px 32px rgba(12, 10, 24, 0.14);
  width: 55px;
  max-width: calc(100vw - 40px);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, box-shadow 0.4s ease;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(14px);
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--ink-50);
  overflow: hidden;
  justify-content: center;
}

.site-nav:hover {
  width: 200px;
}

/* Initial Light Glass (at top of page) */
.nav-dark {
  background-color: rgba(255, 255, 255, 0.6);
  color: var(--ink-900);
}

/* Scrolled Dark Glass */
.nav-light {
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--ink-50);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Ensure hover/focus link states remain readable on both nav themes */
.nav-dark a:hover,
.nav-dark a:focus,
.nav-light a:hover,
.nav-light a:focus {
  color: inherit;
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.site-nav a {
  font-family: var(--ff-mono);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 12px;
  border-radius: 999px;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 0.15s ease, color 0.15s ease;
  width: 100%;
}

.nav-label {
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.site-nav:hover .nav-label {
  opacity: 1;
  transition-delay: 0.1s;
}

/* Inline icons in nav links */
.nav-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.75;
}

/* Icons in section kickers */
.kicker-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: var(--indigo-400);
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.site-nav a:hover,
.site-nav a:focus {
  background: rgba(92, 66, 217, 0.17);
  color: inherit;
  outline: none;
}

.site-nav a:focus-visible {
  box-shadow: 0 0 0 2px rgba(92, 66, 217, 0.3);
}

/* --- Mobile Nav Dropdown: Three-Dots Button --- */

/* Hidden on desktop entirely */
.nav-more-wrapper {
  display: none;
  position: static;
}

.nav-more-btn {
  background: rgba(255, 255, 255, 0.07);
  border: none;
  color: var(--ink-50);
  padding: 14px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  line-height: 1;
}

.nav-more-btn:hover,
.nav-more-btn:focus {
  background: rgba(92, 66, 217, 0.24);
  outline: none;
}

/* CSS-only three dots */
.nav-more-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-more-dots span {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* --- Dropdown Popup: fixed to viewport, positioned by JS --- */
.nav-dropdown {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  min-width: 180px;

  /* Glassmorphism */
  background-color: rgba(14, 10, 32, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);

  /* Start hidden + slightly translated downward */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}

.nav-dropdown.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0s;
}

/* Dropdown links — reset all nav-link inherited styles */
.nav-dropdown a {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  padding: 11px 16px;
  border-radius: var(--r-md);
  background: transparent !important;
  /* Override .site-nav a mobile style */
  scroll-snap-align: unset !important;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus {
  background: rgba(92, 66, 217, 0.22) !important;
  color: #fff;
  outline: none;
}

@media (max-width: 760px) {

  .site-nav,
  .site-nav:hover {
    overflow: visible;
    flex-direction: row;
    justify-content: center;
    padding: 12px 16px;
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    bottom: 24px;
    width: auto;
    max-width: 90vw;
    border-radius: 999px;
    background-color: rgba(20, 15, 40, 0.85);
    /* Slightly darker for contrast against more bg's */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Hide the extra items */
  .mobile-hidden {
    display: none !important;
  }

  /* Show the 3-dots wrapper */
  .nav-more-wrapper {
    display: block;
  }

  /* Ensure it always stays visible and readable on mobile regardless of scroll theme class */
  .site-nav.nav-dark,
  .site-nav.nav-light {
    background-color: rgba(20, 15, 40, 0.85) !important;
    color: var(--ink-50) !important;
  }

  .site-nav ul {
    flex-direction: row;
    gap: 12px;
  }

  .site-nav a {
    white-space: nowrap;
    padding: 10px 16px;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.05);
    /* Slight pill background for each link on mobile */
  }

  /* Hide scrollbars but keep scrolling usable */
  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .nav-label {
    opacity: 1;
    transition: none;
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 40% 20%, rgba(255, 255, 255, .08), transparent 60%);
  opacity: .14;
  mix-blend-mode: normal;
}

/* big geometric shapes — static, layered, compositional */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg .circle-1 {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 66, 217, .24) 0%, transparent 70%);
  top: -100px;
  right: 60px;
}

.hero-bg .circle-2 {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 184, 135, .14) 0%, transparent 70%);
  bottom: -40px;
  left: 40%;
}

.hero-left {
  padding: 72px 56px 72px 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--indigo-300);
  margin-bottom: 24px;
}

.hero-eyebrow .pipe {
  width: 24px;
  height: 2px;
  background: var(--ink-50);
  border-radius: 2px;
}

.hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(48px, 5.5vw, 74px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.025em;
  color: var(--ink-50);
  margin-bottom: 24px;
}

.hero h1 .word-vibrant {
  color: var(--indigo-300);
  display: block;
}

.hero h1 .word-fun {
  display: block;
  color: var(--coral-300);
}

.hero-desc {
  font-family: var(--ff-sub);
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .55);
  max-width: 480px;
  font-weight: 400;
  margin-bottom: 36px;
}

.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-tag {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .55);
  /*background: rgba(255,255,255,.04);*/
  transition: all .2s ease;
}

.hero-tag.active {
  border-color: var(--indigo-50);
  color: var(--indigo-50);
  text-decoration: none;
  /*background: rgba(92,66,217,.15);*/
}

/* hero right — color showcase panel */
.hero-right {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 80px;
  gap: 10px;
}

.hero-swatch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .04);
  border: 1.5px solid rgba(255, 255, 255, .07);
  backdrop-filter: blur(4px);
  transition: transform .2s ease, background .2s ease;
  cursor: pointer;
}

.hero-swatch-row:hover {
  background: rgba(255, 255, 255, .08);
  transform: translateX(-2px);
}

.hsr-dot {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
  transform-origin: center;
}

.hsr-dot:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.12);
}

.hsr-info {
  flex: 1;
}

.hsr-name {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  display: block;
  margin-bottom: 1px;
}

.hsr-role {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .35);
}

.hsr-hex {
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, .45);
  letter-spacing: .04em;
}

/* top color bar */
.color-bar {
  display: none;
  height: 0;
}

.color-bar div {
  flex: 1;
}

/* ═══════════════════════════════════
   PAGE WRAPPER
═══════════════════════════════════ 
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}*/

/* ═══════════════════════════════════
   SECTION WRAPPERS (VISUAL SEPARATION)
═══════════════════════════════════ */
.section {
  margin: 0px;
  padding: 64px 80px 64px 150px;
  background: var(--ink-50);
  scroll-margin-top: 40px;
}

.section:nth-of-type(odd) {
  background: var(--card);
}

.section:first-of-type {
  margin-top: 40px;
}

/* ═══════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════ */

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ff-display);
  font-size: 24px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--indigo-500);
  /*background: var(--indigo-50);
  border: 1.5px solid var(--indigo-100);*/
  border-radius: 99px;
  /*padding: 4px 13px;*/
  margin-bottom: 16px;
  transition: all .2s ease;
}

.section-dm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ff-display);
  font-size: 24px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--indigo-50);
  /*background: var(--indigo-50);
  border: 1.5px solid var(--indigo-100);*/
  border-radius: 99px;
  /*padding: 4px 13px;*/
  margin-bottom: 16px;
  transition: all .2s ease;
}

.section-kicker:hover {
  text-shadow: 4px 4px 12px rgba(0, 82, 45, 0.2);
}

.section-kicker .k-num {
  font-weight: 500;
  color: var(--indigo-300);
}

.section-title {
  font-family: var(--ff-body);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink-950);
  margin-bottom: 10px;
  line-height: 1.1;
}

.section-title .hi {
  color: var(--indigo-500);
}

.section-sub {
  font-family: var(--ff-sub);
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--ink-400);
  max-width: 580px;
  margin-bottom: 40px;
  font-weight: 400;
}

/* ═══════════════════════════════════
   SCIENCE CARDS
═══════════════════════════════════ */
.sci-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.sci-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 28px 22px 24px;
  border: 1.5px solid var(--ink-100);
  /* box-shadow: var(--shadow-sm); */
  position: relative;
  overflow: hidden;
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease;
}

.sci-card::after {
  content: "";
  position: absolute;
  left: -30%;
  top: -30%;
  width: 70%;
  height: 70%;
  background: linear-gradient(140deg, rgba(255, 255, 255, .18), transparent 62%);
  transform: rotate(6deg);
  opacity: .28;
  pointer-events: none;
}

.sci-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.sci-card-bar {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.sci-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--indigo-50), rgba(123, 100, 232, .22));
  color: var(--indigo-600);
  box-shadow: inset 0 0 0 1px rgba(92, 66, 217, .1);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}

.sci-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sci-card h4 {
  font-family: var(--ff-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-950);
  margin-bottom: 9px;
  letter-spacing: -.01em;
}

.sci-card p {
  font-size: 13px;
  line-height: 1.68;
  color: var(--ink-400);
  font-weight: 400;
}

.sci-ref {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  color: var(--indigo-400);
  letter-spacing: .06em;
  background: var(--indigo-50);
  padding: 3px 9px;
  border-radius: 5px;
}

/* ═══════════════════════════════════
   PRIMARY SWATCH CARDS
═══════════════════════════════════ */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.sw-card {
  background: var(--card);
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1.5px solid var(--ink-100);
  /* box-shadow: var(--shadow-sm); */
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease;
}

.sw-card:hover {
  transform: translateY(-4px) rotate(-.2deg);
  box-shadow: var(--shadow-sm);
}

#sw-top {
  height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}

.sw-top-circle {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  bottom: -60px;
  right: -40px;
  pointer-events: none;
}

.sw-top-circle2 {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  top: -20px;
  left: 30%;
  pointer-events: none;
}

.sw-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.sw-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sw-hex {
  font-family: var(--ff-mono);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .95);
  position: relative;
  z-index: 1;
}

.sw-body {
  padding: 22px 24px 26px;
}

.sw-name {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-950);
  letter-spacing: -.02em;
  margin-bottom: 5px;
}

.sw-role {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--indigo-500);
  background: var(--indigo-50);
  border-radius: 5px;
  padding: 3px 9px;
  margin-bottom: 14px;
}

.sw-desc {
  font-family: var(--ff-sub);
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--ink-400);
  font-weight: 400;
}

/* wide card variant */
.sw-card-wide {
  margin: 0px;
  grid-column: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;

}

.sw-card-wide .sw-top {
  width: auto;
  height: 168px;
}

/* ═══════════════════════════════════
   SECONDARY COLORS (DISCIPLINES)
═══════════════════════════════════ */
.secondary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.secondary-card {
  background: var(--card);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--ink-100);
  box-shadow: var(--shadow-sm);
  padding: 18px 16px 20px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.secondary-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.secondary-card__title {
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-950);
  margin-bottom: 10px;
}

.secondary-scale-row {
  display: flex;
  height: 62px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1.5px solid var(--ink-100);
  margin-top: 14px;
}

.secondary-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
  cursor: pointer;
  transition: flex .2s ease;
  color: rgba(255, 255, 255, 0.92);
}

.secondary-chip:hover {
  flex: 1.6;
}

.secondary-chip__label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .06em;
}

.secondary-chip__value {
  font-family: var(--ff-mono);
  font-size: 9px;
  opacity: .7;
}

@media screen and (max-width: 768px) {
  .secondary-scale-row {
    height: auto;
    flex-direction: column;
  }
}

/* ═══════════════════════════════════
   TONAL SCALES
═══════════════════════════════════ */
.scale-row {
  display: flex;
  height: 70px;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

@media screen and (max-width: 960px) {

  .scale-row {
    flex-wrap: wrap;
    height: auto;
  }

  .scale-row .scale-chip {
    flex: 1 1 180px;
  }

  /* Prevent hover-flex growth on touch/mobile layouts */
  .scale-row .scale-chip:hover {
    flex: 1 1 180px;
  }

}

.scale-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  margin-top: 28px;
}

.scale-name-row .sn-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.scale-name-row span {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-800);
  letter-spacing: -.01em;
}

.scale-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
  cursor: pointer;
  transition: flex .2s ease;
}

.scale-chip:hover {
  flex: 1.6;
}

.sc-hex {
  font-family: var(--ff-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .03em;
  line-height: 1.3;
}

.sc-step {
  font-family: var(--ff-mono);
  font-size: 8px;
  opacity: .6;
}

/* ═══════════════════════════════════
   SEMANTIC CARDS
═══════════════════════════════════ */
.semantic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sem-card {
  background: var(--card);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1.5px solid var(--ink-100);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
}

.sem-card:hover {
  transform: translateY(-3px);
}

.sem-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.sem-bar {
  height: 60px;
  margin-top: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-radius: var(--r-md);
}

.sem-bar-hex {
  font-family: var(--ff-mono);
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, .92);
  letter-spacing: .03em;
}

.sem-name {
  font-family: var(--ff-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-950);
  margin-bottom: 30px;
  margin-top: 15px;
  letter-spacing: -.01em;
}

.sem-desc {
  font-family: var(--ff-sub);
  font-size: 13px;
  line-height: 1.68;
  color: var(--ink-400);
}

/* ═══════════════════════════════════
   NEUTRALS
═══════════════════════════════════ */
.neutral-strip {
  display: flex;
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 88px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--ink-100);
}

.n-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
  cursor: pointer;
  transition: flex .2s ease;
}

.n-chip:hover {
  flex: 1.6;
}

.n-hex {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  font-weight: 500;
  display: block;
}

.n-name {
  font-family: var(--ff-mono);
  font-size: 8.5px;
  opacity: .55;
  margin-top: 2px;
  display: block;
}

/* ═══════════════════════════════════
   PSYCHOLOGY CARDS
═══════════════════════════════════ */
.psych-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.psych-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  border: 1px solid var(--ink-100);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1);
}

.psych-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.psych-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.psych-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.psych-card h4 {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-950);
  margin-bottom: 6px;
  letter-spacing: -.01em;
}

.psych-card p {
  font-family: var(--ff-sub);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-400);
}

/* ═══════════════════════════════════
   UI PREVIEW
═══════════════════════════════════ */
.preview-wrap {
  background: var(--ink-950);
  border-radius: var(--r-xl);
  padding: 52px 48px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 52px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.preview-wrap::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 66, 217, .18) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  pointer-events: none;
}

.preview-wrap::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 184, 135, .12) 0%, transparent 70%);
  bottom: -80px;
  left: 30%;
  pointer-events: none;
}

.preview-bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* phone */
.phone {
  width: 218px;
  background: #13102A;
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, .28),
    0 0 0 1px rgba(255, 255, 255, .07),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

.phone-notch {
  width: 56px;
  height: 18px;
  background: #0A0816;
  border-radius: 0 0 12px 12px;
  margin: 0 auto;
}

.phone-head {
  background: linear-gradient(150deg, var(--indigo-600) 0%, var(--indigo-800) 100%);
  padding: 16px 17px 18px;
  position: relative;
  overflow: hidden;
}

.phone-head::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  top: -30px;
  right: -20px;
}

.ph-eyebrow {
  font-family: var(--ff-mono);
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--indigo-300);
  margin-bottom: 3px;
}

.ph-heading {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
}

.ph-xp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.ph-xp-track {
  flex: 1;
  background: rgba(255, 255, 255, .14);
  border-radius: var(--r-md);
  height: 5px;
}

.ph-xp-fill {
  background: linear-gradient(90deg, var(--lemon-500), var(--coral-400));
  border-radius: var(--r-md);
  height: 5px;
  width: 62%;
}

.ph-xp-label {
  font-family: var(--ff-mono);
  font-size: 8.5px;
  color: var(--lemon-300);
  font-weight: 500;
  white-space: nowrap;
}

.phone-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
}

.ph-lesson {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  padding: 13px 14px;
}

.ph-lesson-tag {
  font-family: var(--ff-mono);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mint-400);
  margin-bottom: 4px;
}

.ph-lesson-name {
  font-family: var(--ff-display);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, .9);
  margin-bottom: 8px;
}

.ph-prog {
  background: rgba(255, 255, 255, .1);
  border-radius: var(--r-md);
  height: 4px;
}

.ph-prog-fill {
  background: linear-gradient(90deg, var(--mint-500), var(--mint-400));
  border-radius: var(--r-md);
  height: 4px;
  width: 45%;
}

.ph-streak {
  background: linear-gradient(135deg, var(--coral-600), var(--coral-500));
  border-radius: 16px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ph-streak-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-streak-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ph-streak-title {
  font-family: var(--ff-display);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.ph-streak-sub {
  font-family: var(--ff-mono);
  font-size: 8px;
  color: rgba(255, 255, 255, .65);
  letter-spacing: .04em;
}

.ph-hearts {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 16px;
  padding: 9px 14px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.hrt {
  width: 15px;
  height: 15px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.hrt.on {
  background: var(--error);
}

.hrt.off {
  background: rgba(255, 255, 255, .12);
}

/* notes beside phone */
.preview-notes {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.pv-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  opacity: 0;
  animation: fadeSlide .5s ease forwards;
}

.pv-note:nth-child(1) {
  animation-delay: .05s
}

.pv-note:nth-child(2) {
  animation-delay: .12s
}

.pv-note:nth-child(3) {
  animation-delay: .19s
}

.pv-note:nth-child(4) {
  animation-delay: .26s
}

.pv-note:nth-child(5) {
  animation-delay: .33s
}

.pv-note:nth-child(6) {
  animation-delay: .40s
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateX(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.pv-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pv-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pv-title {
  font-family: var(--ff-display);
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .9);
  margin-bottom: 2px;
  letter-spacing: -.01em;
}

.pv-desc {
  font-family: var(--ff-sub);
  font-size: 11.5px;
  color: rgba(255, 255, 255, .4);
  line-height: 1.55;
}

/* ═══════════════════════════════════
   DARK MODE SECTION
═══════════════════════════════════ */
.dm-section {
  background: var(--dm-bg);
  margin: 0px;
  padding: 64px 150px;
  position: relative;
  overflow: hidden;
}

.dm-bg-glow-1 {
  position: absolute;
  width: 500px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 66, 217, .16) 0%, transparent 70%);
  top: -120px;
  right: -80px;
  pointer-events: none;
}

.dm-bg-glow-2 {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 184, 135, .10) 0%, transparent 70%);
  bottom: -100px;
  left: 10%;
  pointer-events: none;
}

.dm-header {
  position: relative;
  margin-bottom: 44px;
}

.dm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(92, 66, 217, .18);
  border: 1.5px solid rgba(92, 66, 217, .3);
  border-radius: var(--r-md);
  padding: 4px 14px;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dm-indigo);
  margin-bottom: 16px;
}

.dm-kicker svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.art-icon .icon-fill {
  fill: currentColor;
  opacity: .14;
  stroke: none;
}

.sw-icon .art-icon,
.ph-streak-icon .art-icon,
.pv-icon .art-icon,
.dm-kicker .art-icon {
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .16));
}

.sci-icon .art-icon,
.psych-icon .art-icon {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .14));
}

.dm-section h2 {
  font-family: var(--ff-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: var(--dm-text-1);
  letter-spacing: -.02em;
  margin-bottom: 10px;
}

.dm-section h2 .glow {
  color: var(--dm-indigo);
}

.dm-sub {
  font-size: 15px;
  color: var(--dm-text-2);
  line-height: 1.7;
  max-width: 794px;
  font-family: var(--ff-body);
}

/* dark primary swatches */
.dm-sw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  position: relative;
}

.dm-sw {
  background: var(--dm-card);
  border: 1.5px solid var(--dm-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease;
}

.dm-sw:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(92, 66, 217, .2);
}

.dm-sw-top {
  height: 96px;
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.dm-sw-top::after {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  top: -25px;
  right: -20px;
}

.dm-sw-hex {
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .9);
  position: relative;
  z-index: 1;
  letter-spacing: .03em;
}

.dm-sw-body {
  padding: 14px 16px 18px;
}

.dm-sw-name {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--dm-text-1);
  margin-bottom: 3px;
  letter-spacing: -.01em;
}

.dm-sw-role {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dm-text-3);
  margin-bottom: 9px;
  display: block;
}

.dm-sw-desc {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--dm-text-2);
  font-family: var(--ff-body);
}

/* dark scales */
.dm-scale-kicker {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--dm-text-1);
  margin-bottom: 10px;
  margin-top: 36px;
  display: block;
}

.dm-scale-row {
  display: flex;
  height: 88px;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

@media (hover: hover) {
  .dm-scale-row:hover {
    box-shadow: var(--shadow-lg);
  }
}

@media screen and (max-width: 960px) {
  .dm-scale-row {
    flex-wrap: wrap;
    height: auto;
    display: flex;
    flex-direction: row;
    gap: 0;
  }

  .dm-scale-row .dm-chip {
    flex: 1 1 180px;
  }

  /* Prevent hover-flex growth on touch/mobile layouts */
  .dm-scale-row .dm-chip:hover {
    flex: 1 1 180px;
  }
}


@media screen and (max-width: 960px) {

  .scale-row {
    flex-wrap: wrap;
    height: auto;
  }

  .scale-row .scale-chip {
    flex: 1 1 180px;
  }

  /* Prevent hover-flex growth on touch/mobile layouts */
  .scale-row .scale-chip:hover {
    flex: 1 1 180px;
  }

}


.dm-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
  cursor: pointer;
  transition: flex .2s ease;
}

.dm-chip:hover {
  flex: 1.6;
}

.dm-chip .dh {
  font-family: var(--ff-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .02em;
}

.dm-chip .ds {
  font-family: var(--ff-mono);
  font-size: 8px;
  opacity: .5;
}

/* dark surfaces */
.dm-surfaces {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.dm-surf {
  border-radius: var(--r-md);
  padding: 20px 16px 14px;
  border: 1.5px solid rgba(255, 255, 255, .05);
  transition: transform .2s ease;
  cursor: pointer;
}

.dm-surf:hover {
  transform: scale(1.03)
}

.dm-surf .dsh {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  display: block;
  margin-bottom: 3px;
}

.dm-surf .dsn {
  font-family: var(--ff-mono);
  font-size: 9px;
  opacity: .5;
}

/* dark comparison phone row */
.dm-preview-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 44px;
  position: relative;
}

.dm-note-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dm-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dm-note-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.dm-note strong {
  font-family: var(--ff-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--dm-text-1);
  display: block;
  margin-bottom: 2px;
  letter-spacing: -.01em;
}

.dm-note span {
  font-size: 12px;
  color: var(--dm-text-2);
  line-height: 1.55;
  font-family: var(--ff-body);
}

/* ═══════════════════════════════════
   CONTRAST / ACCESSIBILITY
═══════════════════════════════════ */
.contrast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ct-card {
  background: var(--card);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 2px solid var(--ink-100);
  /*  box-shadow: var(--shadow-sm); */
  transition: transform .2s ease;
}

.ct-card:hover {
  transform: scale(1.02)
}

.ct-swatch {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-sub);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.ct-body {
  padding: 16px 18px;
}

.ct-ratio {
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 700;
  display: block;
  color: var(--ink-950);
  letter-spacing: -.02em;
  margin-bottom: 2px;
}

.ct-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
}

.pass {
  color: var(--mint-500);
}

.large {
  color: var(--caution);
}

/* ═══════════════════════════════════
   USAGE TABLE
═══════════════════════════════════ */
.use-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 2px solid var(--ink-100);
  /*box-shadow: var(--shadow-sm);*/
  font-size: 13.5px;
}

.use-table th {
  background: var(--indigo-800);
  color: var(--indigo-100);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 16px 20px;
  text-align: left;
  font-weight: 400;
}

.use-table td {
  padding: 14px 20px;
  border-bottom: 1.5px solid var(--ink-50);
  color: var(--ink-400);
  line-height: 1.6;
  vertical-align: top;
  font-family: var(--ff-sub);
}

.use-table td.td-never {
  color: var(--error);
  font-weight: 600;
}

.use-table tr:last-child td {
  border-bottom: none;
}

.use-table tr:hover td {
  background: var(--indigo-50);
}

.use-table td:first-child {
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--ink-950);
  font-size: 14px;
  letter-spacing: -.01em;
}

.ud {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}

@media (max-width: 820px) {
  .use-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .use-table th,
  .use-table td {
    white-space: normal;
  }

  .use-table th {
    padding: 12px 14px;
  }

  .use-table td {
    padding: 10px 14px;
  }
}

/* ═══════════════════════════════════
   FOOTER
═══════════════════════════════════ */
.footer {
  background: var(--ink-950);
  padding: 40px 52px;
  color: rgba(255, 255, 255, .3);
  font-size: 11.5px;
  line-height: 1.8;
  font-family: var(--ff-mono);
  letter-spacing: .03em;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.footer-brand {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}

.footer-brand .dot {
  color: var(--indigo-400);
}

.footer-v {
  margin-top: 5px;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--indigo-400);
  background: rgba(92, 66, 217, .2);
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-block;
}

.pb-xl {
  padding-bottom: 96px;
}


/* dot grid */
.hero-bg .dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to right, transparent 0%, black 30%, black 70%, transparent 100%);
}

/* ═══════════════════════════════════
   RESPONSIVE - MOBILE / TABLET
═══════════════════════════════════ */

@media (max-width: 960px) {
  .page {
    padding: 0;
  }

  .section {
    margin: 0px;
    padding: 64px 48px;
    position: relative;
    overflow: hidden;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-left {
    padding: 56px 24px 48px;
  }

  .hero-right {
    padding: 24px 24px 40px;
  }

  .hero h1 {
    font-size: clamp(40px, 7vw, 64px);
  }

  .hero-desc {
    max-width: 100%;
  }

  .sci-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .swatch-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .semantic-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .psych-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .neutral-strip {
    flex-wrap: wrap;
    height: auto;
  }

  .neutral-strip .n-chip {
    flex: 1 1 180px;
  }

  .preview-wrap {
    grid-template-columns: 1fr;
    padding: 40px 24px;
    gap: 32px;
  }

  .preview-wrap::before,
  .preview-wrap::after {
    display: none;
  }

  .dm-section {
    padding: 44px 32px;
  }

  .dm-sw-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dm-surfaces {
    grid-template-columns: repeat(2, 1fr);
  }

  .dm-preview-row {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contrast-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer {
    padding: 32px 28px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 0;
  }

  .section {
    padding: 32px 20px;
    margin-bottom: 32px;
  }

  .hero {
    min-height: auto;
  }

  .hero-left {
    padding: 48px 18px 32px;
  }

  .hero-right {
    padding: 18px 18px 32px;
  }

  .hero-swatch-row {
    padding: 12px 14px;
  }

  .sci-grid {
    grid-template-columns: 1fr;
  }

  .swatch-grid {
    grid-template-columns: 1fr;
  }

  .semantic-grid {
    grid-template-columns: 1fr;
  }

  .psych-grid {
    grid-template-columns: 1fr;
  }

  .preview-wrap {
    padding: 28px 18px;
    gap: 24px;
  }

  .phone {
    width: 200px;
  }

  .pv-note {
    gap: 12px;
  }

  .pv-title {
    font-size: 13px;
  }

  .pv-desc {
    font-size: 11px;
  }

  .dm-section {
    padding: 40px 24px;
  }

  .dm-sw-grid {
    grid-template-columns: 1fr;
  }

  .dm-surfaces {
    grid-template-columns: 1fr;
  }

  .dm-preview-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contrast-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: clamp(28px, 6vw, 36px);
  }

  .section-sub {
    max-width: 100%;
  }

  .hero-bg .circle-1 {
    width: 260px;
    height: 260px;
    top: -90px;
    right: 20px;
  }

  .hero-bg .circle-2 {
    width: 180px;
    height: 180px;
    bottom: -20px;
    left: 50%;
  }
}

.divider {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #0000;
}

.td-never {
  color: var(--error);
  font-weight: 600;

  /* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
  .back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(92, 66, 217, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--indigo-300);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .back-to-top:hover {
    background: var(--indigo-500);
    color: white;
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(92, 66, 217, 0.4);
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}