/* DV53 Liquid glass pricing · Stage 1 of 6: the layout, the type, the phone stack and the CSS frosted glass (html.no-gl) the page draws until stage 4.
   Layout and type. The glass itself (cards, switch, CTA, floor) is drawn by js/glass.js on
   the #glass canvas under this DOM; the aurora by js/aurora.js on the fixed #aurora canvas. Every word is DOM text.
   Without WebGL 2 (html.no-gl) the same layout gets a CSS frosted fallback at the end of this file. */

:root {
  --bg: #160f33;
  --ink: #fff;
  --ink-2: rgba(255, 255, 255, .86);
  --ink-3: rgba(255, 255, 255, .64);
  --gold: #ffc46a;
  --r: 26px;                    /* card corner radius (the shader reads it from here) */
  --card-w: 314px;
  --card-h: 384px;
  --pro-w: 338px;
  --pro-h: 450px;
  --gap: 32px;
  --price: 60px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --roll: 900ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { margin: 0; min-height: 100vh; min-height: 100svh; overflow-x: hidden; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; 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: 12px; background: #fff; color: #160f33; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ backdrop */
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.2 -.1'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* with WebGL the aurora shader dithers itself; a full-screen blend layer over two live canvases would cost a
   full-screen blend every frame, so the grain is only for the CSS fallback */
html:not(.no-gl) .grain { display: none; }

/* ------------------------------------------------------------------ header */
.top { position: relative; z-index: 3; display: flex; align-items: center; height: 76px; padding: 0 32px; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); text-decoration: none; border-radius: 12px; }
.logo { width: 34px; height: 34px; filter: drop-shadow(0 6px 14px rgba(70, 40, 190, .45)); }
.wordmark { font-weight: 650; font-size: 19px; letter-spacing: .06em; }
.wordmark b { font-weight: 650; color: rgba(255, 255, 255, .9); }

/* ------------------------------------------------------------------ the stage */
.stage { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; padding: 6px 24px 28px; isolation: isolate; overflow: clip; }

.title { margin: 2px 0 0; font-size: clamp(30px, 3.3vw, 50px); line-height: 1.12; font-weight: 600; letter-spacing: -.012em; text-align: center; text-shadow: 0 2px 22px rgba(10, 6, 40, .45); }
.t-short { display: none; }

/* billing switch: MONTHLY [ droplet ] YEARLY */
.billing { display: flex; align-items: center; gap: 6px; margin-top: 18px; }
.bl { min-height: 44px; min-width: 44px; padding: 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); border-radius: 12px; transition: color .35s var(--ease); }
.bl[aria-pressed="true"] { color: var(--ink); }
.bl:hover { color: var(--ink); }
.switch { position: relative; width: 76px; height: 44px; border-radius: 22px; display: grid; place-items: center; }
.track { display: block; width: 66px; height: 32px; border-radius: 16px; }

/* plan cards */
.cards { display: flex; align-items: center; justify-content: center; gap: var(--gap); margin-top: 30px; }
.card {
  position: relative; width: var(--card-w); min-height: var(--card-h); padding: 40px 30px 30px; border-radius: var(--r);
  display: flex; flex-direction: column; align-items: center; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent;
  text-shadow: 0 1px 14px rgba(12, 8, 40, .35); user-select: none; -webkit-user-select: none;
}
.card.is-featured { width: var(--pro-w); min-height: var(--pro-h); padding-top: 44px; }
.card:focus-visible { outline: 2px solid rgba(255, 255, 255, .92); outline-offset: 7px; }
.name { font-size: 21px; font-weight: 640; letter-spacing: .035em; text-transform: uppercase; line-height: 1.2; }
.price { text-shadow: none; display: flex; justify-content: center; align-items: flex-start; margin-top: 16px; font-size: var(--price); line-height: 1; font-weight: 640; letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card.is-featured .price { --price: 66px; font-size: var(--price); }
.cur { font-size: .44em; margin: .12em .06em 0 0; font-weight: 600; }
.amt { display: inline-flex; }
.per { display: inline-grid; align-self: flex-end; margin: 0 0 .06em .08em; font-size: .4em; font-weight: 450; letter-spacing: 0; color: var(--ink-2); }
.per > span, .bill > span { grid-area: 1 / 1; transition: opacity .45s var(--ease), transform .55s var(--ease); }
.per-y, .bill-y { opacity: 0; transform: translateY(.6em); }
[data-billing="yearly"] .per-m, [data-billing="yearly"] .bill-m { opacity: 0; transform: translateY(-.6em); }
[data-billing="yearly"] .per-y, [data-billing="yearly"] .bill-y { opacity: 1; transform: none; }

/* odometer digits (built by pricing.js; without JS the plain number stays) */

.more { display: grid; grid-template-rows: 1fr; width: 100%; }
.more-in { min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; }
.bill { display: grid; margin: 10px 0 0; font-size: 13px; color: var(--ink-3); letter-spacing: .01em; justify-items: center; }
.card hr { width: 78%; height: 1px; margin: 20px 0 20px; border: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34) 18%, rgba(255, 255, 255, .34) 82%, transparent); }
.feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: 15px; line-height: 1.3; color: var(--ink-2); justify-self: center; }
.feats li { position: relative; padding-left: 18px; }
.feats li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .9; }
.card[aria-checked="true"] .feats { color: rgba(255, 255, 255, .93); }

