/* JadeRows: Block Puzzle - mobile-first styles
   Tone: Riverstone Jade Stillness. Matte jade, ice blue and mist gray over carved stone. */

:root {
  --ground: #EDF1F0;
  --paper: #F7F9F9;
  --glass: rgba(247, 249, 249, 0.72);
  --ink: #14212B;
  --ink-soft: #44535D;
  --jade: #1E6A50;
  --jade-deep: #164F3C;
  --jade-text: #1A6249;
  --jade-light: #A7D7C2;
  --ice: #CFE4EA;
  --mist: #B8C8D0;
  --band: #16242F;
  --band-text: #EEF3F2;
  --band-soft: #B7C6C8;
  --footer: #0E1820;
  --footer-text: #DCE4E3;
  --footer-soft: #9FB0B3;
  --soon-bg: #2A2A2A;
  --groove: rgba(20, 33, 43, 0.12);
  --font-display: Optima, "Optima nova", Candara, "Segoe UI", "Gill Sans", "Trebuchet MS", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 48px;
  --radius: 6px;
  --ease-settle: cubic-bezier(0.22, 0.8, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--ground);
  /* Faint carved-mark grain: two crossing hairline strata */
  background-image:
    repeating-linear-gradient(115deg, transparent 0 22px, rgba(20, 33, 43, 0.025) 22px 23px),
    repeating-linear-gradient(28deg, transparent 0 37px, rgba(30, 106, 80, 0.02) 37px 38px);
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--jade-text); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: var(--radius); }
.skip-link:focus { left: 12px; }

:focus-visible { outline: 2px solid var(--jade); outline-offset: 3px; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jade-text);
}
.eyebrow--band { color: var(--jade-light); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--groove);
}
.header-inner { height: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.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: 8px; }
.brand-name { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.04em; }
.site-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(--jade); color: #fff; text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.header-cta:hover { background: var(--jade-deep); }
.header-cta:active { background: var(--jade-deep); transform: translateY(1px); }
.header-cta-glyph { width: 22px; height: 22px; }
.header-cta-text { display: none; font-weight: 600; font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 32px) 16px 40px;
  max-width: 1120px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
  text-align: center;
}
.hero-copy { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 640px; }
.hero-icon { width: 80px; height: 80px; border-radius: 20px; box-shadow: 0 10px 26px rgba(20, 33, 43, 0.22), 0 0 0 1px var(--groove); }
.hero h1 { font-size: 34px; }
.hero-lead { font-size: 18px; font-weight: 600; color: var(--ink); }
.hero-sub { font-size: 16px; color: var(--ink-soft); max-width: 34em; }

/* Banner rests on a carved stone ledge behind frosted glass */
.hero-ledge {
  margin: 0; width: 100%; max-width: 980px; position: relative;
  padding: 10px; border-radius: 12px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 0 1px var(--groove), 0 24px 40px -24px rgba(20, 33, 43, 0.45);
}
.hero-ledge::after {
  /* Incised groove under the slab */
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -14px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(20, 33, 43, 0.22), transparent);
}
.hero-banner { width: 100%; border-radius: 6px; aspect-ratio: 1024 / 500; object-fit: cover; min-height: 40vh; max-height: 56vh; }

/* ---------- Store buttons: incised matte jade plaques ---------- */
.store-buttons { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: 8px; }
.store-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; width: 100%; padding: 8px 22px;
  border: 0; border-radius: var(--radius);
  font: inherit; text-align: left; text-decoration: none;
  background: var(--jade); color: #fff;
  /* Incised inner groove + soft lip */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 0 0 4px var(--jade), inset 0 0 0 5px rgba(255, 255, 255, 0.14), 0 2px 0 var(--jade-deep);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.store-btn--play:hover { background: var(--jade-deep); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), inset 0 0 0 4px var(--jade-deep), inset 0 0 0 5px rgba(255, 255, 255, 0.18), 0 2px 0 #0F3A2C; }
