/* ============================================================
   ViziTales — marketing site
   Storybook-paper aesthetic: warm cream, purple ink, amber stars
   ============================================================ */

:root {
  --purple: #7B1FA2;
  --purple-deep: #5e1480;
  --amber: #FFA000;
  --amber-deep: #9a5b00;       /* text-safe amber on cream */
  --cream: #fdf9f3;
  --cream-card: #fffdf9;
  --ink: #2d2438;
  --ink-soft: #564a66;
  --line: #ece2d4;
  --shadow-soft: 0 6px 24px rgba(45, 36, 56, 0.08), 0 2px 6px rgba(45, 36, 56, 0.05);
  --shadow-lift: 0 16px 40px rgba(45, 36, 56, 0.14), 0 4px 10px rgba(45, 36, 56, 0.07);
  --radius: 1.25rem;            /* rounded-2xl-ish */
  --radius-lg: 1.75rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;  /* sticky header offset for anchors */
}

body {
  margin: 0;
  font-family: "Nunito", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  /* subtle paper-dot texture */
  background-image: radial-gradient(rgba(123, 31, 162, 0.05) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.9rem;
}

/* ---------- Focus & accessibility ---------- */

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

.btn:focus-visible { outline-color: var(--amber-deep); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--purple);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 0.75rem 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.95rem; }
.btn-lg { padding: 0.85rem 1.7rem; font-size: 1.05rem; }

.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 14px rgba(123, 31, 162, 0.3);
}
.btn-primary:hover { background: var(--purple-deep); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(123, 31, 162, 0.35); }
.btn-primary:active { transform: translateY(0); }

.btn-amber {
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(255, 160, 0, 0.35);
}
.btn-amber:hover { background: #ffae23; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 160, 0, 0.4); }
.btn-amber:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--purple);
  border-color: rgba(123, 31, 162, 0.35);
}
.btn-ghost:hover { border-color: var(--purple); background: rgba(123, 31, 162, 0.06); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 249, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.logo-mark { border-radius: 9px; }
.logo-text {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 2px solid rgba(123, 31, 162, 0.3);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--purple);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav a:not(.btn) {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--purple); background: rgba(123, 31, 162, 0.07); }

/* mobile: collapsed menu */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--cream-card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  padding: 0.75rem 1.25rem 1rem;
}
.site-header.nav-open .site-nav { display: block; }
.nav-cta { margin-top: 0.5rem; }

@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .site-nav ul { flex-direction: row; align-items: center; gap: 0.35rem; }
  .nav-cta { margin: 0 0 0 0.6rem; }
}

/* ---------- Hero ---------- */

.hero { padding-block: 3.5rem 4.5rem; overflow: hidden; }

.hero-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.hero-note {
  margin-top: 1.4rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 32rem;
}

/* hero art: big page with overlapping reference-sheet card */
.hero-art {
  position: relative;
  max-width: 30rem;
  margin-inline: auto;
  padding-bottom: 3.5rem;
}

.hero-page,
.hero-sheet {
  margin: 0;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}

.hero-page { transform: rotate(1.5deg); }
.hero-page img, .hero-sheet img { width: 100%; }

.hero-page figcaption,
.hero-sheet figcaption {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--purple);
  padding: 0.55rem 0.9rem;
  background: var(--cream-card);
  border-top: 1px solid var(--line);
}

.hero-sheet {
  position: absolute;
  bottom: 0;
  left: -0.75rem;
  width: min(52%, 15rem);
  transform: rotate(-4deg);
}

.hero-sparkle {
  position: absolute;
  top: -1.1rem;
  right: -0.5rem;
  filter: drop-shadow(0 2px 4px rgba(255, 160, 0, 0.4));
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.15fr 1fr; }
  .hero-art { margin-inline: 0 0.5rem; }
  .hero-sheet { left: -2.25rem; }
}

/* ---------- How it works ---------- */

.how { padding-block: 4rem; }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.6rem 1.5rem;
}

.step { position: relative; padding-top: 2.1rem; }

.step-num {
  position: absolute;
  top: -1.1rem;
  left: 1.3rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  background: var(--amber);
  color: var(--ink);
  font-weight: 900;
  font-size: 1.15rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(255, 160, 0, 0.4);
}

.step h3 { color: var(--purple); }
.step p { font-size: 0.98rem; color: var(--ink-soft); }
.step strong { color: var(--ink); }

/* ---------- Consistency proof strip ---------- */

.proof { padding-block: 4rem; }

.proof h2 { text-align: center; }
.proof-sub {
  text-align: center;
  color: var(--ink-soft);
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

.proof-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.proof-item {
  margin: 0;
  width: 100%;
  max-width: 24rem;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.proof-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.proof-item img { width: 100%; }

.proof-item figcaption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

.proof-tag {
  flex-shrink: 0;
  background: rgba(123, 31, 162, 0.1);
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.proof-arrow {
  color: var(--amber-deep);
  transform: rotate(90deg);   /* point downward when stacked */
  flex-shrink: 0;
}

@media (min-width: 880px) {
  .proof-strip { flex-direction: row; align-items: center; justify-content: center; }
  .proof-item { flex: 1 1 0; min-width: 0; max-width: 19rem; }
  .proof-arrow { transform: none; }
}

/* ---------- Who it's for ---------- */

.who { padding-block: 4rem; }

.who-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (min-width: 760px) { .who-grid { grid-template-columns: repeat(3, 1fr); } }

.who-card { border-top: 5px solid var(--amber); }
.who-card h3 { color: var(--purple); }
.who-card p { font-size: 0.98rem; color: var(--ink-soft); }

/* ---------- Evidence note ---------- */

.evidence { padding-block: 2.5rem; }

.evidence-panel {
  background: linear-gradient(140deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: #fdf6ff;
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow-lift);
  max-width: 52rem;
  margin-inline: auto;
}

.evidence-panel h2 { color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.evidence-panel p { font-size: 1.02rem; line-height: 1.7; }

/* ---------- Pricing teaser ---------- */

.pricing { padding-block: 4.5rem; }

.pricing-inner {
  text-align: center;
  max-width: 38rem;
}
.pricing p { color: var(--ink-soft); margin-bottom: 1.8rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--cream-card);
  padding-block: 1.8rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
}

.site-footer a {
  color: var(--purple);
  font-weight: 700;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* ---------- Privacy page ---------- */

.legal { padding-block: 3rem 4rem; max-width: 44rem; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2rem; }
.legal p, .legal li { color: var(--ink-soft); }
.legal .updated { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Scroll reveal (progressive enhancement) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */

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

/* Mission */
.mission-quote { margin-top: 0.75rem; color: var(--purple, #7b1fa2); font-weight: 700; }
