/* ============================================================
   Shashank Mishra — Phase 1 Landing Page
   Tokens from specs/DESIGN.md — mobile-first, no frameworks
   ============================================================ */

:root {
  /* Colors */
  --brand-primary: #39E879;
  --brand-primary-bright: #00FF66;
  --brand-primary-soft: #18B957;
  --brand-glow: rgba(57, 232, 121, 0.28);
  --bg: #020503;
  --bg-soft: #050A07;
  --surface: rgba(7, 16, 11, 0.78);
  --surface-strong: rgba(8, 18, 12, 0.92);
  --text-main: #F5F7F6;
  --text-muted: #B7BDBA;
  --text-subtle: #747C77;
  --border: rgba(255, 255, 255, 0.16);
  --border-green: rgba(57, 232, 121, 0.62);
  --divider: rgba(255, 255, 255, 0.10);
  --btn-text: #001507;

  /* Spacing scale (4px base) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px; --s30: 120px;

  /* Radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;

  /* Shadows */
  --shadow-glow: 0 0 32px rgba(57, 232, 121, 0.18);
  --shadow-glow-strong: 0 0 48px rgba(57, 232, 121, 0.28);
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.30);

  /* Motion */
  --m-fast: 180ms; --m-normal: 300ms; --m-slow: 600ms;
  --m-ticker: 28s linear infinite;

  /* Type */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --content-w: calc(100% - 48px);
}

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

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.landing-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 72% 42%, rgba(57, 232, 121, 0.08), transparent 32%),
    var(--bg);
}

/* ---------- Header ---------- */
.site-header {
  width: var(--content-w);
  max-width: 1320px;
  margin: 0 auto;
  height: 56px;
  margin-top: var(--s4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 10px rgba(57, 232, 121, 0.7);
  flex-shrink: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.header-cta {
  display: none;
  align-items: center;
  gap: var(--s2);
  height: 52px;
  padding: 0 var(--s6);
  background: var(--brand-primary);
  color: var(--btn-text);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: background var(--m-fast) ease, box-shadow var(--m-fast) ease, transform var(--m-fast) ease;
}
.header-cta .icon-arrow { width: 18px; height: 18px; transition: transform var(--m-fast) ease; }
.header-cta:hover { background: var(--brand-primary-bright); box-shadow: var(--shadow-glow); }
.header-cta:hover .icon-arrow { transform: translateX(4px); }
.header-cta:active { transform: translateY(1px); }

/* ---------- Hero ---------- */
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.hero {
  width: var(--content-w);
  max-width: 1320px;
  margin: 0 auto;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--s10);
}

.hero-content {
  display: contents;
}

.availability-badge {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  height: 40px;
  padding: 0 var(--s4);
  border: 1px solid var(--border-green);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--brand-primary);
  box-shadow: 0 0 24px rgba(57, 232, 121, 0.10);
}

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand-primary);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(57, 232, 121, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(57, 232, 121, 0); }
}

.hero-title {
  order: 2;
  margin-top: var(--s8);
  font-size: clamp(29px, 8vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.hero-title .line { display: block; white-space: nowrap; }
.hero-title .accent { color: var(--brand-primary); }

.hero-description {
  order: 3;
  margin-top: var(--s6);
  max-width: 600px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- Lead form ---------- */
.lead-form {
  order: 5;
  width: 100%;
  max-width: 560px;
  margin-top: var(--s10);
}

.lead-fields {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.input-wrap {
  position: relative;
  width: 100%;
}
.icon-mail {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  color: var(--text-subtle);
  pointer-events: none;
}
.input-wrap input {
  width: 100%;
  height: 58px;
  padding: 0 18px 0 48px;
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 15px;
  transition: border-color var(--m-fast) ease, box-shadow var(--m-fast) ease;
}
.input-wrap input::placeholder { color: var(--text-subtle); }
.input-wrap input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(57, 232, 121, 0.12);
}
.lead-form.form-error .input-wrap input { border-color: rgba(255, 99, 99, 0.7); }

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  width: 100%;
  height: 58px;
  padding: 0 var(--s6);
  background: var(--brand-primary);
  color: var(--btn-text);
  border: none;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: background var(--m-fast) ease, box-shadow var(--m-fast) ease, transform var(--m-fast) ease, opacity var(--m-fast) ease;
}
.cta-button .icon-arrow { width: 20px; height: 20px; transition: transform var(--m-fast) ease; }
.cta-button:hover { background: var(--brand-primary-bright); box-shadow: var(--shadow-glow); }
.cta-button:hover .icon-arrow { transform: translateX(4px); }
.cta-button:active { transform: translateY(1px); }
.cta-button:disabled { opacity: 0.5; box-shadow: none; cursor: not-allowed; }

.form-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin-top: var(--s4);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-subtle);
}
.icon-lock { width: 14px; height: 14px; }

