:root {
  --bg: #F4DCD4;
  --bg-2: #FAF6F2;
  --card: #FFFFFF;
  --text: #332C2F;
  --muted: #5C5457;
  --brand-100: #F4DCD4;
  --brand-200: #F4C9BF;
  --brand-300: #FBAD9A;
  --brand-400: #FAA091;
  --brand-500: #F49580;
  --brand-600: #E87C69;
  --brand-700: #F16444;
  --brand-800: #F44831;
  --accent: var(--brand-200);
  --accent-strong: var(--brand-600);
  --accent-pop: var(--brand-800);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; } /* avoid iOS font zoom */

body {
  margin: 0;
  font-family: helvetica, "Helvetica Neue", Arial, sans-serif;
  color: var(--muted);
  background: var(--brand-200); /* CHANGED: solid background (no full-page gradient) */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* respect iPhone notches / safe areas */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* NEW: top wrapper holds the gradient behind hero + quiz */
.page-top {
  background: linear-gradient(180deg, var(--brand-100) 0%, var(--brand-100) 320px, var(--brand-200) 100%);
}

img { max-width: 100%; height: auto; } /* prevent overflow */

h1, h2, h3 { color: var(--text); letter-spacing: .2px; }

/* Hero */
.hero-logo {
  display: block;
  max-width: 300px;
  height: auto;
  margin: 0 auto 1rem;
}
@media (max-width: 480px) {
  .hero-logo { max-width: 250px; }
}

.hero {
  position: relative;
  /* FIX: remove forced tall hero so it doesn't push the quiz down */
  min-height: auto !important; /* was 55vh */
  display: grid;
  place-items: center;
  color: var(--text);
  overflow: hidden;
  background: transparent !important;        /* CHANGED */
  background-attachment: scroll !important;  /* CHANGED: no fixed artifacts */
}
/* FIX: tighten hero bottom padding so hero→section seam is snug */
.hero__inner { text-align: center; padding: 4rem 1.25rem 1.5rem; max-width: 920px; }
.badge {
  display:inline-block; padding:.4rem .75rem; border-radius:999px;
  background: #ffffffaa; color: var(--text); font-size:1rem;
  margin-bottom: .75rem; border:1px solid #ffffff88;
}
.hero h1 { font-size: clamp(2rem, 3vw + 1rem, 3.25rem); margin:.25rem 0 1.75rem; }
.hero p  { font-size: clamp(1rem, .6vw + .9rem, 1.125rem); max-width: 720px; margin: 0 auto 0.75rem; }

/* Section & Card */
.section { padding: 3.5rem 1rem; }
/* FIX: first section after hero should not add a big top gap */
.hero + .section { padding-top: 1rem !important; margin-top: 0 !important; }

.quiz-wrap {
  max-width: 720px; margin: 0 auto; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1rem, 2.5vw, 2rem);
}

/* Progress */
.progress { height: 6px; background: #e8e2df; border-radius: 999px; overflow:hidden; margin-bottom:1rem; }
.progress > span { display:block; height:100%; background: var(--accent); width:0%; transition: width .35s ease; }

/* Q&A */
.question { margin: .25rem 0 1.25rem; font-size: clamp(1.1rem, .9vw + 1rem, 1.35rem); color: var(--text); }
.options { display: grid; gap: .65rem; margin-bottom: 1rem; }
.option-btn {
  text-align: left; padding: 0.9rem 1rem; border: 1px solid #F44831;
  background: #fff0f0; border-radius: 12px; cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
  min-height: 44px; /* comfortable tap target */
}
.option-btn:hover { box-shadow: 0 6px 20px rgba(0,0,0,.06); border-color: var(--accent); }
.option-btn:active { transform: translateY(1px); }

/* Buttons */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  padding: .85rem 1.2rem; border-radius: 12px; border: 0; cursor: pointer;
  font-weight: 600; letter-spacing:.2px; min-height: 44px;
}
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: var(--accent-pop); }
.btn-outline { background: transparent; border:1px solid var(--accent-strong); color: var(--accent-strong); }
.btn-outline:hover { background: var(--accent-strong); color:#fff; border-color: var(--accent-strong); }

/* Disabled/Loading button state */
.btn:disabled,
.btn[disabled] {
  opacity: .65;
  cursor: not-allowed;
  filter: saturate(.8);
}

/* Forms */
form label { display:block; margin:.5rem 0 .25rem; color: var(--text); font-weight:600; min-height: 22px; }
form input {
  width:100%; padding:.8rem 1rem; border:1px solid #e9e2df; border-radius:12px;
  transition: border-color .2s ease, box-shadow .2s ease;
  font-size: 16px; /* prevent iOS zoom on focus */
  min-height: 44px;
}
form input:hover { border-color: var(--accent); }
form input:focus,
form input:focus-visible {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-strong) 25%, transparent);
}

