/* DV90 BRONZE OTP · Bellmont two-step verification. One warm-dark theme (never the OS scheme).
   Tile size --tw drives the whole stage: one row on landscape screens, a 2×3 grid on portrait phones and tablets,
   so the bronze always dominates the frame. */
:root {
  color-scheme: dark;
  --bg: #1b1712; --bg2: #14110d; --ink: #f4ece2; --ink2: #b8ab9c; --mute: #8f8478; --dim: #6f655a;
  --bronze: #c9864c; --accent: #f0b27a; --ok: #9fd3a8; --err: #ff9a7e; --green: #7fbf8e;
  --tw: max(min(11vw, calc((100svh - 470px) / 2.08), 270px), min(9vw, 90px));
  --th: calc(var(--tw) * 1.36);
  --gap: calc(var(--tw) * .14); --mid: calc(var(--tw) * .5);
  --px: calc(var(--tw) * .36); --pt: calc(var(--tw) * .36); --pb: calc(var(--tw) * .36);
  --rg: 0px;                                  /* row gap (grid layout only) */
  --pr: calc(var(--tw) * .17);               /* plate radius */
  --br: calc(var(--tw) * .1);                /* bezel radius */
  --h1: clamp(32px, 3.6vw, 62px);
}
@media (orientation: portrait) and (max-width: 1100px) {
  :root {
    --tw: max(min(calc((100vw - 24px) / 3.56), calc((100svh - 470px) / 3.32), 220px), min(22vw, 80px));
    --gap: calc(var(--tw) * .12); --px: calc(var(--tw) * .16); --pt: calc(var(--tw) * .3); --pb: calc(var(--tw) * .24);
    --rg: calc(var(--tw) * .22); --pr: calc(var(--tw) * .14);
    --h1: clamp(30px, 9.2vw, 54px);
  }
}
@media (orientation: landscape) and (max-height: 560px) {
  :root { --tw: min(9.2vw, 104px); --h1: 30px; }
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto;
  color: var(--ink); font: 400 15px/1.5 'Inter', system-ui, sans-serif; overflow-x: hidden;
  background:
    radial-gradient(60% 46% at 50% 47%, rgba(140, 104, 62, .34), rgba(90, 66, 40, .12) 52%, transparent 78%),
    radial-gradient(120% 70% at 50% 0%, #211c16, transparent 70%),
    linear-gradient(180deg, #1b1712, #16120e 60%, #1b1611);
}
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 0 18px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 22px; background: var(--ink); color: #2a170a; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; outline: 2px solid var(--accent); outline-offset: 2px; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- nav ---------- */
.nav { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 52px; position: relative; z-index: 5; font: 500 13px/1 'Inter'; color: var(--mute); }
.logo { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); font: 600 13px/1 'Inter'; letter-spacing: .36em; text-decoration: none; border-radius: 8px; }
.logo i { width: 16px; height: 16px; border-radius: 4px; display: block; background: linear-gradient(140deg, #f3c58c, #9a5d2c 55%, #3a2214); box-shadow: 0 0 0 1px rgba(255, 220, 180, .18) inset, 0 0 14px rgba(240, 160, 90, .25); }
.nav-r { display: flex; align-items: center; gap: 28px; }
.help { color: var(--mute); text-decoration: none; min-height: 44px; min-width: 44px; justify-content: center; display: inline-flex; align-items: center; padding: 0 6px; border-radius: 8px; transition: color .2s; cursor: pointer; }
.help:hover { color: var(--ink); }
.secure { display: inline-flex; align-items: center; gap: 8px; color: var(--ink2); }
.secure i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); display: block; }

/* ---------- main ---------- */
.main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 16px 12px; min-width: 0; overflow-x: clip; }
.head { text-align: center; max-width: 920px; position: relative; z-index: 2; }
.eyebrow { margin: 0; font: 600 11px/1 'Inter'; letter-spacing: .34em; text-transform: uppercase; color: var(--bronze); }
h1 { margin: 18px 0 0; font: 500 var(--h1)/1.04 'Fraunces', Georgia, serif; font-variation-settings: 'opsz' 144; letter-spacing: -.018em; color: var(--ink); }
h1 em { font-style: normal; color: var(--accent); }
.lede { margin: 14px auto 0; font: 400 15px/1.5 'Inter'; color: #9a8e80; max-width: 40em; }
.lede b { color: #d8ccbd; font-weight: 500; white-space: nowrap; }

/* ---------- the plate ---------- */
.otp { display: flex; flex-direction: column; align-items: center; margin-top: clamp(26px, 4.2svh, 52px); width: 100%; }
.plate { position: relative; padding: var(--pt) var(--px) var(--pb); border-radius: var(--pr); isolation: isolate; }
.plate::before { content: ''; position: absolute; left: -22%; right: -22%; top: -80%; bottom: -55%; z-index: -2; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 46%, rgba(150, 118, 78, .42), rgba(120, 92, 60, .2) 42%, rgba(90, 68, 44, .07) 68%, transparent 100%); }
.no-fx .plate::before { opacity: .8; }
.fx { position: absolute; left: calc(var(--tw) * -.6); top: calc(var(--tw) * -.6); width: calc(100% + var(--tw) * 1.2); height: calc(100% + var(--tw) * 1.2); z-index: -1; pointer-events: none; display: block; }
.tiles { position: relative; display: flex; align-items: center; gap: var(--mid); }
.grp { display: flex; gap: var(--gap); }
.slot { position: relative; width: var(--tw); height: var(--th); border-radius: var(--br); }
.slot b { position: absolute; inset: 0; display: grid; place-items: center; font: 900 calc(var(--th) * .66)/1 'Playfair Display', Georgia, serif; visibility: hidden; pointer-events: none; }
.num { position: absolute; left: 0; right: 0; top: calc(100% + var(--pb) * .5 - 5px); text-align: center; font: 600 9px/10px 'Inter'; font-style: normal; letter-spacing: .3em; text-indent: .3em; color: rgba(10, 8, 6, .9); text-shadow: 0 1px 0 rgba(255, 228, 190, .12); pointer-events: none; }
.dash { display: block; width: calc(var(--tw) * .15); height: 3px; border-radius: 2px; background: #0b0907; box-shadow: 0 1px 0 rgba(255, 228, 190, .12); flex: none; }
.eng { position: absolute; top: calc(var(--pt) * .5 - 5px); font: 600 9px/10px 'Inter'; letter-spacing: .32em; text-transform: uppercase; color: rgba(10, 8, 6, .9); text-shadow: 0 1px 0 rgba(255, 228, 190, .12); pointer-events: none; white-space: nowrap; }
.eng-l { left: var(--px); }
.eng-r { right: var(--px); }
.metal { position: absolute; left: 0; top: 0; width: 100%; height: 100%; clip-path: url(#dg-clip); pointer-events: none; display: block; z-index: 1; }
.clipdefs { position: absolute; width: 0; height: 0; }

/* the real input lies over the moulds (transparent, 16 px so iOS never zooms) */
#code { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; margin: 0; padding: 0; border: 0; border-radius: var(--br); background: transparent; color: transparent; caret-color: transparent;
  font: 16px/1 'Inter'; letter-spacing: 0; text-indent: -9999px; opacity: 0; cursor: text; -webkit-appearance: none; appearance: none; }
#code::selection { background: transparent; color: transparent; }
#code:disabled { cursor: not-allowed; }

/* focus: the active mould's bezel glows gold (compositor-only pulse, so the canvas can sleep) */
.slot::after { content: ''; position: absolute; inset: calc(var(--tw) * -.012); border-radius: calc(var(--br) * 1.08); pointer-events: none; z-index: 2;
  border: 2px solid rgba(255, 196, 120, .95); box-shadow: 0 0 0 1px rgba(255, 150, 70, .35), 0 0 calc(var(--tw) * .12) rgba(255, 150, 60, .55), inset 0 0 calc(var(--tw) * .1) rgba(255, 150, 60, .35);
  opacity: 0; transition: opacity .2s; }
.otp.focused .slot.is-active::after { opacity: 1; animation: rim 1.8s ease-in-out infinite; }
.otp.focused.kbd .slot.is-active::after { border-width: 3px; }
@keyframes rim { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }
.otp.locked .slot::after, .otp.done .slot::after { opacity: 0 !important; animation: none !important; }

/* shake on a wrong code (the whole plate, short, integer-free transform is fine for 500 ms) */
.plate.shake { animation: shake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(5px); } 30%, 50%, 70% { transform: translateX(-9px); } 40%, 60% { transform: translateX(9px); } }

/* ---------- below the plate ---------- */
.below { margin-top: clamp(24px, 4svh, 44px); display: flex; align-items: center; justify-content: center; gap: 28px; font: 500 14px/1 'Inter'; color: #9a8e80; flex-wrap: wrap; }
.timer b { color: #e6d9c8; font-variant-numeric: tabular-nums; font-weight: 600; }
.timer.low b { color: var(--accent); }
.timer.out b { color: var(--err); }
.resend { min-height: 44px; padding: 0 6px; border: 0; background: none; font: inherit; color: #c9b9a8; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(240, 178, 122, .45); cursor: pointer; border-radius: 8px; transition: color .2s, text-decoration-color .2s; }
.resend:hover:not(:disabled) { color: var(--ink); text-decoration-color: var(--accent); }
.resend:disabled { color: var(--dim); text-decoration-color: rgba(143, 132, 120, .3); cursor: default; font-variant-numeric: tabular-nums; }
.resend.primary { height: 52px; padding: 0 26px; border-radius: 26px; text-decoration: none; color: #2a170a; font-weight: 600; letter-spacing: .04em;
  background: linear-gradient(180deg, #f6cf9c, #d9925a); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 14px 30px -12px rgba(230, 140, 70, .7); }
.resend.primary:hover { filter: brightness(1.06); color: #2a170a; }
.verify { position: relative; height: 52px; min-width: 186px; padding: 0 30px; border-radius: 26px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 14px/1 'Inter'; letter-spacing: .04em; color: #2a170a; cursor: pointer;
  background: linear-gradient(180deg, #f6cf9c, #d9925a); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 14px 30px -12px rgba(230, 140, 70, .7);
  transition: filter .2s, transform .15s, background .25s, color .25s, box-shadow .25s; }
.verify:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }
.verify:active:not(:disabled) { transform: translateY(1px) scale(.985); filter: brightness(.96); }
.verify:disabled { cursor: default; color: #3a2e22; background: linear-gradient(180deg, #8a7a66, #6e5f4e); box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset; }
.verify svg { width: 18px; height: 18px; display: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.verify.busy .spin { display: block; animation: spin .8s linear infinite; stroke-dasharray: 40 18; }
.verify.busy { cursor: progress; }
.verify.ok { background: linear-gradient(180deg, #cfe8c9, #8fbf8a); color: #12260f; }
.verify.ok:disabled { color: #12260f; background: linear-gradient(180deg, #cfe8c9, #8fbf8a); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 14px 30px -14px rgba(120, 200, 120, .6); }
.verify.ok .tick { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.status, .alert { margin: 18px 0 0; min-height: 20px; font: 500 13px/20px 'Inter'; letter-spacing: .02em; color: var(--mute); text-align: center; }
.status.ok { color: var(--ok); }
.status button { border: 0; background: none; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; min-height: 44px; padding: 0 6px; margin: -12px 0; border-radius: 8px; }
.alert { color: var(--err); margin-top: 0; }
.alert:empty { display: none; }
.otp.has-alert .status { display: none; }
.otp.has-alert .alert { margin-top: 18px; }

/* ---------- footer ---------- */
.foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 0 48px 40px; }
.cap b { display: block; font: 600 11px/1 'Inter'; letter-spacing: .32em; text-transform: uppercase; color: #b3a593; }
.cap-t { display: block; margin-top: 12px; font: 500 17px/1.3 'Inter'; color: var(--ink); }
.cap i { display: block; margin-top: 6px; font: 400 13px/1.45 'Inter'; font-style: normal; color: #9a8e80; }
.cap .demo { color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.brandmark { font: 600 11px/1 'Inter'; letter-spacing: .34em; text-transform: uppercase; color: #8a7d70; white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); margin: 0; padding: 12px 20px; border-radius: 22px; background: rgba(36, 30, 24, .96); border: 1px solid rgba(240, 178, 122, .25); color: var(--ink); font: 500 13px/1.3 'Inter'; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 40; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- portrait: the 2×3 grid ---------- */
@media (orientation: portrait) and (max-width: 1100px) {
  .tiles { flex-direction: column; gap: var(--rg); }
  .dash { display: none; }
  .num { top: calc(100% + var(--rg) * .5 - 5px); }
  .grp:last-of-type .num { top: calc(100% + var(--pb) * .5 - 5px); }
  .eng { font-size: 8px; letter-spacing: .24em; }
}
@media (max-width: 700px) {
  .nav { height: 64px; padding: 0 20px; }
  .help { display: none; }
  .main { padding: 6px 12px 12px; }
  .eyebrow { font-size: 11px; }
  h1 { margin-top: 14px; }
  h1 em { display: block; }
  .lede { font-size: 14px; max-width: 26em; margin-top: 12px; }
  .otp { margin-top: clamp(18px, 3svh, 34px); }
  .below { flex-direction: column; gap: 6px; margin-top: 20px; width: 100%; }
  .below .verify, .below .resend.primary { width: min(100%, 345px); margin-top: 6px; }
  .resend.primary { order: 3; }
  .status, .otp.has-alert .alert { margin-top: 12px; }
  .foot { flex-direction: column; align-items: flex-start; padding: 26px 20px 26px; gap: 14px; }
  .eng-r { display: none; }
}
@media (max-width: 380px) { .eng-l { letter-spacing: .18em; } }
@media (orientation: landscape) and (max-height: 560px) {
  .nav { height: 56px; }
  .lede { margin-top: 8px; }
  .otp { margin-top: 18px; }
  .below { margin-top: 18px; }
  .foot { padding-top: 24px; padding-bottom: 20px; }
}

/* ---------- no WebGL: CSS bronze ---------- */
.no-fx .plate { background: linear-gradient(180deg, #24201b, #12100d 60%, #0e0c0a); box-shadow: 0 1px 0 rgba(255, 230, 200, .14) inset, 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .6); }
.no-fx .fx, .no-fx .metal { display: none; }
.no-fx .slot { background: radial-gradient(120% 90% at 50% 30%, #2a231b, #15110d); box-shadow: 0 0 0 calc(var(--tw) * .04) #8a6235, 0 0 0 calc(var(--tw) * .05) #2a1d10, inset 0 6px 14px rgba(0, 0, 0, .7); }
.no-fx .slot.filled { background: linear-gradient(160deg, #6b4526, #3e2614 55%, #2d1c10); box-shadow: 0 0 0 calc(var(--tw) * .04) #c89a5c, 0 0 0 calc(var(--tw) * .05) #3a2614, inset 0 2px 6px rgba(255, 220, 170, .15); }
.no-fx .slot.hot { background: radial-gradient(90% 80% at 50% 50%, #ffcf6a, #ff8a2a 45%, #a33d0c); box-shadow: 0 0 0 calc(var(--tw) * .04) #f0b060, 0 0 40px rgba(255, 130, 40, .6); }
.no-fx .slot b { visibility: visible; color: #e9c48b; background: linear-gradient(180deg, #fff1cf, #e2b06c 45%, #8e5a2a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(2px 3px 0 rgba(30, 16, 6, .8)); }
.no-fx .slot.hot b { background: linear-gradient(180deg, #fffbe8, #ffe2a0); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 10px rgba(255, 200, 120, .8)); }
.no-fx .otp.locked .slot { filter: grayscale(.7) brightness(.6); }

@media (prefers-reduced-motion: reduce) {
  .otp.focused .slot.is-active::after { animation: none; }
  .plate.shake { animation: none; }
  .verify.busy .spin { animation-duration: 2.4s; }
  * { transition-duration: .01ms !important; }
}
