/* BookSprite web — marketing + partner portal */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-brand: #5542d8;
  --clr-brand-dark: #3d2cb1;
  --clr-accent: #ef8d68;
  --clr-bg: #fbfaf7;
  --clr-text: #25213a;
  --clr-muted: #68627b;
  --clr-surface: #ffffff;
  --clr-border: #e2e8f0;
  --radius: 14px;
  font-family: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body { background: var(--clr-bg); color: var(--clr-text); line-height: 1.6; }

/* Header */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 5vw; background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.2rem; color: var(--clr-brand); text-decoration: none; }
.brand img { border-radius: 9px; }
nav { display: flex; gap: 1rem; align-items: center; }
nav a:not(.btn-nav) { color: var(--clr-text); text-decoration: none; font-size: .9rem; }
nav a:not(.btn-nav):hover { color: var(--clr-brand); }
nav span { color: var(--clr-muted); font-size: .9rem; }
.btn-nav {
  background: var(--clr-brand); color: #fff; border: none; border-radius: 8px;
  padding: .5rem 1.1rem; font-size: .9rem; cursor: pointer; text-decoration: none;
  font-family: inherit; transition: background .15s;
}
.btn-nav:hover { background: var(--clr-brand-dark); }

/* Main */
main { max-width: 1100px; margin: auto; padding: 0 5vw; }

