:root {
  --ink: #000000;
  --ember: #d35400;
  --ember-glow: #e87a2a;
  --clay: #3a2418;
  --cream: #f3e6d0;
  --fog: rgba(243, 230, 208, 0.72);
  --line: rgba(243, 230, 208, 0.14);
  --font-logo: "Coiny", "Comic Sans MS", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  color-scheme: dark;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--cream);
  font-family: var(--font-body);
  background: #000;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  color: inherit;
}

.hero {
  height: 100svh;
  max-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: stretch;
  background: #000;
  padding: clamp(1.25rem, 4vh, 2.5rem) 1.25rem
    max(clamp(1rem, 2.5vh, 1.35rem), env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: min(100%, 36rem);
  align-self: center;
}

.hero__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--fog);
  animation: rise 1.1s var(--ease) both;
}

/* Logo-matched wordmark: bubbly orange + dark chocolate outline */
.hero__title {
  margin: 0.7rem 0 0;
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: clamp(3.6rem, 15vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ember);
  -webkit-text-stroke: 3px var(--clay);
  paint-order: stroke fill;
  text-shadow:
    0 3px 0 var(--clay),
    0 8px 18px rgba(0, 0, 0, 0.45);
  animation: rise 1.15s var(--ease) 0.08s both;
}

.hero__title span {
  display: block;
}

.hero__title span:last-child {
  margin-top: -0.04em;
}

.plant-btn {
  position: relative;
  display: grid;
  justify-items: center;
  margin-top: 1.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease);
  animation: rise 1.15s var(--ease) 0.16s both;
}

.plant-btn:hover,
.plant-btn:focus-visible {
  transform: translateY(-3px) scale(1.03);
  outline: none;
}

.plant-btn:focus-visible .plant-btn__pot {
  filter: drop-shadow(0 0 10px rgba(232, 122, 42, 0.45));
}

.plant-btn:disabled {
  cursor: wait;
}

.plant-btn__scene {
  position: relative;
  width: 150px;
  height: 160px;
  display: grid;
  place-items: end center;
}

.plant-btn__pot {
  width: 130px;
  display: block;
}

.plant-btn__pot svg {
  width: 100%;
  height: auto;
  overflow: visible;
  display: block;
}

.plant-btn__can {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 58px;
  opacity: 0;
  transform: translate(18px, -12px) rotate(-18deg);
  z-index: 2;
}

.plant-btn__can svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.plant-btn__drops {
  position: absolute;
  top: 48px;
  right: 44px;
  width: 28px;
  height: 50px;
  pointer-events: none;
  z-index: 3;
}

.plant-btn__drops i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 5px;
  height: 10px;
  border-radius: 50% 50% 55% 55%;
  background: #7ec8e3;
  opacity: 0;
  transform: translateX(-50%);
}

.plant-btn__sparkles {
  opacity: 0;
}

.plant-btn__flower,
.plant-btn__leaf,
.plant-btn__stem {
  transform-box: fill-box;
  transform-origin: center;
}

.water-hint {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(243, 230, 208, 0.55);
  animation: pulse-hint 2.4s ease-in-out infinite;
}

.hero__content:has(.plant-btn.is-watering) .water-hint {
  opacity: 0.25;
  animation: none;
}

.hero__ig,
.hero__ig:link,
.hero__ig:visited,
.hero__ig:active {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ember-glow);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  -webkit-text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
  animation: rise 1.15s var(--ease) 0.28s both;
}

.hero__ig span {
  color: inherit;
  text-decoration: none;
  -webkit-text-decoration: none;
}

.hero__ig:hover,
.hero__ig:focus-visible {
  opacity: 1;
  color: var(--cream);
  outline: none;
}

.hero__ig:hover .hero__ig-icon rect,
.hero__ig:hover .hero__ig-icon circle:not(.hero__ig-icon-dot) {
  stroke: var(--cream);
}

.hero__ig:hover .hero__ig-icon-dot {
  fill: var(--cream);
}

.hero__ig-icon {
  width: 1rem;
  height: 1rem;
  max-width: 1rem;
  max-height: 1rem;
  flex-shrink: 0;
  display: block;
}

/* Watering sequence ~2.5s */
.plant-btn.is-watering .plant-btn__can {
  animation: can-pour 2.4s var(--ease) forwards;
}

.plant-btn.is-watering .plant-btn__drops i {
  animation: drop-fall 0.85s ease-in forwards;
}

