/* classic-pay.css — "Sage Classic" look shared by the two payment pages
   (premium-get.html = Second Year, payment.html = First Year).
   Palette: Pale Sage Ivory #E5E8CE · Muted Forest Sage #789575 (+ a deeper forest for text/buttons so small text stays readable). */

:root {
  --ivory:   #E5E8CE;   /* page background */
  --ivory-2: #EEF0DC;   /* raised surfaces */
  --ivory-3: #DADFC1;   /* pressed / dividers */
  --sage:    #789575;   /* accent: headline, icons, borders */
  --forest:  #2F4A36;   /* buttons, selected cards */
  --forest-2:#3C5C44;
  --ink:     #1F2B21;
  --muted:   #55634F;
  --line:    rgba(47, 74, 54, .22);
  --danger:  #9B3B2F;
  --ok:      #2F6B3C;
  --display: 'Anton', 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --serif:   'Fraunces', 'Georgia', 'Noto Serif Devanagari', serif;
  --sans:    'Hanken Grotesk', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); background: var(--ivory); color: var(--ink);
  min-height: 100vh; display: flex; flex-direction: column; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input { font-family: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

/* ── header ─────────────────────────────────────────────── */
.top-header, .site-bar {
  position: sticky; top: 0; z-index: 50; background: rgba(229, 232, 206, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-header { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; height: 58px; }
.site-bar-in { max-width: 520px; margin: 0 auto; height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 12px; }
.back-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--forest);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; text-decoration: none;
}
.back-btn:hover { background: var(--ivory-3); }
.header-title, .site-brand { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--forest); letter-spacing: -.01em; }
.header-secure, .site-secure { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.site-secure svg { width: 14px; height: 14px; }

/* ── hero ───────────────────────────────────────────────── */
.hero { max-width: 520px; width: 100%; margin: 0 auto; padding: 30px 20px 6px; }
.hero-eyebrow { display: flex; align-items: center; gap: 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--forest); margin-bottom: 12px; }
.hero-eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--sage); opacity: .6; }
.hero-title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; color: var(--sage);
  font-size: clamp(60px, 19vw, 98px); line-height: .9; letter-spacing: .005em; margin-bottom: 14px;
}
.hero-title span { display: block; }
.hero-title .alt { color: var(--forest); }
.hero-sub { font-size: 15px; font-weight: 400; color: var(--muted); max-width: 400px; }
.hero-sub b { color: var(--forest); font-weight: 700; }
.hero-feats { display: flex; gap: 10px; margin-top: 20px; }
.hero-feat { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--forest); line-height: 1.25; }
.hero-feat i { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--sage); color: var(--sage); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.hero-feat small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }

.content { max-width: 520px; width: 100%; margin: 0 auto; padding: 18px 20px 48px; flex-grow: 1; }

/* ── steps ──────────────────────────────────────────────── */
.steps-bar, .fy-steps { display: flex; align-items: center; margin: 0 0 22px; }
.step-item, .fy-step { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.15; }
.step-dot, .fy-dot {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--sage); color: var(--sage);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; transition: all .25s;
}
.step-item.active, .fy-step.active { color: var(--forest); }
.step-item.active .step-dot, .fy-step.active .fy-dot { background: var(--forest); border-color: var(--forest); color: var(--ivory); }
.step-item.done .step-dot, .fy-step.done .fy-dot { background: var(--sage); border-color: var(--sage); color: var(--ivory); }
.step-line, .fy-line { flex: 1; height: 1px; background: var(--line); margin: 0 10px; min-width: 14px; }
.step-line.done { background: var(--sage); }

/* ── generic bits ───────────────────────────────────────── */
.section-title, .page-title {
  font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--forest); letter-spacing: -.02em; line-height: 1.1; margin-bottom: 6px;
}
.section-title { font-size: 22px; margin: 18px 0 14px; }
.page-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.page-icon { display: none; }
.step { display: none; }
.step.active { display: block; animation: cpIn .35s ease both; }
@keyframes cpIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step-hidden { display: none !important; }
.hide { display: none !important; }

