/* ==========================================================================
   Jolly Panda Studio — Core Stylesheet
   Structure:
   1. Reset & base
   2. Typography
   3. Layout primitives
   4. Navigation
   5. Buttons
   6. Hero
   7. About preview
   8. Services
   9. Why choose us (bento grid)
   10. CTA
   11. Footer
   12. About page specific
   13. Utilities & animation classes
   ========================================================================== */

/* ---------- 1. Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-en);
  background-color: var(--color-paper);
  color: var(--color-ink);
  line-height: var(--lh-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html[lang="fa"] body,
body[dir="rtl"] {
  font-family: var(--font-fa);
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input,
textarea {
  font: inherit;
}

/* Visible focus states everywhere — accessibility first */
:focus-visible {
  outline: 3px solid var(--color-orange-dark);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-sm);
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  z-index: var(--z-modal);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* ---------- 2. Typography ---------- */
h1,
h2,
h3,
h4 {
  color: var(--color-ink);
  line-height: var(--lh-tight);
  font-weight: 800;
  letter-spacing: -0.02em;
}

html[lang="fa"] h1,
html[lang="fa"] h2,
html[lang="fa"] h3,
html[lang="fa"] h4 {
  letter-spacing: 0; /* tracking looks wrong on Persian glyphs */
  font-weight: 700;
}

p {
  color: var(--color-ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-orange-dark);
  background: var(--color-orange-light);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
}

html[lang="fa"] .eyebrow {
  letter-spacing: 0;
  text-transform: none;
}

.section-heading {
  max-width: 640px;
  margin-inline: 0;
  margin-bottom: var(--space-lg);
}

.section-heading--center {
  margin-inline: auto;
  text-align: center;
}

.section-heading--flush {
  margin-bottom: 0;
}

.section-heading h2 {
  font-size: var(--fs-h2);
  margin-top: var(--space-sm);
}

.section-heading p {
  font-size: var(--fs-lead);
  margin-top: var(--space-sm);
}

/* ---------- 3. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-2xl);
  position: relative;
}

.section--alt {
  background-color: var(--color-paper-alt);
}

.section--tight {
  padding-block: var(--space-xl);
}

main {
  display: block;
}

/* ---------- 4. Navigation ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--nav-height);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  background: rgba(255, 251, 243, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-xs);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-ink);
}

.brand__mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  position: relative;
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--color-ink-soft);
  padding-block: var(--space-2xs);
  transition: color var(--duration-fast) var(--ease-out);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--color-orange);
  border-radius: var(--radius-full);
  transition: right var(--duration-base) var(--ease-out);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--color-ink);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  right: 0;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.lang-switch {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 2px;
}

.lang-switch__btn {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-tiny);
  font-weight: 700;
  color: var(--color-ink-faint);
  transition: background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.lang-switch__btn.is-active {
  background: var(--color-ink);
  color: var(--color-paper);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-ink);
  border-radius: var(--radius-full);
  transition: transform var(--duration-base) var(--ease-bounce),
    opacity var(--duration-fast) var(--ease-out);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.95rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--fs-small);
  white-space: nowrap;
  transition: transform var(--duration-base) var(--ease-bounce),
    box-shadow var(--duration-base) var(--ease-out),
    background var(--duration-fast) var(--ease-out);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-primary {
  background: var(--color-orange);
  color: #fff;
  box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
  background: var(--color-orange-dark);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-ink);
  border: 1.5px solid var(--color-border-strong);
}

.btn-secondary:hover {
  border-color: var(--color-ink);
  box-shadow: var(--shadow-soft);
}

.btn-ghost {
  color: var(--color-ink);
  padding-inline: 0.25rem;
}

.btn-ghost .dir-icon {
  transition: transform var(--duration-base) var(--ease-bounce);
}

.btn-ghost:hover .dir-icon {
  transform: translateX(4px);
}

html[dir="rtl"] .btn-ghost:hover .dir-icon {
  transform: translateX(-4px);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

/* ---------- Direction-aware icons ----------
   THE site-wide standard for any directional indicator: arrows, "read
   more" / "learn more" / "view details" affordances, breadcrumbs,
   pagination, carousel controls, etc. Two SVG paths are authored
   explicitly — one that reads correctly in LTR, one that reads
   correctly in RTL — and CSS shows only the one matching the page's
   current direction. Nothing is transformed, rotated, scaleX-flipped,
   or mirrored: each variant is a real, separately-drawn icon.

   Usage — wrap both variants in a single .dir-icon element:
     <span class="dir-icon" aria-hidden="true">
       <svg class="dir-icon__ltr" ...>...points toward reading-end...</svg>
       <svg class="dir-icon__rtl" ...>...redrawn, points the other way...</svg>
     </span>
   This works identically whether the markup is static HTML or built at
   runtime via createElement/innerHTML (see js/team.js), and needs no
   JavaScript — the correct icon is selected purely by the CSS below
   reacting to html[dir]. Any new component should reuse this pattern
   rather than inventing a new directional icon of its own. */
