/*
 * KindWoods base styles: tokens, chrome, generated-asset UI primitives.
 * Every visual surface is a Higgsfield-generated asset; CSS only positions,
 * sizes, layers and keeps text inside the art.
 */
:root {
  /* Sunlit storybook theme */
  --forest-ink: #103c2c;
  --forest-text: #203b2c;
  --bark-text: #4a321d;
  --cream: #fffdf5;
  --focus: #ffd35f;
  --focus-ring: #1f8f57;
  --parchment: rgba(255, 251, 235, 0.9);
  --parchment-strong: rgba(255, 253, 244, 0.97);
  --parchment-border: rgba(83, 66, 38, 0.24);
  --leaf-muted: #527b2d;
  --sprout: #2f8f57;
  --sunbeam: #ffd35f;
  --berry: #c84f5f;
  --sky: #3d8ec4;
  --danger: #a63d31;
  --success: #24784a;

  /* Cohesive storybook materials */
  --canopy-900: #103828;
  --canopy-800: #164834;
  --moss-700: #2e6f42;
  --moss-600: #3f8a4b;
  --moss-300: #b8d99a;
  --meadow-100: #eef7db;
  --wood-800: #5b3218;
  --wood-700: #714016;
  --wood-600: #96592a;
  --wood-500: #b66f36;
  --honey-500: #e0ad43;
  --honey-300: #ffe29a;
  --paper-50: #fff9e8;
  --paper-100: #fff1c9;
  --paper-200: #f5e3ad;
  --berry-700: #8f382b;
  --surface-paper: rgba(255, 246, 210, 0.95);
  --surface-paper-strong: rgba(255, 250, 226, 0.98);
  --surface-moss: rgba(239, 247, 219, 0.94);
  --surface-border: rgba(91, 50, 24, 0.32);
  --surface-border-strong: rgba(91, 50, 24, 0.46);
  --surface-shadow: 0 0.32rem 0.55rem rgba(37, 58, 31, 0.2);
  --surface-shadow-soft: 0 0.18rem 0.34rem rgba(62, 44, 21, 0.14);

  /* Shared panels */
  --glass-bg: var(--surface-paper);
  --glass-border: var(--surface-border);
  --glass-shadow: var(--surface-shadow);

  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-story: "Lora", Georgia, serif;

  /*
   * Generated-asset urls live here (not in the generated assets.css)
   * because Chrome resolves var() url()s against the stylesheet that
   * uses them; every stylesheet sits in /css/, so ../assets works on
   * every page depth.
   */
  --kw-ui-nav-plaque-uniform: url("../assets/higgsfield/generated/kw-ui-nav-plaque-uniform.png?v=20260626");
  --kw-ui-brand-icon: url("../assets/higgsfield/generated/kw-ui-brand-icon.png?v=20260626");
  --kw-ui-wood-sign-primary: url("../assets/higgsfield/generated/kw-ui-wood-sign-primary.png?v=20260626");
  --kw-ui-wood-sign-secondary: url("../assets/higgsfield/generated/kw-ui-wood-sign-secondary.png?v=20260626");
  --kw-ui-leaf-badge: url("../assets/higgsfield/generated/kw-ui-leaf-badge.png?v=20260626");
  --kw-ui-acorn-age-badge: url("../assets/higgsfield/generated/kw-ui-acorn-age-badge.png?v=20260626");
  --kw-ui-log-sign-row: url("../assets/higgsfield/generated/kw-ui-log-sign-row.png?v=20260626");
  --kw-ui-book-card-gold: url("../assets/higgsfield/generated/kw-ui-book-card-gold.png?v=20260626");
  --kw-ui-book-card-green: url("../assets/higgsfield/generated/kw-ui-book-card-green.png?v=20260626");
  --kw-ui-book-card-lavender: url("../assets/higgsfield/generated/kw-ui-book-card-lavender.png?v=20260626");
  --kw-ui-book-card-red: url("../assets/higgsfield/generated/kw-ui-book-card-red.png?v=20260626");
  --kw-ui-story-card-holder-green: url("../assets/higgsfield/generated/kw-ui-story-card-holder-green.png?v=20260626");
  --kw-ui-story-card-holder-lavender: url("../assets/higgsfield/generated/kw-ui-story-card-holder-lavender.png?v=20260626");
  --kw-ui-story-card-holder-red: url("../assets/higgsfield/generated/kw-ui-story-card-holder-red.png?v=20260626");
  --kw-ui-open-book-frame: url("../assets/higgsfield/generated/kw-ui-open-book-frame.png?v=20260626");
  --kw-ui-conversation-scroll: url("../assets/higgsfield/generated/kw-ui-conversation-scroll.png?v=20260626");
  --kw-ui-dialogue-bubble: url("../assets/higgsfield/generated/kw-ui-dialogue-bubble.png?v=20260626");
  --kw-ui-dialogue-bubble-left: url("../assets/higgsfield/generated/kw-ui-dialogue-bubble-left.png?v=20260626");
  --kw-ui-dialogue-bubble-right: url("../assets/higgsfield/generated/kw-ui-dialogue-bubble-right.png?v=20260626");
  --kw-ui-profile-progress-panel: url("../assets/higgsfield/generated/kw-ui-profile-progress-panel.png?v=20260626");
  --kw-ui-library-shelf-panel: url("../assets/higgsfield/generated/kw-ui-library-shelf-panel.png?v=20260626");
  --kw-ui-admin-ledger-panel: url("../assets/higgsfield/generated/kw-ui-admin-ledger-panel.png?v=20260626");
  --kw-next-character-grove: url("../assets/higgsfield/generated/kw-next-character-grove.png?v=20260626");
  --kw-next-oreo-guide-card: url("../assets/higgsfield/generated/kw-next-oreo-guide-card.png?v=20260626");
  --kw-next-caramel-guide-card: url("../assets/higgsfield/generated/kw-next-caramel-guide-card.png?v=20260626");
  --kw-next-pricing-hollow-canvas: url("../assets/higgsfield/generated/kw-next-pricing-hollow-canvas.png?v=20260626");
  --kw-product-profile-canvas: url("../assets/higgsfield/generated/kw-product-profile-canvas.png?v=20260626");
  --kw-product-library-canvas: url("../assets/higgsfield/generated/kw-product-library-canvas.png?v=20260626");
  --kw-product-admin-canvas: url("../assets/higgsfield/generated/kw-product-admin-canvas.png?v=20260626");
  --kw-section-family-creek: url("../assets/higgsfield/generated/kw-section-family-creek.png?v=20260626");
  --kw-section-professional-hollow: url("../assets/higgsfield/generated/kw-section-professional-hollow.png?v=20260626");
  --kw-unified-guide-grove-canvas: url("../assets/higgsfield/generated/unified/kw-unified-guide-grove-canvas-v2.png?v=20260626");
  --kw-unified-reflection-creek-canvas: url("../assets/higgsfield/generated/unified/kw-unified-reflection-creek-canvas-v3.png?v=20260626");
  --kw-unified-library-market-canvas: url("../assets/higgsfield/generated/unified/kw-unified-library-market-canvas-v2.png?v=20260626");
  --kw-unified-pricing-hollow-canvas: url("../assets/higgsfield/generated/unified/kw-unified-pricing-hollow-canvas-v3.png?v=20260626");
  --kw-video-hero-poster: url("../assets/higgsfield/generated/kw-env-sunlit-clearing.png?v=20260626");
  --kw-video-reflection-poster: var(--kw-unified-reflection-creek-canvas);
  --kw-section-overlap: clamp(10rem, 15vw, 14rem);
  --kw-section-fade: clamp(10rem, 14vw, 13rem);
  --kw-footer-overlap: clamp(30rem, 38vw, 36rem);
  --kw-tier-book-red-stump: url("../assets/higgsfield/generated/kw-tier-book-red-stump.png?v=20260626");
  --kw-tier-book-green-stump: url("../assets/higgsfield/generated/kw-tier-book-green-stump.png?v=20260626");
  --kw-tier-book-purple-stump: url("../assets/higgsfield/generated/kw-tier-book-purple-stump.png?v=20260626");
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  overflow-x: clip;
  overflow-y: auto;
  scroll-behavior: smooth;
  background: var(--forest-ink);
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--forest-text);
  background: var(--forest-ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

main {
  flex: 1 0 auto;
}

html.nav-open {
  overflow: hidden;
}

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

button,
a {
  font: inherit;
}

button,
a,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

::selection {
  color: #102c20;
  background: rgba(255, 232, 132, 0.72);
}

:focus-visible {
  outline: 0.18rem solid var(--focus-ring);
  outline-offset: 0.16rem;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 80;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  clip: auto;
  color: var(--forest-ink);
  background: var(--cream);
  outline: 0.22rem solid var(--focus-ring);
  box-shadow: 0 0 0 0.18rem rgba(255, 240, 163, 0.72);
}

/* ---------- fixed forest nav ---------- */

.forest-nav {
  position: fixed;
  z-index: 50;
  top: clamp(0.65rem, 1.2vw, 1rem);
  left: clamp(0.7rem, 2vw, 1.75rem);
  right: clamp(0.7rem, 2vw, 1.75rem);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.forest-nav a,
.forest-nav button {
  pointer-events: auto;
}

.brand-mark,
.branch-nav a,
.branch-nav button,
.map-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  aspect-ratio: 870 / 515;
  background: var(--kw-ui-nav-plaque-uniform) center / contain no-repeat;
  border: 0;
  color: #fff6cc;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(82, 47, 18, 0.58);
  transition: filter 250ms cubic-bezier(0.4, 0, 0.2, 1), transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 250ms ease;
}

.brand-mark {
  width: clamp(9rem, 13vw, 11.2rem);
  padding: 0.08rem 1.1rem 0.34rem;
  color: #2b1402;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.08;
  text-shadow: 0 1px 0 rgba(255, 243, 191, 0.9), 0 0.06rem 0.1rem rgba(0, 0, 0, 0.1);
}

.brand-mark span {
  color: inherit;
  -webkit-text-fill-color: currentColor;
  transition: filter 250ms ease;
}

.brand-mark:hover span,
.brand-mark:focus-visible span {
  filter: drop-shadow(0 0 0.35rem rgba(255, 230, 150, 0.42));
}

.branch-nav {
  display: flex;
  gap: clamp(0.35rem, 0.8vw, 0.7rem);
  padding: 0;
}

.branch-nav a,
.branch-nav button {
  width: clamp(5.45rem, 6.5vw, 6.7rem);
  padding-bottom: 0.25rem;
  color: #37210f;
  font-size: clamp(0.74rem, 0.9vw, 0.9rem);
  text-shadow: 0 1px 0 rgba(255, 243, 189, 0.62);
}

.brand-mark:hover,
.brand-mark:focus-visible,
.branch-nav a:hover,
.branch-nav a:focus-visible,
.branch-nav button:hover,
.branch-nav button:focus-visible,
.map-toggle:hover,
.map-toggle:focus-visible {
  filter: saturate(1.06) brightness(1.05);
  transform: translateY(-0.12rem);
}

.brand-mark:hover,
.brand-mark:focus-visible {
  filter: saturate(1.15) brightness(1.1) drop-shadow(0 4px 12px rgba(255, 230, 150, 0.35));
  transform: translateY(-0.2rem) scale(1.03);
}

.brand-mark:focus-visible,
.branch-nav a:focus-visible,
.branch-nav button:focus-visible,
.map-toggle:focus-visible {
  outline: 0.16rem solid var(--focus-ring);
  outline-offset: -0.2rem;
  filter: brightness(1.06) drop-shadow(0 0 0.18rem var(--focus));
}

.branch-nav a[aria-current="page"],
.branch-nav button[aria-current="page"] {
  filter: saturate(1.12) brightness(1.03);
  color: #1f3a1c;
}

.map-toggle {
  display: none;
  width: 5.2rem;
  padding-bottom: 0.24rem;
  color: #37210f;
  font-size: 0.95rem;
  text-shadow: 0 1px 0 rgba(255, 243, 189, 0.62);
}

/* ---------- section scaffolding ---------- */

.kw-canvas-section {
  position: relative;
  display: flex;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(7.4rem, 11vw, 9.6rem) clamp(1rem, 4.4vw, 5.25rem) clamp(5rem, 8vw, 7.5rem);
}

.kw-canvas-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 252, 227, 0.38), rgba(255, 252, 227, 0) 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(26, 63, 39, 0.08));
}

