/* ================================================
   AYUDANTE DIGITAL V2 — IMMERSIVE EXPERIENCE CSS
   Complete rewrite: fluid mobile, no snap, no overflow
   ================================================ */

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
  --bg-deep: #050a0e;
  --bg-surface: #0a1118;
  --bg-card: rgba(12, 20, 28, 0.65);
  --bg-glass: rgba(255, 255, 255, 0.025);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(0, 230, 167, 0.2);

  --c-primary: #00e6a7;
  --c-primary-rgb: 0, 230, 167;
  --c-primary-dim: rgba(0, 230, 167, 0.08);
  --c-secondary: #ff5e3a;
  --c-secondary-rgb: 255, 94, 58;
  --c-secondary-dim: rgba(255, 94, 58, 0.08);
  --c-accent: #ffd166;
  --c-accent-rgb: 255, 209, 102;
  --c-accent-dim: rgba(255, 209, 102, 0.08);

  --c-text: #e8ecf1;
  --c-text-secondary: #7a8ba3;
  --c-text-muted: #4a5568;

  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  --radius-sm: 0.75rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-pill: 100px;

  --header-h: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --safe-x: max(1rem, env(safe-area-inset-left));
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* NO scroll-snap anywhere */
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--c-text);
  background: var(--bg-deep);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-primary); border-radius: 2px; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 6vw, 5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 4.5vw, 3.5rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1rem, 1.6vw, 1.3rem); }

.gradient-text {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 50%, var(--c-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-primary { color: var(--c-primary) !important; }
.text-secondary { color: var(--c-secondary) !important; }
.text-accent { color: var(--c-accent) !important; }
.text-white { color: #fff !important; }
.text-green { color: #34d399 !important; }

/* ---------- GRAIN OVERLAY ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- LAYOUT ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--safe-x);
}

/* ==============================
   SLIDES (sections)
   ============================== */
.slide {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 8vh, 8rem) 0;
  /* NO min-height, NO scroll-snap */
}

/* Alternating subtle tints */
.slide:nth-child(even) {
  background: linear-gradient(180deg, rgba(var(--c-primary-rgb), 0.012) 0%, transparent 40%, transparent 60%, rgba(var(--c-secondary-rgb), 0.008) 100%);
}

.slide:nth-child(odd) {
  background: linear-gradient(180deg, transparent 0%, rgba(var(--c-accent-rgb), 0.008) 50%, transparent 100%);
}

.slide__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-glass);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 4rem);
  position: relative;
  z-index: 2;
  transition: box-shadow 0.6s var(--ease-out);
}

.slide__inner:hover {
  box-shadow: 0 0 80px rgba(var(--c-primary-rgb), 0.04);
}

