/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #08080a;
  --surface: #111113;
  --border: rgba(255,255,255,0.07);
  --border-h: rgba(255,255,255,0.14);
  --text: #ececef;
  --text-2: rgba(255,255,255,0.55);
  --text-3: rgba(255,255,255,0.3);
  --accent: #8b5cf6;
  --accent-2: #6366f1;
  --nav-h: 56px;
  --max-w: 780px;        /* reading width for centered text blocks */
  --pad: clamp(18px, 4vw, 50px); /* fixed side gutter (50px on desktop, shrinks on mobile) */
  --ease: cubic-bezier(.16,1,.3,1);
  --phone-bg: #1a1a1a;
  --nav-bg: rgba(8,8,10,0.65);
  --gradient-opacity: .12;
}

/* Light theme */
[data-theme="light"] {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --border: rgba(0,0,0,0.08);
  --border-h: rgba(0,0,0,0.15);
  --text: #1d1d1f;
  --text-2: rgba(0,0,0,0.55);
  --text-3: rgba(0,0,0,0.3);
  --phone-bg: #e5e5e7;
  --nav-bg: rgba(245,245,247,0.75);
}
[data-theme="light"] .bg-gradient::before,
[data-theme="light"] .bg-gradient::after { opacity: .06; }
[data-theme="light"] .hero-title {
  background: linear-gradient(180deg, #1d1d1f 30%, rgba(29,29,31,0.5));
  -webkit-background-clip: text;
  background-clip: text;
}
[data-theme="light"] .carousel-slide img { filter: grayscale(.3) brightness(1); }
[data-theme="light"] ::selection { background: var(--accent); color: #fff; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); }
[data-theme="light"] .nav-center a:hover { background: rgba(0,0,0,0.05); }
[data-theme="light"] .nav-center a.active { background: rgba(0,0,0,0.08); }
[data-theme="light"] .contact-form input,
[data-theme="light"] .contact-form textarea { background: rgba(0,0,0,0.025); }
[data-theme="light"] .contact-links a:hover { background: rgba(0,0,0,0.03); }
[data-theme="light"] .phone-mockup { box-shadow: 0 4px 20px rgba(0,0,0,.12); }
[data-theme="light"] .project-card:hover { box-shadow: 0 8px 32px rgba(139,92,246,.05); }

html { scroll-behavior: smooth; }
html[data-theme] body { transition: background .3s ease, color .3s ease; }
html[data-theme] nav { transition: background .3s ease, border-color .3s ease; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Animated mesh gradient background */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-gradient::before,
.bg-gradient::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .12;
  animation: drift 20s ease-in-out infinite alternate;
}

.bg-gradient::before {
  width: 50vw; height: 50vw;
  top: -10%; left: -10%;
  background: var(--accent);
}

.bg-gradient::after {
  width: 45vw; height: 45vw;
  bottom: -15%; right: -15%;
  background: var(--accent-2);
  animation-delay: -10s;
  animation-direction: alternate-reverse;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(8vw, 5vh) scale(1.1); }
  66%  { transform: translate(-5vw, 10vh) scale(.95); }
  100% { transform: translate(3vw, -5vh) scale(1.05); }
}

::selection { background: var(--accent); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

/* ============================================
   NAV
   ============================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
}

.nav-logo {
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.03em;
  color: var(--text);
  text-decoration: none;
}

.nav-center {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 2px;
}

.nav-center a {
  color: var(--text-3);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  transition: color .15s, background .15s;
}
.nav-center a:hover { color: var(--text-2); background: rgba(255,255,255,0.05); }
.nav-center a.active { color: var(--text); background: rgba(255,255,255,0.08); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

#theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  padding: 0;
}
#theme-toggle:hover { color: var(--text); border-color: var(--border-h); background: rgba(255,255,255,0.03); }
[data-theme="light"] #theme-toggle:hover { background: rgba(0,0,0,0.04); }

#theme-toggle .icon-moon { display: none; }
[data-theme="light"] #theme-toggle .icon-sun { display: none; }
[data-theme="light"] #theme-toggle .icon-moon { display: block; }

#language-switcher {
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
  font-family: var(--font);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
#language-switcher:hover { color: var(--text); border-color: var(--border-h); }
#language-switcher option { background: var(--surface); color: var(--text); }

/* ============================================
   MAIN
   ============================================ */
main {
  width: 100%;
  padding: 0 var(--pad);
}

section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 0;
  position: relative;
}

/* ============================================
   HERO / ABOUT
   ============================================ */
#about {
  padding-top: calc(var(--nav-h) + 56px);
  justify-content: flex-start;
  text-align: center;
  width: 100%;
}

