/* ==========================================================
   SaturnSpace — Monochrome design system
   Colors: pure black #000, near-black #0A0A0A, dark gray #1A1A1A,
   medium gray #777, light gray #D9D9D9, off-white #F5F5F5, white #FFF
   Type: Space Grotesk (display) / Inter (body)
   ========================================================== */

:root {
  --black: #000000;
  --near-black: #0A0A0A;
  --dark-gray: #1A1A1A;
  --mid-gray: #777777;
  --light-gray: #D9D9D9;
  --off-white: #F5F5F5;
  --white: #FFFFFF;

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  --container: 1180px;
  --nav-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--light-gray); max-width: 62ch; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--white);
  color: var(--black);
  padding: 12px 18px;
  z-index: 1000;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.eyebrow {
  display: inline-block;
  color: var(--mid-gray);
  font-size: 0.85rem;
  margin-bottom: 0.75em;
}

.section { padding: 120px 0; border-top: 1px solid var(--dark-gray); }
.section__title { font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 18ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--white);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  cursor: pointer;
}
.btn--primary { background: var(--white); color: var(--black); }
.btn--primary:hover { background: var(--light-gray); }
.btn--ghost { background: transparent; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--black); }
.btn--sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav.is-scrolled {
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--dark-gray);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.nav__logo { height: 28px; width: auto; filter: grayscale(100%); }
.nav__wordmark { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.02em; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { font-size: 0.92rem; color: var(--light-gray); transition: color 0.2s; }
.nav__links a:hover { color: var(--white); }
.nav__cta { flex-shrink: 0; }
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
}
.nav__toggle span { display: block; height: 1.5px; background: var(--white); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__video-wrap { position: absolute; inset: 0; background: var(--black); }
.hero-video {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%) contrast(110%);
}
.hero__fallback {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 30%, var(--dark-gray), var(--black) 70%);
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.92) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 24px 120px;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.hero__logo { height: 40px; width: auto; margin-bottom: 24px; filter: grayscale(100%); }
.hero__headline {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  color: var(--white);
  max-width: 16ch;
}
.hero__sub { color: var(--light-gray); font-size: 1.1rem; max-width: 48ch; }
.hero__actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

.hero__scroll-hint {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mid-gray);
  font-size: 0.8rem;
  writing-mode: vertical-rl;
}
.hero__scroll-line { width: 1px; height: 48px; background: var(--dark-gray); position: relative; }
.hero__scroll-line i {
  position: absolute; top: 0; left: -0.5px;
  width: 2px; height: 14px; background: var(--white);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { top: 0; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: calc(100% - 14px); opacity: 0; }
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
}
.about__lead { font-family: var(--font-display); font-size: 1.4rem; color: var(--white); max-width: 42ch; }
.about__list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  border-top: 1px solid var(--dark-gray);
  padding-top: 24px;
}
.about__list li {
  color: var(--light-gray);
  padding: 8px 0;
  border-bottom: 1px solid var(--dark-gray);
  font-size: 0.95rem;
}

/* ---------- Cards / Services ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--dark-gray);
  margin-top: 48px;
  border: 1px solid var(--dark-gray);
}
.card {
  background: var(--black);
  padding: 32px;
  transition: background 0.25s var(--ease);
}
.card:hover { background: var(--near-black); }
.card__icon { width: 36px; height: 36px; color: var(--white); margin-bottom: 20px; }
.card h3 { color: var(--white); font-size: 1.1rem; }
.card p { font-size: 0.92rem; margin-bottom: 0; }

/* ---------- AI section ---------- */
.ai { background: var(--near-black); }
.ai__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.ai__lead { color: var(--light-gray); font-size: 1.05rem; }
.ai__list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.ai__list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--dark-gray);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.95rem;
}

