/* Clara Fairweather — Paper Hedgerow Press
   Design tokens mirror the book: cut-paper collage, warm cream paper, six-colour palette. */
:root {
  --paper: #f6efe1;
  --paper-2: #efe4cf;
  --paper-3: #e7d9bf;
  --ink: #2f2622;
  --ink-soft: #5d4d43;
  --tomato: #c4543c;
  --tomato-deep: #a8432e;
  --mustard: #d6a23a;
  --sage: #93a88a;
  --sage-deep: #354f43;
  --blue: #7e9bb3;
  --white: #fffaf1;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Caveat", "Patrick Hand", cursive;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow-paper: 0 1px 0 rgba(47, 38, 34, .06), 0 10px 30px -12px rgba(47, 38, 34, .28);
  --shadow-lift: 0 30px 60px -25px rgba(47, 38, 34, .45), 0 12px 24px -12px rgba(47, 38, 34, .25);
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .18 0 0 0 0 .15 0 0 0 0 .13 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::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 { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--mustard); color: var(--ink); }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; margin: 0; font-optical-sizing: auto; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); font-variation-settings: "SOFT" 100, "WONK" 1; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-variation-settings: "SOFT" 100; }
h3 { font-size: 1.45rem; }
h1 em, h2 em { font-style: italic; color: var(--tomato); }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 36ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font: 600 .78rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--tomato-deep);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--white);
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95em 1.5em; border-radius: 999px; border: 0;
  background: var(--bg); color: var(--fg); text-decoration: none;
  font: 600 1rem/1 var(--font-body); cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(47, 38, 34, .6);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(47, 38, 34, .6); }
.btn:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
.btn--tomato { --bg: var(--tomato); }
.btn--tomato:hover { --bg: var(--tomato-deep); }
.btn--ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(47, 38, 34, .35); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn small { font-weight: 500; opacity: .75; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; transition: background .3s ease, box-shadow .3s ease; }
.nav.is-scrolled { background: rgba(246, 239, 225, .88); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(47, 38, 34, .08); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 18px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand__name { font: italic 500 1.5rem/1 var(--font-display); letter-spacing: -.01em; }
.brand__sub { font: 600 .66rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; font-weight: 500; font-size: .96rem; position: relative; }
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--tomato); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }
.nav__links .btn { padding: .7em 1.2em; font-size: .92rem; white-space: nowrap; }
@media (max-width: 820px) { .nav__links li:not(:last-child) { display: none; } }
@media (max-width: 420px) { .brand__sub { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(30px, 6vw, 70px) clamp(70px, 9vw, 120px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(30px, 6vw, 80px); }
.hero h1 { margin: 18px 0 22px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px; padding: 0; list-style: none; color: var(--ink-soft); font-size: .93rem; }
.hero__facts li { display: flex; align-items: center; gap: 8px; }
.hero__facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.hero__facts li:nth-child(2)::before { background: var(--mustard); }
.hero__facts li:nth-child(3)::before { background: var(--tomato); }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } .hero__art { order: -1; max-width: 460px; margin-inline: auto; } }

