@font-face {
  font-family: 'SpotfixDemo';
  src: url('assets/fonts/SpotfixDemo-MAqqw.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* 
  Apertive Premium Digital Studio - Core Design System (Smarkia Palette)
  Strictly compliant with Stitch Design System specifications.
*/

:root {
  /* Fonts */
  --font-headline: 'Space Grotesk', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Grotesk', sans-serif;
  --font-label: 'Space Grotesk', sans-serif;

  /* Shapes */
  --border-radius-default: 0px;
  --border-radius-lg: 0px;
  --border-radius-xl: 0px;

  /* Spacing Scale */
  --grid-margin-desktop: 64px;
  --grid-margin-mobile: 20px;
  --grid-gutter: 24px;

  /* Core Raw Colors for Dark Theme (Default) */
  --theme-bg: #001718;
  --theme-heading: #ffffff;
  --theme-text-primary: #c5b6f1;
  --theme-text-secondary: #9b8fcf;
  --theme-rebel-fluor-hover: #c4f733;
  --theme-tech-green-dim: rgba(48, 197, 143, 0.15);
  --theme-tech-green-border: rgba(48, 197, 143, 0.2);
  --theme-border-color: rgba(48, 197, 143, 0.2);
  --theme-surface-lowest: #001112;
  --theme-surface-0: #001718;
  --theme-surface-1: #002021;
  --theme-surface-2: #002426;
  --theme-surface-3: #072f31;
  --theme-surface-4: #153a3c;
  --theme-overlay-bg: rgba(0, 11, 12, 0.75);
  --theme-navbar-bg: rgba(0, 32, 33, 0.9);
  --theme-cta-text: #001718;
  --theme-btn-secondary-text: #ffffff;
  --theme-handle-bg: rgba(196, 234, 236, 0.15);

  /* Mapping to existing Smarkia tokens */
  --smarkia-bg: var(--theme-bg);
  --smarkia-white: var(--theme-heading);
  --smarkia-light-violet: var(--theme-text-primary);
  --smarkia-light-violet-dim: var(--theme-text-secondary);
  --smarkia-rebel-fluor: #b2f100;
  --smarkia-rebel-fluor-hover: var(--theme-rebel-fluor-hover);
  --smarkia-tech-green: #30c58f;
  --smarkia-tech-green-dim: var(--theme-tech-green-dim);
  --smarkia-tech-green-border: var(--theme-tech-green-border);
  --smarkia-surface-0: var(--theme-surface-0);
  --smarkia-surface-1: var(--theme-surface-1);
  --smarkia-surface-2: var(--theme-surface-2);
  --smarkia-surface-3: var(--theme-surface-3);
  --smarkia-surface-4: var(--theme-surface-4);
  --smarkia-surface-lowest: var(--theme-surface-lowest);
  --smarkia-border-color: var(--theme-border-color);
  --smarkia-overlay-bg: var(--theme-overlay-bg);
  --smarkia-navbar-bg: var(--theme-navbar-bg);
  --smarkia-cta-text: var(--theme-cta-text);
  --smarkia-btn-secondary-text: var(--theme-btn-secondary-text);
  --smarkia-handle-bg: var(--theme-handle-bg);
  
  --rebel-fluor: #b2f100;

  /* Typography Variables */
  --fs-display-lg: 80px;
  --lh-display-lg: 1.1;
  --ls-display-lg: -0.03em;
  
  --fs-headline-xl: 48px;
  --lh-headline-xl: 1.2;

  --fs-headline-md: 32px;
  --lh-headline-md: 1.2;

  --fs-body-lg: 18px;
  --lh-body-lg: 1.6;

  --fs-body-md: 16px;
  --lh-body-md: 1.6;

  --fs-code-sm: 14px;
  --lh-code-sm: 1.4;
  --ls-code-sm: 0.05em;

  --fs-label-caps: 12px;
  --lh-label-caps: 1;
  --ls-label-caps: 0.1em;
}

[data-theme="light"] {
  /* Fonts */
  --font-headline: 'Space Grotesk', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Grotesk', sans-serif;
  --font-label: 'Space Grotesk', sans-serif;

  /* Shapes */
  --border-radius-default: 2px;
  --border-radius-lg: 4px;
  --border-radius-xl: 8px;

  /* Core Raw Colors for Light Theme (Clinical Precision) */
  --theme-bg: #f8fafa;
  --theme-heading: #191c1d;
  --theme-text-primary: #191c1d;
  --theme-text-secondary: #5a6b6c; /* Muted Slate */
  --theme-rebel-fluor-hover: #a1d900;
  --theme-tech-green-dim: rgba(48, 197, 143, 0.1);
  --theme-tech-green-border: #c3caad;
  --theme-border-color: #c3caad;
  --theme-surface-lowest: #ffffff;
  --theme-surface-0: #f8fafa;
  --theme-surface-1: #f2f4f4;
  --theme-surface-2: #eceeee;
  --theme-surface-3: #e6e8e9;
  --theme-surface-4: #e1e3e3;
  --theme-overlay-bg: rgba(25, 28, 29, 0.4);
  --theme-navbar-bg: rgba(255, 255, 255, 0.95);
  --theme-cta-text: #4d6a00;
  --theme-btn-secondary-text: #191c1d;
  --theme-handle-bg: rgba(90, 107, 108, 0.25);
  
  --rebel-fluor: #4b6700;

  /* Additional legacy variables mapping */
  --smarkia-white: #191c1d;
  --smarkia-light-violet: var(--theme-text-primary);
  --smarkia-light-violet-dim: var(--theme-text-secondary);
  --smarkia-rebel-fluor: #b2f100;
  --smarkia-rebel-fluor-hover: var(--theme-rebel-fluor-hover);
  --smarkia-tech-green: #4b6700;
  --smarkia-tech-green-dim: var(--theme-tech-green-dim);
  --smarkia-tech-green-border: var(--theme-tech-green-border);
  --smarkia-border-color: var(--theme-border-color);
  --smarkia-surface-0: var(--theme-surface-0);
  --smarkia-surface-1: var(--theme-surface-1);
  --smarkia-surface-2: var(--theme-surface-2);
  --smarkia-surface-3: var(--theme-surface-3);
  --smarkia-surface-4: var(--theme-surface-4);
  --smarkia-surface-lowest: var(--theme-surface-lowest);
  --smarkia-overlay-bg: var(--theme-overlay-bg);
  --smarkia-navbar-bg: var(--theme-navbar-bg);
  --smarkia-cta-text: var(--theme-cta-text);
  --smarkia-btn-secondary-text: var(--theme-btn-secondary-text);
  --smarkia-handle-bg: var(--theme-handle-bg);

  /* Typography Variables */
  --fs-display-lg: 48px;
  --lh-display-lg: 1.1;
  --ls-display-lg: -0.03em;

  --fs-headline-xl: 32px;
  --lh-headline-xl: 1.2;

  --fs-headline-md: 24px;
  --lh-headline-md: 1.3;

  --fs-body-lg: 18px;
  --lh-body-lg: 1.6;

  --fs-body-md: 16px;
  --lh-body-md: 1.5;

  --fs-code-sm: 14px;
  --lh-code-sm: 1.4;
  --ls-code-sm: -0.01em;

  --fs-label-caps: 12px;
  --lh-label-caps: 1.0;
  --ls-label-caps: 0em;
}

/* Sun/Moon Toggle Visibility by Theme */
.icon-sun {
  display: block !important;
}
.icon-moon {
  display: none !important;
}

[data-theme="light"] .icon-sun {
  display: none !important;
}
[data-theme="light"] .icon-moon {
  display: block !important;
}

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

body, h1, h2, h3, h4, h5, h6, p, a, button, li, span, input, textarea, select {
  font-family: 'Space Grotesk', sans-serif;
}

html {
  scroll-behavior: smooth;
  background-color: var(--smarkia-bg);
  color: var(--smarkia-light-violet);
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
}

body {
  background-color: var(--smarkia-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Hierarchy */
.display-lg {
  font-family: var(--font-headline);
  font-size: var(--fs-display-lg);
  font-weight: 700;
  line-height: var(--lh-display-lg);
  letter-spacing: var(--ls-display-lg);
  color: var(--smarkia-white);
}

.display-lg-mobile {
  font-family: var(--font-headline);
  font-size: var(--fs-display-lg);
  font-weight: 700;
  line-height: var(--lh-display-lg);
  letter-spacing: var(--ls-display-lg);
  color: var(--smarkia-white);
}

.headline-xl {
  font-family: var(--font-headline);
  font-size: var(--fs-headline-xl);
  font-weight: 700;
  line-height: var(--lh-headline-xl);
  color: var(--smarkia-white);
}

.headline-md {
  font-family: var(--font-headline);
  font-size: var(--fs-headline-md);
  font-weight: 700;
  line-height: var(--lh-headline-md);
  color: var(--smarkia-white);
}

.body-lg {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  font-weight: 400;
  line-height: var(--lh-body-lg);
  color: var(--smarkia-light-violet);
}

.body-md {
  font-family: var(--font-body);
  font-size: var(--fs-body-md);
  font-weight: 400;
  line-height: var(--lh-body-md);
  color: var(--smarkia-light-violet);
}

.code-sm {
  font-family: var(--font-mono);
  font-size: var(--fs-code-sm);
  font-weight: 400;
  line-height: var(--lh-code-sm);
  letter-spacing: var(--ls-code-sm);
  color: var(--smarkia-tech-green);
}

.label-caps {
  font-family: var(--font-label);
  font-size: var(--fs-label-caps);
  font-weight: 700;
  line-height: var(--lh-label-caps);
  letter-spacing: var(--ls-label-caps);
  text-transform: uppercase;
  color: var(--smarkia-rebel-fluor);
}

/* Layout System */
.studio-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--grid-margin-desktop);
  position: relative;
  width: 100%;
}

.grid-accent {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  background-image: 
    linear-gradient(to right, var(--smarkia-tech-green) 1px, transparent 1px),
    linear-gradient(to bottom, var(--smarkia-tech-green) 1px, transparent 1px);
  background-size: 40px 40px;
  transition: transform 0.1s ease-out;
}

/* Visual layout lines */
.grid-layout-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.grid-line-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: var(--smarkia-tech-green);
  opacity: 0.12;
}

.grid-line-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--smarkia-tech-green);
  opacity: 0.12;
}

