:root {
  --cream: #fffaf0;
  --butter: #ffe8b8;
  --apricot: #ffc089;
  --sun: #ffd566;
  --sage: #7fb069;
  --sage-deep: #628c50;
  --cocoa: #653719;
  --cocoa-deep: #3e220f;
  --clay: #d45a3d;
  --clay-deep: #a93c27;
  --mist: rgba(255, 250, 240, 0.72);
  --line: rgba(101, 55, 25, 0.14);
  --shadow: 0 24px 60px rgba(101, 55, 25, 0.18);
  --radius-xl: 2rem;
  --radius-lg: 1.25rem;
  --max-width: 74rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--cocoa-deep);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 30%),
    linear-gradient(180deg, #fff6de 0%, #fffaf0 38%, #fdf1dd 100%);
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  backdrop-filter: blur(18px);
  background: rgba(255, 250, 240, 0.68);
  border-bottom: 1px solid rgba(101, 55, 25, 0.08);
}

.brand-chip,
.site-nav {
  display: flex;
  align-items: center;
}

.brand-chip {
  gap: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.brand-chip img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  box-shadow: 0 10px 20px rgba(101, 55, 25, 0.2);
}

.site-nav {
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a,
.text-link {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.site-nav a {
  font-weight: 700;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 32rem) minmax(18rem, 1fr);
  align-items: center;
  gap: 3rem;
  min-height: calc(100svh - 5rem);
  padding: 3.25rem clamp(1.5rem, 4vw, 4rem) 2rem;
  overflow: clip;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0.95) 0%, rgba(255, 250, 240, 0.82) 38%, rgba(255, 250, 240, 0.18) 72%),
    linear-gradient(135deg, #fff8e5 0%, #d9efcf 52%, #b8ddeb 100%);
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 7rem;
  background:
    linear-gradient(180deg, rgba(127, 176, 105, 0) 0%, rgba(127, 176, 105, 0.26) 100%),
    url("/assets/scene/grass-tufts.png") left bottom / auto 70% repeat-x;
  z-index: -1;
}

.hero-copy {
  width: min(100%, 30rem);
  padding-inline: clamp(0rem, 1vw, 1rem);
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(62, 34, 15, 0.72);
}

.hero-brand {
  margin: 0 0 0.55rem;
  font-family: "Fredoka", sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0;
  color: rgba(62, 34, 15, 0.92);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fredoka", sans-serif;
  line-height: 0.94;
  color: var(--cocoa-deep);
}

h1 {
  font-size: 4rem;
  max-width: 12ch;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  max-width: 14ch;
}

h3 {
  font-size: clamp(1.45rem, 2vw, 1.8rem);
}

p,
li,
label,
input,
textarea,
button {
  font-size: 1rem;
  line-height: 1.65;
}

.hero-body,
.page-lead,
.section-heading p,
.contact-copy p {
  max-width: 42rem;
  margin: 0.8rem 0 0;
  font-size: 0.98rem;
  color: rgba(62, 34, 15, 0.82);
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 1.35rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--cream);
  background: linear-gradient(180deg, var(--clay) 0%, var(--clay-deep) 100%);
  box-shadow: 0 14px 32px rgba(169, 60, 39, 0.32);
}

.button-secondary {
  color: var(--cocoa-deep);
  background: rgba(255, 250, 240, 0.7);
  box-shadow: inset 0 0 0 1px rgba(101, 55, 25, 0.14);
}

.hero-facts,
.quickstart-list,
.support-links,
.stacked-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-facts {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.hero-facts li {
  padding-left: 1.05rem;
  border-left: 3px solid rgba(101, 55, 25, 0.18);
  color: rgba(62, 34, 15, 0.8);
}

.hero-art {
  position: relative;
  min-height: 27rem;
  display: grid;
  align-items: end;
  justify-items: center;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 18% 0 12% 8%;
  border-radius: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.52), rgba(255, 250, 240, 0.16)),
    url("/assets/scene/fence-shrubs.png") center bottom / 100% auto no-repeat;
  box-shadow: inset 0 0 0 1px rgba(101, 55, 25, 0.07);
}

.hero-ball {
  position: absolute;
}

.hero-dog {
  width: min(100%, 31rem);
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 1.5rem 1.4rem rgba(62, 34, 15, 0.2));
  animation: dog-bound 2.8s ease-in-out infinite;
}

