/* ==========================================================================
   App pages, homepage app carousel, nav apps menu, language switch.
   --app-accent / --app-on-accent are set per app (page :root or slide style).
   ========================================================================== */

:root {
  --app-accent: var(--accent);
  --app-on-accent: var(--bg-primary);
}

/* --------------------------------------------------------------------------
   NAV: apps menu, language switch, language banner
-------------------------------------------------------------------------- */

.nav-menu { position: relative; }

.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
}

.nav-menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-menu-btn svg { transition: transform var(--transition-fast); }

.nav-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  left: -16px;
  width: 340px;
  padding: var(--space-2);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 2px;
}

.nav-menu-list[hidden] { display: none; }

.nav-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.nav-menu-item:hover,
.nav-menu-item:focus-visible { background: var(--bg-secondary); }

.nav-menu-item img { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }

.nav-menu-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.nav-menu-item small {
  display: block;
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--text-secondary);
}

.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-lang:hover { color: var(--text-primary); border-color: var(--border-hover); }

.nav-cta { display: none; }

@media (max-width: 1099px) {
  .nav-link-wide { display: none; }
}

@media (min-width: 1024px) {
  .nav-cta { display: inline-flex; }
}

.nav-hamburger { width: 44px; height: 44px; padding: 10px; }

.nav-drawer { overflow-y: auto; }

.nav-drawer-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 var(--space-4);
}

.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
}

.nav-drawer-app img { border-radius: 7px; }

.nav-drawer-sep {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-2) 0;
}

.lang-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-drawer);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-hover);
  font-size: var(--text-sm);
}

.lang-banner[hidden] { display: none; }

.lang-banner-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 56px;
}

.lang-banner-inner span { color: var(--text-secondary); flex: 1; }
.lang-banner-inner a { color: var(--accent); font-weight: 600; white-space: nowrap; }

.lang-banner-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   SHARED APP PIECES: identity row, media, store badges
-------------------------------------------------------------------------- */

.app-id {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.app-id-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.app-id-name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.app-id-platforms {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--app-accent);
  line-height: 1.4;
}

.app-media {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.app-media-video {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.app-media-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-media-phone {
  display: flex;
  justify-content: center;
}

.app-media-phone .phone { width: min(260px, 64vw); }

.video-sound {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(6, 7, 14, 0.72);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background var(--transition-fast);
}

.video-sound:hover { background: rgba(6, 7, 14, 0.9); }
.video-sound svg + svg { display: none; }
.video-sound[aria-pressed="true"] svg { display: none; }
.video-sound[aria-pressed="true"] svg + svg { display: block; }

.store-badge { min-height: 52px; padding: 8px var(--space-4); }
.store-badge-text strong { font-size: var(--text-sm); }

.store-badge-soon {
  opacity: 0.6;
  cursor: default;
}

.store-badge-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.blob-app {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(120px);
  background: var(--app-accent);
  opacity: 0.1;
  top: -220px;
  left: -180px;
  transition: background var(--transition-slow);
}


/* --------------------------------------------------------------------------
   HOMEPAGE APP CAROUSEL
-------------------------------------------------------------------------- */

.hero-apps-carousel {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding-bottom: var(--space-8);
}

.hero-slides {
  display: grid;
  width: 100%;
}

.hero-slide {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
}

.hero-slide.is-active {
  visibility: visible;
  opacity: 1;
  animation: slideIn 0.6s ease both;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.hero-slide-grid { padding-bottom: var(--space-6); }

.hero-slide-title { font-size: var(--h1); line-height: 1.08; }

.hero-slide .store-badge:hover { border-color: var(--app-accent); }

.hero-learn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  width: fit-content;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--app-accent);
}

.hero-learn:hover svg { transform: translateX(3px); }
.hero-learn svg { transition: transform var(--transition-fast); }

.hero-slide-visual .app-media { max-width: 480px; }

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.hero-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 6px var(--space-4) 6px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  overflow: hidden;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.hero-tab img { width: 30px; height: 30px; border-radius: var(--radius-full); }

.hero-tab:hover { color: var(--text-primary); }

.hero-tab.is-active {
  color: var(--text-primary);
  border-color: var(--app-accent);
}

.hero-tab-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--app-accent);
}

.hero-tab.is-active .hero-tab-progress { animation: tabProgress var(--slide-ms, 9000ms) linear forwards; }
.hero-apps-carousel.is-paused .hero-tab-progress { animation: none; width: 0; }

@keyframes tabProgress {
  from { width: 0; }
  to   { width: 100%; }
}

.hero-arrows { display: flex; gap: var(--space-2); }

.hero-arrow {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.hero-arrow:hover { color: var(--text-primary); border-color: var(--border-hover); }
.hero-arrow .i-play { display: none; }
.hero-arrow[aria-pressed="true"] .i-play { display: block; }
.hero-arrow[aria-pressed="true"] .i-pause { display: none; }

@media (max-width: 1023px) {
  .hero-apps-carousel { min-height: auto; padding-top: calc(72px + var(--space-4)); }
  .hero-controls { order: -1; margin-bottom: var(--space-2); }
  .hero-slide-grid { padding-top: var(--space-6); gap: var(--space-8); }
  .hero-slide-visual .app-media-video { max-width: 340px; }
  .hero-slide-visual .app-media-phone .phone { width: min(200px, 52vw); }
}

@media (max-width: 520px) {
  .hero-tab span { display: none; }
  .hero-tab { padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; }
  .hero-tab.is-active .hero-tab-progress { animation: none; }
}

.studio-intro { background: var(--bg-secondary); border-top: 1px solid var(--border); }

.studio-intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-6);
  max-width: 820px;
}

