/* One shared scene. Sections remain semantic, but never paint separate backdrops. */
:root {
  --space: #080e27;
  --glass: rgba(12, 23, 47, 0.55);
  --cosmic-line: rgba(146, 208, 235, 0.22);
}
html {
  background: var(--space);
  scroll-padding-top: 110px;
  overflow-x: clip;
}
@supports not (overflow: clip) {
  html {
    overflow-x: hidden;
  }
}
body {
  background: transparent;
  color: #f5f2ea;
  isolation: isolate;
}
.cosmic-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 38%, #24307880, transparent 57%),
    radial-gradient(ellipse at 8% 64%, #0e3b6355, transparent 58%),
    linear-gradient(155deg, #080f29, #101638 55%, #080e27);
}
.earth-atmosphere {
  position: absolute;
  inset: -5%;
  background:
    radial-gradient(ellipse at 52% 42%, #36368555, transparent 44%),
    radial-gradient(ellipse at 12% 24%, #16628326, transparent 45%);
  transform: translate3d(var(--earth-x, 0px), var(--earth-y, 0px), 0) scale(1.05);
}
#universeCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
main,
.footer {
  position: relative;
  z-index: 1;
}
.reveal {
  opacity: 1;
  transform: none;
}
.grain {
  opacity: 0.022;
  z-index: 40;
}
.nav-wrap {
  background: linear-gradient(180deg, rgba(5, 9, 24, 0.92), rgba(5, 9, 24, 0.55));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav {
  border-bottom: 0;
  gap: 15px;
}
.nav-links {
  gap: 20px;
}
.nav-links a {
  font-size: 11px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: #f4d98c;
  color: #091020;
  padding: 15px;
}
.skip-link:focus {
  top: 15px;
}
:focus-visible {
  outline: 2px solid #f4d98c;
  outline-offset: 5px;
}
.automation-core,
.hero,
.manifesto,
.universe,
.flow,
.digital-id,
.identity,
.cta,
.footer {
  background: transparent;
  border: 0;
  isolation: auto;
  overflow: visible;
}
.automation-core:before,
.automation-core:after,
.hero:before,
.hero:after,
.flow:before,
.digital-id:before {
  display: none;
}
.automation-core {
  min-height: 0;
  padding-top: 88px;
}
.automation-inner {
  padding: 0 0 50px;
}
.automation-stage {
  height: 560px;
  margin: 0;
  perspective: none;
  transform: none !important;
}
.automation-core-logo {
  top: 43%;
  width: 250px;
  animation: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 25px 25px #0008) drop-shadow(0 0 45px #d7b45c30);
}
.automation-core-logo:before {
  inset: -15%;
  border-color: #dbbd714d;
  animation: coreSpin 90s linear infinite;
}
.automation-core-logo:after {
  inset: -29%;
  border-color: #87def536;
  animation: coreSpin 120s linear infinite reverse;
}
.core-status {
  font-size: 9px;
  bottom: -32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.automation-node {
  animation: none;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #ffffff15, #0a12284d);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  width: 165px;
  min-height: 76px;
  border-color: var(--node-color, #83dfff);
  border-width: 1px;
  box-shadow:
    inset 0 1px #ffffff1c,
    0 18px 35px #0005;
  text-align: start;
}
.automation-node:before,
.automation-node:nth-of-type(even):before {
  background: var(--node-color);
  box-shadow: 0 0 14px var(--node-color);
}
.automation-node b {
  color: var(--node-color);
  font-size: 10px;
}
.automation-node span {
  font-size: 17px;
  line-height: 1.35;
}
.automation-node[data-node="agents"] {
  --node-color: #ff849f;
  --x: 20% !important;
  --y: 20% !important;
}
.automation-node[data-node="workflow"] {
  --node-color: #ffb875;
  --x: 80% !important;
  --y: 20% !important;
}
.automation-node[data-node="crm"] {
  --node-color: #efd789;
  --x: 12% !important;
  --y: 49% !important;
}
.automation-node[data-node="data"] {
  --node-color: #83e6b7;
  --x: 88% !important;
  --y: 49% !important;
}
.automation-node[data-node="content"] {
  --node-color: #7cddf4;
  --x: 22% !important;
  --y: 77% !important;
}
.automation-node[data-node="support"] {
  --node-color: #959dff;
  --x: 78% !important;
  --y: 77% !important;
}
.automation-node[data-node="software"] {
  --node-color: #d1a0ff;
  --x: 50% !important;
  --y: 87% !important;
}
.automation-intro {
  margin: 20px auto 0;
}
.automation-intro h2 {
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 1.06;
}
.automation-actions {
  margin-top: 28px;
}
.automation-trust {
  margin-top: 24px;
}
.button {
  border-radius: 9px;
  min-height: 50px;
}
.button.ghost {
  background: #111c344d;
}
.hero {
  min-height: 0;
  padding-top: 105px;
  padding-bottom: 90px;
  gap: 24px;
}
.hero h1 {
  font-size: clamp(60px, 7.6vw, 102px);
  line-height: 0.93;
}
.hero-text,
.section-head > p,
.identity-copy > p,
.cta .container > p,
.flow-head > p,
.flow-step p {
  color: #bac6d9;
}
.hero-metrics span {
  color: #a8b6ca;
}
.earth-portrait {
  min-height: 400px;
  perspective: 900px;
}
.earth-portrait img {
  width: 77%;
  height: 77%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 25%;
  border-radius: 50%;
  opacity: 0.92;
  border: 1px solid #99deff66;
  box-shadow:
    0 0 35px #79bdf830,
    inset 0 0 30px #000;
  animation: none;
  filter: drop-shadow(0 24px 40px #0008);
}
.earth-portrait .orbit-a {
  transform: rotateX(57deg) rotateZ(-22deg);
  width: 110%;
  height: 100%;
  border-color: #ddc07960;
}
.celestial-dial {
  position: absolute;
  inset: 0;
  border: 1px solid #e2c27936;
  border-radius: 50%;
  animation: coreSpin 140s linear infinite;
  pointer-events: none;
  color: #e8cf9b;
  font:
    22px "ASTROLEX Persian",
    Georgia,
    serif;
}
.celestial-dial span {
  position: absolute;
  transform: translate(-50%, -50%);
  background: #0a1326b3;
  padding: 7px;
  border-radius: 50%;
}
.celestial-dial span:nth-child(1) {
  left: 50%;
  top: 0;
}
.celestial-dial span:nth-child(2) {
  left: 100%;
  top: 50%;
}
.celestial-dial span:nth-child(3) {
  left: 50%;
  top: 100%;
}
.celestial-dial span:nth-child(4) {
  left: 0;
  top: 50%;
}
.section {
  padding-top: 100px;
  padding-bottom: 100px;
}
.manifesto {
  padding-top: 130px;
  padding-bottom: 130px;
  position: relative;
}
.manifesto .section-label,
.flow .section-label {
  color: #e5c985;
}
.manifesto blockquote {
  color: #f4f0e6;
  text-shadow: 0 4px 28px #050918;
  max-width: 960px;
  font-size: clamp(34px, 4.8vw, 66px);
}
.flow-head h2,
.flow-step h3,
.flow-outcome strong {
  color: #f5f2e9;
}
.flow-track:before {
  background: linear-gradient(90deg, #ff849f44, #efd78977, #83e6b777, #7cddf477, #d1a0ff44);
}
.flow-step {
  border-color: #c9ddff20;
}
.step-icon {
  background: #0a152be6;
  color: #ecd591;
  border-color: #c7e7ff42;
  box-shadow:
    0 0 0 8px #101a2966,
    0 0 30px #8dcff715;
}
.flow-step:hover .step-icon {
  box-shadow:
    0 0 0 8px #101a2966,
    0 0 30px #8dcff733;
}
.flow-outcome {
  border-color: var(--cosmic-line);
  border-radius: 16px;
  background: #ffffff08;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.flow-outcome span {
  color: #e5c985;
}
.card,
.card-wide,
.id-console {
  background: linear-gradient(135deg, #ffffff16, #0a152966);
  border-color: #b7d9ff40;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.card:before {
  background: radial-gradient(ellipse at 100% 0, #d7b45c14, transparent 70%);
}
.card.active {
  border-color: #e5c98580;
  box-shadow:
    0 28px 70px #0006,
    inset 0 1px #ffffff33;
}
.card > span {
  color: #b6c3d6;
}
.card a {
  color: #ead192;
}
.card p {
  color: #bdcada;
}
.footer {
  padding-bottom: 110px;
}
.footer p {
  color: #99a8bf;
}
.experience-controls {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  right: 22px;
  z-index: 60;
  display: flex;
  gap: 8px;
  direction: ltr;
}
.experience-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid #c6ddff42;
  border-radius: 40px;
  background: #081326d9;
  color: #e7e9ed;
  font:
    11px "ASTROLEX Persian",
    var(--sans);
  cursor: pointer;
  box-shadow: 0 10px 30px #0004;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.experience-controls button[aria-pressed="true"] {
  border-color: #ddc078;
  color: #f0d894;
}
.sound-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}
.sound-bars i {
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
}
#cosmicSound[aria-pressed="true"] i {
  animation: soundWave 1.3s ease-in-out infinite alternate;
}
#cosmicSound i:nth-child(2) {
  animation-delay: -0.4s;
}
#cosmicSound i:nth-child(3) {
  animation-delay: -0.8s;
}
#cosmicSound i:nth-child(4) {
  animation-delay: -0.2s;
}
@keyframes soundWave {
  to {
    height: 15px;
  }
}
html[data-motion="paused"] {
  scroll-behavior: auto;
}
html[data-motion="paused"] *,
html[data-motion="paused"] *:before,
html[data-motion="paused"] *:after {
  animation-play-state: paused !important;
  transition: none !important;
}
.fa .automation-intro h2 {
  font-family: "ASTROLEX Persian", Vazirmatn, sans-serif;
  font-size: clamp(29px, 4vw, 52px);
  line-height: 1.65;
  letter-spacing: 0;
}
.fa .automation-node span {
  font-family: "ASTROLEX Persian", Vazirmatn, sans-serif;
  font-size: 13px;
  line-height: 1.7;
}
.fa .experience-controls button {
  font-family: "ASTROLEX Persian", Vazirmatn, sans-serif;
}
.fa .hero h1 {
  line-height: 1.6;
  font-size: clamp(36px, 5.8vw, 76px);
}
@media (max-width: 1050px) {
  .nav-links {
    gap: 12px;
  }
  .nav-links a {
    font-size: 10px;
  }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .menu {
    display: block;
  }
  .nav-links {
    position: fixed;
    top: 88px;
    left: 20px;
    right: 20px;
    display: grid;
    gap: 0;
    padding: 15px 22px;
    background: #091326f2;
    border: 1px solid var(--cosmic-line);
    border-radius: 18px;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
  }
  .nav-links.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 16px 0;
    font-size: 12px;
  }
}
@media (max-width: 900px) {
  .nav-links {
    background: #091326f2;
    border-radius: 18px;
    backdrop-filter: blur(22px);
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 60px;
  }
  .hero-art {
    width: min(75vw, 420px);
    min-height: 0;
    margin-bottom: 45px;
  }
  .hero-copy {
    order: 2;
  }
  .automation-node {
    width: 140px;
  }
  .automation-core-logo {
    width: 220px;
  }
  .automation-node[data-node="crm"] {
    --x: 15% !important;
  }
  .automation-node[data-node="data"] {
    --x: 85% !important;
  }
}
@media (max-width: 580px) {
  html {
    scroll-padding-top: 90px;
  }
  .nav {
    height: 76px;
  }
  .nav-actions {
    gap: 8px;
  }
  .brand {
    gap: 8px;
  }
  .brand b {
    font-size: 14px;
  }
  .brand small {
    font-size: 7px;
  }
  .language,
  .menu {
    min-width: 38px;
    width: 38px;
  }
  .automation-core {
    padding-top: 76px;
  }
  .automation-inner {
    width: calc(100% - 32px);
    padding: 0 0 30px;
  }
  .automation-stage {
    height: 610px;
  }
  .automation-core-logo {
    top: 46%;
    width: clamp(120px, 35vw, 188px);
  }
  .automation-core-logo:after {
    inset: -23%;
  }
  .core-status {
    font-size: 8px;
    bottom: -28px;
  }
  .automation-node {
    width: 28%;
    min-height: 76px;
    padding: 10px 8px;
    max-width: 148px;
    border-radius: 14px;
  }
  .automation-node b {
    font-size: 8px;
    letter-spacing: 0.07em;
  }
  .automation-node span {
    font-size: clamp(12px, 3.15vw, 17px);
    overflow-wrap: break-word;
  }
  .automation-node[data-node="agents"] {
    --x: 21% !important;
    --y: 15% !important;
  }
  .automation-node[data-node="workflow"] {
    --x: 79% !important;
    --y: 15% !important;
  }
  .automation-node[data-node="crm"] {
    --x: 15% !important;
    --y: 46% !important;
  }
  .automation-node[data-node="data"] {
    --x: 85% !important;
    --y: 46% !important;
  }
  .automation-node[data-node="content"] {
    --x: 21% !important;
    --y: 75% !important;
  }
  .automation-node[data-node="support"] {
    --x: 79% !important;
    --y: 75% !important;
  }
  .automation-node[data-node="software"] {
    --x: 50% !important;
    --y: 93% !important;
  }
  .automation-intro {
    margin-top: 25px;
  }
  .automation-intro h2 {
    font-size: clamp(34px, 9vw, 43px);
  }
  .automation-intro > p:not(.section-label) {
    font-size: 13px;
    line-height: 1.9;
  }
  .automation-trust {
    gap: 10px 15px;
    font-size: 9px;
    line-height: 1.8;
  }
  .automation-actions .button {
    width: 100%;
    max-width: none;
  }
  .section {
    padding: 75px 0;
  }
  .manifesto {
    padding: 90px 24px;
  }
  .manifesto blockquote {
    line-height: 1.3;
    font-size: 34px;
  }
  .hero {
    padding-bottom: 45px;
  }
  .hero h1 {
    font-size: clamp(50px, 13vw, 72px);
  }
  .hero-metrics {
    gap: 25px;
  }
  .hero-metrics span {
    font-size: 9px;
  }
  .hero-metrics strong {
    font-size: 27px;
  }
  .flow-step,
  .fa .flow-step {
    border-color: #c9ddff20;
  }
  .flow-outcome {
    padding: 22px;
  }
  .experience-controls {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .experience-controls button {
    font-size: 10px;
    padding: 10px 12px;
  }
  .footer {
    padding-bottom: 100px;
  }
  .fa .automation-node span {
    font-size: clamp(10px, 2.65vw, 13px);
    line-height: 1.75;
  }
  .fa .manifesto blockquote {
    font-size: 28px;
    line-height: 1.8;
  }
  .fa .hero h1 {
    font-size: 42px;
  }
  .core-status {
    font-size: 7px;
    letter-spacing: 0.09em;
    padding: 7px 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Social destinations stay explicit: two Instagram accounts and one YouTube channel. */
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 30px auto 0;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #94b6ed40;
  border-radius: 999px;
  background: #15213b80;
  color: #d5e5ff;
  font:
    12px "ASTROLEX Persian",
    var(--sans);
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.social-links a:hover {
  background: #223559bd;
  border-color: #a8dfff;
}
.social-links svg {
  width: 21px;
  height: 21px;
  flex: none;
  display: block;
}
.social-links .youtube-icon {
  color: #ff888f;
}
.social-links .instagram-icon {
  color: #d7b0ff;
}
.social-links .gem-icon {
  color: #eed18b;
  width: 15px;
  height: 15px;
  margin-inline-start: -4px;
}
.fa .social-links a {
  font-family: "ASTROLEX Persian", Vazirmatn, sans-serif;
}
.footer .container {
  flex-wrap: wrap;
}
.footer .social-links {
  width: 100%;
  margin-top: 8px;
  gap: 12px;
}
@media (max-width: 580px) {
  .social-links {
    gap: 8px;
    margin-top: 24px;
  }
  .social-links a {
    font-size: 10px;
    padding: 9px 11px;
  }
  .social-links svg {
    width: 18px;
    height: 18px;
  }
}
@media (max-width: 360px) {
  .automation-inner {
    width: calc(100% - 24px);
  }
  .automation-stage {
    height: 590px;
  }
  .automation-core-logo {
    width: 32vw;
  }
  .automation-node {
    padding: 9px 6px;
  }
  .automation-node b {
    font-size: 7px;
  }
  .automation-node span {
    font-size: 12px;
  }
  .fa .automation-node span {
    font-size: 10px;
  }
}

/* Keep action hit areas above the decorative 3D scene, including Safari. */
.automation-core {
  isolation: isolate;
  transform-style: flat;
}
.automation-inner {
  transform-style: flat;
}
.automation-actions,
.automation-inner > .social-links {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}
.automation-actions a,
.social-links a {
  position: relative;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}
.social-links a > svg,
.social-links a > span {
  pointer-events: none;
}
/* The extra project entry must remain usable on laptop and mobile widths. */
.nav-links a {
  white-space: nowrap;
}
@media (min-width: 901px) and (max-width: 1280px) {
  .menu {
    display: block;
  }
  .nav-links {
    position: fixed;
    top: 88px;
    left: 20px;
    right: 20px;
    display: grid;
    gap: 0;
    padding: 15px 22px;
    background: #091326f2;
    border: 1px solid var(--cosmic-line);
    border-radius: 18px;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
  }
  .nav-links.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 16px 0;
    font-size: 14px;
  }
}
@media (max-width: 1280px) {
  .nav-links {
    max-height: calc(100dvh - 112px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
