/* ============================================================
   Tokens
   ============================================================ */
:root {
  --bg:           #f4f7fb;
  --surface:      #ffffff;
  --surface-alt:  #eef3f9;
  --text:         #122033;
  --muted:        #5b6b7f;
  --primary:      #2563eb;
  --primary-dark: #1d4ed8;
  --primary-bg:   #dbeafe;
  --border:       #d8e1ec;
  --shadow:       0 2px 10px rgba(18,32,51,.07);
  --shadow-md:    0 6px 24px rgba(18,32,51,.09);
  --radius:       16px;
  --radius-pill:  999px;
  --container:    1120px;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 68px; overflow-x: hidden; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin-top: 0; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(1.875rem, 4.5vw, 3.25rem); margin-bottom: 18px; }
h2 { font-size: clamp(1.5rem,   3vw,   2.25rem); margin-bottom: 12px; }
h3 { font-size: 1.0625rem; margin-bottom: 8px; }
a  { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: none; }
img { display: block; max-width: 100%; }
ul[class] { list-style: none; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
.narrow { max-width: 660px; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244,247,251,.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216,225,236,.9);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 60px;
}
.brand {
  font-weight: 700; font-size: 1.0625rem;
  color: var(--text); flex-shrink: 0; letter-spacing: -.01em;
}
.brand:hover { color: var(--primary); }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.nav a {
  display: block; padding: 6px 12px; border-radius: 8px;
  color: var(--muted); font-size: .9375rem; font-weight: 600;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: rgba(18,32,51,.05); }

/* ============================================================
   Sections
   ============================================================ */
.hero, .section { padding: 56px 0; }
.section-contact { padding-top: 32px; padding-bottom: 40px; }
.alt { background: var(--surface-alt); }

/* ============================================================
   Hero
   ============================================================ */
.hero { background: linear-gradient(160deg, #e8f0fc 0%, var(--bg) 55%); }
.hero-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 28px; align-items: start;
}
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: .8125rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary);
}
.lead {
  font-size: 1.0625rem; color: var(--muted);
  max-width: 580px; margin-bottom: 28px; line-height: 1.7;
}
.section-intro {
  font-size: 1rem; color: var(--muted);
  max-width: 660px; line-height: 1.7; margin-bottom: 32px;
}
.cta-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}

/* Hero preview card */
.preview-card { align-self: start; }
.preview-label {
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 14px;
}
.feature-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feature-list li {
  font-size: .9375rem; color: var(--text);
  padding-left: 20px; position: relative;
}
.feature-list li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--primary);
}

/* ============================================================
   Grid
   ============================================================ */
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.top-gap { margin-top: 28px; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px;
}
.feature-card { transition: transform .18s ease, box-shadow .18s ease; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Download card */
.download-card { border-top: 3px solid var(--primary-bg); }
.download-card h3 { margin-bottom: 8px; }
.download-text {
  font-size: .9375rem; color: var(--muted);
  margin-bottom: 20px; line-height: 1.6;
}
.store-note {
  margin-top: 14px; font-size: .8125rem;
  color: var(--muted); letter-spacing: .01em;
}

/* Contact card */
.contact-card { width: 100%; }
.contact-card .contact-intro { color: var(--muted); margin-bottom: 16px; }
.contact-card p + p { margin-top: 6px; }
.contact-card strong { font-size: 1.0625rem; }
.contact-card a { font-weight: 600; font-size: 1.0625rem; }

.legal-links {
  margin-top: 18px; font-size: .875rem; color: var(--muted);
}
.legal-links a { color: var(--muted); font-weight: 600; margin-inline: 2px; }
.legal-links a:hover { color: var(--text); }

/* ============================================================
   Buttons
   ============================================================ */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: var(--radius-pill); border: 1.5px solid var(--primary);
  font-family: inherit; font-size: .9375rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s,
              transform .15s, box-shadow .15s;
}
.button:hover    { transform: translateY(-1px); text-decoration: none; }
.button:active   { transform: translateY(0); }
.button.primary  { background: var(--primary); color: #fff; }
.button.primary:hover {
  background: var(--primary-dark); border-color: var(--primary-dark); color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,.28);
}
.button.secondary { background: var(--surface); color: var(--primary); }
.button.secondary:hover {
  background: var(--primary-bg); color: var(--primary-dark); border-color: var(--primary);
}

/* ============================================================
   Screenshot gallery
   ============================================================ */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: start;
  max-width: 440px;
}
/* Mobile: show max 2 */
.screenshot-gallery .screenshot-frame:nth-child(n+3) { display: none; }

.screenshot-frame {
  cursor: pointer; border: none; background: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  transition: transform .2s ease;
  width: 100%;
}
.screenshot-frame:hover  { transform: translateY(-4px); }
.screenshot-frame:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px;
}

