/* ============================================================
   Technobi, app studio. Single-page stylesheet.
   Art direction: Mission manifest. Gridded, instrument-panel
   discipline on a deep midnight base, warmed by signal orange
   and instrument cyan. Re-skin via the :root tokens below.
   ============================================================ */

:root {
  /* Color */
  --midnight:   #0B1020;
  --surface:    #121A30;
  --surface-2:  #18223D;
  --hairline:   rgba(255, 255, 255, 0.10);
  --hairline-2: rgba(255, 255, 255, 0.16);
  --text:       #EAEEF7;
  --text-muted: #9AA6C0;
  --accent:     #FF7A45;   /* signal orange, primary */
  --accent-2:   #34E0D0;   /* instrument cyan, secondary */
  --live:       #4ADE80;   /* shipped */
  --standby:    #F5B544;   /* on the pad */

  /* Type families */
  --font-display: "Sora", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Fluid type scale */
  --fs-display: clamp(2.75rem, 5.5vw + 1rem, 5.75rem);
  --fs-h2:      clamp(2rem, 3vw + 0.75rem, 3.5rem);
  --fs-h3:      clamp(1.25rem, 0.8vw + 1rem, 1.5rem);
  --fs-body:    clamp(1rem, 0.35vw + 0.9rem, 1.125rem);
  --fs-label:   0.72rem;

  /* Spacing scale (rem on 16px root) */
  --s-1: 0.25rem; --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;
  --s-6: 1.5rem;  --s-8: 2rem;    --s-12: 3rem;   --s-16: 4rem;
  --s-24: 6rem;   --s-32: 8rem;   --s-40: 10rem;
  --section-pad: clamp(4rem, 8vw, 8rem);

  /* Layout */
  --container: 1200px;
  --container-wide: 1320px;
  --pad-x: clamp(1.25rem, 5vw, 4rem);
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  background: var(--midnight);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, dl { list-style: none; padding: 0; }

/* ===== Shared ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.section { padding-block: var(--section-pad); }
.section__head { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-top: var(--s-3);
}
.section__lead {
  margin-top: var(--s-4);
  color: var(--text-muted);
  max-width: 54ch;
}

.panel {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}

/* ===== Accessibility ===== */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 1000;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--hairline);
  padding: 12px 18px;
  border-radius: 10px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease;
}
.btn--primary {
  background: var(--accent);
  color: #1A0A03;
  font-weight: 500;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 122, 69, 0.32);
}
.btn--ghost {
  background: transparent;
  border-color: var(--hairline-2);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  box-shadow: 0 0 0 1px rgba(52, 224, 208, 0.3), 0 8px 26px rgba(52, 224, 208, 0.12);
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  padding-block: 0.875rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}
.brand__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  margin-inline: auto;
}
.nav__links > a:not(.btn) {
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  padding: 0.5rem 0;
}
.nav__links > a:not(.btn):hover { color: var(--text); }
.nav__cta { margin-left: auto; }
.nav__cta-mobile { display: none; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--hairline-2);
  border-radius: 12px;
  cursor: pointer;
}
.nav__toggle span {
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 88vh;
  min-height: 88svh;
  display: flex;
  align-items: center;
  padding-block: clamp(7rem, 14vw, 10rem) var(--section-pad);
  overflow: hidden;
}
.hero__starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
}
.hero::after {
  /* soft instrument glow, single hue, kept subtle */
  content: "";
  position: absolute;
  top: -10%; left: 50%;
  width: min(900px, 90vw);
  height: 560px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(52, 224, 208, 0.10), transparent 70%);
  z-index: 0;
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero__eyebrow { margin-bottom: var(--s-6); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.hero__subhead {
  margin-top: var(--s-6);
  max-width: 60ch;
  color: var(--text-muted);
  font-size: var(--fs-body);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-8);
}

/* Telemetry strip */
.telemetry {
  display: flex;
  flex-wrap: wrap;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
}
.telemetry__item {
  flex: 1 1 160px;
  padding: var(--s-4) var(--s-6);
  border-left: 1px solid var(--hairline);
}
.telemetry__item:first-child { border-left: 0; }
.telemetry__item dt {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.telemetry__item dd {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  color: var(--accent-2);
  margin-top: var(--s-2);
  font-variant-numeric: tabular-nums;
}

/* ===== Fleet ===== */
.fleet__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--s-6);
}
.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-6);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}
.app-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(52, 224, 208, 0.5), transparent);
  opacity: 0.6;
}
@media (hover: hover) and (pointer: fine) {
  .app-card:hover {
    border-color: color-mix(in srgb, var(--accent-2) 45%, var(--hairline));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 26px rgba(52, 224, 208, 0.10);
  }
}
.app-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.app-card__icon {
  width: 64px; height: 64px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--surface);
  flex-shrink: 0;
}
.app-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
}
.app-card__category {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-top: var(--s-1);
}
.app-card__desc {
  color: var(--text-muted);
  font-size: 0.975rem;
  flex-grow: 1;
}
.app-card__pkg {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.7;
  word-break: break-all;
}
.app-card__divider {
  height: 1px;
  background: var(--hairline);
  margin-block: var(--s-1);
}

