/* ═══════════════════════════════════════════
   CODEBAY.TECH — Mobile App Studio
   ═══════════════════════════════════════════ */

/* --- Fonts (self-hosted, OFL — see assets/fonts/OFL.txt) --- */
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat-latin-var.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* --- Custom Properties --- */
:root {
  /* 75% — deep base */
  --bg-deep: #22173a;
  /* 15% — neutral dark surfaces */
  --bg-surface: #1e1730;
  --bg-card: #241c3a;
  --bg-elevated: #2c2244;
  /* 8% — cyan/blue highlights */
  --cyan: #2eeed6;
  --blue: #02b8fc;
  /* 2% — purple accent (rare emphasis) */
  --purple: #7b61ff;
  --orange: #ff9211;
  --red: #ff6b6b;
  --text-primary: #ece8f3;
  --text-secondary: #9b90b3;
  /* ≥4.5:1 on every surface token above */
  --text-muted: #948aae;
  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Montserrat', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --nav-height: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }

section[id] { scroll-margin-top: var(--nav-height); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

::selection {
  background: var(--cyan);
  color: var(--bg-deep);
}

/* --- Noise Texture Overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* --- Cursor Spotlight --- */
.cursor-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 97, 255, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.4s;
  opacity: 0;
  will-change: transform;
}

.cursor-spotlight.visible {
  opacity: 1;
}

/* --- Skip Link (a11y) --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 12px 24px;
  background: var(--cyan);
  color: var(--bg-deep);
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  z-index: 200;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 16px;
}

/* --- Particles Canvas --- */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.25;
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease-out);
}

/* The blur lives on a pseudo-element: backdrop-filter on .navbar itself would
   become the containing block of the fixed mobile menu and squash it. */
.navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(30, 23, 48, 0.9);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.navbar.scrolled { border-bottom-color: rgba(255, 255, 255, 0.04); }
.navbar.scrolled::before { opacity: 1; }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 101;
}

.logo-icon-img {
  height: 28px;
  width: auto;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.logo-highlight {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link--cta {
  color: var(--cyan);
  padding: 8px 18px;
  border: 1px solid rgba(46, 238, 214, 0.3);
  border-radius: 999px;
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}

.nav-link--cta::after { display: none; }

.nav-link--cta:hover {
  color: var(--bg-deep);
  background: var(--cyan);
  border-color: var(--cyan);
}

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

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: border-color 0.3s, background 0.3s;
}

.lang-toggle:hover {
  border-color: var(--cyan);
  background: rgba(46, 238, 214, 0.08);
}

.lang-separator,
.lang-option { color: var(--text-muted); }

html[lang="en"] .lang-option--en,
html[lang="pt-BR"] .lang-option--pt { color: var(--cyan); }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  z-index: 101;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

/* Fade the glows into the next section instead of a hard edge */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--bg-deep));
  pointer-events: none;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  will-change: transform;
}

.hero-glow--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(46, 238, 214, 0.08), transparent 70%);
  top: -10%;
  right: -5%;
  animation: glowDrift 14s ease-in-out infinite alternate;
}

.hero-glow--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(2, 184, 252, 0.06), transparent 70%);
  bottom: -5%;
  left: -10%;
  animation: glowDrift 12s ease-in-out infinite alternate-reverse;
}

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

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
}

/* Hero entrance: the h1 paints immediately (it is the LCP element);
   only the small elements around it animate in, briefly. */
.hero-badge,
.hero-subtitle,
.hero-cta-group,
.scroll-indicator {
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(46, 238, 214, 0.2);
  background: rgba(46, 238, 214, 0.06);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--cyan);
  margin-bottom: 32px;
}

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

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

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 28px;
}

.title-line {
  display: block;
  font-size: clamp(36px, 7vw, 80px);
}

.title-line--accent {
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
}

/* Continuous repaints are a desktop-only luxury */
@media (hover: hover) and (pointer: fine) {
  .title-line--accent { animation: gradientShift 10s linear infinite; }
  .contact-card { animation: borderFlow 12s linear infinite; }
}

@keyframes gradientShift {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-weight: 400;
  animation-delay: 0.1s;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  animation-delay: 0.2s;
}

/* --- Buttons --- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s, border-color 0.3s, color 0.3s;
}

.btn:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

.btn--primary {
  background: var(--orange);
  color: var(--bg-deep);
  box-shadow: 0 4px 20px rgba(255, 146, 17, 0.2);
}

.btn--primary svg { transition: transform 0.3s var(--ease-out); }

/* Light sweep across the button on hover */
.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  pointer-events: none;
}

