/*
 * Styling for the policy pages (terms, privacy, refund, contact, pricing).
 *
 * Self-contained on purpose. These pages load no Tailwind, no GSAP and no
 * third-party CSS, for three reasons: a payment provider's compliance reviewer
 * should never see a broken layout because a CDN was slow; they are the pages
 * most likely to be read on a bad connection; and they are the easiest part of
 * the site to serve under a strict CSP when the Tailwind CDN eventually goes.
 *
 * Colours mirror the app's dark theme (see style.css) so they do not read as a
 * different website, but they are literal values rather than var() references
 * because style.css is not loaded here.
 */

:root {
    --bg: #050505;
    --panel: #0a0a0c;
    --primary: #8b5cf6;
    --text: #e7e5e4;
    --muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 800px; margin: 0 auto; padding: 40px 24px 96px; }

header.site {
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
/*
 * The mark rides in as a BACKGROUND on the anchor plus left padding, not as a
 * flex child. It is drawn here rather than in the markup because this rule is
 * the single place six pages get their header from -- contact, pricing, privacy,
 * refund, terms and venues -- and six identical hand-edits is six chances for
 * one to drift.
 *
 * DO NOT MAKE THIS `display: inline-flex` WITH A `gap`. That was the first
 * attempt and it broke the wordmark: the markup is `Elite<span>QR</span>`, so
 * flex promotes the bare text node "Elite" and the span "QR" to two flex items
 * and the gap opens BETWEEN THEM. The header silently started reading
 * "Elite QR" instead of "EliteQR" -- caught in a screenshot, not by any test,
 * because nothing about it errors.
 *
 * FIXED px, not em: the mark is drawn on a 64px grid with 6px modules, so at a
 * size derived from the font it lands on fractional pixels and the ring holes
 * blur. 22px against an 18px wordmark is the ratio the preview was tuned at.
 * padding-left is that 22 plus a 9px gap.
 *
 * A background-image is governed by img-src, which is 'self', so this needs no
 * CSP change. scan.html and hub.html carry their own .brand and are deliberately
 * NOT included: they are the printed-code redirect path and do not take a new
 * request for decoration.
 */
header.site a.brand {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    display: inline-block;
    padding-left: 31px;
    line-height: 22px;
    background: url("/assets/mark.svg") left center / 22px 22px no-repeat;
}
header.site a.brand span { color: var(--primary); }
header.site nav { display: flex; gap: 18px; flex-wrap: wrap; }
header.site nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
}
header.site nav a:hover { color: var(--primary); }

h1 {
    font-size: clamp(28px, 5vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 24px 0 8px;
}
h2 {
    font-size: 19px;
    margin: 40px 0 12px;
    letter-spacing: -0.01em;
    border-left: 3px solid var(--primary);
    padding-left: 12px;
}
h3 { font-size: 15px; margin: 24px 0 8px; color: var(--text); }

p, li { color: var(--muted); font-size: 15px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 8px; }
a { color: var(--primary); }

.updated {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

/*
 * Placeholders the operator must replace before publishing. Deliberately loud:
 * a policy page that ships with "[COMPANY NAME]" still in it is worse than no
 * policy page, and this makes that impossible to miss on a skim.
 */
.todo {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #fde047;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.note {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 24px 0;
}
.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text); font-weight: 600; }
td { color: var(--muted); }

.table-scroll { overflow-x: auto; }

