/* ================= FONTS ================= */

@font-face {
  font-family: 'Collapse';
  src: url('assets/fonts/Collapse_Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Collapse';
  src: url('assets/fonts/Collapse_Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Courier Prime';
  src: url('assets/fonts/CourierPrime_Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Courier Prime';
  src: url('assets/fonts/CourierPrime_Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Courier Prime';
  src: url('assets/fonts/CourierPrime_Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Courier Prime';
  src: url('assets/fonts/CourierPrime_BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Rules Compressed';
  src: url('assets/fonts/RulesCompressed_Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Rules Compressed';
  src: url('assets/fonts/RulesCompressed_Medium.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Rules Expanded';
  src: url('assets/fonts/RulesExpanded_Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Rules Expanded';
  src: url('assets/fonts/RulesExpanded_Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mondwest';
  src: url('assets/fonts/Mondwest_Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sigurd';
  src: url('assets/fonts/Sigurd_Variable.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Courbe Sans';
  src: local('Courbe Sans'), local('CourbeSans'), local('Courbe-Sans');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ================= THEME DEFINITION & RESET ================= */

:root {
  --background: #000000;
  --background-base: #000000;
  --background-alpha: 1;
  --midground: #FAF9F6;
  --midground-base: #FAF9F6;
  --midground-alpha: 1;
  --foreground: #FAF9F6;
  --foreground-base: #FAF9F6;
  --foreground-alpha: 1;
  
  --font-sans: 'Courbe Sans', sans-serif;
  --font-mono: 'Courbe Sans', monospace;
  --font-rules-compressed: 'Courbe Sans', sans-serif;
  --font-rules-expanded: 'Courbe Sans', sans-serif;
  --font-mondwest: 'Courbe Sans', sans-serif;
  --font-sigurd: 'Courbe Sans', serif;
  
  --spacing: 0.25rem;
  --vsq: calc(0.5vw + 0.5vh);
}

* {
  box-sizing: border-box;
  border: 0 solid;
  margin: 0;
  padding: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: clamp(10px, var(--vsq) * 5, 14px);
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  text-transform: uppercase;
}

body::selection {
  background: var(--midground);
  color: var(--background);
}

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

button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background-color: transparent;
  border-radius: 0;
  border: none;
  cursor: pointer;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--midground);
  color: var(--background);
  padding: 2px 4px;
  border-radius: 2px;
}

/* ================= FONTS & TYPOGRAPHY UTILITIES ================= */

.font-sans {
  font-family: var(--font-sans);
}

.font-mono {
  font-family: var(--font-mono);
}

.font-compressed {
  font-family: var(--font-rules-compressed);
}

.font-expanded {
  font-family: var(--font-rules-expanded);
}

.font-mondwest {
  font-family: var(--font-mondwest);
}

.font-sigurd {
  font-family: var(--font-sigurd);
}

.text-midground {
  color: var(--midground);
}

.text-text-secondary {
  color: color-mix(in srgb, var(--midground) 80%, transparent);
}

.text-text-tertiary {
  color: color-mix(in srgb, var(--midground) 65%, transparent);
}

.bg-white {
  background-color: var(--foreground);
}

.bg-midground {
  background-color: var(--midground);
}

.bg-midground\/60 {
  background-color: color-mix(in srgb, var(--midground) 60%, transparent);
}

.bg-midground\/30 {
  background-color: color-mix(in srgb, var(--midground) 30%, transparent);
}

.border-current\/10 {
  border-color: color-mix(in srgb, currentColor 10%, transparent);
}

.border-current\/20 {
  border-color: color-mix(in srgb, currentColor 20%, transparent);
}

.border-midground\/15 {
  border-color: color-mix(in srgb, var(--midground) 15%, transparent);
}

/* ================= GRID ENGINE (.g & .gc) ================= */

.g {
  display: grid;
  border-left: 1px solid color-mix(in oklab, currentColor 20%, transparent);
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.g .gc {
  border-right: 1px solid color-mix(in oklab, currentColor 20%, transparent);
  min-width: 0;
  padding: calc(var(--spacing) * 4);
  position: relative;
}

/* Grid borders */
.g:first-child,
.g + .g,
.g > .g {
  border-top: 1px solid color-mix(in oklab, currentColor 20%, transparent);
}

.g:last-child {
  border-bottom: 1px solid color-mix(in oklab, currentColor 20%, transparent);
}

/* Mobile & Tablet layout modifications */
.g:has(>.gc:nth-child(3)):not(:has(>.gc:nth-child(4))) > .gc:nth-child(2) {
  order: -1;
}

@media (min-width: 40rem) {
  .g:has(>.gc:nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .g:has(>.gc:nth-child(3)):not(:has(>.gc:nth-child(4))) > .gc:nth-child(2) {
    order: -1;
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .g:has(>.gc:nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .g:has(>.gc:nth-child(4)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .g:has(>.gc:nth-child(5)) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  
  /* Custom 3-column layout: 1fr 2fr 1fr */
  .g:has(>.gc:nth-child(3)):not(:has(>.gc:nth-child(4))) {
    grid-template-columns: 1fr 2fr 1fr;
  }
  
  .g:has(>.gc:nth-child(3)):not(:has(>.gc:nth-child(4))) > .gc:nth-child(2) {
    order: 0;
    grid-column: auto;
  }
}

/* ================= GLOBAL UTILITIES ================= */

.pointer-events-none { pointer-events: none; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { inset: 0; }
.inset-1 { inset: 0.25rem; }
.z-1 { z-index: 1; }
.z-2 { z-index: 2; }
.col-span-full { grid-column: 1 / -1; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

.h-full { height: 100%; }
.h-px { height: 1px; }
.h-9 { height: 2.25rem; }
.size-2 { width: 0.5rem; height: 0.5rem; }
.size-3 { width: 0.75rem; height: 0.75rem; }
.size-4 { width: 1rem; height: 1rem; }
.size-5 { width: 1.25rem; height: 1.25rem; }
.w-full { width: 100%; }
.max-w-\[520px\] { max-w: 520px; }
.max-w-\[1600px\] { max-w: 1600px; }

.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-1.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-0.5 { margin-left: 0.125rem; }
.-mb-\[0\.15em\] { margin-bottom: -0.15em; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.normal-case { text-transform: none; }
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.border-t { border-top: 1px solid color-mix(in oklab, currentColor 20%, transparent); }
.border-b { border-bottom: 1px solid color-mix(in oklab, currentColor 20%, transparent); }
.border { border: 1px solid color-mix(in oklab, currentColor 20%, transparent); }
.border-4 { border-width: 4px; }
.border-double { border-style: double; }
.border-none { border-style: none; }
.border-l-0\! { border-left-width: 0px !important; }
.border-b-0\! { border-bottom-width: 0px !important; }
.p-0\! { padding: 0px !important; }

.rounded-full { border-radius: 9999px; }
.bg-transparent { background-color: transparent; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.transition-opacity { transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1); }
.hover\:opacity-100:hover { opacity: 1; }
.duration-300 { transition-duration: 300ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

@media (min-width: 64rem) {
  .lg\:grid { display: grid; }
  .lg\:block { display: block; }
  .lg\:hidden { display: none; }
}

@media (min-width: 48rem) {
  .md\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
  .md\:block { display: block; }
  .md\:col-span-1 { grid-column: span 1 / span 1; }
}

/* Hero Title Styling */
.hero-title {
  font-size: clamp(3rem, 10vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.setup-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* Tab Buttons */
.tab-btn {
  color: color-mix(in srgb, var(--midground) 65%, transparent);
}
.tab-btn:hover {
  color: var(--midground);
}
.tab-btn.active {
  color: var(--midground);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--midground);
}

/* Copy Buttons */
.copy-btn {
  transition: color 0.15s ease;
}
.copy-btn:hover {
  color: var(--midground);
}

/* Hover highlights for cards & links */
.group:hover .bg-midground {
  opacity: 0.05;
}

.absolute.inset-1.bg-midground {
  transition: opacity 250ms ease;
}
.group:hover .absolute.inset-1.bg-midground {
  opacity: 0.05 !important;
}

/* ================= PIXEL & BLINK ANIMATIONS ================= */

/* Conic repeating dither pattern cursor */
.dither {
  background: repeating-conic-gradient(currentColor 0% 25%, #0000 0% 50%) 0 0/2px 2px;
}

.blink-cursor {
  background: repeating-conic-gradient(currentColor 0% 25%, #0000 0% 50%) 0 0/2px 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.blink {
  animation: 1s step-end infinite blink;
}

.group:hover .blink-cursor {
  display: inline-block !important;
  animation: 1s step-end infinite blink;
}

/* ================= ENTEXTUAL DECORATIONS ================= */

.text-display {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tracking-\[0\.1875rem\] { letter-spacing: 0.1875rem; }
.tracking-\[0\.0525rem\] { letter-spacing: 0.0525rem; }
.tracking-\[0\.1em\] { letter-spacing: 0.1em; }
.tracking-widest { letter-spacing: 0.15em; }

.break-all { word-break: break-all; }
.whitespace-pre-wrap { white-space: pre-wrap; }

/* Micro Fade-In Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes subtleBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

.animate-subtle-bounce {
  animation: subtleBounce 2s infinite ease-in-out;
}

/* Features grid child adjustments */
.feature-card p {
  font-family: var(--font-mono);
}

/* ================= MULTI-GRID RESPONSIVE DETAILS ================= */

.features-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.features-grid > * {
  border-bottom: 1px solid color-mix(in oklab, currentColor 20%, transparent);
  padding: 1rem;
}

@media (min-width: 40rem) {
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .features-grid > * {
    border-right: none;
  }
  .features-grid > *:nth-child(odd) {
    border-right: 1px solid color-mix(in oklab, currentColor 20%, transparent);
  }
}

@media (min-width: 64rem) {
  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .features-grid > * {
    border-right: 1px solid color-mix(in oklab, currentColor 20%, transparent);
  }
  .features-grid > *:nth-child(3n) {
    border-right: none;
  }
}

[data-demo-root="true"] {
  background-color: transparent !important;
  color: var(--midground) !important;
  border-color: var(--midground) !important;
}

[data-demo-root="true"] .bg-midground {
  background-color: var(--midground) !important;
}

[data-demo-root="true"] .bg-midground\/60 {
  background-color: color-mix(in srgb, var(--midground) 60%, transparent) !important;
}

[data-demo-root="true"] .bg-midground\/30 {
  background-color: color-mix(in srgb, var(--midground) 30%, transparent) !important;
}

[data-demo-root="true"] .text-text-tertiary {
  color: var(--midground) !important;
  opacity: 0.7;
}

[data-demo-root="true"] .text-midground {
  color: var(--midground) !important;
}

#terminal-body {
  color: var(--midground) !important;
  opacity: 0.95;
}

#terminal-body span {
  opacity: 1 !important;
}

.bg-background\/40 {
  background-color: color-mix(in srgb, var(--midground) 12%, var(--background));
}

#bg-canvas {
  opacity: 0.08;
  pointer-events: none;
}

.opacity-0 {
  opacity: 0 !important;
}

#features .col-span-full {
  grid-column: 1 / -1 !important;
}

/* Clickable Action Box styling */
.action-box {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 4px double var(--midground);
  cursor: pointer;
  height: 420px;
  background-color: #000000 !important;
  z-index: 102;
}

.action-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.action-box:not(.has-video):hover img {
  filter: blur(6px) brightness(0.4);
  transform: scale(1.02);
}

.action-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  padding: 1.5rem;
  pointer-events: none;
}

.action-box:not(.has-video):hover .action-overlay {
  opacity: 1;
}

.action-overlay .title {
  font-family: var(--font-rules-expanded);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--foreground);
  text-transform: uppercase;
}

.action-overlay .subtitle {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  color: var(--foreground);
  opacity: 0.9;
}

/* ================= HOVER VIDEOS STYLING ================= */

.action-box.has-video .action-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.action-box.has-video .action-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
  z-index: 1;
}

/* Active playing states */
.action-box.has-video.video-playing .action-img {
  opacity: 0;
}

.action-box.has-video.video-playing .action-video {
  opacity: 1;
}

/* After video reaches 0.5s, start applying overlay & blur slowly while playing */
.action-box.has-video.video-transitioning .action-video,
.action-box.has-video.video-ended .action-video {
  filter: blur(6px) brightness(0.4);
  transform: scale(1.02);
  transition: filter 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.action-box.has-video .action-overlay {
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.action-box.has-video.video-transitioning .action-overlay,
.action-box.has-video.video-ended .action-overlay {
  opacity: 1;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Header Hover GIFs */
.header-hover-gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, filter 0.3s ease;
  z-index: 1;
  mix-blend-mode: plus-lighter;
  filter: blur(2px) brightness(0.55);
}

.gc:hover .header-hover-gif {
  opacity: 1;
}

/* Header Cell Adjustments */
header .gc {
  padding-top: 4.2rem !important;
  padding-bottom: 4.2rem !important;
}

/* Center all header cells content */
header .gc {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

header .gc small {
  font-size: 0.9375rem !important;
  letter-spacing: 0.1875rem !important;
}

.logo-rotate-3d {
  position: relative;
  perspective: 1000px;
  transform-style: preserve-3d;
  animation: rotate3dLoop 8s linear infinite;
  backface-visibility: visible;
}

.logo-3d-layer {
  transform-style: preserve-3d;
  backface-visibility: visible;
}

.logo-3d-layer:not(:first-child) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes rotate3dLoop {
  0% {
    transform: rotateX(8deg) rotateY(0deg);
  }
  100% {
    transform: rotateX(8deg) rotateY(360deg);
  }
}

/* ================= PRODUCT DETAIL MODAL STYLES ================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(25px) saturate(160%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2rem;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(250, 249, 246, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 1000px;
  height: 90vh;
  max-height: 90vh;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

/* Modal Body Scroll Container */
.modal-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--midground) transparent;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--midground);
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
  line-height: 1;
}

.modal-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.modal-header-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .modal-header-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* Left panel: Media */
.modal-media {
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid color-mix(in srgb, var(--midground) 15%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  height: 320px;
}

@media (min-width: 48rem) {
  .modal-media {
    border-bottom: none;
    border-right: 1px solid color-mix(in srgb, var(--midground) 15%, transparent);
    height: 100%;
    min-height: 450px;
  }
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Prevents screenshot truncation */
  padding: 2.5rem; /* Breathing room for screenshots */
}

/* Right panel: Info */
.modal-info {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-info h2 {
  font-size: 2.2rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
  color: var(--midground);
}

.modal-info .subtitle {
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--midground) 70%, transparent);
  margin-top: 0.5rem;
  letter-spacing: 0.1em;
}

.modal-info .description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--midground) 80%, transparent);
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  text-transform: none;
  letter-spacing: normal;
}

/* Pricing and CTAs */
.modal-pricing-box {
  border-top: 1px solid color-mix(in srgb, var(--midground) 15%, transparent);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.subscription-benefit {
  font-size: 0.95rem;
  color: var(--midground);
  letter-spacing: 0.05em;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

@media (min-width: 30rem) {
  .cta-buttons {
    flex-direction: row;
  }
}

.cta-buttons .btn {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
  text-align: center;
}

.cta-buttons .btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--midground);
  color: var(--background);
  border: 1px solid var(--midground);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--midground);
}

.btn-secondary {
  background-color: transparent;
  color: var(--midground);
  border: 1px solid color-mix(in srgb, var(--midground) 40%, transparent);
}

.btn-secondary:hover {
  background-color: color-mix(in srgb, var(--midground) 10%, transparent);
  border-color: var(--midground);
}

/* ================= MODAL EXTENDED CONTENT ================= */

.modal-extended-content {
  background-color: transparent;
}

.modal-section {
  border-top: 1px solid color-mix(in srgb, var(--midground) 15%, transparent);
  padding: 3.5rem 2.5rem;
}

.modal-section h3 {
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  color: var(--midground);
  margin-bottom: 1.2rem;
}

.modal-section .usage-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--midground) 85%, transparent);
  white-space: pre-line;
  text-transform: none;
  letter-spacing: normal;
}

.video-embed-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid color-mix(in srgb, var(--midground) 20%, transparent);
  background-color: #050505;
  position: relative;
  overflow: hidden;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  color: var(--midground);
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.video-placeholder:hover {
  background-color: color-mix(in srgb, var(--midground) 5%, transparent);
}

/* ================= AUTH MODAL STYLES ================= */

.auth-modal-overlay {
  z-index: 300;
}

.auth-modal-container {
  max-width: 480px;
  height: auto;
  max-height: 92vh;
  overflow-y: auto;
}

.auth-modal-body {
  padding: 3rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Auth Logo */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.auth-logo-3xit {
  font-size: 2.2rem;
  letter-spacing: 0.15rem;
  font-weight: 700;
  color: var(--midground);
}

.auth-logo-audio {
  font-size: 0.9rem;
  letter-spacing: 0.3rem;
  opacity: 0.6;
  color: var(--midground);
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid color-mix(in srgb, var(--midground) 20%, transparent);
  gap: 0;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  background: transparent;
  border: none;
  color: color-mix(in srgb, var(--midground) 50%, transparent);
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
}

.auth-tab:hover {
  color: var(--midground);
}

.auth-tab.active {
  color: var(--midground);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--midground);
}

/* Auth Form */
.auth-form {
  flex-direction: column;
  gap: 1.1rem;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-label {
  font-size: 0.8rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--midground) 70%, transparent);
}

.auth-input {
  background: rgba(250, 249, 246, 0.04);
  border: 1px solid color-mix(in srgb, var(--midground) 25%, transparent);
  color: var(--midground);
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.05rem;
  text-transform: none !important;
  transition: border-color 0.2s ease, background 0.2s ease;
  outline: none;
  width: 100%;
  /* Force Courier Prime — Mondwest & Rules are all-caps display fonts */
  font-family: 'Courier Prime', 'Courier New', Courier, monospace !important;
  border-radius: 4px;
}

/* Global fix: all inputs/textareas must never be uppercase */
input, textarea, select {
  text-transform: none !important;
  font-family: 'Courier Prime', 'Courier New', Courier, monospace !important;
}

.auth-input::placeholder {
  color: color-mix(in srgb, var(--midground) 30%, transparent);
}

.auth-input:focus {
  border-color: color-mix(in srgb, var(--midground) 60%, transparent);
  background: rgba(250, 249, 246, 0.07);
}

/* Auth Error */
.auth-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  letter-spacing: 0.05rem;
  text-transform: none;
  font-family: var(--font-mono);
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.25);
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.2rem;
  margin-top: 0.3rem;
  border-radius: 4px;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: color-mix(in srgb, var(--midground) 35%, transparent);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-transform: none;
  letter-spacing: 0.05rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--midground) 20%, transparent);
}

/* Google Button */
.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(250, 249, 246, 0.04);
  border: 1px solid color-mix(in srgb, var(--midground) 25%, transparent);
  color: var(--midground);
  font-size: 0.9rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  border-radius: 4px;
}

.auth-google-btn:hover {
  background: rgba(250, 249, 246, 0.08);
  border-color: color-mix(in srgb, var(--midground) 45%, transparent);
}

/* Switch link */
.auth-switch-text {
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.03rem;
  text-transform: none;
  color: color-mix(in srgb, var(--midground) 55%, transparent);
}

.auth-switch-link {
  background: none;
  border: none;
  color: var(--midground);
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  font-family: inherit;
  letter-spacing: inherit;
  padding: 0;
}

/* ================= ACCOUNT PAGE STYLES ================= */

#account-section {
  min-height: 100vh;
  position: relative;
  z-index: 102;
}

.account-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* Topbar */
.account-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid color-mix(in oklab, currentColor 20%, transparent);
  margin-bottom: 0;
}

.account-back-btn {
  font-family: var(--font-mondwest);
  font-size: 0.85rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--midground) 70%, transparent);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.account-back-btn:hover {
  color: var(--midground);
}

.account-logout-btn {
  font-family: var(--font-mondwest);
  font-size: 0.8rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--midground) 50%, transparent);
  background: none;
  border: 1px solid color-mix(in srgb, var(--midground) 20%, transparent);
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.account-logout-btn:hover {
  color: var(--midground);
  border-color: color-mix(in srgb, var(--midground) 50%, transparent);
}

