/* GlazeGrid: Block Puzzle - Polar Morning Clarity theme, mobile first */

:root {
  --ground: #F6FAFC;
  --card: #FFFFFF;
  --ice-soft: #EAF5FA;
  --ice: #CDEAF6;
  --ice-deep: #9ED3EA;
  --ink: #142433;
  --ink-soft: #475867;
  --action: #0E6E8C;
  --action-dark: #0A5670;
  --link: #0B5F7A;
  --band: #0F3D5E;
  --band-text: #FFFFFF;
  --band-soft: #BFD9E8;
  --footer: #0A2235;
  --footer-text: #D6E6EF;
  --disabled: #2A2A2A;
  --radius: 14px;
  --header-h: 48px;
  --font-display: "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, .7, .3, 1);
}

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

html { scroll-behavior: smooth; -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 glass-cell grid on the ground */
  background-image:
    linear-gradient(rgba(14, 110, 140, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 110, 140, .045) 1px, transparent 1px);
  background-size: 28px 28px;
  overflow-x: hidden;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 .5em;
}

h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 18px; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

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

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

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: .75em;
}

section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 250, 252, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ice);
  padding-top: env(safe-area-inset-top);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.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(--action); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
  box-shadow: inset 0 0 0 2px rgba(205, 234, 246, .35);
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.header-cta-icon { width: 22px; height: 22px; }
.header-cta-text { display: none; }
.header-cta:hover, .header-cta:active { background: var(--action-dark); box-shadow: inset 0 0 0 2px rgba(205, 234, 246, .6), 0 0 0 4px rgba(158, 211, 234, .45); }

/* Hero */
.hero { padding: 32px 0 48px; }
.hero-inner { display: flex; flex-direction: column; gap: 32px; }
.hero-icon { width: 76px; height: 76px; border-radius: 20px; margin-bottom: 20px; box-shadow: 0 0 0 1px var(--ice), 0 8px 24px rgba(15, 61, 94, .16); }
.hero-lead { font-size: 19px; color: var(--ink); font-weight: 500; }
.hero-sub { color: var(--ink-soft); }

.hero-points { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-points li {
  font-size: 14px; color: var(--ink-soft);
  padding: 6px 12px; border-radius: 6px;
  background: var(--card); border: 1px solid var(--ice);
}

.hero-art { position: relative; margin: 0; }
.hero-banner {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--ice-deep);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .85), 0 0 0 7px var(--ice), 0 18px 40px rgba(15, 61, 94, .18);
}

/* ice-shard corner decorations */
.shard { position: absolute; width: 28px; height: 28px; background: linear-gradient(135deg, var(--ice-deep), rgba(255, 255, 255, .9)); z-index: 1; }
.shard-a { top: -12px; right: 18px; clip-path: polygon(50% 0, 100% 100%, 0 70%); }
.shard-b { bottom: -14px; left: 22px; width: 22px; height: 22px; clip-path: polygon(0 0, 100% 40%, 30% 100%); }

/* Store buttons: arctic ice panels with inner glow */
.store-buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.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-align: left; text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.store-glyph { width: 24px; height: 24px; flex: none; }
.store-text { display: flex; flex-direction: column; line-height: 1.15; }
.store-text small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.store-text strong { font-size: 18px; font-weight: 600; }

.store-btn-play {
  background: var(--action); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(205, 234, 246, .5), inset 0 0 18px rgba(158, 211, 234, .35), 0 6px 16px rgba(14, 110, 140, .25);
}
.store-btn-play:hover, .store-btn-play:active {
  background: var(--action-dark);
  box-shadow: inset 0 0 0 1px rgba(205, 234, 246, .8), inset 0 0 24px rgba(158, 211, 234, .5), 0 0 0 4px rgba(158, 211, 234, .5);
}

.store-btn-light {
  background: #EAF6FC; color: var(--band);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 18px rgba(158, 211, 234, .6);
}
.store-btn-light:hover, .store-btn-light:active { background: #fff; box-shadow: inset 0 0 0 1px #fff, inset 0 0 22px rgba(158, 211, 234, .8), 0 0 0 4px rgba(191, 217, 232, .45); }

.store-btn-play:active, .store-btn-light:active { transform: translateY(1px); }

/* App Store placeholder: neutral, never brand colored */
.store-btn-soon {
  background: var(--disabled); color: #fff;
  opacity: .55; filter: grayscale(.6); cursor: not-allowed;
}
.soon-tag {
  position: absolute; top: -8px; right: -6px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  background: #fff; color: var(--disabled);
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--disabled);
}

/* Features */
.features { padding: 56px 0; }
.section-lead { color: var(--ink-soft); max-width: 620px; }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
.feature-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--ice);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 5px var(--ice-soft);
}
.feature-card::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 12px; height: 12px;
  background: var(--ice-deep); clip-path: polygon(100% 0, 100% 100%, 0 0); opacity: .7;
}
.feature-card p { color: var(--ink-soft); margin: 0; font-size: 15px; }

