
/* ==========================================
   KORAALBOOM PROJECTS
   COMPLETE WEBSITE STYLESHEET
   ========================================== */

:root {
  --dark: #293532;
  --dark-hover: #394b45;
  --coral: #e7462d;
  --coral-hover: #c93620;
  --sand: #e8dfca;
  --cream: #faf8f3;
  --white: #ffffff;
  --muted: #626c68;
  --border: #e6e1d8;
  --gold: #efc75a;
  --gold-dark: #b78218;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--dark);
  background: var(--cream);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.container {
  width: min(1100px, 90%);
  margin: 0 auto;
}

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

a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

/* ==========================================
   HEADER
   ========================================== */

.site-header {
  background: var(--cream);
}

.site-header .nav {
  width: 100%;
  max-width: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.site-header .brand {
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  background: var(--cream);
}

.animated-brand {
  position: relative;
  isolation: isolate;
}

/* ==========================================
   ANIMATED LOGO
   ========================================== */

.logo-scene {
  position: relative;
  display: block;
  width: min(520px, 100%);
  aspect-ratio: 1763 / 892;
  isolation: isolate;
  animation: logoReveal 1.5s ease-out both;
}

/* All image layers share the same canvas */

.logo-scene > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
}

/* Tree */

.logo-tree {
  z-index: 2;
  transform-origin: 43% 62%;
  animation: treeBreeze 5s ease-in-out infinite;
}

/* Ocean */

.logo-water {
  z-index: 1;
  transform-origin: center;
  animation: oceanWave 5s ease-in-out infinite;
}

/* Lettering stays stationary */

.logo-wordmark {
  z-index: 5;
}

/* Petal layer */

.petals {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

/* Falling petals */

.petal {
  position: absolute;
  width: 5px;
  height: 7px;
  border-radius: 80% 10% 80% 10%;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(
    0 1px 1px rgba(0, 0, 0, 0.12)
  );
  animation: petalFall linear forwards;
}

/* Logo entrance */

@keyframes logoReveal {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Tree movement */

@keyframes treeBreeze {
  0%, 100% {
    transform: rotate(-1.2deg) translateX(-2px);
  }

  50% {
    transform: rotate(1.2deg) translateX(2px);
  }
}

/* Ocean movement */

@keyframes oceanWave {
  0%, 100% {
    transform: translateX(-12px) scaleX(0.98);
    opacity: 0.88;
  }

  50% {
    transform: translateX(12px) scaleX(1.04);
    opacity: 1;
  }
}

/* Falling blossoms */

@keyframes petalFall {
  0% {
    opacity: 0;
    transform:
      translate3d(0, 0, 0)
      rotate(0deg);
  }

  10% {
    opacity: 1;
  }

  85% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform:
      translate3d(
        var(--drift),
        var(--fall),
        0
      )
      rotate(var(--spin));
  }
}

/* ==========================================
   NAVIGATION
   ========================================== */

.site-header nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  min-height: 76px;
  padding: 0 20px;
  gap: 55px;
  background: var(--dark);
  border-top: 3px solid var(--coral);
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 73px;
  padding: 0 5px;
  color: var(--white);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.site-header nav a:hover {
  color: #ff9a86;
  border-bottom-color: #ff9a86;
}

.site-header nav a[aria-current="page"] {
  color: #ff806b;
  border-bottom-color: var(--coral);
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1,
h2,
h3 {
  line-height: 1.2;
  color: var(--dark);
}

h1 {
  font-size: clamp(42px, 6vw, 76px);
  letter-spacing: -2px;
  margin: 20px 0 30px;
}

h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 15px 0 25px;
}

h3 {
  font-size: 23px;
  margin: 0 0 15px;
}

p {
  margin: 0 0 20px;
}

.eyebrow {
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ==========================================
   HERO SECTIONS
   ========================================== */

.hero,
.page-hero {
  padding: 110px 0;
  background: linear-gradient(
    120deg,
    var(--cream),
    var(--sand)
  );
}

.hero-description,
.page-hero p:not(.eyebrow) {
  max-width: 650px;
  font-size: 19px;
  color: var(--muted);
  line-height: 1.8;
}

/* ==========================================
   CONTENT SECTIONS
   ========================================== */

.section {
  padding: 95px 0;
}

.section-alt {
  background: var(--white);
}

.section p {
  max-width: 850px;
  color: var(--muted);
  font-size: 17px;
}

.section h2:not(:first-child) {
  margin-top: 35px;
}

/* ==========================================
   SERVICES
   ========================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 45px 0 30px;
}

.service-card {
  padding: 35px 30px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.06);
}

.service-card p {
  font-size: 16px;
}

/* ==========================================
   BUTTONS
   ========================================== */

.button {
  display: inline-block;
  padding: 15px 30px;
  margin-top: 12px;
  background: var(--coral);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.button:hover {
  background: var(--coral-hover);
  transform: translateY(-2px);
}

/* ==========================================
   CONTACT
   ========================================== */

.contact-section {
  text-align: center;
}

.contact-section p {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================
   FOOTER
   ========================================== */

footer {
  background: var(--dark);
  color: var(--white);
  padding: 35px 0;
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 14px;
}

/* ==========================================
   INTERACTIVE BASKET
   ========================================== */

.logo-scene.basket-active {
  cursor: none;
}

.catch-basket {
  position: absolute;
  z-index: 20;
  width: 30px;
  height: 30px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -45%);
  transition: opacity 0.15s ease;
  filter: drop-shadow(
    0 3px 3px rgba(0, 0, 0, 0.15)
  );
}

.logo-scene.basket-active .catch-basket {
  opacity: 1;
}

.catch-basket svg {
  display: block;
  width: 100%;
  height: 100%;
}

.basket-handle,
.basket-rim {
  stroke: #806044;
}

.basket-body {
  fill: #c49a69;
  stroke: #806044;
}

.basket-weave {
  stroke: #936f4b;
}

/* Unlimited collection counter */

.basket-counter {
  position: absolute;
  left: 50%;
  bottom: -17px;
  transform: translateX(-50%);
  min-width: 16px;
  padding: 1px 4px;
  background: var(--cream);
  color: var(--dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  font: 700 10px Arial, sans-serif;
  text-align: center;
  white-space: nowrap;
}

/* Golden basket */

.catch-basket.golden .basket-handle,
.catch-basket.golden .basket-rim {
  stroke: var(--gold-dark);
}

.catch-basket.golden .basket-body {
  fill: var(--gold);
  stroke: var(--gold-dark);
}

.catch-basket.golden .basket-weave {
  stroke: #c49124;
}

.catch-basket.golden .basket-counter {
  color: #8b610c;
  border-color: #e4c35e;
  background: #fff6d4;
}

/* Catching bounce */

.catch-basket.basket-catch svg {
  animation: basketCatch 0.25s ease;
}

@keyframes basketCatch {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
  }
}

/* ==========================================
   CLIMBING MONKEY
   ========================================== */

.tree-monkey {
  position: absolute;
  z-index: 12;
  left: 44%;
  top: 19%;
  width: 34px;
  height: 45px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    left 2.7s ease-in-out,
    top 2.7s ease-in-out;
}

.monkey-character {
  width: 100%;
  height: 100%;
  transform:
    scaleX(var(--monkey-direction, 1));
  transform-origin: center;
  filter: drop-shadow(
    0 2px 2px rgba(0, 0, 0, 0.16)
  );
}

.monkey-character svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Monkey climbing */

.tree-monkey.monkey-climbing .monkey-character {
  animation: monkeyClimb 0.5s ease-in-out infinite;
}

@keyframes monkeyClimb {
  0%, 100% {
    transform:
      scaleX(var(--monkey-direction, 1))
      rotate(-7deg)
      translateY(0);
  }

  50% {
    transform:
      scaleX(var(--monkey-direction, 1))
      rotate(7deg)
      translateY(-3px);
  }
}

/* Tail movement */

.monkey-tail {
  transform-origin: 28px 57px;
  animation: monkeyTail 2.8s ease-in-out infinite;
}

@keyframes monkeyTail {
  0%, 100% {
    transform: rotate(-5deg);
  }

  50% {
    transform: rotate(7deg);
  }
}

/* Monkey celebrating */

.tree-monkey.monkey-talking .monkey-character {
  animation: monkeyCelebrate 0.7s ease-in-out 2;
}

@keyframes monkeyCelebrate {
  0%, 100% {
    transform:
      scaleX(var(--monkey-direction, 1))
      translateY(0);
  }

  50% {
    transform:
      scaleX(var(--monkey-direction, 1))
      translateY(-5px)
      rotate(-6deg);
  }
}

/* ==========================================
   MONKEY SPEECH BUBBLE
   ========================================== */

/*
   The bubble is positioned relative to
   the logo scene, not the moving monkey.
   JavaScript calculates a safe location.
*/

.monkey-speech {
  position: absolute;
  z-index: 30;

  width: 230px;
  max-width: calc(100% - 16px);

  padding: 13px 16px;

  background: #fffdf5;
  color: var(--dark);

  border: 2px solid var(--gold-dark);
  border-radius: 16px;

  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.14);

  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(8px) scale(0.94);
  transform-origin: center;

  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s;
}

.monkey-speech.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Speech bubble pointer */

.monkey-speech::after {
  content: "";
  position: absolute;
  left: var(--arrow-x, 50%);
  width: 12px;
  height: 12px;
  background: #fffdf5;
  transform: translateX(-50%) rotate(45deg);
}

/* Bubble is below monkey */

.monkey-speech.speech-below::after {
  top: -8px;
  border-left: 2px solid var(--gold-dark);
  border-top: 2px solid var(--gold-dark);
}

/* Bubble is above monkey */

.monkey-speech.speech-above::after {
  bottom: -8px;
  border-right: 2px solid var(--gold-dark);
  border-bottom: 2px solid var(--gold-dark);
}

/* Old popup is no longer used */

.blossom-reward {
  display: none !important;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-header nav {
    gap: 30px;
  }
}

@media (max-width: 700px) {
  .site-header .brand {
    padding: 15px;
  }

  .logo-scene {
    width: min(360px, 100%);
  }

  .site-header nav {
    gap: 10px 20px;
    padding: 10px;
  }

  .site-header nav a {
    min-height: 45px;
    font-size: 15px;
    letter-spacing: 0.3px;
  }

  .hero,
  .page-hero {
    padding: 70px 0;
  }

  .section {
    padding: 65px 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .tree-monkey {
    width: 28px;
    height: 37px;
  }

  .monkey-speech {
    width: 190px;
    font-size: 12px;
    padding: 10px 12px;
  }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

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

  .logo-scene,
  .logo-tree,
  .logo-water,
  .petal,
  .tree-monkey,
  .monkey-character,
  .monkey-tail,
  .catch-basket,
  .monkey-speech {
    animation: none !important;
    transition: none !important;
  }
}


/* ==========================================
   KORAALBOOM HOMEPAGE
   IMAGE AND CONTENT LAYOUT
   ========================================== */

.home-hero {
  padding: 90px 0 100px;
  background: #faf8f3;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 65px;
}

.home-hero-content h1 {
  font-size: clamp(40px, 4.6vw, 66px);
  line-height: 1.12;
  letter-spacing: -1.8px;
  margin: 20px 0 28px;
}

.home-lead {
  font-size: 19px;
  line-height: 1.85;
  color: #626c68;
  max-width: 530px;
}

.home-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 30px;
}

.home-secondary-link,
.home-text-link {
  color: #293532;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid #e7462d;
  padding-bottom: 4px;
}

.home-secondary-link:hover,
.home-text-link:hover {
  color: #e7462d;
}

.home-hero-image {
  position: relative;
}

.home-hero-image img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(41,53,50,0.12);
}

.home-hero-image::after {
  content: "";
  position: absolute;
  width: 85px;
  height: 7px;
  background: #e7462d;
  bottom: -18px;
  left: 25px;
  border-radius: 3px;
}

/* ==========================================
   GENERAL HOMEPAGE SECTIONS
   ========================================== */

.home-section {
  padding: 100px 0;
}

.home-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.home-section-content h2 {
  font-size: clamp(30px, 3.5vw, 45px);
  margin: 15px 0 25px;
}

.home-section-content p {
  color: #626c68;
  font-size: 17px;
  line-height: 1.9;
}

.home-section-content .home-text-link {
  display: inline-block;
  margin-top: 10px;
}

.home-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-illustration img {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  object-fit: contain;
}

/* ==========================================
   OUR APPROACH
   ========================================== */

.home-approach {
  background: #ffffff;
}

.home-approach .home-illustration img {
  max-width: 460px;
}

/* ==========================================
   SERVICES
   ========================================== */

.home-services {
  background: #f4f0e6;
}

.home-section-heading {
  max-width: 740px;
  margin: 0 auto 60px;
  text-align: center;
}

.home-section-heading h2 {
  margin: 15px 0 25px;
}

.home-section-heading > p:not(.eyebrow) {
  color: #626c68;
  font-size: 17px;
  line-height: 1.8;
}

.home-services-layout {
  gap: 70px;
}

.home-services-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 25px;
}

.home-service-item {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 18px;
  padding-bottom: 25px;
  border-bottom: 1px solid #ded6c6;
  width: 100%;
}

.home-service-number {
  color: #e7462d;
  font-size: 15px;
  font-weight: 700;
  padding-top: 4px;
}

.home-service-item h3 {
  font-size: 22px;
  margin: 0 0 10px;
}

.home-service-item p {
  font-size: 16px;
  color: #626c68;
  line-height: 1.8;
  margin: 0;
}

.home-services-list .button {
  margin-top: 5px;
}

/* ==========================================
   WHY KORAALBOOM
   ========================================== */

.home-values {
  background: #ffffff;
}

.home-values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.home-value-card {
  background: #faf8f3;
  border: 1px solid #e6e1d8;
  border-radius: 8px;
  padding: 35px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.home-value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(41,53,50,0.07);
}

.home-value-icon {
  display: inline-block;
  color: #e7462d;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 22px;
}

.home-value-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
}

