/* NewOrleans.com quiz styles. Shared by every quiz.
   Colors and fonts come from the NewOrleans.com design system (Figma: "Prototypes & Secondaries"). */

:root {
  /* Primary */
  --gaslight: #241F21;
  --magnolia: #FAF9EF;
  --magnolia-bg: #FAFAF4;
  --gaslight-60: #767474;
  --gaslight-40: #A6A5A6;
  --gaslight-20: #D3D2D3;
  /* Secondary */
  --velvet: #961F38;
  --hibiscus: #FF7863;
  --brass: #EAA820;
  --au-lait: #E8DFCD;

  /* Roles */
  --bg: var(--gaslight);
  --text: var(--magnolia);
  --text-muted: #CFCDC6;
  --accent: var(--brass);
  --line: rgba(250, 249, 239, 0.16);

  /* Fonts. Haboro is on Adobe Fonts; it renders once the site's Adobe Fonts kit is loaded
     (see FONT_KIT_URL in shared/quiz.js). Until then the fallbacks below are used. */
  --font-display: "haboro-contrast-condensed", "Haboro Contrast", Georgia, "Times New Roman", serif;
  --font-serif: "haboro-serif", "Haboro Serif", Georgia, "Times New Roman", serif;
  --font-body: "haboro-soft", "Haboro Soft", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --pad-x: clamp(16px, 4vw, 56px);
  --radius: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.nq-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- App shell ---------- */

.nq-app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.nq-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: nq-in .45s var(--ease) both;
}

@keyframes nq-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Leaves room for the modal's close button when embedded */
.is-embedded .nq-top,
.is-embedded .nq-split { padding-right: calc(var(--pad-x) + 56px); }

.nq-eyebrow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nq-eyebrow::before {
  content: "";
  flex: none;
  width: 18px; height: 2px;
  margin-top: .6em;
  background: currentColor;
}

.nq-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -.005em;
  color: var(--text);
}
.nq-heading:focus { outline: none; }

/* ---------- Buttons ---------- */

.nq-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--gaslight);
  font: 700 14px/1 var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, transform .2s var(--ease), opacity .2s;
}
.nq-btn:hover { background: #F4BC45; }
.nq-btn:active { transform: translateY(1px); }
.nq-btn[disabled] { opacity: .35; cursor: not-allowed; }
.nq-btn .nq-chev { width: 8px; height: 12px; transition: transform .2s var(--ease); }
.nq-btn:not([disabled]):hover .nq-chev { transform: translateX(3px); }

.nq-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--text);
  font: 700 14px/1 var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.nq-link-btn:hover { color: var(--accent); }
.nq-link-btn[hidden] { display: none; }

/* ---------- Intro + result (split layout) ---------- */

.nq-split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(32px, 6vh, 72px) var(--pad-x);
}
.nq-split__text { max-width: 560px; }
.nq-split__text p { margin: 20px 0 0; color: var(--text-muted); font-size: 18px; }
.nq-split__text .nq-btn { margin-top: 32px; }
.nq-split__media {
  position: relative;
  aspect-ratio: 8 / 9;
  max-height: 72vh;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #332d2f;
}
.nq-split__media img { width: 100%; height: 100%; object-fit: cover; }

.nq-result .nq-heading { color: var(--hibiscus); font-size: clamp(36px, 4.6vw, 60px); }