.hero-ball {
  top: 6%;
  right: 10%;
  width: 4.25rem;
  height: 4.25rem;
  z-index: 4;
  filter: drop-shadow(0 0.75rem 1rem rgba(62, 34, 15, 0.16));
  animation: ball-float 4.8s ease-in-out infinite;
}

@media (min-width: 901px) {
  .hero-copy {
    align-self: center;
  }
}

@keyframes ball-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(8deg);
  }
}

.section,
.page-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

.section {
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
}

.section-heading.narrow {
  max-width: 46rem;
}

.loop-grid,
.section-guide-preview,
.section-support,
.page-grid {
  display: grid;
  gap: 1.35rem;
}

.loop-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.loop-item,
.guide-preview-panel,
.support-rail,
.info-panel,
.legal-panel,
.support-card {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 250, 240, 0.7);
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(10px);
}

.loop-item {
  min-height: 16rem;
}

.loop-count {
  margin: 0 0 1rem;
  font-family: "Fredoka", sans-serif;
  font-size: 3.2rem;
  color: rgba(101, 55, 25, 0.16);
}

.section-guide-preview,
.section-support,
.page-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.guide-preview-panel,
.support-rail,
.support-card {
  box-shadow: var(--shadow);
}

.quickstart-list,
.stacked-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.quickstart-list li,
.stacked-list li {
  padding-left: 1.15rem;
  border-left: 3px solid rgba(127, 176, 105, 0.42);
}

.support-links {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.support-links a {
  display: block;
  padding-bottom: 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.support-links li:last-child a {
  border-bottom: 0;
  padding-bottom: 0;
}

.support-links strong {
  display: block;
  font-family: "Fredoka", sans-serif;
  font-size: 1.35rem;
}

.support-links span {
  display: block;
  margin-top: 0.25rem;
  color: rgba(62, 34, 15, 0.76);
}

.privacy-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: rgba(101, 55, 25, 0.12);
  box-shadow: var(--shadow);
}

.privacy-strip > div {
  padding: 1.65rem;
  background: rgba(255, 250, 240, 0.88);
}

.contact-copy {
  max-width: 32rem;
}

.support-card {
  display: grid;
  gap: 1.25rem;
}

.page-shell {
  padding: clamp(3rem, 8vw, 6rem) 0 5rem;
}

.page-hero {
  margin-bottom: 2.5rem;
}

.legal-layout {
  display: grid;
  gap: 1rem;
}

.legal-panel + .legal-panel {
  margin-top: 0;
}

.not-found {
  min-height: 100svh;
  display: grid;
  place-items: center;
  gap: 1rem;
  width: min(calc(100% - 2rem), 34rem);
  margin: 0 auto;
  text-align: center;
}

.not-found img {
  width: min(100%, 18rem);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid rgba(101, 55, 25, 0.1);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 500ms ease, transform 500ms ease;
}

[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes dog-bound {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-18px) rotate(-2deg);
  }
}

@media (max-width: 900px) {
  .hero,
  .loop-grid,
  .section-guide-preview,
  .section-support,
  .page-grid,
  .privacy-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 2rem;
    padding: 2.25rem 1.25rem 0;
  }

  h1 {
    font-size: 3.1rem;
    max-width: 10ch;
  }

  .hero-body {
    max-width: 30rem;
  }

  .hero-art {
    min-height: 22rem;
    order: -1;
  }

  .hero-art::before {
    inset: 24% 0 8%;
  }

  .hero-dog {
    width: min(100%, 27rem);
  }

  .hero-ball {
    top: -3%;
    right: 6%;
    width: 3.35rem;
    height: 3.35rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-inline: 1rem;
  }

  .brand-chip span {
    display: none;
  }

  .brand-chip img {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.78rem;
  }

  .site-nav {
    gap: 0.55rem;
    font-size: 0.84rem;
  }

  .hero {
    padding-inline: 1rem;
  }

  h1 {
    font-size: 2.55rem;
    max-width: 11ch;
  }

  .hero-actions {
    gap: 0.65rem;
  }

  .button {
    min-height: 3rem;
    padding: 0.72rem 1rem;
  }

  .hero-art {
    min-height: 17.5rem;
  }

  .hero-art::before {
    inset: 25% -1rem 5% 0;
    border-radius: 1.1rem;
  }

  .hero-dog {
    width: min(104%, 23rem);
  }

  .hero-ball {
    top: -4%;
    right: 4%;
    width: 2.85rem;
    height: 2.85rem;
  }

  .hero-copy,
  .page-shell,
  .section,
  .site-footer {
    width: min(calc(100% - 1.5rem), var(--max-width));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
