/* ==========================================================
   Project 01 — Web Design & Development
   ========================================================== */

@import url('/_core/fonts.css');


/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050510;
  color: #ffffff;
  font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[dir="ltr"] body { font-family: 'Inter', system-ui, sans-serif; }

img, svg, canvas { display: block; max-width: 100%; }


/* ---------- متغیرها ---------- */
:root {
  --bg: #050510;
  --text: #ffffff;
  --text-dim: #9a9ab0;
  --text-muted: #6a6a7a;
  --accent: #00ffff;
  --accent-soft: rgba(0, 255, 255, 0.15);
  --line: rgba(255, 255, 255, 0.08);
}


/* ---------- Layout کلی ---------- */
.project {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ---------- پس‌زمینه ---------- */
.project-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.bg-glow {
  position: absolute;
  top: 50%;
  inset-inline-end: 10%;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.07) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: bgGlowFloat 12s ease-in-out infinite;
}

@keyframes bgGlowFloat {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%      { transform: translateY(-52%) scale(1.06); }
}


/* ---------- ساختار دو ستونه ---------- */
.project-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1440px;
  padding: 0 clamp(24px, 5vw, 80px);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.4fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}


/* ==========================================================
   ستون متن
   ========================================================== */
.project-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: textEnter 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes textEnter {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.project-num {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 32px;
}

.project-label {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 24px;
  width: fit-content;
}

.project-title {
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
}

html[dir="rtl"] .project-title { line-height: 1.22; }

.title-line-2 {
  color: var(--accent);
  text-shadow: 0 0 40px rgba(0, 255, 255, 0.35);
}

.project-desc {
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.85;
  color: var(--text-dim);
  margin-bottom: 16px;
  max-width: 520px;
}

.project-sub {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 500px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.3s ease;
}

.tag:hover {
  color: var(--accent);
  border-color: rgba(0, 255, 255, 0.35);
  background: rgba(0, 255, 255, 0.04);
}


/* ==========================================================
   ستون بصری
   ========================================================== */
.project-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  animation: visualEnter 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes visualEnter {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ---------- مرورگر ---------- */
.browser {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: #0a0a1a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* نوار بالای مرورگر */
.browser-bar {
  flex-shrink: 0;
  height: 38px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 15, 30, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.browser-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.browser-bar .dot:nth-child(1) { background: rgba(255, 90, 90, 0.7); }
.browser-bar .dot:nth-child(2) { background: rgba(255, 200, 90, 0.7); }
.browser-bar .dot:nth-child(3) { background: rgba(90, 220, 120, 0.7); }

.url-bar {
  flex: 1;
  height: 22px;
  margin-inline-start: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 11px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}

.url-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.url-text {
  font-family: 'Inter', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: opacity 0.4s ease;
}

/* محتوای مرورگر */
.browser-content {
  position: relative;
  flex: 1;
  overflow: hidden;
}


/* ---------- سایت‌ویوها ---------- */
.site-view {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.site-view.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.site-nav {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  flex-shrink: 0;
}

.site-nav::before,
.site-nav::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.site-nav::before { inset-inline-start: 10px; }
.site-nav::after { inset-inline-start: 60px; }


/* حالت ۱: E-commerce */
.site-hero-mini {
  padding: 16px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sh-line {
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
}

.sh-line-1 { width: 55%; background: rgba(0, 255, 255, 0.35); }
.sh-line-2 { width: 35%; background: rgba(255, 255, 255, 0.08); }
.sh-line-3 { width: 40%; background: rgba(255, 255, 255, 0.06); }

.site-grid-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  flex: 1;
}

.site-grid-products span {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 255, 255, 0.06) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.site-grid-products span::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 40%;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 255, 255, 0.2);
}


/* حالت ۲: Corporate */
.site-hero-large {
  padding: 20px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-hero-large .sh-line-1 { width: 70%; height: 14px; }
.site-hero-large .sh-line-2 { width: 55%; height: 14px; }
.site-hero-large .sh-line-3 { width: 30%; height: 8px; margin-top: 8px; }

.site-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  flex: 1;
  padding: 0 4px;
}

.site-columns span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  position: relative;
}

.site-columns span::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(0, 255, 255, 0.15);
}


/* حالت ۳: Music */
.site-music {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px;
}

.album-art {
  flex-shrink: 0;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #0a0a1a, #00ffff22, #0a0a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.15);
}

.vinyl {
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0, transparent 3px, rgba(0, 255, 255, 0.05) 3px, rgba(0, 255, 255, 0.05) 4px);
  position: relative;
  animation: vinylSpin 8s linear infinite;
}

.vinyl::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
}

@keyframes vinylSpin {
  to { transform: rotate(360deg); }
}

