:root {
  --bg: #070707;
  --bg-soft: #0d0d0d;
  --panel: #111111;
  --panel-2: #171717;

  --line: #292929;
  --line-soft: #1b1b1b;

  --red: #ff304f;
  --red-soft: #ff6177;
  --orange: #ff8a3d;

  --text: #eeeeee;
  --muted: #777777;
  --muted-light: #a2a2a2;

  --steel: #bcbcbc;

  --mono: "Fira Code", monospace;
  --sans: "Vazirmatn", sans-serif;
}


/* =========================
   RESET
========================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 50% 0%,
      #171717 0,
      var(--bg) 42%,
      #020202 100%);

  color: var(--text);

  font-family: var(--sans);

  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}


/* =========================
   EFFECTS
========================= */

.noise,
.scanlines {
  pointer-events: none;

  position: fixed;

  inset: 0;

  z-index: 20;
}

.noise {
  opacity: .035;

  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.scanlines {
  opacity: .035;

  background:
    repeating-linear-gradient(to bottom,
      transparent 0 4px,
      rgba(255, 255, 255, .4) 5px,
      transparent 6px);

  mix-blend-mode: overlay;
}

#matrix {
  position: fixed;

  inset: 0;

  pointer-events: none;

  opacity: .07;

  z-index: 0;
}


/* =========================
   TOP BAR
========================= */

.topbar {
  position: fixed;

  top: 0;
  left: 0;
  right: 0;

  z-index: 30;

  height: 62px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0 5vw;

  border-bottom:
    1px solid rgba(255, 255, 255, .08);

  background:
    rgba(7, 7, 7, .78);

  backdrop-filter: blur(18px);

  font-family: var(--mono);
}

.brand {
  letter-spacing: .15em;

  font-weight: 700;
}

.brand span {
  color: var(--red);

  text-shadow:
    0 0 15px rgba(255, 48, 79, .35);
}

.system-status {
  font-size: .75rem;

  color: var(--muted);
}

.system-status i {
  display: inline-block;

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--red);

  box-shadow:
    0 0 12px rgba(255, 48, 79, .8);

  margin-left: 7px;
}

.sound-btn {
  background: transparent;

  color: var(--red);

  border:
    1px solid var(--line);

  width: 38px;
  height: 38px;

  cursor: pointer;

  border-radius: 6px;

  transition: .25s;
}

.sound-btn:hover {
  border-color: var(--red);

  background:
    rgba(255, 48, 79, .07);
}

.sound-btn.active {
  box-shadow:
    0 0 25px rgba(255, 48, 79, .18);

  background:
    rgba(255, 48, 79, .08);
}


/* =========================
   GLOBAL
========================= */

.section {
  position: relative;

  z-index: 1;

  width: min(1160px, 90vw);

  margin: 0 auto;

  padding: 110px 0;
}


/* =========================
   PAGE SECTIONS
========================= */

.page-section {
  min-height: 100vh;

  min-height: 100svh;

  scroll-snap-align: start;

  scroll-snap-stop: always;
}


/* =========================
   HERO
========================= */

.hero {
  min-height: 100vh;

  min-height: 100svh;

  display: grid;

  grid-template-columns:
    1fr 250px;

  gap: 28px;

  align-items: center;

  padding-top: 145px;
}


/* =========================
   PANELS
========================= */

.terminal-window,
.code-card,
.mission-panel,
.music-player,
.final-box {

  border:
    1px solid var(--line);

  background:
    linear-gradient(145deg,
      rgba(20, 20, 20, .94),
      rgba(7, 7, 7, .96));

  box-shadow:
    0 25px 70px rgba(0, 0, 0, .55);

  position: relative;
}


/* =========================
   RED MILITARY ACCENT
========================= */

.terminal-window::before,
.mission-panel::before,
.music-player::before,
.final-box::before {

  content: "";

  position: absolute;

  left: 0;
  top: 0;

  width: 3px;
  height: 100%;

  background:
    linear-gradient(to bottom,
      transparent,
      var(--red),
      transparent);

  opacity: .75;
}


/* =========================
   TERMINAL
========================= */

.terminal-header {

  height: 45px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0 14px;

  border-bottom:
    1px solid var(--line);

  color: var(--muted);

  font:
    11px var(--mono);
}

.traffic span {

  width: 9px;
  height: 9px;

  display: inline-block;

  border-radius: 50%;

  margin-left: 5px;

  background: #333;
}

.traffic span:first-child {
  background: var(--red);
}

.traffic span:nth-child(2) {
  background: #777;
}

.traffic span:nth-child(3) {
  background: #444;
}

