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

:root {
  --primary: #ff4d00;
  --accent: #c8ff00;
  --cyan: #00d4ff;
  --pink: #ff00aa;
  --purple: #aa00ff;
  --bg: #0a0a0a;
  --bg-card: #111111;
  --text: #e8e4df;
  --text-muted: rgba(255,255,255,0.4);
  --border: rgba(255,255,255,0.05);
}

body[data-theme="light"] {
  --bg: #f5f2ec;
  --bg-card: #ffffff;
  --text: #191716;
  --text-muted: rgba(0,0,0,0.5);
  --border: rgba(0,0,0,0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: -40px;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 0 0, rgba(255,255,255,0.04) 0, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(255,255,255,0.03) 0, transparent 55%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 3px);
  opacity: 0.55;
  mix-blend-mode: soft-light;
}

body[data-theme="light"]::before {
  background-image:
    radial-gradient(circle at 0 0, rgba(0,0,0,0.03) 0, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(0,0,0,0.02) 0, transparent 55%),
    repeating-linear-gradient(135deg, rgba(0,0,0,0.015) 0, rgba(0,0,0,0.015) 1px, transparent 1px, transparent 3px);
}

.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 3rem; }
}

.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-stroke {
  -webkit-text-stroke: 1px currentColor;
  -webkit-text-fill-color: transparent;
}
@media (min-width: 640px) {
  .text-stroke { -webkit-text-stroke: 2px currentColor; }
}

.italic { font-style: italic; }

.logo-ai {
  animation: logoAIColor 4s ease-in-out infinite alternate;
}

@keyframes logoAIColor {
  0%, 100% { color: #ff4d00; }
  33% { color: #ff7a1a; }
  66% { color: #ff9f3b; }
}

.font-serif, h1, h2, .section-title, .footer-title, .cta-title, .stat-value, .orbit-logo {
  font-family: 'Instrument Serif', serif;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s;
}

.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
}

.nav-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

@media (min-width: 640px) {
  .nav-container { height: 80px; padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .nav-container { height: 96px; padding: 0 3rem; }
}

.nav-logo {
  color: var(--text);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
}

@media (min-width: 640px) {
  .nav-logo { font-size: 1rem; letter-spacing: 0.15em; }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

@media (min-width: 1024px) {
  .nav-links { gap: 4rem; }
}

.nav-link {
  color: var(--text);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 300;
  text-decoration: none;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-num {
  color: var(--primary);
  margin-right: 0.5rem;
}

.nav-right {
  display: none;
  align-items: center;
  gap: 1rem;
}

/* Mobile right-side actions: theme toggle + hamburger */
.nav-mobile-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Mobile stack wrapper (icons only; clock lives in hero) */
.nav-mobile-stack {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media (min-width: 768px) {
  .nav-mobile-actions { display: none; }
  .nav-mobile-stack { display: none; }
}

@media (min-width: 768px) {
  .nav-right { display: flex; }
}

@media (min-width: 1024px) {
  .nav-right { gap: 2rem; }
}

.nav-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-family: monospace;
  display: none;
}

@media (min-width: 1024px) {
  .nav-time { display: block; }
}

.nav-cta {
  padding: 0.625rem 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: black;
  background: white;
  text-decoration: none;
  transition: background 0.3s;
}

@media (min-width: 1024px) {
  .nav-cta { padding: 0.75rem 2rem; }
}

.nav-cta:hover {
  background: var(--primary);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 0;
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding-top: 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
}

.mobile-link {
  display: block;
  font-family: 'Instrument Serif', serif;
  font-size: 2.5rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.3s;
}

@media (min-width: 640px) {
  .mobile-link { font-size: 3rem; }
}

.mobile-menu.active .mobile-link {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.2s; }

.mobile-link:active {
  color: var(--primary);
}

.mobile-link .nav-num {
  font-size: 1.125rem;
  margin-right: 1rem;
}

.mobile-menu-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.mobile-menu-footer a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--primary);
  z-index: 100;
  width: 0;
}

.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.page-loader-inner {
  text-align: center;
}

.page-loader-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.page-loader-bar {
  position: relative;
  width: 140px;
  height: 2px;
  margin: 0 auto 0.75rem;
  background: var(--border);
  overflow: hidden;
}

.page-loader-bar span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--cyan));
  transform: translateX(-100%);
  animation: loaderSlide 1.3s ease-in-out infinite;
}

.page-loader-text {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  /* move content toward the top so primary CTAs are visible on first viewport */
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  padding-top: 1.5rem;
}