.notice-box, .warning-box, .teaser-strip, .current-role-note {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted);
  background: var(--ivory-2); border: 1px solid var(--line); border-radius: 16px; padding: 13px 15px; margin-bottom: 14px;
}
.notice-box i, .warning-box i, .teaser-strip i { color: var(--sage); margin-top: 3px; }
.notice-box strong, .warning-box strong, .teaser-strip b, .current-role-note strong { color: var(--forest); }
.warning-box { border-style: dashed; }
.current-role-note { display: block; margin: 12px 0 0; }

/* ── plan cards (Second Year .plan-item / First Year .tier) ── */
.plan-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.plan-item, .tier {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer;
  background: var(--ivory-2); border: 1px solid var(--line); border-radius: 22px; padding: 18px 18px;
  transition: transform .18s ease, background .2s, border-color .2s, color .2s;
}
.plan-item:hover, .tier:hover { transform: translateY(-2px); border-color: var(--sage); }
.plan-left, .tier-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.plan-item input[type="radio"] {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--sage); background: transparent; display: grid; place-content: center; cursor: pointer;
}
.plan-item input[type="radio"]::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--ivory); transform: scale(0); transition: transform .15s; }
.plan-item input[type="radio"]:checked::before { transform: scale(1); }
.plan-name { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--forest); letter-spacing: -.01em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plan-desc, .tier-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.plan-badge, .tier-badge {
  font-family: var(--sans); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--sage); color: var(--forest); padding: 2px 8px; border-radius: 999px;
}
.plan-badge.pop { background: var(--sage); color: #fff; border-color: var(--sage); }
.plan-price-wrap, .tier-price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.plan-price, .tier-price-num { font-family: var(--display); font-size: 31px; font-weight: 400; line-height: 1; color: var(--forest); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.plan-permonth { font-size: 11px; font-weight: 600; color: var(--muted); }
.plan-price.is-loading, .tier-price-num.is-loading { opacity: .45; }
.tier-icon { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--sage); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.tier-name { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--forest); letter-spacing: -.01em; }

/* selected: filled forest card, ivory text */
.plan-item.selected, .tier.selected-silver, .tier.selected-gold, .tier.selected-diamond { background: var(--forest); border-color: var(--forest); }
.plan-item.selected .plan-name, .tier[class*="selected-"] .tier-name { color: var(--ivory); }
.plan-item.selected .plan-desc, .plan-item.selected .plan-permonth, .tier[class*="selected-"] .tier-desc { color: rgba(229, 232, 206, .8); }
.plan-item.selected .plan-price, .tier[class*="selected-"] .tier-price-num { color: var(--ivory); }
.plan-item.selected .plan-badge { color: var(--ivory); border-color: rgba(229, 232, 206, .6); }
.plan-item.selected .plan-badge.pop { background: var(--ivory); color: var(--forest); border-color: var(--ivory); }
.plan-item.selected input[type="radio"] { border-color: var(--ivory); background: var(--ivory); }
.plan-item.selected input[type="radio"]::before { background: var(--forest); }
.tier[class*="selected-"] .tier-icon { border-color: rgba(229, 232, 206, .6); }

/* ── buttons ────────────────────────────────────────────── */
.pay-btn, .main-btn, .reg-submit-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 22px;
  border: none; border-radius: 999px; background: var(--forest); color: var(--ivory);
  font-size: 15px; font-weight: 600; letter-spacing: .01em; cursor: pointer; transition: background .2s, transform .15s, opacity .2s;
}
.pay-btn:hover:not(:disabled), .main-btn:hover:not(:disabled), .reg-submit-btn:hover:not(:disabled) { background: var(--forest-2); transform: translateY(-1px); }
.pay-btn:disabled, .main-btn:disabled, .reg-submit-btn:disabled { opacity: .45; cursor: not-allowed; }
.main-btn.btn-restricted { background: var(--danger); opacity: 1; }
.new-user-btn {
  width: 100%; margin-top: 14px; padding: 13px 18px; border-radius: 999px; background: transparent; color: var(--forest);
  border: 1px solid var(--sage); font-size: 13.5px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.new-user-btn:hover { background: var(--ivory-3); }
.chosen-plan { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ivory-2); border: 1px solid var(--line); border-radius: 16px; padding: 11px 14px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.chosen-plan b { color: var(--forest); }
.chosen-plan button, .back-btn.inline { background: none; border: none; color: var(--forest); font-weight: 700; font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.step > .back-btn { width: auto; height: auto; border: none; background: none; border-radius: 0; padding: 0; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: var(--forest); text-decoration: none; }

/* ── PRN + registration ─────────────────────────────────── */
.prn-section { background: var(--ivory-2); border: 1px solid var(--line); border-radius: 24px; padding: 20px; margin-bottom: 20px; }
.prn-section-title { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--forest); margin-bottom: 14px; }
.prn-section-title i { color: var(--sage); }
.prn-input-row { display: flex; gap: 8px; margin-bottom: 8px; }
.prn-input, .prn-inp, .reg-inp {
  width: 100%; flex: 1; padding: 14px 16px; background: var(--ivory); border: 1px solid var(--line); border-radius: 14px;
  font-size: 15px; font-weight: 600; color: var(--ink); outline: none; letter-spacing: .04em; transition: border-color .15s, box-shadow .15s;
}
.prn-input::placeholder, .prn-inp::placeholder, .reg-inp::placeholder { color: #8b9885; font-weight: 400; letter-spacing: 0; }
.prn-input:focus, .prn-inp:focus, .reg-inp:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(120, 149, 117, .3); }
.prn-inp { text-align: center; font-size: 20px; letter-spacing: .14em; }
.prn-inp.valid { border-color: var(--ok); }
.prn-inp.invalid { border-color: var(--danger); }
.prn-verify-btn { padding: 0 20px; border: none; border-radius: 999px; background: var(--forest); color: var(--ivory); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.prn-verify-btn:disabled { opacity: .5; cursor: not-allowed; }
.prn-box { background: var(--ivory-2); border: 1px solid var(--line); border-radius: 22px; padding: 18px; margin-bottom: 16px; }
.prn-label { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--forest); }
.prn-hint { font-size: 12px; color: var(--muted); margin: 2px 0 12px; }
.prn-counter { font-size: 11.5px; font-weight: 700; color: var(--muted); text-align: right; margin-top: 6px; }
.prn-counter.ok { color: var(--ok); } .prn-counter.err { color: var(--danger); }
.prn-status, .verify-msg { font-size: 12.5px; font-weight: 600; margin-top: 6px; min-height: 18px; display: flex; align-items: center; gap: 6px; }
.verify-msg { display: none; padding: 10px 12px; border-radius: 12px; background: var(--ivory); border: 1px solid var(--line); margin-top: 12px; }
.prn-status.success, .verify-msg.ok { color: var(--ok); }
.prn-status.error, .verify-msg.err { color: var(--danger); }
.verify-msg.checking { color: var(--muted); }
.debug-box { display: none; }
.prn-verified-card { display: none; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--ivory); border: 1px solid var(--sage); }
.prn-verified-card.show { display: flex; }
.prn-verified-card > i { color: var(--sage); font-size: 22px; }
.prn-student-name { font-family: var(--serif); font-weight: 600; color: var(--forest); }
.prn-student-sub { font-size: 12px; color: var(--muted); }

