/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --rose: #e8706a;
  --rose-dark: #d4534d;
  --peach: #f5a87a;
  --blush: #fce4e0;
  --cream: #fff8f5;
  --warm-white: #fffaf8;
  --text: #3d2c2c;
  --text-light: #7a6565;
  --card-bg: rgba(255, 255, 255, 0.82);
  --radius: 20px;
  --shadow: 0 8px 40px rgba(180, 80, 70, 0.12);
}

html { font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: linear-gradient(145deg, #fbe8e4 0%, #fdd6c8 35%, #f8c4b4 65%, #f0b0a0 100%);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(255, 248, 245, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232, 112, 106, 0.1);
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--rose);
  text-decoration: none;
}
.nav-brand:hover { color: var(--rose-dark); }

.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--rose); }

/* ── App container ── */
#app {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 60px;
}

/* ── Screens ── */
.screen {
  display: none;
  width: 100%;
  min-height: calc(100vh - 60px);
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  flex-direction: column;
}
.screen.active { display: flex; animation: fadeUp 0.5s ease; }

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

/* ── Cards ── */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 520px;
  text-align: center;
}

/* ── Landing ── */
.logo-icon { margin-bottom: 0.75rem; }

h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  color: var(--rose);
  margin-bottom: 0.5rem;
  line-height: 1.15;
}

.tagline {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.how-it-works {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.step-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-light);
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--peach));
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.75rem;
}

/* ── Social Proof ── */
.social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--blush);
}

.proof-avatars {
  display: flex;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--peach));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -8px;
  border: 2px solid var(--card-bg);
}
.avatar:last-child { margin-right: 0; }

.proof-text {
  font-size: 0.82rem;
  color: var(--text-light);
}
.proof-text strong {
  color: var(--text);
}

/* ── Testimonials ── */
.testimonials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 680px;
  width: 100%;
  margin-top: 1.5rem;
}

.testimonial-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(180, 80, 70, 0.08);
  padding: 1.25rem 1.25rem 1rem;
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}
.testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(180, 80, 70, 0.14);
}

.stars {
  color: #f5a87a;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
}

.testimonial-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 0.9rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--peach));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  line-height: 1.2;
}

.author-detail {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ── Inputs ── */
input[type="email"],
input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--blush);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--warm-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(232, 112, 106, 0.15);
}
textarea { resize: vertical; min-height: 100px; }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a6565' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }

#email-form { display: flex; flex-direction: column; gap: 0.75rem; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--rose) 0%, var(--peach) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 2rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 4px 16px rgba(232, 112, 106, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(232, 112, 106, 0.4); color: #fff; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--blush);
  border-radius: 12px;
  padding: 0.85rem 2rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--rose); color: var(--rose); }
.btn-secondary:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Survey ── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--blush);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rose), var(--peach));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.step-counter {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

#question-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}
#question-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

#input-area { margin-bottom: 1.5rem; min-height: 60px; }

.nav-buttons { display: flex; gap: 0.75rem; justify-content: center; }
.nav-buttons .btn-primary,
.nav-buttons .btn-secondary { flex: 1; }

#question-container {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#question-container.slide-out {
  opacity: 0;
  transform: translateX(-30px);
}
#question-container.slide-in {
  opacity: 0;
  transform: translateX(30px);
}

/* ── Generating ── */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--blush);
  border-top-color: var(--rose);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.generating-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.gen-sub { color: var(--text-light); }

.loading-tip-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--warm-white);
  border: 1px solid var(--blush);
  border-radius: 12px;
  text-align: center;
}

.loading-tip-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rose);
  display: block;
  margin-bottom: 0.35rem;
}

.loading-tip {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  transition: opacity 0.4s ease;
  min-height: 1.4em;
}

/* ── Result ── */
.result-card { max-width: 640px; text-align: left; }
.result-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  text-align: center;
  color: var(--rose);
  margin-bottom: 0.3rem;
}
.result-sub {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

#profile-output {
  background: var(--warm-white);
  border: 1px solid var(--blush);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 0.95rem;
  max-height: 60vh;
  overflow-y: auto;
}
#profile-output h1, #profile-output h2, #profile-output h3 {
  font-family: 'Playfair Display', serif;
  color: var(--rose);
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}
#profile-output h1 { font-size: 1.4rem; }
#profile-output h2 { font-size: 1.2rem; }
#profile-output h3 { font-size: 1.05rem; }
#profile-output p { margin-bottom: 0.8rem; }
#profile-output strong { color: var(--rose-dark); }
#profile-output em { font-style: italic; }
#profile-output ul, #profile-output ol { padding-left: 1.5rem; margin-bottom: 0.8rem; }