.store-btn--play:active { transform: translateY(2px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 0 var(--jade-deep); }
.store-glyph { width: 26px; height: 26px; flex: none; }
.store-text { display: flex; flex-direction: column; line-height: 1.15; }
.store-small { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.store-big { font-family: var(--font-display); font-size: 20px; font-weight: 600; }

.store-btn--light { background: var(--jade-light); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(20, 33, 43, 0.16), inset 0 0 0 4px var(--jade-light), inset 0 0 0 5px rgba(20, 33, 43, 0.14), 0 2px 0 #6FA88F; }
.store-btn--light:hover { background: #BCE3D2; box-shadow: inset 0 0 0 1px rgba(20, 33, 43, 0.18), inset 0 0 0 4px #BCE3D2, inset 0 0 0 5px rgba(20, 33, 43, 0.16), 0 2px 0 #6FA88F; }
.store-btn--light:active { transform: translateY(2px); box-shadow: inset 0 2px 4px rgba(20, 33, 43, 0.25); }

/* App Store: disabled, neutral gray, never follows brand color */
.store-btn--soon {
  background: var(--soon-bg); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  opacity: 0.55; filter: grayscale(0.6); cursor: not-allowed;
}
.soon-tag {
  position: absolute; top: -9px; right: 10px;
  padding: 2px 8px; border-radius: 999px;
  background: #fff; color: #2A2A2A; box-shadow: 0 0 0 1px #2A2A2A;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}

/* ---------- Sections ---------- */
.features, .about { max-width: 1120px; margin: 0 auto; padding: 56px 16px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 32px; display: flex; flex-direction: column; gap: 10px; }
.section-head h2, .about h2 { font-size: 28px; }
.section-lead { color: var(--ink-soft); }

.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.feature-card {
  position: relative; padding: 24px 20px 22px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 0 0 1px var(--groove);
  display: flex; flex-direction: column; gap: 8px;
}
.feature-card::before {
  /* Chisel tick marks in the corner */
  content: ""; position: absolute; top: 14px; right: 14px; width: 18px; height: 10px;
  background: repeating-linear-gradient(90deg, rgba(20, 33, 43, 0.22) 0 1px, transparent 1px 5px);
}
.feature-card h3 { font-size: 20px; }
.feature-card p { color: var(--ink-soft); font-size: 15px; }

/* Jade chip glyphs: tiny block arrangements cut into slate */
.chip-glyph { display: inline-grid; grid-auto-flow: column; gap: 3px; padding: 6px; width: max-content; border-radius: 6px; background: var(--band); margin-bottom: 6px; }
.chip-glyph i { display: block; width: 12px; height: 12px; border-radius: 2px; background: var(--jade-light); box-shadow: inset 0 -2px 0 rgba(20, 33, 43, 0.25); }
.chip-glyph i:nth-child(even) { background: var(--ice); }
.chip-glyph--plan i:last-child, .chip-glyph--offline i:last-child { background: transparent; box-shadow: inset 0 0 0 1px var(--jade-light); }
.chip-glyph--rise { align-items: end; }
.chip-glyph--rise i:nth-child(2) { height: 18px; }
.chip-glyph--rise i:nth-child(3) { height: 24px; }
.chip-glyph--stone i { border-radius: 50%; }

/* ---------- Download band ---------- */
.download {
  background-color: var(--band); color: var(--band-text);
  background-image: repeating-linear-gradient(115deg, transparent 0 26px, rgba(167, 215, 194, 0.05) 26px 27px);
  padding: 64px 16px;
}
.download-inner { max-width: 720px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.download h2 { font-size: 30px; color: var(--band-text); }
.download-lead { color: var(--band-soft); max-width: 32em; }
.store-buttons--band .soon-tag { box-shadow: none; }

/* ---------- About ---------- */
.about-panel {
  max-width: 760px; margin: 0 auto; padding: 32px 22px;
  background: var(--paper); border-radius: 12px;
  box-shadow: 0 0 0 1px var(--groove);
  border-top: 3px solid var(--jade);
  display: flex; flex-direction: column; gap: 14px;
}
.about-panel p { color: var(--ink-soft); }
.about-panel .contact { color: var(--ink); }
.about-panel .contact a { display: inline-block; min-height: 44px; line-height: 44px; font-weight: 600; word-break: break-all; }
.about-panel .contact a:hover, .about-panel .contact a:active { color: var(--jade-deep); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: var(--footer-text); padding: 40px 16px 32px; }
.footer-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 18px; }
.footer-brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-footer a { color: var(--footer-text); display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
.site-footer a:hover, .site-footer a:active { color: var(--jade-light); }
.footer-mail { word-break: break-all; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.copyright { color: var(--footer-soft); font-size: 14px; }

/* ---------- Mobile sticky CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--groove);
  transform: translateY(110%); transition: transform 0.35s var(--ease-settle);
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.sticky-cta-text { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta-btn { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius); background: var(--jade); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; }
.sticky-cta-btn:hover, .sticky-cta-btn:active { background: var(--jade-deep); }

/* ---------- Motion: stone settle (blur to sharp, small downward settle) ---------- */
.js .settle { opacity: 0; transform: translateY(-10px); filter: blur(4px); transition: opacity 0.7s var(--ease-settle), transform 0.7s var(--ease-settle), filter 0.7s var(--ease-settle); }
.js .settle.is-settled { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .settle { opacity: 1; transform: none; filter: none; transition: none; }
  .sticky-cta, .store-btn, .header-cta { transition: none; }
}

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  :root { --header-h: 64px; }
  body { padding-bottom: 0; }
  .header-inner { padding: 0 28px; }
  .site-nav { display: flex; gap: 4px; margin-left: auto; }
  .site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--ink); text-decoration: none; font-size: 15px; border-radius: var(--radius); }
  .site-nav a:hover, .site-nav a:active { background: rgba(30, 106, 80, 0.1); color: var(--jade-deep); }
  .header-cta { width: auto; height: 44px; padding: 0 18px; border-radius: var(--radius); }
  .header-cta-text { display: inline; }
  .hero { padding: calc(var(--header-h) + 56px) 28px 64px; gap: 44px; }
  .hero h1 { font-size: 46px; }
  .hero-lead { font-size: 20px; }
  .store-buttons { flex-direction: row; justify-content: center; width: auto; }
  .store-btn { width: auto; min-width: 210px; }
  .hero-banner { min-height: 0; max-height: none; }
  .features, .about { padding: 80px 28px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .section-head h2, .about h2 { font-size: 36px; }
  .download { padding: 88px 28px; }
  .download h2 { font-size: 40px; }
  .about-panel { padding: 44px 48px; }
  .footer-inner { flex-direction: row; flex-wrap: wrap; justify-content: space-between; text-align: left; }
  .copyright { width: 100%; text-align: center; }
  .sticky-cta { display: none; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .hero h1 { font-size: 56px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .feature-card { padding: 30px 26px; }
  .download h2 { font-size: 46px; }
}
