/* ============================================================
   Vouchers campaign detail page.
   Reuses base tokens, nav, footer, buttons and fonts from
   style.css — this file only adds page-specific layout.
   ============================================================ */

.vpage { background: var(--bg); color: var(--navy); }

/* Same transparent glass bar as the home page. This page is light, so while
   the bar has no tint yet (not scrolled) the links and toggle flip to navy;
   once the scrolled navy tint appears they revert to the base white styles.
   The logo img is swapped blue/white by vouchers.js on the same threshold. */
.vpage .nav:not(.scrolled) .nav-links a { color: rgba(12, 30, 60, .78); }
.vpage .nav:not(.scrolled) .lang-toggle { border-color: rgba(12, 30, 60, .3); }
.vpage .nav:not(.scrolled) .lang-toggle button { color: rgba(12, 30, 60, .65); }
.vpage .nav:not(.scrolled) .lang-toggle button.active { background: var(--navy); color: #fff; }
.vpage .nav:not(.scrolled) .nav-cta { background: var(--navy); color: #fff; }

/* Shared section rhythm */
.vsection { padding-top: 28px; padding-bottom: 28px; }
.vsection-title {
  margin: 12px 0 32px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--navy);
  max-width: 780px;
}
.vsection .kicker { color: var(--gold); }

/* ---------- Hero (light, in the spirit of the reference sheet) ---------- */
.vhero {
  position: relative;
  background: var(--bg);
  color: var(--navy);
  padding-top: calc(var(--nav-h) + 52px);
  padding-bottom: 60px;
}
/* Section separator drawn as a gradient so it fades away under the right
   column instead of slicing through the floating carousel. */
.vhero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, #e5e8ee 52%, rgba(229, 232, 238, 0) 66%);
}
/* Text column leaves the right third free for the floating carousel. */
.vhero-inner {
  position: relative;
  z-index: 1;
  max-width: min(820px, calc(100% - min(34vw, 420px) - 48px));
}
.vhero .kicker { color: var(--gold); }
/* Same treatment as the home page hero h1: uppercase Cormorant serif with an
   italic second line. Georgian falls back to Noto Sans Georgian automatically. */
.vhero-title {
  margin: 16px 0 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: .005em;
  text-transform: uppercase;
  color: var(--navy);
}
.vhero-title em {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: #2b4a9e;
}
.vhero-sub {
  margin: 22px 0 0;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.66;
  color: #33455f;
  max-width: 660px;
}

.period-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.period {
  flex: 1 1 240px;
  background: #fff;
  border: 1px solid #e5e8ee;
  border-radius: 14px;
  padding: 20px 24px;
}
.period-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.period-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

/* ============================================================
   Hotels section — table on the left (2/3), isometric voucher-
   card stack on the right (1/3). The stack expands on hover.
   ============================================================ */
.hotels-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 56px;
  align-items: start;
}
/* The carousel is anchored in the hero but taller than it: it hangs over the
   hero's bottom edge and fills the empty right column of the hotels section. */
.vhero-cards {
  position: absolute;
  z-index: 2;
  top: calc(var(--nav-h) + 90px);
  right: calc(max(24px, 4vw, calc((100% - 1366px) / 2)) - 40px);
  width: min(34vw, 420px);
}

/* Vertical "ferris wheel" carousel: cards ride a circle around the X axis
   but never tilt — each card only translates (Y for height, Z for depth),
   so it always faces the viewer. The wheel angle --a is animated in steps
   (glide to the next card, dwell, repeat); keyframes are generated by
   vouchers.js so they follow the card count. Hover pauses the wheel. */
@property --a {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}
/* No perspective on purpose: perspective magnifies the front card past its
   layout size, so the GPU upscales its rasterized layer and it looks blurry.
   Depth is sold entirely by the cos() scale; translateZ only sorts stacking. */
