@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400&display=swap');

:root {
  color-scheme: dark;
  --bg: #090916;
  --cream: #f3e9e8;
  --muted: #a69aaa;
  --pink: #e9a4bc;
  --line: rgba(238, 211, 225, .17);
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 51% 48%, rgba(75, 37, 79, .25), transparent 42%),
    radial-gradient(ellipse at 50% 100%, rgba(34, 32, 75, .24), transparent 55%),
    var(--bg);
  color: var(--cream);
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; }

.experience {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  padding: 27px clamp(20px, 5vw, 76px) 20px;
  display: flex;
  flex-direction: column;
}
.experience::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .22;
  background-image: radial-gradient(rgba(255,255,255,.65) .55px, transparent .8px);
  background-size: 37px 37px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.ambient {
  position: absolute;
  z-index: -1;
  width: 42vw;
  height: 42vw;
  min-width: 340px;
  min-height: 340px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .12;
  pointer-events: none;
}
.ambient-one { background: #9f477e; left: 4%; top: 25%; }
.ambient-two { background: #5b5ca5; right: -8%; bottom: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 3;
}
.wordmark {
  color: #e9dfe8;
  text-decoration: none;
  font-family: 'DM Mono', monospace;
  letter-spacing: .19em;
  font-size: 10px;
}
.wordmark span { color: #e4a1be; margin-left: 8px; font-size: 14px; }
.top-note {
  color: rgba(221, 205, 220, .55);
  font-family: 'DM Mono', monospace;
  letter-spacing: .12em;
  font-size: 9px;
  text-transform: uppercase;
}

.hero-copy {
  position: absolute;
  z-index: 2;
  top: clamp(112px, 15vh, 165px);
  left: clamp(24px, 8vw, 130px);
  pointer-events: none;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #d99bb5;
  font: 10px 'DM Mono', monospace;
  letter-spacing: .22em;
}
.eyebrow-line { width: 27px; height: 1px; background: #d99bb5; opacity: .8; }
h1 {
  margin: 17px 0 15px;
  color: #f4e9ef;
  font: 500 clamp(39px, 5vw, 69px)/.94 'Cormorant Garamond', serif;
  letter-spacing: -.035em;
}
h1 em { color: #dba5ba; font-weight: 400; }
.intro {
  color: rgba(223, 210, 221, .67);
  font-size: 12px;
  line-height: 1.95;
  font-weight: 300;
  letter-spacing: .025em;
}

.flower-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 1000px);
  height: clamp(420px, 70vh, 760px);
  min-height: 390px;
  margin: auto;
  display: grid;
  place-items: center;
}
.canvas-wrap {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
  outline: none;
}
.canvas-wrap:active { cursor: grabbing; }
.canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.stage-glow {
  position: absolute;
  width: min(68vw, 660px);
  height: min(55vw, 520px);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(177, 83, 136, .13), rgba(83, 54, 105, .06) 43%, transparent 70%);
  filter: blur(22px);
  pointer-events: none;
}
.stage-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: rgba(211, 192, 211, .48);
  font: 9px 'DM Mono', monospace;
  letter-spacing: .18em;
  pointer-events: none;
}
.caption-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 8px 1px 0;
  background: #d99bb5;
  border-radius: 50%;
  box-shadow: 0 0 9px #e4a1be;
}
.caption-separator { padding: 0 7px; color: #9e7895; }
.loading, .error-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(239, 220, 233, .68);
  font: 10px 'DM Mono', monospace;
  letter-spacing: .08em;
  white-space: nowrap;
  pointer-events: none;
}
.loading span {
  display: inline-block;
  width: 6px; height: 6px; margin-right: 9px;
  border-radius: 50%; background: #e4a1be;
  animation: pulse 1.2s ease-in-out infinite;
}
.error-message { color: #f0b6bc; white-space: normal; width: min(90%, 360px); text-align: center; line-height: 1.8; }
@keyframes pulse { 50% { opacity: .2; transform: scale(.65); } }

.interaction-hint {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: rgba(208, 192, 207, .58);
  font: 9px 'DM Mono', monospace;
  letter-spacing: .06em;
  margin-top: -5px;
}
.interaction-hint b { color: #c38ca9; font-weight: 400; padding: 0 3px; }
.gesture-icon {
  position: relative;
  display: inline-block;
  width: 16px; height: 20px;
  border: 1px solid rgba(220, 190, 214, .55);
  border-radius: 8px;
}
.gesture-icon::after {
  content: "";
  position: absolute;
  top: 3px; left: 6px;
  width: 2px; height: 4px;
  border-radius: 3px;
  background: #e8a6c0;
  animation: swipe 1.5s ease-in-out infinite;
}
.gesture-icon i { display: none; }
@keyframes swipe { 50% { transform: translateY(6px); opacity: .3; } }

.controls {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px 0 23px;
}
.control-button {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(228, 198, 220, .21);
  border-radius: 50%;
  color: #e8d8e4;
  background: rgba(35, 25, 46, .42);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
}
.control-button:hover {
  border-color: rgba(232, 164, 192, .7);
  background: rgba(88, 48, 79, .52);
}
.control-button:active { transform: scale(.93); }
.reset-button {
  width: auto;
  min-width: 133px;
  height: 36px;
  grid-auto-flow: column;
  gap: 8px;
  padding: 0 14px;
  border-radius: 30px;
  font: 8px 'DM Mono', monospace;
  letter-spacing: .13em;
}
.reset-button svg { width: 13px; height: 13px; fill: none; stroke: #d9a6bd; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.footer { position: relative; z-index: 2; text-align: center; }
.footer-rule { width: 42px; height: 1px; margin: 0 auto 13px; background: rgba(230, 179, 207, .36); }
.footer-message {
  margin: 0;
  color: rgba(218, 200, 216, .48);
  font: italic 14px 'Cormorant Garamond', serif;
  letter-spacing: .04em;
}
.dedication {
  margin: 8px 0 0;
  color: rgba(226, 188, 208, .62);
  font: 9px 'Manrope', sans-serif;
  letter-spacing: .2em;
}

@media (max-width: 700px) {
  .experience { min-height: 100svh; padding: 20px 19px 17px; }
  .top-note { font-size: 7px; letter-spacing: .08em; }
  .hero-copy { top: 92px; left: 25px; }
  h1 { font-size: clamp(42px, 11vw, 58px); margin-top: 13px; }
  .intro { font-size: 11px; }
  .flower-stage { height: min(62svh, 610px); min-height: 390px; margin-top: 170px; margin-bottom: 0; }
  .stage-caption { bottom: 12px; font-size: 8px; }
  .interaction-hint { font-size: 8px; margin-top: 0; }
  .controls { margin: 17px 0 19px; }
  .footer-message { font-size: 13px; }
}
@media (max-height: 730px) and (min-width: 701px) {
  .hero-copy { top: 105px; }
  .flower-stage { height: 72vh; min-height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
