/* ═══════════════════════════════════════════════════
   Rta Labs — Visual System
   Institutional dark · Restrained · Precise
   ═══════════════════════════════════════════════════ */

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

:root {
  --bg-0: #060608;
  --bg-1: #0B0B10;
  --bg-2: #111118;
  --bg-3: #1A1A22;
  --border: #1A1A28;
  --border-hover: #2A2A3C;
  --text-1: #E2E2EA;
  --text-2: #8A8A9C;
  --text-3: #585868;
  --accent: #5B7FFF;
  --accent-soft: rgba(91,127,255,0.07);
  --accent-med: rgba(91,127,255,0.18);
  --error: #E25B5B;
  --success: #5BE2A0;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;
  --container: 1200px;
  --gutter: 40px;
  --section-pad: 128px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-2);
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--accent-med); color: var(--text-1); }

/* ── Typography ── */
h1,h2,h3,h4 { font-family: var(--font-display); color: var(--text-1); line-height: 1.12; text-wrap: balance; }
a { color: inherit; text-decoration: none; }

/* ── Utilities ── */
.container { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); width: 100%; }
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.section-head { font-size: 40px; font-weight: 600; margin-bottom: 20px; letter-spacing: -0.02em; }
.section-sub { font-size: 17px; color: var(--text-2); max-width: 600px; line-height: 1.7; }

/* ── Layout ── */
#root {
  position: relative;
  z-index: 1;
}

/* ── Canvas ── */
#hero-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ── Navigation ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 var(--gutter);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6,6,8,0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo-mark {
  color: var(--accent);
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-1);
  letter-spacing: 0.1em;
}
.nav-logo-text span {
  font-weight: 400;
  color: var(--text-3);
}
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.01em;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-1); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--text-2);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed; inset: 0;
  z-index: 99;
  background: rgba(6,6,8,0.96);
  backdrop-filter: blur(24px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 500;
  color: var(--text-2);
  transition: color 0.3s;
}
.mobile-nav a:hover { color: var(--text-1); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  background: transparent;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg,
    rgba(6,6,8,0.92) 0%,
    rgba(6,6,8,0.7) 35%,
    rgba(6,6,8,0.25) 65%,
    rgba(6,6,8,0.1) 100%);
  z-index: 1;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(transparent, var(--bg-0));
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 660px; }
.hero-label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--text-1) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-2);
  margin-bottom: 24px;
  font-weight: 400;
  line-height: 1.5;
}
.hero-body {
  font-size: 15px;
  color: var(--text-3);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 40px;
}
.hero-ctas {
  display: flex; gap: 16px; flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  padding: 13px 32px;
  border-radius: 2px;
  border: none; cursor: pointer;
  transition: all 0.3s var(--ease);
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--text-1);
  color: var(--bg-0);
}
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text-1); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* ── Sections ── */
.section {
  position: relative;
  background: var(--bg-0);
  padding: var(--section-pad) 0;
}
.section-alt { background: var(--bg-1); }
.section-divider {
  width: 100%;
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Platform ── */
.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 48px;
}
.platform-text { font-size: 16px; line-height: 1.8; color: var(--text-2); }
.platform-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.platform-feat {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color 0.3s;
}
.platform-feat:hover { border-color: var(--border-hover); }
.platform-feat h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: var(--font-display);
}
.platform-feat p { font-size: 13px; color: var(--text-3); line-height: 1.6; }

/* ── Agent Cards ── */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.agent-card {
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color 0.4s, background 0.4s;
  position: relative;
}
.agent-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-2);
}
.agent-card-status {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}
.agent-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
}
.agent-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulse 2.5s ease-out infinite;
}
.agent-card-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.agent-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.agent-card p { font-size: 14px; line-height: 1.7; color: var(--text-3); }