/* Floating decorative orbs */
.float-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.float-orb--emerald { background: var(--c-primary); }
.float-orb--coral { background: var(--c-secondary); }
.float-orb--gold { background: var(--c-accent); }
.float-orb--violet { background: #8b5cf6; }

/* ==============================
   HEADER
   ============================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--safe-x);
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: rgba(5, 10, 14, 0.88);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom-color: var(--border-glass);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.header__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.header__nav {
  display: flex;
  gap: 2rem;
}

.header__nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-text-secondary);
  transition: color 0.3s;
  position: relative;
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  transition: width 0.3s var(--ease-out);
}

.header__nav a:hover { color: #fff; }
.header__nav a:hover::after { width: 100%; }

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.lang-btn {
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  color: var(--c-text-muted);
  transition: color 0.3s, background 0.3s;
  font-size: 0.75rem;
  font-weight: 600;
}

.lang-btn.active,
.lang-btn:hover {
  color: var(--c-primary);
  background: var(--c-primary-dim);
}

.lang-sep { color: var(--c-text-muted); font-size: 0.65rem; }

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  padding: 4px 0;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.is-open span:nth-child(2) { opacity: 0; }
.mobile-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5, 10, 14, 0.97);
  backdrop-filter: blur(30px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-menu.is-open { display: flex; }

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-text-secondary);
  transition: color 0.3s;
}

.mobile-menu a:hover { color: var(--c-primary); }

/* ==============================
   BUTTONS
   ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-pill);
  transition: all 0.4s var(--ease-out);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--c-primary), #00c890);
  color: #050a0e;
  box-shadow: 0 4px 20px rgba(var(--c-primary-rgb), 0.2);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(var(--c-primary-rgb), 0.3);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--c-text);
}

.btn--outline:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-dim);
}

.btn--whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.22);
}

.btn--whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.35);
}

.btn--ghost {
  background: rgba(255,255,255,0.05);
  color: var(--c-text);
  border: 1px solid var(--border-glass);
}

.btn--ghost:hover { background: rgba(255,255,255,0.1); }

/* ==============================
   HERO
   ============================== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 860px;
  padding: calc(var(--header-h) + 1rem) 1.25rem 2rem;
}

.hero__logo {
  width: clamp(90px, 16vw, 160px);
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(var(--c-primary-rgb), 0.18), 0 0 100px rgba(var(--c-primary-rgb), 0.06);
  animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* === FIXED-HEIGHT TYPED TITLE === */
.hero__title {
  /* Reserve space for exactly 2 lines so typing never shifts layout */
  height: 2.3em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.hero__typed {
  display: inline;
  border-right: 3px solid var(--c-primary);
  animation: blink 0.8s step-end infinite;
  /* Prevent overflow on narrow screens */
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes blink {
  50% { border-color: transparent; }
}

.hero__subtitle {
  font-size: clamp(0.92rem, 2vw, 1.25rem);
  color: var(--c-text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.hero__free {
  display: inline-block;
  font-weight: 500;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: var(--c-accent);
  margin-bottom: 1.5rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hero__instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--c-text-muted);
  transition: color 0.3s;
}

.hero__instagram:hover { color: #e1306c; }
.hero__instagram svg { width: 16px; height: 16px; }

.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: scrollBounce 2s ease-in-out infinite;
}

.hero__scroll svg {
  width: 24px;
  height: 24px;
  stroke: var(--c-text-muted);
  fill: none;
  stroke-width: 2;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ==============================
   GLASS CARD (BASE)
   ============================== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), border-color 0.5s, box-shadow 0.5s;
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 6px 40px rgba(var(--c-primary-rgb), 0.05);
}

/* 3D tilt card */
.tilt-card {
  transition: transform 0.15s ease-out, border-color 0.5s, box-shadow 0.5s;
  will-change: transform;
}

.tilt-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  transition: background 0.2s;
}

/* ==============================
   BADGES / TAGS
   ============================== */
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge--active { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.badge--dev { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.badge--research { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid;
}

.tag--cyan { color: #22d3ee; border-color: rgba(34, 211, 238, 0.2); background: rgba(34, 211, 238, 0.06); }
.tag--violet { color: #a78bfa; border-color: rgba(167, 139, 250, 0.2); background: rgba(167, 139, 250, 0.06); }
.tag--green { color: #34d399; border-color: rgba(52, 211, 153, 0.2); background: rgba(52, 211, 153, 0.06); }
.tag--blue { color: #60a5fa; border-color: rgba(96, 165, 250, 0.2); background: rgba(96, 165, 250, 0.06); }

/* ==============================
   PHILOSOPHY
   ============================== */
.philosophy__text {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.philosophy__text p {
  color: var(--c-text-secondary);
  margin-bottom: 1rem;
  font-size: clamp(0.88rem, 1.8vw, 1rem);
}

.quote-block {
  background: rgba(var(--c-primary-rgb), 0.04);
  border-left: 3px solid var(--c-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.4rem;
  font-style: italic;
  color: var(--c-text-secondary);
  margin: 1.2rem 0;
  font-size: clamp(0.85rem, 1.6vw, 0.95rem);
}

.philosophy__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.2rem;
}

.philosophy__image {
  max-width: 900px;
  margin: 2rem auto 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
}

/* ==============================
   ABOUT
   ============================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-grid img {
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
}

.about-grid p {
  color: var(--c-text-secondary);
  margin-bottom: 0.85rem;
  font-size: clamp(0.88rem, 1.6vw, 0.98rem);
}

.about-grid a {
  color: var(--c-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

/* ==============================
   TECH GRID
   ============================== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.tech-card {
  text-align: center;
  padding: 1.5rem 1rem;
}

.tech-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.tech-card h4 {
  color: var(--card-accent, #fff);
  margin-bottom: 0.3rem;
  font-size: 1rem;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.tech-card p {
  font-size: 0.82rem;
  color: var(--c-text-secondary);
  line-height: 1.5;
}

/* ==============================
   CAPABILITIES
   ============================== */
.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.capability-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cap-icon { font-size: 1.5rem; }

.capability-header h4 {
  color: var(--card-accent, var(--c-primary));
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
}

.capability-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  color: var(--c-text-secondary);
  font-size: 0.88rem;
}

.capability-list svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  stroke: var(--c-primary);
}

/* ==============================
   SERVICES
   ============================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.service-card {
  padding: 1.5rem;
}

.service-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.service-header svg {
  width: 24px;
  height: 24px;
  stroke: var(--card-accent, var(--c-primary));
  flex-shrink: 0;
}

.service-header h4 {
  color: var(--card-accent, #fff);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--c-text-secondary);
}

.service-list svg {
  width: 14px;
  height: 14px;
  stroke: var(--card-accent, var(--c-primary));
  flex-shrink: 0;
}

/* ==============================
   PROJECTS (HORIZONTAL SCROLL)
   ============================== */
.projects {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 6vh, 5rem) 0;
}

.projects__header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 var(--safe-x);
}

.projects__track-wrap {
  overflow: hidden;
}

.projects__track {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem clamp(1rem, 4vw, 4rem);
  will-change: transform;
}

.pcard {
  flex: 0 0 clamp(280px, 26vw, 380px);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.5s var(--ease-out), border-color 0.5s, box-shadow 0.5s;
}

.pcard:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--border-glow);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
}

.pcard__bar {
  height: 3px;
  background: var(--card-gradient, linear-gradient(to right, var(--c-primary), var(--c-accent)));
}

.pcard__body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pcard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.pcard__icon { font-size: 1.5rem; }

.pcard h4 {
  color: #fff;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.pcard p {
  font-size: 0.84rem;
  color: var(--c-text-secondary);
  flex: 1;
  margin-bottom: 0.75rem;
  line-height: 1.55;
}

.pcard__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--c-primary);
  font-weight: 600;
  font-size: 0.84rem;
  transition: gap 0.3s;
}

.pcard:hover .pcard__link { gap: 0.7rem; }

.pcard__link svg {
  width: 14px;
  height: 14px;
}

/* Progress bar */
.projects__progress {
  max-width: 250px;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  margin: 1.5rem auto 0;
  overflow: hidden;
}

.projects__progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--c-primary), var(--c-accent));
  border-radius: 3px;
  transition: width 0.1s;
}