@media (min-width: 640px) {
  .hero { padding-top: 1rem; }
}

.floating-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.orb-1 {
  top: 25%;
  left: 25%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.2;
  animation: float1 8s ease-in-out infinite;
}

.orb-2 {
  bottom: 25%;
  right: 25%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.15;
  animation: float2 10s ease-in-out infinite 1s;
}

@media (min-width: 640px) {
  .orb-1 { width: 400px; height: 400px; }
  .orb-2 { width: 300px; height: 300px; }
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.1); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-25px, 25px) scale(1.15); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1800px;
  margin: 0 auto;
  /* reduce top padding so CTAs are higher in the viewport */
  padding: 3rem 1rem;
  width: 100%;
}

/* Mobile hero clock: visually under theme + hamburger (not in navbar) */
.hero-time {
  display: none;
  position: absolute;
  top: 72px;
  right: 1rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-family: monospace;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 767px) {
  .hero-time { display: block; }
}

/* Slightly lift the mobile hero clock so it sits closer to the top icons */
@media (max-width: 480px) {
  .hero-time { top: 56px; right: 0.9rem; font-size: 0.7rem; }
}

@media (min-width: 640px) {
  .hero-content { padding: 4.5rem 1.5rem; }
}

@media (min-width: 1024px) {
  .hero-content { padding: 6rem 3rem; }
}

.hero-grid-layout {
  display: grid;
  gap: 2rem;
  align-items: center;
  min-height: 60vh;
}

@media (min-width: 1024px) {
  .hero-grid-layout {
    grid-template-columns: 1.4fr 1.3fr;
    gap: 3rem;
    min-height: 80vh;
  }
}

.hero-text {
  order: 2;
}

@media (min-width: 1024px) {
  .hero-text { order: 1; }
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.3s;
}