/* Two-column hero: text left, animation right — contained & balanced */
.hero-top {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 4vw, 56px);
  text-align: left;
}

/* Glow */
.hero-glow {
  position: absolute;
  top: 46%;
  right: 6%; left: auto;
  transform: translateY(-50%);
  width: 680px; height: 560px;
  background: radial-gradient(ellipse,
    rgba(139,92,246,0.13) 0%,
    rgba(99,102,241,0.05) 42%,
    transparent 70%
  );
  pointer-events: none;
}

/* Content */
.hero { position: relative; z-index: 1; width: 100%; max-width: 620px; }

.hero-tagline {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--text-3);
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-tagline:empty { display: none; }

.hero-title {
  font-size: clamp(3.6rem, 8vw, 6.4rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,0.45));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
}

.hero-subtitle {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-desc {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text-2);
  white-space: pre-line;
  width: 100%;
  max-width: 540px;
  margin: 0;
}

/* Lottie */
.hero-visual {
  margin-top: 0;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.lottie-hero {
  width: 100%;
  max-width: 500px;
  height: auto;
  opacity: .85;
}

/* Stack hero on narrow screens */
@media (max-width: 820px) {
  .hero-top {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    max-width: 560px;
  }
  .hero { max-width: 560px; margin: 0 auto; }
  .hero-desc { max-width: 480px; margin: 0 auto; }
  .lottie-hero { max-width: 340px; }
  .hero-glow {
    top: -60px; left: 50%; right: auto;
    transform: translateX(-50%);
    width: 420px; height: 360px;
  }
}

/* Tech strip */
.tech {
  width: 100%;
  margin-top: 72px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.tech-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--text-3);
  margin-bottom: 28px;
}

/* ============================================
   CAROUSEL
   ============================================ */
.about-carousel {
  width: 100%;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carousel-slide {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(34px, 6vw, 64px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: grid;
  place-items: center;
  opacity: .45;
}

.carousel-slide img {
  display: block;
  width: auto !important; height: auto !important;
  max-width: 85% !important; max-height: 85% !important;
  object-fit: contain !important;
  filter: grayscale(.5) brightness(.85);
}

/* ============================================
   PROJECTS
   ============================================ */
#projects {
  min-height: auto;
  padding: 80px 0;
  width: 100%;
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1624px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .projects-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .projects-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .projects-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  /* Quiet surface with just a whisper of the icon's colour */
  background: rgba(var(--card-rgb, 120,120,130), .08);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.project-card:hover {
  border-color: rgba(139,92,246,.2);
  box-shadow: 0 8px 32px rgba(139,92,246,.06);
}

/* Decorative oversized icon bleeding off the left edge */
.card-bg {
  position: absolute;
  left: -16%;
  top: 50%;
  width: 62%;
  aspect-ratio: 1;
  transform: translateY(-50%) rotate(-14deg);
  border-radius: 28%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: transform .4s var(--ease);
}
.project-card:hover .card-bg {
  transform: translateY(-50%) rotate(-10deg) scale(1.04);
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.project-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 62%;
  margin-left: auto;
}

.project-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  margin-bottom: 14px;
}

.project-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 6px;
  line-height: 1.2;
}

.project-subtitle {
  font-size: .95rem;
  color: var(--text-2);
  margin-bottom: 20px;
  line-height: 1.45;
}

.appstore-link {
  display: block;
  transition: transform .2s var(--ease), opacity .2s;
}
.appstore-link:hover {
  transform: scale(1.05);
  opacity: .85;
}