.dir-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.dir-icon--sm {
  width: 14px;
  height: 14px;
}

.dir-icon svg {
  width: 100%;
  height: 100%;
}

.dir-icon__rtl {
  display: none;
}

html[dir="rtl"] .dir-icon__ltr {
  display: none;
}

html[dir="rtl"] .dir-icon__rtl {
  display: block;
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-2xl);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__badge {
  margin-bottom: var(--space-md);
}

.hero__title {
  font-size: var(--fs-display);
  line-height: 0.98;
}

.hero__title .highlight {
  position: relative;
  color: var(--color-orange-dark);
  white-space: nowrap;
}

.hero__title .highlight svg {
  position: absolute;
  bottom: -0.12em;
  left: 0;
  width: 100%;
  height: auto;
  z-index: -1;
}

.hero__subtitle {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--color-ink);
  margin-top: var(--space-md);
}

.hero__intro {
  max-width: 480px;
  font-size: var(--fs-lead);
  margin-top: var(--space-md);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.hero__stage {
  position: relative;
  height: clamp(320px, 38vw, 520px);
}

.hero__mascot-frame {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gradient-brand);
  box-shadow: var(--shadow-lift);
  border: 6px solid var(--color-surface);
  animation: float-blob 7s var(--ease-out) infinite;
}

.hero__mascot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-confetti {
  position: absolute;
}

.hero-confetti--square {
  width: 30px;
  height: 30px;
  top: 4%;
  left: 8%;
  background: var(--color-yellow);
  border-radius: 8px;
  transform: rotate(18deg);
  animation: float-y 6s var(--ease-out) infinite;
}

.hero-confetti--hex {
  width: 34px;
  height: 34px;
  bottom: 6%;
  right: 4%;
  background: var(--color-orange);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation: float-y 5s var(--ease-out) infinite reverse;
}

.hero-confetti--triangle {
  width: 0;
  height: 0;
  top: 52%;
  right: -3%;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 26px solid var(--color-blush-dark);
  animation: float-y 7s var(--ease-out) infinite;
}

.hero-confetti--star {
  width: 22px;
  height: 22px;
  bottom: 26%;
  left: -1%;
  animation: float-y 5.5s var(--ease-out) infinite reverse;
}

.hero-shape {
  position: absolute;
  border-radius: var(--radius-full);
}

.hero-shape--1 {
  width: 90px;
  height: 90px;
  top: 8%;
  right: 12%;
  background: var(--color-yellow);
  animation: float-y 5.5s var(--ease-out) infinite;
}

.hero-shape--2 {
  width: 46px;
  height: 46px;
  bottom: 14%;
  left: 4%;
  background: var(--color-orange);
  animation: float-y 6.5s var(--ease-out) infinite reverse;
}

.hero-shape--3 {
  width: 26px;
  height: 26px;
  top: 40%;
  left: -2%;
  background: var(--color-blush-dark);
  animation: float-y 4.5s var(--ease-out) infinite;
}

@keyframes float-blob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(3deg);
  }
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-22px);
  }
}

.hero__scroll-cue {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-tiny);
  color: var(--color-ink-faint);
  font-weight: 600;
}

.hero__scroll-cue .icon {
  width: 18px;
  height: 18px;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* ---------- 7. About preview ---------- */
.about-preview__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-2xl);
  align-items: center;
}

.about-preview__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xl);
  background: var(--gradient-brand);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}

.about-preview__visual svg {
  width: 100%;
  height: 100%;
}

