:root {
  color-scheme: dark;
  --color-primary: #31b7ff;
  --color-primary-dark: #1760ff;
  --color-primary-light: #8ee7ff;
  --color-secondary: #ff9f1c;
  --color-secondary-dark: #c96c00;
  --color-accent: #9b5cff;
  --color-accent-soft: #33f1ff;

  --color-bg: #05070f;
  --color-bg-alt: #090e1c;
  --color-bg-card: rgba(11, 16, 31, 0.86);
  --color-surface: rgba(15, 22, 40, 0.92);

  --color-text: #f7fbff;
  --color-text-soft: #c8d4e6;
  --color-text-muted: #8493aa;
  --color-border: rgba(98, 156, 255, 0.22);
  --color-border-strong: rgba(132, 188, 255, 0.42);

  --grad-primary: linear-gradient(135deg, #20d7ff 0%, #2e6dff 48%, #9b5cff 100%);
  --grad-secondary: linear-gradient(135deg, #ffcf5c 0%, #ff8a1c 52%, #ff4d6d 100%);
  --grad-warm: linear-gradient(135deg, rgba(49, 183, 255, 0.18), rgba(155, 92, 255, 0.20) 45%, rgba(255, 159, 28, 0.22));
  --grad-cool: linear-gradient(180deg, rgba(10, 18, 36, 0.95), rgba(7, 10, 21, 0.96));
  --grad-radial: linear-gradient(135deg, rgba(49, 183, 255, 0.20), rgba(155, 92, 255, 0.10));

  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.42);
  --shadow-xl: 0 36px 110px rgba(0, 0, 0, 0.52);
  --shadow-glow: 0 0 34px rgba(49, 183, 255, 0.30), 0 0 72px rgba(155, 92, 255, 0.18);
}

* {
  letter-spacing: 0;
}

html {
  background: var(--color-bg);
}

body {
  background:
    linear-gradient(120deg, rgba(49, 183, 255, 0.10) 0%, transparent 28%),
    linear-gradient(240deg, rgba(255, 159, 28, 0.10) 0%, transparent 30%),
    linear-gradient(180deg, #05070f 0%, #070b16 52%, #05070f 100%);
}

body::before {
  background:
    linear-gradient(rgba(49, 183, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 183, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 26%, rgba(255, 159, 28, 0.06) 100%);
  background-size: 72px 72px, 72px 72px, auto;
  opacity: 0.72;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: 0;
  text-wrap: balance;
}

h1 { font-size: 5.25rem; }
h2 { font-size: 3.1rem; }
h3 { font-size: 1.7rem; }

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

.section {
  border-top: 1px solid rgba(98, 156, 255, 0.08);
}

.section-title .eyebrow,
.hero-eyebrow {
  border: 1px solid rgba(49, 183, 255, 0.25);
  background: rgba(49, 183, 255, 0.08);
  box-shadow: 0 0 24px rgba(49, 183, 255, 0.12);
}

.gradient-text {
  background: linear-gradient(90deg, #f7fbff 0%, #31b7ff 36%, #9b5cff 66%, #ffb347 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.header {
  background: rgba(5, 7, 15, 0.76);
  border-bottom-color: rgba(98, 156, 255, 0.16);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.header.scrolled {
  background: rgba(5, 7, 15, 0.92);
  border-bottom-color: rgba(98, 156, 255, 0.24);
}

:root[data-theme="dark"] .header,
:root[data-theme="dark"] .header.scrolled {
  background: rgba(5, 7, 15, 0.90);
}

.logo-mark {
  background: var(--grad-primary);
  box-shadow: 0 0 26px rgba(49, 183, 255, 0.38), 0 0 48px rgba(155, 92, 255, 0.18);
}

.nav-link {
  color: var(--color-text-soft);
}

.nav-link:hover,
.btn-ghost:hover {
  color: #ffffff;
}

.lang-switch {
  background: rgba(10, 16, 30, 0.82);
  border-color: rgba(98, 156, 255, 0.24);
}

.lang-btn.active {
  background: linear-gradient(135deg, rgba(49, 183, 255, 0.98), rgba(155, 92, 255, 0.95));
  color: #ffffff;
}

.btn {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.btn-primary {
  background: var(--grad-primary);
  box-shadow: 0 0 28px rgba(49, 183, 255, 0.32), 0 18px 48px rgba(0, 0, 0, 0.38);
}

.btn-primary:hover {
  box-shadow: 0 0 42px rgba(49, 183, 255, 0.42), 0 22px 62px rgba(0, 0, 0, 0.48);
}

.btn-secondary {
  background: rgba(12, 18, 33, 0.84);
  border-color: rgba(98, 156, 255, 0.30);
  color: #f7fbff;
}

.btn-secondary:hover {
  color: #ffffff;
  border-color: rgba(49, 183, 255, 0.72);
  box-shadow: 0 0 28px rgba(49, 183, 255, 0.18);
}

.hero {
  min-height: calc(100vh - var(--header-h));
  isolation: isolate;
  background:
    linear-gradient(115deg, rgba(49, 183, 255, 0.08) 0%, transparent 36%),
    linear-gradient(250deg, rgba(255, 159, 28, 0.11) 0%, transparent 31%);
}

.hero::before,
.hero::after {
  display: none;
}

.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  text-shadow: 0 0 36px rgba(49, 183, 255, 0.10);
}

.hero p.lead {
  font-size: 1.18rem;
  color: #d3deee;
}

.hero-stat .num {
  background: linear-gradient(135deg, #31b7ff, #ffb347);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-stat .label {
  color: var(--color-text-muted);
}

.hero-mascot {
  perspective: 1100px;
  z-index: 1;
  width: 100%;
}

.hero-mascot-frame {
  max-width: 620px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  transform: rotateX(1deg) rotateY(-7deg);
  transform-style: preserve-3d;
  isolation: isolate;
}

.hero-mascot-frame::before {
  inset: 9% 0 6% 4%;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 18, 34, 0.70), rgba(7, 10, 22, 0.52)),
    linear-gradient(135deg, rgba(49, 183, 255, 0.22), rgba(155, 92, 255, 0.18), rgba(255, 159, 28, 0.16));
  border: 1px solid rgba(98, 156, 255, 0.30);
  box-shadow: 0 0 52px rgba(49, 183, 255, 0.18), 0 42px 110px rgba(0, 0, 0, 0.56);
  opacity: 0.92;
  animation: none;
  z-index: 0;
  transform: rotate(-1deg);
}

.hero-mascot-frame::after {
  content: '';
  position: absolute;
  left: 9%;
  right: 8%;
  bottom: 6%;
  height: 28%;
  background:
    linear-gradient(rgba(49, 183, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 183, 255, 0.14) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: perspective(520px) rotateX(63deg);
  transform-origin: bottom center;
  opacity: 0.34;
  pointer-events: none;
  z-index: 1;
}

.hero-stage-grid {
  position: absolute;
  inset: 15% 11% 13% 12%;
  border-radius: 8px;
  background:
    linear-gradient(120deg, transparent 0 48%, rgba(49, 183, 255, 0.10) 49% 51%, transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%);
  border: 1px solid rgba(49, 183, 255, 0.14);
  box-shadow: inset 0 0 34px rgba(49, 183, 255, 0.08);
  pointer-events: none;
  z-index: 1;
}

.hero-tech-ring {
  position: absolute;
  inset: 20% 12% 14% 17%;
  border: 1px solid rgba(49, 183, 255, 0.24);
  border-radius: 8px;
  box-shadow: inset 0 0 32px rgba(49, 183, 255, 0.10), 0 0 28px rgba(155, 92, 255, 0.10);
  pointer-events: none;
  opacity: 0.55;
  z-index: 2;
}

.hero-beaver-fallback {
  position: absolute;
  left: 55%;
  top: 51%;
  z-index: 4;
  width: min(92%, 570px);
  height: auto;
  opacity: 0;
  visibility: hidden;
  filter: drop-shadow(0 24px 44px rgba(0, 0, 0, 0.50)) drop-shadow(0 0 24px rgba(255, 159, 28, 0.18));
  mix-blend-mode: normal;
  transform: translate(-50%, -50%);
  animation: bobrito-dance 2.8s ease-in-out infinite;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.hero-beaver-video {
  position: absolute;
  left: 55%;
  top: 51%;
  z-index: 6;
  width: min(124%, 760px);
  height: auto;
  max-height: 680px;
  object-fit: contain;
  mix-blend-mode: normal;
  filter: drop-shadow(0 30px 54px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 28px rgba(49, 183, 255, 0.28));
  animation: hero-live-video 5.4s ease-in-out infinite;
  transform: translate(-50%, -50%);
}

.hero-mascot-frame.video-failed .hero-beaver-video {
  opacity: 0;
  visibility: hidden;
}

.hero-mascot-frame.video-failed .hero-beaver-fallback {
  opacity: 1;
  visibility: visible;
}

.hero-mascot-svg {
  border-radius: 8px;
}

.floating-chip {
  background: rgba(8, 13, 26, 0.86);
  border: 1px solid rgba(98, 156, 255, 0.28);
  border-radius: 8px;
  color: #f7fbff;
  box-shadow: 0 0 24px rgba(49, 183, 255, 0.16), 0 18px 44px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  z-index: 9;
}

.chip-1 { top: 16%; left: -5%; }
.chip-2 { top: 50%; right: -8%; }
.chip-3 { bottom: 10%; left: 5%; }

.hero-depth-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 0.75rem;
  min-width: 84px;
  border-radius: 8px;
  border: 1px solid rgba(98, 156, 255, 0.26);
  background: rgba(8, 13, 26, 0.72);
  box-shadow: 0 0 28px rgba(49, 183, 255, 0.16), 0 20px 46px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
  z-index: 10;
  pointer-events: none;
}

.depth-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #31b7ff;
  box-shadow: 0 0 18px rgba(49, 183, 255, 0.76);
  flex: 0 0 auto;
}

.depth-led--warm {
  background: #ff9f1c;
  box-shadow: 0 0 18px rgba(255, 159, 28, 0.76);
}

.depth-line {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(142, 231, 255, 0.72), rgba(155, 92, 255, 0.45));
}

.depth-line--long { width: 54px; }
.depth-line--short { width: 42px; }

.depth-code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 800;
  color: #8ee7ff;
  text-shadow: 0 0 16px rgba(49, 183, 255, 0.65);
}

.depth-card-1 {
  top: 24%;
  right: 1%;
  transform: rotate(2deg);
}

.depth-card-2 {
  top: 63%;
  left: 12%;
  min-width: 0;
  padding-inline: 0.82rem;
  transform: rotate(-6deg);
}

.depth-card-3 {
  right: 10%;
  bottom: 20%;
  transform: rotate(-2deg);
}

.services {
  background: linear-gradient(180deg, rgba(8, 11, 20, 0), rgba(49, 183, 255, 0.055) 45%, rgba(255, 159, 28, 0.045) 100%);
}

.services-grid {
  align-items: stretch;
}

.service-card,
.portfolio-card,
.faq-item,
.contact,
.contact-card,
.form-card,
.desc-box,
.included-card,
.example-card,
.cta-box {
  border-radius: 8px;
}

.service-card {
  --card-glow: rgba(49, 183, 255, 0.28);
  min-height: 100%;
  background: linear-gradient(180deg, rgba(14, 21, 38, 0.92), rgba(8, 12, 24, 0.90));
  border-color: rgba(98, 156, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 60px rgba(0, 0, 0, 0.34);
}

.service-card--ecommerce,
.service-card--menu,
.service-card--bug-fix {
  --card-glow: rgba(255, 159, 28, 0.32);
}

.service-card--ai,
.service-card--chatbot {
  --card-glow: rgba(155, 92, 255, 0.34);
}

.service-card--booking {
  --card-glow: rgba(61, 255, 147, 0.26);
}

.service-card::before {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), var(--color-secondary), transparent);
  transform: scaleX(1);
  opacity: 0.68;
}

.service-card::after {
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--card-glow), transparent 38%);
  opacity: 0.18;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(49, 183, 255, 0.56);
  box-shadow: 0 0 36px var(--card-glow), 0 34px 90px rgba(0, 0, 0, 0.52);
}