.appstore-badge {
  height: 36px;
  width: auto;
}
.appstore-ru { display: none; }

.project-learn-more {
  display: inline-block;
  margin-top: 14px;
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 8px 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(139,92,246,.3);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.project-learn-more:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139,92,246,.42);
  filter: brightness(1.06);
}

/* iPhone mockup */
.phone-mockup {
  flex-shrink: 0;
  width: 130px;
  aspect-ratio: 9/19.5;
  background: var(--phone-bg);
  border-radius: 20px;
  padding: 5px;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  scroll-snap-align: center;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease);
}
.phone-mockup:hover { transform: scale(1.04); }

.phone-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}


/* Responsive */
@media (max-width: 640px) {
  .project-card { padding: 24px 16px; }
  .project-info { width: 66%; }
  .project-icon { width: 72px; height: 72px; border-radius: 18px; }
  .project-name { font-size: 1rem; }
  #projects { padding: 60px 0; }
  .phone-mockup { width: 110px; border-radius: 18px; padding: 4px; }
  .phone-mockup img { border-radius: 14px; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .project-card { padding: 24px; }
  .project-icon { width: 72px; height: 72px; border-radius: 18px; }
  .phone-mockup { width: 110px; border-radius: 18px; }
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  border: none;
  height: 1px;
  width: 100%;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--border-h) 50%, transparent);
}

/* ============================================
   CONTACT
   ============================================ */
#contact { padding-bottom: 60px; width: 100%; }

.contact-header {
  text-align: center;
  margin-bottom: 40px;
}

.contact-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.04em;
  margin-bottom: 10px;
}

.contact-header p {
  font-size: .95rem;
  color: var(--text-2);
}

.contact-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(24px, 5vw, 40px);
  transition: border-color .3s var(--ease);
}
.contact-card:hover { border-color: var(--border-h); }

.contact-form { display: grid; gap: 20px; }
.form-field { display: grid; gap: 6px; }

.contact-form label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-2);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: .9rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-3); }

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(139,92,246,.45);
  box-shadow: 0 0 0 3px rgba(139,92,246,.1);
}

.contact-form textarea { resize: vertical; min-height: 100px; }

/* Button */
.btn-primary {
  width: 100%;
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139,92,246,.3);
  filter: brightness(1.08);
}
.btn-primary:active { transform: translateY(0); }

/* Links */
.contact-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.contact-links a {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color .15s, border-color .15s, background .15s;
}
.contact-links a:hover {
  color: var(--text-2);
  border-color: var(--border-h);
  background: rgba(255,255,255,0.03);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 28px var(--pad);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--text-3);
}

.footer-logo {
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: -.02em;
  color: var(--text-2);
}

/* ============================================
   BACK TO TOP
   ============================================ */
#toTopBtn {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 90;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .3s, transform .3s var(--ease), color .15s, border-color .15s;
}
#toTopBtn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#toTopBtn:hover {
  color: var(--text);
  border-color: var(--border-h);
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
/* Stagger children */
.reveal:nth-child(2) { transition-delay: .1s; }
.reveal:nth-child(3) { transition-delay: .2s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .nav-logo { display: none; }
  .nav-center { position: static; transform: none; }
  .nav-container { justify-content: center; gap: 8px; }

  main { padding: 0 16px; }
  section { padding: 60px 0; }

  #about { padding-top: calc(var(--nav-h) + 40px); }

  .hero-title { font-size: 3.1rem; }
  .hero-glow { width: 360px; height: 300px; top: -60px; }
  .lottie-hero { max-width: 220px; }
  .hero-visual { margin-top: 36px; }
  .tech { margin-top: 48px; }

  .contact-card { padding: 20px; }

  footer {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 20px 16px;
  }
}

@media (max-width: 900px) {
  .carousel-slide { width: clamp(44px, 10vw, 72px); }
}

/* ============================================
   APP PAGE
   ============================================ */
.app-page {
  width: 100%;
  padding: calc(var(--nav-h) + 16px) var(--pad) 0;
}

