/* ============================================================
   UNTETHERED VOYAGES — Quiz 3
   quiz3.css
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&display=swap');

/* ── Brittany Signature fallback ──────────────────────────── */
@font-face {
  font-family: 'BrittanySignature';
  src: local('BrittanySignature'), local('Brittany Signature');
  font-weight: normal;
  font-style: normal;
}
.brittany-script {
  font-family: 'BrittanySignature', cursive;
}

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  --navy:       #083145;
  --navy-mid:   #094e6d;
  --teal-deep:  #0f6e8c;
  --teal-dark:  #1c819b;
  --teal-mid:   #2a98a7;
  --teal-light: #5bc8cf;
  --orange:     #df6a3e;
  --orange-dark:#c85a30;
  --cream:      #eeeee4;
  --beige-dark: #ddddd2;
  --text-light: rgba(8, 49, 69, 0.45);
  --white:      #ffffff;
  --radius-lg:  10px;
  --shadow-md:  0 4px 16px rgba(8, 49, 69, 0.18);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Century Gothic', 'Futura', 'Trebuchet MS', sans-serif;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--navy);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-14px); }
}

/* ── Progress Bar ─────────────────────────────────────────── */
#progress-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(8, 49, 69, 0.12);
  z-index: 100;
}

#progress-fill {
  height: 100%;
  background: var(--orange);
  width: 0%;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Logo Bar ─────────────────────────────────────────────── */
#logo-bar {
  position: fixed;
  top: 4px;
  left: 0;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border-bottom: 1px solid rgba(8, 49, 69, 0.1);
  z-index: 90;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

/* ── Quiz Container ───────────────────────────────────────── */
#quiz-container {
  position: fixed;
  top: 56px; /* 4px progress + 52px logo */
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

/* ── Screens ──────────────────────────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.screen.active {
  display: flex;
  animation: fadeUp 0.42s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.screen.exiting {
  display: flex;
  animation: fadeOut 0.24s ease forwards;
  pointer-events: none;
}

/* ============================================================
   WELCOME SCREEN
   ============================================================ */
#screen-welcome {
  background: var(--cream);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
}

.welcome-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

/* Cream overlay on top of the background image */
#screen-welcome::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245, 241, 232, 0.68);
  z-index: 1;
  pointer-events: none;
}

.welcome-inner {
  position: relative;
  z-index: 2;
  max-width: 580px;
  width: 100%;
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Eyebrow */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}

/* Welcome headline */
.welcome-inner h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.18;
  margin-bottom: 1.1rem;
}

/* Divider */
.divider-line {
  width: 50px;
  height: 2px;
  background: var(--orange);
  margin: 0 auto 1.25rem;
  flex-shrink: 0;
}

/* Subheadline */
.subheadline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--teal-dark);
  line-height: 1.55;
  margin-bottom: 1rem;
}

/* Body copy */
.body-copy {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: rgba(8, 49, 69, 0.72);
  line-height: 1.7;
  margin-bottom: 1.75rem;
  max-width: 480px;
}

/* ============================================================
   BUTTONS
   ============================================================ */

