/* Layout: one long page. Signup hero with the waving pup first, then a "Meet the real Sir Livingston" band, then credits. Autumn leaves fade in behind the footer. */
:root {
  --bg: #f4efd9;
  --veil: rgba(255, 252, 238, 0.35);
  --ink: #3f281c;
  --ink-soft: #6a5444;
  --fur: #b54d14; /* darkened from #c4571a so white button text and the kicker pass WCAG AA */
  --fur-ink: #ffffff;
  --card: rgba(255, 252, 240, 0.82);
  --line: rgba(63, 40, 28, 0.22);
  --focus: #1f5f8a;
  --leaf: clamp(84px, 10vw, 150px);
  --font-display: "Gloock", "Georgia", serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1711;
    --veil: rgba(24, 17, 11, 0.8);
    --ink: #f6ecd2;
    --ink-soft: #cdbb9b;
    --fur: #e2782e;
    --fur-ink: #1d1711;
    --card: rgba(36, 27, 19, 0.82);
    --line: rgba(246, 236, 210, 0.25);
    --focus: #8cc6ee;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1d1711;
  --veil: rgba(24, 17, 11, 0.8);
  --ink: #f6ecd2;
  --ink-soft: #cdbb9b;
  --fur: #e2782e;
  --fur-ink: #1d1711;
  --card: rgba(36, 27, 19, 0.82);
  --line: rgba(246, 236, 210, 0.25);
  --focus: #8cc6ee;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--veil), var(--veil)),
    url("../assets/img/background-wash.jpg");
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center, center top;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0;
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding-block: clamp(32px, 6vw, 72px);
}
.copy { min-width: 0; }
.kicker {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fur);
}
h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7.2vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.blurb { margin: 22px 0 0; text-wrap: pretty; max-width: 34rem; font-size: 1.08rem; color: var(--ink-soft); }
.when {
  margin: 26px 0 0;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.when span {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
form {
  margin: 18px 0 0;
  max-width: 32rem;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}
form h2 { margin: 0 0 12px; font-size: 1rem; font-weight: 700; text-wrap: balance; }
.fields { display: flex; flex-wrap: wrap; gap: 10px; }
.fields input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.fields input[aria-invalid="true"] { border-color: var(--fur); }
.fields input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.fields input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
button {
  flex: 1 1 100%;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  color: var(--fur-ink);
  background: var(--fur);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
button:hover { filter: brightness(1.06); }
.consent { margin: 10px 0 0; font-size: 0.78rem; line-height: 1.45; color: var(--ink-soft); }
.status { margin: 10px 0 0; font-size: 0.9rem; font-weight: 600; }
.dog { min-width: 0; display: flex; justify-content: center; }
.dog img {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  filter: drop-shadow(0 18px 22px rgba(40, 24, 10, 0.22));
}

/* Meet the real Sir Livingston */
.real {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
  padding-block: clamp(32px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.real figure { margin: 0; min-width: 0; }
.real img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 6px solid var(--card);
  box-shadow: 0 16px 32px -14px rgba(40, 24, 10, 0.45);
  transform: rotate(-1.5deg);
}
.real figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.real h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.05;
  text-wrap: balance;
}
.real p { margin: 0 0 12px; text-wrap: pretty; max-width: 34rem; font-size: 1.04rem; color: var(--ink-soft); }
.real .sign { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.real > div { min-width: 0; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 18px 12px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
  position: relative;
  z-index: 1;
}
footer p { margin: 0; min-width: 0; }
footer strong { color: var(--ink); font-weight: 600; }
footer a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.leaves-bottom {
  height: calc(var(--leaf) * 1.5);
  margin-top: calc(var(--leaf) * -0.7);
  margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
  background: url("../assets/img/leaves-bottom.webp") repeat-x left bottom / auto var(--leaf);
  opacity: 0.3;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 35%, transparent);
  mask-image: linear-gradient(to top, #000 35%, transparent);
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: calc(var(--leaf) * 0.6); }
  .dog { order: -1; }
  .dog img { max-width: 280px; }
  .real { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .dog img { animation: settle 700ms ease-out both; }
  @keyframes settle { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* 404 page */
.lost {
  min-height: 70vh;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  padding-block: 48px;
  text-align: center;
}
.lost img { width: 100%; max-width: 220px; height: auto; }
.lost h1 { font-size: clamp(2rem, 6vw, 3.2rem); text-wrap: balance; }
.lost p { margin: 0; color: var(--ink-soft); }
.button {
  display: inline-block;
  margin-top: 8px;
  padding: 13px 22px;
  font-weight: 700;
  color: var(--fur-ink);
  background: var(--fur);
  border-radius: 10px;
  text-decoration: none;
}
.button:hover { filter: brightness(1.06); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nowrap { white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