.reg-form { display: none; flex-direction: column; gap: 10px; margin-top: 14px; padding: 16px; border: 1px dashed var(--sage); border-radius: 20px; }
.reg-form.show { display: flex; }
.reg-pass-wrap { position: relative; }
.reg-pass-wrap .reg-inp, .reg-pass-wrap .prn-input { padding-right: 46px; }
.reg-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: none; background: none; color: var(--muted); cursor: pointer; font-size: 15px; }
.reg-hint { font-size: 12px; color: var(--muted); }

/* ── pay step ───────────────────────────────────────────── */
.plan-section { display: none; margin-top: 4px; }
.plan-section.show { display: block; animation: cpIn .35s ease both; }
.perks-title { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--forest); margin-bottom: 12px; }
.perks-list { display: flex; flex-direction: column; margin-bottom: 8px; }
.perk-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.perk-icon { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--sage); color: var(--sage) !important; background: transparent !important; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.perk-text { flex: 1; } .perk-name { font-weight: 700; font-size: 14px; color: var(--forest); } .perk-desc { font-size: 12px; color: var(--muted); }
.perk-lock { color: var(--sage); font-size: 12px; }
.perks-note { font-size: 12px; color: var(--muted); margin-bottom: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px 0; border-top: 1px solid var(--forest); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.total-label { font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--forest); margin-right: auto; }
.total-amount { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--forest); font-variant-numeric: tabular-nums; }
.total-amount.bump { animation: cpBump .35s ease; }
@keyframes cpBump { 50% { transform: scale(1.07); } }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px 0; }
.trust-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 14px; }
.trust-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--forest); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.trust-chip i { color: var(--sage); }
.rules-box { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 20px; }
.rules-title { font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--forest); margin-bottom: 8px; }
.rule-item { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--muted); padding: 4px 0; }
.rule-item i { font-size: 5px; margin-top: 8px; color: var(--sage); }

