/* Page heroes: each route gets its own scene, sharing the same glass system. */

:root {
  --scene-bg: rgba(10, 16, 28, 0.9);
  --scene-ink: #f7fcff;
  --scene-muted: #9fb4c8;
  --scene-line: rgba(20, 215, 255, 0.34);
  --scene-soft: rgba(255, 255, 255, 0.07);
  --scene-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

html[data-theme="light"] {
  --scene-bg: rgba(255, 255, 255, 0.94);
  --scene-ink: #102033;
  --scene-muted: #4c6278;
  --scene-line: rgba(14, 116, 144, 0.28);
  --scene-soft: rgba(14, 165, 196, 0.12);
  --scene-shadow: 0 18px 40px rgba(16, 42, 67, 0.12);
}

.hero-visual.scene-services,
.hero-visual.scene-portfolio,
.hero-visual.scene-process,
.hero-visual.scene-about,
.hero-visual.scene-career,
.hero-visual.scene-contact {
  color: var(--scene-ink);
  min-height: 0;
  height: auto;
}

.hero-visual.scene-services::before,
.hero-visual.scene-portfolio::before,
.hero-visual.scene-process::before,
.hero-visual.scene-about::before,
.hero-visual.scene-career::before,
.hero-visual.scene-contact::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 320px;
  height: 320px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(20, 215, 255, 0.22), transparent 68%);
  filter: blur(6px);
  pointer-events: none;
}

.scene-portfolio::before { background: radial-gradient(circle, rgba(255, 197, 61, 0.16), rgba(20, 215, 255, 0.14) 42%, transparent 70%); }
.scene-about::before { background: radial-gradient(circle, rgba(124, 92, 255, 0.24), transparent 68%); }
.scene-career::before { background: radial-gradient(circle, rgba(255, 197, 61, 0.2), transparent 68%); }
.scene-contact::before { background: radial-gradient(circle, rgba(61, 220, 151, 0.16), rgba(20, 215, 255, 0.12) 46%, transparent 70%); }

.hero-stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 560px;
  padding: 18px 12px;
}

.scene-card {
  background: var(--scene-bg);
  color: var(--scene-ink);
  border: 1px solid var(--scene-line);
  box-shadow: var(--scene-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.scene-card small,
.flow small,
.chat small { color: var(--scene-muted); }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc97;
  box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6);
  animation: livePing 2.2s ease-out infinite;
  flex: 0 0 auto;
}

@keyframes livePing {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes sheen {
  0%, 58% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

@keyframes meter {
  0%, 100% { transform: scaleX(0.42); }
  50% { transform: scaleX(1); }
}

/* Services */
.svc {
  width: min(100%, 520px);
  min-height: 440px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "ios board and"
    "flu board api";
  align-items: center;
  justify-items: center;
  gap: 12px 10px;
}

.svc-board {
  grid-area: board;
  position: relative;
  width: min(230px, 100%);
  overflow: hidden;
  border-radius: 26px;
  padding: 16px 14px 14px;
}

.svc-board::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, 0.16), transparent 62%);
  transform: translateX(-130%);
  animation: sheen 5.6s ease-in-out infinite;
  pointer-events: none;
}

.svc-board > * { position: relative; z-index: 1; }

.svc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.svc-head b,
.sat b { display: block; font-size: 13px; line-height: 1.2; }
.svc-head small,
.sat small { display: block; font-size: 11px; }

.meter {
  display: grid;
  grid-template-columns: minmax(76px, 0.85fr) 1.15fr;
  gap: 8px;
  align-items: center;
  margin-top: 9px;
  font-size: 12px;
  font-weight: 700;
}

.meter i {
  display: block;
  height: 7px;
  border-radius: 99px;
  background: var(--scene-soft);
  overflow: hidden;
}

