/* Silvervine: Candy Match - mobile-first stylesheet
   Tone: Silver Canopy Calm. Deep canopy navy ground, matte silver tablets, candy tile accents. */

:root {
  --ground: #0B1622;
  --panel: #132232;
  --line: #2C4155;
  --ink: #E8EEF3;
  --ink-soft: #B3C0CC;
  --cobalt: #6FB0FF;
  --silver-hi: #E3E9EE;
  --silver-lo: #AEBBC7;
  --band: #D3DBE2;
  --band-ink: #0B1622;
  --band-soft: #33475A;
  --footer: #070E16;
  --berry: #FF6F9F;
  --cobalt-tile: #2F7BEA;
  --lime: #9BDB4D;
  --amber: #FFC44D;
  --soon-bg: #2A2A2A;
  --radius: 14px;
  --header-h: 48px;
  --font-display: "Avenir Next Condensed", "Franklin Gothic Medium", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, 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: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  /* Stone-like veining over the canopy ground */
  background:
    repeating-linear-gradient(118deg, transparent 0 46px, rgba(174, 187, 199, 0.035) 46px 47px, transparent 47px 120px),
    repeating-linear-gradient(32deg, transparent 0 80px, rgba(174, 187, 199, 0.03) 80px 81px, transparent 81px 170px),
    radial-gradient(120% 60% at 50% 0%, #15293D 0%, var(--ground) 60%);
  background-color: var(--ground);
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cobalt); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0 0 12px; letter-spacing: 0.01em; }
h1 { font-size: 34px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p { margin: 0 0 14px; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cobalt); margin-bottom: 8px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--silver-hi); color: var(--band-ink); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

/* Header (sticky, so it reserves its own height in the flow) */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(11, 22, 34, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: 0.04em; text-transform: uppercase; }
.header-nav { display: none; }
.header-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--band-ink); text-decoration: none; font-weight: 700;
  background: linear-gradient(160deg, var(--silver-hi), var(--silver-lo));
}
.header-cta-icon { width: 22px; height: 22px; }
.header-cta-text { display: none; }
.header-cta:hover, .header-cta:active { filter: brightness(1.08); }

