/* public.css — Public website zone, built on base.css (plan.md §6, §9). */

/* Self-hosted script accent font (Dancing Script, OFL) — used only on the big/bold public-site
   headings per the user's request, never loaded from a CDN. */
@font-face {
  font-family: 'Dancing Script';
  src: url('../fonts/DancingScript-Variable.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}

/* Public site body copy — everything except the script-font headings above, which keep
   winning via their own more specific selector regardless of this body-level rule. */
body { font-family: 'Times New Roman', Times, Georgia, serif; }

.pub-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.08rem; }
.logo-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 800; font-size: .88rem; display: flex; align-items: center; justify-content: center; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { font-size: .87rem; font-weight: 600; color: var(--ink); opacity: .75; }
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.burger { display: none; flex-direction: column; gap: 4px; background: none; border: none; padding: 6px; }
.burger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
.mobile-menu { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: #fff; z-index: 99; padding: 20px; overflow-y: auto; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 13px 2px; font-size: 1rem; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-menu .nav-actions { flex-direction: column; margin-top: 16px; gap: 10px; }
.mobile-menu .btn { width: 100%; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .burger { display: flex; }
}

.pub-footer { background: var(--ink); border-top: 1px solid var(--ink); padding: 48px 0 24px; }
.pub-footer, .pub-footer p { color: #fff; }
.pub-footer .logo { color: #fff; font-weight: 800; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 36px 44px; margin-bottom: 32px; }
.footer-about { flex: 0 1 300px; }
.footer-about p { max-width: 300px; }
.footer-col:not(.footer-about) { flex: 0 1 140px; }
.footer-col h5 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #cbd5e1; font-weight: 700; margin-bottom: 16px; }
.footer-col a, .footer-col a:visited, .footer-col p { display: block; font-size: .9rem; color: #ffffff; opacity: 1; margin-bottom: 12px; }
.footer-col a:hover { color: var(--accent-light); text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px; font-size: .8rem; color: #e2e8f0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
@media (max-width: 760px) {
  .footer-grid { row-gap: 30px; }
  .footer-col:not(.footer-about) { flex: 1 1 42%; }
}
@media (max-width: 560px) {
  .footer-grid { flex-direction: column; gap: 30px; }
  .footer-about, .footer-about p { max-width: none; }
  .footer-col { flex: 1 1 auto; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
}

.section { padding: 28px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 620px; margin: 0 auto 20px; text-align: center; }
.section-head h2 { font-family: 'Dancing Script', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; margin-bottom: 8px; }
.section-head p { color: var(--muted); font-size: .94rem; }
.section-foot { text-align: center; margin-top: 18px; }
.page-head { padding: 20px 0 4px; text-align: center; }
.page-head h1 { font-family: 'Dancing Script', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: clamp(2rem, 3.6vw, 2.6rem); font-weight: 700; margin-bottom: 6px; }
.page-head p { color: var(--muted); max-width: 600px; margin: 0 auto; }
@media (max-width: 600px) { .section { padding: 20px 0; } }

.hero { position: relative; padding: 64px 0 52px; background: linear-gradient(180deg, var(--accent-light) 0%, #fff 60%); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .4; }
.hero-bg .orb-a { width: 360px; height: 360px; top: -140px; left: -100px; background: radial-gradient(circle, #3b82f6, transparent 70%); animation: orb-drift-a 16s ease-in-out infinite; }
.hero-bg .orb-b { width: 300px; height: 300px; bottom: -120px; right: -60px; background: radial-gradient(circle, #a855f7, transparent 70%); animation: orb-drift-b 18s ease-in-out infinite; }
.hero-bg .orb-c { width: 240px; height: 240px; top: 30%; right: 10%; background: radial-gradient(circle, #22d3ee, transparent 70%); animation: orb-drift-c 20s ease-in-out infinite; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-family: 'Dancing Script', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: clamp(2.1rem, 4vw, 3rem); font-weight: 700; line-height: 1.25; margin-bottom: 14px; }
.hero h1 span { color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 1rem; max-width: 480px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-actions .btn { min-width: 168px; }
.hero-trust { display: flex; gap: 0; flex-wrap: wrap; color: var(--muted); font-size: .8rem; }
.hero-trust > div { padding: 0 20px; border-left: 1px solid var(--border); }
.hero-trust > div:first-child { padding-left: 0; border-left: none; }
.hero-trust b { color: var(--ink); font-size: 1.1rem; font-weight: 800; display: block; margin-bottom: 2px; }

/* Hero image slider — the wrapper itself carries no border (plan: "no border on the section"),
   each slide's card frame does. Auto-rotates via assets/js/main.js (data-interval, ms). */
.hero-art { display: flex; justify-content: center; align-items: center; }
.hero-slider { position: relative; width: 300px; height: 320px; border: none; background: none; }

.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.9) rotate(-3deg) translateY(10px);
  transition: opacity .7s ease, transform .7s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; transform: scale(1) rotate(-2deg) translateY(0); pointer-events: auto; z-index: 1; }

.idcard-frame {
  width: 280px; aspect-ratio: 320 / 200;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.idcard-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 860px) {
  .hero { padding: 44px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-trust { justify-content: center; margin-top: 4px; }
  .hero-art { order: -1; margin-bottom: 12px; }
  .hero-slider { width: 260px; height: 230px; margin: 0 auto; }
  .idcard-frame { width: 240px; }
}

@media (max-width: 480px) {
  .hero { padding: 36px 0 32px; }
  .hero-actions { flex-direction: column; margin-bottom: 24px; }
  .hero-actions .btn { width: 100%; min-width: 0; }
  .hero-trust { width: 100%; }
  .hero-trust > div { flex: 1 1 0; padding: 0 8px; text-align: center; }
  .hero-trust b { font-size: 1rem; }
  .hero-slider { width: 210px; height: 190px; }
  .idcard-frame { width: 195px; }
}

@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.stats-dark {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at top, #16213f 0%, #0b1120 55%, #070b16 100%);
  padding: 64px 0 68px;
}
.stats-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.stats-bg .orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.stats-bg .orb-a { width: 380px; height: 380px; top: -140px; left: -80px; background: radial-gradient(circle, #3b82f6, transparent 70%); animation: orb-drift-a 15s ease-in-out infinite; }
.stats-bg .orb-b { width: 320px; height: 320px; bottom: -120px; right: -40px; background: radial-gradient(circle, #d946ef, transparent 70%); animation: orb-drift-b 17s ease-in-out infinite; }
.stats-bg .orb-c { width: 280px; height: 280px; top: 28%; right: 22%; background: radial-gradient(circle, #22d3ee, transparent 70%); animation: orb-drift-c 19s ease-in-out infinite; }
.stats-bg .grid-overlay {
  position: absolute; inset: -1px;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
}
@keyframes orb-drift-a { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(46px,34px); } }
@keyframes orb-drift-b { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(-34px,-44px); } }
@keyframes orb-drift-c { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(22px,-24px) scale(1.12); } }

.stats-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }

.stat-tile {
  --c: #60a5fa;
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 28px 18px 22px;
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity .5s ease, transform .4s cubic-bezier(.2,.8,.2,1), border-color .4s ease, background .4s ease;
}
.stats-grid .stat-tile:nth-child(1) { --c: #3b82f6; }
.stats-grid .stat-tile:nth-child(2) { --c: #a855f7; }
.stats-grid .stat-tile:nth-child(3) { --c: #22d3ee; }
.stats-grid .stat-tile:nth-child(4) { --c: #fb923c; }

.stat-tile::after {
  content: '';
  position: absolute; z-index: 0; inset: -45%;
  background: conic-gradient(from var(--angle,0deg), transparent 0deg, color-mix(in srgb, var(--c) 55%, transparent) 90deg, transparent 180deg);
  animation: border-spin 6s linear infinite;
  filter: blur(16px);
}
@keyframes border-spin { to { --angle: 360deg; } }

.stat-tile:hover { transform: translateY(-7px); border-color: color-mix(in srgb, var(--c) 55%, transparent); background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.04)); }
.stat-tile:hover .stat-ring { filter: brightness(1.15); }

.stat-ring {
  position: relative; z-index: 1;
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 65%, #000));
  border: 1px solid color-mix(in srgb, var(--c) 70%, #fff);
  color: #fff;
  box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--c) 70%, transparent);
  animation: ring-pulse 2.6s ease-out infinite, stat-float 3.6s ease-in-out infinite;
  transition: filter .3s ease;
}
.stats-grid .stat-tile:nth-child(2) .stat-ring { animation-delay: .4s, .2s; }
.stats-grid .stat-tile:nth-child(3) .stat-ring { animation-delay: .8s, .4s; }
.stats-grid .stat-tile:nth-child(4) .stat-ring { animation-delay: 1.2s, .6s; }
@keyframes ring-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 45%, transparent); }
  70% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--c) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 0%, transparent); }
}
@keyframes stat-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.stat-ring .icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.stat-value { position: relative; z-index: 1; display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.stat-value b {
  font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(100deg, #e2e8f0 20%, #ffffff 40%, var(--c) 50%, #ffffff 60%, #e2e8f0 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: text-shimmer 4.5s linear infinite;
}
@keyframes text-shimmer { to { background-position: -250% 0; } }
.stat-value .suffix { font-size: 1.3rem; font-weight: 800; color: var(--c); }
.stat-label { position: relative; z-index: 1; display: block; color: #cbd5e1; font-size: .82rem; font-weight: 700; margin-top: 8px; letter-spacing: .01em; }

.stat-bar { position: relative; z-index: 1; display: block; margin-top: 16px; height: 3px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.stat-bar i { position: absolute; inset: 0 auto 0 0; width: 40%; background: linear-gradient(90deg, transparent, var(--c), transparent); animation: bar-sweep 2.4s ease-in-out infinite; }
@keyframes bar-sweep { 0% { left: -40%; } 100% { left: 100%; } }

@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .stats-grid { gap: 10px; } .stat-tile { padding: 22px 12px 18px; } .stat-value b { font-size: 1.45rem; } }
@media (prefers-reduced-motion: reduce) {
  .stat-ring, .stat-tile::after, .stat-value b, .stat-bar i, .stats-bg .orb, .hero-bg .orb { animation: none; }
}

/* Template gallery, pricing cards and billing toggle now live in base.css — they're shared
   with the Super Admin template gallery and Org Admin subscription/checkout pages.

   The home page's own template gallery below (.tmpl-wall) is a home-page-only masonry
   "photo wall" dressing on top of the shared .tmpl-card/.tmpl-thumb/.tmpl-info pieces —
   it doesn't touch .tmpl-grid, so org-admin / super-admin keep their plain even grid
   untouched. The public "browse all templates" gallery (.tmpl-gallery, templates.php)
   gets the same per-card palette treatment as .tmpl-wall, just on the plain grid layout
   instead of the masonry one. */

.tmpl-wall .tmpl-thumb, .tmpl-gallery .tmpl-thumb { background: var(--tc-bg, var(--accent-light)); }
.tmpl-wall .tmpl-card:hover, .tmpl-gallery .tmpl-card:hover { box-shadow: 0 12px 26px -8px var(--tc-accent, var(--accent)); border-color: var(--tc-accent, var(--accent)); }
.tmpl-wall .tmpl-thumb .tag.featured, .tmpl-gallery .tmpl-thumb .tag.featured { background: var(--tc-accent, var(--accent)); border-color: var(--tc-accent, var(--accent)); }

.section-templates { position: relative; overflow: hidden; }
.tmpl-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.tmpl-bg::before {
  content: ''; position: absolute; inset: -1px;
  background-image: radial-gradient(rgba(15,23,42,.05) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 78%);
}
.tmpl-bg .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .28; }
.tmpl-bg .blob-a { width: 360px; height: 360px; top: -120px; left: -60px; background: radial-gradient(circle, #3b82f6, transparent 70%); }
.tmpl-bg .blob-b { width: 300px; height: 300px; bottom: -100px; right: -40px; background: radial-gradient(circle, #a855f7, transparent 70%); }
.tmpl-bg .blob-c { width: 260px; height: 260px; top: 40%; right: 18%; background: radial-gradient(circle, #fb923c, transparent 70%); }
.section-templates .container { position: relative; z-index: 1; }

.tmpl-wall { column-count: 4; column-gap: 18px; }
.tmpl-wall .tmpl-card { display: block; width: 100%; margin: 0 0 18px; break-inside: avoid; }
.tmpl-wall .tmpl-thumb { height: 150px; }
.tmpl-wall .th-sm .tmpl-thumb { height: 110px; }
.tmpl-wall .th-md .tmpl-thumb { height: 150px; }
.tmpl-wall .th-lg .tmpl-thumb { height: 195px; }
.tmpl-wall .th-xl .tmpl-thumb { height: 245px; }

@media (max-width: 960px) { .tmpl-wall { column-count: 3; } }
@media (max-width: 680px) { .tmpl-wall { column-count: 2; column-gap: 14px; } }
@media (max-width: 420px) {
  .tmpl-wall { column-count: 1; }
  .tmpl-wall .th-xl .tmpl-thumb, .tmpl-wall .th-lg .tmpl-thumb { height: 180px; }
}

/* Features */
.feat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.feat-card {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.feat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #dbeafe; }
.feat-card:hover::before { transform: scaleX(1); }
.feat-card:hover .feat-icon { transform: scale(1.08) rotate(-3deg); }
.feat-icon {
  width: 50px; height: 50px; border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 16px -4px rgba(37,99,235,.35);
  transition: transform .3s ease;
}
.feat-icon svg { width: 24px; height: 24px; }
.feat-card h4 { font-size: 1.02rem; margin-bottom: 8px; font-weight: 700; letter-spacing: -.01em; }
.feat-card p { color: var(--muted); font-size: .87rem; line-height: 1.6; }
@media (max-width: 760px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .feat-grid { grid-template-columns: 1fr; } .feat-card { padding: 24px 20px; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 50px; left: 12.5%; right: 12.5%; height: 2px; z-index: 0;
  background: repeating-linear-gradient(90deg, var(--border) 0 8px, transparent 8px 18px);
}
.step {
  position: relative; background: linear-gradient(165deg, var(--step-tint) 0%, #fff 55%);
  border: 1px solid var(--step-border); border-radius: 14px;
  padding: 28px 18px 22px; text-align: center; box-shadow: var(--shadow); overflow: hidden;
  isolation: isolate; z-index: 1; opacity: 0; transform: translateY(22px) scale(.97);
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease, border-color .4s ease;
}
.reveal.in .steps .step {
  animation: step-rise .65s cubic-bezier(.22,1,.36,1) forwards;
}
.steps .step:nth-child(1) { animation-delay: .05s; }
.steps .step:nth-child(2) { animation-delay: .18s; }
.steps .step:nth-child(3) { animation-delay: .31s; }
.steps .step:nth-child(4) { animation-delay: .44s; }
@keyframes step-rise { to { opacity: 1; transform: translateY(0) scale(1); } }

.step::after {
  content: ""; position: absolute; top: -70px; right: -70px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, var(--step-color-1) 0%, transparent 72%); opacity: 0; z-index: -1;
  transition: opacity .4s ease;
}
.step .num {
  width: 44px; height: 44px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; position: relative;
  background: linear-gradient(135deg, var(--step-color-1), var(--step-color-2));
  box-shadow: 0 8px 18px -6px var(--step-color-1);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.step .num::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--step-color-1);
  opacity: 0; transform: scale(.8); transition: opacity .35s ease, transform .35s ease;
}
.step h4 { font-size: .92rem; margin-bottom: 6px; color: var(--ink); font-weight: 700; }
.step p { color: var(--muted); font-size: .82rem; line-height: 1.5; }

@media (hover: hover) {
  .step:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--step-color-1); }
  .step:hover::after { opacity: .14; }
  .step:hover .num { transform: scale(1.12) rotate(-8deg); }
  .step:hover .num::after { opacity: .45; transform: scale(1); }
}

.step.c-blue { --step-color-1: #2563eb; --step-color-2: #1d4ed8; --step-tint: #dbeafe; --step-border: #bfdbfe; }
.step.c-violet { --step-color-1: #7c3aed; --step-color-2: #6d28d9; --step-tint: #ede9fe; --step-border: #ddd6fe; }
.step.c-emerald { --step-color-1: #059669; --step-color-2: #047857; --step-tint: #d1fae5; --step-border: #a7f3d0; }
.step.c-amber { --step-color-1: #d97706; --step-color-2: #b45309; --step-tint: #fef3c7; --step-border: #fde68a; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 16px 14px; }
  .steps::before { top: 44px; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .steps::before { display: none; }
  .steps::after {
    content: ""; position: absolute; left: 29px; top: 46px; bottom: 46px; width: 2px; z-index: 0;
    background: repeating-linear-gradient(180deg, var(--border) 0 6px, transparent 6px 14px);
  }
  .step {
    display: flex; align-items: flex-start; gap: 14px; text-align: left; padding: 18px 16px;
  }
  .step .num { margin: 0; flex-shrink: 0; }
  .step h4 { margin-bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .step, .step .num, .step::after { animation: none !important; transition: none !important; }
  .reveal.in .steps .step { opacity: 1; transform: none; }
}

/* Auth pages (register/login/otp/forgot-password) */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; justify-content: center; padding: 28px 20px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 32px 28px; }
.auth-card h1 { font-size: 1.3rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: .86rem; margin-bottom: 22px; }
.auth-foot { text-align: center; font-size: .84rem; color: var(--muted); margin-top: 18px; }
.auth-foot a { color: var(--accent); font-weight: 600; }

/* Split layout (login/register only) — a dark gradient "about" pane alongside the
   form, same two-tone pattern as .contact-shell. The plainer .auth-card above stays
   as-is for otp/forgot/reset-password, which don't get this treatment. */
.auth-card-split { max-width: 780px; display: grid; grid-template-columns: .85fr 1.15fr; padding: 0; overflow: hidden; }

.auth-aside { position: relative; overflow: hidden; background: radial-gradient(ellipse at top left, #1e40af 0%, #0f172a 72%); color: #fff; padding: 32px 28px; display: flex; align-items: center; }
.auth-aside .aa-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: 0; }
.auth-aside .aa-orb-a { width: 220px; height: 220px; top: -70px; right: -60px; background: radial-gradient(circle, #60a5fa, transparent 70%); }
.auth-aside .aa-orb-b { width: 200px; height: 200px; bottom: -70px; left: -60px; background: radial-gradient(circle, #a855f7, transparent 70%); }
.aa-content { position: relative; z-index: 1; }
.aa-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; font-weight: 800; font-size: .98rem; color: #fff; }
.aa-brand img { height: 26px; width: auto; }
.aa-content .logo-mark-lg { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .92rem; flex-shrink: 0; }
.aa-content h3 { font-size: 1.12rem; line-height: 1.35; margin-bottom: 8px; }
.aa-content > p { color: #cbd5e1; font-size: .82rem; line-height: 1.55; margin-bottom: 18px; }
.aa-points { display: flex; flex-direction: column; gap: 10px; }
.aa-points li { display: flex; gap: 10px; align-items: flex-start; font-size: .8rem; color: #e2e8f0; }
.aa-points .aa-tick { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.aa-points .aa-tick .icon { width: 10px; height: 10px; stroke-width: 3; color: #93c5fd; }

.auth-form-pane { padding: 30px 32px; }
.auth-form-pane h1 { font-size: 1.2rem; }
.auth-form-pane .field { margin-bottom: 12px; }

/* Icon-prefixed inputs + password show/hide toggle */
.input-wrap { position: relative; }
.input-wrap .field-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: flex; }
.input-wrap .input { padding-left: 38px; }
.input-wrap .pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 7px; border-radius: 6px; color: var(--muted); display: flex; }
.input-wrap .pw-toggle:hover { color: var(--accent); background: var(--bg-soft); }
.input-wrap .pw-toggle .icon-off { display: none; }
.input-wrap.pw-visible .pw-toggle .icon-on { display: none; }
.input-wrap.pw-visible .pw-toggle .icon-off { display: flex; }
.input-wrap.has-toggle .input { padding-right: 38px; }

@media (max-width: 760px) {
  .auth-card-split { grid-template-columns: 1fr; max-width: 420px; }
  .auth-aside { padding: 22px 24px 18px; }
  .aa-brand { margin-bottom: 10px; }
  .aa-content h3 { font-size: 1.02rem; margin-bottom: 4px; }
  .aa-content > p { margin-bottom: 0; }
  .aa-points { display: none; }
  .auth-form-pane { padding: 24px 24px; }
}
@media (max-width: 480px) {
  .auth-wrap { padding: 0; min-height: auto; }
  .auth-card-split { border-radius: 0; border-left: none; border-right: none; box-shadow: none; }
  .auth-aside { padding: 18px 18px 16px; }
  .aa-brand { margin-bottom: 8px; }
  .aa-content .logo-mark-lg { width: 30px; height: 30px; border-radius: 8px; }
  .aa-content h3 { font-size: .96rem; }
  .aa-content > p { font-size: .8rem; }
  .auth-form-pane { padding: 20px 16px; }
  .auth-form-pane h1 { font-size: 1.12rem; }
}

/* Contact page — single split card: dark gradient info panel + white form panel.
   Deliberately a restrained two-tone palette (ink/accent + white), not a rainbow of
   per-item colors, so it reads as modern rather than merely minimal or busy. */
.contact-shell {
  display: grid; grid-template-columns: .8fr 1.2fr;
  max-width: 760px; margin: 0 auto;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}

.contact-info-panel {
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse at top left, #1e40af 0%, #0f172a 72%);
  color: #fff; padding: 26px 22px;
}
.contact-info-panel .cip-orb {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: 0;
}
.contact-info-panel .cip-orb-a { width: 160px; height: 160px; top: -50px; right: -50px; background: radial-gradient(circle, #60a5fa, transparent 70%); }
.contact-info-panel .cip-orb-b { width: 140px; height: 140px; bottom: -40px; left: -40px; background: radial-gradient(circle, #3b82f6, transparent 70%); }
.cip-head { position: relative; z-index: 1; margin-bottom: 18px; }
.cip-head h3 { font-size: 1.05rem; margin-bottom: 5px; }
.cip-head p { color: #cbd5e1; font-size: .78rem; line-height: 1.4; }

.ci-list { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.ci-row { display: flex; gap: 10px; align-items: flex-start; }
.ci-icon {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.ci-icon .icon { width: 15px; height: 15px; }
.ci-row h4 { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #93c5fd; margin-bottom: 2px; }
.ci-row p { font-size: .82rem; font-weight: 600; color: #fff; }

.contact-form-panel { padding: 26px 24px; }
.cf-head { margin-bottom: 14px; }
.cf-head h3 { font-size: 1.05rem; margin-bottom: 3px; }
.cf-head p { color: var(--muted); font-size: .78rem; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-form-panel .field { margin-bottom: 10px; }
.contact-form-panel .field label { font-size: .76rem; margin-bottom: 4px; }
.contact-form-panel .input, .contact-form-panel select.input, .contact-form-panel textarea.input {
  padding: 7px 10px; font-size: .84rem; border: 1px solid #cbd5e1; border-radius: 8px;
}
.contact-form-panel .input:focus, .contact-form-panel select.input:focus, .contact-form-panel textarea.input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}
.contact-form-panel textarea.input { min-height: 70px; border: 1.5px solid #cbd5e1; }
.contact-form-panel .btn { padding: 8px 18px; font-size: .84rem; border-radius: 8px; }

@media (max-width: 760px) {
  .contact-shell { grid-template-columns: 1fr; border-radius: 16px; }
  .contact-info-panel { padding: 22px 20px; }
  .ci-list { flex-direction: row; flex-wrap: wrap; gap: 12px 20px; }
  .ci-row { flex: 1 1 150px; }
  .contact-form-panel { padding: 22px 20px; }
}
@media (max-width: 480px) {
  .cf-row { grid-template-columns: 1fr; gap: 0; }
  .contact-info-panel { padding: 18px 16px; }
  .contact-form-panel { padding: 18px 16px; }
  .ci-icon { width: 28px; height: 28px; }
}

/* Simple content pages (about/faq/terms/privacy/refund) */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.2rem; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.prose li { margin-left: 18px; list-style: disc; }
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item summary { font-weight: 700; cursor: pointer; font-size: .94rem; }
.faq-item p { margin-top: 8px; }

/* Step accordion (how-it-works) */
.hiw-wrap { max-width: 720px; }
.hiw-timeline { margin-bottom: 8px; }
.hiw-row { display: flex; gap: 18px; align-items: stretch; }
.hiw-rail { flex-shrink: 0; width: 44px; display: flex; flex-direction: column; align-items: center; }
.hiw-rail .rail-line { flex: 1 1 auto; width: 2px; min-height: 12px; margin-top: 6px; background: var(--border); }
.hiw-row:last-child .rail-line { background: transparent; }
.hiw-row:last-child { padding-bottom: 2px; }

.step-acc {
  flex: 1 1 auto; min-width: 0;
  border: 1px solid var(--border); border-radius: 16px; background: #fff;
  margin-bottom: 16px; box-shadow: var(--shadow);
  transition: box-shadow .25s ease, transform .25s ease, background .25s ease, border-color .25s ease;
  animation: hiwIn .5s ease both; animation-delay: calc(var(--i, 0) * .07s);
}
.step-acc:hover { border-color: #bfdbfe; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.step-acc[open] { border-color: var(--accent); box-shadow: var(--shadow-lg); background: linear-gradient(135deg, #fff 55%, var(--accent-light)); }
@keyframes hiwIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .step-acc { animation: none; } }
.step-acc summary {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px;
  cursor: pointer; list-style: none; font-weight: 700; font-size: .96rem;
  border-radius: 16px; transition: background .2s ease;
}
.step-acc summary::-webkit-details-marker { display: none; }
.step-acc:not([open]) summary:hover { background: var(--bg-soft); }
.step-acc summary > span:last-of-type { flex: 1 1 auto; min-width: 0; }
.step-tag {
  flex-shrink: 0; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 9px; transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.step-acc[open] .step-tag { color: var(--accent); background: #fff; border-color: #bfdbfe; }
.step-acc summary::after {
  content: ''; margin-left: 10px; flex-shrink: 0; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .3s ease, border-color .2s ease;
}
.step-acc[open] summary::after { transform: rotate(-135deg); border-color: var(--accent); }
.step-num {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -4px rgba(15,23,42,.28);
  transition: transform .3s ease, box-shadow .3s ease;
}
.step-acc:hover .step-num, .step-acc[open] .step-num { transform: scale(1.08) rotate(-4deg); box-shadow: 0 8px 18px -4px rgba(15,23,42,.4); }
.step-num .icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.step-num.c-blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.step-num.c-violet { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.step-num.c-emerald { background: linear-gradient(135deg, #059669, #047857); }
.step-num.c-amber { background: linear-gradient(135deg, #d97706, #b45309); }
/* Animated open/close without JS: override the UA default that hides closed <details> content,
   then drive the reveal purely with a grid-template-rows transition. */
.step-acc:not([open]) > .step-body { display: grid !important; }
.step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.step-acc[open] > .step-body { grid-template-rows: 1fr; }
.step-body-in { overflow: hidden; }
.step-body-in p { padding: 0 20px 20px 20px; margin: 0; color: var(--muted); font-size: .88rem; }
@media (max-width: 480px) {
  .hiw-rail { width: 36px; }
  .step-acc summary { padding: 13px 15px; gap: 8px; font-size: .88rem; }
  .step-num { width: 34px; height: 34px; }
  .step-num .icon { width: 16px; height: 16px; }
  .step-tag { font-size: .62rem; padding: 2px 7px; }
  .step-body-in p { padding: 0 15px 16px 15px; font-size: .84rem; }
}