/* Welcome Banner */
.account-welcome {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid color-mix(in oklab, currentColor 15%, transparent);
}

.account-welcome-label {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.3rem;
  opacity: 0.5;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.account-welcome-name {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.0;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--midground);
  mix-blend-mode: plus-lighter;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.account-email {
  font-size: 0.9rem;
  letter-spacing: 0.05rem;
  text-transform: none;
  opacity: 0.45;
  margin-top: 0.5rem;
}

/* Account Grid */
.account-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-left: 1px solid color-mix(in oklab, currentColor 20%, transparent);
  margin-top: 0;
}

@media (min-width: 64rem) {
  .account-grid {
    grid-template-columns: 380px 1fr;
  }
}

/* Account Card */
.account-card {
  border-right: 1px solid color-mix(in oklab, currentColor 20%, transparent);
  border-bottom: 1px solid color-mix(in oklab, currentColor 20%, transparent);
}

.account-card-wide {
  border-right: 1px solid color-mix(in oklab, currentColor 20%, transparent);
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid color-mix(in oklab, currentColor 20%, transparent);
}

.account-card-title {
  font-size: 1.1rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  font-weight: 700;
}

.account-card-body {
  padding: 2rem;
}

/* Plan Badge */
.plan-badge {
  font-family: var(--font-mondwest);
  font-size: 0.7rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
}