@media (hover: hover) {
  .btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(255, 146, 17, 0.35);
  }

  .btn--primary:hover::after {
    transform: translateX(100%);
    transition: transform 0.7s var(--ease-out);
  }

  .btn--primary:hover svg { transform: translateX(3px); }

  .btn--ghost:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(46, 238, 214, 0.06);
  }
}

.btn--ghost {
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  margin-left: -0.5px;
  animation-delay: 0.6s;
}

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

@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- SECTION COMMON --- */
.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
  position: relative;
  padding-left: 24px;
}

.section-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 2px;
  background: var(--cyan);
  border-radius: 1px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .section-desc {
  margin: 0 auto;
}

/* Pointer-following highlight shared by cards (variables set by main.js) */
.service-card::before,
.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(46, 238, 214, 0.07), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

@media (hover: hover) {
  .service-card:hover::before,
  .app-card:hover::before { opacity: 1; }
}

/* --- SERVICES --- */
.services {
  position: relative;
  padding: 100px 24px 60px;
  z-index: 1;
}

.services-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  position: relative;
  padding: 32px 28px;
  background: rgba(30, 23, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}

@media (hover: hover) {
  .service-card:hover,
  .service-card.reveal.revealed:hover {
    border-color: rgba(46, 238, 214, 0.18);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  }

  .service-card:hover .service-icon { transform: scale(1.08) rotate(-4deg); }
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 20px;
  transition: transform 0.4s var(--ease-spring);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- APPS --- */
.apps {
  position: relative;
  padding: 100px 24px 80px;
  z-index: 1;
}

.app-card {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: rgba(30, 23, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: 48px;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
}

@media (hover: hover) {
  .app-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  }

  .app-card:hover .phone-frame {
    transform: rotateY(0deg) rotateX(0deg) translateY(-8px);
  }
}

.app-card-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orange), transparent 70%);
  opacity: 0.06;
  top: -120px;
  right: -120px;
  pointer-events: none;
}

/* Phone mockup */
.app-phone {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.phone-frame {
  width: 220px;
  height: 440px;
  background: #14101f;
  border-radius: 32px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  padding: 8px;
  position: relative;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: transform 0.6s var(--ease-out);
  transform: rotateY(-6deg) rotateX(3deg);
}

.phone-notch {
  width: 90px;
  height: 22px;
  background: #1a1128;
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: calc(100% - 22px);
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #1f1432 0%, #18102a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.soon-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.soon-icon {
  z-index: 1;
  animation: soonFloat 4s ease-in-out infinite;
}

.soon-number {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--orange), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.85;
}

@keyframes soonFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.05); }
}

.soon-pulse {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1px solid rgba(255, 146, 17, 0.35);
  animation: soonPulse 3s ease-out infinite;
}

.soon-pulse--2 {
  animation-delay: 1.5s;
}

