/* === Font Faces === */
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* === Design Tokens === */
:root {
  --color-bg: #0a0e1a;
  --color-text-primary: #ffffff;
  --color-text-muted: #e0e0e0;
  --color-accent: #00d4ff;
  --color-error: #ff2d55;
  --color-success: #00ff94;
  --font-mono: "JetBrains Mono", monospace;
  --font-sans: "Inter", sans-serif;
}

/* === Reset === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
}

/* === Screen-reader only === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Hero === */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

/* === Terminal Line === */
.hero__terminal {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: var(--color-accent);
  margin-bottom: 2.5rem;
  min-height: 1.5em;
}

.hero__typewriter {
  white-space: pre;
}

.hero__cursor {
  display: inline-block;
}

/* === Content (hidden until animation reveals) === */
.hero__content {
  opacity: 0;
  max-width: 480px;
  width: 100%;
}

.hero__content[aria-hidden="false"] {
  opacity: 1;
}

/* === Logo === */
.hero__logo-wrap {
  margin-bottom: 1.5rem;
}

.hero__logo {
  max-width: 200px;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero__logo.visible {
  opacity: 1;
}

/* === Tagline === */
.hero__tagline {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero__tagline.visible {
  opacity: 1;
}

/* === Form === */
.hero__form {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero__form.visible {
  opacity: 1;
}

.hero__input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero__input {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text-primary);
  background: transparent;
  border: 1px solid var(--color-accent);
  padding: 0.875rem 1rem;
  border-radius: 0;
  outline: none;
  letter-spacing: 0.05em;
  width: 100%;
}

.hero__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.hero__input:focus {
  border-color: var(--color-text-primary);
  box-shadow: 0 0 0 1px var(--color-text-primary);
}

.hero__input.error {
  border-color: var(--color-error);
}

.hero__cta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-bg);
  background-color: var(--color-accent);
  border: none;
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.2s ease;
  width: 100%;
}

.hero__cta:hover {
  background-color: #33dfff;
}

.hero__cta:focus-visible {
  outline: 2px solid var(--color-text-primary);
  outline-offset: 2px;
}

.hero__cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === Form Status === */
.hero__status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
  letter-spacing: 0.05em;
}

.hero__status.success {
  color: var(--color-success);
}

.hero__status.error {
  color: var(--color-error);
}

/* === Desktop breakpoint === */
@media (min-width: 640px) {
  .hero__terminal {
    font-size: 1.5rem;
  }

  .hero__input-group {
    flex-direction: row;
  }

  .hero__input {
    flex: 1;
  }

  .hero__cta {
    width: auto;
    white-space: nowrap;
  }
}