.form-message {
  min-height: 20px;
  margin-top: var(--s2);
  font-size: 13px;
  font-weight: 500;
}
.form-message.is-error { color: #ff8a8a; }
.form-message.is-success { color: var(--brand-primary); }

/* ---------- Hero visual / portrait system ---------- */
.hero-visual {
  order: 4;
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-top: var(--s8);
}

.visual-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.bg-glow {
  position: absolute;
  left: 50%; top: 42%;
  width: 120%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(57, 232, 121, 0.11), transparent 60%);
  filter: blur(20px);
}

.bg-ring {
  position: absolute;
  left: 50%; top: 44%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.ring-1 { width: 92%; aspect-ratio: 1; border: 1px solid rgba(57, 232, 121, 0.22); }
.ring-2 { width: 118%; aspect-ratio: 1; border: 1px solid rgba(57, 232, 121, 0.10); }
.ring-3 {
  width: 76%; aspect-ratio: 1;
  border: 1px dotted rgba(57, 232, 121, 0.35);
  animation: spin 48s linear infinite;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.bg-dots {
  position: absolute;
  left: -6%; top: 8%;
  width: 46%; height: 64%;
  background-image: radial-gradient(rgba(57, 232, 121, 0.4) 1.2px, transparent 1.8px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%);
  opacity: 0.65;
}

.particle {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--brand-primary);
  opacity: 0.55;
  animation: drift 9s ease-in-out infinite;
}
.p1 { left: 8%;  top: 34%; animation-delay: 0s; }
.p2 { left: 90%; top: 18%; animation-delay: -2s; opacity: 0.35; }
.p3 { left: 96%; top: 56%; animation-delay: -4s; }
.p4 { left: 4%;  top: 72%; animation-delay: -6s; opacity: 0.3; }
.p5 { left: 72%; top: 6%;  animation-delay: -3s; opacity: 0.45; }
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.sparkle {
  position: absolute;
  width: 12px; height: 12px;
  opacity: 0.7;
  background: var(--brand-primary);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: twinkle 3.4s ease-in-out infinite;
}
.s1 { left: 22%; top: 12%; }
.s2 { left: 88%; top: 78%; animation-delay: -1.7s; transform: scale(0.7); }
@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.8; }
}

.portrait {
  position: relative;
  z-index: 2;
  width: 78%;
  margin: 0 auto;
}

/* ---------- Capability cards ---------- */
.capability-cards {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
  margin-top: -56px;
  padding-bottom: var(--s2);
}

.capability-card {
  background: var(--surface);
  border: 1px solid var(--border-green);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  padding: 10px;
  text-align: left;
  min-width: 0;
}

.card-icon {
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-green);
  border-radius: 50%;
  color: var(--brand-primary);
  margin-bottom: var(--s2);
}
.card-icon svg { width: 14px; height: 14px; }

.card-title {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.card-title .accent { color: var(--brand-primary); }

.card-rule {
  display: block;
  width: 22px; height: 2px;
  background: var(--brand-primary);
  border-radius: 2px;
  margin: 6px 0;
}

.card-desc {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ---------- Tech stack marquee ---------- */
.tech-stack {
  width: var(--content-w);
  max-width: 1320px;
  margin: var(--s12) auto 0;
  flex-shrink: 0;
}

.tech-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s5);
  text-align: left;
}

.tech-marquee {
  position: relative;
  overflow: hidden;
  padding: var(--s4) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.tech-marquee::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(57, 232, 121, 0.75) 30%, rgba(57, 232, 121, 0.75) 70%, transparent);
  filter: drop-shadow(0 0 10px rgba(57, 232, 121, 0.65));
  pointer-events: none;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.tech-marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding-right: var(--s4);
}