/* glass block-cell glyphs built from small squares */
.cell-glyph { display: grid; grid-template-columns: repeat(3, 12px); grid-auto-rows: 12px; gap: 3px; margin-bottom: 16px; height: 42px; align-content: start; }
.cell-glyph i { display: block; border-radius: 3px; background: linear-gradient(135deg, var(--ice) 0%, var(--ice-deep) 100%); box-shadow: inset 0 0 0 1px rgba(14, 110, 140, .35); }
.glyph-slide i:nth-child(1) { grid-column: 1; grid-row: 1; }
.glyph-slide i:nth-child(2) { grid-column: 2; grid-row: 1; }
.glyph-slide i:nth-child(3) { grid-column: 2; grid-row: 2; }
.glyph-row { grid-template-columns: repeat(4, 12px); }
.glyph-row i { grid-row: 2; background: var(--action); }
.glyph-plan i:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.glyph-plan i:nth-child(2) { grid-column: 3; grid-row: 2; }
.glyph-plan i:nth-child(3) { grid-column: 2 / 4; grid-row: 3; }
.glyph-offline i:nth-child(1) { grid-column: 2; grid-row: 1 / 4; }
.glyph-offline i:nth-child(2) { grid-column: 1; grid-row: 3; }
.glyph-short { grid-template-columns: repeat(2, 12px); }
.glyph-glaze { grid-template-columns: 39px; grid-auto-rows: 39px; }
.glyph-glaze i { background: repeating-linear-gradient(45deg, var(--ice) 0 3px, var(--ice-soft) 3px 6px); }

/* Download band */
.download {
  padding: 56px 0;
  background: linear-gradient(160deg, var(--band) 0%, #0C3350 100%);
  color: var(--band-text);
  text-align: center;
}
.download-inner { display: flex; flex-direction: column; align-items: center; }
.download-icon { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 20px; box-shadow: 0 0 0 4px rgba(191, 217, 232, .25); }
.download h2 { font-size: 28px; color: var(--band-text); }
.download p { color: var(--band-soft); max-width: 520px; }
.store-buttons-center { width: 100%; }

/* About */
.about { padding: 56px 0; }
.about-inner { max-width: 760px; }
.about p { color: var(--ink-soft); }
.about-contact { color: var(--ink); }
.about-contact a { font-weight: 600; word-break: break-all; }

/* Footer */
.site-footer { background: var(--footer); color: var(--footer-text); padding: 36px 0 28px; }
.footer-inner { display: flex; flex-direction: column; gap: 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; color: #fff; }
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-footer a { color: var(--footer-text); }
.footer-mail, .footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer a:hover, .site-footer a:active { color: #fff; }
.copyright { font-size: 14px; margin: 0; color: var(--band-soft); }

/* Mobile sticky CTA */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--ice);
  box-shadow: 0 -6px 20px rgba(15, 61, 94, .1);
  transform: translateY(110%); opacity: 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.sticky-cta.is-visible { transform: translateY(0); opacity: 1; }
.sticky-cta img { width: 40px; height: 40px; border-radius: 10px; }
.sticky-cta-text { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.sticky-cta-text strong { font-size: 15px; }
.sticky-cta-text small { font-size: 14px; color: var(--ink-soft); }
.sticky-cta-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 12px; background: var(--action); color: #fff;
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 0 12px rgba(158, 211, 234, .35);
}
.sticky-cta-btn:hover, .sticky-cta-btn:active { background: var(--action-dark); }

/* Ice drift reveal (enabled only when JS adds .js-reveal) */
.js-reveal .reveal { opacity: .4; transform: translateX(-14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js-reveal .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: 32px; }
  .brand-icon { width: 36px; height: 36px; }
  .header-nav { display: flex; gap: 4px; 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-size: 15px; border-radius: 8px;
  }
  .header-nav a:hover, .header-nav a:active { color: var(--ink); background: var(--ice-soft); }
  .header-cta { width: auto; border-radius: 12px; padding: 0 18px; }
  .header-cta-icon { width: 18px; height: 18px; }
  .header-cta-text { display: inline; }
  .hero { padding: 56px 0 72px; }
  .store-buttons { flex-direction: row; flex-wrap: wrap; }
  .store-btn { min-width: 200px; }
  .store-buttons-center { justify-content: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .download { padding: 80px 0; }
  .download h2 { font-size: 40px; }
  .about { padding: 80px 0; }
  .footer-inner { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .copyright { flex-basis: 100%; }
  .sticky-cta { display: none; }
}

/* Desktop: asymmetric float hero */
@media (min-width: 1024px) {
  h1 { font-size: 54px; }
  .hero-inner { display: grid; grid-template-columns: 7fr 6fr; align-items: center; gap: 56px; }
  .hero-art { transform: translateY(-12px); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .features { padding: 88px 0; }
}

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