/* Gift checkout uses the same visual system as the current MIR landing page. */
:root {
  --gift-bg: #eaf4f8;
  --gift-ink: #18364c;
  --gift-muted: #537083;
  --gift-accent: #3d9fbd;
  --gift-accent-deep: #20748f;
  --gift-control-ink: #06384d;
  --gift-line: rgba(53, 128, 154, .20);
  --gift-surface: rgba(255, 255, 255, .78);
  --gift-surface-strong: rgba(249, 253, 255, .92);
  --gift-note: rgba(203, 239, 246, .58);
  --gift-shadow: 0 24px 52px -30px rgba(37, 105, 131, .48), 0 4px 12px rgba(74, 137, 159, .12);
}

html[data-theme="dark"] {
  --gift-bg: #07142c;
  --gift-ink: #d2e5e9;
  --gift-muted: #9ebbc5;
  --gift-accent: #25839f;
  --gift-accent-deep: #5aaabd;
  --gift-control-ink: #e5f6f8;
  --gift-line: rgba(83, 159, 181, .28);
  --gift-surface: rgba(7, 25, 52, .82);
  --gift-surface-strong: rgba(12, 35, 67, .92);
  --gift-note: rgba(18, 64, 86, .66);
  --gift-shadow: 0 26px 56px -30px rgba(0, 0, 0, .82), 0 4px 14px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  color: var(--gift-ink);
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, rgba(244, 251, 253, .78), rgba(226, 242, 248, .90)), url("../assets/landing-sunrise-desktop.jpg") center top / cover fixed;
}
html[data-theme="dark"] body {
  background: linear-gradient(180deg, rgba(3, 13, 34, .72), rgba(4, 16, 38, .90)), url("../assets/landing-night-desktop.jpg") center top / cover fixed;
}

.gift-page { width: min(100% - 32px, 1120px); min-height: 100svh; margin: 0 auto; padding: 32px 0 56px; }
.gift-card {
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--gift-line);
  border-radius: 22px;
  background: var(--gift-surface);
  box-shadow: var(--gift-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.gift-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 34px; }
.gift-back { display: inline-block; margin: -20px 0 10px; color: var(--gift-accent-deep); font-size: 14px; font-weight: 700; text-decoration: none; }
.gift-back::before { content: "← "; }
.gift-back:hover { color: var(--gift-ink); }
.gift-brand { display: flex; align-items: center; gap: 9px; color: var(--gift-accent-deep); font-size: 18px; font-weight: 800; }
.gift-brand img { width: 30px; height: 30px; object-fit: contain; }
.gift-kicker { margin: 0 0 8px; color: var(--gift-muted); font-size: 12px; font-weight: 800; }
.gift-card h1 { margin: 0; color: var(--gift-ink); font-size: clamp(32px, 4vw, 44px); line-height: 1.1; letter-spacing: 0; }
.gift-card .lead { max-width: 62ch; margin: 12px 0 28px; color: var(--gift-muted); font-size: 16px; line-height: 1.5; }

.gift-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 14px; margin: 0 0 28px; }
.gift-plan {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  padding: 22px 20px 20px;
  border: 1px solid var(--gift-line);
  border-radius: 14px;
  background: var(--gift-surface-strong);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.gift-plan:hover { border-color: var(--gift-accent); transform: translateY(-2px); }
.gift-plan:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--gift-accent) 52%, transparent); outline-offset: 3px; }
.gift-plan input { position: absolute; opacity: 0; pointer-events: none; }
.gift-plan.is-active { border-color: var(--gift-accent); background: color-mix(in srgb, var(--gift-accent) 7%, var(--gift-surface-strong)); box-shadow: 0 0 0 2px var(--gift-surface-strong), 0 0 0 5px color-mix(in srgb, var(--gift-accent) 72%, transparent), 0 14px 28px -20px var(--gift-accent-deep); }
.gift-plan__badge { align-self: flex-start; margin: -8px 0 2px; padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--gift-accent) 17%, var(--gift-surface-strong)); color: var(--gift-accent-deep); font-size: 11px; font-weight: 800; }
.gift-plan__badge--quiet { background: color-mix(in srgb, var(--gift-muted) 12%, var(--gift-surface-strong)); color: var(--gift-muted); }
.gift-plan__heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gift-plan__heading > div:first-child { min-width: 0; }
.gift-plan__name { color: var(--gift-ink); font-size: 20px; font-weight: 800; line-height: 1.25; }
.gift-plan__hint, .gift-plan__saving { color: var(--gift-muted); font-size: 12px; font-weight: 600; }
.gift-plan__hint { margin-top: 3px; }
.gift-plan__price { flex: 0 0 auto; color: var(--gift-accent-deep); font-size: clamp(19px, 2vw, 25px); font-weight: 800; white-space: nowrap; }
.gift-plan__saving { min-height: 20px; margin: 10px 0 0; font-size: 12px; font-weight: 700; }