@media (min-width: 640px) {
  .hero-badge { gap: 1rem; margin-bottom: 2rem; }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-badge span {
  color: var(--text-muted);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .hero-badge span { font-size: 0.75rem; letter-spacing: 0.3em; }
}

.hero-title {
  font-size: clamp(2.5rem, 10vw, 11rem);
  line-height: 0.85;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-title.scramble span {
  transition: color 0.2s ease;
}

@media (min-width: 640px) {
  .hero-title { margin-bottom: 2rem; }
}

.reveal-text {
  display: block;
  overflow: hidden;
}

.reveal-text > span {
  display: block;
  transform: translateY(100%);
  animation: revealText 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-text:nth-child(1) > span { animation-delay: 0.2s; }
.reveal-text:nth-child(2) > span { animation-delay: 0.4s; }
.reveal-text:nth-child(3) > span { animation-delay: 0.6s; }

@keyframes revealText {
  to { transform: translateY(0); }
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 32rem;
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 1s;
}

@media (min-width: 640px) {
  .hero-desc { font-size: 1.125rem; }
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 1.2s;
}

@media (min-width: 640px) {
  .hero-buttons { margin-top: 2.5rem; }
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .btn { padding: 1rem 2rem; }
}

.btn-primary {
  background: var(--primary);
  color: black;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  transition: transform 0.3s;
}

.btn-primary span {
  position: relative;
  z-index: 1;
}

.btn-primary:hover::after {
  transform: translateX(0);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn,
.nav-cta,
.filter-btn,
.featured-view,
.project-arrow,
.service-arrow {
  position: relative;
  overflow: hidden;
}

.btn.magnetic,
.nav-cta.magnetic {
  transition: transform 0.2s ease-out;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero-visual {
  order: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

@media (min-width: 1024px) {
  .hero-visual { order: 2; justify-content: center; align-items: flex-start; }
}

.orbit-container {
  position: relative;
  width: 192px;
  height: 192px;
  opacity: 0;
  animation: scaleIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.2s;
}

@media (min-width: 640px) {
  .orbit-container { width: 256px; height: 256px; }
}

@media (min-width: 1024px) {
  .orbit-container { width: 100%; max-width: 480px; aspect-ratio: 1; margin-top: -2rem; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8) rotate(-10deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.orbit {
  position: absolute;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.orbit-1 {
  inset: 0;
  animation: rotate 30s linear infinite;
}

.orbit-2 {
  inset: 12%;
  animation: rotate 25s linear infinite reverse;
}

.orbit-3 {
  inset: 24%;
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.planet {
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
}

.planet-1 {
  width: 12px;
  height: 12px;
  background: var(--primary);
  margin: -6px 0 0 -6px;
  animation: orbit1 15s linear infinite;
}

.planet-2 {
  width: 8px;
  height: 8px;
  background: var(--accent);
  margin: -4px 0 0 -4px;
  animation: orbit2 20s linear infinite;
}

@keyframes orbit1 {
  0% { transform: translate(0, -50px); }
  25% { transform: translate(50px, 0); }
  50% { transform: translate(0, 50px); }
  75% { transform: translate(-50px, 0); }
  100% { transform: translate(0, -50px); }
}

@keyframes orbit2 {
  0% { transform: translate(0, 70px); }
  25% { transform: translate(-70px, 0); }
  50% { transform: translate(0, -70px); }
  75% { transform: translate(70px, 0); }
  100% { transform: translate(0, 70px); }
}

.orbit-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.orbit-logo {
  font-size: 1.875rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

@media (min-width: 640px) {
  .orbit-logo { font-size: 2.5rem; margin-bottom: 0.5rem; }
}

@media (min-width: 1024px) {
  .orbit-logo { font-size: 3rem; }
}

.orbit-tagline {
  color: var(--text-muted);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .orbit-tagline { font-size: 0.75rem; }
}

.scroll-indicator {
  display: none;
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards 1.5s;
}

@media (min-width: 640px) {
  .scroll-indicator { display: flex; bottom: 3rem; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.scroll-indicator span {
  color: var(--text-muted);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .scroll-indicator span { font-size: 0.75rem; }
}

.scroll-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@media (min-width: 640px) {
  .scroll-line { height: 4rem; }
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.5); }
}

.marquee-section {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

@media (min-width: 640px) {
  .marquee-section { padding: 1.5rem 0; }
}

@media (min-width: 1024px) {
  .marquee-section { padding: 2rem 0; }
}

.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  min-width: 100%;
  animation: marquee 25s linear infinite;
}

.marquee-content span {
  /* make the scroller text more legible on dark backgrounds */
  color: var(--text);
  opacity: 0.72;
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 1.5rem;
  font-weight: 400;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .marquee-content span { font-size: 1.125rem; letter-spacing: 0.3em; margin: 0 2rem; }
}

@media (min-width: 1024px) {
  .marquee-content span { font-size: 1.25rem; margin: 0 3rem; }
}

.marquee-star {
  color: var(--primary);
  margin: 0 1rem;
}

@media (min-width: 640px) {
  .marquee-star { margin: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .marquee-star { margin: 0 2rem; }
}

@keyframes marquee {
  to { transform: translateX(-100%); }
}

.section-label {
  display: block;
  color: var(--primary);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .section-label { margin-bottom: 1rem; }
}

.section-title {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  color: var(--text);
}

.section-header {
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .section-header { margin-bottom: 3rem; }
}

.section-header-center {
  text-align: center;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .section-header-center { margin-bottom: 4rem; }
}

@media (min-width: 1024px) {
  .section-header-center { margin-bottom: 5rem; }
}

.services-section {
  padding: 4rem 0;
}

@media (min-width: 640px) {
  .services-section { padding: 6rem 0; }
}

@media (min-width: 1024px) {
  .services-section { padding: 8rem 0; }
}

.services-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .services-grid { grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }
}

.services-intro {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.services-intro.visible {
  opacity: 1;
  transform: translateY(0);
}

.services-desc {
  color: var(--text-muted);
  max-width: 28rem;
  line-height: 1.6;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .services-desc { font-size: 1rem; }
}

.services-list {
  display: flex;
  flex-direction: column;
}

.service-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.5s ease, transform 0.3s ease;
}

@media (min-width: 640px) {
  .service-item { gap: 2rem; padding: 1.5rem 0; }
}

@media (min-width: 1024px) {
  .service-item { padding: 2rem 0; }
}

.service-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.service-item:hover {
  transform: translateX(10px);
}

.service-num {
  color: var(--primary);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .service-num { font-size: 0.75rem; margin-top: 0.5rem; }
}

.service-content {
  flex: 1;
}

.service-title {
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 300;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
}

@media (min-width: 640px) {
  .service-title { font-size: 1.25rem; gap: 1rem; margin-bottom: 0.5rem; }
}

@media (min-width: 1024px) {
  .service-title { font-size: 1.5rem; }
}

.service-item:hover .service-title {
  color: var(--primary);
}

.service-icon {
  color: rgba(255, 77, 0, 0.4);
  font-size: 0.875rem;
  transition: color 0.3s;
}

@media (min-width: 640px) {
  .service-icon { font-size: 1rem; }
}

.service-item:hover .service-icon {
  color: var(--primary);
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.75rem;
  max-width: 24rem;
}

@media (min-width: 640px) {
  .service-desc { font-size: 0.875rem; }
}

.service-arrow {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}

@media (min-width: 640px) {
  .service-arrow { width: 48px; height: 48px; }
}

.service-arrow svg {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  transition: all 0.3s;
}

@media (min-width: 640px) {
  .service-arrow svg { width: 16px; height: 16px; }
}

.service-item:hover .service-arrow {
  border-color: var(--primary);
  background: var(--primary);
}

.service-item:hover .service-arrow svg {
  color: black;
  transform: rotate(45deg);
}

.projects-section {
  padding: 4rem 0;
}

.projects-swipe-hint {
  margin-top: 0.75rem;
  color: var(--primary);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.95;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.projects-swipe-hint::after {
  content: '→';
  display: inline-block;
  transform: translateX(0);
  animation: swipeNudge 1.2s ease-in-out infinite;
}

@keyframes swipeNudge {
  0%, 100% { transform: translateX(0); opacity: 0.85; }
  50% { transform: translateX(8px); opacity: 1; }
}

@media (min-width: 768px) {
  .projects-swipe-hint { display: none; }
}

@media (min-width: 640px) {
  .projects-section { padding: 6rem 0; }
}

@media (min-width: 1024px) {
  .projects-section { padding: 8rem 0; }
}

.projects-carousel {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  touch-action: pan-x;
  /* subtle edge fade so the loop feels continuous */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.projects-carousel::-webkit-scrollbar {
  height: 0;
}

.projects-carousel {
  scrollbar-width: none;
}

.projects-grid {
  display: flex;
  gap: 1.25rem;
  will-change: transform;
  width: max-content;
}

.projects-track {
  padding: 0.25rem 0;
}

.project-card {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.5s ease;
  transform-style: preserve-3d;
  flex: 0 0 clamp(260px, 40vw, 520px);
  scroll-snap-align: start;
}

/* In the auto-looping carousel, cards must always render (clones won't be observed for reveal). */
.projects-carousel .project-card {
  opacity: 1;
  transform: translateY(0);
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-card-inner {
  position: relative;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg) 100%);
  border-radius: 1rem;
  padding: 1.25rem;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.5s, transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  backdrop-filter: blur(18px);
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-card) 80%, transparent) 0%, color-mix(in srgb, var(--bg) 90%, transparent) 100%);
}

@media (min-width: 640px) {
  .project-card-inner { border-radius: 1.5rem; padding: 1.75rem; min-height: 240px; }
}

@media (min-width: 1024px) {
  .project-card-inner { padding: 2.25rem; min-height: 270px; }
}

.project-card:hover .project-card-inner {
  border-color: var(--border);
}

.project-card-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--hover-color, var(--primary)) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s;
}

.project-card:hover .project-card-inner::before {
  opacity: 0.15;
}

.project-card.tilt-active .project-card-inner {
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.project-category {
  position: relative;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .project-category { font-size: 0.75rem; }
}

.project-title {
  position: relative;
  font-family: 'Instrument Serif', serif;
  color: var(--text);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .project-title { font-size: 1.875rem; margin-bottom: 1rem; }
}

@media (min-width: 1024px) {
  .project-title { font-size: 2.25rem; }
}

.project-desc {
  position: relative;
  color: var(--text-muted);
  font-size: 0.75rem;
  max-width: 28rem;
}

@media (min-width: 640px) {
  .project-desc { font-size: 0.875rem; }
}

.project-view {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 3.75rem;
  height: 3.75rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  transition: all 0.3s;
}

@media (min-width: 640px) {
  .project-view { top: 1.75rem; right: 1.75rem; width: 4.5rem; height: 4.5rem; }
}

@media (min-width: 1024px) {
  .project-view { width: 5rem; height: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .projects-grid { transform: none !important; }
}

.project-card:hover .project-view {
  border-color: var(--text-muted);
}

.projects-link {
  margin-top: 2rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

@media (min-width: 640px) {
  .projects-link { margin-top: 3rem; }
}

.projects-link.visible {
  opacity: 1;
  transform: translateY(0);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.3s;
}

.link-arrow:hover {
  color: var(--primary);
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}

.link-arrow:hover svg {
  transform: translate(5px, -5px);
}

.stats-section,
.works-stats {
  position: relative;
  padding: 4rem 0;
  overflow: hidden;
  background: var(--bg);
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  z-index: 80;
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  display: block;
}

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

.back-to-top:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
}

.chat-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 4.75rem;
  border-radius: 999px;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 80%, transparent);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
  z-index: 80;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.chat-toggle .chat-icon {
  width: 20px;
  height: 20px;
}

.back-to-top svg,
.chat-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.chat-toggle:hover, .back-to-top:hover {
  transform: translateY(-2px);
}

/* Uniform outer/inner outlines for floating buttons */
.chat-toggle,
.back-to-top {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.chat-toggle::before,
.back-to-top::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  pointer-events: none;
}

.chat-toggle::after,
.back-to-top::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--text) 4%, transparent);
  pointer-events: none;
}

/* Ensure SVG strokes are consistent regardless of inline attributes */
.chat-toggle svg path,
.chat-toggle svg ellipse,
.chat-toggle svg circle,
.back-to-top svg path,
.back-to-top svg ellipse,
.back-to-top svg circle {
  stroke: currentColor;
  stroke-width: 1.4px;
  fill: none;
}

/* Slightly darker border on hover for clarity */
.chat-toggle:hover,
.back-to-top:hover {
  border-color: color-mix(in srgb, var(--text) 12%, var(--border));
}

.chat-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
  transform: translateY(-2px);
}

.chat-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 4.75rem;
  width: min(320px, 90vw);
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 85%, transparent);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.9) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 90;
}

.chat-widget.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.chat-title {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.chat-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
}

.chat-body {
  padding: 0.75rem 1rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-message {
  max-width: 80%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
}

.chat-message-bot {
  align-self: flex-start;
  background: var(--border);
}

.chat-message-user {
  align-self: flex-end;
  background: var(--primary);
  color: #000;
}

.chat-input {
  display: flex;
  padding: 0.5rem;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
}

.chat-input input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text);
}