.floor { height: 74px; flex: none; }

/* CTA under the reflection */
.act { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cta { position: relative; display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 32px; border-radius: 28px; font-size: 16px; font-weight: 550; letter-spacing: .005em; text-shadow: 0 1px 12px rgba(30, 10, 0, .35); }
.cta b { font-weight: 700; }
.cta-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .7; }
.cta-price { font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .92); }
.cta:focus-visible, .bl:focus-visible, .switch:focus-visible, .brand:focus-visible { outline: 2px solid rgba(255, 255, 255, .92); outline-offset: 4px; }
.fine { margin: 0; font-size: 12.5px; color: var(--ink-3); text-align: center; }

.foot { position: relative; z-index: 1; padding: 6px 24px 22px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .42); }
.foot p { margin: 0; }

/* ------------------------------------------------------------------ smaller laptops: keep the whole composition on screen */
@media (max-height: 860px) and (min-width: 760px) {
  :root { --card-h: 342px; --pro-h: 398px; --price: 54px; }
  .top { height: 64px; }
  .card { padding-top: 34px; }
  .card.is-featured { padding-top: 38px; }
  .card.is-featured .price { --price: 60px; }
  .cards { margin-top: 24px; }
  .billing { margin-top: 12px; }
  .card hr { margin: 16px 0; }
  .floor { height: 58px; }
}
@media (max-height: 760px) and (min-width: 760px) {
  :root { --card-h: 318px; --pro-h: 368px; --price: 50px; }
  .title { font-size: 32px; }
  .top { height: 58px; }
  .card { padding: 28px 26px 24px; }
  .card.is-featured { padding-top: 32px; }
  .card.is-featured .price { --price: 56px; }
  .feats { gap: 9px; font-size: 14.5px; }
  .floor { height: 46px; }
  .cta { height: 52px; }
}
@media (max-width: 1060px) and (min-width: 760px) {
  :root { --card-w: clamp(214px, 28vw, 300px); --pro-w: clamp(230px, 30vw, 322px); --gap: clamp(16px, 2.4vw, 32px); }
  .card { padding-left: 22px; padding-right: 22px; }
  .feats { font-size: 14px; }
  .price { --price: 52px; }
  .card.is-featured .price { --price: 58px; }
}
@media (max-width: 860px) and (min-width: 760px) {
  .name { font-size: 18px; }
  .feats { font-size: 13.5px; }
  .feats li { padding-left: 15px; }
  .price { --price: 46px; }
  .card.is-featured .price { --price: 52px; }
}

/* big screens: the composition grows with them (CSS zoom re-lays text out at the bigger size, it is never a scaled raster;
   pricing.js reads the zoom so the glass follows) */
@media (min-width: 1800px) and (min-height: 1000px) { .title, .billing, .cards, .floor, .act { zoom: 1.2; } }
@media (min-width: 2300px) and (min-height: 1300px) { .title, .billing, .cards, .floor, .act { zoom: 1.5; } .top { zoom: 1.3; } }

