/* -------------------------------------------------------------
   CODEX HUB PREMIUM DESIGN SYSTEM & VARIABLES
   ------------------------------------------------------------- */
:root {
  /* Harmonious Cobalt Blue & Clean Slate Palette */
  --primary: hsl(221, 83%, 53%);
  --primary-hover: hsl(221, 83%, 45%);
  --primary-glow: rgba(37, 99, 235, 0.12);
  --secondary: hsl(215, 20%, 96%);
  --secondary-hover: hsl(215, 20%, 90%);
  --text-main: hsl(222, 47%, 11%);
  --text-muted: hsl(215, 16%, 47%);
  --bg-main: #ffffff;
  --bg-secondary: hsl(210, 100%, 98%);
  --border: hsl(214, 32%, 91%);
  
  /* Glassmorphism Token Sets */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-glow: 0 8px 32px 0 rgba(15, 23, 42, 0.04);
  
  /* Typography Variables */
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Modern Premium Shadows */
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 12px 36px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 32px 64px rgba(15, 23, 42, 0.1);
  
  /* Transition Curves */
  --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout Metrics */
  --max-width: 1240px;
}

/* -------------------------------------------------------------
   RESETS & UNIVERSAL STYLES
   ------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  position: relative;
  z-index: 2;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Premium Typography Rules */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s var(--ease-smooth);
}

/* Custom Interactive Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 0.5s ease;
  opacity: 0;
}

body:hover .cursor-glow {
  opacity: 1;
}

/* Custom Premium Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 5px;
  border: 2px solid var(--bg-secondary);
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* -------------------------------------------------------------
   BUTTON UTILITIES
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s var(--ease-premium);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background-color: var(--bg-secondary);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.btn-link:hover {
  color: var(--primary-hover);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 20%, #4f46e5 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* -------------------------------------------------------------
   FIXED NAVIGATION HEADER
   ------------------------------------------------------------- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  z-index: 100;
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: all 0.4s var(--ease-premium);
}

/* Shrunk Class applied via JS and CSS Fallback if needed */
.main-header.shrunk {
  height: 70px;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

/* Native CSS scroll-driven shrinking header */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .main-header {
    animation: header-shrink auto linear both;
    animation-timeline: scroll(block root);
    animation-range: 0px 150px;
  }
}

@keyframes header-shrink {
  to {
    height: 72px;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
  }
}

.header-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}
.logo span {
  color: var(--primary);
  font-weight: 600;
}
.logo .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
  margin-left: 2px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

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

.nav-link {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}
.nav-link:hover {
  color: var(--primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s var(--ease-premium);
}
.nav-link:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Toggle Hamburger button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
}
.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  transition: transform 0.3s var(--ease-premium), opacity 0.3s ease;
}

/* Hamburger active animation */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile overlay drawer */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-main);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease-premium);
}
.mobile-overlay.active {
  transform: translateY(0);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
}
.mobile-link {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-main);
}
.mobile-link:hover {
  color: var(--primary);
}

/* Padding offset on Main body for fixed header */
body {
  padding-top: 100px;
}

/* -------------------------------------------------------------
   SECTION GENERAL HEADERS
   ------------------------------------------------------------- */
section {
  padding: 100px 0;
}

.section-header {
  max-width: 600px;
  margin-bottom: 60px;
}

.section-tag {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-block;
  margin-bottom: 12px;
}

.section-title {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.5;
}

/* -------------------------------------------------------------
   HERO SECTION
   ------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: calc(100vh - 100px);
  padding: 80px 0 140px 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-mesh {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(79, 70, 229, 0.02) 50%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  mask-image: radial-gradient(circle at top right, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at top right, black 30%, transparent 80%);
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-badge-wrapper {
  margin-bottom: 20px;
}
.hero-badge {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background-color: var(--primary-glow);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 64px;
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-arrow {
  margin-left: 8px;
  transition: transform 0.3s var(--ease-premium);
}
.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Interface previews (Visual Mockups in Hero) */
.hero-preview-wrapper {
  position: relative;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-card {
  position: absolute;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
}

.preview-card:hover {
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.15);
}

/* Card 1 Position & Styles */
.preview-card:nth-child(1) {
  width: 380px;
  top: 40px;
  left: 20px;
  z-index: 2;
}

/* Card 2 Position & Styles */
.preview-card:nth-child(2) {
  width: 320px;
  bottom: 40px;
  right: 20px;
  z-index: 3;
}

