/* =========================================================================
   單手學：iPAS AI 應用規劃師 — promo site
   Static, dependency-free stylesheet.
   ========================================================================= */

:root {
  --bg:        #050b1a;
  --bg-2:      #0a1733;
  --ink:       #e9f1ff;
  --muted:     #a4b6d8;
  --muted-2:   #7e90b6;
  --line:      rgba(120, 160, 230, 0.16);
  --surface:   rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);

  --cyan:   #38c9ff;
  --cyan-2: #6fdcff;
  --blue:   #3b82f6;
  --purple: #9b6cff;
  --gold:   #f5b942;

  --brand-grad: linear-gradient(135deg, #38c9ff 0%, #7c8bff 52%, #a86bff 100%);

  --radius:    18px;
  --radius-sm: 12px;
  --container: 1080px;

  --shadow:    0 24px 60px -28px rgba(0, 0, 0, 0.75);
  --glow-cyan: 0 0 50px -12px rgba(56, 201, 255, 0.55);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "PingFang TC", "PingFang SC", "Microsoft JhengHei", "Noto Sans TC",
          "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

/* ----------------------------------------------------------------- reset */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.75;
  font-size: 17px;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* fixed decorative ambience */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 82% -8%, rgba(56, 201, 255, 0.16), transparent 60%),
    radial-gradient(820px 620px at 6% 12%, rgba(155, 108, 255, 0.16), transparent 58%),
    radial-gradient(700px 700px at 50% 108%, rgba(59, 130, 246, 0.12), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(120, 160, 230, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 230, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 70%);
}

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

a { color: var(--cyan-2); text-decoration: none; }
a:hover { color: var(--cyan); }

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

/* --------------------------------------------------------------- layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 22px;
}

section { position: relative; }

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-2);
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 18px;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: 0.005em; margin: 0; }

h2.section-title {
  font-size: clamp(27px, 4.4vw, 41px);
  font-weight: 800;
}
.section-sub {
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
}

.grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7, 13, 28, 0.72);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  color: var(--ink);
  font-size: 16px;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.6);
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a:not(.btn) {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-cta-wrap { display: flex; align-items: center; gap: 18px; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15.5px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  color: #04101f;
  background: var(--brand-grad);
  box-shadow: 0 10px 30px -10px rgba(124, 139, 255, 0.7);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -10px rgba(124, 139, 255, 0.85);
  color: #04101f;
}
.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  color: var(--ink);
}
.btn-discord {
  color: #fff;
  background: #5865f2;
  box-shadow: 0 12px 30px -12px rgba(88, 101, 242, 0.85);
}
.btn-discord:hover { transform: translateY(-2px); color: #fff; background: #4b58e8; }
.btn svg { width: 19px; height: 19px; flex: none; }

/* ------------------------------------------------------------ store badges */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 16px;
  min-width: 188px;
  background: #0a0f1c;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  color: #fff;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.badge:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: rgba(120, 200, 255, 0.5);
  box-shadow: 0 14px 30px -16px rgba(56, 201, 255, 0.6);
}
.badge .mark { width: 26px; height: 30px; flex: none; }
.badge .badge-tx { display: flex; flex-direction: column; line-height: 1.15; }
.badge .badge-tx small {
  font-size: 11px;
  font-weight: 500;
  color: #c4cee0;
  letter-spacing: 0.02em;
}
.badge .badge-tx strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------- hero */
.hero { padding-top: clamp(26px, 4vw, 52px); padding-bottom: clamp(36px, 6vw, 64px); }

.hero-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(400px, 44vw, 560px);
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow), var(--glow-cyan);
}
.hero-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  z-index: -2;
}
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 11, 26, 0.95) 0%, rgba(5, 11, 26, 0.86) 30%,
                    rgba(5, 11, 26, 0.46) 56%, rgba(5, 11, 26, 0.06) 84%, transparent 100%),
    linear-gradient(0deg, rgba(5, 11, 26, 0.45), transparent 42%);
}
.hero-copy { position: relative; max-width: 620px; padding: clamp(26px, 4vw, 56px); }
.hero h1 {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 900;
  letter-spacing: 0.002em;
  text-wrap: balance;
  word-break: keep-all;
}
.hero h1 .grad-text { display: block; }
.hero h1 .line2 { display: block; }
.hero-lead {
  margin-top: 20px;
  max-width: 470px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--muted);
  line-height: 1.85;
}
.hero-lead strong { color: var(--ink); font-weight: 700; }
.hero .store-badges { margin-top: 28px; }
.hero-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

/* --------------------------------------------------------------- stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: clamp(34px, 5vw, 52px);
}
.stat {
  text-align: center;
  padding: 26px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.stat .num {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
  line-height: 1;
}
.stat .lbl { margin-top: 10px; font-size: 14px; color: var(--muted); font-weight: 600; }

/* --------------------------------------------------------------- cards */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 30px;
}

.why {
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
  font-size: clamp(16.5px, 2.2vw, 19px);
  color: var(--muted);
  line-height: 1.95;
}
.why strong { color: var(--ink); font-weight: 700; }
.why .hl { color: var(--cyan-2); font-weight: 700; }

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.feature {
  padding: 32px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(120, 200, 255, 0.4); background: var(--surface-2); }
.feature .ic {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 15px;
  font-size: 26px;
  background: linear-gradient(150deg, rgba(56, 201, 255, 0.22), rgba(155, 108, 255, 0.22));
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
.feature h3 { font-size: 21px; font-weight: 800; margin-bottom: 12px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }

/* --------------------------------------------------------------- ebooks */
.ebooks-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 34px;
}
.ebooks-intro .card { display: flex; gap: 18px; align-items: flex-start; padding: 26px; }
.ebooks-intro .ic { font-size: 30px; line-height: 1; flex: none; }
.ebooks-intro h3 { font-size: 19px; font-weight: 800; margin-bottom: 7px; }
.ebooks-intro p { margin: 0; color: var(--muted); font-size: 15.5px; }
.ebooks-intro .big { color: var(--cyan-2); font-weight: 800; }

