:root {
  --red-deep: #6b0f1a;
  --red-mid: #8f1d2c;
  --red-accent: #c43b4a;
  --cream: #fff7f5;
  --ink: #1a0a0c;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(40, 4, 10, 0.45);
}

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

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

body {
  font-family: "Outfit", sans-serif;
  color: var(--cream);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(196, 59, 74, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 45% at 90% 100%, rgba(107, 15, 26, 0.9), transparent 50%),
    linear-gradient(165deg, #4a0a12 0%, var(--red-deep) 40%, #2d060c 100%);
  background-attachment: fixed;
}

.page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 3.5rem;
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .page {
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 460px);
    gap: 3rem;
    min-height: 100vh;
    align-items: center;
    padding-block: 3rem;
  }
}

.hero {
  max-width: 34rem;
}

.brand {
  margin: 0 0 0.75rem;
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.75rem, 6vw, 4rem);
  line-height: 1;
  color: var(--white);
  letter-spacing: 0.02em;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lede {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255, 247, 245, 0.82);
  max-width: 28ch;
}

.controls {
  display: grid;
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field span {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 247, 245, 0.7);
}

.field input {
  width: 100%;
  border: 1px solid rgba(255, 247, 245, 0.22);
  border-radius: 0.65rem;
  background: rgba(255, 247, 245, 0.08);
  color: var(--white);
  font: inherit;
  font-size: 1.1rem;
  padding: 0.9rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field input::placeholder {
  color: rgba(255, 247, 245, 0.4);
}

.field input:focus {
  border-color: rgba(255, 247, 245, 0.55);
  background: rgba(255, 247, 245, 0.12);
}

#download-btn {
  appearance: none;
  border: 0;
  border-radius: 0.65rem;
  background: var(--cream);
  color: var(--red-deep);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1.25rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
}

#download-btn:hover:not(:disabled) {
  background: var(--white);
  transform: translateY(-1px);
}

#download-btn:active:not(:disabled) {
  transform: translateY(0);
}

#download-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.preview-wrap {
  justify-self: center;
  width: min(100%, 460px);
}

#flyer-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.4rem;
  box-shadow: var(--shadow);
  background: #3a0a10;
}

.status {
  margin: 0.75rem 0 0;
  min-height: 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 247, 245, 0.7);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  #download-btn {
    transition: none;
  }
}