.about-preview__stat {
  position: absolute;
  bottom: var(--space-md);
  inset-inline-start: var(--space-md);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  box-shadow: var(--shadow-soft);
}

.about-preview__stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--color-ink);
}

.about-preview__stat span {
  font-size: var(--fs-tiny);
  color: var(--color-ink-faint);
  font-weight: 600;
}

.about-preview__body p {
  margin-top: var(--space-sm);
}

.about-preview__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* ---------- 8. Services ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.services__viewall {
  display: flex;
  justify-content: center;
  margin-top: var(--space-xl);
}

.service-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
  transition: transform var(--duration-base) var(--ease-bounce),
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
  border-color: var(--color-border-strong);
}

.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  transition: transform var(--duration-base) var(--ease-bounce);
}

.service-card:hover .service-card__icon {
  transform: rotate(-6deg) scale(1.06);
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
}

.service-card--web .service-card__icon {
  background: var(--color-orange-light);
  color: var(--color-orange-dark);
}

.service-card--game .service-card__icon {
  background: var(--color-yellow-light);
  color: var(--color-yellow-dark);
}

.service-card--software .service-card__icon {
  background: var(--color-blush-light);
  color: var(--color-blush-dark);
}

.service-card h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-2xs);
}

.service-card p {
  font-size: var(--fs-small);
}

.service-card__list {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.service-card__list li {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-tiny);
  color: var(--color-ink-soft);
  font-weight: 600;
}

.service-card__list svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-orange);
}

/* ---------- 9. Why choose us — bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: var(--space-md);
}

.bento-card {
  grid-column: span 2;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2xs);
  transition: transform var(--duration-base) var(--ease-bounce),
    box-shadow var(--duration-base) var(--ease-out);
}

.bento-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.bento-card--wide {
  grid-column: span 4;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.bento-card--accent {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #fff;
}

.bento-card--accent h3,
.bento-card--accent p {
  color: #fff;
}

.bento-card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-paper-alt);
  color: var(--color-ink);
  flex-shrink: 0;
}

.bento-card--accent .bento-card__icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.bento-card__icon svg {
  width: 22px;
  height: 22px;
}

.bento-card h3 {
  font-size: 1.05rem;
}

.bento-card p {
  font-size: var(--fs-small);
}

.bento-card--wide .bento-card__text {
  max-width: 60%;
}

/* ---------- 9b. Team ---------- */
.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.team-card {
  position: relative;
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  box-shadow: var(--shadow-soft);
  color: inherit;
  text-decoration: none;
  transition: transform var(--duration-base) var(--ease-bounce),
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.team-card--linked {
  cursor: pointer;
}

.team-card--linked:hover,
.team-card--linked:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: var(--color-orange-light);
}

.team-card__hint {
  position: absolute;
  top: var(--space-sm);
  inset-inline-end: var(--space-sm);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--color-orange-light);
  color: var(--color-orange-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-bounce);
}

.team-card--linked:hover .team-card__hint,
.team-card--linked:focus-visible .team-card__hint {
  opacity: 1;
  transform: scale(1);
}

.team-card__photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-sm);
  border: 3px solid var(--color-orange-light);
  box-shadow: var(--shadow-xs);
}

.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card__name {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.team-card__position {
  font-size: var(--fs-small);
  color: var(--color-ink-faint);
  font-weight: 600;
}

.team__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-ink-faint);
  font-size: var(--fs-small);
}

/* ---------- 10. CTA ---------- */
.cta {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-night);
  color: var(--color-on-night);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  isolation: isolate;
}

.cta::before,
.cta::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  z-index: -1;
}

.cta::before {
  width: 320px;
  height: 320px;
  background: rgba(240, 133, 46, 0.32);
  top: -140px;
  left: -80px;
}

.cta::after {
  width: 280px;
  height: 280px;
  background: rgba(252, 221, 78, 0.24);
  bottom: -120px;
  right: -60px;
}

