/* Logical Lifter — sign-up page. Tokens from brand/README.md (dark theme). */

/* Self-hosted fonts (SIL OFL, licences in assets/fonts/) */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/archivo-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/inter-latin-600-normal.woff2") format("woff2");
}

:root {
  --surface: #121212;
  --surface-raised: #1E1E1E;
  --line: #2E2E2E;
  --ink: #F2F2F2;
  --ink-muted: #A3A3A3;
  --hot-rod: #D7141E;
  --hot-rod-text: #FF4D52;
  --hot-rod-deep: #7A0A10;
  --chrome: #C9CCD1;

  --font-head: "Archivo", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1120px;
  --radius: 8px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--hot-rod-text); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Soft red glow behind the cover — the only large use of red. */
.glow {
  position: absolute;
  top: 80px;
  right: max(-200px, calc((100vw - var(--max)) / 2 - 220px));
  width: 820px;
  height: 820px;
  background: radial-gradient(closest-side, rgba(122, 10, 16, 0.55), rgba(122, 10, 16, 0.18) 55%, transparent);
  pointer-events: none;
  z-index: 0;
}

.site-header,
.hero,
.note,
.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header */
.site-header { padding-top: 28px; padding-bottom: 8px; }
.logo { display: inline-block; }
.logo img { height: 40px; width: auto; }

/* Hero: text left, cover right on wide screens */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-areas:
    "intro cover"
    "body  cover";
  grid-template-rows: auto 1fr;
  column-gap: 64px;
  padding-top: 56px;
  padding-bottom: 72px;
}
.hero-intro { grid-area: intro; }
.hero-body  { grid-area: body; }
.cover      { grid-area: cover; align-self: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--hot-rod-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--hot-rod);
  box-shadow: 0 0 10px rgba(215, 20, 30, 0.7);
}

h1 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.3rem, 4.6vw + 0.6rem, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin: 22px 0 0;
  max-width: 34em;
  color: var(--ink-muted);
  font-size: 1.15rem;
}

/* Cover */
.cover { margin: 0; justify-self: center; width: 100%; max-width: 400px; }
.cover img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  transform: rotate(1.5deg);
}

/* Bullets */
.bullets {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.bullets li {
  position: relative;
  padding-left: 26px;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.62em;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 2px solid var(--hot-rod);
}
.bullets strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
}
.bullets span { color: var(--ink-muted); }

/* Form */
.signup { margin-top: 36px; max-width: 520px; }

.signup-fields {
  display: flex;
  gap: 10px;
}
.signup .formkit-field { flex: 1 1 auto; min-width: 0; }

.formkit-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: var(--surface-raised);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px; /* stops iOS zooming in */
  transition: border-color 0.2s ease;
}
.formkit-input::placeholder { color: #6E6E6E; }
.formkit-input:focus {
  outline: none;
  border-color: var(--hot-rod);
  box-shadow: 0 0 0 3px rgba(215, 20, 30, 0.25);
}

.formkit-submit {
  position: relative;
  flex: 0 0 auto;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--hot-rod);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.2s ease;
}
.formkit-submit:hover { background: #E31D27; }
.formkit-submit:active { background: var(--hot-rod-deep); }
.formkit-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.formkit-submit > span { display: block; transition: opacity 0.2s ease; }

/* Kit's loading state: it sets data-active on the button while sending. */
.formkit-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.formkit-spinner > div {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: ll-bounce 1.4s infinite ease-in-out both;
}
.formkit-spinner > div:nth-child(1) { animation-delay: -0.32s; }
.formkit-spinner > div:nth-child(2) { animation-delay: -0.16s; }
.formkit-submit[data-active] .formkit-spinner { opacity: 1; }
.formkit-submit[data-active] > span { opacity: 0; }
@keyframes ll-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Kit's messages (errors and the success message it swaps in) */
.formkit-alert {
  list-style: none;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-raised);
  font-size: 15px;
}
.formkit-alert:empty { display: none; }
.formkit-alert-error { border-color: var(--hot-rod-deep); color: var(--hot-rod-text); }
.formkit-alert-success {
  border-color: var(--line);
  border-left: 3px solid var(--hot-rod);
  color: var(--ink);
  font-size: 16px;
  padding: 16px 18px;
}

.fine-print {
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.powered-by {
  display: inline-block;
  margin-top: 6px;
  color: #6E6E6E;
  font-size: 12px;
  text-decoration: none;
}
.powered-by:hover { color: var(--ink-muted); }

/* "Why I wrote this" note */
.note { padding-bottom: 72px; }
.note > * { max-width: 640px; }
.note-label {
  margin: 0 0 10px;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.note p { margin: 0; font-size: 1.1rem; }
.note .sign {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
}
.note::before {
  content: "";
  display: block;
  max-width: 100%;
  height: 1px;
  background: var(--line);
  margin-bottom: 56px;
}

/* Footer */
.site-footer {
  padding-top: 28px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  color: var(--ink-muted);
  font-size: 14px;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: var(--line);
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { color: var(--ink-muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }
.site-footer .legal { flex-basis: 100%; font-size: 13px; color: #6E6E6E; }

/* Tablet and phone: stack, cover sits between the intro and the bullets */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "cover"
      "body";
    grid-template-rows: auto;
    padding-top: 32px;
    padding-bottom: 56px;
  }
  .cover { max-width: 300px; margin-top: 36px; }
  .glow { top: 280px; right: 50%; transform: translateX(50%); width: 600px; height: 600px; }
  .signup { max-width: none; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .site-header { padding-top: 20px; }
  .logo img { height: 34px; }
  .hero-intro h1 { font-size: 2.15rem; }
  .cover { max-width: 210px; margin-top: 28px; }
  .bullets { margin-top: 28px; }
  .signup-fields { flex-direction: column; }
  .formkit-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