.nq-more {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.nq-more h2 {
  margin: 0 0 6px;
  font: 700 13px/1.2 var(--font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nq-more ul { list-style: none; margin: 0; padding: 0; }
.nq-more a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
}
.nq-more a:hover { color: var(--accent); }
.nq-more a:hover .nq-arrow { transform: translateX(4px); }

.nq-retake { margin-top: 20px; }

/* ---------- Question screen ---------- */

.nq-top { padding: clamp(24px, 5vh, 56px) var(--pad-x) 0; }

.nq-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.nq-progress__label {
  flex: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nq-progress__bar {
  flex: 1;
  max-width: 320px;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.nq-progress__bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width .5s var(--ease);
}

.nq-form { flex: 1; display: flex; flex-direction: column; }
.nq-fieldset { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* Option row: full-bleed, edge to edge */
.nq-options {

  flex: 1;
  max-height: 600px;
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  margin-top: clamp(28px, 6vh, 64px);
}

.nq-option { position: relative; display: flex; flex-direction: column; cursor: pointer; }
.nq-option input { position: absolute; opacity: 0; pointer-events: none; }

.nq-option__label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 4.2em;
  padding: 0 clamp(12px, 1.4vw, 20px) 14px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.25;
  color: var(--text);
}
.nq-option__label span {
  text-decoration: underline 2px transparent;
  text-underline-offset: 5px;
  transition: text-decoration-color .2s;
}

.nq-arrow { flex: none; width: 18px; height: 14px; margin-top: 3px; transition: transform .25s var(--ease), color .2s; }

.nq-option__media {
  position: relative;
  display: block;
  flex: 1;
  min-height: 240px;
  overflow: hidden;
  background: #332d2f;
}
.nq-option__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease), filter .3s;
}
.nq-option__media::after {
  content: "";
  position: absolute; inset: 0;
  border: 3px solid transparent;
  border-radius: var(--radius);
  transition: border-color .2s;
  pointer-events: none;
}

.nq-option:hover .nq-option__media img { transform: scale(1.04); }
.nq-option:hover .nq-arrow { transform: translateX(4px); }

/* Selected */
.nq-option input:checked ~ .nq-option__label { color: var(--accent); }
.nq-option input:checked ~ .nq-option__label span { text-decoration-color: currentColor; }
.nq-option input:checked ~ .nq-option__label .nq-arrow { transform: translateX(4px); }
.nq-option input:checked ~ .nq-option__media { border-radius: var(--radius); }
.nq-option input:checked ~ .nq-option__media::after { border-color: var(--accent); }
.nq-options:has(input:checked) .nq-option input:not(:checked) ~ .nq-option__media img { filter: saturate(.6) brightness(.72); }

/* Keyboard focus */
.nq-option input:focus-visible ~ .nq-option__media { outline: 3px solid var(--magnolia); outline-offset: -6px; border-radius: var(--radius); }

.nq-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(24px, 5vh, 48px) var(--pad-x) clamp(24px, 4vh, 40px);
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  body { font-size: 16px; }

  .nq-split { grid-template-columns: 1fr; align-items: start; align-content: start; gap: 24px; padding-top: 24px; }
  .nq-split__media { order: -1; aspect-ratio: 16 / 10; max-height: none; }
  .nq-split__text p { font-size: 16px; }

  /* Options become a tappable list */
  .nq-options { flex: none; max-height: none; grid-template-columns: 1fr; gap: 10px; padding: 0 var(--pad-x); margin-top: 24px; }
  .nq-option {
    display: grid;
    grid-template-columns: 88px 1fr;
    align-items: center;
    min-height: 88px;
    background: rgba(250, 249, 239, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .nq-option__media { grid-row: 1; grid-column: 1; align-self: stretch; min-height: 88px; }
  .nq-option__media::after { border-radius: 0; }
  .nq-option__label { grid-row: 1; grid-column: 2; align-items: center; min-height: 0; padding: 12px 16px; font-size: 17px; }
  .nq-option input:checked ~ .nq-option__media { border-radius: 0; }
  .nq-option:has(input:checked) { box-shadow: inset 0 0 0 3px var(--accent); }
  .nq-option input:checked ~ .nq-option__media::after { border-color: transparent; }
  .nq-option input:focus-visible ~ .nq-option__media { outline-offset: -3px; }

  .nq-nav {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, var(--bg) 70%, rgba(36, 31, 33, 0));
    padding-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Embedded on a phone: keep content clear of the modal's close button */
@media (max-width: 760px) {
  .is-embedded .nq-top,
  .is-embedded .nq-split { padding-right: var(--pad-x); padding-top: 68px; }
}
