/* ==========================================================
   You Matter! — Michael Carrera
   White + autumn orange, taken from the book cover.
   ========================================================== */

:root {
  --orange: #E8681C;        /* cover foliage */
  --orange-deep: #C2410C;   /* buttons / text accents (AA on white) */
  --amber: #F4A43A;
  --gold: #F7C873;
  --brown: #3A1A0F;         /* author name on cover */
  --brown-2: #5A2A17;
  --ink: #1E1916;
  --muted: #6B625C;
  --line: #ECE4DC;
  --cream: #FBF7F2;
  --white: #FFFFFF;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 30px 60px -25px rgba(58, 26, 15, .35);
  --wrap: 1180px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--orange-deep); }
h1, h2, h3 { line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
@media (min-width: 720px) { .wrap { width: min(100% - 64px, var(--wrap)); } }

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

.leaf { width: 1em; height: 1em; color: var(--orange); flex: none; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--orange-deep); margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.eyebrow--light { color: var(--gold); }
.h2 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; margin-bottom: 22px; }
.accent { color: var(--orange-deep); }
.accent-light { color: var(--gold); }
.lead { font-size: 19px; color: var(--ink); }
.link { font-weight: 600; text-decoration: none; border-bottom: 2px solid rgba(194, 65, 12, .25); transition: border-color .2s; }
.link:hover { border-color: var(--orange-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 16px/1 var(--font); letter-spacing: .01em;
  padding: 17px 28px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--amber); outline-offset: 3px;
}
.btn--primary { background: var(--orange-deep); color: #fff; box-shadow: 0 12px 24px -10px rgba(194, 65, 12, .6); }
.btn--primary:hover { background: #A8380A; box-shadow: 0 16px 30px -10px rgba(194, 65, 12, .7); }
.btn--ghost { color: var(--ink); border-color: var(--line); background: #fff; }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: #fff; color: var(--brown); }
.btn--light:hover { background: var(--gold); }
.btn--sm { padding: 11px 20px; font-size: 14px; }
.btn--lg { padding: 20px 38px; font-size: 18px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0,0,0,.3); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--brown); text-decoration: none; letter-spacing: -.01em; }
.brand .leaf { font-size: 24px; }
.nav__links { margin-left: auto; display: flex; gap: 34px; }
.nav__links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform .25s; transform-origin: left; }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; }
.nav__toggle span { display: block; height: 2px; background: var(--ink); margin: 6px 0; transition: transform .25s; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu { border-top: 1px solid var(--line); background: #fff; padding: 8px 16px 18px; }
.mobile-menu a { display: block; padding: 14px 4px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }

@media (max-width: 760px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% 20%, rgba(244, 164, 58, .14), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  padding: clamp(40px, 7vw, 90px) 0 clamp(60px, 8vw, 110px);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; position: relative; z-index: 2; }
.hero__title {
  font-size: clamp(64px, 11vw, 140px); font-weight: 900; letter-spacing: -0.045em; line-height: .9;
  color: var(--brown); margin-bottom: 22px; text-transform: uppercase;
}
.hero__title span { display: block; color: var(--orange-deep);
  background: linear-gradient(100deg, var(--orange-deep) 0%, var(--orange) 55%, var(--amber) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__tagline { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; color: var(--brown-2); margin-bottom: 18px; }
.hero__lede { font-size: 18px; color: var(--muted); max-width: 30em; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { order: 2; }
  .hero__lede { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero .eyebrow::before { display: none; }
}

/* ---------- 3D book ---------- */
.stage { position: relative; display: grid; place-items: center; padding: 30px 0 10px; user-select: none; -webkit-user-select: none; }
.stage__glow { position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(232,104,28,.28), rgba(244,164,58,.12) 45%, transparent 70%); filter: blur(10px); z-index: 0; }
.book-scene {
  --w: clamp(190px, 25vw, 310px);
  --h: calc(var(--w) * 1.5);
  --t: calc(var(--w) * .1);
  width: var(--w); height: var(--h);
  perspective: 1600px;
  cursor: grab; touch-action: pan-y;
  position: relative; z-index: 1;
}
.book-scene.is-dragging { cursor: grabbing; }
.book { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.book__face { position: absolute; left: 50%; top: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.book__face img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.book__front, .book__back { width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2); }
.book__front { transform: translateZ(calc(var(--t) / 2)); border-radius: 0 4px 4px 0; overflow: hidden; }
.book__front::after { /* subtle hinge crease + sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.18) 0, rgba(255,255,255,.25) 1.2%, rgba(0,0,0,.08) 2.6%, transparent 5%),
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%);
}
.book__back { transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); border-radius: 0 4px 4px 0; overflow: hidden; }
.book__spine { width: var(--t); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--t) / -2); transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); }
.book__pages { background: #F7F1E8; }
.book__pages--side {
  width: var(--t); height: calc(var(--h) - 4px); margin: calc(var(--h) / -2 + 2px) 0 0 calc(var(--t) / -2);
  transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 2px));
  background: repeating-linear-gradient(90deg, #F8F3EB 0 1px, #E6DCCD 1px 2px), #F7F1E8;
  box-shadow: inset 0 0 8px rgba(0,0,0,.12);
}
.book__pages--top, .book__pages--bottom {
  width: calc(var(--w) - 2px); height: var(--t); margin: calc(var(--t) / -2) 0 0 calc(var(--w) / -2);
  background: repeating-linear-gradient(0deg, #F8F3EB 0 1px, #E6DCCD 1px 2px), #F7F1E8;
}
.book__pages--top { transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - 1px)); }
.book__pages--bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2 - 1px)); }
.stage__shadow { width: calc(clamp(190px, 25vw, 310px) * 1.1); height: 28px; margin-top: 26px; border-radius: 50%; background: radial-gradient(closest-side, rgba(58,26,15,.35), transparent); filter: blur(4px); position: relative; z-index: 0; }
.stage__hint { margin: 14px 0 0; font-size: 13px; color: var(--muted); letter-spacing: .04em; display: flex; gap: 8px; align-items: center; }

/* Falling leaves */
.leaves { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.leaves svg { position: absolute; top: -40px; animation: fall linear infinite; opacity: .85; }
@keyframes fall {
  0%   { transform: translate3d(0, -40px, 0) rotate(0deg); }
  25%  { transform: translate3d(40px, 25vh, 0) rotate(120deg); }
  50%  { transform: translate3d(-20px, 50vh, 0) rotate(220deg); }
  75%  { transform: translate3d(50px, 75vh, 0) rotate(320deg); }
  100% { transform: translate3d(0, 105vh, 0) rotate(420deg); opacity: 0; }
}

/* ---------- Mantra strip ---------- */
.mantra { background: var(--brown); color: #fff; padding: 30px 0; }
.mantra__inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 30px; text-align: center; }
.mantra p { margin: 0; font-weight: 800; font-size: clamp(18px, 2.4vw, 26px); letter-spacing: -.01em; }
.mantra p:last-child { color: var(--gold); }
.mantra .leaf { font-size: 20px; color: var(--orange); }
@media (max-width: 640px) { .mantra .leaf { display: none; } .mantra__inner { flex-direction: column; gap: 6px; } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 130px) 0; }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.prose p { font-size: 18px; color: #3b3430; }
.pull {
  margin: 30px 0 0; padding: 4px 0 4px 26px; border-left: 4px solid var(--orange);
  font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.35; color: var(--brown);
}

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: clamp(50px, 7vw, 80px); }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 32px 34px;
  box-shadow: 0 14px 34px -24px rgba(58, 26, 15, .35);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
}
.card::before { /* orange accent bar */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, var(--orange-deep), var(--orange) 55%, var(--amber));
  transform: scaleX(.22); transform-origin: left; transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.card::after { /* faint maple leaf watermark */
  content: ""; position: absolute; right: -34px; bottom: -34px; width: 150px; height: 150px; z-index: -1;
  background: url("../img/favicon.svg") center / contain no-repeat;
  opacity: .07; transform: rotate(-18deg); transition: transform .6s, opacity .4s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(232, 104, 28, .35); }
.card:hover::before { transform: scaleX(1); }
.card:hover::after { opacity: .14; transform: rotate(-4deg) scale(1.06); }
.card__icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 24px;
  border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange-deep));
  box-shadow: 0 10px 20px -10px rgba(194, 65, 12, .7);
}
.card__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 22px; margin-bottom: 10px; color: var(--brown); }
.card p { margin: 0; color: var(--muted); }

/* ---------- Author ---------- */
.author { background: var(--cream); }
.author__inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(36px, 7vw, 100px); align-items: center; }
@media (max-width: 860px) { .author__inner { grid-template-columns: 1fr; } }
.author__photo { margin: 0; position: relative; max-width: 460px; justify-self: center; width: 100%; }
.author__photo::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--amber), var(--orange-deep));
}
.author__photo img { position: relative; border-radius: var(--radius); width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; box-shadow: var(--shadow); }
.author__copy p { color: #3b3430; }
.also { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.also__title { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.also__list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.also__list li { padding-left: 26px; position: relative; font-size: 16px; }
.also__list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 2px; background: var(--orange); }
.also__links { display: flex; flex-wrap: wrap; gap: 22px; }

/* ---------- Buy ---------- */
.buy { padding-top: clamp(72px, 10vw, 130px); }
.buy__card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(30px, 6vw, 80px);
  padding: clamp(36px, 6vw, 80px);
  border-radius: 28px; color: #fff;
  background:
    radial-gradient(700px 400px at 0% 100%, rgba(244,164,58,.35), transparent 60%),
    linear-gradient(135deg, #C2410C 0%, #9A3412 55%, var(--brown) 100%);
}
.buy__card::after { /* big leaf watermark */
  content: ""; position: absolute; right: -60px; top: -60px; width: 340px; height: 340px; opacity: .08;
  background: url("../img/favicon.svg") center / contain no-repeat;
  filter: brightness(10);
}
.buy__visual { display: grid; place-items: center; perspective: 1200px; }
.buy__cover {
  width: min(320px, 80%); border-radius: 3px 6px 6px 3px;
  transform: rotateY(-18deg) rotateX(4deg);
  box-shadow: -2px 0 0 rgba(0,0,0,.15), 30px 40px 60px -20px rgba(0,0,0,.55);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.buy__card:hover .buy__cover { transform: rotateY(-6deg) rotateX(2deg) scale(1.02); }
.buy__copy { position: relative; z-index: 1; }
.buy__copy .h2 { color: #fff; }
.buy__meta { color: rgba(255,255,255,.75); font-weight: 600; letter-spacing: .02em; margin-bottom: 10px; }
.buy__price { font-size: 44px; font-weight: 900; letter-spacing: -.02em; margin: 6px 0 18px; }
.ticks { list-style: none; padding: 0; margin: 14px 0 32px; display: grid; gap: 12px; }
.ticks li { padding-left: 34px; position: relative; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 900; background: rgba(255,255,255,.18); color: var(--gold);
}
.ticks a { color: var(--gold); font-weight: 700; }
.buy__secure { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 0; font-size: 14px; color: rgba(255,255,255,.75); max-width: 30em; }
.buy__secure svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--gold); }
@media (max-width: 860px) {
  .buy__card { grid-template-columns: 1fr; text-align: center; }
  .buy__copy .eyebrow::before { display: none; }
  .ticks { text-align: left; max-width: 420px; margin-inline: auto; margin-bottom: 30px; }
  .buy__secure { justify-content: center; margin-inline: auto; text-align: left; }
}

/* ---------- Contact ---------- */
.contact__list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.contact__list li { display: flex; gap: 14px; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.contact__list span { width: 96px; flex: none; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact__list a { font-weight: 600; text-decoration: none; }
.form { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 8px; font-weight: 600; font-size: 14px; color: var(--brown); }
.form input, .form select, .form textarea {
  font: 400 16px/1.4 var(--font); color: var(--ink); width: 100%;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(232,104,28,.15); outline: none; }
.form textarea { resize: vertical; min-height: 130px; }
.form .btn { justify-self: start; }
.form__status { margin: 0; font-weight: 600; min-height: 1.4em; }
.form__status.is-error { color: #B42318; }
.form__status.is-ok { color: #1E7A44; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.footer { background: var(--brown); color: rgba(255,255,255,.7); padding: 40px 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.brand--light { color: #fff; }
.footer__links { display: flex; gap: 26px; }
.footer__links a { color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
.footer__links a:hover { color: var(--gold); }
.footer__copy { margin: 0 0 0 auto; font-size: 14px; }
@media (max-width: 700px) { .footer__copy { margin-left: 0; width: 100%; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .leaves { display: none; }
  .btn, .card, .buy__cover { transition: none; }
}
