:root {
  --bg: #030711;
  --panel: rgba(8, 16, 34, 0.72);
  --text: #f7fbff;
  --muted: #aab5c8;
  --blue: #00aaff;
  --orange: #ff6a00;
  --line: rgba(255, 255, 255, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

a {
  color: inherit;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 111, 255, 0.22), transparent 25%),
    #02050d;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.brand-logo {
  object-fit: cover;
}

.preloader-logo {
  position: relative;
  z-index: 3;
  width: min(480px, 78vw);
  border-radius: 24px;
  box-shadow:
    0 0 45px rgba(0, 170, 255, 0.42),
    0 0 100px rgba(255, 106, 0, 0.22);
  animation: logo-breathe 2.8s ease-in-out infinite;
}

.loader {
  position: absolute;
  bottom: clamp(25px, 5vh, 55px);
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: baseline;
  gap: 4px;
  transform: translateX(-50%);
  font-weight: 300;
  line-height: 1;
}

.loader span:first-child {
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 100;
}

.loader span:last-child {
  font-size: clamp(18px, 2.5vw, 28px);
}

.loader.is-leaving {
  animation: loader-leaving 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.energy,
.site-energy {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(28px);
}

.energy-orange {
  top: 10%;
  left: -14%;
  width: 65vw;
  height: 13vw;
  min-height: 120px;
  background: linear-gradient(90deg, transparent, rgba(255, 91, 0, 0.95), transparent);
  transform: rotate(-28deg);
  animation: orange-flow 6s ease-in-out infinite alternate;
}

.energy-blue {
  right: -17%;
  bottom: 10%;
  width: 70vw;
  height: 15vw;
  min-height: 130px;
  background: linear-gradient(90deg, transparent, rgba(0, 170, 255, 0.9), transparent);
  transform: rotate(-24deg);
  animation: blue-flow 7s ease-in-out infinite alternate;
}

.particles,
.particles::before,
.particles::after {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 1px, transparent 1.7px),
    radial-gradient(circle, rgba(0, 170, 255, 0.8) 1px, transparent 1.7px),
    radial-gradient(circle, rgba(255, 106, 0, 0.8) 1px, transparent 1.7px);
  background-size: 120px 120px, 180px 180px, 240px 240px;
  background-position: 0 0, 50px 85px, 100px 30px;
  opacity: 0.6;
  animation: particle-drift 14s linear infinite;
}

.particles::before {
  transform: rotate(30deg) scale(1.3);
  opacity: 0.25;
  animation-duration: 20s;
}

.particles::after {
  transform: rotate(-25deg) scale(1.5);
  opacity: 0.18;
  animation-duration: 25s;
}

.site {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 10%, rgba(0, 126, 255, 0.13), transparent 24%),
    radial-gradient(circle at 20% 38%, rgba(255, 96, 0, 0.1), transparent 21%),
    var(--bg);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 17, 0.66);
  backdrop-filter: blur(16px);
}

.mini-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mini-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.mini-brand b {
  color: var(--blue);
}

.nav-links {
  display: flex;
  gap: clamp(12px, 2vw, 28px);
}

.nav-links a {
  color: #dbe8f6;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--orange);
}

.nav-contact {
  padding: 11px 17px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.25s ease;
}

.nav-contact:hover {
  border-color: var(--orange);
  background: var(--orange);
  transform: translateY(-2px);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: center;
  gap: clamp(30px, 6vw, 100px);
  padding: 145px clamp(22px, 7vw, 110px) 85px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 18px;
  color: #86d8ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.hero h1,
.section-heading h2,
.offer-card h2 {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 0.87;
}

.hero h1 {
  font-size: clamp(58px, 8.5vw, 145px);
  font-weight: 800;
}

.hero h1 span {
  color: var(--orange);
  text-shadow: 0 0 28px rgba(255, 106, 0, 0.38);
}

.hero-text {
  max-width: 570px;
  margin: 32px 0;
  color: var(--muted);
  font-size: clamp(17px, 1.55vw, 22px);
  line-height: 1.65;
}

.hero-buttons,
.offer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover {
  transform: translateY(-4px);
}

.button-primary {
  background: linear-gradient(110deg, var(--orange), #ffb000);
  color: #0b0d12;
  box-shadow: 0 12px 30px rgba(255, 106, 0, 0.22);
}

.button-outline {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: white;
  background: rgba(255, 255, 255, 0.04);
}

.button-outline:hover {
  border-color: var(--blue);
  box-shadow: 0 0 24px rgba(0, 170, 255, 0.25);
}

.story-portal {
  position: relative;
  z-index: 2;
  width: min(100%, 500px);
  min-height: 390px;
  justify-self: center;
  overflow: hidden;
  border-radius: 44px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    rgba(4, 13, 32, 0.72);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
}

.portal-border {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 173, 255, 0.5);
  border-radius: inherit;
  pointer-events: none;
}

.portal-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(35px);
  opacity: 0.48;
}

