/* ===========================================================
   AppSkor shared stylesheet (light and minimal)
   Single source of truth for the landing page + all brand pages.
   =========================================================== */

/* ---- Design tokens ---- */
:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f4;
  --ink: #1d1d1f;
  --ink-soft: #3a3a3e;
  --muted: #6b7280;
  --line: #e6e8ec;
  --accent: #4f46e5;          /* indigo, default / brand */
  --accent-ink: #ffffff;
  --accent-tint: rgba(79, 70, 229, 0.08);
  --star: #f5a623;

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, 0.14);

  --container: 1120px;
  --header-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

/* Per-app accent themes (set on <body>) */
.theme-edu  { --accent: #4f46e5; --accent-tint: rgba(79, 70, 229, 0.08); }
.theme-game { --accent: #f0653e; --accent-tint: rgba(240, 101, 62, 0.09); }
.theme-tool { --accent: #2680c2; --accent-tint: rgba(38, 128, 194, 0.09); }

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 9vw, 112px); }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
}
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.section-sub { color: var(--muted); font-size: 1.06rem; max-width: 56ch; margin-top: 12px; }
.center { text-align: center; margin-inline: auto; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.12rem; }
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: grid; place-items: center; color: #fff; font-size: 0.9rem; font-weight: 800;
}
.brand .mark.game { background: linear-gradient(135deg, #f0653e, #f59e0b); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--ink-soft); font-weight: 550; font-size: 0.95rem; transition: color .15s; }
.nav a:hover { color: var(--ink); }
.nav-cta {
  padding: 8px 16px; border-radius: 999px; background: var(--ink); color: #fff !important;
  font-weight: 600; font-size: 0.9rem !important;
}
.nav-cta:hover { opacity: .88; }
.nav-toggle { display: none; border: 0; background: none; cursor: pointer; padding: 8px; color: var(--ink); }
.nav-toggle svg { width: 24px; height: 24px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 13px 24px; border-radius: 999px; font-weight: 650; font-size: 1rem;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s, opacity .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }

/* ---- Hero (landing) ---- */
.hero { position: relative; overflow: hidden; padding-block: clamp(64px, 11vw, 132px); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 520px; z-index: -1;
  background: radial-gradient(60% 60% at 30% 20%, var(--accent-tint), transparent 70%),
              radial-gradient(50% 50% at 85% 10%, rgba(139, 92, 246, 0.10), transparent 70%);
}
.hero-inner { max-width: 760px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 850; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), #8b5cf6 60%, #ec4899);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede { margin-top: 20px; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 56ch; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stats { margin-top: 44px; display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stats .stat strong { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-stats .stat span { color: var(--muted); font-size: 0.92rem; }

/* ---- App grid ---- */
.grid-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 36px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s, border-color .22s;
}
.app-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.app-card .top { display: flex; align-items: center; gap: 16px; }
.app-card .icon { width: 68px; height: 68px; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.app-card h3 { font-size: 1.12rem; font-weight: 750; letter-spacing: -0.01em; }
.app-card .tagline { color: var(--muted); font-size: 0.95rem; flex: 1; }
.app-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-card .arrow { color: var(--accent); font-weight: 700; transition: transform .2s; }
.app-card:hover .arrow { transform: translateX(4px); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 650;
  padding: 4px 10px; border-radius: 999px; background: var(--accent-tint); color: var(--accent);
}
.chip.game { background: rgba(240,101,62,.1); color: #d6471f; }
.chip.tool { background: rgba(38,128,194,.1); color: #1c6296; }
.rating { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 0.86rem; font-weight: 600; }
.rating .stars { color: var(--star); letter-spacing: 1px; }

/* ---- About strip ---- */
.about { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px); }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.about p { color: var(--ink-soft); font-size: 1.06rem; }
.about .facts { display: grid; gap: 14px; }
.about .fact { display: flex; gap: 12px; align-items: flex-start; }
.about .fact .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 9px; flex: none; }

/* ---- App Store badge ---- */
.appstore-badge { display: inline-block; }
.appstore-badge img, .appstore-badge svg { height: 54px; width: auto; }

/* ===========================================================
   Brand / product page
   =========================================================== */
.product-hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 96px); }
.product-hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 100%; z-index: -1;
  background: linear-gradient(180deg, var(--accent-tint), transparent 60%);
}
.product-hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.phero-icon { width: 120px; height: 120px; border-radius: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.phero-text h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.05; margin-top: 24px; font-weight: 850; }
.phero-text .tagline { font-size: 1.2rem; color: var(--muted); margin-top: 12px; }
.phero-text .meta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.phero-text .actions { margin-top: 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.phero-art { display: flex; justify-content: center; }

/* Phone frame */
.phone {
  position: relative; width: 270px; aspect-ratio: 9 / 19.5; border-radius: 42px;
  background: #0c0c0e; padding: 11px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0,0,0,.2);
}
.phone::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 22px; background: #0c0c0e; border-radius: 999px; z-index: 2;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; }
.phero-art .phone { transform: rotate(-3deg); }

/* Browser-window mockup (for web apps) */
.browser { width: 100%; max-width: 560px; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.browser .bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.browser .dots { display: flex; gap: 7px; flex: none; }
.browser .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; background: #d6dae0; }
.browser .dots i:nth-child(1) { background: #ff5f57; }
.browser .dots i:nth-child(2) { background: #febc2e; }
.browser .dots i:nth-child(3) { background: #28c840; }
.browser .url { flex: 1; text-align: center; font-size: 0.8rem; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser img { width: 100%; height: auto; display: block; }
.product-hero .phero-art .browser { transform: rotate(-1deg); }
.gallery .browser { flex: none; scroll-snap-align: center; max-width: none; width: min(880px, 88vw); }

/* Feature highlights */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.feature .ficon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent); margin-bottom: 16px;
}
.feature .ficon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
.feature p { color: var(--muted); margin-top: 8px; font-size: 0.97rem; }

/* App info / spec bar */
.specbar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specbar .container { display: flex; flex-wrap: wrap; gap: 8px 0; padding-block: 22px; }
.specbar .spec { flex: 1 1 0; min-width: 140px; padding: 4px 22px; border-left: 1px solid var(--line); }
.specbar .spec:first-child { border-left: 0; padding-left: 0; }
.specbar .spec .k { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.specbar .spec .v { display: block; font-size: 1.02rem; font-weight: 650; margin-top: 4px; }
.specbar .spec .v .stars { color: var(--star); }
@media (max-width: 560px) {
  .specbar .spec { flex: 1 1 45%; border-left: 0; padding-inline: 0 16px; }
}

/* Screenshot gallery, bare screenshots, no phone frame */
.gallery { display: flex; gap: 22px; overflow-x: auto; padding-bottom: 16px; scroll-snap-type: x mandatory; }
.gallery .shot { flex: none; scroll-snap-align: center; width: 270px; }
.gallery .shot img {
  width: 100%; height: auto; border-radius: 24px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

/* Description block */
.prose { max-width: 70ch; }
.prose p { color: var(--ink-soft); margin-bottom: 1em; white-space: pre-line; }

/* FAQ */
.faq-list { display: grid; gap: 12px; max-width: 760px; }
.faq-list details {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.faq-list summary::marker { color: var(--accent); }
.faq-list p { color: var(--muted); margin-top: 10px; }

/* CTA band */
.cta-band {
  background: var(--ink); color: #fff; border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px); text-align: center;
}
.cta-band h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: -0.02em; font-weight: 800; }
.cta-band p { color: rgba(255,255,255,.7); margin-top: 12px; max-width: 50ch; margin-inline: auto; }
.cta-band .actions { margin-top: 28px; display: flex; justify-content: center; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 48px; margin-top: 24px; }
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 28px; }
.site-footer .brand { margin-bottom: 12px; }
.site-footer p { color: var(--muted); font-size: 0.92rem; max-width: 40ch; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--ink-soft); font-size: 0.95rem; padding: 4px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .product-hero .container { grid-template-columns: 1fr; text-align: center; }
  .phero-text .meta-row, .phero-text .actions { justify-content: center; }
  .phero-art { order: -1; }
  .features { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: rgba(255,255,255,.97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px; transform: translateY(-130%); transition: transform .28s ease; box-shadow: var(--shadow); }
  .nav.open { transform: none; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { text-align: center; margin-top: 10px; border-bottom: 0; }
  .nav-toggle { display: inline-flex; }
  .hero-stats { gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .app-card:hover { transform: none; }
}