/* 3D book mockup */
.book { position: relative; perspective: 1600px; padding: 6% 7% 9%; max-width: 520px; margin-inline: auto; }
.book__blob { position: absolute; inset: 4% 0 8% 4%; background: var(--paper-3); border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; z-index: 0; }
.book__blob::after { content: ""; position: absolute; inset: 9% -4% -6% 10%; border-radius: 55% 45% 60% 40% / 45% 55% 45% 55%; background: rgba(147, 168, 138, .35); z-index: -1; }
.book__obj {
  position: relative; z-index: 1; transform: rotateY(-20deg) rotateX(4deg) rotate(-1.5deg);
  transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2, .7, .2, 1);
  border-radius: 3px 8px 8px 3px; box-shadow: var(--shadow-lift);
}
.book:hover .book__obj { transform: rotateY(-8deg) rotateX(2deg) rotate(-.5deg); }
.book__obj img { border-radius: 3px 8px 8px 3px; }
.book__obj::before { /* spine crease */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 7%;
  background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(255,255,255,.18) 35%, rgba(0,0,0,.08) 60%, transparent);
  border-radius: 3px 0 0 3px; z-index: 2;
}
.book__obj::after { /* page edges */
  content: ""; position: absolute; top: 1.5%; bottom: 1.5%; right: -10px; width: 12px;
  background: repeating-linear-gradient(0deg, #fffaf1 0 2px, #e8dcc6 2px 3px);
  transform: rotateY(60deg); transform-origin: left; border-radius: 0 3px 3px 0;
}
.book__cat { position: absolute; z-index: 3; width: 22%; right: -4%; bottom: 2%; filter: drop-shadow(0 10px 12px rgba(47,38,34,.25)); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }

/* ---------- torn paper edges ---------- */
.torn { position: relative; }
.torn::before, .torn::after { content: ""; position: absolute; left: 0; right: 0; height: 26px; background: inherit; z-index: 1; }
.torn::before { top: -25px; clip-path: polygon(0 60%, 4% 35%, 9% 55%, 14% 30%, 20% 50%, 26% 28%, 31% 52%, 37% 34%, 43% 58%, 49% 30%, 55% 49%, 61% 27%, 67% 54%, 73% 33%, 79% 57%, 85% 31%, 91% 52%, 96% 36%, 100% 55%, 100% 100%, 0 100%); }
.torn::after { bottom: -25px; clip-path: polygon(0 0, 100% 0, 100% 45%, 95% 66%, 90% 44%, 84% 70%, 78% 47%, 72% 68%, 66% 42%, 60% 70%, 54% 48%, 48% 72%, 42% 45%, 36% 67%, 30% 43%, 24% 69%, 18% 46%, 12% 71%, 6% 48%, 0 65%); }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding-block: clamp(80px, 11vw, 140px); }
.section__head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section__head p { color: var(--ink-soft); font-size: 1.12rem; margin-top: 16px; }
.center { text-align: center; margin-inline: auto; }
.center .eyebrow::after { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }

/* inside the book: scroll-snap carousel */
.inside { background: var(--paper-2); }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 900px); gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--gutter) 30px; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.spread { scroll-snap-align: center; margin: 0; }
.spread__img { position: relative; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-paper); background: var(--paper-3); aspect-ratio: 1.97; }
.spread__img img { width: 100%; height: 100%; object-fit: cover; }
.spread__img::after { content: ""; position: absolute; inset: 0 auto 0 50%; width: 40px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(0,0,0,.10) 45%, rgba(255,255,255,.12) 55%, transparent); pointer-events: none; }
.spread figcaption { margin-top: 16px; font: italic 400 1.12rem/1.5 var(--font-display); color: var(--ink-soft); max-width: 62ch; }
.spread figcaption span { display: block; font: 600 .74rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; font-style: normal; color: var(--tomato-deep); margin-bottom: 8px; }
.carousel__nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: -10px; }
.carousel__nav button { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(47,38,34,.3); background: var(--white); cursor: pointer; font-size: 1.2rem; transition: background .2s, border-color .2s; }
.carousel__nav button:hover { border-color: var(--ink); background: var(--paper); }

/* seasons */
.seasons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.season { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; box-shadow: var(--shadow-paper); isolation: isolate; }
.season img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.season:hover img { transform: scale(1.05); }
.season::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(35, 28, 24, .72)); z-index: 1; }
.season__label { position: absolute; left: 18px; bottom: 16px; z-index: 2; color: var(--white); }
.season__label strong { display: block; font: italic 500 1.7rem/1 var(--font-display); }
.season__label span { font-size: .9rem; opacity: .9; }
@media (max-width: 860px) { .seasons { grid-template-columns: repeat(2, 1fr); } }

/* characters */
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 34px); align-items: start; }
.member { text-align: center; }
.member__art { height: 340px; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(closest-side, var(--paper-3), transparent 72%) no-repeat 50% 88% / 90% 40%; }
.member__art img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 14px 14px rgba(47,38,34,.18)); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.member:hover .member__art img { transform: translateY(-8px) rotate(-1.5deg); }
.member--cat .member__art { height: 340px; overflow: visible; }
.member--cat .member__art img { height: 55%; }
.member h3 { margin-top: 18px; }
.member p { color: var(--ink-soft); max-width: 30ch; margin: 8px auto 0; }
@media (max-width: 760px) { .cast { grid-template-columns: 1fr; } .member__art { height: 260px; } }