.home-flow .kw-canvas-section {
  margin-top: calc(var(--kw-section-overlap) * -1);
  padding-top: calc(clamp(7.4rem, 11vw, 9.6rem) + var(--kw-section-overlap));
  background-color: transparent;
  pointer-events: none;
}

.home-flow .kw-canvas-section > * {
  pointer-events: auto;
}

.home-flow .kw-canvas-section .asset-layer {
  pointer-events: none;
}

.home-flow .kw-canvas-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--kw-canvas-bg);
  background-repeat: no-repeat;
  background-position: var(--kw-canvas-position, center);
  background-size: cover;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, #000 var(--kw-section-fade), #000 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, #000 var(--kw-section-fade), #000 100%);
}

.home-flow .kw-canvas-section::before {
  z-index: 1;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, #000 var(--kw-section-fade), #000 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, #000 var(--kw-section-fade), #000 100%);
}

.home-flow .asset-layer {
  z-index: 2;
}

.asset-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.section-heading {
  position: relative;
  z-index: 3;
  width: min(72rem, 100%);
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: #1f5c3a;
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 1vw, 0.94rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 246, 205, 0.75);
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--forest-ink);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow:
    0 0.09rem 0 rgba(255, 240, 180, 0.65),
    0 0.5rem 1.4rem rgba(20, 57, 35, 0.26);
}

