/* =========================================================================
   Project detail page
   ========================================================================= */

.project-hero {
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: 60px;
  position: relative;
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 24px;
  transition: color var(--dur-fast) var(--ease);
}
.project-back:hover { color: var(--text-primary); }
.project-back svg { width: 16px; height: 16px; }
html[dir="rtl"] .project-back svg { transform: scaleX(-1); }

.project-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .project-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .project-hero-art { max-width: 360px; margin-inline: auto; }
}

@media (max-width: 720px) {
  .project-hero { padding-top: calc(var(--nav-h) + 28px); padding-bottom: 30px; }
  .project-hero-art .phone-frame { max-width: 260px; }
  .feature-grid { grid-template-columns: 1fr; gap: 14px; }
  .shots-strip { grid-template-columns: 1fr 1fr; gap: 14px; }
  .app-logo-card { gap: 14px; padding: 14px 18px; }
  .app-logo-card img { width: 52px; height: 52px; }
  .app-logo-card .name { font-size: 1.2rem; }
  .tech-chip { padding: 6px 14px; font-size: 0.82rem; }
}

@media (max-width: 380px) {
  .shots-strip { grid-template-columns: 1fr; }
  .project-hero-actions .btn { flex: 1; }
}

.project-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 600;
  margin-block: 14px;
}
html[lang="ar"] .project-hero h1 { font-family: 'Tajawal', sans-serif; font-weight: 800; }

.project-hero .tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.project-hero p.lead {
  margin-inline: 0;
  max-width: none;
  text-align: start;
  font-size: 1.1rem;
}

.project-hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Hero artwork */
.project-hero-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
}