/* Links in recommendation lists */
ul a { text-decoration: none; border-bottom: 1px solid #e9e2df; }
ul a:hover { border-bottom-color: var(--accent-strong); }

/* Layout helpers */
.links-row { display:flex; gap:.75rem; flex-wrap:wrap; }

/* Modal */
.modal {
  position: fixed; inset: 0; display:none; align-items:center; justify-content:center;
  background: rgba(0,0,0,.4); padding:1rem; z-index: 50;
}
.modal__card {
  background:#fff; border-radius:16px; padding: 1.25rem 1.25rem;
  max-width: 520px; width:100%; text-align:center; box-shadow: var(--shadow);
}
.modal.show { display: flex; }

/* Parallax transition strip */
.parallax-strip {
  display: none !important;          /* CHANGED: remove strip that caused seam */
  height: 0 !important;
  margin: 0;
  background: transparent !important;
  background-attachment: scroll !important;
}

/* Accessibility: focus rings */
.option-btn:focus-visible,
.btn:focus-visible,
form input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Mobile Safari parallax fix */
@media (max-width: 768px) {
  .hero, .parallax-strip { background-attachment: scroll !important; }
}

/* --- Mobile optimization pack --- */
@media (max-width: 480px) {
  /* FIX: smaller hero bottom padding on phones */
  .hero__inner { padding: 3rem 1rem 1.5rem; }
  .hero h1 { font-size: clamp(1.6rem, 5.2vw + .6rem, 2.2rem); }
  .hero p  { font-size: .5rem; }

  .hero-logo { max-width: 128px; margin-bottom: .75rem; }

  .section { padding: 2rem 0.875rem; }

  .quiz-wrap {
    padding: 1rem;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(0,0,0,.07);
  }

  .progress { height: 5px; }

  .question { font-size: 1.05rem; margin-bottom: 1rem; }
  .options { gap: .55rem; }
  .option-btn { padding: .8rem .9rem; border-radius: 12px; }

  .links-row { gap: .5rem; }

  form label { margin: .45rem 0 .2rem; }
  form input { padding: .75rem .9rem; border-radius: 12px; }
}

/* Very narrow devices */
@media (max-width: 360px) {
  .hero__inner { padding: 3.25rem .75rem 1.5rem; }
  .hero-logo { max-width: 112px; }
  .quiz-wrap { padding: .85rem; }
  .option-btn { padding: .7rem .8rem; }
}

/* Dynamic viewport height support */
@supports (height: 100dvh) {
  /* FIX: keep hero from re-growing due to dvh rule */
  .hero { min-height: auto; } /* was 55dvh */
}

/* 2-col options on wider screens */
@media (min-width: 640px){
  .options { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  /* FIX: reduce desktop bottom padding a bit */
  .hero__inner { padding: 5rem 1.5rem 2.5rem; }
  .hero h1 { font-size: clamp(2.25rem, 3vw + 1.25rem, 3.5rem); }
  .hero p { font-size: clamp(1.125rem, .8vw + 1rem, 1.25rem); }
}
@media (min-width: 1024px) {
  .hero__inner { max-width: 960px; }
  .quiz-wrap { max-width: 800px; }
}

/* Form field spacing and width improvements */
form input[type="text"],
form input[type="email"],
form input[type="tel"] {
  width: 100%;
  max-width: 500px; /* Keeps it from stretching too wide on large screens */
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
}

/* Center the form inputs within the container */
form {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Or 'center' if you want them centered */
  padding: 0 15px; /* Adds space from the edge of the container */
}

/* Product Recommendations Section */
.product-recommendations {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Default: 2 per row */
  gap: 20px;
  margin-top: 20px;
  justify-items: center; /* Center content in each cell */
}

.product-item {
  text-align: center;
  max-width: 120px;
}

.product-item img {
  width: 100px;
  height: auto;
  border-radius: 6px;
  border: 1px solid #eee;
  background: #fff;
  padding: 5px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-item img:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.product-item p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Medium screens (tablets) */
@media (min-width: 768px) {
  .product-recommendations {
    grid-template-columns: repeat(3, 1fr); /* 3 per row on tablets */
  }
}

/* Large screens (desktops) */
@media (min-width: 1024px) {
  .product-recommendations {
    grid-template-columns: repeat(5, 1fr); /* 5 per row on desktops */
  }
}

/* Center and style the result heading */
#quiz h2.question {
  text-align: left;
  margin: 0 auto 1.25rem;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
}

/* Highlight only the dynamic skin type part */
#quiz h2.question .result-highlight {
  font-weight: 700;
  color: var(--accent-pop);
  padding: 0 .35rem;
  border-radius: 8px;
  background: rgba(244, 72, 49, 0.07); /* subtle brand tint */
  box-shadow: 0 2px 8px rgba(244, 72, 49, 0.15); /* faint glow */
  font-size: 1.6rem;
  letter-spacing: .3px;
}

/* Result Section Buttons Overhaul */
#quiz .btn {
  font-size: 1rem;                 /* same size across all */
  font-weight: 600;                /* ensure bold */
  color: var(--accent-pop);        /* text color accent-pop */
  border-radius: 12px;
  padding: .85rem 1.2rem;
  min-height: 44px;
  letter-spacing: .2px;
  border: 1px solid var(--accent-pop); /* outline accent-pop */
  background: transparent;         /* default outline style */
  transition: all 0.25s ease;
}