.plant-btn.is-watering .plant-btn__drops i:nth-child(1) {
  left: 35%;
  animation-delay: 0.55s;
}
.plant-btn.is-watering .plant-btn__drops i:nth-child(2) {
  left: 50%;
  animation-delay: 0.75s;
}
.plant-btn.is-watering .plant-btn__drops i:nth-child(3) {
  left: 65%;
  animation-delay: 0.95s;
}
.plant-btn.is-watering .plant-btn__drops i:nth-child(4) {
  left: 42%;
  animation-delay: 1.15s;
}
.plant-btn.is-watering .plant-btn__drops i:nth-child(5) {
  left: 58%;
  animation-delay: 1.35s;
}

.plant-btn.is-watering .plant-btn__flower {
  animation: bloom 1.1s var(--ease) 1.2s both;
}

.plant-btn.is-watering .plant-btn__leaf--l {
  animation: leaf-wave-l 1s var(--ease) 1.1s both;
}

.plant-btn.is-watering .plant-btn__leaf--r {
  animation: leaf-wave-r 1s var(--ease) 1.1s both;
}

.plant-btn.is-watering .plant-btn__sparkles {
  animation: sparkle 1.1s ease 1.5s both;
}

/* Modal */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  animation: fade-in 0.28s ease both;
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  padding: 1.35rem 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #0c0a09;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: panel-in 0.4s var(--ease) both;
}

.modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.95rem;
  border: 0;
  background: transparent;
  color: rgba(243, 230, 208, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.modal__close:hover,
.modal__close:focus-visible {
  color: var(--ember-glow);
  outline: none;
}

.modal__title {
  margin: 0 2.5rem 0.95rem 0;
  font-family: var(--font-logo);
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ember);
  -webkit-text-stroke: 2px var(--clay);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 var(--clay);
  text-align: center;
}

.modal__poster {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(211, 84, 0, 0.35);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-hint {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.95;
  }
}

@keyframes can-pour {
  0% {
    opacity: 0;
    transform: translate(18px, -12px) rotate(-18deg);
  }
  18% {
    opacity: 1;
    transform: translate(0, 0) rotate(-8deg);
  }
  40% {
    opacity: 1;
    transform: translate(-6px, 8px) rotate(28deg);
  }
  78% {
    opacity: 1;
    transform: translate(-6px, 8px) rotate(28deg);
  }
  100% {
    opacity: 0;
    transform: translate(10px, -8px) rotate(-10deg);
  }
}

@keyframes drop-fall {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.7);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 42px) scale(0.85);
  }
}

@keyframes bloom {
  0% {
    transform: scale(0.86);
  }
  55% {
    transform: scale(1.16);
  }
  100% {
    transform: scale(1.05);
  }
}

@keyframes leaf-wave-l {
  0% {
    transform: rotate(-28deg);
  }
  40% {
    transform: rotate(-40deg);
  }
  100% {
    transform: rotate(-24deg);
  }
}

@keyframes leaf-wave-r {
  0% {
    transform: rotate(28deg);
  }
  40% {
    transform: rotate(40deg);
  }
  100% {
    transform: rotate(24deg);
  }
}

@keyframes sparkle {
  0% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__eyebrow,
  .hero__title,
  .plant-btn,
  .water-hint,
  .hero__ig,
  .plant-btn.is-watering .plant-btn__can,
  .plant-btn.is-watering .plant-btn__drops i,
  .plant-btn.is-watering .plant-btn__flower,
  .plant-btn.is-watering .plant-btn__leaf--l,
  .plant-btn.is-watering .plant-btn__leaf--r,
  .plant-btn.is-watering .plant-btn__sparkles,
  .modal__backdrop,
  .modal__panel {
    animation: none !important;
  }

  .water-hint {
    opacity: 0.7;
  }
}

@media (max-height: 700px) {
  .hero__title {
    font-size: clamp(3rem, 14vw, 5.5rem);
  }

  .plant-btn {
    margin-top: 0.85rem;
  }

  .plant-btn__scene {
    width: 120px;
    height: 130px;
  }

  .plant-btn__pot {
    width: 108px;
  }

  .water-hint {
    margin-top: 0.55rem;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(2.8rem, 16vw, 4.8rem);
  }

  .hero__ig {
    font-size: 0.68rem;
  }

  .hero__ig-icon {
    width: 0.92rem;
    height: 0.92rem;
  }
}