footer.site {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
footer.site a { margin: 0 10px; }

/* ==========================================
   PRICING
   ==========================================

   THE ONE IDEA, carried over from the landing page: a plan card is a QR code.
   Faint module grid, a real finder pattern on the featured plan instead of a
   floating "BEST VALUE" pill, and a scan line that sweeps the card on hover.
   The rationale for each of those is written out at the PRICING block in
   style.css -- this is the same design, rebuilt for a page that loads no
   Tailwind, no GSAP and no JavaScript at all.

   WHY REBUILT RATHER THAN SHARED. The landing's cards are assembled in
   js/pricing-ui.js out of Tailwind utility classes over the hand-written
   .plan-card rules. Reusing that markup here would mean putting the Tailwind
   Play CDN on the one public page a payment reviewer is most likely to read and
   Google is most likely to rank -- a ~400KB JIT compiler, a third-party CDN in
   the layout's critical path, and a fourth page pinned to 'unsafe-eval'. The
   decorative layers themselves were always plain CSS, so only the layout had to
   be rewritten.

   THE DIFFERENCES FROM THE LANDING, all forced by having no JS:
     - The glow is a static top-centre radial that fades in on hover, not a
       pointer-tracked spotlight. js/motion.js sets --mx/--my there; nothing
       sets them here, and the fallback values put the light in a sensible place.
     - No GSAP tilt, so no perspective wrapper.
     - The scan sweep is a CSS keyframe on :hover rather than a timeline. It is
       the signature of the section and it survives the port intact.
   The global prefers-reduced-motion rule at the end of this file kills all of it.

   COLOURS. style.css draws from theme tokens because --primary is user-swappable
   and one theme is light. This page has no theme switcher and is always dark, so
   the :root block at the top of this file is the whole palette.
*/

/* Pricing needs more room than 800px of prose. Applied alongside .wrap. */
.wrap.wide { max-width: 1080px; }

/*
 * FREE, as a full-width band rather than a fourth card.
 *
 * It is not competing on price with the paid plans -- it is the state every
 * account already starts in -- and standing it in the grid made four cards where
 * the landing deliberately tuned three. A band also gives the allowance list room
 * to run in two columns instead of a narrow stack.
 */
.plan-free {
    display: grid;
    grid-template-columns: minmax(200px, 260px) 1fr;
    gap: 28px;
    align-items: start;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin: 28px 0 20px;
}
.plan-free h3 { margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; color: var(--primary); }
.plan-free .price { font-size: 40px; font-weight: 800; color: var(--text); letter-spacing: -0.03em; line-height: 1; }
.plan-free .plan-note { font-size: 13px; margin: 10px 0 0; }
.plan-free ul { columns: 2; column-gap: 28px; margin: 0; }

@media (max-width: 640px) {
    .plan-free { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
    .plan-free ul { columns: 1; }
}

/* The three subscriptions. minmax(0,1fr) rather than auto so a long feature
   line cannot widen one column and unbalance the row. */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 20px 0 28px;
}

@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } }

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--panel);
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.plan-card:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); }

@supports not (color: color-mix(in srgb, red 50%, transparent)) {
    .plan-card:hover { border-color: var(--primary); }
}

.plan-card.is-featured {
    border-color: var(--primary);
    box-shadow: 0 18px 50px -24px var(--primary);
}

/* --- The module field: a QR symbol's grid, at the threshold of visible --- */
.plan-card__field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--primary) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary) 1px, transparent 1px);
    background-size: 13px 13px;
    opacity: 0.05;
    /* Fades downward so the grid frames the price and never competes with the
       button, which is the one thing on the card that must stay legible. */
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
}

.plan-card.is-featured .plan-card__field { opacity: 0.11; }

/* --- Static glow. The landing tracks the pointer; this page has no JS. --- */
.plan-card__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(320px circle at 50% 0%, var(--primary), transparent 68%);
    mix-blend-mode: screen;
}

.plan-card:hover .plan-card__glow { opacity: 0.14; }

/* --- THE SIGNATURE: a scanner reading the card --- */
.plan-card__scan {
    position: absolute;
    left: 0;
    right: 0;
    height: 130px;
    top: -130px;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
}

.plan-card:hover .plan-card__scan { animation: planScan 1.1s ease-in-out; }

@keyframes planScan {
    0%   { opacity: 0;    transform: translateY(0); }
    12%  { opacity: 0.5; }
    88%  { opacity: 0.5; }
    /* 130px of card + 130px of its own height clears the tallest card fully. */
    100% { opacity: 0;    transform: translateY(560px); }
}