/* Primary */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 9999px;
  padding: 0.85rem 2.2rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(223, 106, 62, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary:disabled {
  background: rgba(223, 106, 62, 0.4);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Ghost — navy */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid var(--navy);
  border-radius: 9999px;
  padding: 0.85rem 1.8rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-ghost:hover {
  background: var(--navy);
  color: var(--white);
}

/* Ghost light — cream (for dark bg) */
.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid rgba(238, 238, 228, 0.55);
  border-radius: 9999px;
  padding: 0.85rem 1.8rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.btn-ghost-light:hover {
  background: rgba(238, 238, 228, 0.12);
  border-color: var(--cream);
}

/* ============================================================
   QUESTION SCREENS — shared layout
   ============================================================ */

/* Text question screens — 2-column: feature image left, answers right */
.text-question-screen {
  background: var(--cream);
  flex-direction: row;
  align-items: stretch;
}

/* Left: decorative feature image */
.tq-feature {
  flex: 0 0 40%;
  position: relative;
  overflow: hidden;
  background: var(--navy);
}

.tq-feature-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Right: question + answers */
.tq-inner {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2.5rem 2rem 2rem;
  overflow-y: auto;
  gap: 0;
}

.q-label {
  display: none;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.6rem;
}

.q-text {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.28;
  margin-bottom: 0.5rem;
}

.q-subtext {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: rgba(8, 49, 69, 0.6);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

/* Answer button list */
.answer-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
}

.answer-btn {
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1.5px solid rgba(8, 49, 69, 0.15);
  border-radius: 9999px;
  padding: 0.9rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--navy);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.answer-btn:hover {
  border-color: var(--orange);
  background: rgba(223, 106, 62, 0.04);
}

.answer-btn.selected {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.answer-btn.selected:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}

/* ============================================================
   IMAGE QUESTION SCREENS (Q1, Q3, Q5, Q7) — full-width grid
   ============================================================ */
.img-question-screen {
  background: var(--cream);
  flex-direction: column;
  align-items: stretch;
}

.img-q-content {
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2rem 2rem;
  overflow-y: auto;
  height: 100%;
}

.img-q-content .q-label   { margin-bottom: 0.5rem; }
.img-q-content .q-text    { margin-bottom: 0.5rem; }
.img-q-content .q-subtext { margin-bottom: 1.5rem; }

.img-q-content .answers--image {
  margin-bottom: 1.75rem;
}

/* Image grid: 4 col × 2 row */
/* --- 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;
}

.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;
}

/* ============================================================
   Q10 — TEXTAREA SCREEN
   ============================================================ */
.textarea-question-screen {
  background: var(--cream);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem 5rem;
}

.textarea-inner {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.quiz-textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1.5px solid rgba(8, 49, 69, 0.2);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  transition: border-color var(--transition);
  outline: none;
  margin-bottom: 0.25rem;
}

.quiz-textarea:focus {
  border-color: var(--teal-dark);
}

.quiz-textarea::placeholder {
  color: rgba(8, 49, 69, 0.35);
}

.char-counter {
  font-size: 0.72rem;
  color: rgba(8, 49, 69, 0.45);
  text-align: right;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
}

.char-counter.warning {
  color: var(--orange);
}

/* ============================================================
   NAV ACTIONS
   ============================================================ */
.nav-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.img-q-content .nav-actions,
.textarea-question-screen .nav-actions {
  justify-content: center;
}

.nav-actions-center {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   EMAIL CAPTURE SCREEN
   ============================================================ */
#screen-email {
  background: var(--navy);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.email-inner {
  max-width: 500px;
  width: 100%;
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

#screen-email .eyebrow {
  color: var(--teal-dark);
  margin-bottom: 0.75rem;
}

#screen-email h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.22;
  margin-bottom: 0.9rem;
}

#screen-email p {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: rgba(238, 238, 228, 0.72);
  line-height: 1.65;
  margin-bottom: 1.75rem;
  max-width: 400px;
}

.email-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#email-input {
  width: 100%;
  padding: 0.9rem 1.4rem;
  border: 1.5px solid rgba(238, 238, 228, 0.3);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  text-align: center;
}

#email-input::placeholder {
  color: rgba(238, 238, 228, 0.4);
}

#email-input:focus {
  border-color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.11);
}

#email-input.error {
  border-color: var(--orange);
}

.privacy-note {
  font-family: var(--font-sans);
  font-size: 0.72rem !important;
  color: rgba(238, 238, 228, 0.42) !important;
  line-height: 1.5 !important;
  margin-bottom: 0 !important;
}

/* ============================================================
   RESULTS SCREEN
   ============================================================ */
