/* DV61 GLASS CARD · Aether Finance checkout. Light only (the board is pastel); never follows the OS scheme. */
@property --ring { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --peach: rgb(252 220 205);
  --blush: rgb(242 216 208);
  --lavender: rgb(202 192 229);
  --periwinkle: rgb(187 178 209);
  --ink: #2f2740;
  --ink-2: #5d5470;
  --ink-3: #7a7090;
  --field: rgba(255, 255, 255, .5);
  --field-hi: rgba(255, 255, 255, .7);
  --edge: rgba(255, 255, 255, .78);
  --err: #a8324f;
  --ok: #3f8f78;
  --btn-idle: #a9a7c9;
  --irid: #f4a99d, #d6a3e6, #a99cf2, #8cc2f4, #9fe3cf, #f2d39a, #f4a99d;
  --r-field: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: only light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: #f4dbd1; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
  font: 400 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink); background: linear-gradient(120deg, #fcdccd, #f2d8d0 42%, #cac0e5 78%, #ece2f0);
  -webkit-font-smoothing: antialiased;
}
.backdrop { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; display: block; pointer-events: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 12px 16px; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid #6d55c9; outline-offset: 3px; }

/* ── header ─────────────────────────────────────────────────────────── */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 clamp(16px, 3.4vw, 40px); max-width: 1440px; margin: 0 auto;
}
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.logo-mark { width: 28px; height: 28px; filter: drop-shadow(0 2px 6px rgba(140, 110, 210, .25)); }
.logo-word { font-weight: 600; font-size: 15px; letter-spacing: .06em; white-space: nowrap; }
.logo-word b { font-weight: 400; }
.secure { white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.secure svg { width: 15px; height: 15px; }

/* ── layout ─────────────────────────────────────────────────────────── */
.checkout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(296px, 336px); align-items: center;
  column-gap: clamp(20px, 3.5vw, 64px);
  max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 64px) 24px;
  min-height: calc(100vh - 64px); min-height: calc(100dvh - 64px);
}
.stage {
  position: relative; height: min(76vh, 680px); min-height: 380px;
  perspective: var(--P, 1100px); perspective-origin: 50% 50%;
  margin-left: clamp(-48px, -3vw, 0px);
}
.glass { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hint {
  position: absolute; left: 0; right: 0; bottom: 4px; margin: 0; text-align: center;
  font-size: 12.5px; color: var(--ink-3); pointer-events: none; transition: opacity .4s;
}
.pane { position: relative; width: 100%; max-width: 336px; justify-self: end; padding-bottom: 8px; contain: layout style; }

/* ── the card (DOM engraving layer; the glass itself is the canvas) ─────── */
.card3d {
  position: absolute; left: 50%; top: 50%;
  width: var(--cw, 470px); height: var(--ch, 296px);
  margin: calc(var(--ch, 296px) / -2) 0 0 calc(var(--cw, 470px) / -2);
  padding: 0; border: 0; background: none; color: #fff; font: inherit;
  font-size: calc(var(--cw, 470px) / 100);
  border-radius: var(--rc, 26px);
  transform-style: preserve-3d; transform-origin: 50% 50% 0; contain: layout style;
  cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  outline: none;
}
.card3d.is-dragging { cursor: grabbing; }
/* Each face is laid out --k times larger and scaled down inside the 3D transform: Chromium rasterises a perspective
   layer at about 1× its own size, so the engraving would look soft/pixelated on 2–3× screens without this. */
.face {
  position: absolute; left: 0; top: 0; display: block;
  width: calc(100% * var(--k, 2)); height: calc(100% * var(--k, 2));
  font-size: calc(var(--k, 2) * 1em); border-radius: calc(var(--rc, 26px) * var(--k, 2));
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transform-origin: 0 0; will-change: transform; contain: layout style;
  transform: translateZ(calc(var(--th, 13px) / 2 + .5px)) scale(calc(1 / var(--k, 2)));
  text-align: left; line-height: 1;
}
.face.back { transform: translateX(var(--cw, 470px)) rotateY(180deg) translateZ(calc(var(--th, 13px) / 2 + .5px)) scale(calc(1 / var(--k, 2))); }
.card3d:focus-visible .face { box-shadow: 0 0 0 .35em rgba(255, 255, 255, .9), 0 0 0 .8em rgba(122, 96, 220, .45); }

/* engraving: white, cut into frosted glass — a light lip below, a shade lip above, a soft inner glow */
.engr {
  position: absolute; color: #fff; font-weight: 400; white-space: nowrap; will-change: transform; /* own small layer: a keystroke re-rasters one line, not the face */
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1, 'ss01' 1;
  /* a cut into the glass: the top wall in shade, the bottom lip catching the light, a soft inner glow */
  text-shadow: 0 -.05em 0 rgba(58, 38, 92, .62), 0 .05em 0 rgba(255, 255, 255, .9), 0 .02em .14em rgba(64, 44, 104, .42), 0 0 .55em rgba(255, 250, 255, .55);
}
.num { left: 8.6%; top: 44.5%; font-size: 6.55em; letter-spacing: .035em; }
.num .grp { display: inline-block; margin-right: .36em; }
.num .grp:last-child { margin-right: 0; }
.exp { right: 8.6%; top: 64%; font-size: 3.6em; display: flex; align-items: center; gap: .45em; }
.exp-k { font-size: .36em; line-height: 1.12; letter-spacing: .12em; font-weight: 500; opacity: .78; text-align: right; }
.name { left: 8.6%; bottom: 11.5%; font-size: 3.55em; letter-spacing: .11em; text-transform: uppercase; max-width: 70%; overflow: hidden; }
.brandmark {
  position: absolute; left: 8.6%; top: 11%; font-size: 3.5em; font-weight: 500; letter-spacing: .02em;
  color: rgba(255, 255, 255, .86); text-shadow: 0 0 .5em rgba(255, 244, 252, .6), 0 -.04em 0 rgba(92, 70, 128, .22);
}
.net { position: absolute; right: 8%; top: 9%; height: 12%; display: flex; align-items: center; gap: .6em; color: rgba(255, 255, 255, .93); }
.net svg { height: 100%; width: auto; overflow: visible; filter: drop-shadow(0 0 .35em rgba(255, 244, 252, .75)) drop-shadow(0 -.05em 0 rgba(92, 70, 128, .28)); }
.net .net-name { font-size: 2.5em; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 0 .4em rgba(255, 244, 252, .7); }
.net.is-in svg, .net.is-in .net-name { animation: netin .7s var(--ease) both; }
@keyframes netin { from { opacity: 0; transform: scale(.6); filter: blur(4px); } }

.ch { display: inline-block; }
.ch.ghost { opacity: .95; }
.ch.dot { opacity: .45; }
.ch.slash { opacity: .8; margin: 0 .18em; }
.glint {
  position: absolute; left: 0; top: 0; width: 9em; height: 9em; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, #fff 0, rgba(255, 236, 250, .95) 18%, rgba(255, 196, 236, .55) 38%, rgba(176, 206, 255, .25) 60%, transparent 100%);
  z-index: 2;
}

/* back of the card */
.stripe {
  position: absolute; left: 2.6%; right: 2.6%; top: 12%; height: 19%; border-radius: .5em;
  background: linear-gradient(180deg, rgba(58, 52, 66, .9), rgba(24, 21, 30, .94) 46%, rgba(44, 39, 52, .92));
  box-shadow: inset 0 .12em 0 rgba(255, 255, 255, .22), inset 0 -.1em 0 rgba(0, 0, 0, .3);
}
.stripe::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .16) 46%, transparent 60%); }
.sig {
  position: absolute; left: 7.5%; top: 41%; width: 60%; height: 16%; border-radius: .9em; overflow: hidden;
  background: repeating-linear-gradient(-55deg, rgba(255, 255, 255, .62) 0 .6em, rgba(255, 255, 255, .44) .6em 1.2em);
  box-shadow: inset 0 0 0 .12em rgba(255, 255, 255, .7);
}
.sig-name { position: absolute; left: 6%; top: 50%; transform: translateY(-50%); font-size: 3.9em; font-style: italic; font-weight: 300; color: rgba(70, 58, 96, .72); white-space: nowrap; letter-spacing: .01em; }
.cvv-ring {
  position: absolute; left: 70.5%; top: 37.5%; width: 22%; height: 23%; border-radius: 99em;
  display: grid; place-items: center;
  box-shadow: 0 0 0 .2em rgba(255, 255, 255, .85), 0 0 1.4em rgba(255, 236, 250, .9), inset 0 0 1em rgba(255, 255, 255, .45);
  transition: box-shadow .5s;
}
.card3d.cvv-focus .cvv-ring { box-shadow: 0 0 0 .25em #fff, 0 0 2.4em rgba(255, 220, 246, 1), 0 0 4em rgba(176, 200, 255, .8), inset 0 0 1.2em rgba(255, 255, 255, .6); }
.cvv { position: static; font-size: 5.2em; letter-spacing: .06em; }
.fine { left: 7.5%; top: 64%; font-size: 1.75em; letter-spacing: .16em; font-weight: 500; opacity: .75; }
.net-back { top: auto; bottom: 9%; height: 11%; }
.net .net-name { display: none; }

/* no WebGL: the same layout, a CSS frosted card */
.no-gl .face.front, .no-gl .face.back {
  background: linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .2) 55%, rgba(255, 255, 255, .34));
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .85), inset 0 0 0 4px rgba(190, 170, 240, .25), 0 1.6em 3em rgba(110, 80, 150, .18);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.no-gl .face::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from 200deg, var(--irid));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8;
}

