/* Customer Success Beyond the CSM
   Palette and type are taken from the book cover. */

:root {
  --cream: #F6F2EA;
  --cream-deep: #EDE6D8;
  --navy: #0E1F3D;
  --navy-soft: #2A3A5C;
  --ink-muted: #5B6578;
  --line: rgba(14, 31, 61, 0.14);
  --red: #E4493D;
  --orange: #F28C28;
  --yellow: #F2C230;
  --green: #3CB371;
  --blue: #2F7BD9;
  --violet: #7A4BD6;

  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --gutter: 16px;
  --measure: 62ch;
  --radius: 6px;
  --shadow-cover: 0 30px 60px -20px rgba(14, 31, 61, 0.45), 0 12px 24px -12px rgba(14, 31, 61, 0.25);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--navy); color: var(--cream); padding: .5rem .9rem;
  z-index: 100; font-weight: 600;
}
.skip-link:focus { top: var(--gutter); }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 242, 234, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 60px;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; font-family: var(--font-head); font-weight: 800;
  letter-spacing: -0.02em; font-size: 1rem; text-transform: uppercase;
}
.brand svg { width: 28px; height: 28px; }
.brand span { white-space: nowrap; }
.site-nav { display: flex; gap: 1.25rem; }
.site-nav a {
  text-decoration: none; font-weight: 600; font-size: .95rem;
  padding-block: .25rem; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--navy); }
@media (max-width: 480px) {
  .brand span { display: none; }
}

/* Stage colour stripe used as a thin rule */
.stripe {
  height: 4px; width: 100%;
  background: linear-gradient(90deg,
    var(--red) 0 20%, var(--orange) 20% 40%, var(--yellow) 40% 60%,
    var(--green) 60% 80%, var(--blue) 80% 100%);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 800; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; border: 2px solid var(--navy);
  padding: .9rem 1.5rem; border-radius: 999px; font-size: 1.02rem;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: var(--navy-soft); border-color: var(--navy-soft); }
.btn-primary:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn[aria-disabled="true"] { cursor: default; }

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  padding: .85rem 1.3rem; border-radius: 999px;
  border: 1.5px dashed var(--navy-soft); color: var(--navy-soft);
  background: transparent;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.buy-note {
  display: none; font-size: .9rem; color: var(--ink-muted); margin: .5rem 0 0;
}
.buy-note.is-visible { display: block; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem); }
.hero .wrap {
  display: grid; gap: 2.5rem; align-items: center;
}
@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 3rem; }
  .hero-copy { order: 1; }
  .hero-cover { order: 2; }
}
.eyebrow {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; font-size: .72rem; color: var(--ink-muted);
  display: flex; flex-wrap: wrap; gap: .4rem .6rem; margin-bottom: 1.4rem;
}
.eyebrow span + span::before { content: "|"; margin-right: .6rem; color: var(--line); }

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: .92;
}
.hero h1 .line2 { display: block; color: var(--blue); }
.hero .subtitle {
  font-size: clamp(1.1rem, 1.4vw + .6rem, 1.35rem);
  line-height: 1.45; margin-top: 1.5rem; max-width: 36ch;
}
.hero .authors {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; font-size: .85rem; margin-top: 1.4rem; color: var(--navy-soft);
}
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; align-items: center; }

.hero-cover { display: grid; place-items: center; perspective: 1400px; }
.cover-tilt {
  position: relative; width: min(100%, 380px);
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.cover-tilt img {
  width: 100%; height: auto; border-radius: 3px;
  box-shadow: var(--shadow-cover);
}
.cover-tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: 3px;
  background: linear-gradient(115deg, rgba(255,255,255,.18), transparent 45%);
  pointer-events: none;
}
.hero-cover:hover .cover-tilt { transform: rotateY(-9deg) rotateX(3deg) translateZ(10px); }
@media (prefers-reduced-motion: reduce) {
  .hero-cover:hover .cover-tilt { transform: none; }
  .cover-tilt { transition: none; }
}

