/* === Base === */
:root {
  --bg: #FAF6F1;
  --bg-card: #FFFFFF;
  --accent: #D4A574;
  --accent-dark: #B8895A;
  --text: #2D2A26;
  --text-muted: #6B6560;
  --text-light: #9B958E;
  --border: #E8E2DA;
  --cold: #4A7C6F;
  --cold-bg: #EDF5F2;
  --warm: #C4763B;
  --warm-bg: #FDF3EC;
  --positioning-bg: #F0EBF5;
  --positioning: #6B5B8A;
  --success: #4A7C6F;
  --error: #C44B3B;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(45, 42, 38, 0.06);
  --shadow-lg: 0 8px 32px rgba(45, 42, 38, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* === Logo === */
.logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-dark);
  text-transform: uppercase;
}

/* === Form Page === */
#form-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-header .logo {
  margin-bottom: 24px;
}

.form-header h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text);
}

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

.subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto;
}

/* === Form === */
form {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.required { color: var(--error); }
.optional { color: var(--text-light); font-weight: 400; }

input, textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--text-light);
}

textarea { resize: vertical; }

input.error, textarea.error {
  border-color: var(--error);
}

.btn-primary {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: var(--accent-dark);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover { background: #A57845; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  background: var(--text-light);
  cursor: not-allowed;
}

.btn-outline {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  background: transparent;
  border: 1.5px solid var(--accent-dark);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-outline:hover {
  background: rgba(212, 165, 116, 0.08);
}

.form-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 12px;
}

/* === Loading Page === */
#loading-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.loading-container {
  text-align: center;
}

.loading-container .logo {
  margin-bottom: 32px;
}

.loading-container h2 {
  font-size: 24px;
  margin-bottom: 32px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-dark);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.loading-status {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.loading-steps {
  text-align: left;
  max-width: 260px;
  margin: 0 auto;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-light);
  transition: color 0.3s;
}

.step.active { color: var(--accent-dark); font-weight: 600; }
.step.done { color: var(--success); }

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.3s;
}

.step.active .step-dot { background: var(--accent-dark); }
.step.done .step-dot { background: var(--success); }

/* === Report Page === */
.report-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

.report-header {
  margin-bottom: 40px;
}

.report-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.report-header h1 {
  font-size: 36px;
  font-weight: 700;
}

.report-for {
  font-size: 16px;
  color: var(--text-muted);
}

/* Report Sections */
.report-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-text {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Snapshot */
.snapshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.snapshot-item {
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
}

.snapshot-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.snapshot-value {
  font-size: 15px;
  font-weight: 500;
}

.observations-list {
  list-style: none;
  padding: 0;
}

.observations-list li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
  color: var(--text-muted);
}

.observations-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ICP */
.icp-framework {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.icp-box {
  background: var(--bg);
  border-radius: 8px;
  padding: 16px;
}

.icp-box h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-dark);
}

.icp-box p, .icp-box li {
  font-size: 14px;
  color: var(--text-muted);
}

.icp-box ul {
  list-style: disc;
  padding-left: 20px;
}

.icp-box li { margin-bottom: 6px; }

.icp-segments {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.segment-tag {
  padding: 6px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* Offers */
.offer-card {
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 16px;
}

.offer-card.cold {
  background: var(--cold-bg);
  border-left: 4px solid var(--cold);
}

.offer-card.warm {
  background: var(--warm-bg);
  border-left: 4px solid var(--warm);
}

.offer-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.offer-badge.cold { background: var(--cold); color: white; }
.offer-badge.warm { background: var(--warm); color: white; }

.offer-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.offer-statement {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
  font-style: italic;
  border-left: 3px solid var(--border);
  padding-left: 14px;
}

.offer-details {
  display: grid;
  gap: 10px;
}

.offer-detail {
  display: flex;
  gap: 8px;
  font-size: 14px;
}

.offer-detail-label {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  min-width: 120px;
}

.offer-detail-value {
  color: var(--text-muted);
}

.seven-second-test {
  margin-top: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
}

.seven-second-test h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cold);
  margin-bottom: 8px;
}

.test-items {
  display: grid;
  gap: 4px;
}

.test-item {
  font-size: 13px;
  color: var(--text-muted);
}

.test-pass {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  background: var(--success);
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Positioning */
.positioning-section {
  background: var(--positioning-bg);
  border-left: 4px solid var(--positioning);
}

.reframe-box {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.reframe-from, .reframe-to {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
}

.reframe-from {
  background: rgba(0,0,0,0.05);
  text-decoration: line-through;
  color: var(--text-light);
}

.reframe-to {
  background: var(--positioning);
  color: white;
}

.reframe-arrow {
  font-size: 20px;
  color: var(--text-light);
}

.positioning-item {
  margin-bottom: 16px;
}

.positioning-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--positioning);
  margin-bottom: 4px;
}

.positioning-item p {
  font-size: 15px;
  color: var(--text-muted);
}

/* CTA */
.cta-section {
  text-align: center;
  padding: 48px 32px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
}

.cta-section h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 24px;
}

.cta-section .btn-primary {
  width: auto;
  padding: 14px 40px;
}

.footer-bottom {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--text-light);
}

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-content {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius);
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.modal-content h3 {
  margin-bottom: 12px;
  color: var(--error);
}

.modal-content p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Print */
@media print {
  body { background: white; }
  .report-header-top .btn-outline { display: none; }
  .cta-section .btn-primary { display: none; }
  .report-section { break-inside: avoid; box-shadow: none; border: 1px solid var(--border); }
  .offer-card { break-inside: avoid; }
}

/* Responsive */
@media (max-width: 600px) {
  .form-header h1 { font-size: 28px; }
  .report-header h1 { font-size: 28px; }
  .snapshot-grid { grid-template-columns: 1fr; }
  .icp-framework { grid-template-columns: 1fr; }
  .reframe-box { flex-direction: column; }
  form { padding: 24px; }
  .report-section { padding: 24px; }
  .container { padding: 24px 16px; }
}