.chat-input button {
  border-radius: 999px;
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--primary);
  color: #000;
  cursor: pointer;
}

.custom-cursor,
.custom-cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  mix-blend-mode: difference;
}

.custom-cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 1;
}

.custom-cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0.5;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

@media (hover: none) and (pointer: coarse) {
  .custom-cursor,
  .custom-cursor-ring {
    display: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }
}

.custom-cursor-ring.hover {
  width: 50px;
  height: 50px;
  border-color: var(--primary);
  opacity: 0.8;
}

@media (min-width: 640px) {
  .stats-section { padding: 6rem 0; }
}

@media (min-width: 1024px) {
  .stats-section { padding: 8rem 0; }
}

.stats-bg {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
}

.stats-bg::before,
.stats-bg::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

/* NOTE: keep only ring outlines; no tinted background layer */
.stats-bg::before {
  content: none;
}

.stats-bg::after {
  width: 420px;
  height: 420px;
  opacity: 0.7;
  animation: rotate 50s linear infinite reverse;
}

/* Theme-specific ring colors so rings contrast on both light and dark backgrounds */
body[data-theme="light"] .stats-bg::after {
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: none;
  mix-blend-mode: normal;
  opacity: 0.9;
}

/* stronger circle outlines on light background */
body[data-theme="light"] .stats-circle {
  border-color: rgba(0,0,0,0.12);
  mix-blend-mode: normal;
  opacity: 0.65;
}

