/* ============================================================
   Auralis — Neural Audio Engine
   Tokens sourced from DESIGN.md
   ============================================================ */

:root {
  /* Colors */
  --primary: #c7d2fe;
  --secondary: #4b5563;
  --tertiary: #111827;
  --neutral: #ffffff;
  --background: #eef2ff;
  --surface: #1c1c1e;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --border: rgba(255, 255, 255, 0.6);

  /* Gradient (from DESIGN.md) */
  --grad-from: #4f46e5;
  --grad-to: #06b6d4;

  /* Spacing rhythm (6px base) */
  --sp-sm: 2px;
  --sp-md: 6px;
  --sp-lg: 14px;
  --sp-xl: 26.5px;
  --section-padding: 32px;

  /* Radii */
  --r-full: 9999px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 300ms;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ----------------------------------------------------------
   Background layers
   ---------------------------------------------------------- */
#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* Vertical glass slices overlay */
.glass-slices {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.glass-slices span {
  width: 7vw;
  height: 100%;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.06)
  );
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

/* Light wash so the left-side text stays readable over the gradient */
.left-wash {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to right,
    #ffffff 0%,
    var(--background) 34%,
    rgba(238, 242, 255, 0.55) 46%,
    rgba(238, 242, 255, 0) 62%
  );
}

/* ----------------------------------------------------------
   Page shell
   ---------------------------------------------------------- */
.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 48px;
  max-width: 1440px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   Header
   ---------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.brand {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--tertiary);
  text-decoration: none;
}

.brand-dot {
  margin-left: 4px;
  font-weight: 400;
  color: var(--text-secondary);
}

.main-nav {
  display: flex;
  gap: 40px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.main-nav a:hover {
  color: var(--tertiary);
}

.link-signin {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.link-signin:hover {
  color: var(--tertiary);
}

/* ----------------------------------------------------------
   Hero
   ---------------------------------------------------------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 40px;
}

.hero-copy {
  max-width: 680px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(199, 210, 254, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.badge-icon {
  width: 16px;
  height: 16px;
  font-size: 16px;
  color: var(--grad-from);
}

.hero-title {
  margin-top: 28px;
  /* fluid: scales with viewport so the Russian line breaks hold without
     wrapping each word; caps at the 80px design value on wide screens */
  font-size: clamp(40px, 5.6vw, 80px);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.05em;
  color: var(--tertiary);
}

.gradient-text {
  background: linear-gradient(to right, var(--grad-from), var(--grad-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  margin-top: 32px;
  max-width: 440px;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: var(--text-secondary);
}

/* Buttons */
.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  border-radius: var(--r-full);
  padding: 14px 28px;
  transition: transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), background var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.btn svg,
.btn iconify-icon {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

/* Primary — #1C1C1E surface (DESIGN.md › Buttons › Primary) */
.btn-primary {
  background: var(--surface);
  color: var(--neutral);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,
    rgba(0, 0, 0, 0.1) 0px 4px 6px -4px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 14px 22px -6px,
    rgba(0, 0, 0, 0.12) 0px 6px 10px -6px;
}

/* Secondary "Talk to Sales" — white surface, indigo ink + border */
.btn-ghost {
  background: var(--neutral);
  color: #6366f1;
  border: 1px solid rgba(199, 210, 254, 0.8);
}

.btn-ghost:hover {
  background: var(--background);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------
   Feature row
   ---------------------------------------------------------- */
.features {
  list-style: none;
  display: flex;
  gap: 56px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.feature {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--tertiary);
  flex-shrink: 0;
}

.feature-icon svg,
.feature-icon iconify-icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.feature-text h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--tertiary);
}

.feature-text p {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .page {
    padding: 0 24px;
  }
  .main-nav {
    display: none;
  }
  .hero-sub {
    font-size: 16px;
  }
  .features {
    gap: 28px;
    margin-top: 40px;
  }
  .left-wash {
    background: linear-gradient(
      to right,
      var(--background) 0%,
      rgba(238, 242, 255, 0.85) 55%,
      rgba(238, 242, 255, 0.4) 100%
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ============================================================
   Cases — "Кейсы"
   Large project cards with cover-image placeholders. Distinct
   from the Services grid (small cards) and the Process timeline.
   Mobile-first: single column; 3 columns ≥960px.
   ============================================================ */
.cases {
  position: relative;
  z-index: 2; /* above the fixed WebGL canvas */
  background: #ffffff; /* light (inverted) section */
  color: #111827;
}

.cases__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 72px 24px;
}

.cases__head {
  max-width: 720px;
}

.cases__title {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.03em;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.06;
  color: #111827;
}

.cases__subtitle {
  margin: 16px 0 0;
  max-width: 52ch;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.5;
  color: #4b5563;
}

.cases__grid {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 960px) {
  .cases__inner {
    padding: 112px 48px;
  }
  .cases__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 64px;
  }
}

/* ---- Card --------------------------------------------------- */
.case {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  overflow: hidden; /* clip the cover to the sharp card corners */
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.case:hover,
.case:focus-within {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
}

/* ---- Cover placeholder -------------------------------------- */
.case__cover {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
}

.case__cover--a {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
}
.case__cover--b {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
}
.case__cover--c {
  background: linear-gradient(135deg, #06b6d4 0%, #4f46e5 100%);
}

.case__cover-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Body --------------------------------------------------- */
.case__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.case__type {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.case__name {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  color: #111827;
}

.case__task {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
}

.case__tags {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.case__tags li {
  font-size: 12px;
  line-height: 1.1;
  color: #374151;
  background: #eef2ff;
  border: 1px solid rgba(199, 210, 254, 0.7);
  border-radius: var(--r-full);
  padding: 7px 12px;
}

.case__link {
  margin-top: auto; /* pin to the bottom so cards align */
  padding-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #6366f1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.case__link:hover {
  color: #4f46e5;
}

.case__arrow {
  transition: transform 0.3s var(--ease);
}

.case__link:hover .case__arrow {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .case,
  .case__arrow {
    transition: none;
  }
  .case:hover,
  .case:focus-within {
    transform: none;
  }
}

/* ============================================================
   CTA — "Расскажите про вашу идею"
   Final accent block before the footer. Dark with a soft brand
   glow; links only (no form). Mobile-first.
   ============================================================ */
.cta {
  position: relative;
  z-index: 2; /* above the fixed WebGL canvas */
  overflow: hidden;
  background: #0b0e16;
  color: #f9fafb;
}

/* soft brand glow — makes the block read as an accent */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(79, 70, 229, 0.35), transparent 70%),
    radial-gradient(55% 75% at 85% 110%, rgba(6, 182, 212, 0.22), transparent 70%);
}

.cta__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}

.cta__title {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.03em;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  color: #ffffff;
}

.cta__subtitle {
  margin: 18px auto 0;
  max-width: 52ch;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.55;
  color: #9ca3af;
}

/* ---- Actions ------------------------------------------------ */
.cta__actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* primary — brand gradient pill */
.cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(to right, var(--grad-from), var(--grad-to));
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease,
    filter 0.3s ease;
}

.cta__btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 14px 36px rgba(79, 70, 229, 0.45);
}

/* messenger icon links */
.cta__icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-full);
  color: #c7d2fe;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(199, 210, 254, 0.25);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--ease),
    border-color 0.3s ease;
}

