/* ================================
   CSS Custom Properties
   ================================ */
:root {
  /* Colors - Light Mode */
  --color-bg: #fafafa;
  --color-bg-elevated: #ffffff;
  --color-surface: #f5f5f5;
  --color-border: #e5e5e5;
  --color-border-subtle: #ebebeb;

  --color-text: #171717;
  --color-text-secondary: #525252;
  --color-text-tertiary: #737373;
  --color-text-inverse: #fafafa;

  --color-primary: #171717;
  --color-primary-hover: #262626;

  /* Product Accent Colors */
  --accent-ascend: #6366f1;
  --accent-ascend-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --accent-artstart: #ec4899;
  --accent-artstart-gradient: linear-gradient(135deg, #ec4899, #f472b6);
  --accent-copydesk: #14b8a6;
  --accent-copydesk-gradient: linear-gradient(135deg, #14b8a6, #2dd4bf);
  --accent-fileroom: #f59e0b;
  --accent-fileroom-gradient: linear-gradient(135deg, #f59e0b, #fbbf24);
  --accent-codedesk: #3b82f6;
  --accent-codedesk-gradient: linear-gradient(135deg, #3b82f6, #60a5fa);

  /* Neon Pink */
  --color-neon-pink: #ff2d92;

  /* Grid System */
  --grid-bg: #dbe3f0;
  --grid-major: 48px;
  --grid-line-color: rgba(0, 81, 255, 0.20);
  --grid-line-color-soft: rgba(0, 81, 255, 0.10);  /* 50% opacity of major */
  --grid-wash-color: rgba(79, 209, 197, 0.12);
  --grid-wash-stop: 55%;

  /* Typography - Easy to swap font families */
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading-weight: 600;
  --font-heading-weight-bold: 700;

  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body-weight: 400;
  --font-body-weight-medium: 500;
  --font-body-weight-semibold: 600;

  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Motion */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;

  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --header-height: 4rem;
  --max-width: 72rem;
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Dark Mode */
[data-theme="dark"] {
  --color-bg: #0a0a0a;
  --color-bg-elevated: #171717;
  --color-surface: #1a1a1a;
  --color-border: #262626;
  --color-border-subtle: #1f1f1f;

  --color-text: #fafafa;
  --color-text-secondary: #a3a3a3;
  --color-text-tertiary: #737373;
  --color-text-inverse: #171717;

  --color-primary: #fafafa;
  --color-primary-hover: #e5e5e5;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);

  /* Dark mode grid */
  --grid-bg: #0a0a0a;
  --grid-line-color: rgba(99, 102, 241, 0.18);
  --grid-line-color-soft: rgba(99, 102, 241, 0.09);  /* 50% opacity of major */
  --grid-wash-color: rgba(79, 209, 197, 0.08);
}

/* ================================
   Reduced Motion
   ================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================
   Reset & Base
   ================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

/* ================================
   Background Layers
   ================================ */
.bg-gradient,
.bg-grid,
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.bg-gradient {
  background: radial-gradient(
    ellipse 80% 50% at 50% -20%,
    rgba(99, 102, 241, 0.15),
    transparent 50%
  );
}

[data-theme="dark"] .bg-gradient {
  background: radial-gradient(
    ellipse 80% 50% at 50% -20%,
    rgba(99, 102, 241, 0.1),
    transparent 50%
  );
}

/* Major grid: solid lines */
.bg-grid {
  background-color: var(--grid-bg);
  background-image:
    linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px),
    radial-gradient(circle at top, var(--grid-wash-color), transparent var(--grid-wash-stop));
  background-size:
    var(--grid-major) var(--grid-major),
    var(--grid-major) var(--grid-major),
    100% 100%;
  background-attachment: fixed;
}

/* Minor grid: dashed lines, same size, offset 50%, half opacity */
.bg-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Solid lines first */
  background-image:
    linear-gradient(to right, var(--grid-line-color-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-color-soft) 1px, transparent 1px);
  background-size: var(--grid-major) var(--grid-major);
  background-position: calc(var(--grid-major) / 2) calc(var(--grid-major) / 2);
  background-attachment: fixed;
  /* Mask to create dash pattern: 4px dash, 4px gap */
  -webkit-mask-image:
    repeating-linear-gradient(to right, black 0, black 4px, transparent 4px, transparent 8px),
    repeating-linear-gradient(to bottom, black 0, black 4px, transparent 4px, transparent 8px);
  -webkit-mask-composite: source-over;
  mask-image:
    repeating-linear-gradient(to right, black 0, black 4px, transparent 4px, transparent 8px),
    repeating-linear-gradient(to bottom, black 0, black 4px, transparent 4px, transparent 8px);
  mask-composite: add;
}

.bg-noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
}

/* Animated gradient blob system */
.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  will-change: transform;
}

/* Original cool tones */
.blob-1 {
  width: 40rem;
  height: 40rem;
  background: var(--accent-ascend);
  top: -10rem;
  right: -10rem;
}

.blob-2 {
  width: 30rem;
  height: 30rem;
  background: var(--accent-artstart);
  bottom: 20%;
  left: -10rem;
}

.blob-3 {
  width: 25rem;
  height: 25rem;
  background: var(--accent-codedesk);
  bottom: -5rem;
  right: 20%;
}

/* Added warm tones */
.blob-4 {
  width: 28rem;
  height: 28rem;
  background: #fbbf24;
  top: 40%;
  right: -8rem;
}

.blob-5 {
  width: 22rem;
  height: 22rem;
  background: #f97316;
  bottom: 10%;
  left: 25%;
}

.blob-6 {
  width: 26rem;
  height: 26rem;
  background: #10b981;
  top: 60%;
  left: 50%;
}

/* ================================
   Header
   ================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

[data-theme="dark"] .site-header {
  background: rgba(10, 10, 10, 0.8);
}

.site-name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  letter-spacing: -0.025em;
  display: flex;
  align-items: baseline;
}

.site-name-jacob {
  font-weight: 400;
}

.site-name-henderson {
  font-weight: 700;
}

.site-name-studio {
  font-weight: 500;
  color: var(--color-neon-pink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--border-radius);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover {
  background-color: var(--color-surface);
}

.icon-sun,
.icon-moon {
  transition: opacity var(--duration-fast) var(--ease-out);
}

.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--border-radius);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.hamburger:hover {
  background-color: var(--color-surface);
}

.hamburger-line {
  display: block;
  width: 1.25rem;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 1px;
  transition: all var(--duration-normal) var(--ease-out);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ================================
   Main Content
   ================================ */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--header-height) + var(--space-12)) var(--space-6) var(--space-16);
}