@keyframes soonPulse {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

.app-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.app-name {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.app-tagline {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.feature-chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-chip--soon {
  background: rgba(255, 146, 17, 0.1);
  border: 1px solid rgba(255, 146, 17, 0.2);
  color: var(--orange);
}

/* --- ABOUT --- */
.about {
  position: relative;
  padding: 100px 24px;
  z-index: 1;
}

.about-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.about-code-block {
  background: #1a1128;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-filename {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
}

.code-content {
  padding: 16px 20px;
  line-height: 1.8;
  overflow-x: auto;
}

.code-content code {
  font-family: inherit;
}

.code-key { color: var(--cyan); }
.code-str { color: var(--orange); }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat {
  text-align: center;
  padding: 20px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--cyan);
}

.stat-number small {
  font-size: 16px;
  opacity: 0.7;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.about-text {
  display: flex;
  flex-direction: column;
}

.about-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.pillar {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.pillar-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pillar strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.pillar span {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- CONTACT --- */
.contact {
  position: relative;
  padding: 40px 24px 120px;
  z-index: 1;
}

.contact-card {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 48px;
  text-align: center;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
    linear-gradient(120deg, rgba(46, 238, 214, 0.5), rgba(123, 97, 255, 0.4), rgba(255, 146, 17, 0.5), rgba(46, 238, 214, 0.5)) border-box;
  background-size: 100% 100%, 300% 300%;
  border: 1px solid transparent;
  overflow: hidden;
}

@keyframes borderFlow {
  from { background-position: 0 0, 0% 50%; }
  to { background-position: 0 0, 300% 50%; }
}

.contact-card .section-desc {
  margin: 0 auto 20px;
}

.contact-list {
  list-style: none;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
  text-align: left;
}

.contact-list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--text-primary);
}

.contact-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(-45deg);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.contact-note {
  max-width: 520px;
  margin: 24px auto 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.copy-email.copied {
  border-color: var(--cyan);
  color: var(--cyan);
}

.sr-only,
.copy-email-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- FOOTER --- */
.footer {
  position: relative;
  padding: 64px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  z-index: 1;
  overflow: hidden;
}

.footer-glow {
  position: absolute;
  width: 600px;
  max-width: 100%;
  height: 300px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.02), transparent 70%);
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links-group h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links-group a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color 0.3s;
}

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

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .app-card {
    grid-template-columns: 1fr;
    padding: 40px 24px;
    gap: 32px;
    text-align: center;
  }

  .app-info {
    align-items: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-text {
    text-align: center;
    align-items: center;
  }

  .about-pillars {
    align-items: flex-start;
    text-align: left;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .navbar { padding: 0 16px; }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(34, 23, 58, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 20px;
    letter-spacing: 0.15em;
    padding: 8px 16px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), color 0.3s;
  }

  .nav-links.open .nav-link {
    opacity: 1;
    transform: none;
  }

  .nav-links.open .nav-link:nth-child(2) { transition-delay: 0.05s; }
  .nav-links.open .nav-link:nth-child(3) { transition-delay: 0.1s; }
  .nav-links.open .nav-link:nth-child(4) { transition-delay: 0.15s; }

  .nav-link--cta { padding: 12px 28px; }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    min-height: 0;
    padding: 128px 16px 88px;
  }

  .hero-badge { margin-bottom: 24px; }

  .hero-title .title-line {
    font-size: clamp(34px, 10.5vw, 50px);
  }

  .hero-subtitle { margin-bottom: 32px; }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .scroll-indicator { display: none; }

  .services,
  .apps,
  .about {
    padding: 72px 16px;
  }

  .section-header { margin-bottom: 40px; }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .service-card { padding: 24px 20px; }

  .phone-frame {
    width: 180px;
    height: 360px;
  }

  .about-code-block { font-size: 11px; }
  .code-content { padding: 14px 14px; }

  .about-stats {
    gap: 8px;
  }

  .stat { padding: 14px 6px; }
  .stat-number { font-size: 22px; }
  .stat-label { font-size: 10px; letter-spacing: 0.04em; }

  .contact { padding: 24px 16px 80px; }

  .contact-card { padding: 40px 20px; }

  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* --- Scroll Reveal (classes added by main.js) --- */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal--stagger {
  transition-delay: calc(var(--i, 0) * 90ms);
}

.reveal.revealed {
  opacity: 1;
  transform: none;
}

/* Hover transforms must not fight the reveal transition */
.service-card.reveal.revealed {
  transition: opacity 0.8s var(--ease-out), transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
}

/* --- Legal Modals --- */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}

.legal-modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 20, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-container {
  position: relative;
  width: 90%;
  max-width: 720px;
  max-height: 85vh;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-card));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 120px rgba(255, 255, 255, 0.02);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.4s var(--ease-out);
}

.legal-modal.open .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.modal-close {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.2);
  color: var(--red);
}

.modal-body {
  padding: 24px 32px 32px;
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.12);
}

.modal-updated {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.modal-body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cyan);
  margin-top: 28px;
  margin-bottom: 12px;
}

.modal-body h3:first-of-type {
  margin-top: 0;
}

.modal-body h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 8px;
}

.modal-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}

.modal-body ul {
  list-style: none;
  padding: 0;
  margin-bottom: 12px;
}

.modal-body ul li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  padding-left: 20px;
  position: relative;
  margin-bottom: 4px;
}

.modal-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  opacity: 0.5;
}

.modal-body ul li strong {
  color: var(--text-primary);
}

/* Modal mobile: bottom sheet */
@media (max-width: 640px) {
  .legal-modal {
    align-items: flex-end;
  }

  .modal-container {
    width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
  }

  .legal-modal.open .modal-container {
    transform: translateY(0);
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-body {
    padding: 16px 20px 32px;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
    transition-delay: 0s !important;
  }
}