.section-heading p:not(.eyebrow) {
  max-width: 40rem;
  margin: 0.8rem 0 0;
  color: #1e3a2a;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 700;
  line-height: 1.58;
  text-wrap: pretty;
  text-shadow: 0 1px 0 rgba(255, 246, 205, 0.55);
}

.section-heading.is-centered {
  margin-inline: auto;
  text-align: center;
  /* Ensure centered headings always read clearly over busy canvas backgrounds */
  padding: 0.75rem 1.2rem;
  border-radius: 0.6rem;
  background: radial-gradient(
    ellipse at 50% 42%,
    rgba(255, 252, 228, 0.58) 0%,
    rgba(255, 252, 228, 0.28) 55%,
    rgba(255, 252, 228, 0) 88%
  );
}

.section-heading.is-centered p:not(.eyebrow) {
  margin-inline: auto;
}

/* ---------- ambient sprites ---------- */

.cloud-sprite,
.butterfly-sprite,
.section-foliage {
  position: absolute;
  display: block;
  max-width: none;
  user-select: none;
}

.cloud-sprite {
  width: clamp(10rem, 18vw, 22rem);
  opacity: 0.74;
  filter: drop-shadow(0 0.55rem 0.45rem rgba(73, 103, 83, 0.11));
}

.butterfly-sprite {
  width: clamp(3.2rem, 5vw, 5.8rem);
  opacity: 0.93;
  filter: drop-shadow(0 0.45rem 0.35rem rgba(63, 55, 32, 0.18));
  transform-origin: 50% 60%;
  animation: butterfly-float 7.5s ease-in-out infinite;
}