/* Intro */
.intro {
  text-align: center;
  margin-bottom: var(--space-12);
}

.intro-title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--font-heading-weight-bold);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

.intro-body {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 40rem;
  margin: 0 auto;
}

/* ================================
   Accordion - Sitemap Style
   ================================ */
.accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;

  /* Sitemap layout variables - change these to adjust the whole system */
  --sitemap-padding: 40px;          /* Left padding for trunk space */
  --sitemap-trunk-pos: 18px;        /* Trunk line position from accordion left */
  --sitemap-indent: 10%;            /* Child drawer indent (of accordion width) */
  --sitemap-node-size: 12px;        /* Diameter of junction nodes */
  --sitemap-line-color: rgba(99, 102, 241, 0.4);

  /* Derived values - the +1px nudge for visual centering on the 2px trunk line */
  --sitemap-trunk-offset: calc(var(--sitemap-trunk-pos) - var(--sitemap-padding) + 1px);
  /* Convert indent % from accordion-relative to drawer-relative: indent / (1 - indent) */
  --sitemap-indent-drawer: calc(var(--sitemap-indent) * 1.11); /* ~11% when indent is 10% */

  padding-left: var(--sitemap-padding);
}

[data-theme="dark"] .accordion {
  --sitemap-line-color: rgba(129, 140, 248, 0.5);
}

/* Vertical trunk line */
.accordion::before {
  content: '';
  position: absolute;
  left: var(--sitemap-trunk-pos);
  top: 36px;
  bottom: -6px;
  width: 2px;
  background: var(--sitemap-line-color);
  pointer-events: none;
  z-index: 1;
}

