/* ============================================================
   Museum Slide: Row Puzzle — Landing Page
   Mobile-first. Breakpoints: 768px, 1024px.
   Color tokens: stone base, teal accent, amber frame, ink dark.
   ============================================================ */

/* --- Tokens ------------------------------------------------- */
:root {
  --c-bg:          #F5F0EB;
  --c-surface:     #FFFFFF;
  --c-surface-alt: #FAF7F4;
  --c-border:      #D9D1C7;
  --c-text:        #2C2820;
  --c-muted:       #6B5F54;
  --c-accent:      #1D6B66;
  --c-accent-h:    #155751;
  --c-accent-lt:   #D0E9E8;
  --c-amber:       #A86523;
  --c-amber-text:  #8B5015;
  --c-amber-lt:    #F2E2CC;
  --c-dark:        #1A1A18;
  --c-dark-text:   #EFE9E1;
  --c-dark-muted:  #B0A89E;
  --c-dark-teal:   #5BB8B3;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;

  --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px; --sp-4: 16px;
  --sp-6: 24px; --sp-8: 32px;  --sp-12: 48px; --sp-16: 64px;

  --header-h: 56px;
  --max-w: 1120px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  system-ui, -apple-system, sans-serif;
}

/* --- Reset -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* --- Layout util ------------------------------------------- */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6);
}
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-amber-text);
  margin-bottom: var(--sp-3);
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text);
  margin-bottom: var(--sp-4);
}
.section-sub {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 52ch;
  margin-bottom: var(--sp-8);
}

/* --- Header ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(245, 240, 235, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.header-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.header-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  object-fit: cover;
}
.header-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  white-space: nowrap;
}
.header-nav {
  display: none;
  gap: var(--sp-6);
  margin-left: auto;
}
.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-muted);
  transition: color 180ms ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.header-nav a:hover { color: var(--c-text); }
.header-cta {
  display: none;
  margin-left: auto;
  padding: var(--sp-2) var(--sp-4);
  background: var(--c-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--r-md);
  min-height: 44px;
  align-items: center;
  transition: background 180ms ease;
  white-space: nowrap;
}
.header-cta:hover, .header-cta:active { background: var(--c-accent-h); }

/* --- Hero --------------------------------------------------- */
.hero {
  padding-top: 0;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
}
.hero-text {
  padding: var(--sp-12) var(--sp-6) var(--sp-8);
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}
.hero-eyebrow {
  display: inline-flex;
  gap: var(--sp-2);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-amber-text);
  margin-bottom: var(--sp-4);
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: var(--sp-4);
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--c-muted);
  max-width: 44ch;
  margin-bottom: var(--sp-3);
}
.hero-desc {
  font-size: 0.95rem;
  color: var(--c-muted);
  max-width: 48ch;
  margin-bottom: var(--sp-8);
}
.hero-visual {
  flex: 1;
  min-height: 260px;
  overflow: hidden;
}
.hero-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* --- Download buttons -------------------------------------- */
.download-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 360px;
}
.store-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--r-md);
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  min-height: 56px;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
  position: relative;
  text-decoration: none;
  color: var(--c-text);
}
.store-btn:hover, .store-btn:active {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(29,107,102,.25);
}
.store-btn:hover .store-btn__pre,
.store-btn:active .store-btn__pre { color: rgba(255,255,255,.8); }
.store-btn:hover .store-btn__icon svg path,
.store-btn:active .store-btn__icon svg path { fill: #fff; }
.store-btn:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}
.store-btn--appstore {
  border-left-color: #888;
  opacity: 0.55;
  filter: grayscale(0.6);
  cursor: not-allowed;
}
.store-btn--appstore:hover, .store-btn--appstore:active {
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.store-btn__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-btn__icon svg { width: 22px; height: 22px; }
.store-btn__text { display: flex; flex-direction: column; text-align: left; }
.store-btn__pre {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  line-height: 1.2;
  transition: color 200ms ease;
}
.store-btn__name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  font-family: var(--font-sans);
}
.coming-soon-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  background: #6B6B6B;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 0 var(--r-md) 0 var(--r-md);
  pointer-events: none;
}

/* --- Features ---------------------------------------------- */
.features {
  background: var(--c-surface-alt);
  border-top: 1px solid var(--c-border);
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
.feature-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-amber);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-accent-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--sp-4);
  color: var(--c-accent);
}
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--sp-2);
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.6;
}