.terminal-body {

  padding: 34px;

  min-height: 480px;

  font-family: var(--mono);
}

.prompt {
  color: var(--red);
}

.muted {

  color: #666;

  font-size: .83rem;

  margin-top: 8px;
}

.blink,
.cursor {
  animation:
    blink 1s steps(1) infinite;
}


/* =========================
   HERO TITLE
========================= */

.hero-title {

  margin-top: 56px;

  font-family: var(--sans);
}

.eyebrow,
.section-label {

  font:
    600 .74rem var(--mono);

  letter-spacing: .14em;

  color: var(--red);
}

h1,
h2 {
  line-height: 1.12;
}

h1 {

  font-size:
    clamp(3rem,
      7vw,
      6.5rem);

  margin: 13px 0 22px;

  letter-spacing: -.04em;
}

h1 span,
h2 span {

  color: var(--red);

  text-shadow:
    0 0 18px rgba(255, 48, 79, .25);
}

.hero-subtitle {

  color: #999;

  max-width: 650px;

  line-height: 2;

  font-size: .98rem;
}

.cta {

  display: inline-flex;

  align-items: center;

  gap: 22px;

  margin-top: 30px;

  padding: 13px 18px;

  border:
    1px solid #3a3a3a;

  color: #ddd;

  font:
    600 .75rem var(--mono);

  transition: .25s;
}

.cta:hover {

  border-color: var(--red);

  background:
    rgba(255, 48, 79, .07);

  color: white;

  transform:
    translateY(-2px);

  box-shadow:
    0 0 25px rgba(255, 48, 79, .08);
}


/* =========================
   HERO SIDE
========================= */

.hero-side {

  display: flex;

  flex-direction: column;

  gap: 32px;

  align-items: center;
}

.code-card {

  padding: 20px;

  width: 100%;

  font-family: var(--mono);

  display: grid;

  gap: 10px;
}

.code-card span,
.code-card small {

  color: var(--muted);
}

.code-card strong {

  font-size: .92rem;

  color: var(--red-soft);
}

.code-card small {

  font-size: .7rem;
}

.stamp {

  font:
    700 1.1rem var(--mono);

  color:
    rgba(255, 48, 79, .72);

  border:
    2px solid rgba(255, 48, 79, .4);

  padding:
    16px 22px;

  transform:
    rotate(-9deg);

  text-align: center;

  letter-spacing: .08em;

  box-shadow:
    0 0 25px rgba(255, 48, 79, .05);
}

.stamp b {
  font-size: 1.5rem;
}


/* =========================
   SECTION
========================= */

.section-label {

  margin-bottom: 30px;

  color: #666;
}

.section-label::before {

  content: "// ";

  color: var(--red);
}


/* =========================
   PROFILE
========================= */

.profile-grid {

  display: grid;

  grid-template-columns:
    45% 1fr;

  gap: 65px;

  align-items: center;
}