/* Components - Shapes strictly 0px border-radius */
.btn-primary {
  background-color: var(--smarkia-rebel-fluor);
  color: var(--smarkia-cta-text);
  border: none;
  padding: 16px 32px;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--border-radius-lg) !important;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background-color: var(--smarkia-white);
  box-shadow: 0 0 20px rgba(178, 241, 0, 0.45);
}

.mobile-ecosystem-btn {
  display: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--smarkia-btn-secondary-text);
  border: 1px solid var(--smarkia-tech-green-border);
  padding: 16px 32px;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--border-radius-lg) !important;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  border-color: var(--smarkia-rebel-fluor);
  box-shadow: 0 0 10px rgba(48, 197, 143, 0.3);
  color: var(--smarkia-rebel-fluor);
}

/* Sticky top navigation bar */
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--grid-margin-desktop);
  background-color: var(--smarkia-navbar-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--smarkia-border-color);
  transition: all 0.3s ease;
}

.top-navbar.scrolled {
  padding: 14px var(--grid-margin-desktop);
  background-color: var(--smarkia-navbar-bg);
  border-bottom: 1px solid var(--smarkia-border-color);
}

.brand-logo {
  font-family: 'SpotfixDemo', sans-serif;
  color: var(--smarkia-rebel-fluor);
  text-decoration: none;
  letter-spacing: -0.02em;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.top-navbar .brand-logo {
  font-size: 32px;
}

footer .brand-logo {
  font-size: 28px;
}

.logo-text {
  font-family: 'SpotfixDemo', sans-serif;
}

.logo-icon {
  width: 32px;
  height: auto;
  display: block;
  object-fit: contain;
  /* Default (Dark Mode): turns black/any color to Smarkia Rebel Fluor (#b2f100) */
  filter: brightness(0) saturate(100%) invert(84%) sepia(35%) saturate(3015%) hue-rotate(27deg) brightness(103%) contrast(104%);
  transition: filter 0.3s ease;
}

[data-theme="light"] .brand-logo {
  color: var(--smarkia-white);
}

[data-theme="light"] .logo-icon {
  /* Light Mode: turns into dark violet/accent color (#191c1d / dark slate) */
  filter: brightness(0) saturate(100%) invert(8%) sepia(9%) saturate(1210%) hue-rotate(142deg) brightness(97%) contrast(94%);
}

/* Hero background accent watermark */
#hero-section {
  position: relative;
}

#hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('./assets/images/Apertive_icon.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 40vh;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
  filter: brightness(0) invert(1); /* white watermark in dark mode */
  transition: filter 0.3s ease;
}

[data-theme="light"] #hero-section::before {
  filter: brightness(0); /* black watermark in light mode */
  opacity: 0.04;
}

.top-navbar nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.top-navbar nav a {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--smarkia-light-violet);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  padding: 4px 0;
}

.top-navbar nav a:hover, .top-navbar nav a.active {
  color: var(--smarkia-white);
}

.top-navbar nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--smarkia-rebel-fluor);
  transition: width 0.3s ease;
}

.top-navbar nav a.active::after, .top-navbar nav a:hover::after {
  width: 100%;
}

/* Mobile Fixed Bottom Navigation Bar */
.bottom-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background-color: var(--smarkia-navbar-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--smarkia-border-color);
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0 !important;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

@media (min-width: 769px) {
  .bottom-navbar {
    display: none !important;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--smarkia-light-violet-dim);
  text-decoration: none;
  padding: 6px 16px;
  border-radius: var(--border-radius-xl);
  transition: all 0.2s ease;
  gap: 4px;
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  transition: stroke 0.2s ease, fill 0.2s ease;
}

.bottom-nav-item.active {
  color: var(--rebel-fluor) !important;
  background-color: rgba(178, 241, 0, 0.1) !important;
}

