/* ====================================================
   TravelSecure — Styles
   A Nomadier Product | travelsecure.co
   Brand: sage green / #4a6b5a · navy #1a1a2e · white
   Fonts: Fraunces (display) + DM Sans (body)
   ==================================================== */

:root {
  --sage:        #4a6b5a;
  --sage-light:  #6b9b7f;
  --sage-pale:   #e8f0eb;
  --sage-mist:   #f4f8f5;
  --navy:        #1a1a2e;
  --gray:        #4a5568;
  --gray-light:  #9aabbf;
  --border:      #d6e4da;
  --white:       #ffffff;
  --warn:        #c47c2b;
  --warn-bg:     #fef6ec;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow:      0 2px 16px rgba(74,107,90,0.10);
  --shadow-md:   0 8px 40px rgba(74,107,90,0.14);
}

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

html { scroll-behavior: smooth; }

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

em { font-style: italic; }
a { color: var(--sage); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- NAV ---- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.logo-mark { font-size: 18px; color: var(--sage); }
.logo-text { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600; color: var(--navy); }
.logo-family {
  font-size: 11px; font-weight: 400; color: var(--sage-light);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 2px 8px; letter-spacing: 0.03em;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-size: 14px; color: var(--gray); font-weight: 500; }
.nav-links a:hover { color: var(--sage); text-decoration: none; }

/* ---- HERO ---- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 60px);
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 60px;
  max-width: 1100px; margin: 0 auto;
  padding: 80px 24px 60px;
}

.hero-bg-art { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: 0.18;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #4a6b5a, transparent);
  top: -120px; right: -80px;
  animation: drift1 12s ease-in-out infinite alternate;
}
.orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #6b9b7f, transparent);
  bottom: 40px; left: 80px;
  animation: drift2 9s ease-in-out infinite alternate;
}
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(74,107,90,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,107,90,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(30px,-20px) scale(1.05); } }
@keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(-20px,15px); } }

.hero-inner { position: relative; z-index: 1; }
.hero-visual { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sage-pale); color: var(--sage);
  border-radius: 20px; padding: 6px 14px;
  font-size: 13px; font-weight: 500;
  margin-bottom: 28px;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sage-light);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.85); } }

.hero-heading {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--navy);
  margin-bottom: 20px;
}
.hero-heading em {
  font-style: italic;
  color: var(--sage);
}

.hero-sub {
  font-size: 17px; color: var(--gray);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sage); color: var(--white);
  border: none; border-radius: var(--radius);
  padding: 16px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(74,107,90,0.25);
}
.btn-primary:hover {
  background: #3d5a4b;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(74,107,90,0.32);
}

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 20px;
  margin-top: 24px;
  font-size: 13px; color: var(--sage-light);
  font-weight: 500;
}

/* SCORE PREVIEW CARD */
.score-preview {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.score-preview-ring { position: relative; width: 120px; height: 120px; }
.ring-svg { width: 120px; height: 120px; }
.score-preview-num {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Fraunces', serif;
  font-size: 2.2rem; font-weight: 600;
  color: var(--navy);
}
.score-preview-label {
  font-family: 'Fraunces', serif;
  font-size: 1rem; font-weight: 600;
  color: var(--sage);
  background: var(--sage-pale);
  padding: 4px 14px; border-radius: 20px;
}
.score-preview-items { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.preview-item {
  font-size: 13px; padding: 8px 12px;
  border-radius: 8px;
}
.preview-ok { background: var(--sage-pale); color: var(--sage); }
.preview-warn { background: var(--warn-bg); color: var(--warn); }

/* ---- JOURNEY BAR ---- */
.journey-bar {
  background: var(--sage-mist);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.journey-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap; justify-content: center;
}
.journey-step {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-radius: var(--radius);
  opacity: 0.5;
  transition: opacity 0.2s;
}
.journey-step.journey-done { opacity: 0.7; }
.journey-step.journey-active {
  opacity: 1;
  background: var(--white);
  border: 1.5px solid var(--sage);
  box-shadow: var(--shadow);
}
.journey-icon { font-size: 24px; }
.journey-label { font-size: 11px; color: var(--sage); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.journey-name { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 600; color: var(--navy); }
.journey-desc { font-size: 12px; color: var(--gray); }
.journey-arrow { font-size: 20px; color: var(--gray-light); }

/* ---- OVERLAY ---- */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,26,46,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.assessment-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 620px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(26,26,46,0.22);
  animation: slideUp 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.assess-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex; align-items: center; gap: 16px;
}
.assess-close {
  background: none; border: 1px solid var(--border);
  border-radius: 50%; width: 32px; height: 32px;
  cursor: pointer; font-size: 14px; color: var(--gray);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.assess-close:hover { background: var(--sage-pale); color: var(--sage); }

.progress-wrap { flex: 1; }
.progress-track {
  height: 6px; background: var(--sage-pale);
  border-radius: 3px; overflow: hidden;
  margin-bottom: 6px;
}
.progress-fill {
  height: 100%; background: var(--sage);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}
.progress-label { font-size: 12px; color: var(--gray); font-weight: 500; }

/* ASSESSMENT STEPS */
.assess-step {
  padding: 36px 32px 28px;
  animation: stepIn 0.25s ease;
}
.assess-step.hidden { display: none; }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

.step-icon { font-size: 32px; margin-bottom: 12px; }
.step-num { font-size: 12px; color: var(--sage); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.step-title { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 600; line-height: 1.3; color: var(--navy); margin-bottom: 8px; }
.step-sub { font-size: 14px; color: var(--gray); margin-bottom: 20px; }

/* OPTIONS */
.options-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.option-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.option-card:hover { border-color: var(--sage-light); background: var(--sage-mist); }
.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--sage);
  flex-shrink: 0; cursor: pointer;
}
.option-card:has(input:checked) {
  border-color: var(--sage);
  background: var(--sage-pale);
}
.option-text { font-size: 15px; color: var(--navy); line-height: 1.4; }
.option-text em { color: var(--gray); font-style: italic; font-size: 13px; }

/* BUTTONS */
.btn-next, .btn-submit {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sage); color: var(--white);
  border: none; border-radius: var(--radius);
  padding: 14px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  width: 100%;
  justify-content: center;
}
.btn-next:hover, .btn-submit:hover { background: #3d5a4b; transform: translateY(-1px); }
.btn-submit { background: var(--navy); }
.btn-submit:hover { background: #2a2a4a; }

/* NAME/EMAIL INPUTS */
.input-group { margin-bottom: 24px; display: flex; flex-direction: column; gap: 14px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-field { display: flex; flex-direction: column; gap: 6px; }
.input-field label { font-size: 13px; font-weight: 500; color: var(--gray); }
.input-field input {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; color: var(--navy);
  outline: none;
  transition: border-color 0.15s;
}
.input-field input:focus { border-color: var(--sage); }
.input-field input::placeholder { color: var(--gray-light); }

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

/* LOADING STATE */
.loading-wrap { text-align: center; padding: 20px 0; }
.loading-ring { width: 80px; height: 80px; margin: 0 auto 24px; }
.loading-ring svg { width: 80px; height: 80px; }
.loading-arc { animation: spin 1.4s linear infinite; transform-origin: center; }
@keyframes spin { from { stroke-dashoffset: 150; } to { stroke-dashoffset: -63; } }

.loading-steps { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.lstep { font-size: 13px; color: var(--gray-light); padding: 8px 14px; border-radius: 8px; transition: color 0.3s, background 0.3s; }
.lstep.active { color: var(--sage); background: var(--sage-pale); font-weight: 500; }
.lstep.done { color: var(--sage); }

/* ERROR STATE */
.error-wrap { text-align: center; padding: 20px 0; }
.error-icon { font-size: 48px; margin-bottom: 16px; }

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
}
.footer-brand { font-family: 'Fraunces', serif; font-size: 15px; color: var(--navy); display: flex; align-items: center; gap: 6px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--gray); }
.footer-links a:hover { color: var(--sage); text-decoration: none; }
.footer-copy { font-size: 12px; color: var(--gray-light); }

/* ---- RESPONSIVE ---- */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 60px 24px 40px;
  }
  .hero-visual { display: none; }
  .journey-inner { gap: 12px; }
  .journey-arrow { display: none; }
  .journey-step { width: 100%; max-width: 280px; }
}
@media (max-width: 480px) {
  .assess-step { padding: 28px 20px 20px; }
  .input-row { grid-template-columns: 1fr; }
  .hero-trust { flex-direction: column; gap: 8px; }
}