/* Projects image */
.projects__image {
  max-width: 800px;
  margin: 2rem auto 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0,0,0,0.4);
  padding: 0 var(--safe-x);
}

.projects__image img { border-radius: var(--radius-xl); }

/* ==============================
   ONGOING PROJECTS
   ============================== */
.ongoing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.ongoing-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.ongoing-icon { font-size: 1.6rem; flex-shrink: 0; }

.ongoing-header h4 {
  margin-bottom: 0.25rem;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
}

.ongoing-desc {
  color: var(--c-text-secondary);
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.progress-wrap {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 5px;
  transition: width 1.5s var(--ease-out);
}

.progress-label {
  font-size: 0.75rem;
  color: var(--c-text-muted);
}

/* ==============================
   VALUES
   ============================== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.value-card {
  text-align: center;
  padding: 2rem 1.2rem;
}

.value-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.value-card h4 {
  color: #fff;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.value-card p {
  color: var(--c-text-secondary);
  font-size: 0.85rem;
}

/* ==============================
   QUOTE PARALLAX
   ============================== */
.quote-parallax {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(3rem, 6vh, 5rem) 0;
}

.quote-parallax__bg {
  position: absolute;
  inset: -30%;
  background: radial-gradient(ellipse at center, rgba(var(--c-primary-rgb), 0.05), transparent 60%),
              radial-gradient(ellipse at 30% 70%, rgba(var(--c-secondary-rgb), 0.03), transparent 50%);
  z-index: 0;
  will-change: transform;
}

.quote-parallax__text {
  position: relative;
  z-index: 2;
  max-width: 750px;
  padding: 0 var(--safe-x);
}

.quote-parallax__text h2 {
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.quote-author {
  color: var(--c-text-muted);
  font-size: 0.9rem;
}

/* ==============================
   PURPOSE BLOCK
   ============================== */
.purpose-block {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.purpose-block h3 { margin-bottom: 1.2rem; }

.purpose-block p {
  color: var(--c-text-secondary);
  margin-bottom: 0.85rem;
  font-size: clamp(0.86rem, 1.6vw, 0.95rem);
}

.purpose-block a {
  color: var(--c-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==============================
   CONTACT
   ============================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.step-num {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--c-primary), #00c890);
  color: #050a0e;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.step-text {
  color: var(--c-text-secondary);
  font-size: 0.9rem;
}

.contact-info h3 { margin-bottom: 1.2rem; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--c-text-secondary);
  transition: color 0.3s;
}

.contact-link:hover { color: var(--c-primary); }

/* Form */
.contact-form-wrap {
  max-width: 650px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--c-text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--c-text);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), 0.08);
}

