/* ============================================================
   Silver Starlight Learning — Official Website V0.1
   Plain CSS. No framework, no build step, no third-party calls.
   Mobile-first. Light, calm, child-friendly but not childish.
   ============================================================ */

:root {
  --ink: #1e2a3e;
  --ink-soft: #4a5a75;
  --navy: #22375f;
  --navy-deep: #16233f;
  --gold: #f0b429;
  --gold-soft: #fdf3d8;
  --blue: #6e9bd6;
  --blue-soft: #eaf1fb;
  --silver: #e8edf5;
  --bg: #fafbfe;
  --surface: #ffffff;
  --line: #dce3ef;
  --ok: #2f7d5f;
  --warn-bg: #fff6e5;
  --warn-line: #e8b95c;
  --warn-ink: #7a5310;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(30, 42, 62, .06), 0 8px 24px rgba(30, 42, 62, .07);
  --shadow-hover: 0 2px 4px rgba(30, 42, 62, .08), 0 14px 34px rgba(30, 42, 62, .13);

  --maxw: 1140px;
  --pad: 20px;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
    "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--gold); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6.4vw, 3.15rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4.2vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* --- Accessibility helpers --- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Header / nav --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.brand-tag { font-size: .74rem; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
}
.nav-toggle span { font-size: 1.05rem; line-height: 1; }

.site-nav { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  text-decoration: none; color: var(--ink-soft); font-size: .93rem; font-weight: 600;
}
.site-nav a:hover { background: var(--blue-soft); color: var(--navy); }

/* mobile drawer */
.site-nav.open {
  display: block;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 10px var(--pad) 18px;
}
.site-nav.open ul { flex-direction: column; gap: 2px; }
.site-nav.open a { padding: 12px 10px; font-size: 1rem; border-radius: 10px; }