/* Sections */
section { padding-block: clamp(3rem, 8vw, 6.5rem); }
section + section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: clamp(1.5rem, 4vw, 2.75rem); }
.section-head .kicker {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; font-size: .72rem; color: var(--ink-muted);
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: .9rem;
}
.section-head .kicker::before {
  content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--accent, var(--navy));
}
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); max-width: 18ch; }
.lede { font-size: clamp(1.15rem, 1.2vw + .7rem, 1.45rem); line-height: 1.45; }

/* Argument section */
.argument .wrap { display: grid; gap: 2rem; }
@media (min-width: 860px) {
  .argument .wrap { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; }
  .argument .section-head { position: sticky; top: 90px; margin-bottom: 0; }
}
.argument blockquote {
  margin: 0 0 1.5rem; padding-left: 1.25rem; border-left: 4px solid var(--orange);
  font-family: var(--font-head); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.2; max-width: 28ch;
}

/* Journey */
.journey { background: var(--cream-deep); }
.journey-path { width: 100%; height: auto; margin-block: 1rem 2rem; }
.journey-path .road { stroke-width: 14; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.journey-path .road-base { stroke: rgba(14,31,61,.08); }
.journey-path .draw {
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
}
.journey-path .node { opacity: 0; transition: opacity .4s ease; }
.journey-path.is-drawn .node { opacity: 1; }
.journey-path.is-drawn .node:nth-of-type(1) { transition-delay: .3s; }
.journey-path.is-drawn .node:nth-of-type(2) { transition-delay: .7s; }
.journey-path.is-drawn .node:nth-of-type(3) { transition-delay: 1.1s; }
.journey-path.is-drawn .node:nth-of-type(4) { transition-delay: 1.5s; }
.journey-path.is-drawn .node:nth-of-type(5) { transition-delay: 1.9s; }
.journey-path text {
  font-family: var(--font-head); font-weight: 800; font-size: 20px;
  text-transform: uppercase; letter-spacing: .04em; fill: var(--navy);
}
@media (max-width: 640px) { .journey-path text { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .journey-path .node { opacity: 1; transition: none; }
}
.journey-path.is-drawn .draw { animation: draw 2.2s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .journey-path .draw { stroke-dashoffset: 0; animation: none; }
}

.stages {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.5rem;
  counter-reset: stage;
}
@media (min-width: 640px) { .stages { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .stages { grid-template-columns: repeat(5, 1fr); gap: 1.25rem; } }
.stage { position: relative; padding-top: 1rem; border-top: 3px solid var(--c); }
.stage .icon {
  width: 44px; height: 44px; color: var(--c); margin-bottom: .9rem;
}
.stage .icon svg { width: 100%; height: 100%; }
.stage h3 {
  font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em;
  display: flex; align-items: baseline; gap: .6rem;
}
.stage h3::before {
  counter-increment: stage; content: counter(stage, decimal-leading-zero);
  font-size: .75rem; font-weight: 600; color: var(--ink-muted); letter-spacing: .1em;
}
.stage p { margin: .45rem 0 0; font-size: 1.02rem; color: var(--navy-soft); }
.stage-ai {
  margin-top: 2.5rem; padding: 1.25rem 1.5rem; border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; gap: 1rem; align-items: center;
  max-width: 720px; background: var(--cream);
}
.stage-ai svg { width: 40px; height: 40px; flex: 0 0 40px; color: var(--navy); }
.stage-ai p { margin: 0; font-size: 1.02rem; }

/* Who it's for */
.audience ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0;
  border-top: 1px solid var(--line);
}
.audience li {
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; align-items: start;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line);
}
.audience .num {
  font-family: var(--font-head); font-weight: 800; font-size: 1.6rem;
  letter-spacing: -0.03em; color: var(--c, var(--navy)); line-height: 1;
}
.audience h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.audience p { margin: 0; color: var(--navy-soft); font-size: 1.05rem; }
@media (min-width: 860px) {
  .audience .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: 4rem; }
  .audience .section-head { margin-bottom: 0; }
}