.cardstack {
  height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cardstack-list {
  --count: 7;                              /* overwritten by vouchers.js */
  --step: calc(360deg / var(--count));     /* angle between cards */
  --r: 290px;                              /* wheel radius */
  --a: 0deg;                               /* wheel angle, animated */
  position: relative;
  width: min(380px, 100%);
  aspect-ratio: 720 / 572;
  transform-style: preserve-3d;
  animation: deck-spin calc(var(--count) * 2.1s) linear infinite;
}
/* Pause on hover — real pointers only, so a tap on touch screens doesn't
   leave a sticky :hover that freezes the wheel. */
@media (hover: hover) {
  .cardstack:hover .cardstack-list { animation-play-state: paused; }
}
.vcard {
  --th: calc(var(--i) * var(--step) + var(--a)); /* this card's wheel angle */
  position: absolute;
  inset: 0;
  /* Cos-driven scale does all the depth work: the front card sits at exactly
     scale(1) so it renders 1:1 with its rasterized layer (crisp), and cards
     shrink fast as they leave the front slot. translateZ carries no visual
     projection (no perspective) — it only gives preserve-3d the z-order. */
  transform:
    translateY(calc(sin(var(--th)) * var(--r) * -1))
    translateZ(calc(cos(var(--th)) * var(--r)))
    scale(calc(.36 + .64 * cos(var(--th))));
  /* Fade out anything past the sides of the wheel: full at the front,
     gone well before a card reaches the back half. */
  opacity: clamp(0, calc((cos(var(--th)) + .2) / .4), 1);
  filter: drop-shadow(0 10px 20px rgba(12, 30, 60, .30));
}
.vcard img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* ---------- Hotels / voucher value table ---------- */
.vtable-wrap { overflow-x: auto; }
.vtable { width: 100%; border-collapse: collapse; min-width: 300px; }
.vtable thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6b7690;
  padding: 0 0 14px;
  border-bottom: 2px solid var(--navy);
}
.vtable thead th:last-child { text-align: right; }
.vtable tbody td {
  padding: 16px 0;
  border-bottom: 1px solid #e3e6ec;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}
.vtable tbody td:last-child {
  text-align: right;
  font-weight: 800;
  color: #2b4a9e;
}
.vtable tbody tr.premium td:last-child { color: var(--gold); }
.vtable tbody tr { transition: background .2s; }
.vtable tbody tr:hover { background: rgba(190, 155, 91, .07); }

/* ---------- Hotel benefits ---------- */
.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.hotel-card {
  background: #fff;
  border: 1px solid #e5e8ee;
  border-radius: 16px;
  padding: 24px 26px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.hotel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 46px -26px rgba(12, 30, 60, .4);
}
.hotel-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
}
.hotel-bullets { list-style: none; margin: 0; padding: 0; }
.hotel-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 11px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #33455f;
}
.hotel-bullets li:last-child { margin-bottom: 0; }
.hotel-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.hotel-note {
  margin: 22px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: #6b7690;
  font-style: italic;
  max-width: 780px;
}

/* ---------- Terms ---------- */
ul.terms { list-style: none; margin: 0; padding: 0; max-width: 820px; }
ul.terms li {
  position: relative;
  padding: 16px 0 16px 30px;
  border-bottom: 1px solid #e3e6ec;
  font-size: 15.5px;
  line-height: 1.6;
  color: #33455f;
}
ul.terms li:last-child { border-bottom: none; }
ul.terms li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 21px;
  width: 16px;
  height: 2px;
  background: var(--gold);
}

/* ---------- CTA ---------- */
.vcta { padding-top: 20px; padding-bottom: 88px; }
.vcta-inner {
  background: var(--navy);
  border-radius: 22px;
  padding: 48px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.vcta-title {
  position: relative;
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
}
.vcta-sub {
  position: relative;
  margin: 0;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .72);
}
.vcta-actions { position: relative; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  /* Single column; the carousel keeps spinning, just flows in-page under the
     hero text with a tighter wheel sized to the narrow viewport. */
  .hotels-split { grid-template-columns: 1fr; gap: 40px; }
  .vhero-inner { max-width: none; }
  .vhero-cards { position: static; width: 100%; margin-top: 24px; }
  .vhero::after { background: #e5e8ee; }
  .cardstack { height: 460px; }
  .cardstack-list {
    --r: 150px;
    width: min(320px, 84vw);
  }
}

@media (max-width: 640px) {
  .vcta-inner { padding: 34px 28px; }
}

/* Reduced motion: freeze the carousel. */
@media (prefers-reduced-motion: reduce) {
  .cardstack-list { animation: none; }
}