.home-value-card p {
  font-size: 16px;
  color: #626c68;
  line-height: 1.8;
  margin: 0;
}

/* ==========================================
   FINAL CALL TO ACTION
   ========================================== */

.home-contact-cta {
  background: #e8dfca;
}

.home-collaboration-image img {
  max-width: 470px;
}

/* ==========================================
   ATTRIBUTION
   ========================================== */

.home-attribution {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.75;
}

.home-attribution a {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================
   RESPONSIVE HOMEPAGE
   ========================================== */

@media (max-width: 900px) {

  .home-hero-grid,
  .home-split {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .home-hero {
    padding: 70px 0;
  }

  .home-hero-image img {
    height: 360px;
  }

  .home-section {
    padding: 75px 0;
  }

  .home-approach .home-illustration {
    order: 2;
  }

  .home-approach .home-section-content {
    order: 1;
  }

  .home-values-grid {
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width: 600px) {

  .home-hero-content h1 {
    font-size: 40px;
  }

  .home-lead {
    font-size: 17px;
  }

  .home-hero-image img {
    height: 250px;
  }

  .home-section {
    padding: 60px 0;
  }

  .home-values-grid {
    grid-template-columns: 1fr;
  }

  .home-value-card {
    padding: 28px;
  }

  .home-section-heading {
    margin-bottom: 40px;
  }

  .home-services-layout {
    gap: 35px;
  }

}
