/* =========================================================
   The One-Person AI Business — shared design system
   Used by index.html (sales page) and thank-you.html
   ========================================================= */

:root {
  /* Palette — matched to the actual eBook cover */
  --bg: #0a0b10;
  --bg-2: #0f1117;
  --surface: #14161e;
  --surface-2: #1a1d27;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f1ec;
  --text-2: #c4c6ce;
  --muted: #8d91a0;
  --accent: #e45c32;          /* cover orange */
  --accent-hover: #f06a3f;
  --accent-soft: rgba(228, 92, 50, 0.12);
  --cool: #7b8cff;            /* subtle secondary accent */
  --cool-soft: rgba(123, 140, 255, 0.10);
  --good: #4fd1a5;
  --bad: #ff7a7a;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --max: 1160px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Subtle background grid + noise */
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255,255,255,0.03);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.h-display { font-family: var(--serif); font-weight: 800; font-size: clamp(38px, 6.2vw, 72px); letter-spacing: -0.025em; }
.h-section { font-family: var(--serif); font-weight: 750; font-size: clamp(30px, 4.4vw, 50px); }
.h-card { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.accent { color: var(--accent); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }

.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section--alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .h-section { margin: 14px 0 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 16px 30px; border-radius: 12px; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 16px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 10px 30px -10px rgba(228,92,50,0.7), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 14px 36px -10px rgba(228,92,50,0.85), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-primary:active { transform: translateY(0); }
.btn-lg { min-height: 64px; padding: 20px 40px; font-size: 17px; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.cta-block { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cta-block.center { align-items: center; text-align: center; }
.cta-note { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.cta-note svg { flex: none; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.glass {
  background: rgba(20,22,30,0.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
}
.icon-box {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(228,92,50,0.22);
}
.icon-box svg { width: 21px; height: 21px; }
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
}

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- 3D book mockup ---------- */
.book-stage { perspective: 1600px; display: grid; place-items: center; position: relative; }
.book-stage::before {
  content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(228,92,50,0.28), rgba(123,140,255,0.08) 45%, transparent 70%);
  filter: blur(30px); z-index: 0;
}
.book {
  position: relative; z-index: 1; width: min(340px, 72vw); aspect-ratio: 909 / 1287;
  transform-style: preserve-3d; transform: rotateY(-22deg) rotateX(4deg);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.book:hover { transform: rotateY(-12deg) rotateX(2deg); }
.book-cover {
  position: absolute; inset: 0; border-radius: 3px 8px 8px 3px; overflow: hidden;
  box-shadow: 30px 40px 60px -20px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.06);
  transform: translateZ(14px);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover::after { /* spine crease + sheen */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.45) 0%, rgba(255,255,255,0.12) 2.2%, rgba(0,0,0,0.15) 4%, transparent 7%),
    linear-gradient(115deg, rgba(255,255,255,0.10) 0%, transparent 35%);
}
.book-pages {
  position: absolute; top: 1.2%; bottom: 1.2%; right: -1px; width: 28px;
  background: repeating-linear-gradient(90deg, #e9e5dc 0 1px, #cfc9bd 1px 2px);
  transform: rotateY(90deg) translateZ(-14px) translateX(14px); transform-origin: right;
}
.book-back {
  position: absolute; inset: 0; background: #111; border-radius: 3px 8px 8px 3px; transform: translateZ(-14px);
  box-shadow: 40px 30px 80px rgba(0,0,0,0.6);
}
.book-shadow {
  position: absolute; bottom: -26px; left: 10%; right: 0; height: 30px; z-index: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.65), transparent 70%); filter: blur(6px);
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 120px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }

/* ---------- Toast (used if a placeholder URL hasn't been set yet) ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; z-index: 90;
  background: #23130d; color: #ffd9cc; border: 1px solid rgba(228,92,50,0.5);
  padding: 12px 18px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px);
  transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