.service-card-visual {
  position: relative;
  z-index: 1;
  aspect-ratio: 16 / 11;
  object-fit: contain;
  padding: 0.7rem;
  border-radius: 8px;
  border-color: rgba(98, 156, 255, 0.20);
  background:
    linear-gradient(135deg, rgba(49, 183, 255, 0.08), rgba(155, 92, 255, 0.06), rgba(255, 159, 28, 0.06)),
    rgba(3, 6, 14, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.26);
  transition: transform var(--transition-base), filter var(--transition-base);
}

.service-card:hover .service-card-visual {
  transform: translateY(-6px) scale(1.03);
  filter: saturate(1.12) drop-shadow(0 0 24px var(--card-glow));
}

.service-card .service-icon {
  background: rgba(6, 10, 20, 0.72);
  border-color: rgba(98, 156, 255, 0.28);
  color: #aee9ff;
  box-shadow: 0 0 24px rgba(49, 183, 255, 0.16);
}

.service-card h3 {
  align-items: flex-start;
}

.service-card .price,
.service-cta {
  color: #7dd8ff;
}

.service-card p.desc,
.service-feature,
.portfolio-info p {
  color: #b7c3d6;
}

.service-feature::before {
  background-color: rgba(61, 255, 147, 0.14);
  box-shadow: 0 0 16px rgba(61, 255, 147, 0.18);
}