/* Results Section Buttons (merged overrides) */
#quiz .links-row {
  display: flex;
  flex-direction: column;   /* stack vertically */
  gap: 0.75rem;
  align-items: stretch;
}

#quiz .btn {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-pop);
  border: 1px solid var(--accent-pop);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: transparent;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

#quiz .btn:hover {
  background: var(--accent-pop);
  color: #fff;
  box-shadow: 0 4px 10px rgba(244, 72, 49, 0.25);
  transform: translateY(-1px);
}

#quiz .btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(244, 72, 49, 0.2);
}

/* Primary action button (Shop) stays filled by default */
#quiz .btn-primary {
  background: var(--accent-pop);
  color: #fff;
  border: 1px solid var(--accent-pop);
}

#quiz .btn-primary:hover {
  background: var(--accent-pop);
  color: #fff;
}

/* Ensure Retake Quiz button matches style */
#quiz #restart-btn-result.btn {
  font-size: 0.95rem;
  font-weight: 600;
}
#quiz .btn:hover,
#quiz .btn-outline:hover {
  text-decoration: none;  /* keep it clean on hover */
}
#quiz .btn,
#quiz .btn-outline {
  text-decoration: none;  /* removes underline */
}
/* Default quiz action row: small, left, no stretching */
#quiz .links-row {
  display: flex;
  flex-direction: row;        /* ensure row for non-result screens */
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Make Back / Start Over small and shrink-to-fit */
#quiz #back-btn,
#quiz #restart-btn {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  min-height: auto;
  border-radius: 6px;
  border: 1px solid var(--accent-pop);
  color: var(--accent-pop);
  background: transparent;
  box-shadow: none;
  flex: 0 0 auto;             /* don't stretch */
  width: auto;                /* shrink to content */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#quiz #back-btn:hover,
#quiz #restart-btn:hover {
  background: var(--accent-pop);
  color: #fff;
}

/* Results-only vertical stack (new class) */
#quiz .results-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
/* Ensure all result CTA buttons (Shop, Book, Retake) are the same height */
#quiz .results-actions .btn {
  min-height: 38px;   /* uniform height */
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Footer buttons row in results */
#quiz .result-footer-buttons {
  display: flex;
  justify-content: space-between; /* 👈 pushes them apart */
  align-items: center;
  margin-top: 1rem;
}

/* Make sure both buttons size nicely */
#quiz .result-footer-buttons .btn {
  min-height: 48px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
}

.seo-blurb {
  text-align: center;
  max-width: 750px;
  margin: 2rem auto;
  padding-bottom: 5rem; /* space from bottom of page */
  color: #444; /* subtle text color */
  font-size: 1rem;
  line-height: 1.6;
  background: transparent !important; /* CHANGED: let the page background show through */
}

.seo-blurb h2 {
  color: #F44831; /* brand-800 */
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.faq {
  max-width: 750px;
  margin: 2rem auto;
  padding: 1rem;
  background: transparent !important; /* CHANGED */
}

.faq h2 {
  color: #F44831; /* brand-800 */
  text-align: center;
  margin-bottom: .5rem;
}

.faq h3 {
  margin-top: 1.25rem;
  font-size: 1.05rem;
}

.faq p {
  color: #444;
  line-height: 1.6;
}

.footer {
  text-align: center;
  background: #fff5f5; /* soft on-brand tint */
  color: var(--brand-800);
  padding: 1.25rem 1rem 2.25rem;
  margin-top: auto;
}

.footer a {
  color: var(--brand-800);
  text-decoration: underline;
}
.footer a:hover { text-decoration: none; }

.footer .social {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-top: .5rem;
}

/* Let the link color control the icon color */
.footer .social a {
  color: var(--brand-800);     /* brand-800 drives icon color */
}

.footer .social svg {
  width: 28px;
  height: 28px;
  fill: currentColor;          /* <-- key change */
  display: block;
  transition: transform .15s ease, opacity .15s ease;
}

.footer .social a:hover svg {
  transform: translateY(-1px);
  opacity: .85;
}