/* ── Capability Cards ── */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.cap-card {
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color 0.4s, background 0.4s;
}
.cap-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-2);
}
.cap-icon {
  width: 32px; height: 32px;
  margin-bottom: 20px;
  color: var(--accent);
  opacity: 0.7;
}
.cap-card h3 {
  font-size: 17px; font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.cap-card p { font-size: 13px; line-height: 1.7; color: var(--text-3); }

/* ── Principle ── */
.principle {
  text-align: center;
  padding: 160px 0;
}
.principle h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.principle-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-3);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── India Section ── */
.india { text-align: center; }
.india h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.india p {
  font-size: 16px;
  color: var(--text-3);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ── Contact Form ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
  margin-top: 48px;
}
.contact-info h3 {
  font-size: 24px; font-weight: 600;
  margin-bottom: 16px;
}
.contact-info p { font-size: 15px; color: var(--text-3); line-height: 1.75; max-width: 380px; }
.contact-info-meta {
  margin-top: 40px;
  display: flex; flex-direction: column; gap: 12px;
}
.contact-info-meta span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.form-label .optional { color: var(--text-3); opacity: 0.5; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.form-input,
.form-textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-3); opacity: 0.6; }
.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-input.error,
.form-textarea.error { border-color: var(--error); }
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-error { font-size: 12px; color: var(--error); margin-top: 2px; }
.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
}
.form-success {
  text-align: center;
  padding: 60px 20px;
}
.form-success-icon {
  width: 48px; height: 48px;
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  color: var(--success);
}
.form-success h3 {
  font-size: 22px; font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-1);
}
.form-success p { font-size: 15px; color: var(--text-3); }

/* Turnstile */
.turnstile-wrap { flex-shrink: 0; }

/* ── Footer ── */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-0);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-1);
  letter-spacing: 0.06em;
}
.footer-tagline {
  font-size: 13px;
  color: var(--text-2);
}
.footer-meta {
  display: flex; align-items: center; gap: 24px;
  font-size: 12px; color: var(--text-2);
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-social a {
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}
.footer-social a:hover,
.footer-social a:focus-visible {
  color: var(--text-1);
  outline: none;
}

/* ── Nav right group ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Theme Toggle ── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  transition: color 0.3s, border-color 0.3s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Scroll reveal */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-animate][data-delay="1"] { transition-delay: 0.1s; }
[data-animate][data-delay="2"] { transition-delay: 0.2s; }
[data-animate][data-delay="3"] { transition-delay: 0.3s; }
[data-animate][data-delay="4"] { transition-delay: 0.4s; }

/* ── Light Mode ── */
[data-theme="light"] {
  --bg-0: #F7F7FA;
  --bg-1: #EEEEF4;
  --bg-2: #E3E3EC;
  --bg-3: #D8D8E2;
  --border: #CBCBD8;
  --border-hover: #B0B0C2;
  --text-1: #0E0E18;
  --text-2: #4A4A62;
  --text-3: #7A7A92;
  --accent: #3B5FD9;
  --accent-soft: rgba(59,95,217,0.06);
  --accent-med: rgba(59,95,217,0.14);
  --error: #D94444;
  --success: #2EA66E;
}
[data-theme="light"] .hero::before {
  background: linear-gradient(115deg,
    rgba(247,247,250,0.95) 0%,
    rgba(247,247,250,0.78) 35%,
    rgba(247,247,250,0.3) 65%,
    rgba(247,247,250,0.1) 100%);
}
[data-theme="light"] .hero::after {
  background: linear-gradient(transparent, var(--bg-0));
}
[data-theme="light"] .nav.scrolled {
  background: rgba(247,247,250,0.85);
}
[data-theme="light"] .mobile-nav {
  background: rgba(247,247,250,0.97);
}
[data-theme="light"] .mobile-nav a {
  color: var(--text-2);
}
[data-theme="light"] .mobile-nav a:hover {
  color: var(--text-1);
}
[data-theme="light"] .nav-hamburger span {
  background: var(--text-2);
}
[data-theme="light"] .hero h1 em {
  background: linear-gradient(135deg, var(--text-1) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .principle h2 em {
  background: linear-gradient(135deg, var(--text-1) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --section-pad: 96px; --gutter: 32px; }
  .section-head { font-size: 34px; }
  .platform-grid { grid-template-columns: 1fr; gap: 40px; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  :root { --section-pad: 72px; --gutter: 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .section-head { font-size: 28px; }
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 17px; }
  .hero-body { font-size: 14px; }
  .agents-grid { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.half { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-meta { flex-direction: column; gap: 8px; }
  .footer-meta .footer-social { gap: 18px; }
  .principle { padding: 96px 0; }
  .principle h2 { font-size: 32px; }
  .platform-features { grid-template-columns: 1fr; }
}
