/* ---------- Tokens ---------- */
:root {
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --color-bg: #000000;
  --color-text: #ffffff;
  --color-placeholder: #666666;
  --color-muted: rgba(255, 255, 255, 0.6);

  --space-gutter: 1.5rem;
}

/* Light pages (privacy): black text on white */
.theme-light {
  --color-bg: #ffffff;
  --color-text: #000000;
  --color-placeholder: #777777;
  color-scheme: light;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 14;
  line-height: 1.3;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  font-variation-settings: inherit;
}

a {
  color: inherit;
}

/* ---------- Signup page ---------- */
.signup-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 60px;
  /* Extra bottom padding lifts the group above centre; scales with screen height */
  padding: 4rem var(--space-gutter) calc(4rem + 14vh);
}

.symbol {
  width: 157.22px;
  height: 147px;
  object-fit: cover;
}

.intro {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.04em; /* -0.88px at 22px */
  text-align: center;
}

/* ---------- Signup form ---------- */
/* The form is a 60px-gap column: input row, then the note (or a status message in its place) */
.signup {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  width: 100%;
  max-width: 385px;
}

.signup-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.signup input[type="email"],
.signup button {
  height: 61px;
  border: 1px solid var(--color-text);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  font-size: 14px;
  letter-spacing: -0.04em; /* -0.56px at 14px */
  -webkit-appearance: none;
  appearance: none;
}

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0 23px;
}

/* 16px on touch devices keeps iOS from zooming the page on focus */
@media (pointer: coarse) {
  .signup input[type="email"] { font-size: 16px; }
}

.signup input[type="email"]::placeholder {
  color: var(--color-text);
  opacity: 1;
}

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

.signup button {
  flex: 0 0 101px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.signup button:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.signup button:disabled {
  opacity: 0.5;
  cursor: progress;
}

/* No extra ring on the email field: the caret and dimmed placeholder show focus */
.signup input[type="email"]:focus {
  outline: none;
}

.signup button:focus-visible {
  outline: 1px solid var(--color-text);
  outline-offset: 3px;
}

.signup-note,
.signup-status {
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.04em;
  text-align: center;
}

.signup-note,
.signup-note a {
  color: var(--color-placeholder);
}

.signup-note a {
  text-underline-offset: 2px;
}

.signup-note a:hover {
  color: var(--color-text);
}

/* Status messages take the note's place, so nothing shifts */
.signup-status {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.signup-status:empty { display: none; }
.signup-status:not(:empty) + .signup-note { visibility: hidden; }

/* After signing up, the thank-you replaces the input row */
.signup.is-done .signup-row { visibility: hidden; }
.signup.is-done .signup-status {
  top: 0;
  bottom: auto;
  height: 61px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Text pages (privacy) ---------- */
/*
 * Everything sits on a 20px line grid: one line height for text,
 * two blank lines after a paragraph, one blank line around the page header and footer.
 */
.text-page {
  --line: 20px;
  font-size: 14px;
  line-height: var(--line);
  letter-spacing: -0.02em;
}

.site-header {
  padding: 28px 40px var(--space-gutter);
  font-size: 14px;
  letter-spacing: -0.04em;
}

.text-page .site-header {
  padding: var(--line) 40px var(--line); /* + the content's top padding = two blank lines below the symbol */
  letter-spacing: inherit;
}

.site-header a {
  text-decoration: none;
}

/* Symbol in the header: three lines tall, so it stays on the 20px grid */
.site-symbol {
  display: inline-block;
  vertical-align: top;
}

.site-symbol img {
  width: auto;
  height: calc(var(--line, 20px) * 3); /* 60px */
}

.prose {
  width: 100%;
  max-width: calc(36rem + 80px);
  padding: var(--line) 40px calc(var(--line) * 2);
  color: var(--color-text);
}

.prose h1,
.prose h2 {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
}

/* Two blank lines after every paragraph */
.prose h2,
.prose p + p {
  margin-top: calc(var(--line) * 2);
}

.prose a {
  color: var(--color-text);
  text-underline-offset: 2px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--space-gutter) 40px 28px;
}


.site-footer {
  font-size: 14px;
  letter-spacing: -0.04em;
}

.text-page .site-footer {
  padding: 0 40px var(--line);
  letter-spacing: inherit;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Narrower side margins on phones */
@media (max-width: 40rem) {
  .site-header,
  .prose,
  .site-footer,
  .text-page .site-header,
  .text-page .site-footer { padding-left: var(--space-gutter); padding-right: var(--space-gutter); }
}

/* ---------- Utilities ---------- */
.visually-hidden,
.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
