/* Crystal Grove: Puzzle — base, layout and components (mobile first) */


* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gem-cyan); }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Sticky header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 56px;
  background: rgba(8, 10, 26, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge);
}

.header-inner {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--edge-strong);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.header-nav { display: none; }

.header-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--night-deep);
  background: linear-gradient(135deg, var(--gem-cyan), var(--gem-violet-lt));
  transition: filter 0.25s var(--ease), transform 0.25s var(--ease);
}

.header-cta-icon { width: 20px; height: 20px; fill: currentColor; }
.header-cta-label { display: none; }
.header-cta:hover { filter: brightness(1.1); }
.header-cta:active { transform: scale(0.95); }

/* ---------- Hero: visual first, glass panel overlapping ---------- */

.hero {
  position: relative;
  padding: 20px 0 42px;
  overflow: hidden;
}

.hero-aura {
  position: absolute;
  inset: -20% -30% auto -30%;
  height: 70%;
  background:
    radial-gradient(50% 60% at 22% 30%, rgba(167, 101, 239, 0.5), transparent 70%),
    radial-gradient(45% 55% at 78% 20%, rgba(79, 220, 243, 0.32), transparent 72%),
    radial-gradient(40% 50% at 55% 75%, rgba(240, 122, 168, 0.28), transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.hero-inner { position: relative; }

.hero-visual { margin: 0; }

.hero-facet {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--edge-strong);
  box-shadow: 0 26px 60px rgba(3, 4, 12, 0.7);
  clip-path: polygon(0 5%, 5% 0, 95% 0, 100% 5%, 100% 95%, 95% 100%, 5% 100%, 0 95%);
}

.hero-facet img { width: 100%; }

.hero-facet::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 26, 0) 45%, rgba(8, 10, 26, 0.85) 100%);
}

.hero-card {
  position: relative;
  margin-top: -34px;
  padding: 24px 20px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(27, 32, 71, 0.96), rgba(11, 14, 34, 0.97));
  border: 1px solid var(--edge-strong);
  box-shadow: 0 20px 50px rgba(3, 4, 12, 0.6);
}

.hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  border: 1px solid var(--edge-strong);
  box-shadow: 0 12px 28px rgba(167, 101, 239, 0.35);
  margin-bottom: 14px;
}

.hero-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gem-cyan);
}

.hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-lede {
  margin: 0 0 22px;
  font-size: 16px;
  color: var(--text-dim);
}

.hero-notes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
}

.hero-notes li {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(198, 210, 255, 0.06);
}

/* ---------- Store buttons: faceted glass plates ---------- */

.store-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 18px;
  border-radius: 18px;
  font-family: var(--font-body);
  text-decoration: none;
  text-align: left;
  overflow: hidden;
  border: 1px solid var(--edge-strong);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.store-glyph { width: 26px; height: 26px; flex: none; fill: currentColor; }

.store-text { display: flex; flex-direction: column; line-height: 1.2; }

.store-top {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.store-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.store-btn-play {
  color: var(--night-deep);
  background: linear-gradient(140deg, #7ce9f7 0%, #b58bf7 55%, #f08cb8 100%);
  box-shadow: 0 14px 30px rgba(120, 90, 230, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Prismatic sheen sweep on interaction */
.store-btn-play::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s var(--ease);
}

.store-btn-play:hover::before { left: 115%; }
.store-btn-play:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(120, 90, 230, 0.5); }
.store-btn-play:active { transform: translateY(1px) scale(0.99); }

.store-btn-soon {
  color: #e8e8e8;
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.16);
  opacity: 0.55;
  filter: grayscale(0.6);
  cursor: not-allowed;
  font: inherit;
}

.soon-flag {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #f5f5f5;
}

/* ---------- Section shells ---------- */

.features, .download, .about { padding: 56px 0; }

.section-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gem-pink);
}

.section-title { font-size: 26px; font-weight: 700; }

.section-lede {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--text-dim);
  max-width: 56ch;
}

/* ---------- Features: faceted hex crystal panels ---------- */

.feature-grid {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.feature-card {
  position: relative;
  padding: 22px 20px;
  background: linear-gradient(160deg, var(--panel-soft), var(--panel));
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--facet, var(--gem-violet)) 0%, transparent 55%);
  opacity: 0.1;
  pointer-events: none;
}

.feature-card:hover { transform: translateY(-4px); border-color: var(--edge-strong); }
.feature-card:active { transform: translateY(-1px); }

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: rgba(198, 210, 255, 0.08);
  border: 1px solid var(--edge);
  color: var(--facet, var(--gem-violet));
}

.feature-icon svg { width: 24px; height: 24px; fill: currentColor; }

.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { margin: 0; font-size: 15px; color: var(--text-dim); }

.facet-violet { --facet: var(--gem-violet-lt); }
.facet-cyan   { --facet: var(--gem-cyan); }
.facet-pink   { --facet: var(--gem-pink); }
.facet-gold   { --facet: var(--gem-gold); }
.facet-green  { --facet: var(--gem-green); }
.facet-azure  { --facet: var(--gem-azure); }

/* ---------- Download band ---------- */

.download {
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(167, 101, 239, 0.32), transparent 70%),
    linear-gradient(180deg, #0b0e22, #05060f);
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
}

.download-inner { text-align: center; }

.download-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 22px;
  border: 1px solid var(--edge-strong);
  box-shadow: 0 16px 36px rgba(79, 220, 243, 0.28);
}

.download h2 { font-size: 28px; font-weight: 700; }

.download-lede {
  margin: 14px auto 26px;
  max-width: 52ch;
  font-size: 16px;
  color: var(--text-dim);
}

.store-row-centered { max-width: 420px; margin: 0 auto; }

.download-note {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--text-mute);
}

/* ---------- About ---------- */

.about-inner { max-width: 68ch; }
.about-inner p { color: var(--text-dim); font-size: 16px; margin: 18px 0 0; }
.about-contact { font-weight: 600; }
.about-contact a { color: var(--gem-cyan); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--night-deep);
  border-top: 1px solid var(--edge);
  padding: 36px 0 calc(96px + env(safe-area-inset-bottom));
}

.footer-brand { display: flex; align-items: center; gap: 12px; }

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--edge-strong);
}

.footer-name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.footer-tag { margin: 2px 0 0; font-size: 13px; color: var(--text-mute); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 22px 0 18px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-links a:hover { color: var(--gem-cyan); text-decoration: underline; }

.footer-legal { margin: 0; font-size: 13px; color: var(--text-mute); }

/* ---------- Mobile sticky CTA ---------- */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(8, 10, 26, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--edge-strong);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease);
}

.sticky-cta.is-visible { transform: translateY(0); }

.sticky-cta img { width: 36px; height: 36px; border-radius: 10px; }

.sticky-copy {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--night-deep);
  background: linear-gradient(140deg, #7ce9f7, #b58bf7 60%, #f08cb8);
  box-shadow: 0 8px 20px rgba(120, 90, 230, 0.42);
}

.sticky-btn:active { transform: scale(0.97); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
