/* ===== Global baseline: no white flash, no document scroll ===== */
html,
body {
  height: 100%;
  margin: 0;
  background: #000;
  overflow: hidden;
}

/* ===== Fixed header + fixed footer, only middle scrolls ===== */
.siteLayout {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #000;
}

.siteMain {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 18px 24px;
}

/* Default page container inside the scroll region */
.page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
}

/* ===== Top menu ===== */
.topbar {
  padding: 18px 18px 6px;
}

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 4vw, 44px);
  flex-wrap: wrap;
}

.navLink {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: clamp(14px, 1.8vw, 16px);
  letter-spacing: 0.02em;
  padding: 8px 10px;
  border-radius: 10px;
  transition: color 160ms ease, background-color 160ms ease;
}

.navLink:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.06);
}

.navLink.active {
  color: rgba(255, 255, 255, 0.98);
  background: rgba(255, 255, 255, 0.10);
}

/* ===== Home page brand ===== */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@keyframes jedaFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo {
  width: min(80vw, 900px);
  height: auto;
  max-height: 62vh;
  display: block;
  object-fit: contain;
  opacity: 0;
  animation: jedaFadeIn 900ms ease-out forwards;
}

.brandName {
  margin-top: 22px;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(68px, 12vw, 152px);
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: center;
  opacity: 0;
  animation: jedaFadeIn 900ms ease-out 90ms forwards;
}

.tagline {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(18px, 2.6vw, 32px);
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  opacity: 0;
  animation: jedaFadeIn 900ms ease-out 160ms forwards;
}

/* ===== Shared content blocks (Contact, simple pages) ===== */
.content {
  max-width: 900px;
  width: min(92vw, 900px);
  text-align: center;
  padding: 10px 0;
}