body:not([data-theme="light"]) .stats-bg::after {
  border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
  box-shadow: none;
  mix-blend-mode: normal;
  opacity: 0.7;
}

body:not([data-theme="light"]) .stats-circle {
  border-color: rgba(255,255,255,0.12);
  opacity: 0.9;
}

.stats-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: 50%;
  opacity: 0.9;
  mix-blend-mode: normal;
  animation: floatSlow 18s ease-in-out infinite;
}

.stats-circle-1 {
  width: 520px;
  height: 520px;
  animation: rotate 60s linear infinite, floatSlow 22s ease-in-out infinite;
}

.stats-circle-2 {
  width: 360px;
  height: 360px;
  animation: rotate 45s linear infinite reverse, floatSlow 26s ease-in-out infinite;
}

/* Ensure rings sit behind content */
.stats-bg,
.stats-circle,
.stats-bg::before,
.stats-bg::after { z-index: 0; }
.stats-grid { z-index: 1; }

@media (max-width: 640px) {
  .stats-circle-1 { width: 260px; height: 260px; }
  .stats-circle-2 { width: 160px; height: 160px; }
  body[data-theme="light"] .stats-bg::before { opacity: 0.85; }
  body[data-theme="light"] .stats-bg::after { opacity: 0.95; }
  body:not([data-theme="light"]) .stats-bg::before { opacity: 0.85; }
  body:not([data-theme="light"]) .stats-bg::after { opacity: 0.7; }
}