.portfolio-card {
  background: linear-gradient(180deg, rgba(14, 21, 38, 0.94), rgba(8, 12, 24, 0.92));
  border-color: rgba(98, 156, 255, 0.20);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.34);
}

.portfolio-card:hover {
  border-color: rgba(49, 183, 255, 0.50);
  box-shadow: 0 0 34px rgba(49, 183, 255, 0.16), 0 32px 90px rgba(0, 0, 0, 0.48);
}

.portfolio-thumb img {
  filter: saturate(1.04) contrast(1.03);
}

.faq-item,
.contact,
.contact-card,
.form-card,
.desc-box,
.included-card,
.example-card,
.cta-box {
  background: linear-gradient(180deg, rgba(14, 21, 38, 0.92), rgba(8, 12, 24, 0.90));
  border-color: rgba(98, 156, 255, 0.20);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.30);
}

.faq-question:hover,
.faq-answer,
.info-list li,
.form-field input,
.form-field textarea,
.form-file,
.file-chip {
  background: rgba(6, 10, 20, 0.66);
}

.form-field input,
.form-field textarea,
.form-file {
  border-color: rgba(98, 156, 255, 0.24);
}

.form-field input:focus,
.form-field textarea:focus {
  background: rgba(6, 10, 20, 0.86);
  border-color: rgba(49, 183, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(49, 183, 255, 0.10);
}

.contact-item .icon,
.form-file .icon {
  background: rgba(49, 183, 255, 0.10);
  color: #7dd8ff;
}

.service-hero {
  background:
    linear-gradient(120deg, rgba(49, 183, 255, 0.10), transparent 36%),
    linear-gradient(250deg, rgba(255, 159, 28, 0.09), transparent 32%);
}

.service-hero::before {
  display: none;
}

.service-hero-content .price-tag {
  background: var(--grad-secondary);
  box-shadow: 0 0 30px rgba(255, 159, 28, 0.26), 0 16px 42px rgba(0, 0, 0, 0.36);
}

.service-hero .lead {
  color: #d3deee;
}

.service-visual {
  min-height: 360px;
}

.service-visual::before {
  inset: 8%;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(49, 183, 255, 0.18), rgba(155, 92, 255, 0.16), rgba(255, 159, 28, 0.12)),
    rgba(6, 10, 20, 0.34);
  border: 1px solid rgba(98, 156, 255, 0.20);
  filter: blur(0);
  opacity: 1;
  animation: none;
}