/* App Hero */
.app-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 12px;
  padding-bottom: 48px;
}

.app-hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  margin-bottom: 20px;
}

.app-hero-name {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.app-hero-tagline {
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 24px;
}

.app-hero .appstore-link {
  display: inline-block;
}

/* App Screenshots */
.app-screenshots {
  padding: 32px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-screenshots-track {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 16px;
  justify-content: safe center;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 16px;
}
.app-screenshots-track::-webkit-scrollbar { height: 0; display: none; }

.app-screenshots .phone-mockup {
  width: 160px;
  cursor: zoom-in;
}

/* Carousel arrows */
.gallery-arrow {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: color .15s, border-color .15s, background .15s, opacity .2s;
}
.gallery-arrow:hover { color: var(--text); border-color: var(--border-h); }
.gallery-arrow:disabled { opacity: .25; cursor: default; }
@media (max-width: 640px) {
  .gallery-arrow { display: none; }
  .app-screenshots { gap: 0; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox-img {
  max-width: min(90vw, 420px);
  max-height: 84vh;
  border-radius: 24px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

.lightbox-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background .15s, border-color .15s;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.2); }
.lightbox-close { top: 20px; right: 20px; width: 42px; height: 42px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  letter-spacing: .04em;
}
@media (max-width: 640px) {
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

/* App Section (features, faq) */
.app-section {
  padding: 40px 0;
  width: 100%;
}

.app-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 24px;
  text-align: center;
}

/* Features grid */
.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.app-feature-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: border-color .3s var(--ease);
}
.app-feature-card:hover {
  border-color: rgba(139,92,246,.2);
}

.app-feature-name {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.app-feature-desc {
  font-size: .85rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* FAQ Accordion */
.app-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .3s var(--ease);
}
.app-faq-item:hover {
  border-color: var(--border-h);
}

.app-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  gap: 12px;
}

.app-faq-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--text-3);
  transition: transform .3s var(--ease);
}

.app-faq-item.open .app-faq-arrow {
  transform: rotate(180deg);
}

.app-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s var(--ease);
}

.app-faq-answer-inner {
  padding: 0 20px 16px;
  font-size: .88rem;
  line-height: 1.7;
  color: var(--text-2);
}

/* App page footer spacing */
.app-page-footer {
  margin-top: 40px;
}

/* App page responsive */
@media (max-width: 640px) {
  .app-hero { padding-top: 8px; }
  .app-hero-icon { width: 96px; height: 96px; border-radius: 22px; }
  .app-features { grid-template-columns: 1fr; }
  .app-screenshots .phone-mockup { width: 130px; }
  .app-page { padding: calc(var(--nav-h) + 12px) 16px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .carousel-slide { transition: none; }
}

/* ============================================
   SEO REBUILD ADDITIONS
   (lang switch link, breadcrumbs, prose, legal pages)
   ============================================ */

/* Language switch — now a real link to the other-language URL */
/* Breadcrumbs (centered to match the centered app-page layout) */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-2);
  margin-bottom: 4px;
}
.breadcrumb a { color: var(--text-2); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span[aria-current="page"] { color: var(--text-3); }
.breadcrumb .crumb-sep { color: var(--text-3); }

/* App "About" prose + shared .app-description typography */
.app-about { margin-top: 8px; }
.app-description {
  max-width: var(--max-w);
  margin: 0 auto;
  color: var(--text-2);
  line-height: 1.75;
  font-size: .98rem;
}
.app-description p { margin-bottom: 1em; }
.app-description h3 {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.4em 0 .6em;
}
.app-description ul { margin: 0 0 1.2em; padding-left: 1.2em; }
.app-description li { margin-bottom: .5em; }
.app-description a { color: var(--accent); text-decoration: none; }
.app-description a:hover { text-decoration: underline; }

/* Legal pages */
.legal-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px) var(--pad) 80px;
}
.legal-title {
  color: var(--text);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 20px;
}
.legal-body h3 { font-size: 1.1rem; }
.legal-body em { color: var(--text-3); }