.cta__eyebrow {
  color: var(--color-yellow);
  font-weight: 700;
  font-size: var(--fs-tiny);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[lang="fa"] .cta__eyebrow {
  letter-spacing: 0;
  text-transform: none;
}

.cta h2 {
  color: #fff;
  font-size: var(--fs-h1);
  max-width: 680px;
  margin: var(--space-sm) auto 0;
}

.cta p {
  color: var(--color-on-night-soft);
  max-width: 520px;
  margin: var(--space-sm) auto 0;
  font-size: var(--fs-lead);
}

.cta__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.cta .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.cta .btn-secondary:hover {
  border-color: #fff;
}

/* ---------- 11. Footer (Grid + logical properties, dir-agnostic) ---------- */
.site-footer {
  background: var(--color-night-soft);
  color: var(--color-on-night-soft);
  margin-block-start: var(--space-xl);
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-lg);
  padding-block: var(--space-lg) var(--space-md);
  border-block-end: 1px solid rgba(253, 243, 234, 0.12);
}

/* ----- Brand column ----- */
.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: start;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--color-on-night);
  font-weight: 800;
  font-size: 1.05rem;
}

.site-footer__mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  box-sizing: border-box;
  background: var(--color-on-night);
  border-radius: var(--radius-full);
  padding: 5px;
}

.site-footer__tagline {
  margin-block-start: 0.35rem;
  max-width: 320px;
  font-size: var(--fs-small);
  text-align: start;
}

.site-footer__social {
  display: flex;
  gap: var(--space-2xs);
  margin-block-start: var(--space-sm);
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: rgba(253, 243, 234, 0.08);
  transition: background var(--duration-fast) var(--ease-out),
    transform var(--duration-base) var(--ease-bounce);
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
  background: var(--color-orange);
  transform: translateY(-3px);
}

.site-footer__social-link svg {
  width: 16px;
  height: 16px;
}

/* ----- Navigation column ----- */
.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}

.site-footer__group {
  text-align: start;
}

.site-footer__heading {
  margin-block-end: var(--space-xs);
  color: var(--color-on-night);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

html[lang="fa"] .site-footer__heading {
  letter-spacing: 0;
  text-transform: none;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  list-style: none;
}

.site-footer__link {
  font-size: var(--fs-small);
  color: inherit;
  transition: color var(--duration-fast) var(--ease-out);
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: var(--color-on-night);
}

/* "Coming Soon" items: visible but inert — muted, not-allowed cursor,
   and a small pill instead of a broken link. No directional hacks;
   the badge simply follows inline text flow. */
.site-footer__soon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-small);
  opacity: 0.55;
  cursor: not-allowed;
  user-select: none;
}

.site-footer__badge {
  padding-inline: 0.5rem;
  padding-block: 0.15rem;
  border-radius: var(--radius-full);
  background: rgba(253, 243, 234, 0.14);
  color: var(--color-on-night);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

html[lang="fa"] .site-footer__badge {
  letter-spacing: 0;
}

/* ----- Bottom bar ----- */
.site-footer__bottom {
  padding-block: var(--space-md);
}

.site-footer__copyright {
  text-align: start;
  font-size: var(--fs-tiny);
  color: var(--color-on-night-soft);
}

/* ---------- 11b. Services page ---------- */
.service-detail__header {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-xl);
}

.service-detail__icon {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.service-detail__icon svg {
  width: 44px;
  height: 44px;
}

.service-detail__icon--web {
  background: var(--color-orange-light);
  color: var(--color-orange-dark);
}

.service-detail__icon--game {
  background: var(--color-yellow-light);
  color: var(--color-yellow-dark);
}

.service-detail__icon--software {
  background: var(--color-blush-light);
  color: var(--color-blush-dark);
}

.service-detail__header .eyebrow {
  margin-bottom: var(--space-sm);
}

.service-detail__header h2 {
  font-size: var(--fs-h2);
}

.service-detail__intro {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  font-size: var(--fs-lead);
  color: var(--color-ink-soft);
  margin-bottom: var(--space-xl);
}

/* Highlight chips: quick-glance capabilities shown between the section
   title and the detailed intro/description. */
.service-highlights {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-xs);
  max-width: 640px;
  margin: 0 auto var(--space-lg);
}

.highlight-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-xs) var(--space-md);
  box-shadow: var(--shadow-xs);
  transition: transform var(--duration-base) var(--ease-bounce),
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.highlight-chip:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  border-color: var(--color-border-strong);
}

.highlight-chip__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-paper-alt);
  color: var(--color-ink);
}

.highlight-chip__icon svg {
  width: 16px;
  height: 16px;
}