.music-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 40px;
}

.waveform span {
  flex: 1;
  background: rgba(0, 255, 255, 0.4);
  border-radius: 2px;
  animation: waveBar 1.2s ease-in-out infinite;
}

.waveform span:nth-child(odd) { animation-delay: 0.15s; }
.waveform span:nth-child(3n) { animation-delay: 0.3s; }

@keyframes waveBar {
  0%, 100% { height: 20%; }
  50%      { height: 90%; }
}


/* حالت ۴: Portfolio */
.site-portfolio {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
}

.site-portfolio span {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.site-portfolio .p-tall {
  grid-row: span 2;
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.site-portfolio .p-wide {
  grid-column: span 2;
}


/* ==========================================================
   کارت‌های شناور
   ========================================================== */
.float-card {
  position: absolute;
  background: rgba(15, 15, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 2;
}

.card-product {
  top: -22px;
  inset-inline-end: -28px;
  width: 130px;
  display: flex;
  gap: 10px;
  align-items: center;
  animation: floatY 6s ease-in-out infinite;
}

.fp-img {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), rgba(0, 255, 255, 0.3));
}

.fp-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fp-line {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
}

.fp-line-sm { width: 55%; background: rgba(255, 255, 255, 0.08); }

.fp-price {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 2px;
}

.card-chart {
  bottom: -18px;
  inset-inline-start: -32px;
  width: 150px;
  animation: floatY 7s ease-in-out infinite 1s;
}

.fc-header {
  height: 6px;
  width: 40%;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 10px;
}

.fc-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 30px;
  margin-bottom: 8px;
}

.fc-bars span {
  flex: 1;
  background: linear-gradient(180deg, var(--accent), rgba(0, 255, 255, 0.2));
  border-radius: 2px;
  animation: barPulse 2s ease-in-out infinite;
}

.fc-bars span:nth-child(1) { height: 40%; animation-delay: 0s; }
.fc-bars span:nth-child(2) { height: 65%; animation-delay: 0.2s; }
.fc-bars span:nth-child(3) { height: 50%; animation-delay: 0.4s; }
.fc-bars span:nth-child(4) { height: 85%; animation-delay: 0.6s; }
.fc-bars span:nth-child(5) { height: 70%; animation-delay: 0.8s; }

@keyframes barPulse {
  0%, 100% { transform: scaleY(1); transform-origin: bottom; }
  50%      { transform: scaleY(0.75); transform-origin: bottom; }
}

.fc-value {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}


/* ==========================================================
   نشانگر پایین
   ========================================================== */
.project-indicator {
  position: absolute;
  bottom: -44px;
  inset-inline-start: 0;
  display: flex;
  gap: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.ind-item {
  color: var(--text-muted);
  position: relative;
  padding-bottom: 6px;
  transition: color 0.4s ease;
  cursor: default;
}

.ind-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px var(--accent);
}

.ind-item.is-active {
  color: var(--accent);
}

.ind-item.is-active::after {
  width: 100%;
}


/* ==========================================================
   ریسپانسیو
   ========================================================== */

/* تبلت */
@media (max-width: 1024px) {
  .project-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px clamp(20px, 5vw, 60px);
    max-height: 100vh;
    overflow-y: auto;
  }
  .project-visual {
    aspect-ratio: 16 / 10;
  }
  .card-product { top: -14px; inset-inline-end: -14px; }
  .card-chart { bottom: -14px; inset-inline-start: -14px; }
  .project-indicator { position: static; margin-top: 28px; justify-content: center; flex-wrap: wrap; }
}

/* موبایل */
@media (max-width: 640px) {
  .project-inner { padding: 24px 20px; gap: 28px; }
  .project-num { margin-bottom: 20px; font-size: 0.75rem; }
  .project-label { font-size: 0.62rem; padding: 5px 10px; margin-bottom: 16px; }
  .project-title { margin-bottom: 18px; }
  .project-desc, .project-sub { font-size: 0.88rem; }
  .project-tags { gap: 6px; }
  .tag { font-size: 0.65rem; padding: 4px 10px; }
  .browser-bar { height: 30px; padding: 0 10px; }
  .browser-bar .dot { width: 7px; height: 7px; }
  .url-text { font-size: 0.6rem; }
  .site-view { padding: 14px; gap: 10px; }
  .float-card { display: none; }
  .project-indicator {
    gap: 12px;
    font-size: 0.6rem;
    margin-top: 20px;
  }
}

/* ارتفاع کم */
@media (max-height: 620px) and (min-width: 1025px) {
  .project-title { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
  .project-desc, .project-sub { font-size: 0.85rem; }
}


/* ==========================================================
   کاهش انیمیشن
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .site-view { transition: none; }
}