/* Heart at the end of the trunk line */
.accordion::after {
  content: '♥';
  position: absolute;
  left: calc(var(--sitemap-trunk-pos) + 1px);
  bottom: -24px;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: bold;
  color: var(--color-bg);
  -webkit-text-stroke: 2px var(--sitemap-line-color);
  pointer-events: none;
  z-index: 2;
  transition: all var(--duration-fast) var(--ease-out);
}

/* Heart fills with accent when any drawer is open */
.accordion:has(.drawer-header[aria-expanded="true"])::after {
  color: var(--accent-artstart);
  -webkit-text-stroke: 2px var(--accent-artstart);
}

/* Child drawers - indented with connecting lines */
.drawer:not(:first-child) {
  margin-left: var(--sitemap-indent);
}

/* Horizontal branch line - connects from trunk to drawer */
.drawer:not(:first-child)::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  width: calc(var(--sitemap-indent-drawer) + var(--sitemap-padding) - var(--sitemap-trunk-pos));
  height: 2px;
  background: var(--sitemap-line-color);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}

/* Node circle at trunk junction */
.drawer::after {
  content: '';
  position: absolute;
  left: var(--sitemap-trunk-offset);
  top: 50%;
  width: var(--sitemap-node-size);
  height: var(--sitemap-node-size);
  background: var(--color-bg);
  border: 2px solid var(--sitemap-line-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  transition: all var(--duration-fast) var(--ease-out);
}

/* Position node for child drawers - center on trunk */
.drawer:not(:first-child)::after {
  left: calc(var(--sitemap-trunk-offset) - var(--sitemap-indent-drawer));
}

/* Accent the node on hover */
.drawer:hover::after {
  border-color: var(--accent, var(--sitemap-line-color));
  background: var(--accent, var(--sitemap-line-color));
  transform: translate(-50%, -50%) scale(1.2);
}

/* Active/expanded drawer node */
.drawer:has(.drawer-header[aria-expanded="true"])::after {
  border-color: var(--accent);
  background: var(--accent);
}

/* Drawer */
.drawer {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  position: relative;
}

.drawer:has(.drawer-header:focus-visible) .drawer-header {
  border-color: var(--accent, var(--color-primary));
  box-shadow: 0 0 0 2px var(--accent, var(--color-primary));
}

/* Drawer-specific accents */
.drawer[data-product="ascend"] { --accent: var(--accent-ascend); --accent-gradient: var(--accent-ascend-gradient); }
.drawer[data-product="artstart"] { --accent: var(--accent-artstart); --accent-gradient: var(--accent-artstart-gradient); }
.drawer[data-product="copydesk"] { --accent: var(--accent-copydesk); --accent-gradient: var(--accent-copydesk-gradient); }
.drawer[data-product="fileroom"] { --accent: var(--accent-fileroom); --accent-gradient: var(--accent-fileroom-gradient); }
.drawer[data-product="codedesk"] { --accent: var(--accent-codedesk); --accent-gradient: var(--accent-codedesk-gradient); }

/* ================================
   Drawer Header - Refractive Glass Pill
   - translucent, light-refractive base
   - soft rim glow + hard specular edge catch
   - narrow middle highlight with fast falloff
   - inner dark glows to compress form
   ================================ */
.drawer-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  text-align: left;
  position: relative;
  overflow: hidden;
  border-radius: 9999px;
  border: none;
  margin: 6px 0;
  cursor: pointer;

  /* Lighter, more translucent base */
  background: rgba(40, 45, 55, 0.28);

  /* Enhanced refraction: more blur, saturation boost */
  -webkit-backdrop-filter: blur(12px) saturate(180%) contrast(110%) brightness(105%);
  backdrop-filter: blur(12px) saturate(180%) contrast(110%) brightness(105%);

  /* Inner dark glows compress the form, reduce puffiness */
  box-shadow:
    /* Outer shadow for depth */
    0 10px 32px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.25),
    /* Top highlight bevel */
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    /* Bottom dark edge */
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    /* Directional inner shadow - light from top-left, shadow bottom-right */
    inset -1.5px -2px 1px rgba(0, 0, 0, 0.28),
    /* Inner dark glows - compress the form */
    inset 0 -6px 32px rgba(0, 0, 0, 0.15),
    inset 0 6px 28px rgba(0, 0, 0, 0.10),
    inset 3px 0 24px rgba(0, 0, 0, 0.08),
    inset -3px 0 24px rgba(0, 0, 0, 0.08);

  transition: box-shadow var(--duration-fast) var(--ease-out);
}

