:root {
  --ink: #15231c;
  --muted: #3f5348;
  --paper: #f3efe4;
  --sand: #e7dfcf;
  --leaf: #1f6b4f;
  --leaf-deep: #134836;
  --accent: #c45c26;
  --line: rgba(21, 35, 28, 0.14);
  --shadow: 0 24px 60px rgba(21, 35, 28, 0.12);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d9ebe1 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #f0d9c4 0%, transparent 50%),
    linear-gradient(180deg, #f7f3ea 0%, #ebe4d6 100%);
  line-height: 1.55;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(21, 35, 28, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 35, 28, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 70%);
  animation: drift 28s linear infinite;
}

@keyframes drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(48px);
  }
}

.top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 1.25rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--leaf-deep);
}

main {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto 4rem;
}

.hero {
  min-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0 3rem;
  animation: rise 0.8s ease both;
}

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

.brand-mark {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--leaf-deep);
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.2vw, 2.55rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lede {
  margin: 1.1rem 0 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.3rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--leaf);
  color: #f7faf7;
}

.btn.primary:hover {
  background: var(--leaf-deep);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.45);
}

.generator,
.faq,
.notes {
  margin-top: 1rem;
  padding: 1.75rem 0 0.5rem;
  border-top: 1px solid var(--line);
  animation: rise 0.9s ease both;
  animation-delay: 0.12s;
}

.generator h2,
.faq h2,
.notes h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.section-copy {
  margin: 0.5rem 0 1.4rem;
  color: var(--muted);
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(31, 107, 79, 0.35);
  outline-offset: 1px;
}

.hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.result {
  margin-top: 1.75rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.result-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.result-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.letter {
  margin: 1rem 0 0;
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--sand);
  white-space: pre-wrap;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.45;
}

.status {
  min-height: 1.25rem;
  margin: 0.6rem 0 0;
  color: var(--leaf-deep);
  font-size: 0.9rem;
}

.monetize {
  margin-top: 1.5rem;
  padding: 1.25rem 1.15rem 1.15rem;
  border: 1px solid rgba(196, 92, 38, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(240, 217, 196, 0.55) 0%, rgba(255, 255, 255, 0.55) 55%),
    rgba(255, 255, 255, 0.5);
}

.monetize-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.monetize h4 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.monetize > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 46ch;
}

.monetize-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.monetize-actions .btn.primary {
  background: var(--accent);
}

.monetize-actions .btn.primary:hover {
  background: #a54b1d;
}

.monetize-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0 0.85rem;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--ink);
  padding: 0.35rem 0;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before {
  content: "+";
  display: inline-block;
  width: 1.1rem;
  margin-right: 0.35rem;
  color: var(--leaf);
  font-weight: 600;
}

.faq-list details[open] summary::before {
  content: "–";
}

.faq-list details p {
  margin: 0.45rem 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.notes ul {
  margin: 0.9rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.notes li + li {
  margin-top: 0.45rem;
}

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

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

  .brand-mark {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .hero {
    min-height: auto;
    padding-top: 1.5rem;
  }
}

@media print {
  .atmosphere,
  .top,
  .hero,
  .form,
  .faq,
  .notes,
  .foot,
  .monetize,
  .result-actions,
  .status,
  .generator h2,
  .section-copy {
    display: none !important;
  }

  body {
    background: white;
  }

  .result {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .letter {
    border: none;
    background: white;
    padding: 0;
    font-size: 12pt;
  }
}