.plan-card__body {
    position: relative;   /* above the field, the glow and the scan line */
    display: flex;
    flex-direction: column;
    flex: 1;
}

.plan-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 20px;
    margin-bottom: 16px;
}
.plan-card__head h3 {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
}
.plan-card__best {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--primary);
}

/* --- The finder pattern, drawn rather than imaged --- */
.qr-finder {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2.5px solid var(--primary);
    border-radius: 5px;
    position: relative;
}
.qr-finder::after {
    content: '';
    position: absolute;
    inset: 3.5px;
    border-radius: 2px;
    background: var(--primary);
}

/* Prices line up across cards; ₹89 and ₹649 share a rhythm. */
.plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 40px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
}
.plan-price .per { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.plan-rate { font-size: 12px; margin: 6px 0 0; }

/* The launch-price line. Stated as a rise, never as a struck-through "was"
   price -- see the comment block at the top of pricing.html. */
.plan-launch {
    margin: 4px 0 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

/*
 * The savings slot is ALWAYS rendered, on every card -- same reasoning as
 * js/pricing-ui.js. A badge on two cards and nothing on the third gave the row
 * three different internal rhythms and left a hole where the neighbours had a
 * chip. Monthly states the rate the others are measured against.
 */
.plan-slot { display: flex; align-items: center; min-height: 30px; margin: 18px 0 20px; }
.plan-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.plan-badge.is-muted { background: none; color: #71717a; padding-left: 0; }

.plan-card ul, .plan-free ul, .plan-pass-note ul { list-style: none; padding: 0; }
.plan-card li, .plan-free li {
    padding-left: 20px;
    position: relative;
    font-size: 13.5px;
    margin-bottom: 7px;
    break-inside: avoid;
}
.plan-card li::before, .plan-free li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* mt:auto pins the CTA to the card's foot so three cards of different feature
   counts still share one button baseline. */
.plan-cta {
    display: block;
    margin-top: auto;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.25s ease, opacity 0.25s ease;
}
.plan-cta:hover { background: rgba(255, 255, 255, 0.1); }
.plan-cta.is-primary {
    background: var(--primary);
    border-color: transparent;
    color: #fff;
}
.plan-cta.is-primary:hover { opacity: 0.9; background: var(--primary); }

/*
 * The passes -- wide and low, so they cannot compete with the subscriptions.
 * Somebody buying a code for Saturday's wedding is not choosing between ₹19 and
 * ₹649; they already know which one they want.
 */
.plan-passes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 28px; }
@media (max-width: 640px) { .plan-passes { grid-template-columns: 1fr; } }

.plan-pass {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--panel);
    transition: border-color 0.3s ease, background 0.3s ease;
}
.plan-pass:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.plan-pass .plan-price { font-size: 22px; }
.plan-pass .plan-rate { margin-top: 2px; }
.plan-pass .plan-launch { margin-top: 2px; }
.plan-pass .plan-cta {
    margin-top: 0;
    flex: 0 0 auto;
    padding: 9px 14px;
    font-size: 11px;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ==========================================================================
 * THE MOBILE / TABLET PASS
 * ==========================================================================
 *
 * This file is the shell behind SEVEN pages -- pricing, menu-guide, contact,
 * privacy, refund, terms and venues -- and it had four media rules to
 * venues.css's thirteen. Measured before this block was written, at 390px and
 * 820px with touch emulated:
 *
 *     contact     21 of 21 controls under 44px
 *     privacy     16 of 17
 *     pricing     19 of 22, plus 15 over-long lines at tablet
 *     menu-guide  11 of 14, plus 40 over-long lines at tablet
 *
 * Almost every one of those failures is the same two rules: the header nav and
 * the footer links, both 13px text with no padding, giving a 22px target. They
 * are the most-tapped things on the public site and the least tappable.
 */

/* --- 1. TAP TARGETS ---
 *
 * 44px is the size of the end of a finger. inline-flex + min-height rather than
 * vertical padding, so the box grows around the text without moving the
 * baseline and re-spacing every header on the site.
 *
 * ⚠ `header.site nav a` DELIBERATELY EXCLUDES `a.brand`, which is a sibling of
 * <nav>, not a child. Do not widen this selector to `header.site a`: the brand
 * must never become a flex container. Its markup is `Elite<span>QR</span>`, so
 * flex promotes the bare text node and the span to two items and the gap opens
 * BETWEEN THEM -- the wordmark silently reads "Elite QR". That bug has been
 * made once already; the long note beside a.brand above is its gravestone.
 */
header.site nav a,
footer.site a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* --- 2. TYPE THAT SURVIVES A BUS ---
 *
 * 13px is a desktop size read at arm's length. On a phone held in one hand on
 * the move it is the size people zoom to escape. The body is already 16px; it
 * is only the chrome that was small.
 */
header.site nav a { font-size: 15px; }
footer.site { font-size: 14px; }

/* --- 1b. THE THREE TARGETS THE FIRST RULE COULD NOT REACH ---
 *
 * THE BRAND, without flex. It is a link home and was a 22px target, but it can
 * never become a flex container -- see the warning above. Vertical padding on
 * the existing inline-block gets it to 44px and leaves the wordmark alone.
 */
header.site a.brand { padding-top: 11px; padding-bottom: 11px; }

/* The buy buttons measured 39px: near enough to look deliberate and still under
   a fingertip. These are the controls the pricing page exists to be tapped on. */
.plan-cta { min-height: 44px; }

/* A link that IS a whole table cell -- the contact page's Support / Billing
   routes. `:only-child` is doing real work: the same table has links INSIDE
   sentences ("see the Refund Policy"), and those must stay inline. */
td > a:only-child {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* --- 3. A MEASURE, NOT A WIDTH ---
 *
 * `.wrap` is 800px, which at 16px is about 94 characters a line on a tablet.
 * Past roughly 75 the eye loses the return sweep and re-reads the line it just
 * finished -- which is why the guide and the privacy policy measured 40 and 34
 * over-long blocks while looking, at a glance, perfectly fine.
 *
 * Constrained on the PROSE rather than on `.wrap`, because the same wrapper
 * holds card grids that legitimately want the full width. max-width only ever
 * narrows, so a card's own paragraph is unaffected.
 */
.wrap p,
.wrap li { max-width: 68ch; }

/* --- 4. THE PHONE HEADER ---
 *
 * With 44px targets the nav wraps to a second row on a narrow screen, which is
 * correct -- wrapping keeps every destination reachable, where a horizontally
 * scrolling nav hides half of them behind a gesture nobody is told about. The
 * padding tightens so the taller nav does not push the page title off screen.
 */
/* --- 5. THE PRICING PAGE IS READ BEFORE MONEY CHANGES HANDS ---
 *
 * Its feature lists were 13.5px and its plan notes 13px -- the exact lines a
 * buyer reads to decide, set at a size that assumes a monitor at arm's length.
 * 41 elements under 14px, 23 of them inside the plan cards.
 *
 * Gated on a coarse pointer, so the desktop table keeps its density: the cards
 * sit three across there and growing the type would break the column balance
 * the `minmax(0,1fr)` grid was tuned for.
 */
@media (pointer: coarse) {
    .plan-card li,
    .plan-free li,
    .plan-free .plan-note,
    .updated { font-size: 15px; }

    /* The free plan's two-column feature list becomes one column of readable
       text rather than two of cramped text. */
    .plan-free ul { columns: 1; }
}

@media (max-width: 640px) {
    header.site { padding: 10px 16px; gap: 2px 16px; }
    header.site nav { gap: 2px 16px; }
    .wrap { padding: 28px 18px 72px; }
    footer.site { padding: 24px 16px; }
    footer.site a { margin: 0 6px; }
}