.phone-outer {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19;
  background: linear-gradient(160deg, #202a42 0%, #131a2c 100%);
  border-radius: 30px;
  padding: 8px;
  overflow: hidden;
  box-shadow:
    0 22px 60px rgba(10,18,34,.28),
    0 2px 6px rgba(10,18,34,.12),
    inset 0 0 0 1px rgba(255,255,255,.08);
}
.phone-inner {
  position: absolute;
  inset: 8px;
  background: #f8fafc;
  border-radius: 22px;
  overflow: hidden;
}
.phone-inner > img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: top center;
}
.phone-inner > *:not(img) {
  width: 100%; height: 100%; display: block;
}

.screenshot-frame figcaption {
  font-size: .8125rem; font-weight: 600; color: var(--muted); text-align: center;
  line-height: 1.35;
  min-height: 2.7em;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 0 4px;
}

.gallery-actions {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; margin-top: 14px;
}
.gallery-hint {
  font-size: .8125rem; color: var(--muted); margin: 0;
}
.gallery-show-all {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: inherit; font-size: .875rem; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}
.gallery-show-all:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-1px);
}
.gallery-empty {
  grid-column: 1 / -1;
  font-size: .9375rem; color: var(--muted); text-align: center;
  padding: 40px 16px;
}

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.90);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: all; }

.lb-close {
  position: absolute; top: 14px; right: 18px;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lb-close:hover { background: rgba(255,255,255,.24); }

.lb-stage {
  display: flex; align-items: center; gap: 12px;
  width: 100%; flex: 1; min-height: 0;
  max-width: 360px;
}

.lb-frame {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
}
.lb-phone {
  width: min(280px, calc(100vw - 120px));
  height: min(calc(100vh - 180px), calc(280px * 19 / 9));
  max-height: calc(100vh - 180px);
  background: linear-gradient(160deg, #202a42 0%, #131a2c 100%);
  border-radius: 32px;
  padding: 8px;
  box-shadow:
    0 30px 80px rgba(0,0,0,.5),
    inset 0 0 0 1px rgba(255,255,255,.08);
}
.lb-screen {
  width: 100%; height: 100%;
  background: #f8fafc;
  border-radius: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(18,32,51,.12) transparent;
  transition: scrollbar-color .25s ease;
}
.lb-screen:hover,
.lb-screen:focus-within {
  scrollbar-color: rgba(18,32,51,.28) transparent;
}
.lb-screen::-webkit-scrollbar { width: 4px; }
.lb-screen::-webkit-scrollbar-track { background: transparent; }
.lb-screen::-webkit-scrollbar-thumb {
  background: rgba(18,32,51,.10);
  border-radius: 2px;
  transition: background .25s ease;
}
.lb-screen:hover::-webkit-scrollbar-thumb,
.lb-screen:focus-within::-webkit-scrollbar-thumb {
  background: rgba(18,32,51,.28);
}
.lb-screen img {
  width: 100%; height: auto; display: block;
}

.lb-arrow {
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  font-size: 30px; line-height: 1; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lb-arrow:hover { background: rgba(255,255,255,.24); }

.lb-caption {
  color: rgba(255,255,255,.82); font-size: .9375rem; font-weight: 600; text-align: center;
}
.lb-counter {
  color: rgba(255,255,255,.55); font-size: .8125rem; font-weight: 500;
  letter-spacing: .04em; text-align: center;
}

.lb-dots { display: flex; gap: 8px; align-items: center; }
.lb-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.3); border: none; cursor: pointer;
  padding: 0; transition: background .15s, transform .15s;
}
.lb-dot.active { background: #fff; transform: scale(1.3); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-row > p { font-size: .875rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px; }
.footer-links a {
  display: block; padding: 4px 10px; border-radius: 8px;
  font-size: .875rem; color: var(--muted); font-weight: 600;
  transition: color .15s, background .15s;
}
.footer-links a:hover { color: var(--text); background: rgba(18,32,51,.05); }

/* ============================================================
   Legal pages
   ============================================================ */
.legal-main { padding: 52px 0 80px; }
.legal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px;
}
.legal-card h1 { font-size: clamp(1.5rem,3vw,2rem); margin-bottom: 6px; }
.legal-card h2 { font-size: 1.0625rem; font-weight: 600; margin-top: 32px; margin-bottom: 8px; }
.legal-card p, .legal-card li {
  font-size: .9375rem; color: var(--muted); line-height: 1.7; margin-bottom: 8px;
}
.legal-card ul { padding-left: 18px; margin-bottom: 10px; }
.legal-card a:hover { text-decoration: underline; }
.legal-date {
  font-size: .875rem; color: var(--muted);
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   Focus / accessibility
   ============================================================ */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 3px; }

/* ============================================================
   Responsive – 760px+
   ============================================================ */
@media (min-width: 760px) {
  .hero, .section { padding: 80px 0; }
  .section-contact { padding-top: 48px; padding-bottom: 56px; }

  .hero-grid { grid-template-columns: 3fr 2fr; gap: 48px; align-items: center; }

  .grid.two   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .screenshot-gallery {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    max-width: 920px;
  }
  .screenshot-gallery .screenshot-frame:nth-child(n+3) { display: flex; }
  .screenshot-gallery .screenshot-frame:nth-child(n+6) { display: none; }

  .legal-card { padding: 44px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