.service-visual img,
.service-visual svg {
  position: relative;
  width: min(92%, 560px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 32px 60px rgba(0, 0, 0, 0.48)) drop-shadow(0 0 28px rgba(49, 183, 255, 0.18));
  animation: float-mascot 6s ease-in-out infinite;
}

.back-to-top {
  background: var(--grad-primary);
  box-shadow: 0 0 26px rgba(49, 183, 255, 0.30);
}

footer.footer {
  background: linear-gradient(180deg, rgba(5, 7, 15, 0.4), rgba(3, 5, 10, 0.95));
  border-top: 1px solid rgba(98, 156, 255, 0.16);
}

.err-beaver-stage {
  position: relative;
  width: min(280px, 78vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto 2rem;
}

.err-beaver-fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  animation: bobrito-dance 2.8s ease-in-out infinite;
}

.err-beaver-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 44px rgba(0, 0, 0, 0.46)) drop-shadow(0 0 24px rgba(49, 183, 255, 0.24));
  mix-blend-mode: screen;
}

@keyframes bobrito-dance {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(-4deg) scale(1);
  }
  20% {
    transform: translate(-50%, -54%) rotate(5deg) scale(1.03);
  }
  42% {
    transform: translate(-50%, -49%) rotate(-7deg) scale(0.99);
  }
  64% {
    transform: translate(-50%, -55%) rotate(6deg) scale(1.04);
  }
  82% {
    transform: translate(-50%, -51%) rotate(-2deg) scale(1.01);
  }
}