/* ---------- Process / Timeline ---------- */
.timeline {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
}
.timeline__step {
  border-top: 1px solid var(--dark-gray);
  padding-top: 20px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.timeline__step.is-visible { opacity: 1; transform: translateY(0); }
.timeline__num { font-family: var(--font-display); color: var(--mid-gray); font-size: 0.85rem; }
.timeline__step h3 { color: var(--white); margin: 8px 0 6px; font-size: 1.05rem; }
.timeline__step p { font-size: 0.9rem; margin: 0; }

/* ---------- Projects ---------- */
.filters { display: flex; gap: 10px; margin-top: 40px; flex-wrap: wrap; }
.filter {
  background: transparent;
  border: 1px solid var(--dark-gray);
  color: var(--light-gray);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.filter:hover { border-color: var(--mid-gray); color: var(--white); }
.filter.is-active { background: var(--white); color: var(--black); border-color: var(--white); }

.projects__grid { background: none; border: none; margin-top: 32px; }
.project-card {
  background: var(--near-black);
  border: 1px solid var(--dark-gray);
  overflow: hidden;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.project-card.is-hidden { display: none; }
.project-card__image {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--dark-gray), var(--near-black));
}
.project-card__body { padding: 24px; }
.project-card__category { color: var(--mid-gray); font-size: 0.78rem; }
.project-card__body h3 { color: var(--white); margin: 10px 0 6px; font-size: 1.1rem; }
.project-card__tech { font-size: 0.82rem; color: var(--mid-gray); margin-bottom: 16px; }
.project-card__link {
  font-size: 0.88rem;
  color: var(--white);
  border-bottom: 1px solid var(--mid-gray);
  padding-bottom: 2px;
}
.project-card__link:hover { border-color: var(--white); }

/* ---------- Why choose us ---------- */
.why__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--dark-gray);
  border: 1px solid var(--dark-gray);
}
.why__item { background: var(--black); padding: 28px; }
.why__item h3 { color: var(--white); font-size: 1rem; margin-bottom: 6px; }
.why__item p { font-size: 0.9rem; margin: 0; }

/* ---------- CTA ---------- */
.cta { text-align: center; background: var(--near-black); border-top: 1px solid var(--white); border-bottom: 1px solid var(--white); }
.cta__inner { max-width: 640px; margin: 0 auto; }
.cta h2 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta p { margin: 0 auto 32px; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.form__row { margin-bottom: 20px; display: flex; flex-direction: column; gap: 6px; }
.form label { font-size: 0.85rem; color: var(--light-gray); }
.form input, .form textarea {
  background: var(--near-black);
  border: 1px solid var(--dark-gray);
  color: var(--white);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: 2px;
  resize: vertical;
}
.form input:focus, .form textarea:focus { border-color: var(--white); outline: none; }
.form__error { color: var(--light-gray); font-size: 0.8rem; min-height: 1em; }
.form__error:not(:empty)::before { content: "⚠ "; }
.form__submit { margin-top: 8px; }
.form__status { margin-top: 16px; font-size: 0.9rem; min-height: 1em; }
.form__status.is-success { color: var(--white); }
.form__status.is-error { color: var(--light-gray); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--dark-gray); padding: 72px 0 24px; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--dark-gray);
}
.footer__logo { height: 26px; margin-bottom: 14px; filter: grayscale(100%); }
.footer__brand p { font-size: 0.88rem; max-width: 32ch; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__links a { color: var(--light-gray); font-size: 0.9rem; }
.footer__links a:hover { color: var(--white); }
.footer__contact p { font-size: 0.9rem; }
.footer__social { display: flex; gap: 16px; margin-top: 12px; }
.footer__social a { font-size: 0.85rem; color: var(--light-gray); border-bottom: 1px solid var(--dark-gray); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.8rem;
  color: var(--mid-gray);
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom a { color: var(--mid-gray); }
.footer__bottom a:hover { color: var(--white); }

/* ---------- Scroll reveal (generic) ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-video { display: none; }
  .hero__fallback { display: block !important; }
  .hero__scroll-line i { animation: none; opacity: 1; top: 0; }
  .timeline__step, .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }

  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--black);
    border-bottom: 1px solid var(--dark-gray);
    padding: 16px 24px 24px;
    gap: 18px;
  }

  .about__grid { grid-template-columns: 1fr; gap: 16px; }
  .about__list { grid-template-columns: 1fr; }
  .ai__grid { grid-template-columns: 1fr; }
  .ai__list { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .section { padding: 80px 0; }
  .timeline { grid-template-columns: 1fr; }
  .why__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__content { padding-bottom: 90px; }
  .hero__scroll-hint { display: none; }
}