.meter i::before {
  content: "";
  display: block;
  height: 100%;
  width: var(--w, 80%);
  border-radius: inherit;
  background: linear-gradient(90deg, #14d7ff, #7c5cff);
  transform: scaleX(1);
  transform-origin: left center;
  animation: meter 2.8s ease-in-out infinite;
  animation-delay: calc(var(--d) * 0.18s);
}

html[dir="rtl"] .meter i::before { transform-origin: right center; }
html[dir="rtl"] .svc-board { width: min(268px, 100%); }
html[dir="rtl"] .meter { grid-template-columns: auto minmax(72px, 1fr); }
html[dir="rtl"] .meter span { white-space: nowrap; }

.sat {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-width: max-content;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 16px;
  animation: floatY 6.4s ease-in-out infinite;
}

.sat img { width: 22px; height: 22px; flex: 0 0 22px; }
.sat-ios { grid-area: ios; }
.sat-and { grid-area: and; animation-delay: 0.5s; }
.sat-flu { grid-area: flu; animation-delay: 1s; }
.sat-api { grid-area: api; animation-delay: 1.4s; }

/* Portfolio */
.folio { width: min(100%, 460px); }

.showcase {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--scene-line);
  box-shadow: var(--scene-shadow);
  background: #0c1422;
}

.showcase .shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: shotFade 16s infinite;
}

.shot-1 { animation-delay: 0s; }
.shot-2 { animation-delay: -12s; }
.shot-3 { animation-delay: -8s; }
.shot-4 { animation-delay: -4s; }

@keyframes shotFade {
  0% { opacity: 0; transform: scale(1.05); }
  4% { opacity: 1; transform: scale(1.03); }
  30% { opacity: 1; transform: scale(1); }
  36%, 100% { opacity: 0; transform: scale(1.02); }
}

.showcase-bar {
  position: absolute;
  z-index: 2;
  top: 12px;
  inset-inline-start: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.icon-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: -26px;
  padding-inline: 4px;
}

.icon-row img {
  flex: 0 0 auto;
  width: clamp(40px, 11vw, 54px);
  height: clamp(40px, 11vw, 54px);
  min-width: 40px;
  border-radius: 15px;
  object-fit: cover;
  background: #0c1422;
  border: 2px solid rgba(8, 12, 20, 0.92);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  animation: iconPop 7.2s ease-in-out infinite;
}

.icon-row img:nth-child(2) { animation-delay: 0.4s; }
.icon-row img:nth-child(3) { animation-delay: 0.8s; }
.icon-row img:nth-child(4) { animation-delay: 1.2s; }
.icon-row img:nth-child(5) { animation-delay: 1.6s; }
.icon-row img:nth-child(6) { animation-delay: 2s; }

@keyframes iconPop {
  0%, 70%, 100% { transform: translateY(0) scale(1); }
  12% { transform: translateY(-7px) scale(1.05); }
  24% { transform: translateY(0) scale(1); }
}

/* Process */
.flow {
  position: relative;
  width: min(100%, 400px);
  margin: 0;
  padding: 0;
  padding-inline-start: 22px;
  list-style: none;
  display: grid;
  gap: 10px;
}

.flow::before {
  content: "";
  position: absolute;
  inset-inline-start: 6px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(20, 215, 255, 0.7), rgba(255, 197, 61, 0.65), transparent);
}

.flow::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset-inline-start: 1px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(20, 215, 255, 0.28), 0 0 16px #14d7ff;
  animation: comet 6s linear infinite;
}

@keyframes comet {
  from { top: 16px; }
  to { top: calc(100% - 28px); }
}

.flow li {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--scene-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--scene-shadow);
  animation: stepGlow 6s linear infinite;
  animation-delay: calc(var(--i) * 1.15s);
}

.flow li span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(20, 215, 255, 0.12);
  color: #8af6ff;
  font-family: var(--font-head);
  font-weight: 800;
}

.flow li b { display: block; font-size: 14px; line-height: 1.2; }
.flow li small { display: block; margin-top: 2px; font-size: 12px; }
.flow li img { width: 22px; height: 22px; }

@keyframes stepGlow {
  0%, 14% {
    border-color: rgba(20, 215, 255, 0.72);
    box-shadow: 0 12px 30px rgba(20, 215, 255, 0.14);
    transform: translateY(-3px);
  }
  26%, 100% {
    border-color: var(--scene-line);
    box-shadow: var(--scene-shadow);
    transform: none;
  }
}

/* About */
.orbit {
  --radius: clamp(96px, 16vw, 156px);
  --pad: clamp(96px, 10vw, 124px);
  position: relative;
  width: calc(var(--radius) * 2 + var(--pad));
  height: calc(var(--radius) * 2 + var(--pad));
  flex: none;
}