/* keepsake */
.keepsake__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.page-mock { position: relative; aspect-ratio: 1; background: #f8f1e2 var(--grain); border-radius: 4px; box-shadow: var(--shadow-lift); display: grid; place-content: center; text-align: center; padding: 12%; transform: rotate(2deg); }
.page-mock::before { content: ""; position: absolute; inset: 0; border-radius: 4px; background: linear-gradient(90deg, rgba(0,0,0,.1), transparent 8%); }
.page-mock p { font: 400 clamp(1.1rem, 2.4vw, 1.7rem)/1.3 var(--font-display); margin: 0; }
.page-mock .hand { font: 700 clamp(2.2rem, 5vw, 3.6rem)/1 var(--font-hand); color: var(--tomato); padding: 18px 10px 8px; border-bottom: 2px dashed rgba(47,38,34,.35); margin: 14px auto 18px; min-width: 70%; }
.page-mock .sig { font: 600 clamp(1.4rem, 3vw, 2.1rem)/1 var(--font-hand); color: var(--sage-deep); margin-top: 16px; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--ink-soft); }
.ticks li::before { content: "✓"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sage); color: var(--white); font-weight: 700; font-size: .85rem; }
.ticks strong { color: var(--ink); }
@media (max-width: 860px) { .keepsake__grid { grid-template-columns: 1fr; } .page-mock { max-width: 440px; margin-inline: auto; } }

/* free colouring page */
.gift { background: var(--sage-deep); color: var(--paper); }
.gift__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.gift .eyebrow { color: var(--mustard); }
.gift h2 em { color: var(--mustard); }
.gift p { color: rgba(246, 239, 225, .82); }
.gift__sheet { position: relative; background: #fff; border-radius: 4px; padding: 5%; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); transform: rotate(-3deg); max-width: 380px; margin-inline: auto; }
.gift__sheet::after { content: ""; position: absolute; width: 90px; height: 28px; top: -12px; left: calc(50% - 45px); background: rgba(214, 162, 58, .75); transform: rotate(-4deg); }
.signup { margin-top: 28px; display: grid; gap: 14px; max-width: 520px; }
.signup__row { display: flex; gap: 10px; background: var(--paper); padding: 6px; border-radius: 999px; }
.signup input[type="email"] { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 18px; font: 500 1rem var(--font-body); color: var(--ink); }
.signup input[type="email"]::placeholder { color: #8b7b70; }
.signup input[type="email"]:focus { outline: none; }
.signup__row:focus-within { box-shadow: 0 0 0 3px var(--mustard); }
.signup label.consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: .88rem; color: rgba(246, 239, 225, .78); line-height: 1.5; }
.signup label.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--mustard); }
.signup label.consent a { color: var(--paper); }
.signup .hp { position: absolute; left: -9999px; }
.signup__msg { min-height: 1.5em; font-weight: 600; }
.signup__msg.ok { color: var(--mustard); }
.signup__msg.err { color: #ffb4a3; }
.signup__msg a { color: var(--paper); }
@media (max-width: 860px) { .gift__grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .signup__row { flex-direction: column; border-radius: 22px; } .signup input[type="email"] { padding: 14px; } .signup__row .btn { justify-content: center; } }

/* about */
.about__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(30px, 6vw, 80px); align-items: start; }
.about blockquote { margin: 22px 0 0; font: italic 400 clamp(1.5rem, 2.8vw, 2.2rem)/1.3 var(--font-display); }
.about blockquote::before { content: "“"; display: block; font-size: 4rem; line-height: .6; color: var(--tomato); margin-bottom: 10px; }
.about p { color: var(--ink-soft); }
.note { margin-top: 26px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--paper-2); font-size: .94rem; color: var(--ink-soft); border-left: 3px solid var(--sage); }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } }

/* final cta */
.finale { text-align: center; }
.finale .hero__ctas { justify-content: center; }
.finale__cover { width: min(260px, 60vw); margin: 0 auto 34px; transform: rotate(-3deg); box-shadow: var(--shadow-lift); border-radius: 3px 8px 8px 3px; }

/* footer */
.footer { background: var(--ink); color: rgba(246, 239, 225, .78); padding-block: 56px 40px; font-size: .92rem; }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-end; }
.footer .brand__name { color: var(--paper); }
.footer .brand__sub { color: rgba(246, 239, 225, .6); }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--paper); text-decoration: underline; }
.footer__legal { margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(246, 239, 225, .14); font-size: .82rem; color: rgba(246, 239, 225, .55); }

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

/* legal pages */
.legal { padding-block: 60px 100px; max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 24px; }
.legal h2 { font-size: 1.5rem; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); }