.ebook-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.ebook {
  position: relative;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.ebook:hover { transform: translateY(-4px); border-color: rgba(120, 200, 255, 0.42); }
.ebook::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent, var(--cyan));
}
.ebook .no {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent, var(--cyan));
  letter-spacing: 0.08em;
}
.ebook h4 { margin: 10px 0 14px; font-size: 17px; font-weight: 800; line-height: 1.45; }
.ebook .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--accent, var(--cyan));
  background: color-mix(in srgb, var(--accent, var(--cyan)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--cyan)) 34%, transparent);
}
.ebook[data-level="beginner"]     { --accent: #38c9ff; }
.ebook[data-level="intermediate"] { --accent: #9b6cff; }
.ebook[data-level="supplement"]   { --accent: #f5b942; }

.closer {
  margin-top: 36px;
  text-align: center;
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 700;
  color: var(--ink);
}

/* --------------------------------------------------------------- download */
.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 840px;
  margin-inline: auto;
}
.dl-card {
  text-align: center;
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dl-card .platform {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 22px;
}
.dl-card .platform svg { width: 22px; height: 22px; }
.qr {
  width: 184px;
  height: 184px;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 36px -18px rgba(0, 0, 0, 0.8);
}
.qr img { width: 100%; height: 100%; }
.dl-card .hint { margin: 16px 0 20px; font-size: 13.5px; color: var(--muted-2); }

/* --------------------------------------------------------------- discord */
.discord {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(34px, 5vw, 60px);
  background:
    radial-gradient(680px 360px at 85% -10%, rgba(88, 101, 242, 0.26), transparent 62%),
    radial-gradient(560px 320px at 0% 110%, rgba(56, 201, 255, 0.16), transparent 60%),
    rgba(255, 255, 255, 0.025);
  overflow: hidden;
}
.discord-head { text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 4vw, 48px); }
.discord-head h2 { font-size: clamp(25px, 4vw, 38px); font-weight: 800; }
.discord-head p { margin-top: 16px; color: var(--muted); font-size: 16.5px; line-height: 1.85; }
.discord-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.dcol {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 14, 30, 0.5);
}
.dcol h3 { font-size: 18px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; }
.dcol ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.dcol li { color: var(--muted); font-size: 15px; line-height: 1.7; padding-left: 24px; position: relative; }
.dcol li::before {
  content: "";
  position: absolute;
  left: 2px; top: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}
.dcol li b { color: var(--ink); font-weight: 700; }
.discord-cta {
  margin-top: clamp(32px, 4vw, 46px);
  text-align: center;
}
.discord-quote {
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 800;
  margin-bottom: 10px;
}
.discord-quote .grad-text { font-style: normal; }
.discord-cta p { color: var(--muted); margin: 0 0 24px; }
.discord-link {
  display: inline-block;
  margin-top: 16px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  color: var(--muted);
}

/* --------------------------------------------------------------- final cta */
.final-cta {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(40px, 6vw, 72px) 24px;
  background:
    radial-gradient(620px 320px at 50% -20%, rgba(124, 139, 255, 0.24), transparent 64%),
    var(--surface);
}
.final-cta h2 { font-size: clamp(26px, 4.4vw, 42px); font-weight: 900; }
.final-cta p { color: var(--muted); margin: 18px auto 30px; max-width: 560px; font-size: 17px; }
.final-cta .store-badges { justify-content: center; }

/* --------------------------------------------------------------- footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(40px, 6vw, 80px);
  padding-block: 44px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 26px 40px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-brand img { width: 42px; height: 42px; border-radius: 11px; }
.footer-brand .ft { font-weight: 800; }
.footer-brand .fs { font-size: 13px; color: var(--muted-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer-links a { color: var(--muted); font-size: 15px; font-weight: 600; }
.footer-links a:hover { color: var(--ink); }
.footer-legal {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 13.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
}

/* --------------------------------------------------------------- doc page */
.doc {
  max-width: 800px;
  margin-inline: auto;
  padding-block: clamp(46px, 7vw, 84px);
}
.doc h1 { font-size: clamp(28px, 4.6vw, 40px); font-weight: 900; margin-bottom: 10px; }
.doc .lead { color: var(--muted); font-size: 17px; margin-bottom: 18px; }
.doc h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  margin: 44px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.doc h3 { font-size: 18px; font-weight: 800; margin: 28px 0 10px; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--ink); }
.doc ul { padding-left: 22px; display: grid; gap: 8px; }
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--cyan-2);
}
.doc .updated { font-size: 14px; color: var(--muted-2); }
.doc .back { display: inline-block; margin-top: 40px; }

/* --------------------------------------------------------------- reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 940px) {
  .ebook-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hero-banner { display: block; min-height: 0; box-shadow: var(--shadow); }
  .hero-banner-img { position: relative; height: clamp(150px, 44vw, 230px); z-index: 0; }
  .hero-banner::before { display: none; }
  .hero-copy { position: relative; z-index: 1; max-width: none; text-align: center; padding: 26px 20px 6px; }
  .hero-lead { max-width: none; margin-inline: auto; }
  .hero .store-badges, .hero-meta { justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .features,
  .ebooks-intro,
  .download-grid,
  .discord-cols { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .store-badges { flex-direction: column; align-items: stretch; width: 100%; }
  .badge { width: 100%; min-width: 0; justify-content: center; }
}
@media (max-width: 420px) {
  .ebook-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
