/* =========================================================================
   LPA HOLIDAY COMPASS — STYLES
   =========================================================================
   Token system:
   Color   ink #0B2318, forest #17402E, gold #E7B740, sand #F7F1E3,
           clay #A8672B, sage #E4ECE2, white #FFFFFF
   Type    display: 'Fraunces' (editorial serif, used at large sizes only)
           body/UI: 'Public Sans'
   Signature: the compass ring — a rotating-needle progress dial used for
   the quiz, echoed as a badge on the hero. It's the one recognisable motif
   that ties "Holiday Compass" to something the user actually sees moving.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --ink: #0B2318;
  --forest: #17402E;
  --gold: #E7B740;
  --gold-dark: #C99A2E;
  --sand: #F7F1E3;
  --clay: #A8672B;
  --sage: #E4ECE2;
  --white: #FFFFFF;
  --muted: #6B7A70;
  --radius-lg: 0;
  --radius-md: 0;
  --radius-sm: 0;
  --shadow-soft: 0 20px 45px rgba(11,35,24,.12);
  --shadow-strong: 0 28px 65px rgba(11,35,24,.28);
  --font-display: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--sand);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: 16px; }
a { color: inherit; }

/* Accessibility: visible focus everywhere a person can actually tab to.
   [tabindex="-1"] is deliberately excluded: every use of it in this app
   (see app.js's focusMain()) is a static heading given focus only
   programmatically, for screen-reader announcement on page transitions —
   never something a person can reach by pressing Tab. Without this
   exclusion, those headings matched [tabindex]:focus-visible and showed
   a visible outline on every page load/transition (reported as "orange
   box" around the hero heading) purely because they carry a tabindex
   attribute, not because a person focused them by keyboard. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 2px;
}
/* Browsers apply their own default focus ring on plain :focus regardless
   of :focus-visible — excluding tabindex="-1" from the rule above stops
   *our* outline, but the browser's native one still needs suppressing
   here, specifically and only for these programmatic-focus-only elements. */
[tabindex="-1"]:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

.container { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  border: 0; border-radius: 0; padding: 15px 26px; font-weight: 700;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 16px; line-height: 1;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: var(--shadow-soft); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-outline { background: rgba(255,255,255,.1); color: var(--white); border: 1px solid rgba(255,255,255,.4); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--sage); }
.btn-block { width: 100%; justify-content: center; margin-top: 20px; }

