/* ===== Tokens ===== */
:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-tint: #f2f0ea;
  --text: #14171b;
  --muted: #5b6169;
  --border: #e7e4db;
  --accent: #2e5cff;
  --accent-ink: #1330a6;
  --accent-soft: #e8edff;
  --ring: rgba(46, 92, 255, 0.35);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --font-display: "Outfit", "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;

  --shadow-sm: 0 1px 2px rgba(20, 23, 27, 0.06);
  --shadow-md: 0 12px 32px -12px rgba(20, 23, 27, 0.18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --surface: #16191d;
    --surface-tint: #1c2025;
    --text: #edeff2;
    --muted: #9aa1ab;
    --border: rgba(255, 255, 255, 0.09);
    --accent: #6f8fff;
    --accent-ink: #dbe3ff;
    --accent-soft: rgba(111, 143, 255, 0.14);
    --ring: rgba(111, 143, 255, 0.35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 20px 48px -16px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

.muted { color: var(--muted); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

.btn-invert {
  background: #ffffff;
  color: #14171b;
}
.btn-invert:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 72px;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a { color: var(--muted); transition: color 0.15s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ===== Hero ===== */
.hero {
  padding: 56px 0 96px;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4vw;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  max-width: 14ch;
}
.hero-sub {
  margin-top: 1.25rem;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.55;
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
}
.phone-backdrop {
  position: absolute;
  top: -8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, 96vw);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  z-index: 0;
}
.phone-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.phone-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(10,12,15,0.35), rgba(10,12,15,0.88) 72%);
}
.phone-stage .phone {
  position: relative;
  z-index: 1;
}
.phone-float {
  z-index: 2;
}
.phone {
  width: min(300px, 78vw);
  aspect-ratio: 9 / 19;
  border-radius: 42px;
  background: linear-gradient(165deg, #1a1d22, #0a0c0f);
  padding: 12px;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--border);
  position: relative;
}
.phone::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: #05060a;
  z-index: 2;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(175deg, var(--accent-soft), var(--surface) 55%);
  padding: 46px 16px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-content: start;
}
.app-icon {
  aspect-ratio: 1;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.05rem;
}
.phone-float {
  position: absolute;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.phone-float.top { top: 6%; left: -6%; }
.phone-float.bottom { bottom: 10%; right: -8%; }
.phone-float i { color: var(--accent); font-size: 1.1rem; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .phone-stage { margin-top: 3rem; }
  .hero h1 { max-width: none; }
}

/* ===== Logo strip ===== */
.logo-strip { padding: 40px 0 80px; }
.logo-strip-label {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}
.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.stack-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.stack-chip i { font-size: 1.1rem; color: var(--accent); }

/* ===== Section shells ===== */
section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 3.5rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  margin-top: 0.5rem;
}
.section-head p {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 52ch;
}

/* ===== Bento ===== */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 220px;
  gap: 1.25rem;
}
.bento-cell {
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  border: 1px solid var(--border);
}
.cell-body { position: relative; z-index: 2; }
.bento-cell h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.bento-cell p { color: var(--muted); font-size: 0.95rem; max-width: 34ch; }
.bento-cell .cell-icon {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.bento-1 { grid-column: span 4; grid-row: span 2; background: var(--surface); }
.bento-2 { grid-column: span 2; grid-row: span 2; background: linear-gradient(160deg, var(--accent), #17337f); color: #fff; }
.bento-2 h3, .bento-2 p { color: #fff; }
.bento-2 p { opacity: 0.85; }
.bento-2 .cell-icon { background: rgba(255,255,255,0.18); color: #fff; }
.bento-3 { grid-column: span 3; grid-row: span 1; background: var(--surface); }
.bento-4 { grid-column: span 3; grid-row: span 1; background: var(--surface-tint); }

.bento-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.bento-photo img { width: 100%; height: 100%; object-fit: cover; }
.bento-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,12,15,0.85), rgba(10,12,15,0.2) 60%);
}
.bento-1 h3, .bento-1 p { position: relative; z-index: 2; color: #fff; }
.bento-1 .cell-icon { position: relative; z-index: 2; background: rgba(255,255,255,0.16); color: #fff; }
.bento-1 p { opacity: 0.85; }

@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-cell { grid-column: span 1 !important; grid-row: span 1 !important; min-height: 220px; }
}

/* ===== Process ===== */
.process-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.process-step {
  border-top: 2px solid var(--border);
  padding-top: 1.5rem;
}
.process-step .num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent-soft);
  -webkit-text-stroke: 1.5px var(--accent);
  color: transparent;
  line-height: 1;
}
.process-step h3 { margin-top: 0.75rem; font-size: 1.2rem; }
.process-step p { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }

@media (max-width: 860px) {
  .process-rail { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .process-rail { grid-template-columns: 1fr; }
}

/* ===== Lab / upcoming apps ===== */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.lab-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.lab-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.lab-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.lab-photo img { width: 100%; height: 100%; object-fit: cover; }
.lab-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8,10,13,0.92), rgba(8,10,13,0.35) 55%, rgba(8,10,13,0.55));
}
.lab-icon {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  flex-shrink: 0;
}
.lab-body { position: relative; z-index: 2; }
.lab-card h3 { font-size: 1.15rem; color: #fff; }
.lab-card p { color: rgba(255,255,255,0.75); font-size: 0.92rem; margin-top: 0.4rem; }
.badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.16);
  color: #fff;
  backdrop-filter: blur(6px);
}

@media (max-width: 860px) {
  .lab-grid { grid-template-columns: 1fr; }
}

/* ===== About / mission ===== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4vw;
  align-items: center;
}
.about-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); line-height: 1.2; }
.about-body { margin-top: 1.25rem; color: var(--muted); font-size: 1.05rem; max-width: 50ch; }
.about-stats {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-stat-inline {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.about-stat-inline .stat-num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
}
.about-stat-inline .stat-label {
  font-size: 0.82rem;
  color: var(--muted);
}
.values {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.value-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.value-row i { color: var(--accent); font-size: 1.25rem; margin-top: 0.15rem; }
.value-row h4 { font-size: 1rem; }
.value-row p { color: var(--muted); font-size: 0.92rem; margin-top: 0.2rem; }

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
}

/* ===== Contact CTA ===== */
.cta {
  background: linear-gradient(150deg, #101319, #1a2036 55%, #17337f);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 4rem clamp(1.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
}
.cta h2 { color: #fff; font-size: clamp(1.9rem, 3vw, 2.5rem); max-width: 14ch; }
.cta p { color: rgba(255,255,255,0.72); margin-top: 1rem; max-width: 42ch; }
.cta-actions { margin-top: 2rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }
.cta-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  align-self: start;
}
.cta-card dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.55); }
.cta-card dd { margin: 0.25rem 0 1.25rem; font-size: 0.98rem; }
.cta-card dd:last-child { margin-bottom: 0; }
.cta-card dd a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.35); }
.cta-card dd a:hover { text-decoration-color: #fff; }

@media (max-width: 860px) {
  .cta { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
footer { padding: 64px 0 40px; border-top: 1px solid var(--border); }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
}
.footer-brand p { margin-top: 1rem; color: var(--muted); font-size: 0.92rem; max-width: 36ch; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 1rem; }
.footer-col a, .footer-col p { display: block; font-size: 0.92rem; color: var(--text); margin-bottom: 0.65rem; }
.footer-col a:hover { color: var(--accent-ink); }
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
  display: flex;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Mobile menu ===== */
.mobile-menu {
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--bg);
  z-index: 39;
  display: flex;
  flex-direction: column;
  padding: 2rem 24px;
  gap: 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
