:root {
  --ink: #14201c;
  --muted: #3d524a;
  --paper: #dfe8e2;
  --paper-2: #c9d8cf;
  --accent: #e23d28;
  --accent-ink: #fff8f5;
  --line: rgba(20, 32, 28, 0.14);
  --shadow: 0 18px 40px rgba(20, 32, 28, 0.12);
  --radius: 14px;
  --font-display: "Syne", sans-serif;
  --font-body: "Instrument Sans", sans-serif;
}

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

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--paper);
  overflow-x: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1200px 700px at 12% -10%, #f4fff8 0%, transparent 55%),
    radial-gradient(900px 600px at 100% 10%, #ffd8cf 0%, transparent 50%),
    linear-gradient(160deg, #eaf2ec 0%, #d5e2da 45%, #c8d6ce 100%);
  animation: stage-drift 14s ease-in-out infinite alternate;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
    -18deg,
    transparent 0 18px,
    rgba(20, 32, 28, 0.035) 18px 19px
  );
}

.stage::after {
  content: "TEXT";
  position: absolute;
  right: -4vw;
  bottom: -6vh;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(8rem, 28vw, 22rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: rgba(20, 32, 28, 0.05);
  pointer-events: none;
  user-select: none;
  animation: watermark-in 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 42rem;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  margin: 0 auto;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.lede {
  margin: 1rem 0 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  line-height: 1.45;
  font-weight: 500;
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s both;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.85rem;
  margin-top: 2.25rem;
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.16s both;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input {
  width: 6.5rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  outline: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.field input:focus {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}

.go {
  appearance: none;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 1.05rem 1.7rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.go:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
}

.go:active {
  transform: translateY(1px) scale(0.98);
}

.go:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.meta {
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.24s both;
}

.meta[data-state="error"] {
  color: #9b1c1c;
}

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

@keyframes watermark-in {
  from {
    opacity: 0;
    transform: translateX(3vw);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes stage-drift {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage,
  .stage::after,
  .brand,
  .lede,
  .controls,
  .meta {
    animation: none;
  }

  .field input,
  .go {
    transition: none;
  }
}
