/* Variables */
:root {
  --bg: #f5f0e8;
  --bg-card: #faf9f7;
  --fg: #1a3a3f;
  --fg-muted: #5a7070;
  --accent: #d4933a;
  --accent-light: #f0e4ce;
  --border: #ddd5c8;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Navigation */
.nav {
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.brand-tagline {
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
}

/* Hero */
.hero {
  padding: 80px 48px 100px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

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

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 440px;
  line-height: 1.7;
  font-weight: 300;
}

/* Form mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}

.form-mockup {
  width: 340px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(26,58,63,0.08), 0 1px 3px rgba(26,58,63,0.06);
  overflow: hidden;
  border: 1px solid var(--border);
}

.form-mockup-header {
  background: var(--fg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-dots {
  display: flex;
  gap: 6px;
}

.form-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
}

.form-status-badge {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.form-mockup-body {
  padding: 24px;
}

.form-mockup-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 20px;
}

.form-mockup-field {
  margin-bottom: 18px;
}

.form-field-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
  font-weight: 400;
}

.form-field-line {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
}

.form-field-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--fg);
}

.check-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}

.check-box.checked {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.form-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 24px;
}

.form-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.form-progress-label {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 8px;
  text-align: right;
}

/* Section common */
.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}

.section-headline {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-desc {
  font-size: 16px;
  color: var(--fg-muted);
  max-width: 560px;
  line-height: 1.7;
  font-weight: 300;
}

/* How it works */
.how-it-works {
  padding: 100px 0;
  background: var(--bg-card);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 56px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-number {
  font-family: var(--font-serif);
  font-size: 56px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  opacity: 0.7;
}

.step-content h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 10px;
}

.step-content p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  font-weight: 300;
}

/* Templates */
.templates {
  padding: 100px 0;
}

.templates .section-headline {
  margin-bottom: 12px;
}

.templates .section-desc {
  margin-bottom: 48px;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.template-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: box-shadow 0.2s ease;
}

.template-card:hover {
  box-shadow: 0 4px 20px rgba(26,58,63,0.07);
}

.template-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}

.template-card h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 10px;
}

.template-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 16px;
}

.template-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* Outcomes */
.outcomes {
  padding: 80px 0;
  background: var(--fg);
}

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

.outcome {
  text-align: center;
}

.outcome-stat {
  font-family: var(--font-serif);
  font-size: 56px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.outcome-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  margin-bottom: 14px;
}

.outcome-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
  font-weight: 300;
  max-width: 220px;
  margin: 0 auto;
}

/* Manifesto */
.manifesto {
  padding: 100px 0;
  background: var(--bg-card);
}

.manifesto-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.manifesto-text {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 30px);
  font-style: italic;
  color: var(--fg);
  line-height: 1.5;
  margin-bottom: 24px;
  font-weight: 400;
}

.manifesto-attr {
  font-size: 14px;
  color: var(--fg-muted);
  font-weight: 300;
}

/* Closing */
.closing {
  padding: 100px 0;
  background: linear-gradient(160deg, #e8e2d8 0%, var(--bg) 60%);
}

.closing-content {
  max-width: 640px;
}

.closing h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.closing p {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 36px;
}

.closing-statement {
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: italic;
  color: var(--fg);
  padding-left: 24px;
  border-left: 3px solid var(--accent);
  line-height: 1.5;
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

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

.footer-brand .brand-name {
  display: block;
  margin-bottom: 4px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--fg-muted);
}

.footer-note p {
  font-size: 12px;
  color: var(--fg-muted);
  text-align: right;
}

/* App Shell */
.app-shell {
  min-height: 100vh;
  background: var(--bg);
}

.app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.app-nav-brand {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.app-nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.app-nav-links a {
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.15s;
}

.app-nav-links a:hover,
.app-nav-links a.active {
  color: var(--fg);
}

.app-nav-links a.active {
  font-weight: 500;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-user {
  font-size: 13px;
  color: var(--fg-muted);
}

.app-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 48px 80px;
}

/* Page headers */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
}

.card-meta {
  font-size: 13px;
  color: var(--fg-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  border: none;
}

.btn-primary {
  background: var(--fg);
  color: white;
}

.btn-primary:hover {
  background: #143035;
}

.btn-secondary {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #eee9e1;
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover {
  background: #c08530;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  padding: 6px 12px;
}

.btn-ghost:hover {
  background: var(--accent-light);
  color: var(--fg);
}

/* Status badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-draft {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-sent {
  background: #d4edda;
  color: #155724;
}

.badge-closed {
  background: #f0e0e0;
  color: #9b3333;
}

/* Forms list */
.forms-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: box-shadow 0.2s;
}

.form-row:hover {
  box-shadow: 0 2px 12px rgba(26,58,63,0.06);
}

.form-row-info {
  flex: 1;
}

.form-row-info h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
}

.form-row-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--fg-muted);
}

.form-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Form builder */
.field-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.field-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 100px 1fr 1fr 80px;
  gap: 12px;
  align-items: center;
}

.field-type-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 6px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg);
  color: var(--fg);
  width: 100%;
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-add-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--fg-muted);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  width: 100%;
  justify-content: center;
  transition: all 0.15s;
}

.btn-add-field:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* Submissions */
.submissions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.submission-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
}

.submission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.submission-name {
  font-weight: 500;
  color: var(--fg);
}

.submission-time {
  font-size: 12px;
  color: var(--fg-muted);
}

.submission-responses {
  display: grid;
  gap: 10px;
}

.submission-response {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  font-size: 14px;
}

.submission-response label {
  color: var(--fg-muted);
  font-size: 12px;
}

.submission-response span {
  color: var(--fg);
}

/* Send form panel */
.send-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-top: 24px;
}

.send-panel h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 6px;
}

.send-panel p {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.form-row-email {
  display: flex;
  gap: 10px;
  align-items: center;
}

.form-row-email input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg);
  color: var(--fg);
}

.form-row-email input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Public fill form */
.fill-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 24px;
}

.fill-form {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(26,58,63,0.08);
  width: 100%;
  max-width: 560px;
  overflow: hidden;
}

.fill-form-header {
  background: var(--fg);
  padding: 28px 36px;
  color: white;
}

.fill-form-header h1 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.fill-form-header p {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
}

.fill-form-body {
  padding: 36px;
}

.fill-field {
  margin-bottom: 24px;
}

.fill-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.fill-field label .req {
  color: var(--accent);
  margin-left: 2px;
}

.fill-input,
.fill-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg);
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.fill-input:focus,
.fill-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}

.fill-textarea {
  resize: vertical;
  min-height: 100px;
}

.fill-checkbox-item,
.fill-radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--fg);
  cursor: pointer;
}

.fill-checkbox-item input,
.fill-radio-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Success page */
.success-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.success-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(26,58,63,0.08);
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #d4edda;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: #155724;
  font-size: 28px;
}

.success-card h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.success-card p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--fg-muted);
}

.empty-state h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Messages */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
}

/* Select dropdowns */
select.fill-input {
  appearance: none;
  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 d='M2 4l4 4 4-4' stroke='%235a7070' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual {
    order: -1;
  }

  .steps-grid,
  .templates-grid,
  .outcomes-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 24px 64px;
  }

  .section-inner,
  .footer-inner {
    padding: 0 24px;
  }

  .how-it-works,
  .templates,
  .manifesto,
  .closing {
    padding: 64px 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-note p {
    text-align: center;
  }
}