.plan-free {
  background: rgba(250, 249, 246, 0.08);
  color: color-mix(in srgb, var(--midground) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--midground) 20%, transparent);
}

.plan-pro {
  background: rgba(250, 249, 246, 0.15);
  color: var(--midground);
  border: 1px solid color-mix(in srgb, var(--midground) 50%, transparent);
}

.account-plan-label {
  font-size: 1.3rem;
  letter-spacing: 0.15rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.account-plan-desc {
  font-size: 0.9rem;
  letter-spacing: 0.02rem;
  text-transform: none;
  opacity: 0.55;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.account-plan-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.account-action-btn {
  padding: 0.85rem 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.15rem;
  width: 100%;
  text-align: center;
  border-radius: 3px;
}

.btn-danger {
  background: transparent;
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.35);
}

.btn-danger:hover {
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.6);
}

/* Pricing Tiers */
.pricing-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in oklab, currentColor 15%, transparent);
}

.pricing-tier {
  padding: 1.2rem;
  border: 1px solid color-mix(in srgb, var(--midground) 15%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(250, 249, 246, 0.02);
}

.pricing-tier.active-tier {
  border-color: color-mix(in srgb, var(--midground) 30%, transparent);
}

.tier-name {
  font-size: 0.75rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  opacity: 0.6;
}

.tier-price {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--midground);
  line-height: 1.1;
}

