/* ── PayMaster — edupaymaster.in ──────────────────────────────────────────────
   Hand-written, no framework, no build step. The palette comes from the buyer's
   own world — school crests, honour boards, the brass seal on a letterhead —
   rather than from software, because the visitor is a school correspondent and
   the page's job is to look official and permanent, not like a startup.

   Two rules that everything else follows:
     Brass MARKS, it never ACTS. Section numbers, rules above totals, the seal.
     Never a button fill.
     One blue button per screen, so what to click is never in doubt.
   Crest green means approved and nothing else. ---------------------------- */

:root {
  --ink:         #0B1220;
  --ledger:      #141F35;
  --brass:       #A16207;
  --brass-light: #E7BC63;
  --register:    #F6F6F3;
  --crest:       #0F6E42;
  --action:      #1D4ED8;
  --action-lift: #3B82F6;

  --paper:   #FFFFFF;
  --line:    #E4E3DD;
  --line-dk: rgba(255,255,255,.09);
  --body:    #3F4A5C;
  --muted:   #6B7687;
  --on-dark: #8FA0BC;

  --font-display: 'Lexend', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --dur:   420ms;
  --dur-s: 180ms;
  --ease:  cubic-bezier(.2,.7,.3,1);

  --wrap: 1140px;
  --pad:  24px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--register);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; }
p  { margin: 0; }
a  { color: inherit; }

.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(64px, 9vw, 116px) 0; }
.section--dark { background: var(--ink); color: var(--on-dark); }
.section--dark h2, .section--dark h3 { color: #F1F5F9; }
.lede { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted); max-width: 62ch; margin-top: 14px; }
.section--dark .lede { color: var(--on-dark); }

