/* ============================================================================
   Strange Skies — coming-soon site
   Brand system mirrors apps/mobile/src/constants/theme.ts
   ========================================================================== */

:root {
  --night: #080808;
  --night-raised: #131313;
  --charcoal: #1a1a1a;
  --graphite: #30302e;
  --paper: #f1ede4;
  --paper-raised: #faf7f0;
  --paper-muted: #d7d1c7;
  --ink: #10100f;
  --muted: #aaa49b;
  --violet: #8b5cff;
  --ultraviolet: #a970ff;
  --magenta: #e95fcb;
  --blue: #668cff;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --radius-lg: 26px;

  /* Single content width so every section shares one left edge. */
  --content: 1120px;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
sup { font-size: 0.5em; vertical-align: super; }

/* ---------------------------------------------------------- shared bits */
.mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 500;
}

.coords {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--noise);
  background-size: 180px 180px;
  opacity: 0.16;
  pointer-events: none;
}

/* Sections that carry a grain layer must lift their content above it. */
.hero > *:not(.grain):not(.hero__ticks),
.casefile > *:not(.grain),
.curious > *:not(.grain) {
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--graphite);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  line-height: 0.92;
  letter-spacing: 0.04em;
}

.nav__logo { width: 28px; height: 28px; object-fit: contain; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.nav__links a { opacity: 0.85; transition: opacity 0.15s ease, color 0.15s ease; }
.nav__links a:hover { opacity: 1; color: var(--ultraviolet); }

.nav__cta {
  border: 1px solid var(--violet);
  color: var(--violet);
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav__cta:hover { background: var(--violet); color: var(--night); opacity: 1; }

/* ---------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 8vw, 110px) clamp(22px, 6vw, 96px);
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 38%, rgba(139, 92, 255, 0.16), transparent 70%),
    var(--night);
}

.hero__ticks {
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(241, 237, 228, 0.12);
  pointer-events: none;
  z-index: 0;
}

.hero .eyebrow { margin-bottom: 30px; font-size: 0.78rem; color: var(--muted); }

.hero__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.hero__title {
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: 0.01em;
  font-size: clamp(3rem, 13vw, 11.5rem);
  color: var(--paper);
}

.hero__line { display: block; }

.hero__star {
  flex-shrink: 0;
  width: clamp(76px, 12vw, 150px);
}

.hero__star img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 0 32px rgba(169, 112, 255, 0.55)) drop-shadow(0 0 76px rgba(139, 92, 255, 0.25));
}

.hero__tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: clamp(34px, 5vw, 54px);
}

.hero__bottom {
  display: grid;
  grid-template-columns: minmax(0, 560px) auto;
  align-items: end;
  gap: 24px 48px;
}

.hero__bottom .coords { padding-bottom: 14px; justify-self: end; }

/* ---------------------------------------------------------- capture form */
.capture { width: 100%; max-width: 560px; }

.capture__label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 12px;
}

.capture__row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.capture input {
  flex: 1;
  min-width: 0;
  font: 500 1rem var(--font-body);
  color: var(--paper);
  background: var(--night-raised);
  border: 1px solid var(--graphite);
  border-radius: 999px;
  padding: 15px 22px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.capture input::placeholder { color: #6a675f; }
.capture input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 255, 0.22); }

.capture button {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--violet);
  border: 1px solid var(--violet);
  border-radius: 999px;
  padding: 15px 26px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.capture button:hover { background: var(--ultraviolet); border-color: var(--ultraviolet); }
.capture button:active { transform: translateY(1px); }
.capture button:disabled { opacity: 0.6; cursor: default; }

.capture__msg { min-height: 1.4em; margin-top: 12px; font-size: 0.82rem; }
.capture__msg.success { color: #8ed3b0; }
.capture__msg.error { color: #ed7b78; }

/* ---------------------------------------------------------- marquee */
.marquee {
  overflow: hidden;
  background: var(--night);
  border-top: 1px solid var(--graphite);
  border-bottom: 1px solid var(--graphite);
  padding: 28px 0;
}

.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 60s linear infinite;
}

.marquee__track img {
  height: clamp(220px, 30vw, 340px);
  width: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--graphite);
  margin-right: 22px;
}

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

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------- sections */
section { position: relative; }

.section-head { max-width: var(--content); margin: 0 0 44px; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.01em;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  text-wrap: balance;
}
/* Keep "Observe /" and "Archive /" together so lines only break at the slashes. */
.section-head .seg { white-space: nowrap; }
.section-head .eyebrow { display: block; margin-bottom: 18px; }

.paper { background: var(--paper); color: var(--ink); }
.paper .eyebrow { color: #6a645b; }

/* ---------------------------------------------------------- pillars */
.pillars { padding: clamp(64px, 9vw, 120px) clamp(22px, 6vw, 96px); }

.pillar-grid {
  max-width: var(--content);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pillar {
  background: var(--paper-raised);
  border: 1px solid #d9d2c6;
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}

.pillar__num { font-size: 0.72rem; letter-spacing: 0.18em; color: #6e685e; margin-bottom: 26px; }

.pillar h3 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 14px;
}

.pillar p { color: #4b463f; font-size: 0.98rem; }

/* ---------------------------------------------------------- casefile */
.casefile {
  padding: clamp(64px, 9vw, 120px) clamp(22px, 6vw, 96px);
  background:
    radial-gradient(50% 40% at 80% 10%, rgba(102, 140, 255, 0.12), transparent 70%),
    var(--night);
}

.section-head--dark .eyebrow { color: var(--muted); }

.steps {
  max-width: var(--content);
  list-style: none;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px 26px;
  padding: 30px 0;
  border-top: 1px solid var(--graphite);
}
.step:last-child { border-bottom: 1px solid var(--graphite); }

.step__num { grid-column: 1; font-size: 0.78rem; letter-spacing: 0.16em; color: var(--violet); padding-top: 8px; }

.step h3 {
  grid-column: 2;
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1;
}

.step p { grid-column: 2; color: var(--muted); max-width: 640px; margin-top: 8px; }
.step .mono { color: var(--paper); }

/* ---------------------------------------------------------- app */
.app { padding: clamp(64px, 9vw, 120px) clamp(22px, 6vw, 96px); }

.app__lede { max-width: 640px; margin: -20px 0 44px; color: #4b463f; }

.app__frames {
  max-width: var(--content);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.frame img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid #cfc8bc;
  box-shadow: 0 24px 50px -30px rgba(16, 16, 15, 0.5);
}

.frame figcaption {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: #6a645b;
  margin-top: 12px;
}

/* ---------------------------------------------------------- curious */
.curious {
  padding: clamp(72px, 11vw, 150px) clamp(22px, 6vw, 96px);
  text-align: center;
  background:
    radial-gradient(50% 55% at 50% 30%, rgba(139, 92, 255, 0.16), transparent 70%),
    var(--night);
}

.curious__inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

.curious__star {
  width: clamp(64px, 10vw, 104px);
  margin: 0 auto 34px;
}
.curious__star img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 0 22px rgba(169, 112, 255, 0.5));
}

.curious h2 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.8rem, 9vw, 6.4rem);
  line-height: 0.9;
  text-wrap: balance;
}

.curious__lede { color: var(--muted); margin: 20px auto 40px; max-width: 520px; }

.capture--center { margin: 0 auto; }
.capture--center .capture__row { justify-content: center; }

/* ---------------------------------------------------------- footer */
.footer {
  border-top: 1px solid var(--graphite);
  padding: clamp(40px, 6vw, 72px) clamp(22px, 6vw, 96px) 48px;
  background: var(--night);
}

.footer__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

.footer__tag { font-size: 0.72rem; letter-spacing: 0.16em; color: var(--paper-muted); margin-bottom: 26px; }
.footer__legal { font-size: 0.66rem; letter-spacing: 0.14em; color: var(--muted); }
.footer__credit { font-size: 0.66rem; letter-spacing: 0.14em; color: var(--muted); margin-top: 6px; }
.footer__credit a { color: var(--paper-muted); border-bottom: 1px solid var(--graphite); transition: color 0.15s ease, border-color 0.15s ease; }
.footer__credit a:hover { color: var(--ultraviolet); border-color: var(--ultraviolet); }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .hero__main {
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
  }
  .hero__star { align-self: center; }
}

