/*
  SPDX-FileCopyrightText: 2026 Alomera
  SPDX-License-Identifier: LicenseRef-Proprietary
  ABOUTME: Styles for the stealth landing page: dark, minimal, typographic.
  ABOUTME: Self-hosted Sorts Mill Goudy; no external assets.
*/

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

:root {
  --bg: #0b0b0c;
  --fg: #ededea;
  --muted: #8a8a86;
  --line: #2a2a2c;
  --accent: #ededea;
  --error: #d9a07a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Sorts Mill Goudy", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

main {
  width: 100%;
  max-width: 28rem;
}

h1 {
  margin: 0;
  font-size: clamp(3.5rem, 13vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
}

p {
  margin: 1rem 0 3rem;
  color: var(--muted);
  font-size: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The field is a single rule under the address; the rule brightens on focus. */
.row {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  transition: border-color 0.3s;
}

.row:focus-within {
  border-color: var(--muted);
}

input[type="email"],
button {
  font: inherit;
  background: transparent;
  color: var(--fg);
  border: 0;
  border-radius: 0;
  padding: 0.25rem 0;
}

input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  outline: none;
}

input[type="email"]::placeholder {
  color: var(--muted);
}

/* The submit arrow stays faint until the address is valid. */
button {
  flex: 0 0 auto;
  display: flex;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.2s;
}

button svg {
  width: 1.5em;
  height: 1.5em;
  stroke-width: 1.5;
}

input[type="email"]:valid + button,
button:hover {
  opacity: 1;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

form {
  display: flex;
  flex-direction: column;
}

/* Reserves one line so a message never changes the height of the page. */
.status {
  margin: 1rem 0 0;
  min-height: 1.5em;
  color: var(--muted);
  font-size: 1.125rem;
}

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

/* After a successful signup the fields keep their space but are not shown,
   and the status line moves to the top. The form height does not change. */
form.sent label,
form.sent .row {
  visibility: hidden;
}

form.sent .status {
  order: -1;
  margin: 0 0 1rem;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

input[name="_gotcha"] {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
