/* Substrate landing — color scheme adapted from smashlabs.com */

:root {
  --bg:            #07000d;
  --bg-alt:        #0d0018;
  --bg-surface:    #130020;
  --purple:        #8b2be2;
  --purple-bright: #a855f7;
  --purple-pale:   #c084fc;
  --glow:          rgba(168, 85, 247, 0.25);
  --glow-strong:   rgba(168, 85, 247, 0.45);
  --text:          rgba(255, 255, 255, 0.87);
  --text-muted:    rgba(255, 255, 255, 0.45);
  --text-faint:    rgba(255, 255, 255, 0.28);
  --border:        rgba(139, 43, 226, 0.22);
  --border-hover:  rgba(168, 85, 247, 0.5);
  --mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 2rem clamp(1.25rem, 4vw, 4rem);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand-mark {
  color: var(--purple-bright);
  font-weight: 500;
}

.brand-name {
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 56rem;
  margin: 0 auto;
  width: 100%;
  padding: 4rem 0;
}

.tagline {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem 0;
  color: #fff;
  text-shadow: 0 0 60px rgba(168, 85, 247, 0.18);
}

.sub {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  letter-spacing: 0.01em;
  margin: 0 0 3rem 0;
  max-width: 32rem;
}

/* Email form */

.email-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 32rem;
  border: 1px solid var(--border);
  background: rgba(13, 0, 24, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.email-form:focus-within {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 1px var(--border-hover), 0 0 32px var(--glow);
}

.email-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 1rem 1.25rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.email-input::placeholder {
  color: var(--text-faint);
}

.email-submit {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border);
  color: var(--purple-bright);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: none;
  padding: 0 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 200ms ease, color 200ms ease;
}

.email-submit:hover,
.email-submit:focus-visible {
  background: rgba(168, 85, 247, 0.08);
  color: var(--purple-pale);
  outline: none;
}

.email-submit .caret {
  display: inline-block;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.email-submit[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.email-status {
  margin-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  min-height: 1.2em;
  color: var(--text-muted);
  transition: color 200ms ease;
}

.email-status.is-success { color: var(--purple-pale); }
.email-status.is-error   { color: #ff7a7a; }

.foot {
  display: flex;
  align-items: center;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  padding-top: 2rem;
}

.foot-spacer { flex: 1; }

@media (max-width: 540px) {
  .email-form {
    flex-direction: column;
  }
  .email-submit {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 0.85rem 1.25rem;
    justify-content: center;
  }
  .foot { flex-direction: column; gap: 0.4rem; align-items: flex-start; }
  .foot-spacer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .email-submit .caret { animation: none; }
}