.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-a {
  width: calc(var(--radius) * 2);
  height: calc(var(--radius) * 2);
  border: 1px dashed rgba(20, 215, 255, 0.45);
  animation: ringSpin 36s linear infinite;
}

.ring-b {
  width: calc(var(--radius) * 1.45);
  height: calc(var(--radius) * 1.45);
  border: 1px solid rgba(124, 92, 255, 0.35);
  animation: ringSpin 26s linear infinite reverse;
}

@keyframes ringSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.core {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  text-align: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 28%, rgba(20, 215, 255, 0.22), var(--scene-bg) 64%);
}

.core::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(20, 215, 255, 0.4);
  animation: corePulse 3.4s ease-out infinite;
}

.core strong {
  font-family: var(--font-head);
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(120deg, #fff, #14d7ff 58%, #ffc53d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.core span { font-size: 11px; font-weight: 700; color: var(--scene-muted); }

@keyframes corePulse {
  0% { transform: scale(0.94); opacity: 0.75; }
  100% { transform: scale(1.2); opacity: 0; }
}

.arm {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: var(--radius);
  height: 0;
  transform-origin: 0 0;
  transform: rotate(calc(-90deg + var(--i) * 72deg));
  animation: armTurn 34s linear infinite;
}

.person {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 64px;
  padding: 7px 9px 6px;
  border-radius: 16px;
  text-align: center;
  transform: translate(-50%, -50%) rotate(calc(90deg - var(--i) * 72deg));
  animation: personTurn 34s linear infinite;
}

.person b { display: block; font-size: 13px; letter-spacing: 0.04em; line-height: 1.1; }
.person small { display: block; margin-top: 1px; font-size: 10px; font-weight: 700; white-space: nowrap; }

@keyframes armTurn {
  from { transform: rotate(calc(-90deg + var(--i) * 72deg)); }
  to { transform: rotate(calc(-90deg + var(--i) * 72deg + 360deg)); }
}

@keyframes personTurn {
  from { transform: translate(-50%, -50%) rotate(calc(90deg - var(--i) * 72deg)); }
  to { transform: translate(-50%, -50%) rotate(calc(90deg - var(--i) * 72deg - 360deg)); }
}

.studio-places {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  transform: translateX(-50%);
}

.studio-places span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.studio-places img { width: 14px; height: 14px; flex: 0 0 14px; }

/* Career */
.hire,
.inbox { position: relative; width: min(100%, 360px); display: grid; gap: 12px; }

.hire::before,
.inbox::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 42%;
  width: min(280px, 78vw);
  height: min(280px, 78vw);
  border-radius: 50%;
  border: 1px dashed rgba(20, 215, 255, 0.4);
  transform: translate(-50%, -50%);
  animation: ringSpin 32s linear infinite;
  pointer-events: none;
}

.hire-card,
.chat,
.hire-notes,
.inbox-notes { position: relative; z-index: 1; }

.hire-card {
  border-radius: 26px;
  padding: 16px;
  animation: floatY 7s ease-in-out infinite;
}

.hire-top { display: flex; align-items: center; gap: 10px; }
.hire-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #14d7ff, #7c5cff);
  color: #061018;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
}
.hire-top b { display: block; font-size: 15px; }
.hire-top small { display: block; font-size: 12px; }

.role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 12px;
}

.role-pills span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--scene-soft);
  border: 1px solid var(--scene-line);
  font-size: 11px;
  font-weight: 800;
}

.hire-status { position: relative; height: 22px; margin-bottom: 10px; }
.hire-status b {
  position: absolute;
  inset: 0;
  font-size: 13px;
  color: #8af6ff;
  opacity: 0;
}
.hire-status b:nth-child(1) { animation: st1 8s linear infinite; }
.hire-status b:nth-child(2) { animation: st2 8s linear infinite; }
.hire-status b:nth-child(3) { animation: st3 8s linear infinite; }
.hire-status b:nth-child(4) { animation: st4 8s linear infinite; }

@keyframes st1 { 0%, 20% { opacity: 1; } 26%, 100% { opacity: 0; } }
@keyframes st2 { 0%, 22% { opacity: 0; } 28%, 44% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes st3 { 0%, 46% { opacity: 0; } 52%, 68% { opacity: 1; } 74%, 100% { opacity: 0; } }
@keyframes st4 { 0%, 70% { opacity: 0; } 76%, 96% { opacity: 1; } 100% { opacity: 0; } }

.hire-meter {
  height: 6px;
  border-radius: 99px;
  background: var(--scene-soft);
  overflow: hidden;
}

.hire-meter i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #14d7ff, #ffc53d);
  animation: hireGrow 8s linear infinite;
}

