/* ==========================================================================
   Home page — dark opening, hand-written headline drawn by a leaf "pen",
   then a fade into white water where three leaves fall.
   ========================================================================== */

body.page-home { background: var(--night); }
.page-home a { color: var(--paper); }
.page-home a:hover { color: inherit; }

.home {
  position: relative;
  overflow: clip;
  background: var(--night);
  color: var(--paper);
  font-family: var(--font-script), var(--font-sans);
  font-size: 20px;
  line-height: 1.5;
}

/* ---------- Ambient light ---------- */

.home-aura {
  position: absolute;
  left: -10%;
  top: -200px;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226,167,94,0.22), rgba(226,167,94,0) 65%);
  pointer-events: none;
}
.home-shade {
  position: absolute;
  left: 45%;
  top: 420px;
  width: 1000px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(38,45,36,0.95), rgba(38,45,36,0) 68%);
  pointer-events: none;
}
/* Light that follows the pointer (positioned by home.js) */
.cursor-glow {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(.2,.7,.2,1), opacity 1.2s ease;
  will-change: transform;
}

/* ---------- Sticky header that turns light over the water ---------- */

.home-header {
  position: sticky;
  top: 0;
  z-index: 20;
  transition: background-color .8s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background-color: rgba(21,25,20,0.55);
}
.home-header .bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.home-header .brand { font-size: 26px; transition: color .8s ease; color: var(--paper); }
.home-header .nav-links a { transition: color .8s ease; color: var(--on-dark-3); }
.home-header.is-light { background-color: rgba(255,255,255,0.82); }
.home-header.is-light .brand { color: var(--night); }
.home-header.is-light .nav-links a { color: var(--text-2); }
.home-header .nav-links a:hover { color: var(--amber); }

/* ---------- Opening ---------- */