.section-foliage {
  z-index: 1;
  right: -4vw;
  bottom: -4.6rem;
  width: min(62rem, 76vw);
  opacity: 0.26;
  filter: drop-shadow(0 -0.18rem 0.35rem rgba(35, 71, 37, 0.06));
}

.cloud-pos-left {
  top: 8%;
  left: 4%;
  animation: cloud-drift-left 24s ease-in-out infinite;
}

.cloud-pos-right {
  top: 9%;
  right: 6%;
  width: clamp(8.5rem, 14vw, 17rem);
  opacity: 0.64;
  animation: cloud-drift-right 30s ease-in-out infinite;
  animation-delay: -11s;
}

.fly-pos-left {
  top: 38%;
  left: 9%;
  animation-delay: -1.4s;
}

.fly-pos-right {
  right: 9%;
  bottom: 26%;
  animation-delay: -4.4s;
}

.foliage-pos-left {
  left: -3vw;
  right: auto;
}

/* ---------- wood + parchment primitives ---------- */

.wood-sign {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.7rem, 2.6vw, 2.4rem) clamp(1.8rem, 3vw, 2.8rem);
  background: var(--kw-ui-wood-sign-secondary) center / 100% 100% no-repeat;
  filter: drop-shadow(0 1.15rem 0.9rem rgba(26, 55, 32, 0.24));
}

.wood-sign h1,
.wood-sign h2,
.wood-sign h3 {
  margin: 0;
  color: var(--forest-ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 4rem);
  line-height: 1.02;
  text-shadow: 0 0.12rem 0 rgba(255, 237, 152, 0.72);
}

