/* ========================================
   🧬 ATOMS — Reset & Base
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  background: #0A0A0A;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body {
  font-family: 'Onest', system-ui, sans-serif;
  color: #F9F9F9;
  line-height: 1.6;
  overflow-x: hidden;
}

/* A4 notebook grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      0deg,
      oklch(from var(--accent) l c h / 0.035) 0px,
      oklch(from var(--accent) l c h / 0.035) 1px,
      transparent 1px,
      transparent 20px
    ),
    repeating-linear-gradient(
      90deg,
      oklch(from var(--accent) l c h / 0.035) 0px,
      oklch(from var(--accent) l c h / 0.035) 1px,
      transparent 1px,
      transparent 20px
    );
}

/* ========================================
   🧬 ATOMS — Design Tokens
   ======================================== */
:root {
  --bg: #0A0A0A;
  --bg-elevated: #111113;
  --headline: #F9F9F9;
  --body: #D4D4D8;
  --body-dim: #9B9DA0;
  /* Primary: deep teal (professional, accessible) */
  --accent: oklch(0.60 0.14 190);
  --accent-hover: oklch(0.48 0.16 190);
  --accent-muted: oklch(0.55 0.06 190);
  /* Secondary: keep cyan as technical accent */
  --cyan: #1AB4A4;
  --cyan-hover: #27D4D8;
  --cyan-deep: #195656;
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
}

/* ========================================
   📐 TEMPLATES — Layout
   ======================================== */
.section {
  padding: 5rem clamp(1.5rem, 5vw, 3rem);
  max-width: 1040px;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .section { padding: 2.5rem 1.25rem; }
}

/* ========================================
   🧬 ATOMS — Typography & Utilities
   ======================================== */
h1, h2, h3 { font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; color: var(--headline); }
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
p { color: var(--body); line-height: 1.65; text-wrap: pretty; }
.mono { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.text-accent { color: var(--accent); }
.text-white { color: var(--color-white); }
.text-dim { color: var(--body-dim); }

/* ========================================
   🔬 MOLECULES — Glass Card
   ======================================== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px) saturate(120%);
  transition: border-color 0.3s;
}
.glass-card:hover {
  border-color: oklch(from var(--accent) l c h / 0.3);
}

.card-icon { display: block; margin-bottom: 0.75rem; }

/* ========================================
   🔬 MOLECULES — Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: 'Onest', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.3s ease, opacity 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.btn-primary {
  background: var(--accent);
  color: #0A0A0A;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.2);
  color: var(--headline);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--accent);
  color: var(--accent);
}

/* ========================================
   🧠 ORGANISMS — Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem clamp(1.5rem, 5vw, 3rem);
  padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
  min-height: 56px;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled {
  background: rgba(10,10,10,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--body-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* ===== Language Select ===== */
.lang-select {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--body-dim);
  cursor: pointer;
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' fill='none'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%239B9DA0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  padding-right: 1.4rem;
}
.lang-select:hover { color: var(--accent); border-color: var(--accent); background-color: oklch(from var(--accent) l c h / 0.08); }
.lang-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lang-select option { background: #1a1a1a; color: #F9F9F9; }

/* ========================================
   🧬 ATOMS — Skip Link
   ======================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  background: var(--accent);
  color: #0A0A0A;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0.5rem; }

/* ========================================
   🧠 ORGANISMS — Hero
   ======================================== */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 3.5rem;
}
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 720px;
  width: 100%;
  min-width: 0;
  position: relative;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hero-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.6rem;
  border: 1px solid oklch(from var(--accent) l c h / 0.3);
  color: var(--accent);
}
.hero h1 .highlight {
  display: block;
  color: var(--accent);
  margin-top: 0.15em;
  transition: opacity 0.2s ease;
  min-height: 1.1em;
}
.hero h1 .highlight.is-hidden {
  opacity: 0;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--body-dim);
  max-width: 600px;
  line-height: 1.6;
  overflow-wrap: break-word;
}
.hero-sub strong {
  color: var(--headline);
  font-weight: 600;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ========================================
   🔬 MOLECULES — Bento Grid
   ======================================== */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .bento-grid { grid-template-columns: 1fr 1fr; }
}
.bento-wide {
  grid-column: 1 / -1;
}
.card-desc {
  color: var(--body-dim);
  margin-top: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ========================================
   🧬 ATOMS — Section Label
   ======================================== */
.section-label {
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* ========================================
   🧬 ATOMS — Screen-Reader Only
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   🧬 ATOMS — Focus
   ======================================== */
a:focus-visible, button:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 2px;
}

/* ========================================
   🔬 MOLECULES — Hamburger
   ======================================== */
.hamburger {
  display: none;
  position: relative;
  width: 28px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 102;
  -webkit-tap-highlight-color: transparent;
  color: var(--body-dim);
  touch-action: manipulation;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.hamburger.active span:nth-child(1),
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.active span:nth-child(2),
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3),
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ========================================
   🧠 ORGANISMS — Footer
   ======================================== */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2.5rem clamp(1.5rem, 5vw, 3rem);
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer p { font-size: 0.85rem; color: var(--body-dim); }
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--body-dim);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.footer-links a:hover { color: var(--accent); }

