/* Silvervine: Candy Match - Misty Rainforest Ruins landing page (mobile first) */
:root {
  --mist: #E6EBEE;
  --mist-vein: rgba(27, 63, 115, 0.06);
  --panel: #F4F6F8;
  --ink: #13233A;
  --ink-soft: #3E4B5C;
  --lagoon: #1B3F73;
  --lagoon-deep: #122C52;
  --teal: #1F6B5C;
  --canopy: #10302E;
  --canopy-text: #EAF1EF;
  --canopy-soft: #B9CCC8;
  --footer: #0C1A26;
  --berry: #E0457B;
  --mint: #46C2A0;
  --grape: #8A6FE0;
  --amber: #F2A341;
  --shadow: 0 14px 30px -18px rgba(18, 44, 82, 0.55);
  --chisel: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%, 0 14px);
  --leaf-radius: 22px 6px 22px 6px;
  --header-h: 48px;
  --font-display: Optima, Candara, "Gill Sans", "Gill Sans MT", "Trebuchet MS", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--mist);
  /* faint stone veining */
  background-image:
    repeating-linear-gradient(118deg, transparent 0 46px, var(--mist-vein) 46px 47px, transparent 47px 120px),
    repeating-linear-gradient(32deg, transparent 0 88px, var(--mist-vein) 88px 89px, transparent 89px 190px);
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lagoon); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: 0.01em; margin: 0 0 12px; }
h1 { font-size: 32px; }
h2 { font-size: 27px; }
h3 { font-size: 19px; }
p { margin: 0 0 14px; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--lagoon); color: #fff; padding: 10px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}
.eyebrow--light { color: var(--canopy-soft); }
.section-lead { color: var(--ink-soft); max-width: 640px; }

/* Chiseled stone stele surface */
.stele {
  position: relative;
  background: linear-gradient(180deg, #FAFBFC 0%, var(--panel) 100%);
  clip-path: var(--chisel);
  box-shadow: var(--shadow);
}

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  background: rgba(230, 235, 238, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(19, 35, 58, 0.1);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); }
.brand-icon { width: 32px; height: 32px; border-radius: 9px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.header-nav { display: none; }
.header-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--lagoon); color: #fff; text-decoration: none; font-weight: 600;
  transition: background-color 0.2s, transform 0.2s;
}
.header-cta:hover, .header-cta:active { background: var(--lagoon-deep); }
.header-cta:active { transform: scale(0.96); }
.header-cta-text { display: none; }
/* download arrow glyph */
.header-cta-icon { position: relative; width: 14px; height: 16px; }
.header-cta-icon::before { content: ""; position: absolute; left: 6px; top: 0; width: 2px; height: 11px; background: currentColor; }
.header-cta-icon::after { content: ""; position: absolute; left: 2px; top: 5px; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }

/* Hero */
.hero { padding: calc(var(--header-h) + 12px) 0 40px; }
.hero-inner { padding: 0 12px; }
.hero-canopy {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 22px 40px -24px rgba(12, 26, 38, 0.8);
  border: 4px solid #C9D2DA;
}
.hero-canopy img { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; }
.hero-icon {
  position: absolute; top: 0; left: 20px;
  width: 72px; height: 72px; border-radius: 18px;
  transform: translateY(-22%);
  box-shadow: 0 10px 18px -8px rgba(18, 44, 82, 0.6);
}
/* hero card keeps square-ish corners so the icon can break its top edge */
.hero-card { margin: -28px 8px 0; padding: 56px 20px 24px; overflow: visible; clip-path: none; border-radius: 4px; }
.hero-card::before {
  /* lagoon-to-teal top rule */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--lagoon), var(--teal));
}
.hero-lead { color: var(--ink-soft); font-size: 16px; }