/* Status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  white-space: nowrap;
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pill--live { color: var(--live); }
.pill--live .pill__dot {
  background: var(--live);
  box-shadow: 0 0 10px var(--live);
  animation: pulse 2.4s ease-in-out infinite;
}
.pill--soon { color: var(--standby); }
.pill--soon .pill__dot { background: var(--standby); box-shadow: 0 0 10px var(--standby); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.app-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.95rem;
  align-self: flex-start;
}
.app-card__action--live {
  background: var(--accent);
  color: #1A0A03;
  transition: transform 0.18s ease, box-shadow 0.25s ease;
}
@media (hover: hover) and (pointer: fine) {
  .app-card__action--live:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255, 122, 69, 0.3);
  }
}
.app-card__action--soon {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--accent-2) 40%, transparent);
  color: var(--accent-2);
  cursor: not-allowed;
}

/* ===== Why ===== */
.why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-6);
}
.why__item { padding: var(--s-6); }
.why__icon {
  display: inline-flex;
  width: 48px; height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  color: var(--accent-2);
  margin-bottom: var(--s-4);
}
.why__icon svg { width: 24px; height: 24px; }
.why__item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  margin-bottom: var(--s-2);
}
.why__item p { color: var(--text-muted); font-size: 0.975rem; }

/* ===== Studio ===== */
.studio__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 768px) {
  .studio__grid { grid-template-columns: 1.1fr 0.9fr; }
}
.studio__body { margin-top: var(--s-6); color: var(--text-muted); }
.studio__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
  padding: var(--s-6);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}
.studio__stat {
  border-top: 1px solid var(--hairline);
  padding-top: var(--s-4);
}
.studio__stat dt {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.studio__stat dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--accent);
  margin-top: var(--s-2);
  font-variant-numeric: tabular-nums;
}
.studio__note {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ===== Contact band ===== */
.contact {
  background: var(--surface);
  border-block: 1px solid var(--hairline);
  padding-block: var(--section-pad);
  text-align: center;
}
.contact__inner { max-width: 720px; }
.contact .section__title { margin-inline: auto; }
.contact__lead { margin: var(--s-4) auto 0; color: var(--text-muted); max-width: 48ch; }
.contact__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-6);
  align-items: center;
  justify-content: center;
  margin-top: var(--s-8);
}
.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  color: var(--accent-2);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.contact__link:hover { border-bottom-color: var(--accent-2); }

/* ===== Footer ===== */
.footer {
  background: var(--midnight);
  border-top: 1px solid var(--hairline);
  padding-block: var(--s-12);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr auto auto;
    text-align: left;
  }
}
.footer__brand { display: flex; flex-direction: column; gap: var(--s-2); align-items: center; }
@media (min-width: 768px) { .footer__brand { align-items: flex-start; } }
.footer__tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-2);
  opacity: 0.75;
}
.footer__links {
  display: flex;
  gap: var(--s-6);
  justify-content: center;
}
.footer__links a { color: var(--text-muted); font-weight: 500; transition: color 0.2s ease; }
.footer__links a:hover { color: var(--text); }
.footer__play { color: var(--accent-2); font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.footer__copy {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 0.84rem;
  border-top: 1px solid var(--hairline);
  padding-top: var(--s-6);
}

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Mobile nav ===== */
@media (max-width: 767.98px) {
  .nav__cta { display: none; }
  .nav__toggle { display: flex; margin-left: auto; }
  .nav__links {
    position: fixed;
    inset: 0 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 6rem var(--pad-x) 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--hairline);
    transform: translateY(-110%);
    transition: transform 0.35s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
  .nav.is-open .nav__links { transform: translateY(0); }
  .nav__links > a:not(.btn) {
    padding: 1rem 0;
    font-size: 1.15rem;
    color: var(--text);
    border-bottom: 1px solid var(--hairline);
  }
  .nav__cta-mobile {
    display: inline-flex;
    width: 100%;
    margin-top: var(--s-6);
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .pill__dot { animation: none !important; }
}
