/* pianoplayground.app — app-specific styles */

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--sp-16) var(--sp-6) var(--sp-24);
  gap: var(--sp-8);
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-4);
}

.hero-icon {
  width: 96px;
  height: 96px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.30));
}


.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: normal;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.0;
  margin: 0;
}

.hero-tagline {
  font-size: clamp(var(--text-base), 2.5vw, var(--text-lg));
  color: var(--color-secondary);
  max-width: 46ch;
  line-height: 1.6;
  margin: 0 0 var(--sp-4);
}

/* ── Hero media (video + device picker) ──────────────────── */

.hero-media {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

/* ── Hero video ──────────────────────────────────────────── */

#video-main {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25),
              0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ── Screenshots — compact filmstrip ─────────────────────── */

.screenshots-scroll {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: var(--sp-2) var(--sp-4);
  scrollbar-width: none;
  width: 100%;
  max-width: 900px;
}

.screenshots-scroll:empty {
  display: none;
}

.screenshots-scroll::-webkit-scrollbar {
  display: none;
}

.screenshots-scroll img {
  scroll-snap-align: start;
  flex-shrink: 0;
  width: 120px;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 0.85;
  transition: opacity var(--duration) var(--ease);
}

.screenshots-scroll img:hover {
  opacity: 1;
}

/* ── Sound toggle ────────────────────────────────────────── */

.video-sound-toggle {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-secondary);
  font-size: var(--text-sm);
  padding: var(--sp-2) var(--sp-4);
  cursor: pointer;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease);
  line-height: 1;
  align-self: center;
}

.video-sound-toggle:hover {
  background: var(--color-surface2);
  color: var(--color-text);
}

/* ── CTA ─────────────────────────────────────────────────── */

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-ornament);
  color: #fff;
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--sp-3) var(--sp-8);
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: background var(--duration) var(--ease),
              transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.btn-appstore:hover {
  background: #22724f;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}


/* ── Features ────────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  max-width: 960px;
  margin: 0 auto;
  padding: var(--sp-16) var(--sp-6);
}

.feature-card {
  padding: var(--sp-8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.feature-card h2 {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: normal;
  color: var(--color-ornament);
  margin-bottom: var(--sp-3);
  letter-spacing: 0.02em;
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--color-secondary);
  line-height: 1.75;
  max-width: none;
}

/* ── Deep sections ───────────────────────────────────────── */

.deep-section {
  max-width: 680px;
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6);
  border-top: 1px solid var(--color-border);
}

.deep-section h2 {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: normal;
  color: var(--color-text);
  letter-spacing: 0.01em;
  margin-bottom: var(--sp-5);
}

.deep-section p {
  font-size: var(--text-base);
  color: var(--color-secondary);
  line-height: 1.8;
  margin-bottom: var(--sp-4);
  max-width: none;
}

.deep-section--offline {
  text-align: center;
  padding-top: var(--sp-12);
  padding-bottom: var(--sp-16);
}

.deep-section--offline p {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  color: var(--color-secondary);
  opacity: 0.7;
  font-style: italic;
}

/* ── iPhone section ──────────────────────────────────────── */

.iphone-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-16) var(--sp-6);
  border-top: 1px solid var(--color-border);
}

#video-iphone {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25),
              0 4px 16px rgba(0, 0, 0, 0.15);
}

.iphone-section .screenshots-scroll {
  max-width: 420px;
}

/* ── Lightbox ────────────────────────────────────────────── */

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#lightbox[hidden] {
  display: none;
}

#lightbox img {
  max-width: 70vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.8);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-close {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-6);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 150ms;
  z-index: 210;
}

.lightbox-close::before,
.lightbox-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2.5px;
  background: #fff;
  border-radius: 1px;
}

.lightbox-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.lightbox-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 150ms;
  z-index: 210;
}

.lightbox-nav::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-top: 2.5px solid #fff;
  border-right: 2.5px solid #fff;
}

.lightbox-prev::before {
  transform: rotate(-135deg);
  margin-left: 20px;
}

.lightbox-next::before {
  transform: rotate(45deg);
  margin-left: 16px;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev { left: var(--sp-6); }
.lightbox-next { right: var(--sp-6); }

@media (min-width: 721px) {
  .lightbox-close,
  .lightbox-nav {
    width: 64px;
    height: 64px;
  }
  .lightbox-close::before,
  .lightbox-close::after {
    width: 26px;
    height: 3px;
  }
  .lightbox-nav::before {
    width: 16px;
    height: 16px;
    border-width: 3px;
  }
  .lightbox-prev::before { margin-left: 22px; }
  .lightbox-next::before { margin-left: 18px; }
}

.lightbox-counter {
  position: absolute;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 560px) {
  #lightbox img {
    max-width: 90vw;
  }
  .lightbox-close {
    top: var(--sp-3);
    right: var(--sp-3);
    width: 44px;
    height: 44px;
    font-size: 1.75rem;
  }
  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 1.75rem;
  }
  .lightbox-prev { left: var(--sp-2); }
  .lightbox-next { right: var(--sp-2); }
}

/* ── Support parent link ─────────────────────────────────── */

.support-parent {
  margin-top: var(--sp-8);
  text-align: center;
}

.support-parent a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.support-parent a:hover {
  color: var(--color-text);
  border-color: var(--color-border-hover);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 720px) {
  .features {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }
}

@media (max-width: 480px) {
  .hero {
    padding: var(--sp-12) var(--sp-4) var(--sp-16);
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .features {
    padding: var(--sp-12) var(--sp-4);
  }

  .deep-section {
    padding: var(--sp-8) var(--sp-4);
  }

  .iphone-section {
    padding: var(--sp-12) var(--sp-4);
  }
}