/* ── the form ───────────────────────────────────────────────────────── */
.sum { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .6); }
.sum-k { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.sum-k span { font-weight: 400; color: var(--ink-2); }
.sum-v { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
form { margin: 0; }
.field { margin: 0 0 12px; min-width: 0; }
.field label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.ctl { position: relative; }
.ctl input {
  display: block; width: 100%; height: 46px; padding: 0 14px; margin: 0;
  font: 400 16px/1 Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink); letter-spacing: .01em;
  border-radius: var(--r-field); border: 1px solid var(--edge);
  background: var(--field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 1px 2px rgba(80, 60, 110, .06), 0 8px 24px -14px rgba(90, 70, 140, .25);
  transition: background-color .25s, box-shadow .25s, border-color .25s;
  -webkit-appearance: none; appearance: none; outline: none;
}
#cc-number, #cc-exp, #cc-csc { font-variant-numeric: tabular-nums; letter-spacing: .05em; }
#cc-number.has-net { padding-right: 104px; }
.ctl input::placeholder { color: rgba(93, 84, 112, .5); }
.ctl input:hover { background: rgba(255, 255, 255, .6); }
.ctl input:focus {
  border-color: transparent;
  background: linear-gradient(rgba(255, 255, 255, .74), rgba(255, 255, 255, .74)) padding-box, conic-gradient(from var(--ring), var(--irid)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 0 0 4px rgba(184, 160, 240, .26), 0 10px 28px -10px rgba(150, 120, 230, .45);
  animation: ring 1.4s cubic-bezier(.2, .8, .2, 1) 1;
}
@keyframes ring { from { --ring: -140deg; } to { --ring: 0deg; } }
.field.bad .ctl input { border-color: rgba(168, 50, 79, .75); background: rgba(255, 240, 244, .62); }
.field.bad .ctl input:focus { background: linear-gradient(rgba(255, 244, 247, .8), rgba(255, 244, 247, .8)) padding-box, linear-gradient(var(--err), var(--err)) border-box; box-shadow: 0 0 0 4px rgba(168, 50, 79, .16); animation: none; }
.err { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--err); font-weight: 500; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .3s var(--ease), opacity .25s, margin .3s var(--ease); }
.field.bad .err { max-height: 3.4em; opacity: 1; margin-top: 6px; }
.ctl-net {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); height: 30px;
  display: flex; align-items: center; gap: 6px; padding: 0 9px 0 7px; border-radius: 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #fff;
  background: linear-gradient(120deg, rgba(160, 130, 220, .85), rgba(120, 150, 230, .85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 12px -4px rgba(110, 90, 190, .5);
  opacity: 0; transition: opacity .3s, transform .4s var(--ease); pointer-events: none;
}
.ctl-net svg { height: 18px; width: auto; }
.ctl-net.on { opacity: 1; }
.ctl-net.pop { animation: pop .5s var(--ease); }
@keyframes pop { from { transform: translateY(-50%) scale(.7); } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 50px; margin-top: 6px; border: 0; border-radius: 12px; cursor: pointer;
  font: 600 15.5px/1 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: .01em; color: #fff;
  background: var(--btn-idle); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 20px -12px rgba(80, 70, 140, .5);
  transition: box-shadow .35s, transform .2s var(--ease), background-color .35s;
}
.pay::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(105deg, #ee9d93 0%, #c99ae6 34%, #9d9ff1 62%, #84bdf0 100%);
  opacity: 0; transition: opacity .45s;
}
.pay::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: 0; transform: translateX(-130%);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); opacity: 0;
}
.pay.ready::before { opacity: 1; }
.pay.ready { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 14px 30px -12px rgba(140, 110, 220, .65); }
.pay.ready::after { opacity: 1; animation: glint 3.6s 1s ease-in-out infinite; }
@keyframes glint { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(300%); } }
.pay:hover { transform: translateY(-1px); }
.pay:active { transform: translateY(0) scale(.99); }
.pay > span { position: relative; z-index: 1; }
.pay-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; display: none; }
.pay.busy .pay-spin { display: block; animation: spin .8s linear infinite; }
.pay.busy { cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }
.note { margin: 12px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-2); }

