/* ---------- variables ---------- */
:root {
  --bg: #000000;
  --btn: #262626;
  --btn-hover: #303030;
  --white: #ffffff;
  --gray: #9a9a9a;
  --border: #262626;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
}

a { text-decoration: none; color: inherit; }

/* screen-reader-only text (announced, not shown visually) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

::selection {
  background: var(--white);
  color: var(--bg);
}

/* ---------- full screen split layout ---------- */
.page {
  display: flex;
  min-height: 100vh;
}

/* lock to a single viewport, no scrolling — desktop/laptop only */
@media (min-width: 901px) {
  html, body { height: 100%; overflow: hidden; }

  .page {
    height: 100vh;
    overflow: hidden;
  }
}

.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 5vh, 58px) clamp(24px, 5vw, 66px);
  max-width: 580px;
  overflow: hidden;
}

.gallery {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 4vh, 40px);
  background: #000000;
  border-left: 1px solid var(--border);
}

.gallery-track {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 100%;
  gap: 20px;
  animation: scroll-wheel 30s linear infinite;
  transition: opacity 0.25s ease;
}

.gallery:hover .gallery-track {
  animation-play-state: paused;
}

.gallery.is-focused .gallery-track {
  opacity: 0;
}

.gallery img {
  height: min(78vh, 38vw, 660px);
  border-radius: 16px;
  flex-shrink: 0;
}

.gallery-focus {
  position: absolute;
  top: 50%;
  left: 50%;
  height: min(78vh, 38vw, 660px);
  border-radius: 16px;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery-focus.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.gallery.is-focused img.is-active {
  opacity: 1;
  transform: scale(1.08);
  position: relative;
  z-index: 1;
}

@keyframes scroll-wheel {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- text ---------- */
.logo {
  height: auto;
  max-height: clamp(88px, 16vh, 160px);
  width: auto;
  max-width: 100%;
  align-self: flex-start;
  margin-bottom: clamp(11px, 2.6vh, 21px);
}

.lede {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: clamp(14px, 3.5vh, 28px);
  max-width: 420px;
}

/* ---------- details list ---------- */
.details {
  list-style: none;
  margin-bottom: clamp(14px, 3.5vh, 30px);
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.7vh, 14px);
}

.details li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

.details strong {
  font-size: 14px;
  font-weight: 700;
}

.details span {
  color: var(--gray);
  font-size: 13px;
}

/* ---------- buttons ---------- */
.btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--btn);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: clamp(9px, 1.8vh, 13px) 17px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: clamp(8px, 1.4vh, 11px);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  max-width: 300px;
}

.btn:hover {
  background: var(--btn-hover);
  border-color: #444;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* arrow that appears on hover to signal the button is clickable */
.btn::after {
  content: '→';
  margin-left: auto;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.btn-icon {
  display: flex;
  align-items: center;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

/* App Store badge is Apple's official artwork — no extra background/padding */
.btn-store {
  background: none;
  padding: 0;
}

.btn-store:hover {
  background: none;
  border-color: transparent;
  opacity: 0.85;
}

.btn-store::after { display: none; }

.store-badge {
  height: 45px;
  width: auto;
}

/* ---------- note ---------- */
.note {
  color: var(--gray);
  font-size: 12px;
  margin-top: 11px;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .page { flex-direction: column; }

  .content {
    max-width: 560px;
    margin: 0 auto;
    padding: 48px 24px;
  }

  .gallery {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 24px;
    height: auto;
  }

  .gallery-track {
    height: auto;
  }

  .gallery img {
    height: auto;
    width: 60vw;
    max-width: 260px;
  }
}

/* ---------- legal / privacy page ---------- */
.legal-page {
  display: flex;
  justify-content: center;
  padding: 64px 24px 96px;
}

.legal {
  width: 100%;
  max-width: 680px;
}

.back-link {
  display: inline-block;
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 32px;
}

.back-link:hover { color: var(--white); }

.legal .logo {
  height: auto;
  max-height: 40px;
  margin-bottom: 40px;
}

.legal h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 40px 0 12px;
}

.legal h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.legal .updated {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal p {
  color: var(--gray);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal p strong {
  color: var(--white);
}

.legal ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal li {
  color: var(--gray);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.legal li strong {
  color: var(--white);
}

.legal a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal .archive {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.legal .archive summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}

.legal .archive > *:not(summary) {
  margin-top: 20px;
}

/* respect the OS-level "reduce motion" accessibility setting */
@media (prefers-reduced-motion: reduce) {
  .gallery-track {
    animation: none;
  }

  .gallery {
    overflow-x: auto;
  }

  .btn,
  .btn::after {
    transition: none;
  }
}