[data-theme="light"] .bottom-nav-item.active {
  background-color: rgba(75, 103, 0, 0.1) !important;
}

.bottom-nav-item.active svg {
  stroke: var(--rebel-fluor) !important;
}

.bottom-nav-item span {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Dynamic Interactive Cards (3D Tilt & Luminous Scanline) */
.interactive-card {
  perspective: 1000px;
  transition: transform 0.1s ease-out;
  will-change: transform;
  border-radius: var(--border-radius-xl) !important;
  border: 1px solid var(--smarkia-border-color);
  background-color: var(--smarkia-surface-1);
  overflow: hidden;
  height: 100%;
}

.interactive-card:hover {
  border-color: var(--smarkia-rebel-fluor);
}

.interactive-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s ease;
  transform-style: preserve-3d;
}

.interactive-card:hover .interactive-card-inner {
  transform: rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) scale3d(1.02, 1.02, 1.02);
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.8), 0 0 20px rgba(178, 241, 0, 0.1);
}

.luminous-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(178, 241, 0, 0.15) 0%,
    transparent 50%
  );
  transition: opacity 0.3s ease;
}

.interactive-card:hover .luminous-overlay {
  opacity: 1;
}

.scanline-effect {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(178, 241, 0, 0.03) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.25;
}

/* Bento Card Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gutter);
}

.bento-card {
  border: 1px solid var(--smarkia-tech-green-border);
  background-color: var(--smarkia-surface-1);
  padding: 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--border-radius-xl) !important;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.bento-card:hover {
  border-color: var(--smarkia-rebel-fluor);
  box-shadow: 0 0 15px rgba(178, 241, 0, 0.15);
}

/* Infinite Marquee */
.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  background-color: var(--smarkia-surface-2);
  border-top: 1px solid var(--smarkia-border-color);
  border-bottom: 1px solid var(--smarkia-border-color);
  padding: 48px 0;
}

.marquee-content {
  display: flex;
  width: max-content;
  animation: marquee-scroll 35s linear infinite;
  will-change: transform;
}

.marquee-card {
  width: 420px;
  padding: 0 24px;
  border-left: 2px solid var(--smarkia-rebel-fluor);
  flex-shrink: 0;
}

.marquee-card p {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--smarkia-white);
  font-style: italic;
  margin-bottom: 16px;
}

.marquee-card span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--smarkia-light-violet-dim);
  text-transform: uppercase;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Router Views */
.view {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 10;
  position: relative;
}

.view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Form Controls with sharp corners */
.form-input {
  width: 100%;
  background-color: var(--smarkia-surface-1);
  border: 1px solid var(--smarkia-tech-green-border);
  color: var(--smarkia-white);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  border-radius: var(--border-radius-lg) !important;
  outline: none;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: var(--smarkia-surface-4);
}

.form-input:focus {
  border-color: var(--smarkia-rebel-fluor);
  box-shadow: 0 0 10px rgba(178, 241, 0, 0.25);
}

/* Currency switcher toggle styling */
.currency-toggle {
  display: inline-flex;
  background-color: var(--smarkia-surface-1);
  border: 1px solid var(--smarkia-tech-green-border);
  padding: 4px;
  border-radius: var(--border-radius-lg);
}