/* 1) SOFT RIM GLOW + HARD SPECULAR EDGE CATCH */
.drawer-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  background:
    /* Hard specular edge catch - top right */
    radial-gradient(18px 9px at 94% 16%,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0.8) 50%,
      rgba(255, 255, 255, 0) 100%
    ),
    /* Hard edge catch - bottom left */
    radial-gradient(16px 8px at 6% 84%,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0) 100%
    ),
    /* Soft continuous rim glow */
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.28) 0%,
      rgba(255, 255, 255, 0.12) 30%,
      rgba(255, 255, 255, 0.04) 50%,
      rgba(0, 0, 0, 0.15) 100%
    );

  /* Confine to thin rim stroke */
  padding: 1px;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;

  mix-blend-mode: screen;
  opacity: 1;
}

/* Glass wash - disabled */
.drawer-header .glass-wash {
  display: none;
}

.drawer-header:hover {
  box-shadow:
    0 12px 38px rgba(0, 0, 0, 0.45),
    0 5px 14px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    inset -1.5px -2px 1px rgba(0, 0, 0, 0.30),
    inset 0 -6px 34px rgba(0, 0, 0, 0.17),
    inset 0 6px 30px rgba(0, 0, 0, 0.12),
    inset 3px 0 26px rgba(0, 0, 0, 0.10),
    inset -3px 0 26px rgba(0, 0, 0, 0.10);
}

.drawer-header:active {
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    inset -1.5px -2px 1px rgba(0, 0, 0, 0.32),
    inset 0 -8px 38px rgba(0, 0, 0, 0.20),
    inset 0 8px 34px rgba(0, 0, 0, 0.14),
    inset 4px 0 28px rgba(0, 0, 0, 0.12),
    inset -4px 0 28px rgba(0, 0, 0, 0.12);
}

/* Dark mode - more translucent, enhanced refraction */
[data-theme="dark"] .drawer-header {
  background: rgba(30, 35, 45, 0.35);
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    inset -1.5px -2px 1px rgba(0, 0, 0, 0.35),
    inset 0 -6px 32px rgba(0, 0, 0, 0.18),
    inset 0 6px 28px rgba(0, 0, 0, 0.12),
    inset 3px 0 24px rgba(0, 0, 0, 0.10),
    inset -3px 0 24px rgba(0, 0, 0, 0.10);
}

[data-theme="dark"] .drawer-header::before {
  opacity: 0.85;
}


/* Content sits above the light layers */
.drawer-header .drawer-title {
  color: var(--color-text);
  position: relative;
  z-index: 2;
}

.drawer-header .drawer-descriptor {
  color: var(--color-text-tertiary);
  position: relative;
  z-index: 2;
}

.drawer-header .drawer-icon {
  position: relative;
  z-index: 2;
}

.drawer-header .drawer-icon::before,
.drawer-header .drawer-icon::after {
  background-color: var(--color-text-secondary);
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--font-heading-weight);
  letter-spacing: -0.025em;
  flex-shrink: 0;
}

.drawer-descriptor {
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  flex: 1;
}

.drawer-icon {
  width: 1.5rem;
  height: 1.5rem;
  position: relative;
  flex-shrink: 0;
}

.drawer-icon::before,
.drawer-icon::after {
  content: '';
  position: absolute;
  background-color: var(--color-text-secondary);
  border-radius: 1px;
  transition: transform var(--duration-normal) var(--ease-out);
}

