/* =============================================================================
   Book Writer Pro — Site styles
   ============================================================================= */

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.2s;
  --dur-base: 0.3s;
  --dur-slow: 0.5s;

  --shadow-sm: 0 4px 12px -4px rgba(10,10,10,0.08);
  --shadow-md: 0 14px 36px -16px rgba(10,10,10,0.18);
  --shadow-lg: 0 30px 60px -20px rgba(10,10,10,0.25);
  --shadow-cta: 0 8px 24px -8px rgba(242,103,34,0.45);
  --shadow-warm: 0 14px 28px -10px rgba(242,103,34,0.30);

  --orange: #F26722;
  --orange-dark: #D54E0F;
  --orange-soft: #FFF8F2;
  --orange-glow: rgba(242,103,34,0.18);
  --orange-tint: #FFEEDF;
  --ink: #0A0A0A;
  --ink-2: #1A1A1A;
  --text: #3A3A3A;
  --text-2: #5A5A5A;
  --text-3: #6B6B6B;
  --line: rgba(10,10,10,0.08);
  --line-dark: rgba(255,255,255,0.10);
  --bg: #FFFFFF;
  --bg-alt: #FFF8F2;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-feature-settings: "lnum", "ss01";
}
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: #fff; color: #000; padding: 8px 14px; z-index: 999;
}
.skip-link:focus { left: 8px; }

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

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  cursor: pointer; border: none; font-family: inherit;
  transition: all var(--dur-fast) var(--ease-out);
}
.btn-primary { background: var(--orange); color: #FFFFFF; box-shadow: var(--shadow-cta); }
.btn-secondary { background: transparent; color: #FFFFFF; border: 1.5px solid rgba(255,255,255,0.32); }
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--orange-dark); color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 12px 32px -8px rgba(242,103,34,0.55); }
  .btn-secondary:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.5); }
  .btn-dark:hover { background: var(--orange); }
  .btn-outline:hover { background: var(--ink); color: #FFFFFF; }
}
.btn-play { width: 22px; height: 22px; background: var(--orange); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn-play svg { margin-left: 2px; }

/* ----- Top bar ----- */
.topbar {
  background: var(--ink); color: #FFFFFF;
  padding: 10px 20px; text-align: center; font-size: 14px; letter-spacing: 0.2px;
  line-height: 1.4;
}
.topbar a { color: var(--orange); text-decoration: none; font-weight: 600; }
.topbar a:hover { color: #FFFFFF; text-decoration: underline; }
.topbar strong { color: var(--orange); font-weight: 700; }
@media (max-width: 600px){ .topbar { font-size: 12.5px; padding: 9px 14px; } }
@media (max-width: 380px){ .topbar { font-size: 11.5px; padding: 8px 12px; } }

/* ----- Header / Nav ----- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #FFFFFF; text-decoration: none; }
.brand img { height: 48px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-link {
  color: #C8C8C8; font-size: 14px; font-weight: 500;
  padding: 9px 14px; border-radius: 8px; text-decoration: none;
  transition: all var(--dur-base) var(--ease-out); letter-spacing: 0.2px;
}
.nav-link.active { background: var(--orange); color: #FFFFFF; }
.nav-cta {
  background: var(--orange); color: #FFFFFF;
  padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px;
  text-decoration: none; transition: all var(--dur-fast) var(--ease-out); margin-left: 8px;
}
@media (hover: hover) {
  .nav-link:hover { color: #FFFFFF; background: rgba(255,255,255,0.06); }
  .nav-cta:hover { background: #FFFFFF; color: var(--orange-dark); }
}
.nav-toggle { display: none; background: transparent; border: 0; color: #FFFFFF; cursor: pointer; padding: 6px; min-height: 44px; min-width: 44px; }
@media (max-width: 860px){
  .site-header { padding: 12px 16px; flex-wrap: wrap; }
  .brand img { height: 40px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    order: 3; width: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding-top: 8px; max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-header.open .nav-links { max-height: 480px; padding-bottom: 8px; }
  .nav-link { padding: 14px 16px; min-height: 44px; display: flex; align-items: center; border-radius: 0; border-top: 1px solid var(--line-dark); }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ----- Footer ----- */
.site-footer {
  background: var(--ink); color: #C8C8C8;
  padding: 64px 24px 32px;
}
.footer-wrap { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid var(--line-dark);
}
.footer-brand { color: #FFFFFF; }
.footer-brand img { height: 64px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: #A8A8A8; line-height: 1.6; max-width: 320px; }
.footer-col h4 { color: #FFFFFF; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #C8C8C8; font-size: 14px; text-decoration: none; transition: color .15s; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  padding-top: 24px; font-size: 13px; color: #A8A8A8;
}
.footer-bottom a { color: #A8A8A8; text-decoration: none; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.06); display: inline-flex; align-items: center; justify-content: center; color: #C8C8C8; transition: all .15s; }
@media (hover: hover) {
  .footer-col a:hover { color: var(--orange); }
  .footer-bottom a:hover { color: var(--orange); }
  .footer-social a:hover { background: var(--orange); color: #FFFFFF; }
}
@media (max-width: 780px){
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px){
  .footer-grid { grid-template-columns: 1fr; }
}

/* ----- Section primitives ----- */
.section { padding: 90px 24px; }
.section-narrow { max-width: 1080px; margin: 0 auto; }
.section-wrap { max-width: 1200px; margin: 0 auto; }
.section-dark { background: var(--ink); color: #FFFFFF; }
.section-soft { background: var(--bg-alt); }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--orange); margin-bottom: 14px;
}
.eyebrow-line { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow-line::before { content: ''; width: 24px; height: 1px; background: currentColor; opacity: 0.6; }
.section h2 { font-size: clamp(28px, 4vw, 46px); margin: 0 0 16px; }
.section-lead { font-size: 18px; color: var(--text-2); line-height: 1.65; max-width: 760px; }
.section-head-center { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head-center .section-lead { margin: 0 auto; }

@media (max-width: 760px){
  .section { padding: 64px 22px; }
  .section-head-center { margin: 0 auto 40px; }
  .section-lead { font-size: 16.5px; }
}
@media (max-width: 480px){
  .section { padding: 52px 18px; }
  .btn { padding: 12px 22px; font-size: 14.5px; }
  .eyebrow { font-size: 12px; letter-spacing: 1.5px; margin-bottom: 12px; }
}

/* ----- Page hero primitive (light/dark) ----- */
.page-hero { padding: 90px 24px; text-align: center; position: relative; overflow: hidden; transition: all var(--dur-base) var(--ease-out); }
.page-hero--light { background: #FFFFFF; color: var(--ink); }
.page-hero--dark { background: var(--ink); color: #FFFFFF; }
.page-hero::before { content: ''; position: absolute; top: -150px; left: 50%; transform: translateX(-50%); width: 700px; height: 700px; pointer-events: none; }
.page-hero--light::before { background: radial-gradient(circle, rgba(242,103,34,0.10) 0%, rgba(242,103,34,0) 60%); }
.page-hero--dark::before { background: radial-gradient(circle, rgba(242,103,34,0.18) 0%, rgba(242,103,34,0) 60%); width: 700px; height: 700px; top: -180px; }
.page-hero-wrap { max-width: 880px; margin: 0 auto; position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(34px, 5vw, 60px); margin: 0 0 18px; }
.page-hero h1 em { font-style: normal; color: var(--orange); }
.page-hero p { font-size: 18px; line-height: 1.65; margin: 0 auto; max-width: 680px; }
.page-hero--light p { color: var(--text-2); }
.page-hero--dark p { color: #C8C8C8; }
@media (max-width: 760px){ .page-hero { padding: 64px 22px; } .page-hero p { font-size: 16.5px; } }
@media (max-width: 480px){ .page-hero { padding: 52px 18px; } }

/* ----- Testimonial card (shared) ----- */
.tm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tm-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px; transition: all var(--dur-base) var(--ease-out); }
.tm-card-stars { color: var(--orange); font-size: 16px; letter-spacing: 2px; margin-bottom: 14px; }
.tm-quote { font-size: 15.5px; line-height: 1.65; color: var(--ink); margin: 0 0 22px; }
.tm-author { display: flex; align-items: center; gap: 14px; }
.tm-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.tm-author-name { font-weight: 600; font-size: 15px; margin: 0; }
.tm-author-role { font-size: 13px; color: var(--text-3); margin: 0; }
@media (max-width: 880px){ .tm-grid { grid-template-columns: 1fr; } }

/* ----- Card hover standardization ----- */
@media (hover: hover) {
  .promise-card, .pk-card, .tm-card, .co-card {
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
  }
  .promise-card:hover, .pk-card:hover, .tm-card:hover, .co-card:hover {
    transform: translateY(-4px);
  }
  .fw-step {
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
  }
  .fw-step:hover { transform: translateY(-6px); }
}

/* ----- Final CTA section (shared) ----- */
.final-cta { background: var(--ink); color: #FFFFFF; padding: 90px 24px; text-align: center; position: relative; overflow: hidden; }
.final-cta::before { content: ''; position: absolute; top: -180px; left: 50%; transform: translateX(-50%); width: 700px; height: 700px; background: radial-gradient(circle, rgba(242,103,34,0.18) 0%, rgba(242,103,34,0) 60%); pointer-events: none; }
.final-cta-wrap { max-width: 780px; margin: 0 auto; position: relative; z-index: 1; }
.final-cta h2 { color: #FFFFFF; font-size: clamp(30px, 4vw, 46px); margin: 0 0 18px; }
.final-cta p { font-size: 18px; color: #C8C8C8; line-height: 1.65; margin: 0 0 32px; }
.final-cta-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 760px){ .final-cta { padding: 64px 22px; } }

/* ----- Final CTA legacy (.fc) — kept for inline-style references ----- */
.fc { background: #0A0A0A; color: #FFFFFF; padding: 90px 24px; text-align: center; position: relative; overflow: hidden; }
.fc::before { content: ''; position: absolute; top: -180px; left: 50%; transform: translateX(-50%); width: 700px; height: 700px; background: radial-gradient(circle, rgba(242,103,34,0.18) 0%, rgba(242,103,34,0) 60%); pointer-events: none; }
.fc-wrap { max-width: 780px; margin: 0 auto; position: relative; z-index: 1; }
.fc h2 { color: #FFFFFF; font-size: clamp(28px, 4.5vw, 52px); margin: 0 0 20px; }
.fc p { font-size: 18px; color: #C8C8C8; line-height: 1.65; margin: 0 0 36px; }
.fc-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 760px){
  .fc { padding: 64px 22px; }
  .fc p { font-size: 16.5px; margin-bottom: 28px; }
}
@media (max-width: 480px){
  .fc { padding: 52px 18px; }
  .fc-ctas { gap: 10px; flex-direction: column; align-items: stretch; }
  .fc-ctas .btn { width: 100%; justify-content: center; }
}

/* ----- Narrow viewport stack for trust + stats grids ----- */
@media (max-width: 380px) {
  .trust-wrap, .stats-grid { grid-template-columns: 1fr !important; }
  .trust-item { border-right: none !important; }
  .trust-item:nth-child(odd) { border-right: none !important; }
}

/* ----- Utilities ----- */
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); border: none; margin: 0; }

.img-frame { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.img-tilt-l { transform: rotate(-2deg); transition: transform var(--dur-base) var(--ease-out); }
.img-tilt-r { transform: rotate(2deg); transition: transform var(--dur-base) var(--ease-out); }
@media (hover: hover) {
  .img-tilt-l:hover, .img-tilt-r:hover { transform: rotate(0); }
}

.bg-glow-warm { position: relative; }
.bg-glow-warm::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(242,103,34,0.08), transparent 70%); pointer-events: none; z-index: 0; }
.bg-glow-warm > * { position: relative; z-index: 1; }

::selection { background: var(--orange); color: #FFFFFF; }

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}
