* {
  box-sizing: border-box;
}

:root {
  --bg: #f6f1eb;
  --paper: rgba(255, 252, 248, 0.72);
  --text: #766b63;
  --text-strong: #6b5f57;
  --muted: #9d9187;
  --line: #b4aaa2;
  --line-strong: #92867e;
  --tile: #8f8f8f;
  --tile-shadow: rgba(84, 78, 74, 0.18);
  --focus: #8d776b;
  --font-display: "Grandview", "Bahnschrift", "DIN", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-script: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-display);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.92), transparent 46%),
    linear-gradient(180deg, #fbf8f4 0%, var(--bg) 100%);
}

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

.page-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px) clamp(18px, 4vw, 48px) clamp(180px, 22vw, 270px);
  border-radius: 32px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 245, 0.58)),
    var(--paper);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 24px 60px rgba(100, 85, 72, 0.08);
}

.eyebrow,
.counter-label,
.counter-caption,
.hero-copy,
label,
.message {
  letter-spacing: 0.01em;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

#page-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--text-strong);
}

.hero-script {
  margin: 12px 0 28px;
  font-family: var(--font-script);
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  line-height: 1;
  color: #88776d;
  transform: rotate(-4deg);
}

.hero-copy {
  width: min(100%, 620px);
  margin: 0 auto;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  line-height: 1.6;
  color: var(--muted);
}

.counter-wrap {
  margin: 34px auto 30px;
}

.counter-label {
  margin: 0 0 14px;
  font-size: 0.94rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.counter {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 76px;
}

.counter-digit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(48px, 6vw, 68px);
  height: clamp(58px, 8vw, 78px);
  border-radius: 8px;
  background: linear-gradient(180deg, #9a9a9a 0%, var(--tile) 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 24px var(--tile-shadow);
}

.counter-caption {
  margin: 14px 0 0;
  font-size: 1rem;
  color: var(--muted);
}

.signup-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 18px 14px;
  align-items: end;
  margin-top: 34px;
}

.field-group {
  text-align: left;
}

label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-strong);
}

input,
button {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border-radius: 0;
  font: inherit;
}

input {
  border: 2px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.7);
  color: #5f554f;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input::placeholder {
  color: #b4aba3;
}

input:hover {
  border-color: var(--focus);
}

input:focus-visible {
  outline: none;
  border-color: var(--focus);
  background: #fffdfa;
  box-shadow: 0 0 0 4px rgba(141, 119, 107, 0.14);
}

button {
  align-self: end;
  border: 0;
  padding-inline: 24px;
  background: var(--text-strong);
  color: #fffaf7;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 10px 24px rgba(94, 80, 71, 0.16);
}

button:hover {
  background: #5d524b;
  transform: translateY(-1px);
}

button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(141, 119, 107, 0.15),
    0 10px 24px rgba(94, 80, 71, 0.16);
}

button:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.message {
  min-height: 24px;
  margin: 18px 0 0;
  font-size: 0.95rem;
}

.message.success {
  color: #3d7a56;
}

.message.error {
  color: #b25852;
}

.message.pending {
  color: var(--text);
}

.hero-illustration {
  position: absolute;
  right: clamp(12px, 4vw, 56px);
  bottom: 18px;
  width: min(72vw, 430px);
  height: clamp(120px, 20vw, 220px);
  opacity: 0.58;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 70%, rgba(143, 134, 126, 0.2) 0 10%, transparent 11%),
    radial-gradient(circle at 62% 40%, rgba(143, 134, 126, 0.16) 0 8%, transparent 9%),
    linear-gradient(140deg, transparent 0 35%, rgba(126, 116, 108, 0.55) 36% 36.8%, transparent 37.8% 100%),
    linear-gradient(153deg, transparent 0 46%, rgba(126, 116, 108, 0.48) 47% 47.8%, transparent 48.8% 100%),
    linear-gradient(128deg, transparent 0 57%, rgba(126, 116, 108, 0.48) 58% 58.7%, transparent 59.7% 100%),
    linear-gradient(165deg, transparent 0 30%, rgba(126, 116, 108, 0.42) 31% 31.7%, transparent 32.7% 100%);
  filter: blur(0.15px);
  transform: rotate(-6deg);
}

@media (max-width: 900px) {
  .signup-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 16px 14px 28px;
  }

  .hero-panel {
    padding: 28px 16px 150px;
    border-radius: 24px;
  }

  .hero-script {
    margin-bottom: 22px;
  }

  .signup-form {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 28px;
  }

  .counter {
    gap: 5px;
  }

  .counter-digit {
    width: min(16vw, 54px);
    height: min(20vw, 62px);
    border-radius: 6px;
  }

  .hero-illustration {
    right: 50%;
    bottom: 6px;
    width: min(92vw, 360px);
    height: 140px;
    transform: translateX(50%) rotate(-8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}
