:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --text: #1d1d1f;
  --text-soft: #6e6e73;
  --border: #e3e3e6;
  --accent: #ff3b30;
  --btn-bg: #1d1d1f;
  --btn-text: #ffffff;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-soft: #1c1c1e;
    --text: #f5f5f7;
    --text-soft: #98989d;
    --border: #2c2c2e;
    --btn-bg: #ffffff;
    --btn-text: #000000;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 88px 0 48px;
}

.logo {
  width: 160px;
  height: 160px;
  border-radius: 36px;
  box-shadow: var(--shadow);
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 24px 0 8px;
}

.tagline {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--text-soft);
  margin: 0 0 36px;
}

/* ---------- Store buttons ---------- */
.store-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 14px;
  min-width: 200px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.store-btn:hover { transform: translateY(-2px); opacity: 0.92; }

.store-btn__apple {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.store-btn__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.store-btn__text small { font-size: 0.72rem; opacity: 0.85; }
.store-btn__text strong { font-size: 1.2rem; font-weight: 600; }

/* ---------- Features ---------- */
.features {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 1.05rem;
}
.features strong { color: var(--text); }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 24px 0 64px;
}

.gallery figure {
  margin: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.gallery img.zoomable {
  cursor: zoom-in;
  transition: transform 0.18s ease;
}
.gallery img.zoomable:hover { transform: scale(1.015); }

/* ---------- Image viewer (lightbox) ---------- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.viewer.is-open { display: block; }

.viewer__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
  touch-action: none; /* let JS handle pinch/pan gestures */
}
.viewer.is-zoomed .viewer__stage { cursor: grab; }
.viewer.is-dragging .viewer__stage { cursor: grabbing; }

.viewer__img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.viewer__close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.viewer__close:hover { background: rgba(255, 255, 255, 0.25); }

.viewer__hint {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  pointer-events: none;
}
@media (hover: none) {
  /* shorten hint wording feel on touch via opacity; text set in JS markup */
  .viewer__hint { font-size: 0.8rem; }
}

/* ---------- Prose (privacy page) ---------- */
.prose {
  max-width: 720px;
  padding-top: 64px;
  padding-bottom: 48px;
}
.prose .back { margin-bottom: 32px; }
.prose h1 { font-size: 2.4rem; margin-bottom: 4px; }
.prose .updated { color: var(--text-soft); margin-top: 0; }
.prose h2 { font-size: 1.3rem; margin-top: 36px; }
.prose a { color: var(--accent); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px 24px;
  color: var(--text-soft);
  font-size: 0.9rem;
}
footer a { color: var(--text-soft); text-decoration: none; }
footer a:hover { color: var(--text); }
footer .dot { margin: 0 10px; }