/* ---------- Hero ---------- */
.hero {
  background-image:
    linear-gradient(100deg, rgba(11,35,24,.94) 0%, rgba(11,35,24,.85) 30%, rgba(11,35,24,.55) 58%, rgba(11,35,24,.28) 100%),
    url('../assets/hero-bg.jpg');
  background-size: cover;
  background-position: center 68%;
  background-repeat: no-repeat;
  color: var(--white);
  padding-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.header-row { display: flex; justify-content: space-between; align-items: center; padding: 34px 0; position: relative; z-index: 3; }
.logo-card { background: transparent; border-radius: 0; padding: 0; box-shadow: none; display: inline-flex; align-items: center; border: 0; cursor: pointer; }
.logo-card img {
  filter:
    drop-shadow(1px 0 0 rgba(11,35,24,.55))
    drop-shadow(-1px 0 0 rgba(11,35,24,.55))
    drop-shadow(0 1px 0 rgba(11,35,24,.55))
    drop-shadow(0 -1px 0 rgba(11,35,24,.55))
    drop-shadow(0 2px 8px rgba(11,35,24,.3));
}
/* Full-colour logo on light backgrounds needs no outline — the outline
   treatment above exists only to keep the white logo legible. */
.logo-card-light img { filter: drop-shadow(0 2px 6px rgba(11,35,24,.08)); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 40px; position: relative; z-index: 2; }
.badge {
  display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08); border-radius: 0; padding: 9px 16px; font-size: 13px;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(38px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.02em; margin: 22px 0 0;
}
.hero-lead { font-size: 19px; line-height: 1.65; color: rgba(255,255,255,.82); max-width: 560px; margin-top: 18px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.trust-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 10px; max-width: 520px; }
.trust-list li { position: relative; padding-left: 24px; font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.5; }
.trust-list li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

.floating { position: relative; height: 420px; }
.float-card {
  position: absolute; width: 230px; background: var(--white); border-radius: 0; padding: 10px;
  box-shadow: var(--shadow-strong); color: var(--ink); animation: bob 6s ease-in-out infinite;
}
.float-card img { height: 150px; width: 100%; object-fit: cover; border-radius: 0; }
.float-card figcaption { padding: 10px 8px 4px; display: flex; flex-direction: column; gap: 2px; }
.float-card figcaption strong { font-size: 16px; }
.float-card figcaption span { font-size: 12px; color: var(--clay); font-weight: 700; }
.float-card-0 { left: 0; top: 10px; transform: rotate(-6deg); }
.float-card-1 { right: 0; top: -10px; transform: rotate(5deg); animation-delay: .8s; }
.float-card-2 { left: 70px; bottom: -10px; transform: rotate(2deg); animation-delay: 1.5s; }
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- Sections ---------- */
.section { padding: 68px 0; }
.eyebrow { color: var(--clay); font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.gold { color: var(--gold); }
.section h2, .quiz-title, .result-hero h1, .white-panel h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; }
.section h2 { font-size: clamp(28px, 3.6vw, 46px); margin: 10px 0 12px; }
.section-lead { color: var(--muted); max-width: 740px; font-size: 17px; line-height: 1.7; }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.how-card { background: var(--white); border-radius: 0; padding: 26px; box-shadow: var(--shadow-soft); }
.how-index { font-family: var(--font-display); font-size: 28px; color: var(--gold-dark); }
.how-card h3 { margin: 10px 0 6px; font-size: 19px; }
.how-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 15px; }

.resort-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 30px; }
.resort-card { background: var(--white); border-radius: 0; overflow: hidden; box-shadow: var(--shadow-soft); transition: transform .2s ease, box-shadow .2s ease; display: block; text-decoration: none; color: inherit; }
.resort-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-strong); }
.resort-card img { height: 160px; width: 100%; object-fit: cover; }
.resort-card-body { padding: 16px 18px 20px; }
.resort-card-body h3 { margin: 0; font-size: 19px; }
.location { color: var(--clay); font-weight: 800; font-size: 13px; margin-top: 6px; letter-spacing: .02em; }
.center-cta { text-align: center; margin-top: 34px; }

.site-footer { background: var(--ink); color: rgba(255,255,255,.65); padding: 30px 0; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; }
.site-footer a { text-decoration: underline; color: rgba(255,255,255,.8); }

/* ---------- Quiz ---------- */
.quiz-page { min-height: 100vh; padding: 30px 0 70px; }
.quiz-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 44px; gap: 16px; }
.progress-wrap { text-align: right; }
.compass { margin-top: 6px; }
.compass-track { fill: none; stroke: var(--sage); stroke-width: 5; }
.compass-fill { fill: none; stroke: var(--clay); stroke-width: 5; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 32px 32px; transition: stroke-dashoffset .35s ease; }
.compass-needle path { fill: var(--gold-dark); transition: transform .35s ease; transform-origin: 32px 32px; }

