/* SimpleGames (Canada) - site.css
   Same family as Qualian: shared "mystic warm" palette so the studio hub and
   the Qualian product page read as one brand under simplegames.ca. */

:root {
  --plum-950: #1F1128;
  --plum-900: #2A1833;
  --plum-800: #3A2246;
  --mauve-600: #7E4A63;
  --mauve-500: #8A5270;

  --cream: #F6E7D8;
  --cream-dim: #E3CDBC;
  --muted: #B79CAE;

  --green: #7BAA6E;
  --green-bright: #8FC47F;
  --gold: #D3AE4E;

  --line: rgba(246, 231, 216, 0.14);
  --card: rgba(246, 231, 216, 0.05);
  --card-hover: rgba(246, 231, 216, 0.08);

  --radius: 18px;
  --device-radius: 13.7% / 6.6%;

  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --pad: clamp(20px, 5vw, 40px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--cream-dim);
  background: var(--plum-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--cream);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 700; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--green-bright); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cream); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.lede { font-size: clamp(1.05rem, 2.1vw, 1.3rem); color: var(--cream-dim); }

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cream);
  color: var(--plum-900);
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  z-index: 100;
  font-weight: 700;
}
.skip:focus { left: 0; }

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

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(31, 17, 40, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand svg, .brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: clamp(14px, 2.4vw, 26px);
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--cream); }

@media (max-width: 560px) {
  .site-nav a.nav-optional { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 82% 8%, rgba(138, 82, 112, 0.55), transparent 60%),
    linear-gradient(155deg, var(--plum-800), var(--mauve-600));
  padding-block: clamp(56px, 9vw, 104px);
  overflow: hidden;
  text-align: center;
}

.hero .wrap { max-width: 900px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(246, 231, 216, 0.12);
  border: 1px solid var(--line);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 { margin-bottom: 0.35em; }
.hero p.lede { max-width: 56ch; margin-inline: auto; color: rgba(246, 231, 216, 0.88); }

.hero-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto 26px;
  border-radius: 19px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3), 0 22px 50px rgba(0,0,0,0.4);
}

/* ---------- CTA ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 30px;
  justify-content: center;
}

.badge-appstore {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 9px 18px 9px 15px;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.badge-appstore:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.badge-appstore svg { width: 25px; height: 25px; flex-shrink: 0; fill: #fff; }
.badge-appstore .b-small { display: block; font-size: 0.63rem; line-height: 1.25; opacity: 0.9; }
.badge-appstore .b-big { display: block; font-size: 1.06rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 13px 20px;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.97rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-solid { background: var(--green); color: #12240E; border: 1px solid transparent; }
.btn-solid:hover { transform: translateY(-1px); color: #12240E; background: var(--green-bright); }
.btn-ghost { border: 1px solid var(--line); color: var(--cream); }
.btn-ghost:hover { background: rgba(246, 231, 216, 0.1); color: var(--cream); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* ---------- sections ---------- */

section { padding-block: clamp(56px, 9vw, 104px); }

.section-dark { background: var(--plum-900); }
.section-darker { background: var(--plum-950); }

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(34px, 5vw, 56px);
}
.section-head.center { margin-inline: auto; text-align: center; }

.kicker {
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 12px;
}

/* ---------- app feature (Qualian announcement) ---------- */

.app-feature {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  background: linear-gradient(165deg, rgba(138, 82, 112, 0.4), rgba(58, 34, 70, 0.4));
  border: 1px solid rgba(143, 196, 127, 0.34);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
}

/* cute phone screenshot on the right, scaled to fit the card's height */
.app-feature .app-shot {
  height: clamp(230px, 30vw, 330px);
  width: auto;
  border-radius: var(--device-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 20px 46px rgba(0, 0, 0, 0.42);
  align-self: center;
}

.app-feature .app-icon {
  width: clamp(84px, 14vw, 120px);
  height: clamp(84px, 14vw, 120px);
  border-radius: 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3), 0 18px 44px rgba(0,0,0,0.4);
}

.app-feature h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 6px; }
.app-tag {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green-bright);
  background: rgba(143, 196, 127, 0.16);
  border: 1px solid rgba(143, 196, 127, 0.4);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.app-feature p { color: var(--cream-dim); max-width: 60ch; }
.app-feature .cta-row { justify-content: flex-start; margin-top: 22px; }

@media (max-width: 640px) {
  .app-feature { grid-template-columns: 1fr; text-align: center; }
  .app-feature .app-icon { margin-inline: auto; }
  .app-feature p { margin-inline: auto; }
  .app-feature .cta-row { justify-content: center; }
  .app-feature .app-shot { margin-inline: auto; }
}

/* ---------- teaser (kids games cliffhanger) ---------- */

