/* Logic Journey: Sudoku Dream — landing page styles
   Style: Serene Mindful Minimalism / Misty Slate Blue & Soft Teal on Cool Paper
   Mobile-first; progressive enhancement at 768px and 1024px. */

:root {
  --paper: #f4f7f9;
  --surface: #ffffff;
  --ink: #1f2a33;          /* body ink ~13:1 on paper */
  --ink-soft: #4a5a66;     /* secondary ~6.6:1 on paper */
  --slate: #2f6690;        /* primary slate blue; white text ~6.1:1 */
  --slate-deep: #234e6e;
  --teal: #4a919e;         /* soft teal accent */
  --line: #dbe4ea;
  --tile: #eef3f6;
  --ios-grey: #2a2a2a;
  --radius: 16px;
  --radius-pill: 999px;
  --shadow-soft: 0 10px 30px rgba(31, 42, 51, 0.08);
  --shadow-lift: 0 18px 46px rgba(31, 42, 51, 0.14);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--slate); }

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 0.5em;
}

/* ---------- Sticky header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: rgba(244, 247, 249, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand-icon { border-radius: 9px; width: 32px; height: 32px; }
.brand-name { font-size: 1rem; }

.site-nav { display: none; margin-left: auto; gap: 22px; }
.site-nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; }
.site-nav a:hover { color: var(--slate); }

.header-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--slate);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.header-cta:active { background: var(--slate-deep); }
.header-cta-text { display: none; }
.header-cta-icon { font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 24px;
  text-align: center;
}
.hero-icon { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 18px; box-shadow: var(--shadow-soft); }
.hero-tagline { color: var(--ink-soft); font-size: 1.05rem; max-width: 34ch; margin-inline: auto; }

.hero-shots {
  position: relative;
  height: 400px;
  margin-top: 28px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.hero-shot {
  width: auto;
  height: 360px;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  background: var(--surface);
}
.hero-shot--back { transform: rotate(6deg) translateX(46px); opacity: 0.9; }
.hero-shot--front { position: absolute; left: 50%; bottom: 0; transform: translateX(-54%) rotate(-4deg); }

/* ---------- Store buttons (Frosted Rounded Pill) ---------- */
.store-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.store-buttons--center { align-items: center; }

.store-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  min-height: 56px;
  margin-inline: auto;
  padding: 10px 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.store-btn-glyph { font-size: 1.4rem; line-height: 1; }
.store-btn-labels { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.store-btn-small { font-size: 0.72rem; opacity: 0.85; }
.store-btn-big { font-size: 1.05rem; font-weight: 700; }

.store-btn--play {
  background: var(--slate);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.store-btn--play:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.store-btn--play:active { transform: translateY(0); background: var(--slate-deep); }

/* App Store disabled "Coming Soon" — neutral grey, not brand-colored */
.store-btn--ios {
  background: var(--ios-grey);
  color: #cfcfcf;
  opacity: 0.55;
  filter: grayscale(0.6);
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.12);
}
.store-btn-badge {
  position: absolute;
  top: -9px;
  right: 14px;
  background: var(--teal);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* ---------- Sections ---------- */
section { scroll-margin-top: 60px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 28px; }

.features { max-width: var(--maxw); margin: 0 auto; padding: 48px 20px; }
.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.feature-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--tile);
  color: var(--slate);
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
}
.feature-card h3 { color: var(--ink); }
.feature-card p { color: var(--ink-soft); margin: 0; }

/* ---------- Screenshots (Overlapping Phone Mockup Row) ---------- */
.screenshots { padding: 48px 0; background: linear-gradient(180deg, #ffffff 0%, var(--tile) 100%); }
.screenshots .section-head { padding-inline: 20px; }
.shot-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 20px 20px;
  -webkit-overflow-scrolling: touch;
}
.shot-frame { flex: 0 0 auto; scroll-snap-align: center; }
.shot-frame img {
  width: 230px;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  background: var(--surface);
}
.shot-hint { text-align: center; color: var(--ink-soft); font-size: 0.9rem; margin: 4px 0 0; }

/* ---------- Download CTA ---------- */
.download {
  background: linear-gradient(160deg, var(--slate) 0%, var(--slate-deep) 100%);
  color: #fff;
  padding: 56px 20px;
  text-align: center;
}
.download-inner { max-width: 640px; margin: 0 auto; }
.download-icon { width: 80px; height: 80px; border-radius: 20px; margin: 0 auto 18px; box-shadow: var(--shadow-lift); }
.download h2 { color: #fff; }
.download-sub { color: rgba(255, 255, 255, 0.9); max-width: 44ch; margin: 0 auto 8px; }
.download .store-btn--play { background: #fff; color: var(--slate-deep); }
.download .store-btn--play:active { background: #eef3f6; }

/* ---------- About ---------- */
.about { max-width: 720px; margin: 0 auto; padding: 56px 20px; }
.about p { color: var(--ink-soft); }
.about-contact { margin-top: 1.2em; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 20px 96px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.footer-brand img { border-radius: 8px; }
.footer-contact { margin: 12px 0; }
.footer-legal { display: flex; gap: 20px; justify-content: center; margin: 12px 0; }
.footer-legal a { color: var(--slate); text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }
.footer-copy { margin: 8px 0 0; font-size: 0.85rem; }

/* ---------- Mobile sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(244, 247, 249, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.sticky-cta-btn {
  display: block;
  text-align: center;
  min-height: 48px;
  line-height: 48px;
  border-radius: var(--radius-pill);
  background: var(--slate);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.sticky-cta-btn:active { background: var(--slate-deep); }

/* ---------- Motion: Serene Fade & Subtle Cell Highlight ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .store-btn, .feature-card { transition: none; }
}

/* ---------- Tablet (>= 768px) ---------- */
@media (min-width: 768px) {
  .site-header { height: 64px; padding: 0 28px; }
  .site-nav { display: flex; }
  .header-cta { margin-left: 22px; }
  .header-cta-text { display: inline; }
  .header-cta-icon { display: none; }

  h1 { font-size: 2.6rem; }
  h2 { font-size: 2rem; }

  .store-buttons { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .store-btn { width: auto; margin-inline: 0; }

  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  .shot-row { justify-content: center; overflow-x: visible; flex-wrap: wrap; }
  .shot-frame img { width: 210px; }

  .sticky-cta { display: none; }
}

/* ---------- Desktop (>= 1024px) ---------- */
@media (min-width: 1024px) {
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    text-align: left;
    gap: 40px;
    padding: 72px 28px 56px;
  }
  .hero-copy { display: flex; flex-direction: column; }
  .hero-icon { margin: 0 0 20px; }
  .hero-tagline { margin-inline: 0; }
  .store-buttons { justify-content: flex-start; }
  .hero-shots { margin-top: 0; height: 460px; }
  .hero-shot { height: 420px; }

  .feature-grid { grid-template-columns: repeat(3, 1fr); }

  /* Overlapping phone mockup row on desktop */
  .shot-row { flex-wrap: nowrap; gap: 0; }
  .shot-frame { margin-left: -34px; transition: transform 0.2s ease; }
  .shot-frame:first-child { margin-left: 0; }
  .shot-frame:nth-child(odd) img { transform: rotate(-3deg); }
  .shot-frame:nth-child(even) img { transform: rotate(3deg); }
  .shot-frame:hover { transform: translateY(-8px); z-index: 2; }
  .shot-frame:hover img { transform: rotate(0); }
  .shot-hint { display: none; }
}