#screen-results {
  background: var(--navy);
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  flex-direction: column;
}

.results-inner {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#result-eyebrow {
  color: var(--teal-dark);
  margin-bottom: 1.5rem;
}

/* Lookbook cover */
#lookbook-cover {
  width: min(280px, 82%);
  aspect-ratio: 1401 / 1812;
  position: relative;
  border-radius: 3px;
  margin: 0 auto 1.75rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  background: var(--navy-mid);
  flex-shrink: 0;
  align-self: center;
}

#lookbook-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 3px;
}

#lookbook-cover .cover-placeholder {
  color: rgba(238,238,228,0.3);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 1rem;
  font-family: var(--font-sans);
}

/* Result name / headline */
#result-name {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.18;
  margin-bottom: 1rem;
}

/* Result divider */
#result-divider {
  width: 50px;
  height: 2px;
  background: var(--orange);
  margin: 0 auto 1.5rem;
}

/* Result copy */
#result-copy-container {
  margin-bottom: 2rem;
  text-align: left;
  width: 100%;
}

.result-para {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: rgba(238, 238, 228, 0.82);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.result-para:last-child {
  margin-bottom: 0;
}

/* Sign-off */
.happy-sailing {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  gap: 0.75rem;
}

.happy-sailing-plain {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: rgba(238, 238, 228, 0.65);
  line-height: 1.4;
}

.happy-sailing-script {
  display: block;
  font-family: 'BrittanySignature', cursive;
  font-size: 2.2rem;
  color: var(--orange);
  line-height: 1.2;
}

/* CTA */
.result-cta {
  margin-top: 6px;
  margin-bottom: 0.85rem;
}

.result-cta-note {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: rgba(238, 238, 228, 0.5);
  line-height: 1.55;
  margin-bottom: 0;
}

/* Aspirational nudge */
.aspirational-nudge {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(238, 238, 228, 0.2);
  border-radius: 4px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: rgba(238, 238, 228, 0.8);
  line-height: 1.7;
  width: 100%;
}

.aspirational-nudge a {
  color: var(--cream);
  text-decoration: underline;
}

.aspirational-nudge a:hover {
  color: var(--teal-dark);
}

/* ============================================================
   UTILITY / SHARED
   ============================================================ */

/* Skip email link */
.skip-link {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: rgba(238, 238, 228, 0.45);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  margin-top: 0.5rem;
  transition: color var(--transition);
}

.skip-link:hover {
  color: rgba(238, 238, 228, 0.75);
}

/* Welcome error */
#welcome-error {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--orange);
  margin-top: 0.75rem;
  text-align: center;
}

/* ============================================================
   MOBILE — max-width: 720px
   ============================================================ */
@media (max-width: 720px) {

  /* Text question screens: stack vertically, image on top */
  .text-question-screen {
    flex-direction: column;
  }

  .tq-feature {
    flex: 0 0 220px;
    height: 220px;
    width: 100%;
  }

  .tq-inner {
    flex: 1 1 auto;
    padding: 1.75rem 1rem 4.5rem;
    overflow-y: visible;
  }

  /* Image question screens: full-width, compact padding */
  .img-q-content {
    padding: 1.5rem 1rem 1.5rem;
  }

  /* Keep 4-col grid on mobile for compactness */
  .answers--image {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .welcome-inner {
    padding: 2rem 1.25rem;
  }

  .welcome-inner h1 {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }

  .textarea-question-screen {
    padding: 1.75rem 1rem 4.5rem;
  }

  .results-inner {
    padding: 2rem 1.25rem 4rem;
  }

  .email-inner {
    padding: 2rem 1.25rem;
  }

  #result-name {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  .q-text {
    font-size: clamp(1.1rem, 4.5vw, 1.45rem);
  }
}

/* Very small screens: 2-col image grid */
@media (max-width: 400px) {
  .answers--image {
    grid-template-columns: repeat(2, 1fr);
  }
}