.result-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 200;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Static pages ── */
.page-content {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 3rem;
}

.static-card {
  max-width: 680px;
  text-align: left;
  animation: fadeUp 0.5s ease;
}

.static-card h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.static-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--rose);
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

.static-card p {
  line-height: 1.7;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.static-card ul, .static-card ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.static-card li {
  line-height: 1.7;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.static-card a {
  color: var(--rose);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 112, 106, 0.3);
  transition: border-color 0.2s;
}
.static-card a:hover { border-color: var(--rose); }

.policy-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.static-cta {
  text-align: center;
  margin-top: 2.5rem;
}

.contact-methods {
  margin-top: 1.5rem;
}

.contact-item {
  background: var(--warm-white);
  border: 1px solid var(--blush);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.contact-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--rose);
  margin-bottom: 0.4rem;
}

.contact-note {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ── Footer ── */
.site-footer {
  padding: 2rem 2rem 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: 680px;
  margin: 0 auto;
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--rose);
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--rose); }

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-light);
  opacity: 0.7;
}

/* ── Consent checkbox ── */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-light);
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--rose);
  cursor: pointer;
}

.consent-label a {
  color: var(--rose);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 112, 106, 0.3);
}
.consent-label a:hover { border-color: var(--rose); }

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: rgba(61, 44, 44, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.cookie-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cookie-inner p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.8);
  flex: 1;
}

.cookie-inner p a {
  color: #f5a87a;
  text-decoration: none;
}
.cookie-inner p a:hover { text-decoration: underline; }

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-accept {
  padding: 0.5rem 1.2rem;
  font-size: 0.82rem;
}

.cookie-decline {
  padding: 0.5rem 1.2rem;
  font-size: 0.82rem;
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
}
.cookie-decline:hover {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.9);
}

/* ── Footer legal ── */
.footer-legal {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

/* ── Character Guidance ── */
.char-guidance {
  font-size: 0.8rem;
  color: var(--text-light);
  background: var(--warm-white);
  border: 1px solid var(--blush);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
  line-height: 1.4;
}

/* ── Resume Banner ── */
.resume-banner {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 90;
  background: linear-gradient(135deg, var(--rose), var(--peach));
  padding: 0.75rem 1.5rem;
}

.resume-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.resume-inner p {
  flex: 1;
  font-size: 0.85rem;
  color: #fff;
}

.resume-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.resume-actions .btn-primary {
  background: #fff;
  color: var(--rose);
  box-shadow: none;
}
.resume-actions .btn-primary:hover { background: var(--cream); transform: none; box-shadow: none; }

.resume-actions .btn-secondary {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.85);
}
.resume-actions .btn-secondary:hover { border-color: #fff; color: #fff; }

/* ── Exit Intent Overlay ── */
.exit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.exit-overlay.open { display: flex; }

.exit-modal {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  box-shadow: 0 16px 60px rgba(0,0,0,0.2);
  padding: 2.5rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: fadeUp 0.3s ease;
}

.exit-modal h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--rose);
  margin-bottom: 0.5rem;
}

.exit-modal p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.exit-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ── Error ── */
.error-msg {
  color: var(--rose-dark);
  background: rgba(232, 112, 106, 0.1);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 560px) {
  .card { padding: 2rem 1.5rem; }
  h1 { font-size: 1.9rem; }
  #question-title { font-size: 1.3rem; }
  .site-nav { padding: 0.75rem 1rem; }
  .how-it-works { flex-direction: column; gap: 0.5rem; align-items: center; }
  .step-preview { flex-direction: row; gap: 0.6rem; width: 220px; justify-content: flex-start; }
  .footer-links { gap: 1rem; }
  .testimonials { grid-template-columns: 1fr; }
  .social-proof { flex-direction: column; gap: 0.4rem; }
  .cookie-inner { flex-direction: column; text-align: center; gap: 0.75rem; }
}