.tier-period {
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.6;
}

.tier-features {
  list-style: none;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tier-features li {
  font-size: 0.78rem;
  letter-spacing: 0.02rem;
  text-transform: none;
  opacity: 0.6;
  padding-left: 0.9rem;
  position: relative;
}

.tier-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  opacity: 0.4;
}

/* VST Grid */
.vst-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 64rem) {
  .vst-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.vst-card {
  border: 1px solid color-mix(in srgb, var(--midground) 18%, transparent);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.vst-card.unlocked {
  border-color: color-mix(in srgb, var(--midground) 30%, transparent);
}

.vst-card.locked {
  opacity: 0.45;
}

.vst-card:hover {
  background: rgba(250, 249, 246, 0.03);
}

.vst-card-inner {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.vst-card-name {
  font-family: var(--font-mondwest);
  font-size: 0.78rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--midground);
}

.vst-card-desc {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02rem;
  text-transform: none;
  opacity: 0.45;
  margin-bottom: 0.5rem;
}

.vst-download-btn {
  font-family: var(--font-mondwest);
  font-size: 0.72rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  padding: 0.45rem 0.8rem;
  background: rgba(250, 249, 246, 0.08);
  border: 1px solid color-mix(in srgb, var(--midground) 25%, transparent);
  color: var(--midground);
  cursor: pointer;
  transition: background 0.2s ease;
  align-self: flex-start;
}

.vst-download-btn:hover {
  background: rgba(250, 249, 246, 0.15);
}

.vst-locked-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: none;
  letter-spacing: 0.03rem;
  opacity: 0.45;
}

/* Misc */
.size-16 { width: 4rem; height: 4rem; }
.mb-2 { margin-bottom: 0.5rem; }
.border-midground\/20 { border-color: color-mix(in srgb, var(--midground) 20%, transparent); }
.bg-midground\/\[0\.01\] { background-color: color-mix(in srgb, var(--midground) 1%, transparent); }
.max-w-\\[1000px\\] { max-width: 1000px; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.mt-8 { margin-top: 2rem; }
.overflow-hidden { overflow: hidden; }
.object-cover { object-fit: cover; }
.object-center { object-position: center; }
.bg-image-layer {
  filter: blur(10px);
  transform: scale(1.05);
}
.tracking-\\[0\\.25em\\] { letter-spacing: 0.25em; }
.tracking-\\[0\\.15em\\] { letter-spacing: 0.15em; }
.tracking-normal { letter-spacing: normal; }
.leading-relaxed { line-height: 1.625; }