@keyframes floatSlow {
  0% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-10px); }
  100% { transform: translate(-50%, -50%) translateY(0); }
}

.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .stats-grid { gap: 2rem; }
}

@media (min-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 3rem; }
}

.stat-item {
  text-align: center;
  opacity: 0;
  transform: translateY(50px) scale(0.9);
  transition: all 0.5s ease;
}

.stat-item.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stat-item:hover {
  transform: scale(1.05);
}

.stat-value {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--text);
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

@media (min-width: 640px) {
  .stat-value { margin-bottom: 1rem; }
}

.stat-item:hover .stat-value {
  color: var(--primary);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .stat-label { font-size: 0.75rem; letter-spacing: 0.2em; }
}

.testimonials-section,
.works-testimonials {
  padding: 4rem 0;
}

@media (min-width: 640px) {
  .testimonials-section { padding: 6rem 0; }
}

@media (min-width: 1024px) {
  .testimonials-section { padding: 8rem 0; }
}

.testimonials-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

.testimonial-card {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  height: 100%;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.5s ease, transform 0.3s ease;
}

@media (min-width: 640px) {
  .testimonial-card { padding: 2rem; border-radius: 1.5rem; }
}

@media (min-width: 1024px) {
  .testimonial-card { padding: 2.5rem; }
}

.testimonial-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.testimonial-card:hover {
  border-color: var(--border);
  transform: translateY(-5px);
}

.testimonial-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 1rem 0 0 1rem;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s ease 0.3s;
}

@media (min-width: 640px) {
  .testimonial-accent { border-radius: 1.5rem 0 0 1.5rem; }
}

.testimonial-card.visible .testimonial-accent {
  transform: scaleY(1);
}

.testimonial-quote {
  font-family: 'Instrument Serif', serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .testimonial-quote { font-size: 3rem; margin-bottom: 1.5rem; }
}

@media (min-width: 1024px) {
  .testimonial-quote { font-size: 3.75rem; }
}

.testimonial-text {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .testimonial-text { font-size: 1rem; margin-bottom: 2rem; }
}

@media (min-width: 1024px) {
  .testimonial-text { font-size: 1.125rem; }
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .testimonial-author { gap: 1rem; }
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  font-weight: bold;
  font-size: 0.875rem;
  transition: transform 0.3s;
}

@media (min-width: 640px) {
  .author-avatar { width: 48px; height: 48px; font-size: 1rem; }
}

.testimonial-card:hover .author-avatar {
  transform: scale(1.1);
}

.author-name {
  color: var(--text);
  font-weight: 500;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .author-name { font-size: 1rem; }
}

.author-role {
  color: var(--text-muted);
  font-size: 0.75rem;
}

@media (min-width: 640px) {
  .author-role { font-size: 0.875rem; }
}

.clients-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .clients-section { padding: 4rem 0; }
}

@media (min-width: 1024px) {
  .clients-section { padding: 5rem 0; }
}

.clients-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

@media (min-width: 1024px) {
  .clients-wrapper { flex-direction: row; justify-content: space-between; gap: 3rem; }
}

.clients-wrapper.visible {
  opacity: 1;
}

.clients-text {
  text-align: center;
}

@media (min-width: 1024px) {
  .clients-text { text-align: left; }
}

.clients-title {
  color: var(--text);
  font-family: 'Instrument Serif', serif;
  font-size: 1.25rem;
}

@media (min-width: 640px) {
  .clients-title { font-size: 1.5rem; }
}

.clients-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .clients-logos { gap: 1.5rem; }
}

@media (min-width: 1024px) {
  .clients-logos { gap: 3rem; }
}

.client-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s;
}

@media (min-width: 640px) {
  .client-logo { gap: 0.75rem; }
}

.client-logo:hover {
  transform: scale(1.1);
}

.client-logo > span:first-child {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: all 0.3s;
}

@media (min-width: 640px) {
  .client-logo > span:first-child { width: 40px; height: 40px; font-size: 0.875rem; }
}

.client-logo:hover > span:first-child {
  border-color: var(--primary);
  color: var(--primary);
}