@keyframes hero-live-video {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(-3deg) scale(1);
  }
  50% {
    transform: translate(-50%, -54%) rotate(3deg) scale(1.02);
  }
}

@media (max-width: 980px) {
  h1 { font-size: 3.6rem; }
  h2 { font-size: 2.45rem; }
  h3 { font-size: 1.45rem; }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-mascot {
    order: -1;
    max-width: 520px;
    margin: 0 auto;
  }

  .hero-mascot-frame {
    transform: none;
  }

  .hero-beaver-video {
    width: min(120%, 640px);
  }

  .hero-beaver-fallback {
    width: min(86%, 440px);
  }

  .depth-card-1 { right: 2%; }
  .depth-card-2 { left: 9%; }
  .depth-card-3 { right: 7%; }
}

@media (max-width: 640px) {
  h1 { font-size: 2.7rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.25rem; }

  .hero {
    padding-top: var(--space-5);
  }

  .hero-mascot-frame {
    max-width: 360px;
  }

  .hero-beaver-video {
    width: 124%;
  }

  .hero-beaver-fallback {
    width: 88%;
  }

  .floating-chip {
    padding: 0.5rem 0.68rem;
    font-size: 0.78rem;
  }

  .chip-1 { top: 4%; left: 2%; }
  .chip-2 { display: none; }
  .chip-3 { bottom: 3%; left: 3%; }

  .hero-depth-card {
    padding: 0.48rem 0.56rem;
    min-width: 58px;
  }

  .depth-line--long { width: 34px; }
  .depth-line,
  .depth-line--short { width: 24px; }
  .depth-card-1 { top: 19%; right: -1%; }
  .depth-card-2 { top: 61%; left: 7%; }
  .depth-card-3 { display: none; }

  .service-card-visual {
    aspect-ratio: 1 / 0.78;
    padding: 0.45rem;
  }

  .service-visual {
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-beaver-video,
  .hero-beaver-fallback,
  .err-beaver-fallback,
  .service-visual img,
  .service-visual svg {
    animation: none;
  }
}