/* Hero */
.hero {
  display: grid; grid-template-columns: .85fr 1.15fr; gap: 2.5rem;
  align-items: center; padding: 4.5rem 0 5rem;
}
.hero-copy { position: relative; z-index: 1; }
.hero h1 { margin-bottom: 1.25rem; font-size: clamp(2.7rem, 6vw, 4.7rem); font-weight: 700; line-height: 1.02; letter-spacing: -.045em; }
.eyebrow { color: var(--clr-brand); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.tagline { max-width: 620px; margin-bottom: 2.5rem; font-size: 1.15rem; color: var(--clr-muted); }
.referral-notice { display: table; margin: -1.25rem 0 2rem; padding: .55rem 1rem; border-radius: 999px; background: #ebe8ff; color: var(--clr-brand-dark); }
.referral-page { max-width: 680px; margin: 5rem auto; padding: 3rem; border: 1px solid var(--clr-border); border-radius: 24px; background: var(--clr-surface); box-shadow: 0 16px 45px rgba(37,33,58,.12); }
.referral-page h1 { margin-bottom: 1rem; font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.05; }
.referral-page p { margin-bottom: 1.5rem; color: var(--clr-muted); }
.referral-page .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 1rem; }
.referral-page .button, .referral-page button { border: 0; border-radius: 10px; padding: .8rem 1.2rem; background: var(--clr-brand); color: #fff; font-family: inherit; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.referral-page button { background: var(--clr-text); }
.referral-page .fine-print { margin-top: 2rem; font-size: .85rem; }
.store-badges { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-art { min-width: 0; border-radius: 28px; overflow: hidden; box-shadow: 0 25px 70px rgba(37,33,58,.2); }
.hero-art img { display: block; width: 100%; height: auto; transform: scale(1.01); }
.app-store-badge { display: block; width: 174px; height: 58px; transition: transform .15s, filter .15s; }
.app-store-badge img { display: block; width: 174px; height: 58px; }
.google-play-badge { position: relative; display: block; overflow: hidden; width: 195px; height: 58px; transition: transform .15s, filter .15s; }
.google-play-badge img { position: absolute; top: -14px; left: -14px; display: block; width: 223px; height: 86px; }
.app-store-badge:hover, .google-play-badge:hover { transform: translateY(-2px); filter: drop-shadow(0 8px 11px rgba(37,33,58,.18)); }
.store-button { min-width: 180px; min-height: 58px; display: grid; align-content: center; padding: .55rem 1.1rem; border-radius: 12px; background: var(--clr-text); color: #fff; text-align: left; text-decoration: none; font-size: .68rem; line-height: 1.15; transition: transform .15s, box-shadow .15s; }
.store-button strong { display: block; font-size: 1.15rem; }
.store-button:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(37,33,58,.18); }
.store-button.unavailable { position: relative; opacity: .68; cursor: default; }
.store-button.unavailable:hover { transform: none; box-shadow: none; }
.store-button small { position: absolute; top: -8px; right: -8px; padding: .18rem .45rem; border-radius: 999px; background: var(--clr-accent); color: var(--clr-text); font-weight: 700; }

/* Featured video */
.video-feature { padding: 1rem 0 5rem; text-align: center; }
.video-feature-copy { max-width: 720px; margin: 0 auto 2rem; }
.video-feature h2 { margin-bottom: 1rem; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -.035em; }
.video-feature-copy > p:last-child { color: var(--clr-muted); font-size: 1.05rem; }
.video-embed { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; border-radius: 24px; background: var(--clr-text); box-shadow: 0 25px 70px rgba(37,33,58,.18); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-fallback { margin-top: 1rem; }
.video-fallback a { color: var(--clr-brand); font-weight: 700; text-underline-offset: .18em; }
.video-fallback a:hover { color: var(--clr-brand-dark); }

/* Features */
.features { padding: 5rem 0; }
.features h2, .pricing h2, .faq h2 { text-align: center; font-size: 1.8rem; margin-bottom: 2rem; }
.section-intro { max-width: 620px; margin: -1.25rem auto 2.5rem; color: var(--clr-muted); text-align: center; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--clr-surface); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.feature-card .step { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; margin: 0 auto .9rem; border-radius: 50%; background: #ebe8ff; color: var(--clr-brand); font-size: .78rem; font-weight: 700; }
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p, .plan-card > p:last-child { color: var(--clr-muted); }

.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin: 3rem 0; padding: 3.5rem; border-radius: 24px; background: var(--clr-text); color: #fff; }
.benefits h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.12; }
.benefits div > p:last-child { margin-top: 1rem; color: rgba(255,255,255,.72); }
.benefits ul { list-style: none; }
.benefits li { padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.benefits li::before { content: "✓"; margin-right: .75rem; color: var(--clr-accent); font-weight: 700; }

/* Pricing */
.pricing { padding: 4rem 0; background: var(--clr-bg); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.plan-card {
  position: relative;
  background: var(--clr-surface); border: 2px solid var(--clr-border);
  border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center;
}
.plan-card.featured { border-color: var(--clr-brand); box-shadow: 0 4px 20px rgba(61,90,241,.15); }
.price { font-size: 1.8rem; font-weight: 700; color: var(--clr-brand); margin: .5rem 0 1rem; }
.price small { color: var(--clr-muted); font-size: .8rem; font-weight: 400; }
.plan-label { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: .25rem .7rem; border-radius: 999px; background: var(--clr-brand); color: #fff; font-size: .72rem; white-space: nowrap; }
.pricing-note { max-width: 650px; margin: 1.5rem auto 0; color: var(--clr-muted); font-size: .82rem; text-align: center; }
.plan-card ul { list-style: none; color: var(--clr-muted); }
.plan-card li::before { content: "✓ "; color: var(--clr-brand); }

/* FAQ */
.faq { padding: 4rem 0; }
details { border: 1px solid var(--clr-border); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: .75rem; background: var(--clr-surface); }
summary { cursor: pointer; font-weight: 600; }
details p { margin-top: .5rem; color: var(--clr-muted); }

/* Public policy and support pages */
.policy-page {
  max-width: 720px; margin: 4rem auto; padding: 2.5rem;
  background: var(--clr-surface); border: 1px solid var(--clr-border);
  border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.policy-page h1 { margin-bottom: 1.5rem; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.15; }
.policy-page h2 { margin: 2rem 0 .75rem; font-size: 1.3rem; }
.policy-page p { margin-bottom: 1rem; color: var(--clr-muted); }
.policy-page a { color: var(--clr-brand); font-weight: 600; }
.policy-page .eyebrow { color: var(--clr-brand); margin-bottom: .75rem; }

/* How-to guide */
.guide-page { max-width: 1000px; }
.guide-hero { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2.5rem; align-items: center; padding: 4.5rem 0; }
.guide-hero h1 { margin-bottom: 1.25rem; font-size: clamp(2.7rem, 7vw, 4.8rem); line-height: 1.02; letter-spacing: -.045em; }
.guide-hero-copy > p:last-child { color: var(--clr-muted); font-size: 1.15rem; }
.guide-hero-art { min-width: 0; overflow: hidden; border-radius: 22px; box-shadow: 0 20px 50px rgba(37,33,58,.18); }
.guide-hero-art img { display: block; width: 100%; height: auto; }
.guide-steps { padding: 2rem 0 4rem; }
.guide-steps > h2, .stands > h2 { margin-bottom: 2rem; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.guide-step-grid { display: grid; gap: 1rem; }
.guide-step { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; padding: 1.5rem; background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: var(--radius); }
.guide-step .step { width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: 50%; background: #ebe8ff; color: var(--clr-brand); font-size: .78rem; font-weight: 700; }
.guide-step h3 { margin-bottom: .3rem; }
.guide-step p, .stand-card p { color: var(--clr-muted); }
.guide-step a { color: var(--clr-brand); font-weight: 600; text-underline-offset: .15em; }
.guide-step a:hover { color: var(--clr-brand-dark); }
.setup-tip { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; padding: 3rem; border-radius: 24px; background: var(--clr-text); color: #fff; }
.setup-tip h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; }
.setup-tip .eyebrow { color: #a99cff; }
.setup-tip ul { list-style: none; }
.setup-tip li { padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.setup-tip li::before { content: "✓"; margin-right: .75rem; color: var(--clr-accent); font-weight: 700; }
.stands { padding: 5rem 0 2rem; }
.stands .section-intro { margin-left: 0; text-align: left; }
.stand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.stand-card { display: grid; grid-template-rows: 240px 1fr; overflow: hidden; background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.stand-card > div { display: flex; flex-direction: column; align-items: flex-start; padding: 1.5rem; }
.stand-card h3 { margin-bottom: .5rem; }
.stand-image { display: block; width: 100%; height: 240px; padding: 1rem; background: #fff; object-fit: contain; }
.amazon-link { display: inline-flex; gap: .35rem; margin-top: auto; padding: .65rem 1rem; border-radius: 8px; background: #ff9900; color: #201500; font-weight: 700; text-decoration: none; }
.amazon-link:hover { background: #e88b00; }
.affiliate-disclosure { margin-top: 1rem; color: var(--clr-muted); font-size: .78rem; font-style: italic; }

/* Authors and publishers */
.publisher-page { max-width: 940px; }
.publisher-hero { max-width: 790px; padding: 5.5rem 0 4.5rem; }
.publisher-hero h1 { margin-bottom: 1.5rem; font-size: clamp(3.2rem, 9vw, 6.5rem); line-height: .95; letter-spacing: -.055em; }
.publisher-hero p { max-width: 720px; margin-bottom: 1.25rem; color: var(--clr-muted); font-size: 1.08rem; }
.publisher-hero .publisher-lede { color: var(--clr-text); font-size: clamp(1.25rem, 3vw, 1.65rem); line-height: 1.45; }
.publisher-program { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; padding: 4rem; border-radius: 24px; background: var(--clr-text); color: #fff; }
.publisher-program h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; }
.publisher-program .eyebrow { color: #a99cff; }
.publisher-program-copy p { margin-bottom: 1.25rem; color: rgba(255,255,255,.78); }
.publisher-program-copy p:last-child { margin-bottom: 0; }
.publisher-invitation { max-width: 700px; margin: 5rem auto 1rem; text-align: center; }
.publisher-invitation h2 { margin-bottom: 1rem; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12; }
.publisher-invitation > p { color: var(--clr-muted); }
.publisher-contact { display: inline-block; margin: 2rem 0 1.25rem; padding: .9rem 1.35rem; border-radius: 10px; background: var(--clr-brand); color: #fff; font-weight: 700; text-decoration: none; transition: background .15s, transform .15s; }
.publisher-contact:hover { background: var(--clr-brand-dark); transform: translateY(-2px); }
.publisher-invitation .publisher-rights-note { font-size: .86rem; }

/* Footer */
footer { text-align: center; padding: 2rem 5vw; color: var(--clr-muted); font-size: .9rem; border-top: 1px solid var(--clr-border); margin-top: 4rem; }
footer a { color: var(--clr-brand); }

/* Partner portal */
.auth-card {
  max-width: 460px; margin: 6rem auto; padding: 2.5rem;
  background: var(--clr-surface); border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,.08); text-align: center;
}
.auth-card h2 { margin-bottom: 1rem; }
.auth-card p { color: var(--clr-muted); margin-bottom: 1.5rem; }
.btn-google {
  display: inline-flex; align-items: center; gap: .65rem;
  background: #fff; border: 1.5px solid var(--clr-border);
  border-radius: 8px; padding: .75rem 1.5rem; font-size: 1rem;
  cursor: pointer; font-family: inherit; transition: box-shadow .15s;
  color: var(--clr-text);
}
.btn-google:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.btn-google:disabled { opacity: .5; cursor: not-allowed; }

.partner-hero { padding: 3rem 0 2rem; }
.partner-hero h2 { margin-bottom: 1rem; }
.code-display {
  display: inline-flex; align-items: center; gap: 1rem;
  background: #f0f4ff; border: 1.5px dashed var(--clr-brand);
  border-radius: 10px; padding: 1rem 1.5rem; margin-bottom: .75rem;
}
.code-display span { font-size: 1.8rem; font-weight: 700; letter-spacing: .08em; color: var(--clr-brand); font-family: monospace; }
.btn-copy {
  background: var(--clr-brand); color: #fff; border: none;
  border-radius: 6px; padding: .4rem .9rem; cursor: pointer; font-family: inherit; transition: background .15s;
}
.btn-copy:hover { background: var(--clr-brand-dark); }
.code-hint { color: var(--clr-muted); font-size: .9rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 2rem 0; }
.stat-card {
  background: var(--clr-surface); border: 1px solid var(--clr-border);
  border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center;
}
.stat-card small { display: block; color: var(--clr-muted); font-size: .8rem; margin-bottom: .5rem; }
.stat-card h2 { font-size: 2rem; color: var(--clr-brand); }

.payout-note {
  background: var(--clr-surface); border-left: 4px solid var(--clr-brand);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.5rem;
  margin: 2rem 0;
}
.payout-note h3 { margin-bottom: .5rem; }
.payout-note p { color: var(--clr-muted); margin-bottom: .5rem; }

@media (max-width: 640px) {
  header { align-items: center; }
  nav a { display: none; }
  nav a.mobile-primary { display: inline; }
  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0 2rem; }
  .hero h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .hero-art { border-radius: 20px; }
  .video-feature { padding: 2rem 0 3.5rem; }
  .video-embed { border-radius: 16px; }
  .benefits { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem; }
  .policy-page { margin: 2rem auto; padding: 1.5rem; }
  .guide-hero { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0; }
  .guide-hero h1 { font-size: clamp(2.35rem, 12vw, 3.2rem); line-height: 1.12; }
  .guide-hero-art { border-radius: 16px; }
  .setup-tip { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem; }
  .stand-grid { grid-template-columns: 1fr; }
  .publisher-hero { padding: 3.5rem 0 3rem; }
  .publisher-program { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem; }
  .publisher-invitation { margin-top: 3.5rem; }
}
