@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
  --paper: #f5f2ea;
  --surface: #fffdf8;
  --ink: #17211f;
  --muted: #64706b;
  --line: #d9d5ca;
  --teal: #1f6f72;
  --teal-dark: #164f54;
  --coral: #de684d;
  --blue: #2f5f8f;
  --gold: #b7832f;
  --shadow: 0 24px 70px rgba(24, 33, 31, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(47, 95, 143, .13), transparent 30rem),
    radial-gradient(circle at 88% 5%, rgba(222, 104, 77, .13), transparent 28rem),
    var(--paper);
  font-family: "DM Sans", sans-serif;
  line-height: 1.55;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  padding: 14px clamp(20px, 5vw, 76px);
  border-bottom: 1px solid rgba(23, 33, 31, .12);
  background: rgba(245, 242, 234, .9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50% 50% 50% 10px;
  color: white;
  background: var(--teal-dark);
}

.header-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: .92rem;
}

.header-nav a {
  text-decoration: none;
}

main {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: center;
  padding: clamp(54px, 9vw, 118px) 0 64px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3, p { text-wrap: pretty; }
h1, h2, h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  line-height: 1.05;
  letter-spacing: -.045em;
}

h1 {
  max-width: 820px;
  font-size: clamp(3rem, 7vw, 6.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
}

h3 {
  font-size: 1.28rem;
}

.hero-copy p:last-child {
  max-width: 640px;
  color: #3e4743;
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.signal-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 18px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .86);
  box-shadow: 0 10px 32px rgba(24, 33, 31, .06);
}

.signal-card span {
  grid-row: span 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}

.signal-card:nth-child(2) span { background: var(--teal); }
.signal-card:nth-child(3) span { background: var(--gold); }
.signal-card p {
  margin: 0;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(380px, 1.05fr);
  gap: 22px;
  align-items: start;
}

.generator,
.preview,
.module-prompts,
.ai-advice {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .88);
  box-shadow: 0 10px 36px rgba(24, 33, 31, .06);
}

.generator,
.preview {
  padding: clamp(22px, 3vw, 36px);
}

.preview {
  position: sticky;
  top: 104px;
}

.form-heading {
  margin-bottom: 26px;
}

.form-heading p:last-child {
  color: var(--muted);
}

.field-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.field-grid.two {
  grid-template-columns: 1fr 1fr;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

label span:first-child,
.check-row span {
  color: #35413d;
  font-size: .88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: white;
}

input,
select {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  padding: 13px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(31, 111, 114, .14);
}

.check-row {
  grid-template-columns: 22px 1fr;
  align-items: start;
  margin-top: 4px;
  padding: 16px;
  background: rgba(31, 111, 114, .07);
}

.check-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: var(--teal);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.primary-button,
.secondary-button,
.prompt-strip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  color: white;
  background: var(--ink);
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button,
.prompt-strip button {
  background: transparent;
}

.secondary-button:hover,
.prompt-strip button:hover,
.prompt-strip button.is-active {
  color: white;
  background: var(--teal-dark);
}

.preview-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.preview-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
}

#prompt-meta {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--teal-dark);
  background: rgba(31, 111, 114, .1);
  font-size: .78rem;
  font-weight: 800;
}

#prompt-output {
  min-height: 640px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86rem;
}

.status {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: var(--teal-dark);
  font-size: .9rem;
  font-weight: 700;
}

.module-prompts,
.ai-advice {
  margin-top: 28px;
  padding: clamp(22px, 3vw, 36px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.prompt-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

#quick-prompt {
  min-height: 230px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
}

.ai-advice {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  gap: 36px;
  margin-bottom: 60px;
}

.advice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.advice-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  background: white;
}

.advice-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 76px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .ai-advice {
    grid-template-columns: 1fr;
  }

  .preview {
    position: static;
  }

  .advice-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  main {
    width: min(100% - 26px, 1320px);
  }

  .hero {
    min-height: 0;
    padding-top: 42px;
  }

  .field-grid.two {
    grid-template-columns: 1fr;
  }

  .button-row,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  #prompt-output {
    min-height: 520px;
  }
}