.highlight-chip__title {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-ink);
  white-space: nowrap;
}

.highlight-chip__icon--web {
  background: var(--color-orange-light);
  color: var(--color-orange-dark);
}

.highlight-chip__icon--game {
  background: var(--color-yellow-light);
  color: var(--color-yellow-dark);
}

.highlight-chip__icon--software {
  background: var(--color-blush-light);
  color: var(--color-blush-dark);
}

.service-detail__features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.feature-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-soft);
  transition: transform var(--duration-base) var(--ease-bounce),
    box-shadow var(--duration-base) var(--ease-out);
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.feature-item__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  background: var(--color-paper-alt);
  color: var(--color-ink);
}

.feature-item__icon svg {
  width: 20px;
  height: 20px;
}

.feature-item h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: var(--fs-small);
}

.service-detail__process-heading {
  text-align: center;
  font-size: var(--fs-h3);
  margin-bottom: var(--space-lg);
}

.service-detail__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  background: var(--color-paper-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
}

.section--alt .service-detail__cta {
  background: var(--color-surface);
}

.service-detail__cta h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.service-detail__cta p {
  font-size: var(--fs-small);
}

.service-detail__cta .btn {
  flex-shrink: 0;
}

/* ---------- 12. About page specific ---------- */
.page-hero {
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-xl);
  text-align: center;
}

.page-hero__mascot {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-soft);
  margin-inline: auto;
  margin-bottom: var(--space-md);
}

.page-hero__eyebrow {
  margin-inline: auto;
}

.page-hero h1 {
  font-size: var(--fs-h1);
  margin-top: var(--space-md);
  max-width: 720px;
  margin-inline: auto;
}

.page-hero p {
  font-size: var(--fs-lead);
  max-width: 620px;
  margin: var(--space-md) auto 0;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.pillar-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.pillar-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  background: var(--color-orange-light);
  color: var(--color-orange-dark);
}

.pillar-card:nth-child(2) .pillar-card__icon {
  background: var(--color-yellow-light);
  color: var(--color-yellow-dark);
}

.pillar-card:nth-child(3) .pillar-card__icon {
  background: var(--color-blush-light);
  color: var(--color-blush-dark);
}

.pillar-card__icon svg {
  width: 26px;
  height: 26px;
}

.pillar-card h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-2xs);
}

.pillar-card p {
  font-size: var(--fs-small);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.value-row {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: border-color var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-bounce);
}

.value-row:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-strong);
}

.value-row__index {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-orange-light);
  -webkit-text-stroke: 1.5px var(--color-orange);
  flex-shrink: 0;
}

.value-row h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.value-row p {
  font-size: var(--fs-small);
}

.process-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  position: relative;
}

.process-track::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    var(--color-border-strong) 0,
    var(--color-border-strong) 8px,
    transparent 8px,
    transparent 16px
  );
  z-index: 0;
}

.process-step {
  position: relative;
  z-index: 1;
  text-align: center;
}

.process-step__num {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 2px solid var(--color-orange);
  color: var(--color-orange-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: var(--space-sm);
}

.process-step h3 {
  font-size: 1rem;
  margin-bottom: var(--space-3xs);
}

.process-step p {
  font-size: var(--fs-tiny);
}

.tech-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.tech-chip {
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-ink-soft);
  transition: transform var(--duration-base) var(--ease-bounce),
    background var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out);
}

.tech-chip:hover {
  background: var(--color-ink);
  color: var(--color-paper);
  transform: translateY(-3px) rotate(-1deg);
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.goal-card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--color-paper-alt);
  border: 1px dashed var(--color-border-strong);
}

.goal-card h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-2xs);
}

.goal-card p {
  font-size: var(--fs-small);
}

/* ---------- 13. Utilities & scroll-reveal animation ---------- */
.text-center {
  text-align: center;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

[data-reveal-group].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-group].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: 80ms; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: 160ms; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: 240ms; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: 320ms; }
[data-reveal-group].is-visible > *:nth-child(6) { transition-delay: 400ms; }
[data-reveal-group].is-visible > *:nth-child(7) { transition-delay: 480ms; }
[data-reveal-group].is-visible > *:nth-child(8) { transition-delay: 560ms; }
[data-reveal-group].is-visible > *:nth-child(n+9) { transition-delay: 620ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-group] > * {
    opacity: 1;
    transform: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- 14. Projects page & project detail ---------- */
.projects-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.projects-search {
  position: relative;
  max-width: 480px;
  width: 100%;
  margin-inline: auto;
}

.projects-search__icon {
  position: absolute;
  top: 50%;
  inset-inline-start: var(--space-md);
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-ink-faint);
  pointer-events: none;
}