.form-group textarea { resize: vertical; min-height: 110px; }

.form-submit { width: 100%; }

/* ==============================
   FOOTER
   ============================== */
.site-footer {
  border-top: 1px solid var(--border-glass);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--c-text-muted);
  font-size: 0.82rem;
}

/* ==============================
   MODALS
   ============================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 10, 14, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.modal-overlay.is-visible { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon svg { width: 28px; height: 28px; }

.modal-icon--success { background: rgba(52, 211, 153, 0.15); }
.modal-icon--success svg { stroke: #34d399; }
.modal-icon--error { background: rgba(239, 68, 68, 0.15); }
.modal-icon--error svg { stroke: #ef4444; }

.modal-box h3 { margin-bottom: 0.6rem; }
.modal-box p { color: var(--c-text-secondary); margin-bottom: 1.5rem; font-size: 0.9rem; }

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ==============================
   LOADING OVERLAY
   ============================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(5, 10, 14, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.loading-overlay.is-visible { opacity: 1; pointer-events: auto; }

.loading-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid var(--border-glass);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { color: var(--c-text-secondary); font-size: 0.9rem; }

.loading-bar-wrap {
  width: 180px;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 0;
  background: var(--c-primary);
  border-radius: 3px;
  animation: loadBar 3s ease-in-out forwards;
}

@keyframes loadBar { to { width: 100%; } }

/* ==============================
   WHATSAPP FLOAT
   ============================== */
.whatsapp-float {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 900;
  width: 52px;
  height: 52px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.45);
}

.whatsapp-float svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}


/* ==============================================================
   RESPONSIVE — TABLET (≤1024px)
   ============================================================== */