.wood-sign p:not(.eyebrow) {
  max-width: 34rem;
  margin: 0.72rem 0 0;
  color: #233d2b;
  font-weight: 900;
  line-height: 1.28;
}
.wood-button {
  display: inline-flex;
  min-width: 5.3rem;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.66rem 1.4rem 0.72rem;
  background: linear-gradient(180deg, #2d6a4f, #1b4332);
  border: 0.12rem solid #081c15;
  border-radius: 0.75rem;
  color: #fffaf0;
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: break-word;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(8, 28, 21, 0.6);
  box-shadow:
    inset 0 0.08rem 0.08rem rgba(255, 255, 255, 0.25),
    0 0.25rem 0.5rem rgba(8, 28, 21, 0.24);
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 220ms ease;
  user-select: none;
}
.wood-button:hover,
.wood-button:focus-visible {
  background: linear-gradient(180deg, #37855f, #1e4d39);
  border-color: #0c2b1f;
  color: #ffffff;
  box-shadow:
    inset 0 0.08rem 0.08rem rgba(255, 255, 255, 0.3),
    0 0.4rem 0.85rem rgba(8, 28, 21, 0.32),
    0 0 0 0.18rem rgba(255, 211, 95, 0.35);
  transform: translateY(-0.15rem) scale(1.025);
}

.wood-button:focus-visible {
  outline: 0.18rem solid var(--focus);
  outline-offset: 0.14rem;
}

.wood-button:active {
  transform: translateY(0.02rem) scale(0.99);
  box-shadow:
    inset 0 0.08rem 0.15rem rgba(0, 0, 0, 0.3),
    0 0.12rem 0.25rem rgba(8, 28, 21, 0.2);
}

.wood-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  filter: saturate(0.55);
  pointer-events: none;
}

.wood-button.is-quiet {
  background: linear-gradient(180deg, #fffcf5, #f5f1e1);
  border-color: rgba(91, 50, 24, 0.35);
  box-shadow:
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.6),
    0 0.18rem 0.36rem rgba(91, 50, 24, 0.12);
  color: #1b4332;
  text-shadow: none;
}
.wood-button.is-quiet:hover,
.wood-button.is-quiet:focus-visible {
  background: linear-gradient(180deg, #ffffff, #faf7ea);
  border-color: rgba(91, 50, 24, 0.52);
  color: #122b20;
  box-shadow:
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.8),
    0 0.3rem 0.6rem rgba(91, 50, 24, 0.18),
    0 0 0 0.18rem rgba(255, 211, 95, 0.25);
}

.wood-button.is-amazon {
  background: linear-gradient(180deg, #ffa022, #e07a00);
  border-color: #7b4000;
  color: #fffdf7;
  text-shadow: 0 1px 2px rgba(60, 30, 0, 0.6);
  box-shadow:
    inset 0 0.08rem 0.08rem rgba(255, 255, 255, 0.3),
    0 0.25rem 0.5rem rgba(60, 30, 0, 0.2);
}

.wood-button.is-amazon:hover,
.wood-button.is-amazon:focus-visible {
  background: linear-gradient(180deg, #ffb244, #f28b0c);
  border-color: #643400;
  box-shadow:
    inset 0 0.08rem 0.08rem rgba(255, 255, 255, 0.4),
    0 0.4rem 0.85rem rgba(60, 30, 0, 0.28),
    0 0 0 0.18rem rgba(255, 211, 95, 0.4);
}

.is-amazon-link {
  transition: all 220ms ease;
}

.is-amazon-link:hover {
  text-decoration: underline;
  transform: translateY(-2px) scale(1.025);
}

.leaf-badge {
  display: inline-flex;
  min-height: 2.3rem;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.78rem 0.4rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 239, 166, 0.34), rgba(255, 239, 166, 0) 48%),
    linear-gradient(180deg, var(--meadow-100), #d7e9b8);
  border: 0.08rem solid rgba(67, 101, 52, 0.36);
  border-radius: 999px;
  color: #184431;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 245, 198, 0.42);
  box-shadow: inset 0 0.07rem 0 rgba(255, 255, 255, 0.52);
}

button.leaf-badge:focus-visible,
.leaf-badge[role="tab"]:focus-visible,
.skill-chip:focus-visible {
  outline: 0.16rem solid var(--focus-ring);
  outline-offset: -0.08rem;
  filter: saturate(1.12) drop-shadow(0 0 0.22rem var(--focus));
}

.acorn-badge {
  display: inline-flex;
  width: 3.4rem;
  aspect-ratio: 705 / 871;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.45rem 0.85rem;
  background: var(--kw-ui-acorn-age-badge) center / contain no-repeat;
  color: #6a4a25;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.log-row {
  display: grid;
  min-height: clamp(5.2rem, 6.6vw, 6.4rem);
  grid-template-columns: minmax(7rem, 0.34fr) 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 2.1rem 1rem 2.35rem;
  background: var(--kw-ui-log-sign-row) center / 100% 100% no-repeat;
  filter: drop-shadow(0 0.9rem 0.8rem rgba(35, 58, 28, 0.18));
}

.log-row > span:first-child,
.log-row strong {
  color: #174d38;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  font-weight: 900;
}

.log-row p {
  margin: 0;
  color: var(--bark-text);
  font-weight: 900;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

/* ---------- shared storybook card ----------
 * A framed cover illustration above a parchment caption plate -
 * the same visual language as the reader's framed page and its
 * dialogue parchment, so cards never outgrow their art. */

.story-card {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 21rem;
  flex-direction: column;
  filter: drop-shadow(0 1.1rem 0.9rem rgba(28, 48, 24, 0.24));
  transition: transform 350ms cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 350ms ease;
  will-change: transform, filter;
  z-index: 1;
}

.story-card:hover {
  transform: translateY(-0.4rem) scale(1.02);
  filter: drop-shadow(0 1.8rem 1.4rem rgba(28, 48, 24, 0.4)) drop-shadow(0 0 1rem rgba(255, 240, 163, 0.25));
  z-index: 10;
}

.story-card-art {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 0.4rem solid #f9efcf;
  border-bottom-width: 0.28rem;
  border-radius: 1rem 1rem 0.4rem 0.4rem;
  background: #e8dfc2;
}

.story-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.story-card:hover .story-card-art img {
  transform: scale(1.045);
}

.story-card-body {
  display: grid;
  justify-items: center;
  gap: 0.34rem;
  padding: 0.85rem 0.95rem 1.05rem;
  background: var(--parchment-strong);
  border: 0.14rem solid rgba(110, 78, 38, 0.26);
  border-top: 0;
  border-radius: 0.4rem 0.4rem 1rem 1rem;
  text-align: center;
}

.story-card-body h3 {
  margin: 0;
  color: #174d38;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.4vw, 1.32rem);
  line-height: 1.08;
  text-wrap: balance;
}

.story-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  align-items: center;
  justify-content: center;
}

.story-card-meta .leaf-badge {
  min-height: 1.85rem;
  padding: 0.18rem 0.6rem 0.28rem;
  font-size: 0.7rem;
}

.story-card-meta .acorn-badge {
  width: 2.55rem;
  font-size: 0.64rem;
}

.story-state {
  display: block;
  color: #6a4a25;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.15rem;
}

.story-card-actions .wood-button {
  min-width: 4.6rem;
  min-height: 2.4rem;
  padding: 0.18rem 0.78rem 0.36rem;
  font-size: 0.84rem;
}

.story-card .saved-star {
  position: absolute;
  top: -0.55rem;
  right: -0.55rem;
  z-index: 2;
  display: inline-flex;
  min-width: 3.4rem;
  min-height: 2.2rem;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.7rem 0.34rem;
  place-items: center;
  background: var(--kw-ui-leaf-badge) center / 100% 100% no-repeat;
  color: #184431;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 245, 198, 0.42);
}

/* ---------- section seams ----------
 * Foliage bands + a soft light scrim straddle every section boundary
 * so the painted canvases flow into each other instead of hard-cutting. */

.section-seam {
  position: relative;
  z-index: 6;
  height: 0;
  pointer-events: none;
}

.section-seam::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -5.2rem;
  height: 10.4rem;
  opacity: 0.58;
  filter: blur(0.45rem);
  background: linear-gradient(
    180deg,
    rgba(214, 232, 186, 0) 0%,
    rgba(235, 241, 199, 0.24) 38%,
    rgba(190, 220, 184, 0.2) 62%,
    rgba(214, 232, 186, 0) 100%
  );
}

.section-seam img {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(102vw, 76rem);
  min-width: 46rem;
  max-width: none;
  transform: translate(-50%, -80%);
  opacity: 0.97;
  filter: drop-shadow(0 -0.25rem 0.55rem rgba(35, 71, 37, 0.2));
}

.section-seam.is-flipped img {
  transform: translate(-50%, -80%) scaleX(-1);
}

.section-seam.footer-seam {
  display: none;
}

/* ---------- forms ---------- */

.field {
  display: grid;
  gap: 0.38rem;
  padding: 0.58rem 0.64rem 0.66rem;
  color: #4a2e12;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.05;
  background:
    linear-gradient(180deg, var(--surface-paper-strong), var(--surface-paper));
  border: 0.08rem solid var(--surface-border);
  border-radius: 0.58rem;
  box-shadow: inset 0 0.08rem 0 rgba(255, 255, 255, 0.5);
}

select,
input,
textarea {
  width: 100%;
  min-width: 0;
  border: 0.08rem solid rgba(83, 66, 38, 0.2);
  border-radius: 0.44rem;
  color: #183526;
  background: var(--paper-50);
  font: inherit;
  font-weight: 800;
  outline: 0.12rem solid transparent;
}

input,
select {
  min-height: 2.35rem;
}

textarea {
  min-height: 4.4rem;
}

input::placeholder,
textarea::placeholder {
  color: #684923;
  opacity: 1;
}

select:focus,
input:focus,
textarea:focus {
  outline-color: rgba(255, 211, 95, 0.75);
  border-color: var(--moss-700);
  background: #fffdf2;
}

.form-status {
  min-height: 1.2rem;
  margin: 0.55rem 0 0;
  color: #174d38;
  font-weight: 900;
  text-align: center;
}

.form-status.is-error {
  color: var(--danger);
}

/* ---------- footer ---------- */

.forest-footer {
  position: relative;
  display: flex;
  flex-shrink: 0;
  margin-top: calc(var(--kw-footer-overlap) * -1);
  min-height: var(--kw-footer-overlap);
  overflow: hidden;
  isolation: isolate;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.2rem, 2.5vw, 2rem);
  padding: clamp(5.5rem, 8vw, 7.5rem) 1.5rem 0;
  color: var(--forest-text);
  background: transparent;
  text-align: center;
}

