/* ============================================
   UNTETHERED VOYAGES — Quiz 2 Styles
   ============================================ */

/* === CUSTOM PROPERTIES === */
:root {
  --navy: #083145;
  --orange: #df6a3e;
  --teal: #0f6e8c;
  --teal-mid: #1c819b;
  --teal-light: #5bc8cf;
  --deep: #094e6d;
  --beige: #eeeee4;
  --beige-dark: rgba(91, 200, 207, 0.18);
  --white: #ffffff;
  --text-dark: #083145;
  --text-mid: #094e6d;
  --text-light: #1c819b;
  --border: rgba(8, 49, 69, 0.18);

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --font-script: 'Great Vibes', cursive;

  --radius: 4px;
  --radius-lg: 8px;
  --transition: 200ms ease;
  --shadow: 0 2px 12px rgba(8, 49, 69, 0.10);
  --shadow-md: 0 4px 24px rgba(8, 49, 69, 0.14);

  --header-h: 44px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: var(--beige);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input {
  font-family: inherit;
}

/* === SITE HEADER === */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--beige);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.site-wordmark {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
}

/* === SCREENS === */
.screen {
  display: none;
  min-height: 100vh;
  padding-top: var(--header-h);
}

.screen--active {
  display: block;
}

/* === LOGO === */
.logo {
  max-width: 200px;
  height: auto;
  margin: 0 auto;
}

.logo--small {
  max-width: 140px;
}

/* ============================================
   INTRO SCREEN
   ============================================ */
#screen-intro {
  background-color: var(--navy);
}

#screen-intro.screen--active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-container {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 60px 32px;
  text-align: center;
}

.intro-container .logo-wrap {
  display: none;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}

.headline {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 16px;
}

.subhead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(17px, 2.5vw, 20px);
  color: var(--teal);
  margin-bottom: 24px;
}

.body-text {
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 50px;
  padding: 16px 36px;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.btn--primary {
  background-color: var(--orange);
  color: var(--white);
  border: 2px solid var(--orange);
}

.btn--primary:hover {
  background-color: #c05233;
  border-color: #c05233;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(223, 106, 62, 0.35);
}

.btn--secondary {
  background-color: transparent;
  color: var(--text-mid);
  border: 2px solid var(--border);
  font-size: 12px;
}

.btn--secondary:hover {
  border-color: var(--text-mid);
  color: var(--text-dark);
}

/* ============================================
   QUIZ SCREEN
   ============================================ */
#screen-quiz {
  background-color: var(--white);
}

#screen-quiz.screen--active {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding-top: var(--header-h);
}

/* --- Side Panel (sticky decorative image for text questions) --- */
.side-panel {
  width: 40vw;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}

.side-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.side-panel--hidden {
  display: none;
}

/* Wider padding when side panel is visible */
#screen-quiz.has-side-panel .quiz-container {
  padding: 0 40px 80px;
}

.quiz-container {
  flex: 1;
  min-width: 0;
  padding: 0 24px 80px;
}

/* --- Quiz Header --- */
.quiz-header {
  padding: 28px 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  position: sticky;
  top: var(--header-h);
  background: var(--white);
  z-index: 10;
}

.quiz-header .logo {
  flex-shrink: 0;
}

.progress-bar {
  flex: 1;
  height: 3px;
  background-color: var(--beige-dark);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background-color: var(--orange);
  border-radius: 2px;
  transition: width 400ms ease;
  width: 0%;
}

.progress-text {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Question --- */
.question {
  animation: fadeInUp 320ms ease both;
}

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

.question__text {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 400;
  color: var(--navy);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.35;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Text Answers --- */
.answers--text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}

.answer--text {
  width: 100%;
  text-align: left;
  padding: 18px 24px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-dark);
  background-color: var(--beige);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.answer--text:hover {
  border-color: var(--orange);
  background-color: rgba(223, 106, 62, 0.06);
  transform: translateX(3px);
}

.answer--text.selected {
  border-color: var(--orange);
  background-color: rgba(223, 106, 62, 0.12);
  color: var(--navy);
  font-weight: 400;
}

/* --- Image Answers --- */
.answers--image {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}

.answer--image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid transparent;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  padding: 0;
  background: var(--beige-dark);
}

.answer--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