/* Inside the book */
.inside .wrap { display: grid; gap: 2rem; }
@media (min-width: 860px) {
  .inside .wrap { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; }
  .inside .section-head { margin-bottom: 0; }
}
.learn { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.learn li {
  display: grid; grid-template-columns: 28px 1fr; gap: .9rem; align-items: start;
  font-size: 1.1rem; line-height: 1.45;
}
.learn li svg { width: 28px; height: 28px; margin-top: .1rem; color: var(--c, var(--navy)); }
.learn strong { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.01em; }

/* Authors teaser and about page */
.authors-grid { display: grid; gap: 2.5rem; }
@media (min-width: 720px) { .authors-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.author { display: grid; gap: 1rem; }
.author-photo {
  width: 120px; height: 120px; border-radius: 50%;
  display: grid; place-items: center; position: relative; overflow: hidden;
  background: var(--navy); color: var(--cream);
  font-family: var(--font-head); font-weight: 800; font-size: 2.1rem; letter-spacing: -0.04em;
}
.author-photo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--violet));
}
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author h3 { font-size: 1.5rem; }
.author .role { color: var(--ink-muted); font-size: .95rem; margin: .25rem 0 0; font-weight: 600; }
.author p { font-size: 1.05rem; }
.author a { color: var(--blue); }
.teaser-link { display: inline-block; margin-top: 2rem; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.page-hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 4vw, 3rem); }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); max-width: 14ch; }
.page-hero .lede { margin-top: 1.25rem; }

.why { background: var(--cream-deep); }
.why .wrap { display: grid; gap: 2rem; }
@media (min-width: 860px) { .why .wrap { grid-template-columns: 5fr 7fr; gap: 4rem; } .why .section-head { margin-bottom: 0; } }