.forest-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: clamp(8rem, 14vw, 13rem);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(202, 223, 189, 0), rgba(202, 223, 189, 0.12) 46%, rgba(202, 223, 189, 0));
}

.forest-footer::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: clamp(3.8rem, 5vw, 5.4rem) max(0.8rem, calc((100vw - 58rem) / 2)) clamp(2rem, 4vw, 3.2rem);
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 250, 224, 0.9), rgba(255, 250, 224, 0.55) 44%, rgba(255, 250, 224, 0) 74%),
    radial-gradient(ellipse at 50% 72%, rgba(245, 231, 178, 0.36), rgba(245, 231, 178, 0) 68%);
  filter: blur(0.08rem);
  mask-image: radial-gradient(ellipse at 50% 52%, #000 0%, #000 48%, rgba(0, 0, 0, 0.58) 62%, rgba(0, 0, 0, 0) 82%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 52%, #000 0%, #000 48%, rgba(0, 0, 0, 0.58) 62%, rgba(0, 0, 0, 0) 82%);
}

/* Footer main container — brand + nav */
.footer-main {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.4rem, 2.5vw, 2rem);
  width: min(52rem, 96vw);
  padding: clamp(2rem, 3.5vw, 3rem) clamp(1.8rem, 4vw, 3.5rem);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 250, 218, 0.88) 0%, rgba(255, 250, 218, 0.65) 50%, rgba(255, 250, 218, 0) 80%),
    var(--kw-ui-wood-sign-secondary) center / 100% 100% no-repeat;
  border-radius: 1.2rem;
  filter: drop-shadow(0 1.2rem 1.2rem rgba(26, 55, 32, 0.22)) drop-shadow(0 0 0.4rem rgba(255, 244, 185, 0.32));
}