html[dir="rtl"] .hire-meter i { transform-origin: right center; }

@keyframes hireGrow {
  0% { transform: scaleX(0.08); }
  90% { transform: scaleX(1); }
  100% { transform: scaleX(0.08); }
}

.hire-notes,
.inbox-notes { display: flex; flex-wrap: wrap; gap: 8px; }

.hire-notes span,
.inbox-notes span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
}

.inbox-notes b { font-size: 16px; color: #ffc53d; }
.inbox-notes small { display: block; font-size: 10px; font-weight: 700; }
.inbox-notes img { width: 14px; height: 14px; }

/* Contact */

.chat {
  display: grid;
  gap: 8px;
  border-radius: 26px;
  padding: 14px;
  animation: floatY 7.2s ease-in-out infinite;
}

.chat-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.chat-top b { display: block; font-size: 14px; }
.chat-top small { display: block; font-size: 11px; }

.bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.bubble.user {
  margin-inline-start: auto;
  background: linear-gradient(180deg, #ffe07a, #ffc53d);
  color: #081018;
  border-end-end-radius: 5px;
}

.bubble.team {
  margin-inline-end: auto;
  background: var(--scene-soft);
  border: 1px solid var(--scene-line);
  color: var(--scene-ink);
  border-end-start-radius: 5px;
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  min-height: 36px;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #14d7ff;
  animation: dot 1.2s ease-in-out infinite;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes dot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 1120px) {
  .hero-stage { min-height: 480px; }
}

@media (max-width: 860px) {
  .hero-stage { min-height: 420px; }
}

@media (max-width: 560px) {
  .hero-visual.scene-services,
  .hero-visual.scene-portfolio,
  .hero-visual.scene-process,
  .hero-visual.scene-about,
  .hero-visual.scene-career,
  .hero-visual.scene-contact {
    min-height: 0;
    overflow: visible;
  }

  .hero-stage { min-height: 0; padding: 8px 0 4px; }

  .svc {
    width: 100%;
    min-height: 0;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "board board"
      "ios and"
      "flu api";
    gap: 10px;
  }

  .svc-board { width: min(280px, 100%); justify-self: center; }
  .sat { width: 100%; min-width: 0; animation: none; }
  .core { width: 96px; height: 96px; }
  .core strong { font-size: 24px; }
  .flow li { padding: 8px 10px; gap: 10px; }
  html[data-theme="light"] .icon-row img { border-color: #fff; }
}

html[data-theme="light"] .icon-row img {
  border-color: #fff;
  box-shadow: 0 10px 22px rgba(16, 42, 67, 0.16);
}

html[data-theme="light"] .flow li { border-color: rgba(12, 48, 72, 0.1); }
html[data-theme="light"] .flow li span { color: #0f6f86; background: rgba(14, 165, 196, 0.12); }
html[data-theme="light"] .hire-status b { color: #0f6f86; }
html[data-theme="light"] .core strong {
  background: linear-gradient(120deg, #07131f, #0e7490 60%, #b45309);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="light"] .ring-a { border-color: rgba(14, 116, 144, 0.45); }
html[data-theme="light"] .ring-b { border-color: rgba(154, 103, 0, 0.35); }
html[data-theme="light"] .hero-visual.scene-services::before,
html[data-theme="light"] .hero-visual.scene-portfolio::before,
html[data-theme="light"] .hero-visual.scene-process::before,
html[data-theme="light"] .hero-visual.scene-about::before,
html[data-theme="light"] .hero-visual.scene-career::before,
html[data-theme="light"] .hero-visual.scene-contact::before { opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
  .shot { animation: none !important; opacity: 0 !important; transform: none !important; }
  .shot-1 { opacity: 1 !important; }
  .hire-status b { animation: none !important; opacity: 0 !important; }
  .hire-status b:first-child { opacity: 1 !important; }
  .hire-meter i,
  .meter i::before { animation: none !important; transform: none !important; }
  .arm,
  .person,
  .ring { animation: none !important; }
}