/* Mockup Content Styling */
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.card-header .dots {
  display: flex;
  gap: 6px;
}
.card-header .dots span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.card-header .title {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.metric-box .label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.metric-box .value {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
}
.metric-box .value.green {
  color: #10b981;
}

.chart-mock {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 80px;
  padding-top: 10px;
}
.chart-mock .bar {
  flex: 1;
  background-color: var(--secondary);
  border-radius: 4px 4px 0 0;
  transition: height 1s var(--ease-premium), background-color 0.3s ease;
}
.chart-mock .bar.active {
  background-color: var(--primary);
}

.ring-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.progress-ring {
  transform: rotate(-90deg);
}
.ring-bar {
  transition: stroke-dashoffset 1s var(--ease-premium);
}
.fitness-card .stats-text .value {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
}
.fitness-card .stats-text .value .unit {
  font-size: 12px;
  color: var(--text-muted);
}
.fitness-card .stats-text .label {
  font-size: 11px;
  color: var(--text-muted);
}

.pill-list {
  display: flex;
  gap: 8px;
}
.pill {
  font-size: 11px;
  font-weight: 600;
  background-color: var(--secondary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}
.pill.active {
  background-color: var(--primary-glow);
  color: var(--primary);
}

/* Native CSS scroll-driven parallax for hero cards */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .hero-preview-wrapper {
    view-timeline: --hero-view;
  }
  
  .preview-card:nth-child(1) {
    animation: parallax-c1 linear both;
    animation-timeline: --hero-view;
    animation-range: exit -20% exit 100%;
  }
  .preview-card:nth-child(2) {
    animation: parallax-c2 linear both;
    animation-timeline: --hero-view;
    animation-range: exit -20% exit 100%;
  }
}

@keyframes parallax-c1 {
  to { transform: translateY(-70px); }
}
@keyframes parallax-c2 {
  to { transform: translateY(-130px); }
}

/* -------------------------------------------------------------
   STATS SECTION
   ------------------------------------------------------------- */
.stats-section {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 60px 0;
}

.stats-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.stat-card {
  text-align: center;
  flex: 1;
}

.stat-number {
  font-size: 56px;
  font-weight: 800;
  color: var(--primary);
  display: inline-block;
  line-height: 1;
}
.stat-suffix {
  font-family: var(--font-title);
  font-size: 40px;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -------------------------------------------------------------
   SERVICES SECTION
   ------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px;
  transition: all 0.4s var(--ease-premium);
  cursor: pointer;
  outline: none;
}

.service-card:hover, .service-card:focus-visible {
  border-color: var(--primary);
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  transition: transform 0.4s var(--ease-elastic);
}
.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.service-description {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-list li {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-list li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 800;
}

/* Native CSS Scroll entry reveal effect */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .service-card {
    animation: card-reveal auto linear both;
    animation-timeline: view();
    animation-range: entry 5% entry 40%;
  }
}
@keyframes card-reveal {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------
   PORTFOLIO GALLERY GRID
   ------------------------------------------------------------- */
.portfolio-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.filter-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s var(--ease-premium);
}
.filter-btn:hover {
  background-color: var(--border);
  color: var(--text-main);
}
.filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.portfolio-item {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.4s var(--ease-premium);
}

.portfolio-item:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.project-image-wrapper {
  position: relative;
  height: 240px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-gradient {
  position: absolute;
  inset: 0;
  opacity: 0.85;
  transition: transform 0.5s var(--ease-premium);
}
.portfolio-item:hover .project-gradient {
  transform: scale(1.05);
}

.project-brand-mark {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.5s var(--ease-premium);
}

.portfolio-item:hover .project-brand-mark {
  transform: scale(1.04);
}

.project-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-brand-placeholder {
  inset: 22px;
  transform: none;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 24px;
  text-align: center;
}

.portfolio-item:hover .project-brand-placeholder {
  transform: scale(1.03);
}

.project-brand-placeholder span {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.08;
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(15, 23, 42, 0.26);
  max-width: 260px;
}

.project-info {
  padding: 28px;
}

.project-info .project-tag {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}

.project-info .project-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.project-info .project-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.project-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
}

.project-store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--text-main);
  color: #ffffff;
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
}

.website-link {
  margin-bottom: 4px;
}

.redirect-icon {
  font-size: 13px;
  line-height: 1;
  transition: transform 0.2s var(--ease-smooth);
}

.store-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 15px;
  line-height: 1;
  flex: 0 0 auto;
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

.store-link:hover {
  background-color: var(--primary);
  transform: translateY(-1px);
}