/* ------------------------------------------------------------------ phone: stacked, the chosen plan expanded */
@media (max-width: 759px) {
  :root { --r: 24px; }
  .top { height: 60px; padding: 0 20px; }
  .logo { width: 30px; height: 30px; }
  .wordmark { font-size: 16px; }
  .stage { padding: 0 16px 20px; }
  .title { font-size: 25px; letter-spacing: .07em; text-transform: uppercase; font-weight: 640; }
  .t-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .t-short { display: inline; }
  .billing { margin-top: 8px; }
  .cards { flex-direction: column; align-items: stretch; width: 100%; max-width: 440px; gap: 16px; margin-top: 14px; }
  .card, .card.is-featured { width: 100%; min-height: 0; padding: 22px 22px 22px; }
  .name { font-size: 19px; }
  .price, .card.is-featured .price { --price: 50px; margin-top: 10px; }
  .more { grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
  .card[aria-checked="true"] .more { grid-template-rows: 1fr; }
  .more-in { opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s linear .6s; }
  .card[aria-checked="true"] .more-in { opacity: 1; visibility: visible; transition: opacity .35s var(--ease) .12s, visibility 0s; }
  .card hr { margin: 16px 0; }
  .feats { font-size: 15px; gap: 10px; padding-bottom: 4px; }
  .card[aria-checked="true"] { padding-bottom: 34px; transition: padding .6s var(--ease); }
  .floor { height: 18px; }
  .act { width: 100%; max-width: 440px; }
  .cta { width: 100%; justify-content: center; }
  .foot { padding-bottom: 18px; }
}
@media (max-width: 359px) {
  .title { font-size: 22px; }
  .card, .card.is-featured { padding: 18px 16px; }
  .cta { padding: 0 18px; font-size: 15px; gap: 8px; }
}
/* phones held sideways: one compact row, scrolling */
@media (max-height: 500px) and (min-width: 760px) {
  :root { --card-h: 300px; --pro-h: 330px; --price: 42px; }
  .top { height: 52px; }
  .title { font-size: 26px; }
  .card { padding: 22px 20px; }
  .card.is-featured .price { --price: 46px; }
  .feats { font-size: 13px; gap: 7px; }
  .card hr { margin: 12px 0; }
  .floor { height: 30px; }
}

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; transition-delay: 0s !important; animation-duration: 1ms !important; }
}

/* ------------------------------------------------------------------ no WebGL 2: the same layout in CSS frosted glass */
html.no-gl body {
  background:
    radial-gradient(60% 50% at 78% 18%, rgba(70, 170, 150, .45), transparent 70%),
    radial-gradient(40% 55% at 100% 45%, rgba(190, 80, 80, .5), transparent 70%),
    radial-gradient(50% 50% at 12% 30%, rgba(90, 50, 150, .5), transparent 70%),
    radial-gradient(50% 40% at 20% 92%, rgba(30, 70, 110, .5), transparent 70%),
    linear-gradient(#1c1339, #110d2b);
  background-attachment: fixed;
}
html.no-gl .card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .34); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 24px 50px rgba(8, 4, 30, .45);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  transition: translate .5s var(--ease), box-shadow .5s var(--ease);
}
html.no-gl .card:hover { translate: 0 -6px; }
html.no-gl .card[aria-checked="true"] { translate: 0 -12px; border-color: rgba(255, 210, 150, .85); box-shadow: inset 0 0 26px rgba(255, 170, 90, .35), 0 0 0 1px rgba(255, 196, 106, .4), 0 0 46px rgba(255, 160, 80, .42), 0 24px 50px rgba(8, 4, 30, .45); }
html.no-gl .track { position: relative; background: rgba(10, 6, 30, .55); border: 1px solid rgba(255, 255, 255, .3); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5); }
html.no-gl .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #c9cbe0 45%, #7b7f9e); box-shadow: 0 2px 6px rgba(0, 0, 0, .45); transition: transform .45s var(--ease); }
html.no-gl[data-billing="yearly"] .track::after { transform: translateX(34px); }
html.no-gl .cta { background: linear-gradient(180deg, rgba(255, 220, 170, .28), rgba(255, 170, 90, .14)); border: 1px solid rgba(255, 220, 170, .6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