.answer--image:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.answer--image:hover img {
  transform: scale(1.04);
}

.answer--image.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px var(--orange), var(--shadow-md);
}

.answer--image.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: var(--orange);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

/* Image placeholder when no image is available */
.answer--image .img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--beige-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 13px;
  text-align: center;
  padding: 16px;
}

/* ============================================
   EMAIL CAPTURE SCREEN
   ============================================ */
#screen-email {
  background-color: var(--navy);
}

#screen-email.screen--active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-container {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  padding: 60px 32px;
  text-align: center;
}

.email-container .logo {
  margin-bottom: 40px;
}

.email-container .eyebrow {
  margin-bottom: 12px;
}

.email-container .headline {
  margin-bottom: 16px;
}

.email-container .body-text {
  margin-bottom: 36px;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  width: 100%;
}

.form-group input {
  width: 100%;
  padding: 16px 20px;
  font-size: 15px;
  color: var(--text-dark);
  background-color: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  outline: none;
  transition: border-color var(--transition);
}

.form-group input::placeholder {
  color: var(--text-light);
}

.form-group input:focus {
  border-color: var(--orange);
}

.email-form .btn--primary {
  margin-top: 8px;
  width: 100%;
  font-size: 13px;
}

.privacy-note {
  margin-top: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.02em;
}

/* ============================================
   RESULTS SCREEN
   ============================================ */
#screen-results {
  background-color: var(--beige);
}

#screen-results.screen--active {
  display: block;
}

.results-header {
  background-color: var(--navy);
  padding: 28px 24px;
  text-align: center;
}

.results-container > .eyebrow {
  text-align: center;
  padding: 32px 24px 0;
}

.hero-wrap {
  width: 816px;
  height: 1056px;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.results-hero {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.results-hero-placeholder {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
}

.results-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  text-align: center;
}

.results-headline {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.15;
}

.results-opening {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--teal);
  margin-bottom: 24px;
  line-height: 1.5;
}

.results-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--navy);
  margin-bottom: 28px;
}

.results-closing {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-style: italic;
}

.results-closing:last-of-type {
  margin-bottom: 56px;
}

.results-signoff {
  margin-bottom: 32px;
  line-height: 1.4;
}

.results-signoff .script {
  font-family: var(--font-script);
  font-size: 42px;
  color: var(--orange);
  display: block;
}

.results-confirmation {
  font-size: 14px;
  color: var(--teal);
  letter-spacing: 0.01em;
  margin-bottom: 36px;
}

#results-cta {
  display: inline-block;
  margin-bottom: 16px;
}

.schedule-call {
  font-size: 13px;
  color: var(--navy);
  letter-spacing: 0.04em;
  margin-top: 8px;
  margin-bottom: 0;
}

.secondary-destination {
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--navy);
  line-height: 1.6;
}

.secondary-destination a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 110, 140, 0.4);
  transition: border-color var(--transition), color var(--transition);
}

.secondary-destination a:hover {
  color: var(--navy);
  border-color: var(--navy);
}


/* ============================================
   DIVIDER
   ============================================ */
.divider {
  width: 48px;
  height: 2px;
  background-color: var(--orange);
  margin: 24px auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  /* On mobile, quiz screen stacks vertically */
  #screen-quiz.screen--active {
    flex-direction: column;
  }

  /* Side panel collapses to a landscape banner at the top */
  .side-panel {
    width: 100%;
    height: 45vw;
    max-height: 320px;
    position: relative;
    top: auto;
  }

  #screen-quiz.has-side-panel .quiz-container {
    padding: 0 24px 80px;
  }
}

@media (max-width: 600px) {
  .quiz-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .quiz-header .logo--small {
    max-width: 110px;
  }

  .progress-text {
    width: 100%;
    text-align: right;
    font-size: 11px;
  }

  .answers--image {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .answer--image {
    aspect-ratio: 1;
  }

  .intro-container,
  .email-container {
    padding: 48px 24px;
  }

  .results-content {
    padding: 36px 20px 60px;
  }

  .results-hero {
    height: 260px;
  }

  .btn {
    padding: 14px 28px;
  }
}


/* ============================================
   LOADING STATE
   ============================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 400ms ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   ERROR STATE
   ============================================ */
.error-banner {
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.error-banner.visible {
  display: block;
}