.project-hero-art .phone-frame {
  width: 78%;
  max-width: 360px;
  aspect-ratio: 9 / 19;
  border-radius: 44px;
  background: linear-gradient(160deg, #2a2440, #0e1228);
  padding: 14px;
  position: relative;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(212, 196, 255, 0.22),
    inset 0 0 0 1px rgba(212, 196, 255, 0.18);
  z-index: 2;
}

.project-hero-art .phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 196, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #0e132a 0%, #04060f 100%);
  display: flex;
  flex-direction: column;
  padding: 28px 18px 22px;
  position: relative;
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #04060f;
  border-radius: 18px;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.phone-balance {
  background: linear-gradient(135deg, rgba(212, 196, 255, 0.18), rgba(184, 224, 255, 0.10));
  border: 1px solid rgba(212, 196, 255, 0.18);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}
.phone-balance-label { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.phone-balance-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 700;
  margin-top: 4px;
  background: var(--gradient-pearl-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerText 5s linear infinite;
}
.phone-balance-sub {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-top: 8px;
}
.phone-balance-sub .income { color: #B8FFE0; }
.phone-balance-sub .expense { color: #FFB8C8; }

.phone-list { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.phone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(20, 22, 50, 0.4);
  border: 1px solid var(--border-pearl);
  border-radius: 12px;
}
.phone-row-icon {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 0.85rem;
  background: rgba(212, 196, 255, 0.15);
}
.phone-row-info { flex: 1; min-width: 0; }
.phone-row-title { font-size: 0.72rem; font-weight: 600; }
.phone-row-sub { font-size: 0.6rem; color: var(--text-muted); }
.phone-row-amount { font-size: 0.72rem; font-weight: 600; }
.phone-row.expense .phone-row-amount { color: #FFB8C8; }
.phone-row.income .phone-row-amount { color: #B8FFE0; }

/* =========================================================================
   Generic device frames — reusable across project pages
   ========================================================================= */

/* --- Phone shell (used by Luxora, Plato, TrailPath, VaultFolio) --- */
.project-hero-art .device-phone {
  width: 82%;
  max-width: 300px;
  aspect-ratio: 9 / 19;
  border-radius: 40px;
  background: linear-gradient(160deg, #2a2440, #0e1228);
  padding: 12px;
  position: relative;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(212, 196, 255, 0.22),
    inset 0 0 0 1px rgba(212, 196, 255, 0.18);
  z-index: 2;
}
.device-phone .device-phone-inner {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 196, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #0e132a 0%, #04060f 100%);
  position: relative;
  overflow: hidden;
  padding: 32px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.device-phone .device-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 20px;
  background: #04060f;
  border-radius: 14px;
  z-index: 10;
}

/* --- Laptop shell (used by Legend World, Workforce Hub, Mindscape) --- */
.project-hero-art .device-laptop {
  width: 100%;
  max-width: 500px;
  margin-inline: auto;
  position: relative;
  z-index: 2;
}
.device-laptop .laptop-screen {
  background: #15102a;
  padding: 8px;
  border-radius: 14px 14px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(212, 196, 255, 0.18),
    inset 0 0 0 1px rgba(212, 196, 255, 0.10);
  position: relative;
}
.device-laptop .laptop-chrome {
  height: 20px;
  background: #0a1226;
  border-radius: 6px 6px 0 0;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.device-laptop .laptop-chrome::before {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-start: 10px;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 14px 0 0 #febc2e, 28px 0 0 #28c840;
}
.device-laptop .laptop-content {
  aspect-ratio: 16 / 10;
  background: #0a1226;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  display: flex;
  padding: 14px;
  position: relative;
}
.device-laptop .laptop-content > * {
  flex: 1;
  max-width: none !important;
  width: 100% !important;
}
.device-laptop .laptop-base {
  width: 118%;
  height: 14px;
  margin: 0 -9%;
  background: linear-gradient(180deg, #2a2440 0%, #14122a 100%);
  border-radius: 0 0 20px 20px;
  position: relative;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}
.device-laptop .laptop-base::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 5px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 0 0 8px 8px;
}

/* When the mockup lives inside a device frame, strip its own frame chrome */
.device-phone-inner .lux-card,
.device-phone-inner .plato-menu,
.device-phone-inner .trail-map,
.device-phone-inner .vault-panel,
.laptop-content .wf-dash,
.laptop-content .mind-card,
.laptop-content .legend-art {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
.device-phone-inner .lux-card,
.device-phone-inner .plato-menu,
.device-phone-inner .vault-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.device-phone-inner .trail-map {
  aspect-ratio: auto !important;
  flex: 1;
  position: relative;
}

/* Mobile responsive: shrink frames */
@media (max-width: 720px) {
  .project-hero-art .device-phone { max-width: 220px; }
  .project-hero-art .device-laptop { max-width: 380px; }
  .device-laptop .laptop-content { padding: 10px; }
}

/* Floating pearl behind phone */
.project-hero-art .floating-pearl {
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, #fff, #D4C4FF 50%, #A38BE6 90%);
  filter: blur(60px);
  opacity: 0.45;
  z-index: 1;
  animation: pearlFloat 7s ease-in-out infinite;
}

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

.feature-tile {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-pearl);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  transition: all var(--dur-med) var(--ease);
}
.feature-tile:hover { border-color: var(--border-pearl-strong); transform: translateY(-4px); }

.feature-tile-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255, 200, 87, 0.18), rgba(255, 208, 232, 0.10));
  border: 1px solid rgba(255, 200, 87, 0.25);
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.feature-tile h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.feature-tile p { color: var(--text-secondary); font-size: 0.9rem; }

/* Tech stack */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.tech-chip {
  background: rgba(20, 22, 50, 0.5);
  border: 1px solid var(--border-pearl);
  color: var(--pearl-200);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--dur-fast) var(--ease);
}
.tech-chip:hover {
  border-color: var(--gold-500);
  color: var(--gold-400);
  transform: translateY(-2px);
}

/* Download row */
.download-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Screenshot strip */
.shots-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.shot {
  aspect-ratio: 9 / 19;
  background: linear-gradient(180deg, #0e132a, #04060f);
  border: 1px solid var(--border-pearl);
  border-radius: 24px;
  padding: 8px;
  position: relative;
  overflow: hidden;
}

.shot-inner {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 196, 255, 0.18), transparent 50%),
    linear-gradient(180deg, #181E3D 0%, #04060f 100%);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shot-title {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--pearl-200);
  margin-bottom: 6px;
}
html[lang="ar"] .shot-title { font-family: 'Tajawal', sans-serif; font-weight: 700; }

.shot-bar {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(212, 196, 255, 0.5), rgba(212, 196, 255, 0.15));
}
.shot-bar.short { width: 65%; }
.shot-bar.tiny { width: 40%; }

.shot-card {
  background: rgba(212, 196, 255, 0.08);
  border: 1px solid rgba(212, 196, 255, 0.18);
  border-radius: 10px;
  padding: 8px;
}
.shot-card-title { font-size: 0.6rem; color: var(--text-muted); }
.shot-card-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--gradient-pearl-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerText 5s linear infinite;
}
.shot-card-row {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.55rem;
  color: var(--text-secondary);
}

.shot-pie {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 6px auto;
  background:
    conic-gradient(
      #FFD0E8 0% 25%,
      #D4C4FF 25% 50%,
      #B8E0FF 50% 70%,
      #B8FFF0 70% 85%,
      #FFE082 85% 100%
    );
  position: relative;
}
.shot-pie::after {
  content: '';
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: #0e132a;
}

.shot-chart {
  height: 60px;
  margin: 8px 0;
  background:
    linear-gradient(180deg, rgba(212, 196, 255, 0.18), transparent),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'><polyline fill='none' stroke='%23D4C4FF' stroke-width='2' points='0,32 10,28 22,30 35,18 48,22 60,12 75,16 88,6 100,10'/></svg>") no-repeat center/100% 100%;
  border-radius: 8px;
}

.shot-coin {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.4rem;
  height: 80px;
}

/* Logo card on hero */
.app-logo-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface-glass);
  border: 1px solid var(--border-pearl);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 18px;
  width: fit-content;
}
.app-logo-card img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}
.app-logo-card .name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
}
html[lang="ar"] .app-logo-card .name { font-family: 'Tajawal', sans-serif; font-weight: 700; }
.app-logo-card .sub { color: var(--text-muted); font-size: 0.85rem; }