@media (max-width: 1024px) {
  .header__nav { display: none; }
  .header__actions .btn--outline { display: none; }
  .mobile-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .capabilities-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .ongoing-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ==============================================================
   RESPONSIVE — MOBILE (≤768px)
   Full fluid experience, no snap, no overflow
   ============================================================== */
@media (max-width: 768px) {
  :root {
    --header-h: 56px;
    --safe-x: 1rem;
    --radius-xl: 1.25rem;
    --radius-lg: 1rem;
  }

  /* Kill all min-height on slides — content flows naturally */
  .slide {
    padding: clamp(2.5rem, 5vh, 4rem) 0;
  }

  .slide__inner {
    margin: 0 0.75rem;
    width: auto;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    /* Allow content to flow, never clip text */
    overflow: visible;
  }

  /* === HERO mobile === */
  .hero {
    min-height: 100dvh;
    padding-bottom: 2rem;
  }

  .hero__content {
    padding: calc(var(--header-h) + 0.5rem) 1rem 1rem;
    max-width: 100%;
  }

  .hero__logo {
    width: 90px;
    margin-bottom: 1rem;
  }

  /* Typed title: smaller on mobile, still fixed height */
  .hero__title {
    height: 2.6em;
    margin-bottom: 0.75rem;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .hero__subtitle {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
  }

  .hero__free {
    font-size: 0.82rem;
    margin-bottom: 1rem;
  }

  .hero__ctas {
    gap: 0.6rem;
    margin-bottom: 1rem;
  }

  .hero__ctas .btn {
    width: 100%;
    max-width: 300px;
  }

  .hero__scroll svg {
    width: 20px;
    height: 20px;
  }

  /* === General headings === */
  h2 { font-size: clamp(1.5rem, 6vw, 2.2rem); }
  h3 { font-size: clamp(1.1rem, 4vw, 1.5rem); }
  h4 { font-size: clamp(0.95rem, 3vw, 1.1rem); }

  /* === Buttons === */
  .btn {
    font-size: 0.85rem;
    padding: 0.7rem 1.3rem;
  }

  /* === Philosophy === */
  .philosophy__text p {
    font-size: 0.88rem;
    text-align: left;
  }

  .philosophy__ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .philosophy__ctas .btn {
    width: 100%;
    text-align: center;
    white-space: normal;
    font-size: 0.82rem;
    padding: 0.7rem 1rem;
  }

  .philosophy__image {
    margin-top: 1.5rem;
    border-radius: var(--radius-lg);
  }

  /* === About grid mobile: stack === */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-grid p {
    font-size: 0.88rem;
  }

  .about-grid img {
    border-radius: var(--radius-lg);
  }

  /* === Tech grid: 2 columns, compact === */
  .tech-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .tech-card {
    padding: 1.2rem 0.8rem;
  }

  .tech-icon { font-size: 1.6rem; margin-bottom: 0.4rem; }

  .tech-card h4 {
    font-size: 0.9rem;
    word-break: normal;
    hyphens: none;
  }

  .tech-card p {
    font-size: 0.78rem;
  }

  /* === Capabilities === */
  .capabilities-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .capability-header h4 { font-size: 1rem; }
  .capability-list li { font-size: 0.85rem; }

  /* === Services === */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .service-card {
    padding: 1.2rem;
  }

  .service-header h4 { font-size: 1rem; }
  .service-list li { font-size: 0.84rem; }

  /* === Projects — VERTICAL CARDS on mobile === */
  .projects {
    padding: 2.5rem 0;
  }

  .projects__header {
    margin-bottom: 1.5rem;
  }

  .projects__track-wrap {
    overflow: visible;
  }

  .projects__track {
    /* Switch to vertical stack on mobile — no more horizontal scroll blocking */
    flex-direction: column;
    padding: 0 0.75rem;
    gap: 0.75rem;
    will-change: auto;
  }

  .pcard {
    flex: none;
    width: 100%;
  }

  .pcard__body {
    padding: 1.2rem;
  }

  .pcard h4 { font-size: 1rem; }
  .pcard p { font-size: 0.84rem; margin-bottom: 0.6rem; }

  /* Hide progress bar on mobile (not needed for vertical) */
  .projects__progress {
    display: none;
  }

  .projects__image {
    padding: 0 0.75rem;
    margin-top: 1.5rem;
  }

  /* === Ongoing === */
  .ongoing-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ongoing-header h4 { font-size: 0.95rem; }
  .ongoing-desc { font-size: 0.85rem; }

  /* === Values === */
  .values-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .value-card {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    text-align: left;
  }

  .value-icon {
    font-size: 1.8rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .value-card h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
  .value-card p { font-size: 0.82rem; }

  /* === Quote === */
  .quote-parallax {
    min-height: 40vh;
    padding: 2.5rem 0;
  }

  .quote-parallax__text h2 {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    line-height: 1.35;
  }

  .quote-author { font-size: 0.82rem; }

  /* === Purpose === */
  .purpose-block {
    padding: 1.2rem;
    border-radius: var(--radius-lg);
  }

  .purpose-block p {
    font-size: 0.86rem;
  }

  .purpose-block h3 {
    margin-bottom: 1rem;
  }

  /* === Contact === */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .step-num {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .step-text { font-size: 0.85rem; }

  .form-group input,
  .form-group textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: 0.7rem 0.9rem;
  }

  /* === Float orbs: smaller, dimmer === */
  .float-orb {
    max-width: 35vw;
    max-height: 35vw;
    opacity: 0.04;
    filter: blur(60px);
  }

  /* === Modals === */
  .modal-box {
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
  }

  /* === WhatsApp float === */
  .whatsapp-float {
    width: 48px;
    height: 48px;
    bottom: 1rem;
    right: 1rem;
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}


/* ==============================================================
   RESPONSIVE — SMALL MOBILE (≤400px)
   ============================================================== */
@media (max-width: 400px) {
  .slide__inner {
    margin: 0 0.5rem;
    padding: 1rem;
  }

  h1 { font-size: clamp(1.6rem, 9vw, 2.2rem); }

  .hero__title {
    height: 2.8em;
  }

  .tech-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .tech-card { padding: 1rem 0.6rem; }
  .tech-card h4 { font-size: 0.85rem; }
  .tech-card p { font-size: 0.75rem; }
}


/* ==============================
   REDUCED MOTION
   ============================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .hero__logo { animation: none; }
}