/* Eyebrow — brass, and it always names the section. Marks, never acts. */
.eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--brass); flex: none; }
.section--dark .eyebrow { color: var(--brass-light); }
.section--dark .eyebrow::before { background: var(--brass-light); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-size: .96rem; font-weight: 600; text-decoration: none;
  padding: 14px 26px; border-radius: 10px; border: none; cursor: pointer;
  transition: transform var(--dur-s) var(--ease), box-shadow var(--dur-s) var(--ease),
              background var(--dur-s) var(--ease);
}
.btn--primary {
  background: linear-gradient(135deg, var(--action-lift), var(--action));
  color: #fff; box-shadow: 0 1px 2px rgba(11,18,32,.18), 0 10px 22px -10px rgba(29,78,216,.65);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(11,18,32,.2), 0 16px 30px -12px rgba(29,78,216,.7); }
.btn--primary:active { transform: translateY(0); filter: brightness(.96); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { background: #fff; }
.section--dark .btn--ghost,
.hero .btn--ghost { color: #E2E8F0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover { background: rgba(255,255,255,.07); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 30px; }
.btn-note { font-size: .88rem; color: var(--muted); }
.section--dark .btn-note { color: var(--on-dark); }

:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(29,78,216,.4); border-radius: 8px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 60; background: rgba(11,18,32,.9);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-dk);
}
.hdr__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 66px; }
.hdr__mark { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.hdr__mark b { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; color: #F1F5F9; letter-spacing: -.02em; }
.hdr__nav { display: flex; gap: 26px; margin-left: auto; }
.hdr__nav a { color: var(--on-dark); text-decoration: none; font-size: .92rem; transition: color var(--dur-s) var(--ease); }
.hdr__nav a:hover { color: #F1F5F9; }
.hdr .btn { padding: 10px 20px; font-size: .9rem; }
@media (max-width: 860px) { .hdr__nav { display: none; } }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { background: var(--ink); color: var(--on-dark); padding: clamp(60px, 8vw, 104px) 0 clamp(72px, 9vw, 120px); position: relative; overflow: hidden; }
.hero::after {
  /* a single soft brass wash, top-right — the only ambient effect on the page */
  content: ''; position: absolute; top: -30%; right: -10%; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(161,98,7,.16), transparent 68%); pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero__sub { font-size: clamp(1.02rem, 1.7vw, 1.18rem); color: var(--on-dark); margin-top: 18px; max-width: 46ch; }
@media (max-width: 940px) { .hero__grid { grid-template-columns: 1fr; } }

/* ── The signature: a payslip computing, then the seal ──────────────────── */
.slip {
  background: linear-gradient(168deg, var(--ledger), #101A2C);
  border: 1px solid var(--line-dk); border-radius: 16px;
  /* the deep bottom padding is the stamp zone — a real payslip leaves room
     below the total for exactly this, and it keeps the seal off the figures */
  padding: 26px 28px 128px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); position: relative;
}
.slip__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.slip__who { color: #E2E8F0; font-weight: 600; font-size: .96rem; }
.slip__mo  { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.slip__row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: .94rem; }
.slip__row span { color: var(--on-dark); }
.slip__row em { font-style: normal; font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: #CBD5E1; }
.slip__row--ded em { color: #FCA5A5; }
.slip__rule { height: 2px; margin: 12px 0 10px; background: linear-gradient(90deg, var(--brass-light), rgba(231,188,99,0)); transform-origin: left; }
.slip__net { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; }
.slip__net span { font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; color: var(--on-dark); font-weight: 600; }
.slip__net em { font-style: normal; font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: #fff; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* The seal — the one thing this page is remembered by.
   Hung off the bottom-right CORNER of the slip, not over it. A stamp lands on
   the edge of a document, and more to the point the app's own rule applies
   here: nothing may sit on top of a figure while it is being read. */
.seal {
  position: absolute; right: 26px; bottom: 20px; width: 96px; height: 96px;
  display: grid; place-items: center; border-radius: 50%;
  border: 2.5px solid var(--brass); color: var(--brass-light);
  transform: rotate(-13deg) scale(2.1); opacity: 0;
  font-family: var(--font-display); font-weight: 700; font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase; text-align: center; line-height: 1.35;
}
@media (max-width: 460px) { .seal { right: 18px; bottom: 16px; width: 82px; height: 82px; } }
.seal small { display: block; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .08em; opacity: .8; margin-top: 3px; }

/* Play once on load. Each row is dealt, the rule draws, then the seal presses. */
.play .slip__row { opacity: 0; animation: dealIn 380ms var(--ease) forwards; }
.play .slip__row:nth-of-type(1) { animation-delay: 180ms; }
.play .slip__row:nth-of-type(2) { animation-delay: 400ms; }
.play .slip__row:nth-of-type(3) { animation-delay: 560ms; }
.play .slip__row:nth-of-type(4) { animation-delay: 720ms; }
.play .slip__rule { transform: scaleX(0); animation: drawRule 420ms var(--ease) 900ms forwards; }
.play .slip__net  { opacity: 0; animation: dealIn 420ms var(--ease) 1080ms forwards; }
.play .seal       { animation: press 520ms cubic-bezier(.3,1.5,.5,1) 1500ms forwards; }

@keyframes dealIn  { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes drawRule{ to { transform: scaleX(1); } }
@keyframes press   { to { opacity: .92; transform: rotate(-13deg) scale(1); } }

/* ── Proof ──────────────────────────────────────────────────────────────── */
.proof { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(40px, 5vw, 62px) 0; }
.proof__q { font-family: var(--font-display); font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-weight: 500; color: var(--ink); line-height: 1.45; letter-spacing: -.015em; max-width: 34ch; }
.proof__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.proof__by { margin-top: 20px; font-size: .93rem; color: var(--muted); }
.proof__by b { display: block; color: var(--ink); font-weight: 600; font-size: 1rem; }
@media (max-width: 820px) { .proof__grid { grid-template-columns: 1fr; } }

/* ── Cycle (sticky screenshot tour) ─────────────────────────────────────── */
.cycle__grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(30px, 5vw, 70px); align-items: start; margin-top: 44px; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 17px 0;
  border-top: 1px solid var(--line-dk); cursor: pointer;
  transition: opacity var(--dur) var(--ease);
  opacity: .42;
}
.step:last-child { border-bottom: 1px solid var(--line-dk); }
.step.on { opacity: 1; }
.step__n {
  font-family: var(--font-mono); font-size: .78rem; color: var(--brass-light);
  padding-top: 3px; transition: color var(--dur) var(--ease);
}
.step h3 { color: #E2E8F0; font-size: 1.02rem; }
.step p { font-size: .92rem; color: var(--on-dark); margin-top: 4px; }
.shotpane { position: sticky; top: 100px; }
.shot { border-radius: 13px; overflow: hidden; border: 1px solid var(--line-dk); background: var(--ledger); box-shadow: 0 26px 54px -28px rgba(0,0,0,.85); }
.shot img { display: block; width: 100%; height: auto; }
.shot--stack { position: relative; }
.shot--stack img { position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur) var(--ease); }
.shot--stack img.on { opacity: 1; position: relative; }
@media (max-width: 920px) { .cycle__grid { grid-template-columns: 1fr; } .shotpane { position: static; order: -1; } }

/* ── Feature blocks ─────────────────────────────────────────────────────── */
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 68px); align-items: center; }
.feat--flip .feat__txt { order: 2; }
.feat__list { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.feat__list li { display: grid; grid-template-columns: auto 1fr; gap: 12px; font-size: .97rem; align-items: start; }
.feat__list svg { margin-top: 4px; flex: none; color: var(--crest); }
.section--dark .feat__list svg { color: #4ADE80; }
.frame { border-radius: 13px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: 0 22px 44px -26px rgba(11,18,32,.42); }
.section--dark .frame { border-color: var(--line-dk); box-shadow: 0 26px 54px -28px rgba(0,0,0,.8); }
.frame img { display: block; width: 100%; height: auto; }
@media (max-width: 880px) { .feat { grid-template-columns: 1fr; } .feat--flip .feat__txt { order: 0; } }

/* ── Compare table ──────────────────────────────────────────────────────── */
.cmp { margin-top: 40px; overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.cmp table { width: 100%; border-collapse: collapse; min-width: 720px; }
.cmp th, .cmp td { padding: 15px 18px; text-align: left; font-size: .93rem; border-bottom: 1px solid var(--line); }
.cmp thead th { background: #FBFBF9; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.cmp thead th:last-child { color: var(--brass); }
.cmp tbody tr:last-child td { border-bottom: none; }
.cmp td:first-child { color: var(--ink); font-weight: 500; }
.cmp td:last-child { background: #FBFAF6; color: var(--ink); }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { margin-top: 36px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.03rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass);
  transform: translateY(-70%) rotate(45deg); transition: transform var(--dur-s) var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq p { padding: 0 0 22px; max-width: 70ch; font-size: .97rem; }

/* ── Form ───────────────────────────────────────────────────────────────── */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: .82rem; font-weight: 600; color: #E2E8F0; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; border-radius: 9px; font-family: inherit; font-size: .95rem;
  background: rgba(255,255,255,.05); border: 1px solid var(--line-dk); color: #F1F5F9;
  transition: border-color var(--dur-s) var(--ease), background var(--dur-s) var(--ease);
}
.form input::placeholder, .form textarea::placeholder { color: #64748B; }
.form input:focus, .form textarea:focus { border-color: var(--action-lift); background: rgba(255,255,255,.08); }
.form textarea { resize: vertical; min-height: 84px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { grid-column: 1 / -1; font-size: .93rem; min-height: 22px; }
.form__msg.ok  { color: #4ADE80; }
.form__msg.err { color: #FCA5A5; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.foot { background: var(--ink); border-top: 1px solid var(--line-dk); padding: 40px 0 48px; color: var(--on-dark); font-size: .9rem; }
.foot__in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--on-dark); text-decoration: none; margin-left: 20px; }
.foot a:hover { color: #F1F5F9; }

/* ── Scroll reveal ────────────────────────────────────────────────────────
   Scoped to .js, set by an inline script in <head>. Without that guard a JS
   error — or a blocked script — would leave every section at opacity 0 and the
   page would look empty rather than merely unanimated. */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity 620ms var(--ease), transform 620ms var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* ── Reduced motion: one collapse point, as in the app ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0ms !important;
    animation-iteration-count: 1 !important; transition-duration: .01ms !important;
  }
  .js .rv { opacity: 1; transform: none; }
  .play .slip__row, .play .slip__net { opacity: 1; }
  .play .slip__rule { transform: scaleX(1); }
  .play .seal { opacity: .92; transform: rotate(-13deg) scale(1); }
}
