/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Libre Caslon Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/libre-caslon-text.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/public-sans.woff2") format("woff2");
}

/* ---------- Design tokens: change colors/fonts here ---------- */
:root {
  --bg: #09091b;            /* page background (navy-black) */
  --fg: #e4e4e4;            /* main text */
  --muted: #8d8d94;         /* testimonials text */
  --input-bg: rgba(228, 228, 228, 0.26);
  --error: #f0a39a;         /* soft red for form errors, readable on the navy */
  --serif: "Libre Caslon Text", "Times New Roman", serif;
  --sans: "Public Sans", Arial, sans-serif;
}

/* ---------- Base ---------- */
/* Thin, crisp text on the dark background (matches the original site) */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
*, *::before, *::after { box-sizing: border-box; border: 0 solid; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; line-height: 1.5; }
body { font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; background: none; }
button { cursor: pointer; }

main {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  row-gap: 5rem;
  padding: 2rem;
}

/* ---------- Header ---------- */
.header { display: flex; }
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.9rem;
  line-height: 2.9rem;
}
.intro { font-size: 1.125rem; margin-top: 1.5rem; }
.intro p { line-height: 1.5rem; }
/* Small muted note (e.g. no-submissions disclaimer) */
.note {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  line-height: 1rem;
  letter-spacing: -0.025em;
  margin-top: 1.5rem;
}
.underline { border-bottom: 1px solid var(--fg); }

/* Outline button used for Contact + Subscribe */
.button {
  font-size: 0.75rem;
  line-height: 1rem;
  text-align: center;
  border: 1px solid var(--fg);
  padding: 0.75rem 3rem;
}
.button:hover { background: var(--fg); color: var(--bg); }
.button.mobile-only { display: inline-block; margin-top: 1.5rem; }
.button.desktop-only { display: none; }

/* ---------- Testimonials ---------- */
.testimonials-wrap { display: flex; flex-direction: column; row-gap: 2rem; padding-bottom: 3.5rem; }
.rule { width: 260px; border-top: 1px solid var(--muted); opacity: 0.6; }
.testimonials { color: var(--muted); display: flex; flex-direction: column; row-gap: 0.75rem; }
.label { text-transform: uppercase; font-size: 0.75rem; line-height: 1rem; letter-spacing: -0.025em; font-weight: 400; }

.track {
  display: flex;
  overflow: scroll;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.track::-webkit-scrollbar { display: none; }
.slide {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  row-gap: 0.75rem;
  width: calc(100vw - 4rem);
  scroll-snap-align: center;
}
.quote { font-size: 1.125rem; line-height: 1.5rem; }

.dots { display: flex; column-gap: 0.5rem; }
.dots button {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: #fff;
  opacity: 0.5;
  transition: opacity 300ms;
}
.dots button.active { opacity: 1; }

/* ---------- Footer ---------- */
footer {
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
}
.footer-links { display: flex; flex-direction: column; row-gap: 1rem; }
.press { display: flex; align-items: center; column-gap: 0.25rem; }
/* Newsletter form + its states: hover, focus, loading, success, error */
.newsletter { position: relative; }
form { display: flex; align-items: stretch; column-gap: 0.25rem; margin-top: 0.5rem; }
form input {
  font-size: 0.75rem;
  text-transform: uppercase;
  outline: none;
  border-radius: 0;
  background: var(--input-bg);
  border: 1px solid transparent;
  padding: 0 0.5rem;
  width: 100%;
  transition: background-color 150ms, border-color 150ms;
}
form input::placeholder { color: var(--fg); opacity: 0.8; transition: opacity 150ms; }
form input:hover { background: rgba(228, 228, 228, 0.32); }
form input:focus { background: rgba(228, 228, 228, 0.36); border-color: var(--fg); }
form input:focus::placeholder { opacity: 0.45; }
form input:disabled { opacity: 0.6; cursor: default; }
form input[aria-invalid="true"] { border-color: var(--error); }

.button { transition: background-color 150ms, color 150ms, opacity 150ms; }
.button:focus-visible, a:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }
.button:active { opacity: 0.8; }
form .button { padding: 0.75rem 0.5rem; margin-left: 0.25rem; min-width: 7.5rem; }
form .button:disabled { cursor: default; }
form[data-state="loading"] .button { opacity: 0.7; }
form[data-state="loading"] .button:hover { background: none; color: var(--fg); }
form[data-state="success"] .button,
form[data-state="success"] .button:hover { background: var(--fg); color: var(--bg); opacity: 1; }

.form-status { margin-top: 0.5rem; min-height: 1rem; color: var(--muted); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }
.form-status.is-success { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  form input, form input::placeholder, .button { transition: none; }
}

/* ---------- Tablet (768px+) ---------- */
@media (min-width: 768px) {
  .track { width: 640px; }
  .slide { width: 640px; }
  .testimonials-wrap { padding-bottom: 5rem; }
}

/* ---------- Desktop (1280px+) ---------- */
@media (min-width: 1280px) {
  main { padding: 3rem 4rem; }
  .header { justify-content: space-between; align-items: center; }
  h1 { font-size: 3.25rem; }
  .intro { margin-top: 2rem; }
  .button.desktop-only { display: block; }
  .button.mobile-only { display: none; }

  footer { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-links { flex-direction: row; row-gap: 0; column-gap: 4rem; }
  .newsletter { display: flex; align-items: center; column-gap: 0.25rem; }
  form { margin-top: 0; }
  .form-status { position: absolute; left: 0; right: 0; top: 100%; text-align: right; white-space: nowrap; }
  form input { width: auto; }
  form .button { padding-top: 0; padding-bottom: 0; margin-left: 0; }
}
