:root {
  --ink: #15130f;
  --paper: #faf8f4;
  --paper-2: #f2f2f2;
  --signal: #ff4d00;
  --stone: #8a8579;
  --line-on-light: rgba(21, 19, 15, 0.1);

  /* confetti accent palette */
  --confetti-sage: #91978d;
  --confetti-peach: #de9167;
  --confetti-rust: #ba572d;
  --confetti-maroon: #9b2422;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Single-screen layout ---------- */

.hero-full {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  padding: 24px 20px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  grid-row: 1;
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wordmark-hero {
  height: clamp(40px, 6.5vw, 64px);
  width: auto;
  display: block;
  margin: 0 0 clamp(28px, 4vw, 40px);
}

.hero-inner h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, 2.6vw, 27px);
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 14px;
  max-width: 38ch;
}

.arc-underline {
  position: relative;
  white-space: nowrap;
}
.arc-underline::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: -3px;
  height: 8px;
  border-bottom: 3px solid var(--signal);
  border-radius: 50%;
  transform: scaleY(0.9);
}

.subhead {
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.55;
  color: var(--stone);
  max-width: 46ch;
  margin: 0 0 24px;
  text-align: center;
}

.subscribe-form {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.subscribe-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: var(--paper-2);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line-on-light);
}

.subscribe-row input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 13px 18px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
}

.subscribe-row input::placeholder { color: var(--stone); }

.subscribe-row input:focus {
  outline: 2px solid var(--signal);
  outline-offset: -2px;
  border-radius: 999px 0 0 999px;
}

.subscribe-row button {
  background: var(--signal);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.subscribe-row button:hover { background: #e64500; }
.subscribe-row button:disabled { opacity: 0.6; cursor: default; }
.subscribe-row button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.form-message {
  margin: 12px 0 0;
  font-size: 14px;
  min-height: 1em;
}

.form-message.is-success {
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(14px, 4vw, 17px);
  white-space: nowrap;
  animation: message-rise 0.45s ease-out 0.25s both;
}

.form-message.is-error {
  color: var(--confetti-maroon);
  animation: message-shake 0.4s ease-out;
}

@keyframes message-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes message-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ---------- Success icon ---------- */

.success-icon {
  width: 46px;
  height: 46px;
  margin: 4px auto 0;
  opacity: 0;
  display: none;
}

.success-icon.is-shown {
  display: block;
  opacity: 1;
  animation: icon-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.success-icon svg { width: 100%; height: 100%; display: block; }

.success-icon-bg { fill: var(--signal); }

.success-icon-check {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.success-icon.is-shown .success-icon-check {
  animation: check-draw 0.35s ease-out 0.3s forwards;
}

@keyframes icon-pop {
  0% { opacity: 0; transform: scale(0.3); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes check-draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .form-message.is-success,
  .success-icon.is-shown,
  .success-icon.is-shown .success-icon-check {
    animation: none;
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

/* ---------- Success confetti burst ---------- */

.success-burst {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 0;
  height: 0;
  pointer-events: none;
}

.burst-piece {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 1;
  animation: burst-fly 0.9s ease-out forwards;
}

@keyframes burst-fly {
  to {
    transform: translate(var(--x), var(--y)) scale(0.4);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .burst-piece { display: none; }
}

.form-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--stone);
  opacity: 0.85;
}

@media (max-width: 480px) {
  .subscribe-row { flex-direction: column; border-radius: 18px; }
  .subscribe-row input { border-radius: 12px 12px 0 0; }
  .subscribe-row button { border-radius: 12px; }
}

.mini-footer {
  position: relative;
  z-index: 2;
  margin-top: 20px;
}

.mini-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--stone);
}

.mini-footer a { color: var(--stone); }

/* ---------- Confetti decorations ---------- */

.confetti {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.c {
  position: absolute;
  opacity: 0.65;
  animation: confetti-float 6s ease-in-out infinite;
}

.c-circle { border-radius: 50%; }

.c-rect { border-radius: 2px; }

.c-tri {
  width: 0;
  height: 0;
  border-left: clamp(5px, 1vw, 7px) solid transparent;
  border-right: clamp(5px, 1vw, 7px) solid transparent;
  border-bottom: clamp(9px, 1.8vw, 13px) solid;
  background: none !important;
}

@keyframes confetti-float {
  0%, 100% { transform: translate(0, 0) rotate(var(--r, 0deg)); }
  50% { transform: translate(4px, -10px) rotate(calc(var(--r, 0deg) + 12deg)); }
}

@media (prefers-reduced-motion: reduce) {
  .c { animation: none; }
}

@media (max-height: 720px) {
  .hero-full { padding-top: 14px; padding-bottom: 14px; }
  .wordmark-hero { margin-bottom: 16px; }
  .hero-inner h1 { margin-bottom: 10px; }
  .subhead { margin-bottom: 16px; }
}

@media (max-width: 480px) {
  .hero-full { padding: 20px 16px; }
}