.projects-search__input {
  width: 100%;
  padding: 0.9rem var(--space-md) 0.9rem calc(var(--space-md) * 2 + 18px);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--fs-small);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

html[dir="rtl"] .projects-search__input {
  padding: 0.9rem calc(var(--space-md) * 2 + 18px) 0.9rem var(--space-md);
}

html[dir="rtl"] .projects-search__icon {
  inset-inline-start: auto;
  inset-inline-end: var(--space-md);
}

.projects-search__input::placeholder {
  color: var(--color-ink-faint);
}

.projects-search__input:focus-visible {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 4px var(--color-orange-light);
}

.projects-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2xs);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-ink-soft);
  font-size: var(--fs-small);
  font-weight: 700;
  transition: transform var(--duration-base) var(--ease-bounce),
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.filter-chip:hover {
  border-color: var(--color-orange);
  color: var(--color-ink);
}

.filter-chip.is-active {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-orange);
}

.projects-results {
  text-align: center;
  font-size: var(--fs-tiny);
  font-weight: 600;
  color: var(--color-ink-faint);
  margin-top: var(--space-sm);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform var(--duration-base) var(--ease-bounce),
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
  border-color: var(--color-border-strong);
}

.project-card__media {
  position: relative;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  background: var(--color-paper-alt);
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.project-card:hover .project-card__media img {
  transform: scale(1.06);
}

.project-card__badge {
  position: absolute;
  top: var(--space-sm);
  inset-inline-start: var(--space-sm);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

html[lang="fa"] .project-card__badge {
  letter-spacing: 0;
}

.project-card__badge--website {
  background: rgba(240, 133, 46, 0.9);
  color: #fff;
}

.project-card__badge--game {
  background: rgba(220, 181, 42, 0.92);
  color: var(--color-ink);
}

.project-card__badge--application {
  background: rgba(209, 143, 124, 0.92);
  color: #fff;
}

.project-card__body {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card__title {
  font-size: 1.15rem;
  margin-bottom: var(--space-2xs);
}

.project-card__desc {
  font-size: var(--fs-small);
  flex: 1;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.project-card__year {
  font-size: var(--fs-tiny);
  font-weight: 600;
  color: var(--color-ink-faint);
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-tiny);
  font-weight: 700;
  color: var(--color-orange-dark);
}

.project-card__link .dir-icon {
  transition: transform var(--duration-base) var(--ease-bounce);
}

.project-card:hover .project-card__link .dir-icon {
  transform: translateX(4px);
}

html[dir="rtl"] .project-card:hover .project-card__link .dir-icon {
  transform: translateX(-4px);
}

.projects__empty,
.projects__loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  color: var(--color-ink-faint);
}

.projects__empty h3 {
  color: var(--color-ink);
  font-size: var(--fs-h3);
  margin-bottom: var(--space-2xs);
}

.projects__empty p {
  font-size: var(--fs-small);
}

/* ---------- Project detail page ---------- */
.project-hero {
  position: relative;
  min-height: 480px;
  height: 78vh;
  max-height: 680px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-ink);
}

.project-hero__cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.project-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(30, 18, 16, 0.15) 0%,
    rgba(30, 18, 16, 0.15) 35%,
    var(--color-ink) 100%
  );
}

.project-hero__back {
  position: absolute;
  top: calc(var(--nav-height) + var(--space-md));
  inset-inline-start: var(--space-md);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  font-weight: 700;
  color: #fff;
  background: rgba(20, 12, 10, 0.35);
  backdrop-filter: blur(6px);
}

.project-hero__back:hover {
  background: rgba(20, 12, 10, 0.55);
}

.project-hero__overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: var(--space-xl);
}

.project-hero__identity {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.project-hero__logo {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.project-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xs);
}