.portal-glow-orange {
  top: -170px;
  left: -170px;
  background: var(--orange);
  animation: glow-pulse 4s ease-in-out infinite;
}

.portal-glow-blue {
  right: -170px;
  bottom: -170px;
  background: var(--blue);
  animation: glow-pulse 4.5s ease-in-out 0.5s infinite;
}

.portal-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 390px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 54px);
}

.portal-small {
  margin: 0 0 28px;
  color: #d8edf9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.portal-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  font-size: clamp(25px, 3vw, 43px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.portal-flow span:nth-of-type(odd) {
  color: var(--orange);
}

.portal-flow span:nth-of-type(even) {
  color: var(--blue);
}

.portal-flow i {
  color: white;
  font-style: normal;
}

.portal-line {
  width: 100%;
  height: 1px;
  margin: 28px 0 22px;
  background: linear-gradient(90deg, var(--orange), var(--blue), transparent);
}

.portal-description {
  max-width: 370px;
  margin: 0;
  color: #d5dfec;
  font-size: 15px;
  line-height: 1.65;
}

.section {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 44px));
  margin: 0 auto;
  padding: 120px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 52px;
}

.section-heading h2 {
  font-size: clamp(44px, 6vw, 94px);
  font-weight: 800;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.process-card {
  min-height: 245px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  transition: transform 0.25s ease, border 0.25s ease;
}

.process-card:hover {
  border-color: rgba(0, 170, 255, 0.75);
  transform: translateY(-8px);
}

.step-number {
  display: block;
  margin-bottom: 50px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 700;
}

.process-card h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.process-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.sample-card {
  position: relative;
  min-height: 250px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(3, 19, 42, 0.85), rgba(14, 10, 18, 0.88));
  text-decoration: none;
  transition: transform 0.28s ease, border 0.28s ease, box-shadow 0.28s ease;
}

.sample-card::after {
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 170, 255, 0.28), transparent 68%);
  content: "";
  transition: transform 0.35s ease;
}

.sample-card:nth-child(even)::after {
  background: radial-gradient(circle, rgba(255, 106, 0, 0.26), transparent 68%);
}

.sample-card:hover {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  transform: translateY(-8px);
}

.sample-card:hover::after {
  transform: scale(1.35);
}

.sample-card span {
  position: relative;
  z-index: 1;
  color: #81dcff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.sample-card h3 {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 30px 0 15px;
  font-size: clamp(24px, 2.5vw, 37px);
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.sample-card p {
  position: relative;
  z-index: 1;
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.offer {
  padding-bottom: 130px;
}

.offer-card {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 7vw, 86px);
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 32px;
  background:
    radial-gradient(circle at 5% 5%, rgba(255, 106, 0, 0.42), transparent 25%),
    radial-gradient(circle at 90% 90%, rgba(0, 170, 255, 0.4), transparent 26%),
    linear-gradient(140deg, #11192b, #050916);
  text-align: center;
}

.offer-card h2 {
  font-size: clamp(62px, 11vw, 170px);
  font-weight: 800;
}

.offer-card h2 span {
  display: block;
  margin-top: 14px;
  color: #d4e9ff;
  font-size: clamp(14px, 1.7vw, 25px);
  letter-spacing: 0.09em;
}

.offer-card > p:not(.eyebrow) {
  max-width: 600px;
  margin: 28px auto;
  color: #d5dfec;
  font-size: 18px;
  line-height: 1.7;
}

.offer-buttons {
  justify-content: center;
}

footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 28px clamp(22px, 7vw, 110px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #aab5c8;
  font-size: 13px;
}

footer p {
  margin: 0;
  color: white;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.site-energy {
  z-index: 0;
  opacity: 0.25;
}

.site-orange {
  top: 22%;
  left: -25%;
  width: 60vw;
  height: 20vw;
  background: var(--orange);
  animation: orange-flow 10s ease-in-out infinite alternate;
}

.site-blue {
  right: -23%;
  bottom: 15%;
  width: 60vw;
  height: 22vw;
  background: var(--blue);
  animation: blue-flow 12s ease-in-out infinite alternate;
}

@keyframes logo-breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.035);
  }
}

@keyframes loader-leaving {
  to {
    opacity: 0;
    filter: blur(8px);
    transform: translate(-50%, -35px);
  }
}

@keyframes orange-flow {
  from {
    transform: translate(-4%, -5%) rotate(-28deg);
  }

  to {
    transform: translate(20%, 22%) rotate(-16deg);
  }
}

@keyframes blue-flow {
  from {
    transform: translate(5%, 2%) rotate(-24deg);
  }

  to {
    transform: translate(-20%, -24%) rotate(-15deg);
  }
}

