/* ============================================================
   Playful — landing one-page
   Palette: cream #F6F2E9 · deep green #1F5C3D · teal #3E8C7A
            sand #D9B98C · ink #16241D
   ============================================================ */

:root {
  --cream: #F6F2E9;
  --green: #1F5C3D;
  --teal: #3E8C7A;
  --sand: #D9B98C;
  --ink: #16241D;

  --radius-sm: 16px;
  --radius-lg: 24px;
  --maxw: 1120px;
  --space: clamp(4rem, 9vw, 7rem);

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Springy easing reused across entrance / hover effects */
  --ease-spring: cubic-bezier(0.22, 0.68, 0.28, 1.12);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--green);
  color: var(--cream);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--sand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-lg);
  background: var(--green);
  color: var(--cream);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease-spring), box-shadow 0.2s ease,
    background 0.2s ease;
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:active { transform: translateY(0) scale(0.99); }

.btn--primary {
  box-shadow: 0 10px 24px -10px rgba(31, 92, 61, 0.7);
}
.btn--sand {
  background: var(--sand);
  color: var(--ink);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.4);
}
.btn--ghost {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn--ghost:hover { background: var(--green); color: var(--cream); }

.btn--text {
  background: transparent;
  color: var(--ink);
  padding-inline: 0.5rem;
  border-radius: var(--radius-sm);
}
.btn--text:hover { color: var(--teal); }
.btn--text::after {
  content: "→";
  transition: transform 0.18s var(--ease-spring);
}
.btn--text:hover::after { transform: translateX(5px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 242, 233, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(22, 36, 29, 0.06);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand__mark { transition: transform 0.35s var(--ease-spring); }
.brand:hover .brand__mark { transform: rotate(-12deg) scale(1.12); }
.brand__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7rem);
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

/* Decorative layer holding the animated background blobs */
.hero__deco {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Parallax wrapper: JS sets --px / --py from the pointer position.
   The blob image inside carries its own float animation, so the two
   transforms never fight over the same element. */
.blob-layer {
  position: absolute;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 0.4s var(--ease-spring);
  will-change: transform;
}
.blob-layer--1 {
  width: clamp(360px, 55vw, 640px);
  top: -18%;
  right: -16%;
}
.blob-layer--2 {
  width: clamp(260px, 38vw, 440px);
  bottom: -32%;
  left: -14%;
}
.blob-layer--3 {
  width: clamp(220px, 30vw, 360px);
  top: 34%;
  right: -20%;
}

.hero__blob {
  opacity: 0.5;
  transform-origin: center;
}
.hero__blob--1 { animation: blob-float-a 9s ease-in-out infinite; }
.hero__blob--2 {
  opacity: 0.55;
  animation: blob-float-b 11s ease-in-out infinite;
}
.hero__blob--3 {
  opacity: 0.4;
  animation: blob-float-c 7.5s ease-in-out infinite;
}

.hero__eyebrow,
.section-head__eyebrow {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1rem;
}

.hero__title {
  font-size: clamp(2.4rem, 6.2vw, 4rem);
  margin-bottom: 1.25rem;
}

.u-underline {
  position: relative;
  white-space: nowrap;
}
.u-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.04em;
  height: 0.22em;
  background: var(--sand);
  border-radius: 999px;
  z-index: -1;
}
/* Underline draws itself in once the hero has settled */
.js .u-underline::after {
  transform: scaleX(0);
  transform-origin: left;
  animation: underline-in 0.6s ease 1s forwards;
}

.hero__subtext {
  font-size: clamp(1.1rem, 0.98rem + 0.5vw, 1.3rem);
  color: rgba(22, 36, 29, 0.78);
  max-width: 56ch;
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Staggered hero entrance — only armed when JS is present */
.js .hero__rise { opacity: 0; }
.js .hero__rise {
  animation: hero-rise 0.9s var(--ease-spring) both;
}
.js .hero__inner > .hero__rise:nth-child(1) { animation-delay: 0.15s; }
.js .hero__inner > .hero__rise:nth-child(2) { animation-delay: 0.3s; }
.js .hero__inner > .hero__rise:nth-child(3) { animation-delay: 0.48s; }
.js .hero__inner > .hero__rise:nth-child(4) { animation-delay: 0.63s; }

/* ---------- Section divider ---------- */
.section-divider {
  width: 100%;
  height: clamp(60px, 9vw, 130px);
  display: block;
  margin-bottom: -1px;
}

/* ---------- Pillars ---------- */
.pillars {
  background: var(--teal);
  color: var(--cream);
  padding-block: var(--space);
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}
.pillars .section-head__eyebrow { color: var(--sand); }
.section-head__title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.pillars__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.pillar-card {
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 2rem 1.9rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  box-shadow: 0 18px 40px -24px rgba(22, 36, 29, 0.55);
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s ease;
}
.pillar-card:hover {
  transform: translateY(-12px) rotate(-2deg);
  box-shadow: 0 30px 56px -22px rgba(22, 36, 29, 0.62);
}
/* Alternate the tilt direction so a hovered row feels playful, not uniform */
.pillar-card:nth-child(even):hover { transform: translateY(-12px) rotate(2deg); }

/* Pillar illustration — an unDraw image recoloured to the palette.
   It floats continuously so the section never reads as static. */
.pillar-card__art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(132px, 18vw, 170px);
  margin-bottom: 0.4rem;
  border-radius: var(--radius-sm);
  background: radial-gradient(
    circle at 50% 58%,
    rgba(62, 140, 122, 0.12),
    transparent 70%
  );
}
.pillar-card__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: art-float 5.5s ease-in-out infinite;
}
.pillar-card--community .pillar-card__art img {
  animation-duration: 6.6s;
  animation-delay: -2s;
}
.pillar-card--sustainability .pillar-card__art img {
  animation-duration: 6s;
  animation-delay: -3.6s;
}

.pillar-card__title {
  font-size: 1.5rem;
  color: var(--green);
}
.pillar-card__text {
  margin: 0;
  color: rgba(22, 36, 29, 0.82);
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--green);
  color: var(--cream);
  padding-block: var(--space);
}
.cta__blob-layer {
  width: clamp(300px, 45vw, 520px);
  right: -12%;
  bottom: -38%;
}
.cta__blob {
  opacity: 0.22;
  animation: blob-float-b 12s ease-in-out infinite;
}
.cta__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 640px;
}
.cta__title {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  margin-bottom: 1rem;
}
.cta__text {
  color: rgba(246, 242, 233, 0.85);
  margin: 0 auto 2rem;
  max-width: 48ch;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cream);
  border-top: 1px solid rgba(22, 36, 29, 0.08);
  padding-block: 2.5rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer__tagline {
  margin: 0;
  color: rgba(22, 36, 29, 0.7);
  font-size: 0.95rem;
}
.site-footer__mail {
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  border-bottom: 2px solid var(--sand);
  padding-bottom: 2px;
}
.site-footer__mail:hover { color: var(--teal); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-spring);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Keyframes ---------- */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(38px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes underline-in {
  to { transform: scaleX(1); }
}

@keyframes blob-float-a {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%      { transform: translate3d(34px, -40px, 0) rotate(16deg) scale(1.12); }
}
@keyframes blob-float-b {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%      { transform: translate3d(-38px, 34px, 0) rotate(-18deg) scale(1.14); }
}
@keyframes blob-float-c {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%      { transform: translate3d(30px, 30px, 0) rotate(12deg) scale(0.9); }
}

@keyframes art-float {
  0%, 100% { transform: translateY(0) rotate(-1.6deg); }
  50%      { transform: translateY(-14px) rotate(1.6deg); }
}

/* ---------- Reduced motion: drop every non-essential animation ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal,
  .js .hero__rise {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
    animation: none;
  }
  .js .u-underline::after { transform: none; animation: none; }

  .hero__blob,
  .cta__blob,
  .pillar-card__art img { animation: none; }

  .blob-layer { transition: none; }

  .btn,
  .pillar-card,
  .brand__mark { transition: none; }
  .btn:hover,
  .pillar-card:hover,
  .pillar-card:nth-child(even):hover { transform: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 540px) {
  .site-header__cta { display: none; }
  .hero__actions .btn { width: 100%; }
}