.drawer-icon::before {
  width: 100%;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.drawer-icon::after {
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.drawer-header[aria-expanded="true"] .drawer-icon::after {
  transform: translateX(-50%) rotate(90deg);
}

/* Drawer Panel */
.drawer-panel {
  overflow: hidden;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  margin-top: var(--space-2);
}

.drawer-panel:not([hidden]) {
  animation: slideDown var(--duration-slow) var(--ease-out);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.drawer-panel > * {
  padding: 0 var(--space-6) var(--space-6);
}

/* Stage */
.stage {
  margin-bottom: var(--space-6);
}

.stage-frame {
  aspect-ratio: 16 / 9;
  background: var(--accent-gradient, var(--color-surface));
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
}

.slot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot[hidden] {
  display: none;
}

.showcase-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.showcase-icon {
  font-size: var(--text-4xl);
}

.showcase-label {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-heading-weight);
  letter-spacing: -0.025em;
}

/* Blurb */
.blurb {
  max-width: 40rem;
}

.blurb--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  max-width: 64rem;
}

.blurb--two-col .blurb-col--list {
  display: flex;
  align-items: flex-start;
  padding-top: var(--space-8);
}

.blurb--two-col .blurb-list {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .blurb--two-col {
    grid-template-columns: 1fr;
  }

  .blurb--two-col .blurb-col--list {
    padding-top: 0;
  }
}

.kicker {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent, var(--color-text-tertiary));
  margin-bottom: var(--space-2);
}

.blurb-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--font-heading-weight-bold);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

.blurb-body {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.blurb-list {
  margin-bottom: var(--space-4);
}

.blurb-list li {
  position: relative;
  padding-left: var(--space-5);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.blurb-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.625rem;
  width: 6px;
  height: 6px;
  background: var(--accent, var(--color-text-tertiary));
  border-radius: 50%;
}

.blurb-note {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  font-style: italic;
}

.blurb-action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: var(--accent-gradient, var(--color-primary));
  color: white;
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.blurb-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ================================
   Footer
   ================================ */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
  border-top: 1px solid rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .site-footer {
  border-top-color: rgba(129, 140, 248, 0.6);
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-4);
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-link:hover {
  color: var(--color-text);
}

/* .footer-link--cta now matches other footer links */

.footer-copy {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

/* ================================
   Modal
   ================================ */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  padding: var(--space-6);
  background: var(--color-bg);
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-out),
              visibility var(--duration-normal) var(--ease-out);
}

.modal[open] {
  opacity: 1;
  visibility: visible;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  color: var(--color-text-secondary);
  border-radius: var(--border-radius);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.modal-close:hover {
  background-color: var(--color-surface);
}

.modal-content {
  padding-top: var(--space-12);
  max-width: 32rem;
  margin: 0 auto;
}

.modal-section {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border);
}

.modal-section:last-child {
  border-bottom: none;
}

.modal-section-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--font-heading-weight);
  margin-bottom: var(--space-2);
}

.modal-section-body {
  color: var(--color-text-secondary);
}

.modal-placeholder {
  font-style: italic;
  color: var(--color-text-tertiary);
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.modal-links a {
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.modal-links a:hover {
  color: var(--color-text);
}

/* ================================
   Focus States
   ================================ */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent, var(--color-primary));
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  border-radius: var(--border-radius);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
  :root {
    --header-height: 3.5rem;
  }

  .intro-title {
    font-size: var(--text-3xl);
  }

  .intro-body {
    font-size: var(--text-base);
  }

  /* Sitemap adjustments for mobile - just override the variables */
  .accordion {
    --sitemap-padding: 28px;
    --sitemap-trunk-pos: 12px;
    --sitemap-node-size: 10px;
    --sitemap-trunk-offset: calc(var(--sitemap-trunk-pos) - var(--sitemap-padding) + 1px);
  }

  .accordion::before {
    top: 28px;
    bottom: -10px;
  }

  .accordion::after {
    bottom: -28px;
    font-size: 16px;
  }

  .drawer-header {
    flex-wrap: wrap;
  }

  .drawer-descriptor {
    flex-basis: 100%;
    order: 3;
    margin-top: var(--space-1);
  }

  .drawer-icon {
    margin-left: auto;
  }

  .blurb-title {
    font-size: var(--text-xl);
  }

  .footer-nav {
    flex-direction: column;
    gap: var(--space-3);
  }
}

@media (min-width: 769px) {
  .drawer-panel > * {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    padding: var(--space-6);
  }

  .stage {
    margin-bottom: 0;
  }
}
