/* =============================================================
   CS Vietnam Travel — trang câu hỏi mở đầu
   Cùng hệ màu & font với landing page (xem docs/BRAND.md)
   ============================================================= */
:root {
  --forest: #027441;
  --gold: #F2AD07;
  --cream: #FBF8F0;
  --ink: #07271D;
  --forest-deep: #02301F;
  --serif: "Lora", Georgia, serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--forest-deep);
  color: var(--cream);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; }

.ask {
  position: relative; isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s ease;
}
.ask.is-leaving { opacity: 0; transform: scale(1.03); filter: blur(10px); transition-duration: .6s; }

/* — nền cảnh: ảnh tràn màn hình, chuyển chéo mềm — */
.scenes { position: absolute; inset: 0; z-index: -2; background: #1a2b33; }
.scene {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; z-index: 0;
  transition: opacity 2.4s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity;
}
.scene img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.1);
  will-change: transform;
  backface-visibility: hidden;
}
.scene.is-on { opacity: 1; z-index: 2; }          /* ảnh mới hiện dần đè lên ảnh cũ */
.scene.is-prev { opacity: 1; z-index: 1; transition: none; }  /* ảnh cũ đứng yên bên dưới tới khi bị phủ hết */
/* chuyển động phóng chậm chạy liên tục, không bị ngắt khi đổi ảnh */
.scene.is-on img, .scene.is-prev img { animation: drift 12s linear both; }
@keyframes drift { from { transform: scale(1.1); } to { transform: scale(1); } }

.shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 55%, rgba(2, 24, 16, .35) 0%, rgba(2, 24, 16, .72) 100%),
    linear-gradient(0deg, rgba(2, 24, 16, .7) 0%, rgba(2, 24, 16, 0) 40%);
}

/* — logo: to, không nền — */
.brand { display: flex; justify-content: center; padding-top: clamp(24px, 5vh, 48px); }
.brand__logo {
  height: clamp(76px, 12vh, 120px); width: auto;
}

/* — câu hỏi — */
.q {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 40px 24px 72px;
}
.q__kicker {
  margin: 0 0 18px;
  font: italic 500 clamp(16px, 1.6vw, 20px)/1.4 var(--serif);
  color: var(--gold);
}
.q__title {
  margin: 0;
  font: 500 clamp(36px, 5.4vw, 72px)/1.1 var(--serif);
  letter-spacing: -.015em; text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
.q__title em { font-style: italic; color: var(--gold); }

.choices {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%; max-width: 1160px;
  margin-top: clamp(32px, 6vh, 56px);
}
.choice {
  display: flex; align-items: center; justify-content: center;
  min-height: 64px; padding: 0 20px;
  border-radius: 999px;
  background: rgba(250, 247, 240, .14);
  border: 1px solid rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--cream); text-decoration: none;
  font: 600 13.5px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  text-align: center; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.choice:hover, .choice:focus-visible { background: var(--cream); color: var(--ink); border-color: var(--cream); transform: translateY(-2px); }
.choice:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.later {
  margin-top: 26px;
  font: 400 15px/1.4 var(--sans);
  color: rgba(251, 248, 240, .82);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(251, 248, 240, .45);
  transition: color .2s, text-decoration-color .2s;
}
.later:hover { color: #fff; text-decoration-color: var(--gold); }

.place {
  position: absolute; left: 30px; bottom: 22px; margin: 0;
  font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: rgba(251, 248, 240, .7);
  transition: opacity .6s;
}
.place::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--gold); vertical-align: middle; margin-right: 10px; }

/* — hiện dần lúc vào trang — */
.js .q > * { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .is-in .q > * { opacity: 1; transform: none; }
.js .is-in .q > :nth-child(2) { transition-delay: .12s; }
.js .is-in .q > :nth-child(3) { transition-delay: .26s; }
.js .is-in .q > :nth-child(4) { transition-delay: .4s; }

@media (max-width: 960px) {
  .choices { grid-template-columns: 1fr 1fr; max-width: 640px; }
  /* ba lựa chọn: ô cuối trải hết hàng thay vì lẻ một mình */
  .choice:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .brand { padding-top: 14px; }
  .brand__logo { height: 76px; }
  .choices { grid-template-columns: 1fr; gap: 10px; }
  .choice:last-child { grid-column: auto; }
  .q__title br { display: none; }
  .choice { min-height: 56px; }
  .place { left: 20px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene.is-on img, .scene.is-prev img { animation: none; transform: none; }
  .js .q > * { transition: none; }
}