.footer-brand {
  text-align: center;
}

.footer-brand .eyebrow {
  margin-bottom: 0.5rem;
}

.footer-brand h2 {
  margin: 0;
  color: #0d3828;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.05;
  text-shadow: 0 0.1rem 0 rgba(255, 246, 189, 0.92), 0 0 0.4rem rgba(255, 252, 224, 0.72);
}

.footer-tagline {
  width: min(30rem, 100%);
  margin: 0.65rem auto 0;
  color: #14322a;
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 250, 220, 0.88);
}

.footer-links {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  padding: 0.3rem 0;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.2rem;
  background: rgba(255, 250, 226, 0.65);
  border: 0.08rem solid rgba(83, 66, 38, 0.14);
  border-radius: 999px;
  color: #2a1e0e;
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 0.95vw, 0.92rem);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 246, 205, 0.55);
  transition: all 200ms ease;
  backdrop-filter: blur(0.3rem);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  background: rgba(255, 250, 226, 0.92);
  border-color: rgba(83, 66, 38, 0.28);
  color: #1a5c3a;
  transform: translateY(-0.1rem);
  box-shadow: 0 0.25rem 0.6rem rgba(20, 48, 30, 0.12);
  outline: none;
}

.footer-links a:active {
  transform: translateY(0);
  box-shadow: 0 0.08rem 0.2rem rgba(20, 48, 30, 0.1);
}

/* Footer bottom bar */
.footer-bottom {
  position: relative;
  z-index: 4;
  width: min(52rem, 96vw);
  padding-top: 0.8rem;
  padding-bottom: clamp(1rem, 1.5vw, 1.4rem);
  border-top: 0.06rem solid rgba(83, 66, 38, 0.1);
}

.footer-copy {
  position: relative;
  z-index: 4;
  margin: 0;
  padding: 0.45rem 1rem 0.5rem;
  color: #1a3825;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  background: rgba(255, 249, 220, 0.6);
  border-radius: 999px;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 252, 231, 0.88);
  display: inline-block;
}

.footer-branch {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 50%;
  width: min(110rem, 106vw);
  min-width: 64rem;
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  opacity: 0.94;
}

/* ---------- shared responsive ---------- */

@media (max-width: 980px) {
  .forest-nav {
    align-items: center;
  }

  .brand-mark {
    width: 10rem;
  }

  .map-toggle {
    display: inline-flex;
  }

  .branch-nav {
    position: fixed;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.8rem;
    padding: 5.5rem 1rem;
    visibility: hidden;
    opacity: 0;
    background: var(--kw-next-character-grove) center / cover no-repeat #ccefc7;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  body.nav-open .branch-nav {
    visibility: visible;
    opacity: 1;
  }

  .branch-nav a,
  .branch-nav button {
    width: 11.6rem;
    font-size: 1.05rem;
  }
}

@media (max-width: 720px) {
  .kw-canvas-section {
    min-height: auto;
    padding: 6.2rem 1rem 4rem;
  }

  .home-flow .kw-canvas-section {
    padding-top: calc(6.2rem + var(--kw-section-overlap));
  }

  .cloud-sprite {
    width: clamp(7.5rem, 30vw, 11rem);
    opacity: 0.55;
  }

  .butterfly-sprite {
    width: clamp(2.35rem, 8.5vw, 3.5rem);
  }

  .section-foliage {
    bottom: -3rem;
    width: 118vw;
    opacity: 0.2;
  }

  .cloud-pos-left {
    left: -2.6rem;
  }

  .cloud-pos-right {
    right: -2.6rem;
  }

  .section-heading h1,
  .section-heading h2 {
    font-size: clamp(2rem, 9.2vw, 3.3rem);
    overflow-wrap: anywhere;
  }

  .section-heading p:not(.eyebrow) {
    font-size: clamp(1rem, 4.2vw, 1.12rem);
  }

  .wood-sign {
    padding: 1.55rem 1.35rem;
  }

  .log-row {
    min-height: 5.4rem;
    grid-template-columns: 1fr;
    gap: 0.12rem;
    padding: 1.2rem 1.45rem 1.1rem;
  }

  .story-card {
    max-width: min(19rem, 100%);
    margin-inline: auto;
  }

  .section-seam img {
    min-width: 0;
    width: 130vw;
  }

  .forest-footer {
    padding: 6rem 1rem 0;
    gap: 1rem;
  }

  .footer-bottom {
    padding-bottom: 0.8rem;
  }

  .footer-main {
    width: min(100%, 96vw);
    padding: 1.8rem 1.2rem;
  }

  .footer-brand h2 {
    font-size: clamp(1.5rem, 7.5vw, 2.2rem);
  }

  .footer-tagline {
    font-size: 0.88rem;
  }

  .footer-links a {
    font-size: 0.82rem;
    padding: 0.4rem 0.9rem;
  }

  .footer-copy {
    font-size: 0.74rem;
  }

  .footer-branch {
    width: 154vw;
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .brand-mark {
    width: 9.5rem;
    font-size: 0.86rem;
  }

  .map-toggle {
    width: 4.8rem;
    font-size: 0.9rem;
  }

  .wood-button {
    min-height: 2.8rem;
  }
}

@keyframes butterfly-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-2deg);
  }
  50% {
    transform: translate3d(0.4rem, -0.65rem, 0) rotate(4deg);
  }
}