.tech-chip {
  width: 56px; height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-main);
}
.tech-chip svg { width: 24px; height: 24px; fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer {
  width: var(--content-w);
  max-width: 1320px;
  margin: var(--s8) auto 0;
  border-top: 1px solid var(--divider);
  flex-shrink: 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  padding: var(--s5) 0;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-brand .brand-name { font-size: 13px; }
.footer-sep { display: none; }
.footer-copy { font-size: 13px; }

/* ============================================================
   Tablet 768px – 1023px
   ============================================================ */
@media (min-width: 768px) {
  :root { --content-w: calc(100% - 64px); }

  .site-header { height: 64px; margin-top: var(--s4); justify-content: space-between; }
  .header-cta { display: inline-flex; }

  .hero { padding-top: var(--s16); }
  .hero-title { font-size: clamp(40px, 6vw, 52px); letter-spacing: -0.03em; line-height: 1.06; }
  .hero-description { font-size: 18px; }

  .lead-fields { flex-direction: row; }
  .input-wrap { flex: 1 1 300px; }
  .cta-button { width: auto; flex: 0 0 auto; padding: 0 var(--s8); }
  .form-note { justify-content: flex-start; }

  .hero-visual { max-width: 640px; }
  .capability-cards { gap: var(--s4); }
  .capability-card { padding: var(--s4); }
  .card-icon { width: 36px; height: 36px; margin-bottom: var(--s3); }
  .card-icon svg { width: 18px; height: 18px; }
  .card-title { font-size: 15px; }
  .card-desc { font-size: 12px; }

  .tech-chip { width: 60px; height: 60px; }

  .footer-inner { flex-direction: row; justify-content: center; gap: var(--s4); }
  .footer-sep { display: inline; color: var(--text-subtle); }
}

/* ============================================================
   Desktop >= 1024px
   ============================================================ */
@media (min-width: 1024px) {
  :root { --content-w: calc(100% - 120px); }

  .site-header { height: 64px; margin-top: var(--s4); }

  .hero {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--s8);
    padding-top: 0;
    min-height: max(520px, calc(100vh - 460px));
  }

  .hero-content {
    display: block;
    flex: 0 0 50%;
    max-width: 50%;
  }

  .hero-title { font-size: clamp(48px, 4.4vw, 64px); letter-spacing: -0.035em; line-height: 1.15; margin-top: var(--s8); }
  .hero-description { font-size: 20px; line-height: 1.55; max-width: 560px; margin-top: var(--s6); }
  .lead-form { margin-top: var(--s8); }
  .form-note { justify-content: flex-start; }

  .hero-visual {
    flex: 1 1 auto;
    max-width: none;
    margin-top: 0;
    align-self: center;
    height: 100%;
    min-height: 600px;
  }

  .visual-bg { overflow: visible; }

  .portrait {
    width: min(560px, 92%);
    margin-left: auto;
    margin-right: 2%;
    margin-top: 0;
  }

  .capability-cards {
    position: absolute;
    inset: 0;
    display: block;
    margin-top: 0;
    padding-bottom: 0;
  }

  .capability-card {
    position: absolute;
    width: 220px;
    padding: var(--s5);
  }
  .card-title { font-size: 17px; }
  .card-desc { font-size: 13px; line-height: 1.55; }
  .card-icon { width: 40px; height: 40px; margin-bottom: var(--s4); }
  .card-icon svg { width: 20px; height: 20px; }

  .card-experience { left: -5%; top: 6%; animation: card-float 7s ease-in-out infinite; }
  .card-agentic { right: -1%; top: 14%; animation: card-float 7s ease-in-out -2.3s infinite; }
  .card-scale { left: 1%; top: 46%; animation: card-float 7s ease-in-out -4.6s infinite; }

  @keyframes card-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }

  .tech-stack { margin-top: var(--s4); }
  .tech-chip { width: 64px; height: 64px; }
  .tech-chip svg { width: 26px; height: 26px; }

  .footer-inner { justify-content: flex-start; padding: var(--s6) 0; }
}

/* Wide desktop: keep the same compact hero rhythm */
@media (min-width: 1440px) {
  .hero { min-height: max(560px, calc(100vh - 460px)); }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; flex-wrap: nowrap; }
  .tech-marquee { overflow-x: auto; }
}