.opening {
  position: relative;
  min-height: 470px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px 10px;
  text-align: center;
}
.opening-inner { display: flex; flex-direction: column; align-items: center; gap: 48px; }
.opening h1 {
  font-weight: 400;
  color: var(--paper);
  font-size: clamp(44px, 6.2vw, 96px);
  line-height: 1.25;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.write-line { position: relative; display: inline-block; padding: 0 0.15em; }
.pen { position: absolute; left: 0; top: 62%; width: 0; height: 0; pointer-events: none; }
.pen img {
  position: absolute;
  left: 0;
  top: 0;
  width: 200px;
  max-width: none;
  transform-origin: 0 50%;
  transform: translateY(-50%) rotate(-55deg);
  filter: invert(1) drop-shadow(0 0 8px rgba(226,167,94,.55));
}

.pill {
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  background: var(--amber);
  color: var(--night) !important;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
  min-height: 52px;
  box-sizing: border-box;
  display: inline-block;
}
.pill--md { font-size: 17px; padding: 18px 46px; }
.pill--lg { font-size: 19px; padding: 20px 52px; }

/* ---------- Dusk-to-white transition ---------- */

.dusk {
  position: relative;
  height: 130px;
  background: linear-gradient(180deg, rgba(21,25,20,0) 0%, #6B6F68 50%, #FFFFFF 100%);
}

/* ---------- Three leaves (the water) ---------- */

.water {
  position: relative;
  min-height: 1220px;
  padding-bottom: 260px;
  overflow: hidden;
  background: #FFFFFF;
  color: var(--night);
}
.water-lines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(180deg, rgba(21,25,20,0.05) 0 1px, rgba(21,25,20,0) 1px 11px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, #000 25%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0));
  mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, #000 25%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0));
}
/* Ripples under the pointer (positioned by home.js) */
.pointer-ripple {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  transition: left 1.4s cubic-bezier(.2,.7,.2,1), top 1.4s cubic-bezier(.2,.7,.2,1), opacity 1s ease;
}
.ring {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  border: 1.2px solid rgba(21,25,20,0.32);
}

.water h2 {
  position: relative;
  padding-top: 60px;
  text-align: center;
  font-weight: 400;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.25;
  color: var(--night);
}

.leaves {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 64px 72px;
}
.leaf {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-decoration: none;
  width: 300px;
}
.leaf-rings { position: absolute; left: 50%; top: 96px; width: 0; height: 0; }
.leaf-float { position: relative; height: 190px; display: flex; align-items: center; justify-content: center; }
.leaf-label { font-size: 46px; line-height: 1; color: var(--night); }
.leaf-note {
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text-3);
}
.leaf-shape { transition: filter 1s ease; }
.leaf-label { transition: color 1s ease, text-shadow 1s ease; }
.leaf:hover .leaf-shape, .leaf:focus-visible .leaf-shape {
  filter: drop-shadow(0 0 6px rgba(226,167,94,.9)) drop-shadow(0 0 18px rgba(226,167,94,.6));
}
.leaf:hover .leaf-label, .leaf:focus-visible .leaf-label {
  color: var(--amber-deep) !important;
  text-shadow: 0 0 18px rgba(226,167,94,.55);
}
.leaf:focus-visible { outline: none; }

.water-cta {
  position: relative;
  z-index: 3;
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
  text-align: center;
  padding: 0 32px;
}

.water-footer {
  font-family: var(--font-sans);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}
.water-footer p:first-child { max-width: 760px; }
.water-footer .contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.page-home .water-footer a { color: var(--night); }

/* ---------- Motion ---------- */

@keyframes ep-arrive { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ep-breathe { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: .9; transform: scale(1.08); } }
@keyframes ep-rise { from { opacity: 0; transform: translateY(32px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ep-fall {
  0% { opacity: 0; transform: translate(-60px,-320px) rotate(-70deg); }
  55% { opacity: 1; transform: translate(40px,-120px) rotate(25deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes ep-bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
@keyframes ep-ripple {
  from { transform: translate(-50%,-50%) scale(.1); opacity: .85; }
  to { transform: translate(-50%,-50%) scale(1.7); opacity: 0; }
}
@keyframes ep-btnglow {
  0%,100% { box-shadow: 0 0 0 1px rgba(226,167,94,.55), 0 0 24px 4px rgba(226,167,94,.45), 0 0 72px 16px rgba(226,167,94,.2); }
  50% { box-shadow: 0 0 0 1px rgba(226,167,94,.4), 0 0 32px 8px rgba(226,167,94,.32), 0 0 96px 24px rgba(226,167,94,.12); }
}
/* The leaf travels in, dips to the baseline, then "writes" left to right */
@keyframes ep-penmove {
  0% { opacity: 0; left: -70%; top: -60%; animation-timing-function: ease-out; }
  10% { opacity: 1; left: -14%; top: -12%; animation-timing-function: ease-in-out; }
  15% { left: -8%; top: -26%; animation-timing-function: ease-in-out; }
  20.83% { left: 0%; top: 58%; animation-timing-function: linear; }
  87.5% { left: 100%; top: 58%; opacity: 1; animation-timing-function: ease-out; }
  100% { left: 100%; top: 38%; opacity: .9; }
}
@keyframes ep-pentilt {
  0% { transform: translateY(-50%) rotate(-30deg); }
  10% { transform: translateY(-50%) rotate(-8deg); }
  15% { transform: translateY(-50%) rotate(6deg); }
  20.83% { transform: translateY(-50%) rotate(-55deg); }
  37% { transform: translateY(-50%) rotate(-50deg); }
  54% { transform: translateY(-50%) rotate(-58deg); }
  70% { transform: translateY(-50%) rotate(-51deg); }
  87.5% { transform: translateY(-50%) rotate(-56deg); }
  100% { transform: translateY(-50%) rotate(-40deg); }
}
@keyframes ep-writeon { from { clip-path: inset(-20% 100% -20% 0); } to { clip-path: inset(-20% 0 -20% 0); } }
@keyframes ep-exitfade { to { opacity: 0; transform: translateY(-48px); filter: blur(4px); } }

.ep-l1 { animation: ep-arrive 1.4s ease-out .2s both; }
.ep-pen { animation: ep-penmove 2.4s linear .9s both; }
.ep-penleaf { animation: ep-pentilt 2.4s ease-in-out .9s both; }
.ep-write { display: inline-block; animation: ep-writeon 1.6s linear 1.4s both; }
.ep-cta1 { animation: ep-arrive 1.4s ease-out 3.1s both; }
.ep-breathe { animation: ep-breathe 9s ease-in-out infinite; }
.ep-bob { animation: ep-bob 6s ease-in-out infinite; }
.ep-ring { animation: ep-ripple 4.4s cubic-bezier(.2,.6,.3,1) infinite; }

.ep-glow { transition: box-shadow .7s ease, transform .7s ease; }
.ep-glow:hover, .ep-glow:focus-visible {
  transform: translateY(-1px);
  animation: ep-btnglow 3.2s ease-in-out infinite;
  outline: none;
}

/* Scroll-driven: the opening fades as it leaves, the leaves fall in as they enter */
@supports (animation-timeline: view()) {
  .ep-exit { animation: ep-exitfade linear both; animation-timeline: view(); animation-range: exit 0% exit 75%; }
  .ep-rise { animation: ep-rise linear both; animation-timeline: view(); animation-range: entry 5% cover 32%; }
  .ep-fall1, .ep-fall2, .ep-fall3 { animation: ep-fall linear both; animation-timeline: view(); }
  .ep-fall1 { animation-range: entry 0% cover 38%; }
  .ep-fall2 { animation-range: entry 18% cover 52%; }
  .ep-fall3 { animation-range: entry 32% cover 64%; }
}

@media (max-width: 600px) {
  .home-header .bar, .water-footer { padding-left: 24px; padding-right: 24px; }
  .leaf { margin-top: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ep-pen { display: none; }
  .ep-l1, .ep-write, .ep-cta1, .ep-exit, .ep-breathe, .ep-bob, .ep-ring,
  .ep-rise, .ep-fall1, .ep-fall2, .ep-fall3 { animation: none; }
  .ep-glow:hover { animation: none; transform: none; }
}