.cta-band { text-align: left; }
.cta-band .wrap { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 760px) { .cta-band .wrap { grid-template-columns: 1fr auto; } }
.cta-band h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); max-width: 22ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Gallery */
.cover-large { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .cover-large { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.cover-large img { width: min(100%, 520px); height: auto; box-shadow: var(--shadow-cover); border-radius: 3px; margin-inline: auto; }
.cover-large figcaption { font-size: .95rem; color: var(--ink-muted); margin-top: 1rem; text-align: center; }

.book3d-stage { display: grid; place-items: center; padding-block: 1.5rem; perspective: 1600px; }
.book3d {
  --w: min(300px, 70vw);
  --h: calc(var(--w) * 887 / 591);
  --d: 46px;
  position: relative; width: var(--w); height: var(--h);
  transform-style: preserve-3d;
  transform: rotateY(-28deg) rotateX(4deg);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.book3d-stage:hover .book3d { transform: rotateY(-18deg) rotateX(2deg); }
@media (prefers-reduced-motion: reduce) {
  .book3d, .book3d-stage:hover .book3d { transition: none; transform: rotateY(-28deg) rotateX(4deg); }
}
.book3d .face { position: absolute; inset: 0; backface-visibility: hidden; }
.book3d .front {
  transform: translateZ(calc(var(--d) / 2));
  border-radius: 2px 6px 6px 2px; overflow: hidden;
  box-shadow: 0 40px 70px -30px rgba(14,31,61,.6);
}
.book3d .front img { width: 100%; height: 100%; object-fit: cover; }
.book3d .front::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 14px;
  background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(255,255,255,.12) 50%, rgba(0,0,0,.08));
}
.book3d .spine {
  width: var(--d); left: 0; right: auto;
  transform: rotateY(-90deg) translateZ(calc(var(--d) / 2));
  transform-origin: center;
  background: var(--navy); color: var(--cream);
  display: grid; grid-template-rows: auto 1fr auto; align-items: center; justify-items: center;
  padding: 14px 0;
  border-radius: 3px 0 0 3px;
}
.book3d .spine .spine-title {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--font-head); font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; font-size: .72rem; line-height: 1; white-space: nowrap;
}
.book3d .spine .spine-authors {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--font-body); font-weight: 600; font-size: .6rem; letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap; opacity: .85;
}
.book3d .spine .spine-mark { width: 18px; height: 18px; }
.book3d .pages {
  left: auto; right: 0; width: calc(var(--d) - 4px);
  transform: rotateY(90deg) translateZ(calc(var(--w) - var(--d) / 2 - 2px));
  background: repeating-linear-gradient(90deg, #fbf8f2 0 2px, #e8e2d6 2px 3px);
}
.book3d .top {
  top: 0; bottom: auto; height: calc(var(--d) - 4px);
  transform: rotateX(90deg) translateZ(calc(var(--d) / 2 - 2px));
  background: repeating-linear-gradient(0deg, #fbf8f2 0 2px, #e8e2d6 2px 3px);
}
.book3d .back {
  transform: rotateY(180deg) translateZ(calc(var(--d) / 2));
  background: var(--navy); border-radius: 6px 2px 2px 6px;
}
.book3d-caption { text-align: center; font-size: .95rem; color: var(--ink-muted); margin-top: 1rem; }

.photo-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.photo-slot {
  background: #fff; padding: 10px 10px 2.6rem;
  box-shadow: 0 14px 30px -18px rgba(14,31,61,.45), 0 1px 2px rgba(14,31,61,.1);
  transform: rotate(var(--tilt, 0deg));
  border-radius: 2px;
}
.photo-slot:nth-child(odd) { --tilt: -1.2deg; }
.photo-slot:nth-child(even) { --tilt: 1.1deg; }
.photo-slot:nth-child(3n) { --tilt: .6deg; }
.photo-slot .frame {
  aspect-ratio: 1 / 1; background: var(--cream-deep);
  display: grid; place-items: center; position: relative; overflow: hidden;
  border: 1px dashed var(--line);
}
.photo-slot .frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .frame svg { width: 36px; height: 36px; color: var(--ink-muted); opacity: .7; }
.photo-slot .caption {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  font-size: .68rem; color: var(--ink-muted); text-align: center; margin: .9rem 0 0;
}

/* Contact */
.contact .wrap { display: grid; gap: 2rem; }
@media (min-width: 860px) { .contact .wrap { grid-template-columns: 5fr 7fr; gap: 4rem; } .contact .section-head { margin-bottom: 0; } }
.reasons { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; color: var(--navy-soft); }
.reasons li { display: flex; gap: .6rem; align-items: baseline; }
.reasons li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: 0 0 10px; transform: translateY(1px); }

form.contact-form { display: grid; gap: 1.1rem; max-width: 560px; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; font-size: .95rem; }
.field input, .field textarea {
  font: inherit; color: var(--navy); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: .8rem .9rem; width: 100%;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-fine { font-size: .9rem; color: var(--ink-muted); margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0; color: var(--ink-muted); }

/* Thanks page */
.thanks { min-height: 60vh; display: grid; align-content: center; }
.thanks h1 { font-size: clamp(2.2rem, 6vw, 4rem); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Real renders replace the CSS book */
.book-render, .book-jacket { margin: 0 auto; text-align: center; }
.book-render img { width: min(100%, 520px); height: auto; filter: drop-shadow(0 30px 40px rgba(14,31,61,.18)); }
.book-jacket { margin-top: 2.5rem; }
.book-jacket img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 24px 50px rgba(14,31,61,.16); }
.book-render figcaption, .book-jacket figcaption { font-size: .95rem; color: var(--ink-muted); margin-top: .9rem; }
.author-photo img { object-position: center 20%; }

.site-footer .powered-by { flex-basis: 100%; display: inline-flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--ink-muted); text-decoration: none; font-weight: 500; }
.site-footer .powered-by img { height: 13px; width: auto; display: block; filter: brightness(0) saturate(100%); opacity: .75; }
.site-footer .powered-by:hover img { opacity: 1; }