@media (max-width: 860px) {
  .nav { padding: 14px 18px; }
  .nav__links a:not(.nav__cta) { display: none; }

  .hero { padding-top: 76px; padding-bottom: 56px; }
  .hero .eyebrow { margin-bottom: 24px; }
  .hero__main { gap: 30px; margin-bottom: 30px; }
  .hero__title { font-size: clamp(3rem, 14vw, 4.8rem); }
  .hero__star { width: clamp(80px, 20vw, 120px); }
  .hero__tag { font-size: clamp(1.5rem, 5.5vw, 2rem); margin-bottom: 38px; }

  .hero__bottom { grid-template-columns: 1fr; }
  .hero__bottom .coords { justify-self: start; padding-bottom: 0; }

  .marquee__track img { height: 200px; }

  .pillars, .casefile, .app { padding-top: 64px; padding-bottom: 64px; }
  .section-head { margin-bottom: 34px; }
  .section-head h2 { font-size: clamp(1.9rem, 9vw, 3rem); }
  .casefile .section-head h2 { font-size: clamp(1.7rem, 8.5vw, 2.9rem); }

  .pillar-grid, .app__frames { grid-template-columns: 1fr; }
  .app__frames { max-width: 340px; margin: 0 auto; }
  .app__lede { margin-bottom: 34px; }

  .step { grid-template-columns: 44px 1fr; gap: 4px 16px; padding: 24px 0; }
  .step h3 { font-size: 1.85rem; }
  .step p { margin-top: 6px; }

  .curious { padding-top: 96px; padding-bottom: 96px; }
  .curious__lede { margin: 18px auto 32px; }

  .footer { padding-top: 48px; }
}

@media (max-width: 520px) {
  .nav__logo { width: 24px; height: 24px; }
  .nav__word { font-size: 0.85rem; }
  .nav__links { gap: 8px; }
  .nav__cta { padding: 8px 12px; font-size: 0.64rem; }

  .capture__row { flex-direction: column; }
  .capture button { width: 100%; }
  .capture input { padding: 15px 18px; }

  .hero__bottom .coords { font-size: 0.66rem; }
}