.teaser {
  position: relative;
  overflow: hidden;
}
.teaser::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 120% at 20% 0%, rgba(123, 170, 110, 0.16), transparent 60%);
  pointer-events: none;
}
.teaser .wrap { position: relative; }

.teaser-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 26px 0 8px;
}
.plat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream-dim);
}
.plat svg { width: 16px; height: 16px; fill: var(--green-bright); }

.teaser-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 54ch;
  margin: 22px auto 0;
}

.dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 30px;
}
.dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green-bright);
  opacity: 0.35;
  animation: pulse 1.6s ease-in-out infinite;
}
.dots span:nth-child(2) { animation-delay: 0.25s; }
.dots span:nth-child(3) { animation-delay: 0.5s; }
@keyframes pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.9; } }

/* ---------- value cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: background 0.18s ease;
}
.card:hover { background: var(--card-hover); }
.card h3 { margin-bottom: 8px; font-size: 1.2rem; }
.card p { font-size: 0.96rem; color: var(--muted); margin: 0; }

.card-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 14px;
  display: block;
}

/* ---------- about the maker ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-copy p { color: var(--cream-dim); max-width: 56ch; }
.about-copy strong { color: var(--cream); font-weight: 700; }

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0 4px;
}
.stack .tag {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--cream-dim);
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 5px 11px;
}

.repo-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 10px;
}
.repo-panel > p.repo-head {
  font-weight: 700; color: var(--cream); font-size: 0.95rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 9px;
}
.repo-panel > p.repo-head svg { width: 18px; height: 18px; fill: var(--cream-dim); }

.repo {
  display: block;
  text-decoration: none;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.repo:first-of-type { border-top: 0; }
.repo:hover .repo-name { color: var(--cream); }
.repo-name {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-bright);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.repo-star {
  font-family: var(--font);
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 700;
}
.repo-desc { color: var(--muted); font-size: 0.9rem; margin: 3px 0 0; }

.about-cta { margin-top: 26px; }

/* ---------- final CTA ---------- */

.final-cta {
  background:
    radial-gradient(100% 120% at 50% 0%, rgba(138, 82, 112, 0.6), transparent 65%),
    var(--plum-950);
  text-align: center;
}
.final-cta .lede { max-width: 48ch; margin-inline: auto; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--plum-950);
  border-top: 1px solid var(--line);
  padding-block: 40px;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 34px;
  align-items: center;
  justify-content: space-between;
}

.maker {
  color: var(--cream-dim);
  font-weight: 700;
  cursor: help;
  text-decoration: underline dotted var(--line);
  text-underline-offset: 3px;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 18px 24px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--cream); }

.footer-note { font-size: 0.84rem; opacity: 0.75; margin-top: 18px; }

/* ---------- page head (articles / sub-pages) ---------- */

.page-head {
  background: linear-gradient(155deg, var(--plum-800), var(--mauve-600));
  padding-block: clamp(46px, 7vw, 82px);
}
.page-head .kicker { color: var(--green-bright); }
.page-head h1 { margin-bottom: 0.35em; }
.page-head p.lede { color: rgba(246, 231, 216, 0.86); max-width: 60ch; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  margin-bottom: 20px;
  color: var(--cream-dim);
}
.back-link:hover { color: var(--cream); }
.back-link::before { content: "\2190"; }

/* ---------- article list (/articles/) ---------- */

.article-list {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-inline: auto;
}
.post-card {
  display: block;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: background 0.18s ease, transform 0.15s ease;
}
.post-card:hover { background: var(--card-hover); transform: translateY(-1px); }
.post-card time {
  font-size: 0.8rem;
  color: var(--green-bright);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.post-card h2 { font-size: 1.3rem; margin: 8px 0; color: var(--cream); }
.post-card p { color: var(--muted); font-size: 0.96rem; margin: 0; }

.list-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 52ch;
  margin: 34px auto 0;
}

/* ---------- prose (article body) ---------- */

.prose {
  max-width: 72ch;
  margin-inline: auto;
  padding-block: clamp(40px, 6vw, 72px);
}
.prose p { color: var(--cream-dim); }
.prose h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; font-size: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--green); }
.prose strong { color: var(--cream); }

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(246, 231, 216, 0.08);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}
.prose pre {
  background: var(--plum-950);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 1.4em 0;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: 0.9rem; }

.post-meta { font-size: 0.88rem; color: var(--muted); margin-bottom: 1.6em; }

.origin-note {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 20px;
  margin-bottom: 2.2em;
  font-size: 0.92rem;
  color: var(--muted);
}
.origin-note p { margin: 0; }

.article-foot {
  margin-top: 2.6em;
  padding-top: 1.6em;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
}
.article-foot p { margin-bottom: 0.6em; }