/* order summary (First Year) */
.pay-summary { background: var(--ivory-2); border: 1px solid var(--line); border-radius: 22px; padding: 6px 18px 4px; margin-bottom: 16px; }
.ps-header { font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--forest); padding: 14px 0 10px; border-bottom: 1px solid var(--line); }
.ps-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ps-row:last-child { border-bottom: none; }
.ps-label { color: var(--muted); } .ps-val { font-weight: 700; color: var(--forest); text-align: right; }
.ps-prn { font-weight: 700; color: var(--forest); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.ps-amount { font-family: var(--display); font-size: 36px; line-height: 1; color: var(--forest); font-variant-numeric: tabular-nums; }
.pay-note { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 12px; }

/* ── visitor counter ────────────────────────────────────── */
.visitor-counter { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; margin: 22px 0 0; }
.visitor-counter[hidden] { display: none; }
.vc-icon { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--sage); color: var(--sage); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.vc-icon svg { width: 18px; height: 18px; }
.vc-body { min-width: 0; flex: 1; }
.vc-label { font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.vc-value { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 2px 0; }
.vc-num { font-family: var(--display); font-size: 28px; line-height: 1.1; color: var(--forest); font-variant-numeric: tabular-nums; }
.vc-suffix { font-size: 12px; font-weight: 600; color: var(--muted); }
.vc-sub { font-size: 11px; color: var(--muted); }
.visitor-counter.is-loading .vc-num { color: transparent; width: 84px; border-radius: 8px; background: linear-gradient(90deg, var(--ivory-3) 25%, var(--ivory-2) 50%, var(--ivory-3) 75%); background-size: 200% 100%; animation: cpShimmer 1.2s linear infinite; }
.visitor-counter.is-error .vc-num { color: var(--muted); }
@keyframes cpShimmer { to { background-position: -200% 0; } }

/* spinners + toast */
.spinner, .spinner-w { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: cpSpin .7s linear infinite; }
@keyframes cpSpin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 24px); z-index: 200; max-width: calc(100vw - 32px);
  background: var(--forest); color: var(--ivory); font-size: 13px; font-weight: 600; padding: 12px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: all .3s; display: flex; gap: 8px; align-items: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .hero { padding-top: 48px; } .content { padding-top: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* spacing for the First Year step list */
.tier { margin-bottom: 12px; }
.step .main-btn { margin-top: 18px; }