.quiz-card { animation: fadeUp .28s ease-out; max-width: 880px; margin: 0 auto; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.quiz-title { text-align: center; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.08; margin: 0; }
.quiz-subtitle { text-align: center; color: var(--muted); font-size: 17px; line-height: 1.65; max-width: 640px; margin: 16px auto 0; }
.choice-note { text-align: center; margin-top: 12px; color: var(--clay); font-weight: 800; letter-spacing: .12em; font-size: 12px; text-transform: uppercase; }

.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 32px; }
.options.three { grid-template-columns: repeat(3, 1fr); }
.option {
  min-height: 84px; background: var(--white); border: 2px solid var(--sage); border-radius: 0;
  padding: 20px; text-align: left; font-size: 16px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.option:hover { transform: translateY(-3px); border-color: var(--clay); }
.option.selected { border-color: var(--gold); background: #FFF7E0; box-shadow: 0 16px 36px rgba(231,183,64,.22); }
.check { width: 28px; height: 28px; border: 1px solid #D7CBB2; border-radius: 0; display: grid; place-items: center; flex-shrink: 0; font-size: 13px; }
.option.selected .check { background: var(--ink); color: var(--white); border-color: var(--ink); }
.nav-actions { display: flex; justify-content: space-between; margin-top: 34px; }

/* ---------- Results ---------- */
.result-page { min-height: 100vh; padding: 26px 0 70px; background: var(--ink); }
.result-hero { background: rgba(255,255,255,.08); color: var(--white); border-radius: 0; padding: 32px; margin-top: 6px; }
.result-hero h1 { font-size: clamp(34px, 4.4vw, 58px); margin-top: 10px; }
.result-hero .why-line { max-width: 720px; color: rgba(255,255,255,.85); font-size: 18px; line-height: 1.6; margin-top: 14px; }
.price-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.price-figure { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--gold); }
.price-note { color: rgba(255,255,255,.6); font-size: 13.5px; }
.result-hero .fine-print.light { color: rgba(255,255,255,.6); font-size: 13.5px; font-style: normal; margin-top: 8px; max-width: 640px; }
.result-hero .next-step { color: rgba(255,255,255,.9); font-size: 15.5px; margin-top: 22px; }
.result-hero .next-step a { color: var(--gold); font-weight: 700; text-decoration: underline; }
.result-hero p { max-width: 880px; color: rgba(255,255,255,.78); font-size: 18px; line-height: 1.7; }

.results-panel { margin-top: 22px; background: var(--sand); color: var(--ink); border-radius: 0; padding: 26px; }
.result-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.match-card { background: var(--white); border-radius: 0; overflow: hidden; box-shadow: var(--shadow-soft); display: block; text-decoration: none; color: inherit; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.match-card:hover, .match-card:focus-visible { transform: translateY(-5px); box-shadow: var(--shadow-strong); }
.match-img { height: 190px; position: relative; }
.match-img img { width: 100%; height: 100%; object-fit: cover; }
.match-label { position: absolute; top: 14px; left: 14px; background: var(--gold); color: var(--ink); padding: 8px 12px; border-radius: 0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.match-body { padding: 20px; }
.match-body h3 { margin: 0; font-size: 24px; font-family: var(--font-display); }
.why-title { margin-top: 16px; color: var(--clay); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 800; }
.match-body p { color: var(--muted); line-height: 1.6; font-size: 14.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag { background: var(--sage); color: var(--forest); border-radius: 0; padding: 7px 11px; font-size: 12px; font-weight: 800; }
.info-box { background: var(--white); border-radius: 0; padding: 20px; margin-top: 20px; }
.info-box p { color: var(--muted); line-height: 1.65; margin: 8px 0 0; font-size: 14.5px; }

.result-page .white-panel { margin-top: 22px; }
.white-panel { background: var(--white); color: var(--ink); border-radius: 0; padding: 28px; box-shadow: var(--shadow-strong); }
.white-panel h2 { font-size: 32px; margin: 8px 0; }
.note { border-radius: 0; padding: 20px; margin-top: 16px; background: #FFF7E0; }
.note.soft { background: var(--sage); }
.note.warm { background: var(--sand); }
.note h3 { margin: 6px 0 4px; font-size: 19px; }
.note p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.fine-print { font-size: 12.5px; color: var(--muted); margin-top: 10px; font-style: italic; }


/* ---------- Lead form ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: block; margin-top: 16px; font-size: 14px; font-weight: 700; }
.form input, .form select, .form textarea {
  width: 100%; border: 1px solid #D9CDB2; border-radius: 0; padding: 14px; font-size: 15px;
  margin-top: 7px; outline: none; background: var(--white); color: var(--ink);
}
.form textarea { resize: vertical; font-family: var(--font-body); }
.consent { display: flex; gap: 12px; align-items: flex-start; background: var(--sand); border-radius: 0; padding: 16px; margin-top: 18px; color: var(--muted); line-height: 1.5; font-size: 13.5px; }
.consent input { width: auto; margin-top: 3px; flex-shrink: 0; }
.consent a { text-decoration: underline; }
.form-error { color: #8A2A2A; background: #FBEAEA; border-radius: 0; padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* ---------- Alternative contact (Email a Consultant) ---------- */
.alt-contact { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--sand); padding: 16px; margin: 18px 0; }
.alt-contact-note { color: var(--muted); font-size: 13.5px; line-height: 1.5; max-width: 380px; }

/* ---------- Email consultant modal ---------- */
.email-modal-overlay {
  position: fixed; inset: 0; background: rgba(11,35,24,.55); display: flex;
  align-items: center; justify-content: center; padding: 20px; z-index: 1000;
}
.email-modal {
  position: relative; background: var(--white); color: var(--ink); width: min(560px, 100%);
  max-height: 90vh; overflow-y: auto; padding: 28px; box-shadow: var(--shadow-strong);
}
.email-modal h2 { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin: 0 32px 12px 0; }
.email-modal-msg { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 16px; }
.email-modal-meta { font-size: 14px; margin: 4px 0; word-break: break-word; }
.email-modal-body {
  width: 100%; min-height: 220px; max-height: 40vh; border: 1px solid #D9CDB2; padding: 14px;
  font-size: 13.5px; line-height: 1.6; font-family: var(--font-body); color: var(--ink);
  background: var(--sand); margin-top: 12px; resize: vertical; overflow-y: auto;
}
.email-modal-hint { font-size: 13px; color: var(--muted); margin-top: 10px; }
.email-modal-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.email-modal-actions .btn { flex: 1 1 auto; min-width: 140px; }
.email-modal-close {
  position: absolute; top: 18px; right: 18px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand); border: 0; color: var(--ink); font-size: 20px;
  line-height: 1; cursor: pointer;
}
.email-modal-close:hover { background: var(--sage); }
.email-modal-status {
  margin-top: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.5; display: none;
}
.email-modal-status.is-visible { display: block; }
.email-modal-status.is-success { background: #E4ECE2; color: var(--forest); }
.email-modal-status.is-error { background: #FBEAEA; color: #8A2A2A; }
.email-modal-status.is-pending { background: var(--sand); color: var(--muted); }

@media (max-width: 480px) {
  .email-modal { padding: 22px; padding-top: 50px; }
  .email-modal-actions { flex-direction: column; }
  .email-modal-actions .btn { width: 100%; }
}

/* ---------- Thank you ---------- */
.thankyou-page .result-hero { text-align: left; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .floating { display: none; }
  .how-grid { grid-template-columns: 1fr; }
  .resort-grid, .result-cards { grid-template-columns: repeat(2, 1fr); }
  .options.three { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-row, .quiz-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .quiz-header { align-items: center; }
  .resort-grid, .result-cards, .options, .options.three { grid-template-columns: 1fr; }
  .hero { padding-bottom: 24px; }
  .hero { background-position: 62% 72%; }
  .hero-grid { padding-top: 30px; }
  .section { padding: 48px 0; }

  /* CTA buttons: full-width, equal-width, centred text, consistent gap —
     matches the same left/right bounds as the surrounding hero copy and
     tick-list, both of which already sit inside .container with no
     extra padding of their own. */
  .hero-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; justify-content: center; text-align: center; }
}