.client-name {
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: color 0.3s;
  display: none;
}

@media (min-width: 640px) {
  .client-name { display: inline; font-size: 0.875rem; }
}

.client-logo:hover .client-name {
  color: var(--text-muted);
}

.cta-section {
  padding: 4rem 0;
}

.process-section {
  padding: 4rem 0;
}

@media (min-width: 640px) {
  .process-section { padding: 6rem 0; }
}

@media (min-width: 1024px) {
  .process-section { padding: 8rem 0; }
}

.process-timeline {
  position: relative;
  /* keep the timeline visually narrower than the full container so it sits
     directly under the centered section heading */
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
}

.process-timeline::before {
  content: '';
  position: absolute;
  left: 46%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--primary) 20%, transparent 60%, transparent 100%);
  background-size: 1px 220%;
  background-position: 0 0;
  opacity: 0.28;
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-timeline.visible::before {
  transform: scaleY(1);
  animation: timelineFlow 2.6s linear infinite;
}

.process-timeline::after {
  content: '';
  position: absolute;
  left: 46%;
  transform: translateX(-50%) translateY(-50%);
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 18%, transparent);
  opacity: 0;
}

.process-timeline.visible::after {
  opacity: 1;
  animation: timelineDot 2.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes timelineFlow {
  0% { background-position: 0 -120%; }
  100% { background-position: 0 120%; }
}

@keyframes timelineDot {
  0% { top: 0%; opacity: 0; }
  12% { top: 0%; opacity: 1; }
  85% { top: 100%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .process-timeline.visible::before,
  .process-timeline.visible::after {
    animation: none;
  }
}

.process-step {
  display: grid;
  grid-template-columns: 1fr 48px 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.process-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.process-badge {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--bg-card) 85%, transparent);
  grid-column: 2;
  justify-self: center;
}

.process-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.process-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: none;
}

.process-content { grid-column: 3; justify-self: start; max-width: 560px; }

/* Ensure the timeline stays nicely centered under the section title on large screens */
@media (min-width: 1024px) {
  .process-timeline { max-width: 880px; }
}

@media (max-width: 640px) {
  .process-timeline::before { left: 14px; }
  .process-timeline::after { left: 14px; }
  .process-step {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
  }
  .process-badge { grid-column: auto; }
  .process-content { grid-column: auto; max-width: 100%; }
}

.contact-section {
  padding: 4rem 0 5rem;
}

@media (min-width: 640px) {
  .contact-section { padding: 6rem 0 6rem; }
}

@media (min-width: 1024px) {
  .contact-section { padding: 8rem 0 7rem; }
}

.contact-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr); gap: 4rem; align-items: flex-start; }
}

.contact-desc {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 26rem;
}

.contact-form {
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--bg-card) 85%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

@media (min-width: 640px) {
  .contact-form { padding: 2rem; }
}

.form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-field input,
.form-field textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 90%, transparent);
  padding: 0.65rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text);
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.field-error {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: #ff4d4d;
  min-height: 0.9rem;
}

.form-success {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--accent);
}

.form-submit {
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .cta-section { padding: 6rem 0; }
}

@media (min-width: 1024px) {
  .cta-section { padding: 8rem 0; }
}

.cta-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px) scale(0.95);
  transition: all 0.6s ease;
}

@media (min-width: 640px) {
  .cta-card { border-radius: 2rem; padding: 3rem; }
}

@media (min-width: 768px) {
  .cta-card { padding: 4rem; }
}

@media (min-width: 1024px) {
  .cta-card { border-radius: 3rem; padding: 6rem; }
}

.cta-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cta-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: rgba(255, 77, 0, 0.1);
  border-radius: 50%;
  filter: blur(100px);
  animation: ctaPulse 5s ease-in-out infinite;
}

@media (min-width: 640px) {
  .cta-glow { width: 400px; height: 400px; filter: blur(150px); }
}

@media (min-width: 1024px) {
  .cta-glow { width: 600px; height: 600px; }
}

@keyframes ctaPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.1; }
  50% { transform: translateX(-50%) scale(1.2); opacity: 0.15; }
}

.cta-content {
  position: relative;
  text-align: center;
}

.cta-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
  border: 1px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.25rem;
  transition: all 0.3s;
}

@media (min-width: 640px) {
  .cta-icon { width: 64px; height: 64px; margin-bottom: 2rem; font-size: 1.5rem; }
}

@media (min-width: 1024px) {
  .cta-icon { width: 80px; height: 80px; font-size: 1.875rem; }
}