/* ========================================
   🧬 ATOMS — Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ========================================
   🧠 ORGANISMS — Mobile Menu (clip-path overlay)
   ======================================== */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(24px) saturate(140%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  --origin-x: right;
  --origin-y: top;
  clip-path: circle(0% at var(--origin-x) var(--origin-y));
  -webkit-clip-path: circle(0% at var(--origin-x) var(--origin-y));
  pointer-events: none;
  will-change: clip-path;
  transition: clip-path 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), -webkit-clip-path 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu.is-open {
  clip-path: circle(150% at var(--origin-x) var(--origin-y));
  -webkit-clip-path: circle(150% at var(--origin-x) var(--origin-y));
  pointer-events: all;
}

.mobile-menu-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.mobile-menu a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 2rem;
  color: var(--white);
  padding: 0.3rem 1rem;
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, opacity;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.3s, opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-decoration: none;
}

.mobile-menu.is-open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu a:hover {
  color: var(--accent);
}

.mobile-menu a:focus-visible {
  color: var(--white);
  outline: 1.5px solid var(--accent);
  outline-offset: 2px;
}

.mobile-menu a:active {
  transform: scale(0.92);
  color: var(--accent);
  opacity: 0.7;
}

.mobile-lang-select {
  font-family: var(--font-mono, monospace);
  font-size: 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--body-dim);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.2s;
  margin-top: 0.5rem;
}

.mobile-menu.is-open .mobile-lang-select {
  opacity: 1;
  transform: translateY(0);
}

.mobile-lang-select:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.mobile-lang-select:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 2px;
}

/* ========================================
   📐 TEMPLATES — Responsive
   ======================================== */
@media (max-width: 640px) {
  .nav { justify-content: flex-end; }
  .hamburger { display: flex; }
  .nav-links { display: none; }
  /* Mobile menu overlay replaces inline nav */
  .hero {
    padding-top: 2rem;
    min-height: 100dvh;
  }
  .hero-content {
    gap: 2.5rem;
  }
  .hero-tags {
    gap: 0.5rem;
  }
  .hero-tags span { font-size: 0.7rem; padding: 0.3rem 0.7rem; }
  .hero h1 {
    font-size: clamp(3.8rem, 13vw, 5rem);
    line-height: 1.0;
    margin-bottom: 0.2rem;
  }
  .hero h1 .highlight {
    font-size: 0.85em;
    margin-top: 0.05em;
  }
  .hero-sub {
    font-size: clamp(1.5rem, 5vw, 1.8rem);
    line-height: 1.4;
  }
  .hero-sub strong {
    display: block;
    margin-top: 0.15em;
  }
  .hero-actions {
    gap: 1rem;
    margin-top: 0.5rem;
  }
  .hero-actions .btn {
    font-size: 1.25rem;
    padding: 1rem 2rem;
  }
  .glass-card h3 { font-size: 1.3rem; }
}
@media (min-width: 641px) {
  .mobile-menu { display: none; }
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: white;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}
.whatsapp-float svg {
  width: 28px;
  height: 28px;
}
@media (max-width: 640px) {
  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }
  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}