@keyframes particle-drift {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-120px);
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.95);
  }

  50% {
    opacity: 0.66;
    transform: scale(1.16);
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 130px;
  }

  .story-portal {
    width: min(100%, 590px);
    justify-self: start;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .navbar {
    padding: 13px 16px;
  }

  .mini-brand span {
    display: none;
  }

  .mini-brand img {
    width: 40px;
    height: 40px;
  }

  .nav-contact {
    padding: 10px 14px;
    font-size: 12px;
  }

  .hero {
    min-height: auto;
    padding: 125px 22px 75px;
  }

  .hero h1 {
    font-size: clamp(52px, 16vw, 82px);
  }

  .hero-text {
    margin: 24px 0;
    font-size: 16px;
  }

  .story-portal,
  .portal-content {
    min-height: 340px;
  }

  .portal-flow {
    font-size: 28px;
  }

  .section {
    width: min(100% - 32px, 1200px);
    padding: 85px 0;
  }

  .process-grid,
  .sample-grid {
    grid-template-columns: 1fr;
  }

  .process-card {
    min-height: 190px;
  }

  .step-number {
    margin-bottom: 30px;
  }

  .sample-card {
    min-height: 220px;
    padding: 25px;
  }

  footer {
    flex-direction: column;
    padding: 26px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ------------------------------------------
   FINAL MOTION UPGRADE: SCROLL + MOBILE LIFE
------------------------------------------- */

/* Portal always floats gently on phones and tablets.
   Desktop mouse tilt overrides its transform while the mouse is over it. */
.story-portal {
  animation: portal-float 5s ease-in-out infinite;
}

.story-portal::before {
  position: absolute;
  top: 0;
  left: -130%;
  z-index: 4;
  width: 55%;
  height: 100%;
  content: "";
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.02) 20%,
    rgba(255, 255, 255, 0.33) 50%,
    rgba(255, 255, 255, 0.02) 80%,
    transparent 100%
  );
  transform: skewX(-18deg);
  animation: portal-shine 5.5s ease-in-out infinite;
}

/* A circular breathing glow around the main motion card. */
.story-portal::after {
  position: absolute;
  z-index: -1;
  inset: -35px;
  border-radius: 60px;
  content: "";
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 106, 0, 0.34),
    transparent 45%,
    rgba(0, 170, 255, 0.38)
  );
  filter: blur(30px);
  opacity: 0.55;
  animation: portal-aura 4s ease-in-out infinite alternate;
}

/* Scroll elements begin hidden. JavaScript adds .is-visible on entry. */
.scroll-reveal {
  opacity: 0;
  filter: blur(9px);
  transform: translateY(38px) scale(0.98);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

/* Each card arrives after the earlier card. */
.process-card:nth-child(1),
.sample-card:nth-child(1) {
  transition-delay: 0.04s;
}

.process-card:nth-child(2),
.sample-card:nth-child(2) {
  transition-delay: 0.12s;
}

.process-card:nth-child(3),
.sample-card:nth-child(3) {
  transition-delay: 0.2s;
}

.process-card:nth-child(4),
.sample-card:nth-child(4) {
  transition-delay: 0.28s;
}

.sample-card:nth-child(5) {
  transition-delay: 0.36s;
}

/* Mobile tap response */
.is-pressed {
  transform: scale(0.95) !important;
}

/* Slow moving accent lines make the entire page feel alive. */
.site::before,
.site::after {
  position: absolute;
  z-index: 1;
  width: 70vw;
  height: 2px;
  content: "";
  pointer-events: none;
  opacity: 0.35;
  filter: blur(1px);
}

.site::before {
  top: 38%;
  left: -60vw;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  transform: rotate(-17deg);
  animation: orange-line-pass 12s linear infinite;
}

.site::after {
  top: 74%;
  right: -60vw;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  transform: rotate(15deg);
  animation: blue-line-pass 14s linear infinite;
}

@keyframes portal-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes portal-shine {
  0%,
  18% {
    left: -130%;
  }

  52%,
  100% {
    left: 170%;
  }
}

@keyframes portal-aura {
  from {
    opacity: 0.34;
    transform: scale(0.95);
  }

  to {
    opacity: 0.72;
    transform: scale(1.04);
  }
}

@keyframes orange-line-pass {
  from {
    transform: translateX(0) rotate(-17deg);
  }

  to {
    transform: translateX(180vw) rotate(-17deg);
  }
}

@keyframes blue-line-pass {
  from {
    transform: translateX(0) rotate(15deg);
  }

  to {
    transform: translateX(-180vw) rotate(15deg);
  }
}

/* Phones do not have a hover cursor, so make the portal motion slightly clearer. */
@media (max-width: 700px) {
  .story-portal {
    animation-duration: 4.2s;
  }

  .story-portal::after {
    inset: -20px;
    filter: blur(24px);
  }

  .site::before,
  .site::after {
    width: 120vw;
    opacity: 0.23;
  }

  .sample-card:active,
  .process-card:active {
    transform: scale(0.98);
  }
}

/* Do not force movement for visitors who ask their phone/browser to reduce motion. */
@media (prefers-reduced-motion: reduce) {
  .story-portal,
  .story-portal::before,
  .story-portal::after,
  .site::before,
  .site::after {
    animation: none !important;
  }

  .scroll-reveal {
    opacity: 1;
    filter: none;
    transform: none;
  }
}