.currency-toggle button {
  border-radius: var(--border-radius-lg);
  background: transparent;
  border: none;
  color: var(--smarkia-light-violet-dim);
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.currency-toggle button.active {
  background-color: var(--smarkia-rebel-fluor);
  color: var(--smarkia-surface-0);
}

/* Glitch animation text effect */
.glitch-title {
  position: relative;
  text-shadow: 2px 0 var(--smarkia-rebel-fluor), -2px 0 var(--smarkia-light-violet);
  animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { transform: translate(0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(-1px, -1px); }
  60% { transform: translate(1px, 1px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0); }
}

/* connection path pulse animation */
.node-line-pulse {
  stroke: var(--smarkia-tech-green);
  stroke-dasharray: 6;
  animation: svg-dash-flow 25s linear infinite;
}

@keyframes svg-dash-flow {
  to { stroke-dashoffset: -1000; }
}

/* Bottom Sheet Modals (Mobile View Sheets & Desktop Overlay Drawer) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--smarkia-overlay-bg);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.bottom-sheet {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 80vh;
  max-height: 720px;
  background-color: var(--smarkia-surface-2);
  border-top: 1px solid var(--smarkia-border-color);
  border-radius: 24px 24px 0 0;
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -15px 40px rgba(0,0,0,0.6);
}

.bottom-sheet.open {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 48px;
  height: 4px;
  background-color: var(--smarkia-handle-bg);
  border-radius: 2px;
  margin: 12px auto;
  cursor: grab;
  flex-shrink: 0;
}

.bottom-sheet-handle:active {
  cursor: grabbing;
}

.bottom-sheet-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 60px;
}

/* Desktop Slide-out Drawer */
@media (min-width: 768px) {
  .bottom-sheet {
    left: auto;
    right: 0;
    bottom: 0;
    width: 480px;
    height: 100vh;
    max-height: none;
    border-top: none;
    border-left: 1px solid var(--smarkia-border-color);
    border-radius: 0px !important;
    transform: translateX(100%);
    box-shadow: -15px 0 40px rgba(0,0,0,0.6);
  }
  
  .bottom-sheet.open {
    transform: translateX(0);
  }
  
  .bottom-sheet-handle {
    display: none;
  }
  
  .bottom-sheet-content {
    padding-top: 40px;
  }
}

/* Desktop Navigation and layout responsive rules */
@media (max-width: 768px) {
  /* Dynamic typography variables for mobile */
  :root {
    --fs-display-lg: 48px;
    --lh-display-lg: 1.1;
    --ls-display-lg: -0.03em;

    --fs-headline-xl: 32px;
    --lh-headline-xl: 1.2;

    --fs-headline-md: 24px;
    --lh-headline-md: 1.2;

    --fs-body-lg: 16px;
    --lh-body-lg: 1.6;

    --fs-body-md: 14px;
    --lh-body-md: 1.6;
    
    --border-radius-xl: 12px;
  }

  [data-theme="light"] {
    --fs-display-lg: 32px;
    --lh-display-lg: 1.1;
    --ls-display-lg: -0.03em;

    --fs-headline-xl: 24px;
    --lh-headline-xl: 1.2;

    --fs-headline-md: 20px;
    --lh-headline-md: 1.3;

    --fs-body-lg: 16px;
    --lh-body-lg: 1.6;

    --fs-body-md: 14px;
    --lh-body-md: 1.5;
  }

  body {
    padding-bottom: 100px !important;
  }

  .studio-container {
    padding: 0 var(--grid-margin-mobile);
  }
  
  .top-navbar {
    padding: 16px var(--grid-margin-mobile);
  }
  
  .top-navbar.scrolled {
    padding: 12px var(--grid-margin-mobile);
  }
  
  /* Hide desktop menu links on mobile (theme toggle is kept visible) */
  .top-navbar nav {
    display: none !important;
  }
  
  /* Hide the top header INNOVENT CLOUD button on mobile */
  .top-navbar #btn-cloud-top {
    display: none !important;
  }

  .mobile-ecosystem-btn {
    display: block !important;
    text-align: center;
    width: 100%;
    padding: 16px;
    background-color: var(--rebel-fluor);
    color: #000000;
    font-family: var(--font-headline);
    font-weight: bold;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 30px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mobile-ecosystem-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
  
  .bottom-navbar {
    display: flex !important;
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0 !important;
  }
  
  .bottom-sheet {
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0 !important;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  main {
    padding-top: 88px !important;
    padding-bottom: 100px !important;
  }

  /* Force all desktop grids to stack vertically on mobile */
  .bento-grid, 
  [style*="display: grid"],
  [style*="display:grid"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* Reset grid spans for work grid children */
  #work-grid > div {
    grid-column: span 1 !important;
    min-height: auto !important;
  }

  /* Adjust footer padding on mobile viewports */
  footer {
    padding: 48px var(--grid-margin-mobile) 100px !important;
  }
}

/* Custom list items inside modal details */
.bullet-tech-spec {
  list-style: none;
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--smarkia-light-violet);
}

.bullet-tech-spec::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--smarkia-tech-green);
}