/* --- Download CTA section ---------------------------------- */
.download-cta {
  background: var(--c-dark);
  color: var(--c-dark-text);
}
.download-cta .section-inner { padding-bottom: var(--sp-16); }
.download-cta .section-eyebrow { color: var(--c-dark-teal); }
.download-cta .section-title {
  color: var(--c-dark-text);
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: var(--sp-6);
}
.download-cta .section-sub { color: var(--c-dark-muted); max-width: 46ch; }
.download-cta .download-buttons { max-width: 420px; margin-bottom: var(--sp-8); }
.download-cta .store-btn {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.15);
  border-left-color: var(--c-dark-teal);
  color: var(--c-dark-text);
}
.download-cta .store-btn:hover, .download-cta .store-btn:active {
  background: var(--c-dark-teal);
  color: var(--c-dark);
  box-shadow: 0 4px 16px rgba(91,184,179,.3);
}
.download-cta .store-btn:hover .store-btn__pre,
.download-cta .store-btn:active .store-btn__pre { color: rgba(26,26,24,.75); }
.download-cta .store-btn .store-btn__pre { color: var(--c-dark-muted); }
.download-cta .store-btn--appstore {
  border-left-color: #555;
  opacity: 0.5;
}
.download-cta .store-btn--appstore:hover {
  background: rgba(255,255,255,.06);
  color: var(--c-dark-text);
  box-shadow: none;
}

/* --- About ------------------------------------------------- */
.about { border-top: 1px solid var(--c-border); }
.about-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  object-fit: cover;
  margin-bottom: var(--sp-4);
  border: 2px solid var(--c-border);
}
.about p {
  font-size: 0.95rem;
  color: var(--c-muted);
  max-width: 58ch;
  margin-bottom: var(--sp-4);
}
.about-contact {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--c-accent);
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--c-accent-lt);
  padding-bottom: 1px;
}
.about-contact:hover { border-bottom-color: var(--c-accent); }

/* --- Footer ------------------------------------------------ */
.site-footer {
  background: var(--c-dark);
  color: var(--c-dark-muted);
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.footer-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  object-fit: cover;
  opacity: 0.85;
}
.footer-app-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-dark-text);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: 0.8rem;
}
.footer-links a {
  color: var(--c-dark-muted);
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color 160ms ease;
}
.footer-links a:hover { color: var(--c-dark-text); }
.footer-copy {
  font-size: 0.78rem;
  color: var(--c-dark-muted);
  opacity: 0.7;
}

/* --- Sticky mobile CTA ------------------------------------- */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom));
  background: var(--c-dark);
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  transform: translateY(100%);
  transition: transform 280ms ease;
}
.sticky-cta--visible { transform: translateY(0); }
.sticky-cta-btn {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  background: var(--c-accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--r-md);
  transition: background 180ms ease;
}
.sticky-cta-btn:hover, .sticky-cta-btn:active { background: var(--c-accent-h); }

/* --- Reveal animation -------------------------------------- */
.reveal--hidden {
  opacity: 0;
  transform: translateY(20px);
}
.reveal--visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms ease, transform 500ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .reveal--hidden { opacity: 1; transform: none; }
  .reveal--visible { transition: none; }
}

/* --- Responsive: 768px+ ------------------------------------ */
@media (min-width: 768px) {
  :root { --header-h: 64px; }

  .header-nav { display: flex; }
  .header-cta { display: flex; margin-left: var(--sp-4); }
  .header-brand { margin-right: auto; }

  .hero {
    flex-direction: row;
    align-items: stretch;
  }
  .hero-text {
    flex: 0 0 55%;
    padding: var(--sp-16) var(--sp-12) var(--sp-16) var(--sp-8);
    max-width: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
  }
  .hero-visual {
    flex: 0 0 45%;
    min-height: calc(100svh - var(--header-h));
  }

  .download-buttons {
    flex-direction: row;
    max-width: none;
  }
  .store-btn { flex: 1; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }

  .sticky-cta { display: none; }
}

/* --- Responsive: 1024px+ ----------------------------------- */
@media (min-width: 1024px) {
  .section-inner { padding: var(--sp-16) var(--sp-8); }
  .hero-text { padding: var(--sp-16) var(--sp-16) var(--sp-16) calc((100vw - var(--max-w)) / 2 + var(--sp-8)); }
  .features-grid { grid-template-columns: repeat(3, 1fr); }
  .download-buttons { max-width: 480px; }
}