.cta-icon:hover {
  transform: scale(1.1) rotate(90deg);
}

.cta-title {
  font-size: clamp(1.75rem, 5vw, 4rem);
  line-height: 1;
  margin-bottom: 1.5rem;
  color: var(--text);
}

@media (min-width: 640px) {
  .cta-title { margin-bottom: 2rem; }
}

.cta-desc {
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .cta-desc { margin-bottom: 2.5rem; font-size: 1rem; }
}

@media (min-width: 1024px) {
  .cta-desc { margin-bottom: 3rem; }
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .cta-buttons { flex-direction: row; gap: 1.5rem; }
}

.footer {
  position: relative;
  background: var(--bg);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 86%, transparent);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  color: var(--text);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.theme-toggle:active {
  transform: scale(0.98);
}

.theme-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 70%, transparent);
  outline-offset: 3px;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  opacity: 0.35;
}

.theme-glyph {
  position: relative;
  width: 20px;
  height: 20px;
}

.theme-glyph .icon-sun {
  opacity: 0;
  transform: scale(0.7);
  transform-origin: 50% 50%;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.theme-glyph .icon-moon {
  opacity: 1;
  transform: scale(1);
  transform-origin: 50% 50%;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body[data-theme="light"] .theme-glyph .icon-sun {
  opacity: 1;
  transform: scale(1);
}

body[data-theme="light"] .theme-glyph .icon-moon {
  opacity: 0;
  transform: scale(0.7);
}

.theme-orbit {
  position: absolute;
  inset: 0;
  animation: themeOrbit 3.2s linear infinite;
}

.theme-orbit-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: none;
  transform: translate(-50%, -50%) translateX(16px);
}

@keyframes themeOrbit {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-orbit { animation: none; }
}

/* Mobile-only variant: shown beside the hamburger toggle */
.theme-toggle.mobile-only {
  display: inline-grid;
  margin-left: 0;
  width: 32px;
  height: 32px;
}

.theme-toggle.mobile-only::before {
  inset: 6px;
}

.theme-toggle.mobile-only .theme-glyph {
  width: 16px;
  height: 16px;
}

.theme-toggle.mobile-only .theme-orbit-dot {
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%) translateX(11px);
}

@media (min-width: 768px) {
  .theme-toggle.mobile-only { display: none; }
}

.theme-toggle-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--primary);
  transform: translateX(0);
  transition: transform 0.25s ease;
}

body[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(20px);
}

.theme-toggle-icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.theme-toggle-icon span {
  opacity: 0.4;
}

body[data-theme="light"] .theme-toggle-icon--sun span {
  opacity: 1;
}

body:not([data-theme="light"]) .theme-toggle-icon--moon span {
  opacity: 1;
}

.footer-bg {
  position: absolute;
  inset: 0;
  opacity: 0.05;
}

.footer-bg svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 400px;
}

.footer .container {
  position: relative;
  padding-top: 4rem;
  padding-bottom: 2rem;
}

@media (min-width: 640px) {
  .footer .container { padding-top: 6rem; padding-bottom: 3rem; }
}

@media (min-width: 1024px) {
  .footer .container { padding-top: 8rem; }
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 6rem; }
}

.footer-main {
  grid-column: span 2;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-main { grid-column: span 3; }
}

@media (min-width: 1024px) {
  .footer-main { grid-column: span 1; margin-bottom: 0; }
}

.footer-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.9;
  color: var(--text);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.footer-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 20rem;
  line-height: 1.6;
}

.footer-links-title {
  color: var(--primary);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .footer-links-title { margin-bottom: 1.5rem; }
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .footer-links li { margin-bottom: 1rem; }
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.3s;
}

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

.footer-links a:active {
  color: var(--primary);
}

/* Hide the 'Navigation' column in the footer on small screens (mobile). Using a dedicated class to ensure reliability. */
@media (max-width: 767px) {
  .footer .footer-links.footer-links-nav { display: none !important; }
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; padding-top: 2rem; gap: 1.5rem; }
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-bottom-left { gap: 2rem; }
}

.footer-logo {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

.footer-copyright {
  color: color-mix(in srgb, var(--text) 20%, transparent);
  font-size: 0.75rem;
}

.footer-email {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.3s;
}

@media (min-width: 640px) {
  .footer-email { font-size: 0.875rem; }
}

.footer-email:hover {
  color: var(--primary);
}

.footer-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 77, 0, 0.5), transparent);
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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