.website-link:hover .redirect-icon {
  transform: translate(2px, -2px);
}

.store-link.disabled {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: default;
}

.store-link.disabled:hover {
  transform: none;
}

/* Native CSS Scroll entry reveal effect */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .portfolio-item {
    animation: port-reveal auto linear both;
    animation-timeline: view();
    animation-range: entry 5% entry 40%;
  }
}
@keyframes port-reveal {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------
   SLIDING CASE STUDY DRAWER
   ------------------------------------------------------------- */
.case-study-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.4s, opacity 0.4s ease;
}

.case-study-drawer.active {
  visibility: visible;
  opacity: 1;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 680px;
  background-color: var(--bg-main);
  box-shadow: -20px 0 60px rgba(15, 23, 42, 0.15);
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-premium);
  display: flex;
  flex-direction: column;
}

.case-study-drawer.active .drawer-content {
  transform: translateX(0);
}

.drawer-close-btn {
  position: absolute;
  top: 110px; /* Under the header bounds (header is 100px) */
  left: 48px;  /* Positioned on the left */
  right: auto;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s var(--ease-premium);
  z-index: 10;
}
.drawer-close-btn .arrow {
  transition: transform 0.3s var(--ease-premium);
  display: inline-block;
}
.drawer-close-btn:hover {
  background-color: var(--border);
  color: var(--primary);
  transform: translateX(-4px);
}
.drawer-close-btn:hover .arrow {
  transform: translateX(-2px);
}

.drawer-inner {
  padding: 180px 48px 60px 48px; /* Increased top padding to clear the back button */
  overflow-y: auto;
  flex: 1;
}

/* Case Study Content layout */
.case-header {
  margin-bottom: 32px;
  padding-top: 10px;
}
.case-header .tag {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.1em;
  display: inline-block;
  margin-bottom: 8px;
}
.case-header h2 {
  font-size: 32px;
  font-weight: 800;
}

.case-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 36px;
}
.case-stat-box .label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.case-stat-box .val {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.case-body h3 {
  font-size: 20px;
  margin: 28px 0 12px 0;
}
.case-body p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 18px;
}
.case-body ul {
  padding-left: 20px;
  margin-bottom: 18px;
}
.case-body ul li {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* -------------------------------------------------------------
   THE CODEX STANDARD TIMELINE PROCESS
   ------------------------------------------------------------- */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 40px auto 0 auto;
}

.timeline-line {
  position: absolute;
  top: 0;
  left: 28px;
  bottom: 0;
  width: 4px;
  background-color: var(--secondary);
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--primary);
  transition: height 0.1s linear;
}

/* Scroll progress linkage */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .timeline-container {
    view-timeline: --timeline-view;
  }
  .timeline-progress {
    animation: timeline-fill linear both;
    animation-timeline: --timeline-view;
    animation-range: entry 10% exit 90%;
  }
}

@keyframes timeline-fill {
  from { height: 0; }
  to { height: 100%; }
}

.timeline-node {
  position: relative;
  padding-left: 80px;
  padding-bottom: 60px;
}

.timeline-node:last-child {
  padding-bottom: 0;
}

.node-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 4px solid var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  z-index: 2;
  transition: all 0.4s var(--ease-premium);
}

