:root {
  --ink: #182126;
  --muted: #5c6b73;
  --panel: rgba(255, 255, 255, 0.94);
  --line: rgba(24, 33, 38, 0.14);
  --accent: #0c7c59;
  --accent-dark: #09533c;
  --bg-top: #f6efe5;
  --bg-bottom: #d7ebe2;
  --shadow: 0 22px 60px rgba(24, 33, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 35%),
    linear-gradient(155deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
}

body.is-generating {
  overflow: hidden;
}

a {
  color: var(--accent-dark);
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 80px;
}

.brand-bar {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: 164px;
  max-width: 42vw;
  height: auto;
  display: block;
}

.hero {
  padding: 12px 4px 28px;
}

.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  color: var(--accent-dark);
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 0.96;
}

.lede {
  max-width: 60ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(12px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.full {
  grid-column: 1 / -1;
}

label {
  display: block;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.94rem;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.upload input {
  padding: 18px;
  background: rgba(12, 124, 89, 0.04);
}

.actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 8px;
}

button,
.download-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.8;
}

.generation-overlay[hidden] {
  display: none !important;
}

.generation-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 33, 38, 0.34);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.generation-card {
  width: min(620px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(24, 33, 38, 0.1);
  border-radius: 28px;
  box-shadow: 0 26px 80px rgba(24, 33, 38, 0.18);
  padding: 30px;
}

.generation-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
}

.generation-logo {
  width: 132px;
  max-width: 40vw;
  height: auto;
  display: block;
}

.generation-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.generation-copy {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.progress-shell {
  margin-top: 24px;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(12, 124, 89, 0.13);
}

.progress-bar {
  width: 42%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ed7b9 0%, var(--accent) 45%, var(--accent-dark) 100%);
  animation: progress-slide 1.4s ease-in-out infinite;
}

.generation-steps {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.generation-steps span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(12, 124, 89, 0.08);
}

.summary h2 {
  margin-top: 24px;
}

.summary ul {
  padding-left: 20px;
}

.email-status {
  margin-top: 18px;
  color: var(--muted);
}

@keyframes progress-slide {
  0% {
    transform: translateX(-90%);
  }
  50% {
    transform: translateX(95%);
  }
  100% {
    transform: translateX(-90%);
  }
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .panel,
  .generation-card {
    padding: 22px;
  }

  .brand-logo {
    width: 138px;
  }

  .generation-logo {
    width: 112px;
  }
}