.contentTitle {
  margin: 0 0 14px;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.contentText {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(16px, 2.2vw, 22px);
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.contentLink {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  padding-bottom: 2px;
}

.contentLink:hover {
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

/* Contact page soft load */
@keyframes contactItemIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.contactItem {
  opacity: 1; /* fail-safe: visible even if animation does not run */
  animation: contactItemIn 650ms ease-out both;
}

.contactItem:nth-child(1) { animation-delay: 0ms; }
.contactItem:nth-child(2) { animation-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
  .contactItem {
    opacity: 1;
    animation: none;
    transform: none;
  }
}

/* ===== Footer ===== */
.footer {
  padding: 18px 18px 22px;
}

.footerInner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.65);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(12px, 1.6vw, 15px);
  letter-spacing: 0.02em;
  text-align: center;
}

.footerLink {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.footerLink:hover {
  text-decoration: underline;
}

/* ===== Apps list page ===== */
.pageList {
  align-items: flex-start;
}

.appsList {
  width: min(980px, 96vw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.appRow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 16px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.appRow:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.appRowIcon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.04);
}

.appRowName {
  color: rgba(255, 255, 255, 0.92);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 650;
  font-size: clamp(16px, 2.2vw, 20px);
  letter-spacing: 0.01em;
  line-height: 1.15;
}

/* Apps list soft load */
@keyframes listItemIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.appsList .appRow {
  opacity: 1; /* fail-safe */
  animation: listItemIn 520ms ease-out both;
}

.appsList .appRow:nth-child(1)  { animation-delay: 0ms; }
.appsList .appRow:nth-child(2)  { animation-delay: 60ms; }
.appsList .appRow:nth-child(3)  { animation-delay: 120ms; }
.appsList .appRow:nth-child(4)  { animation-delay: 180ms; }
.appsList .appRow:nth-child(5)  { animation-delay: 240ms; }
.appsList .appRow:nth-child(6)  { animation-delay: 300ms; }
.appsList .appRow:nth-child(7)  { animation-delay: 360ms; }
.appsList .appRow:nth-child(8)  { animation-delay: 420ms; }
.appsList .appRow:nth-child(9)  { animation-delay: 480ms; }
.appsList .appRow:nth-child(10) { animation-delay: 540ms; }
.appsList .appRow:nth-child(11) { animation-delay: 600ms; }
.appsList .appRow:nth-child(12) { animation-delay: 660ms; }
.appsList .appRow:nth-child(13) { animation-delay: 720ms; }

@media (prefers-reduced-motion: reduce) {
  .appsList .appRow {
    opacity: 1;
    animation: none;
    transform: none;
  }
}

/* ===== About page ===== */
.pageAbout {
  align-items: flex-start;
  justify-content: center;
  padding-top: 34px;
  padding-bottom: 34px;
}

.about {
  width: min(980px, 96vw);
}

.aboutTitle {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.98);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 750;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.aboutTagline {
  display: block;
  margin: 10px 0 18px;
  color: rgba(255, 255, 255, 0.90);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;

  letter-spacing: 0.02em;
  text-transform: none;
}

.tagVision {
  color: #DCCBFF;
}

.aboutLead {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(16px, 2.2vw, 22px);
  letter-spacing: 0.01em;
  line-height: 1.55;
}

.aboutGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.aboutCard {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 16px;
}

.aboutCardTitle {
  color: rgba(255, 255, 255, 0.95);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

.aboutCardText {
  color: rgba(255, 255, 255, 0.78);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
}

.aboutSection {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.aboutHeading {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.92);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.aboutText {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.55;
}

.aboutList {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.65;
}

.aboutLink {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  padding-bottom: 2px;
}

.aboutLink:hover {
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

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

/* About page soft load (safe: visible even if animation fails) */
@keyframes aboutItemIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.about .aboutItem {
  opacity: 1; /* fail-safe */
  animation: aboutItemIn 650ms ease-out both;
}

.about .aboutItem:nth-child(1) { animation-delay: 0ms; }
.about .aboutItem:nth-child(2) { animation-delay: 90ms; }
.about .aboutItem:nth-child(3) { animation-delay: 180ms; }
.about .aboutItem:nth-child(4) { animation-delay: 270ms; }
.about .aboutItem:nth-child(5) { animation-delay: 360ms; }
.about .aboutItem:nth-child(6) { animation-delay: 450ms; }
.about .aboutItem:nth-child(7) { animation-delay: 540ms; }
.about .aboutItem:nth-child(8) { animation-delay: 630ms; }

@media (prefers-reduced-motion: reduce) {
  .about .aboutItem {
    opacity: 1;
    animation: none;
    transform: none;
  }
}

/* ===== App detail pages (template) ===== */
.pageApp {
  align-items: flex-start;
  justify-content: center;
  padding-top: 26px;
  padding-bottom: 26px;
}

.appCard {
  width: min(980px, 96vw);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
}

.appTop {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.appIconLarge {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.04);
}

.appMeta {
  flex: 1;
  min-width: 0;
}

.appTitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.98);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 750;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.appDesc {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(15px, 2.1vw, 18px);
  line-height: 1.55;
}

.appStoreBtn {
  display: inline-flex; /* fixed typo */
  margin-top: 18px;
  text-decoration: none;
}

.appStoreBadge {
  height: 52px;
  width: auto;
  display: block;
}

@media (max-width: 640px) {
  .appTop {
    flex-direction: column;
    align-items: flex-start;
  }

  .appIconLarge {
    width: 88px;
    height: 88px;
    border-radius: 20px;
  }
}

/* App template holding state + JS stagger reveal (.show) */
.appHold .pageApp .appItem {
  opacity: 0 !important;
  transform: translateY(10px);
}

.pageApp .appItem {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 650ms ease-out, transform 650ms ease-out;
  will-change: opacity, transform;
}

.pageApp .appItem.show {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .pageApp .appItem {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.pageAbout {
  position: relative;
  min-height: 100vh;
  background: #000;
  isolation: isolate;
}

.pageAbout::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("background.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.8;
  pointer-events: none;
  z-index: -2;
}

.pageAbout::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: -1;
}

.about {
  position: relative;
  z-index: 1;
}

.pageContact {
  position: relative;
  min-height: 100vh;
  background: #000;
  isolation: isolate;
}

.pageContact::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("lobby.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.80;
  pointer-events: none;
  z-index: -2;
}

.pageContact::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: -1;
}

.pageContact .content {
  position: relative;
  z-index: 1;
}