/* Active node state */
.timeline-node.active .node-marker {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.node-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all 0.3s ease;
}
.timeline-node.active .node-content {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.node-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.node-description {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* -------------------------------------------------------------
   INTERACTIVE COST CALCULATOR
   ------------------------------------------------------------- */
.calculator-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: flex-start;
}

.calculator-controls {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.control-group {
  margin-bottom: 32px;
}
.control-group:last-child {
  margin-bottom: 0;
}

.control-label {
  display: block;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}

.platform-chips, .scale-chips {
  display: flex;
  gap: 12px;
}

.chip-btn {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}
.chip-btn:hover {
  background-color: var(--border);
}
.chip-btn.active {
  background-color: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slider-value {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.range-slider {
  width: 100%;
  height: 6px;
  background-color: var(--secondary);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-top: 14px;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  transition: transform 0.1s ease;
}
.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.checkbox-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.checkbox-label:hover input ~ .custom-checkbox {
  border-color: var(--primary);
}
.checkbox-label input:checked ~ .custom-checkbox {
  background-color: var(--primary);
  border-color: var(--primary);
}
.checkbox-label input:checked ~ .custom-checkbox::after {
  content: '✓';
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

/* Results Sidebar panel */
.calculator-results {
  position: sticky;
  top: 120px;
}

.results-card {
  background-color: var(--text-main);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.results-title {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 24px;
}

.price-display {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}
.price-display .currency {
  font-family: var(--font-title);
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
}
.price-display .price-value {
  font-family: var(--font-title);
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
}

.duration-display {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 24px;
  margin-bottom: 28px;
}
.duration-display span {
  color: #ffffff;
}

/* dynamic budget breakdown chart */
.chart-breakdown {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 120px;
  padding: 0 10px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
}
.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.chart-fill {
  width: 24px;
  background-color: var(--primary);
  border-radius: 4px 4px 0 0;
  min-height: 5px;
  transition: height 0.6s var(--ease-premium);
}
.chart-col:nth-child(2) .chart-fill { background-color: #38bdf8; }
.chart-col:nth-child(3) .chart-fill { background-color: #818cf8; }

.chart-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
}

.chart-info-text {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 28px;
}

/* -------------------------------------------------------------
   TESTIMONIALS SLIDER SECTION
   ------------------------------------------------------------- */
.testimonial-carousel-container {
  overflow: hidden;
  position: relative;
  margin-top: 40px;
}

.testimonial-carousel {
  display: flex;
  gap: 30px;
  cursor: grab;
  transition: transform 0.5s var(--ease-premium);
}
.testimonial-carousel:active {
  cursor: grabbing;
}

.testimonial-card {
  flex: 0 0 calc(50% - 15px);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-card .stars {
  color: #f59e0b;
  font-size: 16px;
  margin-bottom: 20px;
}

.testimonial-card .quote {
  font-size: 16px;
  color: var(--text-main);
  font-style: italic;
  margin-bottom: 28px;
  line-height: 1.6;
}

.founder-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-mock {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
}
.avatar-mock.blue { background-color: var(--primary); }
.avatar-mock.green { background-color: #16a34a; }
.avatar-mock.purple { background-color: #7c3aed; }

.founder-info .name {
  font-size: 15px;
  font-weight: 700;
}
.founder-info .role {
  font-size: 12px;
  color: var(--text-muted);
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
}

.nav-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.nav-arrow:hover {
  background-color: var(--border);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}
.car-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}
.car-dot.active {
  width: 24px;
  background-color: var(--primary);
  border-radius: 4px;
}

/* -------------------------------------------------------------
   FAQ ACCORDIONS
   ------------------------------------------------------------- */
.faq-container {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
}

.faq-list {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.3s ease;
  outline: none;
}
.faq-item:hover, .faq-item:focus-within {
  border-color: var(--primary);
}

.faq-question {
  width: 100%;
  padding: 24px 28px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question .faq-icon {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-muted);
  transition: transform 0.3s var(--ease-premium);
}
.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  color: var(--primary);
}

.faq-answer {
  padding: 0 28px 24px 28px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* -------------------------------------------------------------
   CONTACT FORM / QUESTIONNAIRE
   ------------------------------------------------------------- */
.contact-container {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
}

.contact-header {
  grid-column: 1;
}

.contact-form-wrapper {
  grid-column: 2;
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  position: relative;
  overflow: hidden;
}

/* Progress indicator on form */
.form-progress-indicator {
  margin-bottom: 40px;
}
.progress-bar-bg {
  width: 100%;
  height: 4px;
  background-color: var(--secondary);
  border-radius: 2px;
  margin-bottom: 20px;
}
.progress-bar-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 2px;
  transition: width 0.4s var(--ease-smooth);
}

.progress-steps-numbers {
  display: flex;
  justify-content: space-between;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--secondary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s ease;
}
.step-num.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 12px var(--primary-glow);
}

.form-step {
  display: none;
}
.form-step.active {
  display: block;
  animation: slide-step 0.4s var(--ease-premium) forwards;
}

@keyframes slide-step {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.input-group {
  margin-bottom: 24px;
}
.input-label {
  display: block;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.input-label .required {
  color: #ef4444;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  background-color: var(--bg-secondary);
  transition: all 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Valid status styles */
.form-input:user-valid, .form-select:user-valid, .form-textarea:user-valid {
  border-color: #10b981;
}

.error-msg {
  display: none;
  color: #ef4444;
  font-size: 12px;
  margin-top: 6px;
}
.input-group.invalid .error-msg {
  display: block;
}
.input-group.invalid .form-input, .input-group.invalid .form-select, .input-group.invalid .form-textarea {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Success panel screen styling */
.form-success-screen {
  text-align: center;
  padding: 40px 0;
  animation: success-pop 0.5s var(--ease-elastic) forwards;
}

@keyframes success-pop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.success-icon-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #d1fae5;
  color: #10b981;
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.success-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}
.success-message {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 32px auto;
}

/* -------------------------------------------------------------
   FOOTER SECTION
   ------------------------------------------------------------- */
.footer-section {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 80px 0 40px 0;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand .logo {
  margin-bottom: 20px;
  display: inline-block;
}
.footer-tagline {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
  max-width: 320px;
}

/* Green Pulse Status operational badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #d1fae5;
  color: #065f46;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  animation: glow-pulse 1.8s infinite;
}
@keyframes glow-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-col .col-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
}
.footer-col a:hover {
  color: var(--primary);
}
.footer-col span {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copy-text {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-bottom-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer-bottom-actions a {
  font-size: 13px;
  color: var(--text-muted);
}
.footer-bottom-actions a:hover {
  color: var(--primary);
}

.back-to-top {
  background: none;
  border: none;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: transform 0.3s ease;
}
.back-to-top:hover {
  transform: translateY(-2px);
}

/* -------------------------------------------------------------
   RESPONSIVE DESIGN VIEWPORTS (MOBILE FRIENDLY AF)
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 52px;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .calculator-grid {
    grid-template-columns: 1fr;
  }
  .calculator-results {
    position: static;
  }
  .faq-container, .contact-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .faq-container .section-header {
    margin-bottom: 16px;
  }
  .faq-list, .contact-form-wrapper {
    grid-column: 1;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 80px;
  }
  
  section {
    padding: 60px 0;
  }
  
  .section-title {
    font-size: 30px;
  }
  
  .section-subtitle {
    font-size: 16px;
  }

  .main-header {
    height: 80px;
  }
  
  .nav-menu, .header-actions .btn-outline {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
  }
  
  .hero-title {
    font-size: 42px;
  }
  
  .hero-subtitle {
    font-size: 18px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .hero-preview-wrapper {
    height: 360px;
    margin-top: 20px;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .preview-card:nth-child(1) {
    width: 260px;
    top: 20px;
    left: 0;
  }
  
  .preview-card:nth-child(2) {
    width: 220px;
    bottom: 20px;
    right: 0;
  }
  
  .stats-container {
    flex-direction: column;
    gap: 32px;
  }
  
  .services-grid, .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  /* Horizontal scrolling filter buttons for smooth mobile swiping */
  .portfolio-filters {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 8px;
    margin-bottom: 28px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .portfolio-filters::-webkit-scrollbar {
    display: none;
  }
  
  .portfolio-item {
    margin-bottom: 12px;
  }

  .project-brand-placeholder {
    inset: 18px;
    padding: 18px;
  }

  .project-brand-placeholder span {
    font-size: 22px;
  }

  .timeline-line {
    left: 20px;
  }
  
  .timeline-node {
    padding-left: 56px;
    padding-bottom: 40px;
  }
  
  .node-marker {
    width: 44px;
    height: 44px;
    font-size: 14px;
  }
  
  .node-content {
    padding: 24px;
  }
  
  /* iOS inputs layout auto-zoom fix: inputs must be 16px on mobile viewports */
  .form-input, .form-select, .form-textarea {
    font-size: 16px;
  }
  
  .contact-form-wrapper {
    padding: 32px 20px;
  }
  
  .case-study-drawer .drawer-content {
    width: 100%;
    max-width: 100%;
  }
  
  .case-study-drawer .drawer-close-btn {
    top: 90px; /* Sitting under the 80px mobile header */
    left: 24px;
    padding: 8px 16px;
    font-size: 13px;
  }

  .case-study-drawer .drawer-inner {
    padding: 150px 24px 60px 24px; /* Increased top padding to clear back button on mobile */
  }
  
  .case-stats-row {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .testimonial-card {
    flex: 0 0 100%;
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 34px;
  }
  
  .hero-preview-wrapper {
    height: 320px;
  }
  
  .preview-card:nth-child(1) {
    width: 220px;
    top: 10px;
  }
  
  .preview-card:nth-child(2) {
    width: 180px;
    bottom: 10px;
  }
  
  .platform-chips, .scale-chips {
    flex-direction: column;
    gap: 8px;
  }
  
  .checkbox-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .calculator-controls {
    padding: 24px 16px;
  }
  
  .results-card {
    padding: 28px 20px;
  }
  
  .price-display .price-value {
    font-size: 48px;
  }
  
  .price-display .currency {
    font-size: 28px;
  }
}
