/* ============================================================
   BUTTERFLY product landing page
   Self-contained styles.
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-2:      #f4f5f7;
  --ink:       #0d0d10;
  --ink-soft:  #4a4a52;
  --ink-dim:   #8a8a93;
  --accent:    #e97046;   /* 13fingerfx brand orange */
  --accent-hi: #cf5630;
  --line:      rgba(13,13,16,0.10);
  --maxw:      1240px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---------- Fixed 3D stage ---------- */
#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #edeef0;
}
#scene { display: block; width: 100%; height: 100%; position: relative; z-index: 1; }

/* loading dots */
#loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.6s var(--ease);
}
#loader.hidden { opacity: 0; pointer-events: none; }
.loader-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1s infinite ease-in-out;
}
.loader-dot:nth-child(2) { animation-delay: 0.15s; }
.loader-dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes pulse {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.3; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0));
  backdrop-filter: blur(6px);
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 46px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 32px); font-size: 0.92rem; font-weight: 500; }
.nav-links a { color: var(--ink-soft); transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease) !important;
}
.nav-cta:hover { background: var(--accent); color: #fff !important; }

/* ---------- Scrolling content ---------- */
#content { position: relative; z-index: 5; }

.panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 14vh clamp(20px, 6vw, 80px);
  pointer-events: none;
}
.panel-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
}
.panel-inner > * { pointer-events: auto; }

.align-left   { justify-content: flex-start; }
.align-right  { justify-content: flex-end;   }
.align-center { justify-content: center; text-align: center; }

.panel .eyebrow,
.panel h1, .panel h2, .panel p, .panel ul, .panel .hero-actions { max-width: 560px; }
.align-center .eyebrow,
.align-center h2,
.align-center .lede,
.align-center .hero-actions { margin-left: auto; margin-right: auto; }

.panel-inner > div {
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.86), rgba(255,255,255,0.55) 60%, rgba(255,255,255,0) 100%);
  border-radius: 18px;
  padding: 4px;
  margin: -4px;
}
.align-center .panel-inner > div,
.align-center > div {
  background: radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,0.9), rgba(255,255,255,0.6) 60%, rgba(255,255,255,0) 100%);
}

/* ---------- Typography ---------- */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 18px;
}
.display {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3.2rem, 11vw, 8.5rem);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  color: var(--ink);
}
.display-sm {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.panel h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.lede {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: var(--ink-soft);
  font-weight: 400;
  margin: 0 0 32px;
}
.body {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Buttons ---------- */
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px rgba(233,112,70,0.22); }
.btn--primary:hover { background: var(--accent-hi); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,0.6); }
.btn--ghost:hover { border-color: var(--ink-soft); }
.btn--sm { padding: 9px 18px; font-size: 0.9rem; }

/* ---------- Scroll hint ---------- */
.scroll-hint {
  margin-top: 56px;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.scroll-arrow { animation: bob 1.6s infinite var(--ease); display: inline-block; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- Skip intro button ---------- */
.skip-btn {
  position: fixed;
  z-index: 11;
  top: 22px; right: clamp(20px, 5vw, 56px);
  display: inline-flex;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  color: var(--ink-soft);
  font: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer;
  transition: opacity 0.4s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.skip-btn:hover { color: var(--ink); border-color: var(--ink-soft); }
.skip-btn.gone { opacity: 0; pointer-events: none; }
@media (max-width: 720px) { .skip-btn { top: auto; bottom: 18px; right: 18px; } }

/* ---------- Gallery panel ---------- */
.panel--gallery { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 35%, var(--bg) 100%); }

.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px auto 8px;
  max-width: 760px;
}
.pack {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 18px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(3px);
  text-align: center;
}
.pack h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem; margin: 0 0 6px; color: var(--ink);
}
.pack-contents { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 4px; min-height: 2.6em; }
.pack-price { color: var(--accent); font-weight: 700; margin: 0 0 14px; }

.custom-note { margin: 20px 0 34px; color: var(--ink-soft); font-size: 0.95rem; }
.custom-note a { color: var(--accent); font-weight: 600; }

.link-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
}
.link-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(3px);
  text-align: left;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.link-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.link-card span { display: block; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.link-card small { color: var(--ink-dim); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 5;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 30px clamp(20px, 6vw, 80px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ink-dim);
  font-size: 0.85rem;
}
.footer-note { color: var(--ink-dim); opacity: 0.85; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .panel { padding: 12vh 22px; }
  .align-right { justify-content: flex-start; }
  .pack-grid, .link-row { grid-template-columns: 1fr; }
  .pack-contents { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-arrow { animation: none; }
}