.project-hero__meta .eyebrow {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.project-hero__meta .project-card__year {
  color: rgba(255, 255, 255, 0.7);
}

.project-hero__title {
  font-size: var(--fs-h1);
  max-width: 820px;
  color: #fff;
}

.project-hero__desc {
  font-size: var(--fs-lead);
  max-width: 700px;
  margin-top: var(--space-sm);
  color: rgba(255, 255, 255, 0.82);
}

.project-hero__actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.project-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--color-ink);
  font-size: var(--fs-small);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  transition: transform var(--duration-base) var(--ease-bounce),
    box-shadow var(--duration-base) var(--ease-out);
}

.action-link:hover,
.action-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.action-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.action-link--ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.action-link--ghost:hover,
.action-link--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.share-row {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  position: relative;
}

.share-row__label {
  font-size: var(--fs-tiny);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  margin-inline-end: var(--space-2xs);
}

.share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  transition: background var(--duration-fast) var(--ease-out),
    transform var(--duration-base) var(--ease-bounce);
}

.share-btn:hover,
.share-btn:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.share-btn svg {
  width: 17px;
  height: 17px;
}

.share-btn__tooltip {
  position: absolute;
  top: -38px;
  inset-inline-end: 0;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--color-ink);
  color: #fff;
  font-size: var(--fs-tiny);
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.share-btn__tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.project-detail__body p {
  margin-bottom: var(--space-md);
  font-size: var(--fs-body);
}

.project-detail__body p:last-child {
  margin-bottom: 0;
}

.project-detail__aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.project-detail__panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
}

.project-detail__panel h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.project-detail__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.project-detail__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xs);
  font-size: var(--fs-small);
  color: var(--color-ink-soft);
  font-weight: 600;
}

.project-detail__list svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-orange);
}

.project-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.project-detail__tag {
  font-size: var(--fs-tiny);
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  background: var(--color-paper-alt);
  color: var(--color-ink-soft);
}

.project-not-found {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
}

.project-not-found h1 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-sm);
}

.project-not-found p {
  font-size: var(--fs-lead);
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
}

/* ---------- Project gallery (large, horizontally scrollable, not for saving) + lightbox ---------- */
.project-gallery {
  padding-top: 0;
}

.project-gallery h2 {
  font-size: 1.3rem;
  margin-bottom: var(--space-md);
}

.project-gallery__scroll {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding-bottom: var(--space-sm);
  margin-inline: calc(-1 * var(--space-md));
  padding-inline: var(--space-md);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
  cursor: grab;
}

.project-gallery__scroll.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.project-gallery__scroll.is-dragging .gallery-frame {
  pointer-events: none;
}

.project-gallery__scroll::-webkit-scrollbar {
  height: 8px;
}

.project-gallery__scroll::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
}

.gallery-frame {
  position: relative;
  flex: 0 0 auto;
  width: min(72vw, 560px);
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-paper-alt);
  cursor: pointer;
  padding: 0;
  scroll-snap-align: start;
  box-shadow: var(--shadow-soft);
  transition: transform var(--duration-base) var(--ease-bounce),
    box-shadow var(--duration-base) var(--ease-out);
}

.gallery-frame:hover,
.gallery-frame:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.gallery-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  transition: transform var(--duration-slow) var(--ease-out);
}

.gallery-frame:hover img,
.gallery-frame:focus-visible img {
  transform: scale(1.04);
}

.gallery-frame:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

.gallery-frame__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 0.6rem 0.9rem;
  font-size: var(--fs-small);
  font-weight: 600;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent);
}

.gallery-frame__zoom {
  position: absolute;
  top: var(--space-xs);
  inset-inline-end: var(--space-xs);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 12, 10, 0.45);
  color: #fff;
  backdrop-filter: blur(3px);
}

.gallery-frame__zoom svg {
  width: 16px;
  height: 16px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(20, 12, 10, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base) var(--ease-out),
    visibility 0s linear var(--duration-base);
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--duration-base) var(--ease-out);
}

.lightbox__stage {
  position: relative;
  max-width: min(1000px, 92vw);
  max-height: 86vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.lightbox__media-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 74vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}

.lightbox__media-wrap img,
.lightbox__media-wrap video {
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  display: block;
}

.lightbox__caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-small);
  font-weight: 600;
  text-align: center;
}

