/* ============================================================
   GIFT VOUCHER PAGE
   The voucher itself is a <canvas> — these rules only build the
   tray it sits in, so the card looks like an object on a desk
   rather than a picture in a box.
   ============================================================ */

.giftlay {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1.4rem, 1rem + 2.4vw, 3rem);
  align-items: start;
}

/* --- the tray --- */
.vframe {
  position: relative;
  padding: clamp(0.5rem, 0.3rem + 0.8vw, 0.9rem);
  border: 1px solid var(--edge);
  border-radius: calc(var(--r-lg) + 0.4rem);
  background:
    linear-gradient(160deg, rgba(212, 173, 109, 0.16), rgba(212, 173, 109, 0) 48%),
    var(--c-bg-raise);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.14),
    0 26px 60px -24px rgba(0, 0, 0, 0.6);
}
.vframe::after {
  /* the sheen that tells you it is foil, not paint */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.1) 48%, transparent 58%);
}
.vframe__sheet {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.75);
}

.vacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.vacts .btn { flex: 1 1 11rem; justify-content: center; }
.vhint {
  margin: 0.8rem 0 0;
  font-size: 0.66rem;
  line-height: 1.6;
  color: var(--c-ink-4);
}

/* a voucher is portrait and tall; on a narrow screen the form comes first */
@media (max-width: 900px) {
  .giftlay { grid-template-columns: 1fr; }
  .giftlay__sheet { order: 2; }
  .giftlay__form { order: 1; }
}

/* --- paper size choice --- */
.vacts--print { margin-top: 0.6rem; align-items: center; }
.vacts--print .btn { flex: 0 1 auto; }
.vsize {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--c-bg-raise);
}
.vsize__b {
  padding: 0.3rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--c-ink-3);
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color var(--d-mid) var(--ease-silk), background var(--d-mid) var(--ease-silk);
}
.vsize__b.is-on {
  background: linear-gradient(135deg, var(--c-gold-2), var(--c-gold));
  color: #1a1206;
}
.vsize__b:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; }

/* ============================================================
   ON PAPER
   The card is the only thing that prints. Its size is set in mm,
   so A5 on A4 paper comes out as a card to cut, not a scaled page.
   ============================================================ */
.vprint { display: none; }

@media print {
  @page { size: auto; margin: 0; }

  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body > *:not(.vprint) { display: none !important; }

  .vprint {
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    padding: 6mm;
  }
  .vprint img {
    display: block;
    width: 148mm;          /* A5 by default */
    height: 209.3mm;
    object-fit: contain;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  html[data-print="a4"] .vprint img { width: 198mm; height: 280mm; }
}

/* --- voucher / course --- */
.gtabs {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 1.1rem;
  padding: 0.25rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--c-bg-raise);
}
.gtabs[hidden] { display: none; }
.gtab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--c-ink-3);
  font: inherit;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color var(--d-mid) var(--ease-silk), background var(--d-mid) var(--ease-silk);
}
.gtab svg { width: 0.85rem; height: 0.85rem; }
.gtab:hover { color: var(--c-ink); }
.gtab.is-on {
  background: linear-gradient(135deg, var(--c-gold-2), var(--c-gold));
  color: #1a1206;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
.gtab:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; }

/* --- aftercare: four kinds, picked by their glyph --- */
.gift-grid--care { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.care-ico {
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.45rem;
  color: var(--c-gold);
}
.gift-grid--care .gift-card__worth { font-size: 0.72rem; letter-spacing: 0.02em; }

/* `.field` sets display:grid, which outranks the UA rule for [hidden] */
.field[hidden], .fields[hidden] { display: none !important; }

/* ============================================================
   A STANDALONE PAGE'S VERTICAL BUDGET

   Same rule as the hero: on a 1024x768 laptop the first real thing
   on the page — the card and the first choice — must be reachable
   without scrolling. These two pages were starting their content at
   547px on that screen.
   ============================================================ */
.section--page { padding-top: clamp(5.5rem, 4.2rem + 2.6vw, 8rem); }
.section--page .section-head { margin-bottom: clamp(1.4rem, 0.8rem + 1.6vw, 3rem); }
.section--page .section-head .lead { max-width: 52ch; }

@media (max-height: 900px) {
  .section--page { padding-top: clamp(5rem, 4.4rem + 1.4vw, 6.4rem); }
  .section--page .section-head { margin-bottom: 1.2rem; gap: 0.6rem; }
  /* a portrait card at full width eats the screen; shrink it so the
     whole voucher is in view rather than the top third of it */
  .vframe__sheet { max-height: 58vh; width: auto; margin-inline: auto; }
  .vframe { display: grid; }
}

/* --- the appointment card sits inside the done panel, so it must not
   dominate it the way a full-width voucher would --- */
.bookcard { width: 100%; max-width: 20rem; margin-inline: auto; }
.bookcard__acts { max-width: 20rem; margin-inline: auto; justify-content: center; }
.done-state .vacts .btn { flex: 1 1 8rem; }