.studio-intro-inner p { max-width: 640px; font-size: var(--text-lg); }
.studio-intro-inner .hero-ctas { justify-content: center; }


/* --------------------------------------------------------------------------
   HOMEPAGE APP CARDS
-------------------------------------------------------------------------- */

.apps-section-alt { background: var(--bg-secondary); }

@media (min-width: 900px) {
  .apps-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apps-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.apps-grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

.app-card-link { color: inherit; }
.app-card-link:hover { border-color: var(--app-accent); }
.app-card-link .app-card-role { color: var(--app-accent); }
.app-card-link .app-tag-live { color: var(--app-accent); border-color: var(--border); background: transparent; text-transform: none; letter-spacing: 0; }

.app-card-appicon { width: 56px; height: 56px; border-radius: 14px; }

.app-card-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  min-height: 44px;
}


/* --------------------------------------------------------------------------
   APP PAGE
-------------------------------------------------------------------------- */

.app-eyebrow {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--app-accent);
}

.app-hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(72px + var(--space-10));
}

.app-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-10);
  align-items: center;
  padding-bottom: var(--space-12);
}

.app-hero-grid > * { min-width: 0; }

@media (min-width: 1024px) {
  .app-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--space-16);
    padding-bottom: var(--space-16);
  }
}

.app-hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.app-hero-title { font-size: var(--h1); line-height: 1.08; }

.app-hero-sub {
  font-size: var(--text-lg);
  line-height: 1.75;
  max-width: 560px;
}

.app-hero-note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: calc(-1 * var(--space-2));
}

.app-hero .store-badge:hover { border-color: var(--app-accent); }

.app-subnav {
  position: relative;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.app-subnav-inner {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  scrollbar-width: none;
}

.app-subnav-inner::-webkit-scrollbar { display: none; }

.app-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.app-subnav a:hover { color: var(--text-primary); border-bottom-color: var(--app-accent); }

.app-section { background: var(--bg-primary); scroll-margin-top: 72px; }
.app-section-alt { background: var(--bg-secondary); }

.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--space-5);
}

.app-feature,
.app-highlight,
.app-plan,
.app-step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
}

.app-section-alt .app-feature,
.app-section-alt .app-highlight { background: var(--bg-primary); }

.app-feature h3,
.app-highlight h3,
.app-step h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.app-feature p,
.app-highlight p,
.app-step p {
  font-size: var(--text-base);
  line-height: 1.7;
}

.app-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--app-accent) 14%, transparent);
  color: var(--app-accent);
  margin-bottom: var(--space-4);
}

.app-steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-5);
}

.app-step-num {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--app-accent);
  margin-bottom: var(--space-4);
}

.app-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: var(--space-6);
  max-width: 1040px;
  margin: 0 auto;
}

.app-videos-3 { max-width: 860px; }

.app-video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.app-video-card figcaption {
  margin-top: var(--space-3);
  text-align: center;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

@media (max-width: 559px) {
  .app-video-card { max-width: 300px; margin: 0 auto; width: 100%; }
}

.app-shots { justify-content: safe center; margin-bottom: var(--space-4); }

.app-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--space-5);
}

.app-highlight { border-top: 3px solid var(--app-accent); }

.app-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--space-5);
  align-items: stretch;
}

.app-plans-1 { max-width: 420px; margin: 0 auto; }
.app-plans-2 { max-width: 800px; margin: 0 auto; }

.app-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: var(--bg-primary);
}

.app-plan-featured { border-color: var(--app-accent); box-shadow: 0 0 0 1px var(--app-accent); }

.app-plan-badge {
  position: absolute;
  top: -12px;
  left: var(--space-6);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--app-accent);
  color: var(--app-on-accent);
  font-size: var(--text-xs);
  font-weight: 700;
}

.app-plan h3 { font-size: var(--text-xl); }

.app-plan-price { display: flex; flex-direction: column; }

.app-plan-price strong {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}

.app-plan-price span { font-size: var(--text-sm); color: var(--text-secondary); }

.app-plan ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  align-content: start;
  flex: 1;
}

.app-plan li {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.5;
}

.app-plan li svg { color: var(--app-accent); flex-shrink: 0; margin-top: 3px; }

.app-plan-foot {
  font-size: var(--text-sm);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
}

.app-partner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-10);
  align-items: start;
}

@media (min-width: 1024px) {
  .app-partner { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-16); }
}

.app-partner-copy h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: var(--space-4); }
.app-partner-copy p { font-size: var(--text-lg); line-height: 1.75; }

.app-cta .cta-inner { display: flex; flex-direction: column; align-items: center; }
.app-cta .store-badges { justify-content: center; margin-top: var(--space-6); }
.app-cta-icon { width: 72px; height: 72px; border-radius: 18px; margin-bottom: var(--space-6); box-shadow: var(--shadow-card); }


/* --------------------------------------------------------------------------
   FORMS, TOAST, ABOUT PAGE BITS
-------------------------------------------------------------------------- */

.form-optional { font-weight: 400; color: var(--text-muted); }

.form-group input,
.form-group select,
.form-group textarea { min-height: 48px; font-size: var(--text-base); }

#toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  z-index: var(--z-drawer);
  max-width: min(520px, calc(100vw - 32px));
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  color: var(--text-primary);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.toast-error { border-color: var(--danger); }

.story-body { margin-top: var(--space-8); }
.value-icon-brand { color: var(--brand); }
.value-icon-accent { color: var(--accent); }

.contact-detail-apps { display: flex; flex-wrap: wrap; gap: 4px; color: var(--text-muted); }