.play-loop { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; }
.play-loop li {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  padding: 6px 12px; border-radius: 999px;
  background: #DDE5EA; color: var(--ink);
  animation: loop-step 4s infinite;
}
.play-loop li:nth-child(2) { animation-delay: 1s; }
.play-loop li:nth-child(3) { animation-delay: 2s; }
.play-loop li:nth-child(4) { animation-delay: 3s; }
@keyframes loop-step {
  0%, 22% { background: var(--lagoon); color: #fff; }
  25%, 100% { background: #DDE5EA; color: var(--ink); }
}

/* Store buttons: leaf-cut lagoon shape */
.store-buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.store-btn {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; width: 100%; padding: 8px 20px;
  border: 0; border-radius: var(--leaf-radius);
  font: inherit; text-align: left; text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s, border-radius 0.25s;
}
.store-btn--play {
  background: linear-gradient(180deg, #27548F 0%, var(--lagoon) 55%, var(--lagoon-deep) 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 20px -12px rgba(18, 44, 82, 0.9);
}
.store-btn--play:hover, .store-btn--play:active { border-radius: 6px 22px 6px 22px; transform: translateY(-1px); }
.store-btn--play:active { transform: translateY(1px) scale(0.98); }
.store-label { display: flex; flex-direction: column; line-height: 1.2; }
.store-label small { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.store-label strong { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.store-glyph { flex: none; width: 24px; height: 24px; position: relative; }
.store-glyph--play::before {
  content: ""; position: absolute; left: 5px; top: 2px;
  border-left: 17px solid var(--mint); border-top: 10px solid transparent; border-bottom: 10px solid transparent;
}
.store-glyph--apple::before {
  content: ""; position: absolute; left: 3px; top: 5px; width: 18px; height: 18px;
  border-radius: 50% 50% 46% 46%; background: #F0F0F0;
}
.store-glyph--apple::after {
  content: ""; position: absolute; left: 11px; top: 0; width: 6px; height: 6px;
  border-radius: 0 100% 0 100%; background: #F0F0F0;
}
/* Disabled App Store placeholder: neutral gray, never brand colored */
.store-btn--soon {
  background: #2A2A2A; color: #F0F0F0;
  opacity: 0.55; filter: grayscale(0.6); cursor: not-allowed;
}
.soon-tag {
  position: absolute; top: -8px; right: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: #F0F0F0; color: #2A2A2A;
}

/* Features */
.features { padding: 48px 0; }
.trail { position: relative; list-style: none; margin: 28px 0 0; padding: 0 0 0 30px; display: grid; gap: 18px; }
.trail::before {
  /* dotted path linking the steles */
  content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px;
  border-left: 3px dotted rgba(31, 107, 92, 0.55);
  transform-origin: top; transform: scaleY(var(--trail-progress, 1));
  transition: transform 1.4s ease-out;
}
.feature { padding: 22px 20px 18px; }
.feature p { color: var(--ink-soft); margin: 0; }
.feature h3 { padding-right: 44px; }
.jelly {
  position: absolute; top: 18px; right: 18px;
  width: 30px; height: 30px;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--jelly, var(--berry));
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.14), inset 3px 3px 0 rgba(255, 255, 255, 0.45);
}
.jelly--berry { --jelly: var(--berry); }
.jelly--lagoon { --jelly: #3C7BD6; }
.jelly--mint { --jelly: var(--mint); }
.jelly--grape { --jelly: var(--grape); }
.jelly--amber { --jelly: var(--amber); }
.feature:hover .jelly, .feature:active .jelly { animation: jelly-wobble 0.6s ease; }
@keyframes jelly-wobble {
  0% { transform: rotate(-45deg) scale(1, 1); }
  30% { transform: rotate(-45deg) scale(1.2, 0.82); }
  55% { transform: rotate(-45deg) scale(0.9, 1.12); }
  80% { transform: rotate(-45deg) scale(1.05, 0.96); }
  100% { transform: rotate(-45deg) scale(1, 1); }
}

/* Download band */
.download {
  position: relative; overflow: hidden;
  padding: 56px 0;
  background: radial-gradient(120% 90% at 50% 0%, #17423F 0%, var(--canopy) 60%);
  color: var(--canopy-text);
  text-align: center;
}
.download::before, .download::after {
  /* layered leaf silhouettes */
  content: ""; position: absolute; width: 180px; height: 180px;
  border-radius: 0 100% 0 100%; background: rgba(70, 194, 160, 0.1);
}
.download::before { left: -60px; top: -50px; transform: rotate(18deg); }
.download::after { right: -70px; bottom: -60px; transform: rotate(-24deg); }
.download-inner { position: relative; z-index: 1; }
.download-icon { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 18px; box-shadow: 0 12px 24px -12px #000; }
.download h2 { font-size: 30px; }
.download-lead { color: var(--canopy-soft); max-width: 560px; margin: 0 auto; }
.store-buttons--band { max-width: 360px; margin: 24px auto 0; }
.store-buttons--band .store-btn--play {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--mist) 100%); color: var(--ink);
}
.store-buttons--band .store-glyph--play::before { border-left-color: var(--teal); }

/* About */
.about { padding: 48px 0; }
.about-inner { display: grid; gap: 24px; }
.about-copy p { color: var(--ink-soft); }
.contact-card { padding: 24px 20px; }
.contact-card p { color: var(--ink-soft); }
.contact-mail {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; color: var(--lagoon); word-break: break-all;
}
.contact-mail:hover, .contact-mail:active { color: var(--teal); }

/* Footer */
.site-footer { background: var(--footer); color: #C3CFDA; padding: 32px 0 24px; font-size: 14px; }
.footer-inner { display: grid; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer-brand strong { display: block; color: #fff; font-family: var(--font-display); font-size: 16px; }
.site-footer a { color: #C3CFDA; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover, .site-footer a:active { color: #fff; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-copy { margin: 0; color: #9FB0BF; }

/* Mobile sticky download bar */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(244, 246, 248, 0.97);
  border-top: 1px solid rgba(19, 35, 58, 0.12);
  box-shadow: 0 -10px 24px -16px rgba(18, 44, 82, 0.6);
  transform: translateY(110%); transition: transform 0.35s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta img { width: 36px; height: 36px; border-radius: 9px; }
.sticky-cta-text { flex: 1; font-family: var(--font-display); font-weight: 600; font-size: 14px; line-height: 1.25; }
.sticky-cta-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: var(--leaf-radius); background: var(--lagoon); color: #fff; font-weight: 600; text-decoration: none;
}
.sticky-cta-btn:hover, .sticky-cta-btn:active { background: var(--lagoon-deep); }

/* Scroll reveal (enabled by JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Tablet */
@media (min-width: 768px) {
  :root { --header-h: 64px; }
  body { padding-bottom: 0; }
  h1 { font-size: 44px; }
  h2 { font-size: 34px; }
  .sticky-cta { display: none; }
  .header-nav { display: flex; gap: 6px; }
  .header-nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
    color: var(--ink); text-decoration: none; font-weight: 500; border-radius: 8px;
  }
  .header-nav a:hover, .header-nav a:active { background: rgba(27, 63, 115, 0.08); color: var(--lagoon); }
  .header-cta { width: auto; padding: 0 18px; border-radius: var(--leaf-radius); }
  .header-cta-icon { display: none; }
  .header-cta-text { display: inline; }
  .store-buttons { flex-direction: row; }
  .store-btn { width: auto; min-width: 210px; }
  .store-buttons--band { max-width: none; justify-content: center; }
  .trail { grid-template-columns: repeat(2, 1fr); padding-left: 0; }
  .trail::before { display: none; }
  .features, .about { padding: 72px 0; }
  .download { padding: 80px 0; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .footer-copy { grid-column: 1 / -1; }
}

/* Desktop: copy card overlaps the lower-left of the canopy banner */
@media (min-width: 1024px) {
  .hero { padding-bottom: 64px; }
  .hero-inner { padding: 0 20px; position: relative; }
  .hero-canopy { border-radius: 28px; border-width: 6px; }
  .hero-card { width: 560px; margin: -190px 0 0 40px; padding: 64px 36px 32px; }
  .hero-icon { width: 96px; height: 96px; border-radius: 24px; left: 36px; transform: translateY(-40%); }
  .hero-lead { font-size: 18px; }
  .trail { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .feature:nth-child(3n+2) { transform: translateY(24px); }
  .js .feature.reveal.is-in:nth-child(3n+2) { transform: translateY(24px); }
  .about-inner { grid-template-columns: 7fr 4fr; gap: 48px; align-items: start; }
  .download h2 { font-size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