.placeholder-photo {

  min-height: 430px;

  border:
    1px solid #292929;

  position: relative;

  overflow: hidden;

  background:
    linear-gradient(135deg,
      #111,
      #080808);
}

.placeholder-photo::before {

  content: "";

  position: absolute;

  inset: 0;

  background:
    repeating-linear-gradient(45deg,
      transparent 0 18px,
      rgba(255, 255, 255, .025) 19px 20px);
}

.placeholder-photo::after {

  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(transparent 48%,
      rgba(255, 48, 79, .06) 50%,
      transparent 52%);

  animation:
    photoScan 4s linear infinite;
}

.photo-overlay {

  position: absolute;

  inset: 0;

  display: grid;

  place-content: center;

  text-align: center;

  color: #666;

  font:
    600 1.1rem var(--mono);

  line-height: 1.7;

  z-index: 2;
}

.photo-overlay span {

  color: var(--red);

  font-size: .7rem;
}

.profile-copy p {

  color: #999;

  line-height: 2.1;

  margin:
    22px 0 30px;

  max-width: 650px;
}

h2 {

  font-size:
    clamp(2.3rem,
      5vw,
      4.5rem);

  margin-top: 10px;

  letter-spacing: -.035em;
}

.data-lines {

  border-top:
    1px solid var(--line);
}

.data-lines div {

  display: flex;

  justify-content: space-between;

  padding: 14px 0;

  border-bottom:
    1px solid var(--line);

  font:
    .76rem var(--mono);
}

.data-lines span {

  color: #666;
}


/* حفظ کلاس green موجود در HTML */

.green {
  color: var(--red);
}


/* =========================
   GALLERY
========================= */

.section-heading {

  display: flex;

  justify-content: space-between;

  align-items: end;

  gap: 30px;

  margin-bottom: 35px;
}

.section-heading p {

  max-width: 300px;

  color: var(--muted);

  line-height: 1.9;
}

.gallery {

  display: grid;

  grid-template-columns:
    1.25fr .9fr .9fr;

  gap: 13px;
}

.gallery-card {

  min-height: 260px;

  padding: 15px;

  display: flex;

  align-items: end;

  color: #777;

  font:
    600 .72rem var(--mono);

  position: relative;

  overflow: hidden;

  border:
    1px solid #252525;

  background:
    linear-gradient(145deg,
      #161616,
      #090909);

  transition: .3s;
}

.gallery-card::after {

  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(135deg,
      transparent 65%,
      rgba(255, 48, 79, .07));

  pointer-events: none;
}

.gallery-card:hover {

  transform:
    translateY(-4px);

  border-color: #444;

  box-shadow:
    0 15px 40px rgba(0, 0, 0, .5);
}

.gallery-card.big {

  min-height: 470px;

  grid-row: span 2;
}

.gallery-card.wide {

  grid-column: 2 / 4;
}


/* =========================
   MISSION
========================= */

.mission-panel {

  padding: 35px;
}

.mission-top {

  display: flex;

  justify-content: space-between;

  align-items: start;

  gap: 25px;
}

.danger {

  border:
    1px solid rgba(255, 48, 79, .35);

  color: var(--red-soft);

  padding:
    8px 10px;

  font:
    .65rem var(--mono);

  background:
    rgba(255, 48, 79, .035);
}

.mission-grid {

  display: grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap: 12px;

  margin: 45px 0;
}

.terminal-stat {

  padding: 18px;

  border:
    1px solid var(--line);

  min-height: 105px;

  display: flex;

  flex-direction: column;

  justify-content: space-between;

  background:
    rgba(255, 255, 255, .015);
}

.terminal-stat span {

  color: var(--muted);

  font:
    .65rem var(--mono);
}

.terminal-stat b {

  color: #ddd;

  font:
    600 .79rem var(--mono);
}

.progress-wrap {

  font-family:
    var(--mono);
}

.progress-meta {

  display: flex;

  justify-content: space-between;

  color: var(--muted);

  font-size: .7rem;

  margin-bottom: 9px;
}

.progress-meta b {

  color: var(--red);
}

.progress {

  height: 7px;

  background: #111;

  border:
    1px solid #282828;

  padding: 1px;
}

.progress i {

  display: block;

  height: 100%;

  width: 13%;

  background: var(--red);

  box-shadow:
    0 0 14px rgba(255, 48, 79, .45);
}


/* =========================
   MUSIC
========================= */

.music-player {

  display: grid;

  grid-template-columns:
    190px 1fr;

  gap: 30px;

  padding: 30px;

  align-items: center;
}

.vinyl {

  aspect-ratio: 1;

  border-radius: 50%;

  width: 180px;

  background:
    repeating-radial-gradient(circle at center,
      #0e0e0e 0 11px,
      #272727 12px 13px);

  display: grid;

  place-items: center;

  box-shadow:
    0 0 60px rgba(255, 48, 79, .07);
}

.vinyl>div {

  width: 38px;

  height: 38px;

  border-radius: 50%;

  background:
    var(--red);

  box-shadow:
    0 0 25px rgba(255, 48, 79, .35);
}

.music-info p {

  color: var(--muted);

  margin:
    12px 0 25px;
}

.player-controls {

  display: flex;

  gap: 13px;

  align-items: center;

  font:
    .7rem var(--mono);

  color: var(--muted);
}

.player-controls button {

  border:
    1px solid #363636;

  background:
    transparent;

  color: var(--red);

  width: 40px;

  height: 40px;

  cursor: pointer;

  transition: .2s;
}

.player-controls button:hover {

  border-color:
    var(--red);

  background:
    rgba(255, 48, 79, .06);
}

.track-line {

  height: 5px;

  background: #191919;

  flex: 1;

  overflow: hidden;
}

.track-line i {

  display: block;

  width: 0%;

  height: 100%;

  background:
    var(--red);
}


/* =========================
   FINAL
========================= */

.final {

  padding-bottom: 80px;
}

.final-box {

  text-align: center;

  padding:
    90px 30px;
}

.final-box h2 {

  margin:
    18px auto 22px;

  font-size:
    clamp(2rem,
      5vw,
      4.2rem);
}

.final-box p {

  color: #555;

  font:
    .72rem var(--mono);
}


/* =========================
   FOOTER
========================= */

footer {

  border-top:
    1px solid var(--line);

  padding:
    25px 5vw;

  color: #4d4d4d;

  text-align: center;

  font:
    .65rem var(--mono);

  position: relative;

  z-index: 1;
}


/* =========================
   REVEAL
========================= */

.reveal {

  opacity: 0;

  transform:
    translateY(20px);

  transition:
    .75s ease;
}

.reveal.visible {

  opacity: 1;

  transform:
    translateY(0);
}

.delay-1 {

  transition-delay: .2s;
}


/* =========================
   PAGE NAVIGATION
========================= */

.page-next {

  position: absolute;

  bottom: 25px;

  left: 50%;

  transform:
    translateX(-50%);

  width: 44px;

  height: 44px;

  display: flex;

  align-items: center;

  justify-content: center;

  border:
    1px solid #343434;

  color: var(--red);

  background:
    rgba(7, 7, 7, .65);

  font:
    20px var(--mono);

  transition:
    .25s;

  z-index: 10;
}

.page-next:hover {

  border-color:
    var(--red);

  background:
    rgba(255, 48, 79, .08);

  box-shadow:
    0 0 25px rgba(255, 48, 79, .16);

  transform:
    translateX(-50%) translateY(-4px);
}


/* =========================
   FULL PAGE SCROLL
========================= */

html {

  scroll-behavior: smooth;

  scroll-snap-type: y mandatory;
}

body {

  min-height: 100vh;
}


/*
  فقط سکشن‌هایی که page-section دارند
  به صورت صفحه کامل Snap می‌شوند.
*/

.page-section {

  min-height: 100vh;

  min-height: 100svh;

  scroll-snap-align: start;

  scroll-snap-stop: always;

  position: relative;
}


/* =========================
   ANIMATIONS
========================= */

@keyframes blink {

  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

@keyframes photoScan {

  0% {
    transform:
      translateY(-100%);
  }

  100% {
    transform:
      translateY(100%);
  }
}


/* =========================
   TABLET
========================= */

@media (max-width: 860px) {

  .hero {

    grid-template-columns:
      1fr;
  }

  .hero-side {

    display: none;
  }

  .profile-grid {

    grid-template-columns:
      1fr;

    gap: 35px;
  }

  .gallery {

    grid-template-columns:
      1fr 1fr;
  }

  .gallery-card.big {

    grid-row: auto;

    min-height: 320px;
  }

  .gallery-card.wide {

    grid-column: auto;
  }

  .mission-grid {

    grid-template-columns:
      1fr 1fr;
  }

  .music-player {

    grid-template-columns:
      1fr;

    text-align: center;
  }

  .vinyl {

    margin: auto;

    width: 150px;
  }

  .player-controls {

    text-align: left;
  }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 560px) {

  .topbar {

    padding:
      0 4vw;
  }

  .system-status {

    display: none;
  }

  .section {

    width:
      min(92vw, 1160px);

    padding:
      80px 0;
  }

  .page-section {

    min-height: 100vh;

    min-height: 100svh;
  }

  .terminal-body {

    padding: 22px;

    min-height: 520px;
  }

  h1 {

    font-size: 2.9rem;
  }

  .section-heading {

    display: block;
  }

  .section-heading p {

    margin-top: 17px;
  }

  .gallery {

    grid-template-columns:
      1fr;
  }

  .mission-panel {

    padding: 22px;
  }

  .mission-top {

    display: block;
  }

  .danger {

    display: inline-block;

    margin-top: 18px;
  }

  .mission-grid {

    grid-template-columns:
      1fr 1fr;
  }

  .page-next {

    bottom: 18px;
  }

}

.profile-photo img,
.gallery-card img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  display: block;
}

.profile-photo img,
.gallery-card img {
  z-index: 1;
}

.profile-photo .photo-overlay {
  z-index: 2;
}

.gallery-card>span {
  position: relative;
  z-index: 3;
}

.gallery-card img {
  object-fit: cover;
  object-position: center center;
}

.gallery-card:nth-child(3) img,
.gallery-card:nth-child(4) img {
  object-position: center 20%;
}

/* =========================
   HERO PHOTO
========================= */

.hero-photo {
  width: 100%;
  height: 360px;

  margin-top: 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  border: 1px solid #292929;

  background: #080808;

  position: relative;
}

.hero-photo img {
  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;

  display: block;
}



/* =========================
   MOBILE HERO PHOTO
========================= */

@media (max-width: 560px) {

  .hero-photo {
    height: 250px;
  }

}