/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FAF8F3;
  --bg-warm: #F3F0E8;
  --fg: #1A1A1A;
  --fg-muted: #6B6B6B;
  --accent: #4A6741;
  --accent-light: #6B8A63;
  --sage-light: #E8EDE6;
  --charcoal: #2D2D2D;
  --border: #E0DDD6;
  --cream: #FAF8F3;
  --rule: #C8C3BA;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
}

/* === NAV === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 243, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.nav-tagline {
  font-size: 0.75rem;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* === HERO === */
.hero {
  padding: 6rem 2rem 5rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(74,103,65,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(200,195,186,0.3) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.hero-overline {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.hero-headline {
  font-size: clamp(2.75rem, 5.5vw, 4.25rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--fg);
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
}

.hero-sub {
  font-size: 1.0625rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 2rem;
}

.hero-rule {
  width: 64px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.stat { display: flex; flex-direction: column; }

.stat-num {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.6875rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--rule);
}

/* === HERO ASIDE === */
.aside-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 2px 20px rgba(26,26,26,0.04);
}

.aside-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

.aside-sample {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.aside-sample:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sample-tag {
  display: inline-block;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.2em 0.6em;
  border-radius: 2px;
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.sample-text {
  font-size: 0.875rem;
  color: var(--fg);
  line-height: 1.55;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.sample-meta {
  font-size: 0.6875rem;
  color: var(--fg-muted);
}

/* === MANIFESTO === */
.manifesto {
  background: var(--charcoal);
  padding: 5rem 2rem;
}

.manifesto-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.manifesto-mark {
  padding-top: 0.5rem;
}

.mark-line {
  width: 2px;
  height: 80px;
  background: var(--accent-light);
  margin: 0 auto;
}

.manifesto-text {}

.manifesto-quote {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 300;
  color: #F0EDE6;
  line-height: 1.45;
  margin-bottom: 1.5rem;
}

.manifesto-body {
  font-size: 0.9375rem;
  color: #A0A0A0;
  line-height: 1.7;
  max-width: 680px;
}

/* === SERVICES === */
.services {
  padding: 6rem 2rem;
  background: var(--bg);
}

.services-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  margin-bottom: 3rem;
  color: var(--fg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5px;
  background: var(--border);
  border: 1.5px solid var(--border);
}

.service-card {
  background: var(--bg);
  padding: 2.25rem 2rem;
  transition: background 0.2s;
}

.service-card:hover {
  background: white;
}

.service-icon {
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.service-name {
  font-family: 'Fraunces', serif;
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 0.6rem;
}

.service-desc {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* === INDUSTRIES === */
.industries {
  padding: 6rem 2rem;
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
}

.industries-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 5rem;
  align-items: start;
}

.overline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}

.industries-headline {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 300;
  color: var(--fg);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.industries-sub {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.industries-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.industry-row {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.industry-row:first-child {
  border-top: 1px solid var(--border);
}

.industry-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.45rem;
  flex-shrink: 0;
}

.industry-name {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 0.35rem;
}

.industry-desc {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* === PROCESS === */
.process {
  padding: 6rem 2rem;
  background: var(--bg);
}

.process-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  margin-top: 0;
}

.step {}

.step-num {
  font-family: 'Fraunces', serif;
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--accent);
  margin-bottom: 1rem;
  line-height: 1;
}

.step-title {
  font-family: 'Fraunces', serif;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 0.6rem;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* === CLOSING === */
.closing {
  padding: 7rem 2rem;
  background: var(--sage-light);
  border-top: 1px solid var(--border);
}

.closing-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.closing-badge {
  display: inline-block;
  border: 1px solid var(--accent);
  padding: 0.35em 1em;
  border-radius: 2px;
  margin-bottom: 2rem;
}

.badge-text {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.closing-headline {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--fg);
  margin-bottom: 1.5rem;
  letter-spacing: -0.015em;
}

.closing-body {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.closing-statement {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.closing-statement p {
  font-family: 'Fraunces', serif;
  font-size: 1.125rem;
  font-style: italic;
  color: var(--fg);
}

/* === FOOTER === */
.footer {
  padding: 2.5rem 2rem;
  background: var(--charcoal);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #F0EDE6;
  margin-bottom: 0.25rem;
}

.footer-sub {
  font-size: 0.75rem;
  color: #6B6B6B;
}

.footer-copy {
  font-size: 0.75rem;
  color: #6B6B6B;
}

/* ================================
   BRIEF FORM PAGE
   ================================ */

.brief-page { min-height: calc(100vh - 56px); background: var(--bg); }

.brief-header { background: var(--charcoal); padding: 4rem 2rem; text-align: center; }
.brief-header-overline { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 1rem; font-weight: 500; }
.brief-header h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; color: #F0EDE6; margin-bottom: 1rem; letter-spacing: -0.015em; }
.brief-header p { font-size: 1rem; color: #A0A0A0; max-width: 560px; margin: 0 auto; line-height: 1.65; }

.brief-container { max-width: 680px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.brief-form { display: flex; flex-direction: column; gap: 1.5rem; }

.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label { font-size: 0.8125rem; font-weight: 500; color: var(--fg); letter-spacing: 0.01em; }
.form-label span { color: var(--accent); }

.form-input, .form-select, .form-textarea {
  background: white;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--fg);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74,103,65,0.12);
}

.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6B6B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: 0.75rem; color: var(--fg-muted); line-height: 1.5; }

.form-submit {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 3px;
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  align-self: flex-start;
  letter-spacing: 0.01em;
}

.form-submit:hover { background: var(--accent-light); }
.form-submit:active { transform: scale(0.99); }
.form-submit:disabled { background: var(--fg-muted); cursor: not-allowed; }
.form-error { background: #fef2f2; border: 1px solid #fecaca; border-radius: 3px; padding: 0.875rem 1rem; font-size: 0.875rem; color: #991b1b; }

/* ================================
   RESULTS PAGE
   ================================ */

.results-page { min-height: calc(100vh - 56px); background: var(--bg); }

.results-header { background: var(--charcoal); padding: 4rem 2rem 3rem; text-align: center; }
.results-header h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 300; color: #F0EDE6; margin-bottom: 0.75rem; letter-spacing: -0.015em; }
.results-header p { font-size: 0.9375rem; color: #A0A0A0; }

.results-container { max-width: 780px; margin: 0 auto; padding: 2.5rem 2rem 5rem; }

.generating-state { text-align: center; padding: 4rem 2rem; }
.generating-icon { width: 48px; height: 48px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 1.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.generating-state h2 { font-size: 1.5rem; font-weight: 300; color: var(--fg); margin-bottom: 0.75rem; }
.generating-state p { font-size: 0.9375rem; color: var(--fg-muted); }
.polling-status { margin-top: 1.5rem; font-size: 0.8125rem; color: var(--accent); font-weight: 500; }

.generated-content { background: white; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.content-meta { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--bg-warm); }
.content-meta-info { display: flex; flex-direction: column; gap: 0.25rem; }
.content-meta-company { font-family: 'Fraunces', serif; font-size: 0.9375rem; color: var(--fg); }
.content-meta-brief { font-size: 0.75rem; color: var(--fg-muted); }
.content-actions { display: flex; gap: 0.75rem; }

.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; font-size: 0.8125rem; font-family: 'DM Sans', system-ui, sans-serif; font-weight: 500; border-radius: 3px; cursor: pointer; transition: all 0.2s; text-decoration: none; border: none; }
.btn-download { background: var(--accent); color: white; }
.btn-download:hover { background: var(--accent-light); }
.btn-new { background: white; color: var(--fg); border: 1px solid var(--border); }
.btn-new:hover { border-color: var(--fg-muted); }

.content-body { padding: 2rem 1.5rem; font-size: 0.9375rem; line-height: 1.75; color: var(--fg); white-space: pre-wrap; }
.content-body .content-title { font-family: 'Fraunces', serif; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 400; line-height: 1.2; margin-bottom: 1.5rem; color: var(--fg); }
.content-body h2 { font-family: 'Fraunces', serif; font-size: 1.25rem; font-weight: 400; margin: 2rem 0 0.75rem; color: var(--charcoal); }
.content-body p { margin-bottom: 1rem; }

.error-state { text-align: center; padding: 3rem 2rem; }
.error-state h2 { font-size: 1.5rem; font-weight: 300; color: var(--fg); margin-bottom: 0.75rem; }
.error-state p { font-size: 0.9375rem; color: var(--fg-muted); margin-bottom: 1.5rem; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-aside {
    max-width: 480px;
  }
  .manifesto-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .manifesto-mark { display: none; }
  .industries-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero { padding: 4rem 1.5rem 3.5rem; }
  .services, .industries, .process { padding: 4rem 1.5rem; }
  .manifesto { padding: 4rem 1.5rem; }
  .closing { padding: 4rem 1.5rem; }
  .hero-stats { gap: 1.25rem; }
  .process-steps { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .content-meta { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .content-actions { width: 100%; }
  .content-actions .btn { flex: 1; justify-content: center; }
}