/* --- Hero --- */
.hero {
  background:
    radial-gradient(1100px 460px at 78% -10%, rgba(240, 180, 41, .16), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; padding: clamp(44px, 9vw, 82px) 0 clamp(40px, 8vw, 70px);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(2px 2px at 12% 22%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 26% 62%, #dce6f5, transparent),
    radial-gradient(2px 2px at 68% 18%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 84% 48%, #dce6f5, transparent),
    radial-gradient(1.6px 1.6px at 44% 82%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 92% 78%, #dce6f5, transparent);
}
.hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.hero-eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.hero h1 { color: #fff; }
.hero-lede { font-size: clamp(1.02rem, 2.6vw, 1.22rem); color: #e5ecf8; max-width: 40em; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: .98rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn-primary { background: var(--gold); color: #2b2000; box-shadow: 0 6px 18px rgba(240, 180, 41, .3); }
.btn-primary:hover { background: #ffc63d; color: #2b2000; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.hero-strip {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px;
  padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: .9rem; color: #cfdcee; list-style: none; padding-left: 0;
}
.hero-strip li { display: flex; align-items: center; gap: 8px; }
.hero-strip li::before { content: "★"; color: var(--gold); font-size: .8rem; }

/* --- Sections --- */
.section { padding: clamp(46px, 8vw, 76px) 0; }
.section[id] { scroll-margin-top: 74px; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }

.section-head { max-width: 46em; margin-bottom: 32px; }
.section-kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 8px;
}
.section-head p { color: var(--ink-soft); margin-bottom: 0; }

/* --- Product grid --- */
.grid { display: grid; gap: 22px; grid-template-columns: 1fr; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.card-media {
  background: linear-gradient(140deg, var(--blue-soft), var(--silver));
  display: flex; align-items: center; justify-content: center;
  padding: 20px; border-bottom: 1px solid var(--line);
}
.card-media img { width: 100%; max-width: 260px; height: auto; border-radius: 10px; box-shadow: 0 4px 14px rgba(30, 42, 62, .14); }
.card-media img.contain { max-width: 230px; }

.card-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-title { font-size: 1.12rem; font-weight: 800; margin: 0; }
.card-sub { font-size: .9rem; color: var(--ink-soft); margin: -6px 0 0; }
.card-desc { font-size: .96rem; color: var(--ink-soft); margin: 0; }
.card-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.card-facts li {
  font-size: .8rem; font-weight: 600; color: var(--navy);
  background: var(--blue-soft); border: 1px solid #d7e4f5;
  padding: 4px 10px; border-radius: 999px;
}
.card-actions { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.price { font-weight: 800; font-size: 1rem; }

.btn-buy {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff; text-decoration: none;
  padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: .93rem;
  border: 2px solid var(--navy);
}
.btn-buy:hover { background: var(--navy-deep); color: #fff; border-color: var(--navy-deep); }
.btn-buy .ext { font-size: .85em; opacity: .8; }

/* single-item sections read as a featured row, not a lonely card */
.grid.grid--single { grid-template-columns: 1fr; }

@media (min-width: 900px) {
  .grid--single .card {
    flex-direction: row;
    align-items: stretch;
    max-width: 900px;
  }
  .grid--single .card-media {
    flex: 0 0 300px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: 28px;
  }
  .grid--single .card-media img { max-width: 240px; }
  .grid--single .card-body { padding: 32px 34px; }
}

/* two Amazon stores, two currencies — never mix them */
.buy-group { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }

.btn-buy--store {
  flex: 1 1 180px;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 10px 18px;
  text-align: left;
  line-height: 1.35;
}
.buy-store { font-size: .95rem; font-weight: 700; }
.buy-country {
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; opacity: .72;
}
.buy-price { font-size: .88rem; font-weight: 700; color: var(--gold); }

.buy-note {
  width: 100%;
  margin: 2px 0 0;
  font-size: .82rem;
  color: var(--ink-soft);
}

/* pending-confirmation state */
.card[data-status="pending"] { border-style: dashed; border-color: var(--warn-line); background: #fffdf8; }
.badge-pending {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink);
  font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
}
.btn-buy.is-disabled {
  background: #f2ede2; color: #8a7454; border-color: var(--warn-line);
  cursor: not-allowed; pointer-events: none;
}

/* --- Reserved section --- */
.reserved {
  border: 1px dashed var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--blue-soft), #fff);
  padding: clamp(24px, 4vw, 38px);
}
.reserved h3 { margin-bottom: 8px; }
.reserved p { color: var(--ink-soft); margin-bottom: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; margin: 0; padding: 0; }
.chip-row li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: .86rem; font-weight: 600; color: var(--ink-soft);
}

/* --- About / contact --- */
.about-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.about-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(22px, 3.4vw, 32px); box-shadow: var(--shadow);
}
.about-card h3 { margin-bottom: 10px; }
.about-card p:last-child { margin-bottom: 0; }
.about-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.about-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink-soft); font-size: .97rem; }
.about-list li::before { content: "★"; color: var(--gold); flex: 0 0 auto; }
.contact-email {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 700;
  background: var(--blue-soft); border: 1px solid #d7e4f5; color: var(--navy);
  padding: 11px 18px; border-radius: 999px; text-decoration: none; font-size: 1rem;
  word-break: break-all;
}
.contact-email:hover { background: #dfeaf9; color: var(--navy); }

/* --- Footer --- */
.site-footer { background: var(--navy-deep); color: #c9d7ea; padding: 44px 0 30px; margin-top: 0; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.footer h3 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: #c9d7ea; text-decoration: none; font-size: .95rem; }
.footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.footer-brand img { width: 34px; height: 34px; }
.footer-brand strong { color: #fff; font-size: 1.02rem; }
.footer-note { font-size: .88rem; color: #9fb2cc; max-width: 46em; }
.footer-bottom {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-size: .85rem; color: #94a8c4;
}

/* --- Responsive --- */
@media (min-width: 620px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  :root { --pad: 32px; }
  .nav-toggle { display: none; }
  .site-nav { display: block; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1.15fr .85fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 1080px) {
  .grid-cards-4 { grid-template-columns: repeat(4, 1fr); }
}

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

@media print {
  .site-header, .nav-toggle, .hero-actions { display: none; }
  body { background: #fff; }
}