.gift-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gift-form-row { margin-bottom: 16px; }
.gift-form-row label { display: block; margin-bottom: 7px; color: var(--gift-muted); font-size: 13px; font-weight: 700; }
.gift-form-row input, .gift-form-row textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--gift-line);
  border-radius: 10px;
  background: var(--gift-surface-strong);
  color: var(--gift-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.gift-form-row input::placeholder, .gift-form-row textarea::placeholder { color: color-mix(in srgb, var(--gift-muted) 74%, transparent); }
.gift-form-row input:focus, .gift-form-row textarea:focus { outline: none; border-color: var(--gift-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gift-accent) 18%, transparent); }
.gift-form-row textarea { min-height: 100px; resize: vertical; }
.promo-code { width: min(100%, 440px); margin: 18px auto 0; }
.promo-code label { display: block; margin-bottom: 6px; color: var(--gift-muted); font-size: 13px; font-weight: 800; }
.promo-entry { display:flex; gap:8px; align-items:center; }
.promo-code input { min-width:0; flex:1; min-height:44px; padding:10px 13px; border: 1px solid var(--gift-line); border-radius: 10px; background: color-mix(in srgb, var(--gift-surface-strong) 70%, transparent); color: var(--gift-ink); font: inherit; font-size: 14px; }
.promo-entry button { min-height:44px; padding:9px 13px; border:1px solid var(--gift-line); border-radius:10px; background:transparent; color:var(--gift-accent-deep); font:inherit; font-size:13px; font-weight:800; cursor:pointer; }
.promo-code input::placeholder { color: var(--gift-muted); opacity: .8; }
.promo-code p { margin: 5px 0 0; color: var(--gift-muted); font-size: 12px; line-height: 1.4; }
.promo-code .gift-promo-terms { margin-top: 9px; }
.gift-promo-terms a { color: var(--gift-accent-deep); font-weight: 800; text-underline-offset: 2px; }
.gift-error { min-height: 20px; margin: 10px 0 0; color: #b33e4e; font-size: 13px; font-weight: 700; }
html[data-theme="dark"] .gift-error { color: #e88e9a; }
.gift-consents {
  display: grid;
  gap: 13px;
  margin: 12px 0 0;
  padding: 15px 16px 16px;
  border: 1px solid var(--gift-line);
  border-radius: 12px;
  background: var(--gift-surface-strong);
}
.gift-consents legend { padding: 0 6px; color: var(--gift-muted); font-size: 13px; font-weight: 800; }
.gift-terms-consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  color: var(--gift-ink);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.gift-terms-consent input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--gift-accent-deep);
  cursor: pointer;
}
.gift-terms-consent input:focus-visible { outline: 3px solid color-mix(in srgb, var(--gift-accent) 52%, transparent); outline-offset: 3px; }
.gift-terms-consent a, .gift-document-links a { color: var(--gift-accent-deep); font-weight: 800; text-underline-offset: 2px; }
.gift-terms-consent a:hover, .gift-document-links a:hover, .gift-promo-terms a:hover { color: var(--gift-ink); }
.gift-purchase-terms { margin-top: 15px; padding: 15px 16px; border-left: 3px solid var(--gift-accent); background: var(--gift-note); }
.gift-purchase-terms h2 { margin: 0; color: var(--gift-ink); font-size: 15px; line-height: 1.35; }
.gift-terms { margin: 6px 0 0; color: var(--gift-muted); font-size: 13px; line-height: 1.5; }
.gift-document-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; line-height: 1.5; }
.gift-submit {
  display: block;
  width: min(100%, 440px);
  min-height: 52px;
  margin: 20px auto 0;
  padding: 12px 22px;
  border: 1px solid color-mix(in srgb, var(--gift-accent-deep) 70%, transparent);
  border-radius: 999px;
  background: linear-gradient(145deg, var(--gift-accent) 0%, var(--gift-accent-deep) 100%);
  color: var(--gift-control-ink);
  box-shadow: 0 12px 24px -16px color-mix(in srgb, var(--gift-accent-deep) 76%, transparent);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  transition: filter .18s ease, transform .18s ease, opacity .18s ease;
}
.gift-submit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.gift-submit:active { transform: translateY(0); }
.gift-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--gift-accent) 52%, transparent); outline-offset: 3px; }
.gift-submit:disabled { cursor: default; opacity: .58; transform: none; }

@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .gift-page { width: min(100% - 24px, 620px); padding: 12px 0 28px; }
  .gift-card { min-height: 100dvh; padding: 22px 18px 28px; border-radius: 18px; }
  .gift-topbar { gap: 10px; margin-bottom: 24px; }
  .gift-back { font-size: 13px; }
  .gift-grid-2 { grid-template-columns: 1fr; gap: 0; }
  .gift-plans { grid-template-columns: 1fr; gap: 10px; }
  .gift-plan { padding: 16px; }
  .gift-plan__badge { margin: -4px 0 0; }
  .gift-card h1 { font-size: 31px; }
  .gift-consents { padding: 13px 12px 14px; }
  .gift-terms-consent { grid-template-columns: 20px minmax(0, 1fr); gap: 9px; font-size: 13px; }
  .gift-document-links { display: grid; gap: 7px; }
}

@media (max-width: 380px) {
  .gift-plan { padding: 14px; }
  .gift-plan__name { font-size: 18px; }
  .gift-plan__price { font-size: 20px; }
}

@media (max-width: 420px) {
  .gift-page { width: 100%; padding: 0; }
  .gift-card { padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; box-shadow: none; }
  .gift-topbar { gap: 10px; margin-bottom: 22px; }
}

@media (max-width: 767px) {
  body { background-image: linear-gradient(180deg, rgba(244, 251, 253, .78), rgba(226, 242, 248, .90)), url("../assets/landing-sunrise.png"); }
  html[data-theme="dark"] body { background-image: linear-gradient(180deg, rgba(3, 13, 34, .72), rgba(4, 16, 38, .90)), url("../assets/landing-night.png"); }
}