/* Hero */
.hero { padding: 20px 0 40px; }
.hero-grid { display: grid; gap: 28px; }
.hero-window {
  position: relative; margin: 0;
  border-radius: 22px; padding: 6px;
  background: linear-gradient(150deg, var(--silver-hi), #7D8C9A 55%, var(--silver-lo));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.hero-banner { width: 100%; border-radius: 17px; aspect-ratio: 1024 / 500; object-fit: cover; }
.hero-window-icon {
  position: absolute; right: 14px; bottom: -26px;
  width: 72px; height: 72px; border-radius: 18px;
  border: 3px solid var(--silver-hi); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.hero-copy { padding-top: 8px; }
.hero-lead { font-size: 17px; color: var(--ink-soft); max-width: 34em; }

/* Store buttons: matte silver ingots */
.store-buttons { display: flex; flex-direction: column; gap: 12px; margin: 22px 0 26px; }
.store-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 8px 22px; border: 0; border-radius: var(--radius);
  font: inherit; text-decoration: none; text-align: left;
  color: var(--band-ink);
  background: linear-gradient(165deg, var(--silver-hi) 0%, #C8D1DA 45%, var(--silver-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(11, 22, 34, 0.18), 0 6px 16px rgba(0, 0, 0, 0.35);
  overflow: hidden; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-btn::after { /* sheen sweep */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg); transition: left 0.5s ease;
}
.store-btn:hover::after, .store-btn:active::after { left: 120%; }
.store-btn:hover { transform: translateY(-2px); }
.store-btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(11, 22, 34, 0.3); }
.store-btn-icon { width: 26px; height: 26px; flex: none; }
.store-btn-label { display: flex; flex-direction: column; line-height: 1.15; }
.store-btn-label small { font-size: 14px; font-weight: 600; }
.store-btn-label strong { font-size: 19px; font-family: var(--font-display); letter-spacing: 0.02em; }
.store-btn--navy { color: var(--ink); background: linear-gradient(165deg, #1A2D40, var(--ground)); box-shadow: inset 0 1px 0 rgba(227, 233, 238, 0.25), 0 6px 16px rgba(11, 22, 34, 0.35); }

/* App Store side: disabled Coming Soon */
.store-btn--soon, .store-btn--soon:hover, .store-btn--soon:active {
  color: #FFFFFF; background: var(--soon-bg);
  opacity: 0.55; filter: grayscale(0.6); cursor: not-allowed;
  transform: none; box-shadow: none;
}
.store-btn--soon::after { display: none; }
.soon-tag {
  position: absolute; top: 6px; right: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 6px; background: #FFFFFF; color: #111111;
}

/* Mini swap board (decorative) */
.swap-board {
  display: grid; grid-template-columns: repeat(3, 40px); gap: 6px; width: max-content;
  padding: 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
}
.tile { width: 40px; height: 40px; border-radius: 12px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2), inset 0 3px 0 rgba(255, 255, 255, 0.35); }
.tile--berry { background: var(--berry); }
.tile--cobalt { background: var(--cobalt-tile); }
.tile--lime { background: var(--lime); border-radius: 50%; }
.tile--amber { background: var(--amber); }
.swap-caption { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }

/* Features */
.features { padding: 48px 0; }
.feature-grid { display: grid; gap: 16px; margin-top: 24px; }
.tablet {
  position: relative; padding: 22px 20px; border-radius: var(--radius);
  background: linear-gradient(180deg, #172839, var(--panel));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(227, 233, 238, 0.12);
}
.tablet p { color: var(--ink-soft); margin: 0; }
.glyph { display: block; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 11px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2), inset 0 3px 0 rgba(255, 255, 255, 0.35); }
.glyph--cobalt { background: var(--cobalt-tile); }
.glyph--berry { background: var(--berry); border-radius: 50%; }
.glyph--lime { background: var(--lime); transform: rotate(45deg) scale(0.82); }
.glyph--amber { background: var(--amber); }
.glyph--silver { background: linear-gradient(150deg, var(--silver-hi), var(--silver-lo)); border-radius: 50%; }

/* Download band (inverted matte silver) */
.download {
  padding: 56px 0; color: var(--band-ink); text-align: center;
  background:
    repeating-linear-gradient(118deg, transparent 0 52px, rgba(11, 22, 34, 0.05) 52px 53px, transparent 53px 130px),
    linear-gradient(170deg, #E1E7EC, var(--band) 50%, #BFCAD4);
}
.download-icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 18px; box-shadow: 0 8px 20px rgba(11, 22, 34, 0.35); }
.download h2 { font-size: 32px; }
.download-lead { color: var(--band-soft); max-width: 30em; margin: 0 auto; }
.store-buttons--center { margin-bottom: 0; }

/* About */
.about { padding: 48px 0; }
.about-inner { display: grid; gap: 24px; }
.about p { color: var(--ink-soft); }
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { margin-bottom: 12px; }
.contact-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; word-break: break-all; }

/* Footer */
.site-footer { background: var(--footer); border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--ink-soft); }
.footer-inner { display: grid; gap: 12px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer-mail, .footer-legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-mail:hover, .footer-mail:active, .footer-legal a:hover, .footer-legal a:active { color: var(--ink); }
.copyright { margin: 0; }

/* Mobile sticky download bar */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(7, 14, 22, 0.96); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform 0.3s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta img { width: 40px; height: 40px; border-radius: 10px; }
.sticky-cta-text { flex: 1; font-size: 14px; font-weight: 700; line-height: 1.3; }
.sticky-cta-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px;
  color: var(--band-ink); font-weight: 700; text-decoration: none;
  background: linear-gradient(165deg, var(--silver-hi), var(--silver-lo));
}
.sticky-cta-btn:hover, .sticky-cta-btn:active { filter: brightness(1.08); }

/* Motion: reveal, swap-and-clear loop */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.tile--swap-a { animation: swap-down 4.8s ease-in-out infinite; }
.tile--swap-b { animation: swap-up 4.8s ease-in-out infinite; }
.tile--clear { animation: clear-row 4.8s ease-in-out infinite; }
.tile--swap-a.tile--clear { animation: swap-down 4.8s ease-in-out infinite, clear-row 4.8s ease-in-out infinite; }
@keyframes swap-down { 0%, 15% { transform: translateY(0); } 30%, 100% { transform: translateY(46px); } }
@keyframes swap-up { 0%, 15% { translate: 0 0; } 30%, 100% { translate: 0 -46px; } }
@keyframes clear-row { 0%, 38% { opacity: 1; scale: 1; } 48% { opacity: 1; scale: 1.15; } 58%, 82% { opacity: 0; scale: 0.4; } 92%, 100% { opacity: 1; scale: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .store-btn, .sticky-cta { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Tablet and up */
@media (min-width: 768px) {
  :root { --header-h: 64px; }
  body { padding-bottom: 0; }
  h1 { font-size: 46px; }
  h2 { font-size: 36px; }
  .brand-icon { width: 40px; height: 40px; border-radius: 10px; }
  .brand-name { font-size: 22px; }
  .header-nav { display: flex; gap: 8px; margin-left: auto; }
  .header-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink-soft); text-decoration: none; font-weight: 600; }
  .header-nav a:hover, .header-nav a:active { color: var(--ink); }
  .header-cta { width: auto; padding: 0 20px; border-radius: 12px; }
  .header-cta-text { display: inline; }
  .store-buttons { flex-direction: row; flex-wrap: wrap; }
  .store-btn { min-width: 220px; }
  .store-buttons--center { justify-content: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .sticky-cta { display: none; }
}

/* Desktop */
@media (min-width: 1024px) {
  h1 { font-size: 56px; }
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 7fr 5fr; align-items: center; gap: 56px; }
  .hero-window-icon { width: 96px; height: 96px; right: 24px; bottom: -34px; border-radius: 22px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .download { padding: 80px 0; }
  .download h2 { font-size: 44px; }
  .about-inner { grid-template-columns: 3fr 2fr; align-items: start; gap: 48px; }
}