.cta__icon:hover {
  transform: translateY(-2px);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(99, 102, 241, 0.5);
}

.cta__icon svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 769px) {
  .cta__inner {
    padding: 120px 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta__btn,
  .cta__icon {
    transition: none;
  }
  .cta__btn:hover,
  .cta__icon:hover {
    transform: none;
  }
}

/* ============================================================
   Footer — compact site footer (final element)
   Dark, in key with the site. Mobile-first: columns stack.
   ============================================================ */
.footer {
  position: relative;
  z-index: 2; /* above the fixed WebGL canvas */
  overflow: hidden; /* contain the glow / ghost layers */
  background: #0b0e16;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__inner {
  position: relative;
  z-index: 1; /* content above the spotlight layers */
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ---- cursor spotlight (glow follows pointer, reveals LUMIO) ---- */
.footer__glow {
  position: absolute;
  z-index: 0;
  left: var(--spot-x, 50%);
  top: var(--spot-y, 50%);
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(79, 70, 229, 0.32),
    rgba(6, 182, 212, 0.15),
    transparent 72%
  );
  filter: blur(30px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.footer.spot-on .footer__glow {
  opacity: 1;
}

.footer__ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  /* only the area under the cursor light stays visible */
  -webkit-mask-image: radial-gradient(
    circle 220px at var(--spot-x, 50%) var(--spot-y, 50%),
    #000 0%,
    rgba(0, 0, 0, 0.5) 45%,
    transparent 72%
  );
  mask-image: radial-gradient(
    circle 220px at var(--spot-x, 50%) var(--spot-y, 50%),
    #000 0%,
    rgba(0, 0, 0, 0.5) 45%,
    transparent 72%
  );
}
.footer.spot-on .footer__ghost {
  opacity: 0.5;
}

.footer__top {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer__logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-decoration: none;
}

.footer__tagline {
  margin: 10px 0 0;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.5;
  color: #9ca3af;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__nav a {
  font-size: 14px;
  font-weight: 500;
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer__nav a:hover {
  color: #ffffff;
}

.footer__contacts {
  display: flex;
  gap: 12px;
}

.footer__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  color: #c7d2fe;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(199, 210, 254, 0.25);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease,
    transform 0.3s var(--ease);
}

.footer__icon:hover {
  transform: translateY(-2px);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(99, 102, 241, 0.5);
}

.footer__icon svg {
  width: 20px;
  height: 20px;
}

.footer__bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
}

.footer__bottom p {
  margin: 0;
}

@media (min-width: 769px) {
  .footer__inner {
    padding: 64px 48px;
  }
  .footer__top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
  }
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer__icon {
    transition: none;
  }
  .footer__icon:hover {
    transform: none;
  }
  .footer__glow,
  .footer__ghost {
    display: none;
  }
}
