/* Exosphera — black, fast, weightless */

:root {
  --bg: #000000;
  --fg: #f4f4f4;
  --dim: #9a9a9a;
  --accent: #6ea8ff;
  --max: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px 12vh;
  overflow: hidden;
}

.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(24px, 5vw, 64px);
}

.nav__logo {
  color: var(--fg);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.35em;
  font-size: 15px;
}

.nav__links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-left: 32px;
  transition: color .25s ease;
}
.nav__links a:hover { color: var(--fg); }

.nav__switch {
  display: inline-flex;
  align-items: center;
  margin-left: 32px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.15em;
  vertical-align: middle;
}

.nav__switch-active {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

.nav__switch .nav__switch-link {
  margin-left: 0;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--dim);
  font-size: 11px;
}
.nav__switch .nav__switch-link:hover { color: var(--fg); }

@media (max-width: 480px) {
  .nav__logo { letter-spacing: 0.22em; font-size: 13px; }
  .nav__links a { margin-left: 18px; font-size: 11px; letter-spacing: 0.12em; }
}

.hero__media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  opacity: 0;
  animation: fade-in 2.2s ease .3s forwards;
}

@keyframes fade-in { to { opacity: 1; } }

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none; /* enabled by JS once the video actually loads */
}

.hero__canvas {
  width: min(72vmin, 640px);
  height: min(72vmin, 640px);
  margin-bottom: 10vh;
}

.hero__tagline {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: clamp(28px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.12;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(24px);
  animation: rise 1.2s cubic-bezier(.2,.7,.2,1) .9s forwards;
  text-shadow: 0 0 60px rgba(0,0,0,.85);
}

@keyframes rise { to { opacity: 1; transform: none; } }

.hero__scrollhint {
  position: relative;
  z-index: 2;
  margin-top: 5vh;
  color: var(--dim);
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50%      { transform: translateY(8px); opacity: 1; }
}

/* ---------- Manifesto ---------- */

.manifesto {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(96px, 16vh, 200px) 24px;
}

.manifesto__line {
  font-size: clamp(26px, 4.2vw, 56px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin-bottom: clamp(40px, 6vh, 80px);
}

.manifesto__line:last-child { margin-bottom: 0; }

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

/* ---------- Pillars ---------- */

.pillars {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px clamp(96px, 14vh, 180px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
}

.pillar h3 {
  font-size: 14px;
  letter-spacing: 0.35em;
  color: var(--accent);
  margin-bottom: 16px;
}

.pillar p {
  color: var(--dim);
  line-height: 1.65;
  font-size: 16px;
}

/* ---------- Work ---------- */

.work {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px clamp(96px, 14vh, 180px);
}

.work h2, .contact h2 {
  font-size: 14px;
  letter-spacing: 0.35em;
  color: var(--dim);
  margin-bottom: 40px;
}

.work__item {
  border-top: 1px solid #1c1c1c;
  padding-top: 40px;
}

.work__item h3 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  margin-bottom: 12px;
}

.work__item p {
  color: var(--dim);
  line-height: 1.65;
  max-width: 640px;
}

/* ---------- Contact ---------- */

.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px clamp(120px, 18vh, 220px);
  text-align: left;
}

.cform {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
}

.cform__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.cform input,
.cform textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  transition: border-color .25s ease;
}

.cform input::placeholder,
.cform textarea::placeholder { color: #6a6a6a; }

.cform input:focus,
.cform textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.cform textarea { resize: vertical; min-height: 120px; }

.cform__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
}

.cform__submit {
  align-self: flex-start;
  border: 0;
  border-radius: 999px;
  padding: 15px 40px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.cform__submit:hover {
  transform: scale(1.04);
  box-shadow: 0 0 32px rgba(110, 168, 255, 0.35);
}

.cform__submit:disabled { opacity: .5; cursor: wait; transform: none; }

.cform__status { min-height: 1.4em; font-size: 14px; color: var(--dim); }
.cform__status.ok { color: var(--accent); }
.cform__status.err { color: #ff6e6e; }

.contact__note {
  margin-top: 20px;
  font-size: 13px;
  color: #6a6a6a;
  max-width: 640px;
  line-height: 1.6;
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px clamp(24px, 5vw, 64px);
  border-top: 1px solid #141414;
  color: #5a5a5a;
  font-size: 13px;
}

.footer a {
  color: #5a5a5a;
  text-decoration: none;
}
.footer a:hover { color: var(--fg); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__media, .hero__tagline { animation-duration: .01s; animation-delay: 0s; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .hero__scrollhint { animation: none; }
}