.done {
  text-align: center; padding: 28px 22px 22px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .4)); border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 24px 50px -24px rgba(100, 80, 160, .45);
  outline: none;
}
.done:not([hidden]) { animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.done-ic { width: 48px; height: 48px; color: #7b62d6; }
.done h2 { margin: 10px 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.done-v { margin: 0; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.done-n { margin: 10px 0 18px; font-size: 13px; color: var(--ink-2); }
.again {
  min-height: 46px; padding: 0 26px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .9); cursor: pointer;
  font: 600 14.5px/1 Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: rgba(255, 255, 255, .7);
}
.again:hover { background: #fff; }

/* ── tablet / phone ─────────────────────────────────────────────────── */
@media (max-width: 899px), (max-width: 1180px) and (orientation: portrait) and (min-height: 900px) {
  .checkout { grid-template-columns: minmax(0, 1fr); padding-bottom: 28px; align-content: start; min-height: 0; }
  .stage { height: clamp(250px, 66vw, 470px); min-height: 0; margin: 0 -16px; }
  .pane { justify-self: center; max-width: 460px; }
  .hint { bottom: 0; }
}
@media (max-width: 1180px) and (min-width: 600px) and (orientation: portrait) { .stage { margin: 0; height: clamp(300px, 56vw, 560px); } .pane { max-width: 480px; } }
@media (max-width: 599px) {
  .top { height: 56px; }
  .logo-word { font-size: 14px; }
  .secure { font-size: 12.5px; }
  .stage { height: clamp(236px, 80vw, 350px); }
  .hint { display: none; }
  .sum { margin-bottom: 14px; padding-bottom: 12px; }
  .field { margin-bottom: 10px; }
}
/* short landscape phones: side by side again */
@media (max-height: 540px) and (min-width: 600px) and (orientation: landscape) {
  .top { height: 52px; }
  .checkout { grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); align-items: start; min-height: 0; padding-top: 4px; }
  .stage { height: calc(100vh - 64px); height: calc(100dvh - 64px); min-height: 280px; margin: 0; position: sticky; top: 8px; }
  .pane { max-width: 330px; justify-self: end; }
  .hint { display: none; }
}
@media (pointer: coarse) { .hint { display: none; } }
@media (max-width: 380px) {
  .logo-word { font-size: 13px; letter-spacing: .04em; }
  .secure { font-size: 0; gap: 0; } .secure svg { width: 18px; height: 18px; }
  .ctl-net span { display: none; } #cc-number.has-net { padding-right: 52px; }
}
@media (min-width: 1800px) { .checkout { max-width: 1560px; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); } .pane { max-width: 380px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .ctl input:focus { animation: none; }
}
.reduced *, .reduced *::before, .reduced *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
