/* ==========================================================
   MyScriptStore — base.css
   Colors, fonts, buttons and shared pieces used on every page.
   Edit the tokens in :root to re-theme the whole site.
   ========================================================== */

:root {
  --ink: #17142b;          /* deep navy-violet text / dark sections */
  --ink-soft: #4b4766;
  --paper: #fbfaff;        /* page background */
  --panel: #ffffff;
  --line: #e6e3f5;
  --brand: #5b4fe0;        /* primary violet */
  --brand-dark: #4a3fc4;
  --brand-tint: #efedff;
  --accent: #f5b942;       /* amber accent */
  --accent-dark: #d99a1c;
  --ok: #1f9d6b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23,20,43,.06), 0 8px 24px rgba(23,20,43,.06);
  --max: 1160px;
  --font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px;
  font-weight: 600; font-size: 15px; line-height: 1;
  border: 2px solid transparent; transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--accent-dark); color: var(--ink); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }

/* ---------- Section headings (shared) ---------- */
section { padding: 88px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 52px; }
.section-head .tag { font-family: var(--mono); font-size: 13px; color: var(--brand); font-weight: 600; }
.section-head h2 { font-size: clamp(28px, 3.5vw, 38px); letter-spacing: -.02em; line-height: 1.2; margin: 8px 0 14px; }
.section-head p { color: var(--ink-soft); font-size: 17px; }
.hl {
  background: linear-gradient(90deg, var(--brand) 0%, #9a7bf5 55%, var(--accent-dark) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
section, [id] { scroll-margin-top: 110px; }
.btn { cursor: pointer; font-family: inherit; }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.text-center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shared animations ---------- */
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.7); } 100% { box-shadow: 0 0 0 8px rgba(61,220,151,0); } }
@keyframes heroIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* ---------- Interior page banner (every page except Home) ---------- */
.page-banner {
  position: relative; overflow: hidden; color: #fff; padding: 72px 0 64px;
  background:
    radial-gradient(700px 320px at 90% -20%, rgba(124,108,242,.6), transparent 60%),
    radial-gradient(500px 260px at 0% 120%, rgba(245,185,66,.16), transparent 60%),
    linear-gradient(160deg, #2b2366 0%, #221b4f 100%);
}
.page-banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1.4px) 0 0 / 24px 24px;
}
.page-banner .container { position: relative; z-index: 1; }
.crumbs { font-size: 13px; color: #a9a4cc; margin-bottom: 14px; }
.crumbs a { color: #cfcbe8; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 6px; opacity: .6; }
.page-banner h1 {
  font-size: clamp(32px, 4.6vw, 50px); line-height: 1.1; letter-spacing: -.03em; margin-bottom: 14px;
  opacity: 0; animation: heroIn .7s cubic-bezier(.2,.7,.2,1) .05s forwards;
}
.page-banner h1 em { font-style: normal; color: var(--accent); }
.page-banner p {
  font-size: 18px; color: #d6d3ee; max-width: 680px;
  opacity: 0; animation: heroIn .7s cubic-bezier(.2,.7,.2,1) .2s forwards;
}
.page-banner .tag {
  display: inline-block; font-family: var(--mono); font-size: 13px; color: var(--accent);
  background: rgba(245,185,66,.12); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}

/* ---------- Simple content blocks for interior pages ---------- */
.content { max-width: 820px; margin: 0 auto; }
.content h2 { font-size: 26px; letter-spacing: -.02em; margin: 36px 0 12px; }
.content h2:first-child { margin-top: 0; }
.content p, .content li { color: var(--ink-soft); font-size: 16.5px; }
.content p + p { margin-top: 14px; }
.content ul { padding-left: 22px; margin-top: 10px; }
.content li { margin-bottom: 6px; }

/* ---------- Alerts (form results) ---------- */
.alert { padding: 16px 20px; border-radius: 12px; margin-bottom: 22px; font-weight: 500; }
.alert-ok { background: #e7f8f0; color: #116a47; border: 1px solid #bfe9d5; }
.alert-err { background: #fdecee; color: #a3243b; border: 1px solid #f6c7cf; }

@media (max-width: 720px) {
  section { padding: 64px 0; }
  .page-banner { padding: 56px 0 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .page-banner h1, .page-banner p { opacity: 1; animation: none; }
}

/* "Skip to Content" link for keyboard users — appears only when tabbed to */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--ink); font-weight: 600; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: var(--ink); }