.lightbox__counter {
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--fs-tiny);
  font-weight: 600;
}

.lightbox__close {
  position: absolute;
  z-index: 2;
  top: var(--space-md);
  inset-inline-end: var(--space-md);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background var(--duration-fast) var(--ease-out);
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox__close svg {
  width: 20px;
  height: 20px;
}

.lightbox__nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background var(--duration-fast) var(--ease-out);
}

.lightbox__nav:hover,
.lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox__nav svg {
  width: 22px;
  height: 22px;
}

.lightbox__nav--prev {
  inset-inline-start: var(--space-md);
}

.lightbox__nav--next {
  inset-inline-end: var(--space-md);
}

@media (max-width: 640px) {
  .lightbox__nav {
    width: 40px;
    height: 40px;
  }

  .lightbox__nav--prev {
    inset-inline-start: var(--space-xs);
  }

  .lightbox__nav--next {
    inset-inline-end: var(--space-xs);
  }

  .lightbox__close {
    top: var(--space-sm);
    inset-inline-end: var(--space-sm);
  }

  .project-hero {
    height: 74vh;
    min-height: 560px;
    max-height: 720px;
  }

  .project-hero__identity {
    margin-bottom: var(--space-sm);
  }

  .project-hero__desc {
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .project-hero__title {
    font-size: var(--fs-h2);
  }

  .project-hero__desc {
    font-size: var(--fs-body);
  }

  .project-hero__actions-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-frame {
    width: 82vw;
  }
}

/* ---------- Project video section (optional, not every project) ---------- */
.project-video h2 {
  font-size: 1.3rem;
  margin-bottom: var(--space-md);
}

.project-video__player {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: #000;
  aspect-ratio: 16 / 9;
  max-width: 900px;
}

.project-video__player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-video__caption {
  margin-top: var(--space-sm);
  font-size: var(--fs-small);
  color: var(--color-ink-faint);
  font-weight: 600;
}

/* ---------- Bottom download / try-it-yourself section ---------- */
.project-download {
  background: var(--color-paper-alt);
}

.project-download__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.project-download__content h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-sm);
}

.project-download__content p {
  font-size: var(--fs-lead);
  max-width: 520px;
  margin-bottom: var(--space-lg);
}

.project-download__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.project-download__links .action-link {
  background: var(--color-orange);
  color: #fff;
}

.project-download__links .action-link:hover {
  background: var(--color-orange-dark);
}

.project-download__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.project-download__secondary a {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--color-ink-soft);
}

.project-download__secondary a:hover {
  color: var(--color-orange-dark);
}

.project-download__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  aspect-ratio: 4 / 3;
}

.project-download__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 900px) {
  .project-download__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* ---------- 15. 404 page ---------- */
.notfound {
  padding-top: calc(var(--nav-height) + var(--space-lg));
  padding-bottom: var(--space-xl);
  min-height: 70vh;
  display: grid;
  align-items: center;
}

.notfound__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.notfound__img {
  width: min(100%, 360px);
  height: auto;
}

.notfound__title {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  margin-top: var(--space-xs);
}

.notfound__text {
  max-width: 46ch;
  margin-top: var(--space-xs);
  font-size: var(--fs-lead);
  color: var(--color-ink-soft);
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

@media (max-width: 600px) {
  .notfound__actions .btn {
    width: 100%;
  }
}

/* ---------- 16. Product spotlight (me.jollypanda.ir) ---------- */
.spotlight__grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}

.spotlight__visual {
  position: relative;
}

.spotlight__mascot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lift);
}

.spotlight__url {
  position: absolute;
  inset-inline: var(--space-lg);
  bottom: calc(var(--space-lg) * -1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md) var(--space-md);
  box-shadow: var(--shadow-soft);
}

.spotlight__url-label {
  display: block;
  font-size: var(--fs-tiny);
  color: var(--color-ink-faint);
  margin-bottom: var(--space-3xs);
}

.spotlight__url-mock {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--font-en);
  font-size: clamp(0.85rem, 2.6vw, 1.05rem);
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
}

.spotlight__url-domain {
  color: var(--color-ink-faint);
}

.spotlight__url-slug {
  color: var(--color-orange-dark);
}

.spotlight__body p {
  margin-top: var(--space-sm);
}

.spotlight__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