@keyframes cloud-drift-left {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-2.2rem);
  }
}

@keyframes cloud-drift-right {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(2.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud-sprite,
  .butterfly-sprite {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- screenshot-inspired shared chrome pass ---------- */

:root {
  --kw-reference-blue: #2f7dff;
  --kw-reference-blue-deep: #245de8;
  --kw-reference-gold: #f4aa22;
  --kw-reference-gold-deep: #d7860b;
  --kw-story-night: #111024;
  --kw-story-rail: #2b2b3d;
  --kw-story-panel: #2d2b3f;
  --kw-story-card: #171629;
  --kw-story-line: #47425f;
  --kw-story-text: #f9f5ff;
  --kw-story-muted: #b8b2cf;
  --kw-story-cream: #fff6a8;
}

.forest-nav {
  align-items: center;
}

.brand-mark,
.branch-nav a,
.branch-nav button,
.map-toggle {
  width: auto;
  min-width: 0;
  min-height: 2.75rem;
  aspect-ratio: auto;
  padding: 0.58rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 0.06rem solid rgba(16, 60, 44, 0.12);
  border-radius: 999px;
  color: var(--forest-ink);
  line-height: 1;
  text-shadow: none;
  box-shadow: 0 0.42rem 0.8rem rgba(16, 42, 64, 0.14);
}

.brand-mark {
  gap: 0.55rem;
  padding-inline: 0.9rem 1.15rem;
  color: var(--forest-ink);
  font-size: 1rem;
  letter-spacing: 0;
}

.brand-mark::before {
  content: "";
  display: inline-block;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  background: var(--kw-ui-brand-icon) center / contain no-repeat;
}

.branch-nav {
  align-items: center;
}

.branch-nav a,
.branch-nav button {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 850;
}

.branch-nav button[data-auth-link],
.branch-nav a[data-auth-link] {
  padding-inline: 1.25rem;
  background: linear-gradient(180deg, var(--kw-reference-gold), var(--kw-reference-gold-deep));
  border-color: rgba(110, 64, 0, 0.32);
  color: #fffdf5;
  box-shadow: 0 0.35rem 0.7rem rgba(65, 47, 12, 0.22);
}

.branch-nav a[aria-current="page"],
.branch-nav button[aria-current="page"] {
  background: #fff8dc;
  color: var(--canopy-900);
}

.brand-mark:hover,
.brand-mark:focus-visible,
.branch-nav a:hover,
.branch-nav a:focus-visible,
.branch-nav button:hover,
.branch-nav button:focus-visible,
.map-toggle:hover,
.map-toggle:focus-visible {
  filter: brightness(1.02);
  transform: translateY(-0.08rem);
}

.wood-button {
  border-radius: 999px;
}

@media (max-width: 980px) {
  .branch-nav {
    background:
      linear-gradient(180deg, rgba(17, 16, 36, 0.86), rgba(17, 16, 36, 0.76)),
      var(--kw-next-character-grove) center / cover no-repeat #172235;
  }

  .branch-nav a,
  .branch-nav button {
    width: min(14rem, 82vw);
    min-height: 3rem;
  }
}

/* Amazon KDP Button Styles */
.wood-button.is-amazon {
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(255, 240, 200, 0.5), rgba(255, 240, 200, 0) 48%),
    linear-gradient(180deg, #ff9900, #e68a00 48%, #cc7a00);
  border-color: #995c00;
  color: #111;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.4),
    inset 0 -0.14rem 0 rgba(0, 0, 0, 0.25),
    0 0.18rem 0 #995c00,
    0 0.32rem 0.46rem rgba(27, 45, 24, 0.22);
}
.wood-button.is-amazon:hover,
.wood-button.is-amazon:focus-visible {
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(255, 240, 200, 0.6), rgba(255, 240, 200, 0) 48%),
    linear-gradient(180deg, #ffaa22, #f59e1b 48%, #e08500);
  border-color: #b36b00;
  color: #000;
}
.wood-button.is-amazon:active {
  background: linear-gradient(180deg, #e08500, #cc7a00);
  box-shadow:
    inset 0 0.1rem 0.2rem rgba(0, 0, 0, 0.15),
    inset 0 -0.05rem 0 rgba(255, 255, 255, 0.2),
    0 0.05rem 0 #995c00,
    0 0.1rem 0.2rem rgba(27, 45, 24, 0.15);
}
