:root {
  --bg: #05070b;
  --bg-soft: #0b0f16;
  --panel: rgba(17, 23, 34, 0.78);
  --panel-border: rgba(110, 135, 177, 0.16);
  --text: #eef1f6;
  --muted: #9da7b8;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #163e73;
  --accent-hover: #1d4f92;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.32);
  --premium-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 12%, rgba(22, 62, 115, 0.2), transparent 24%),
    radial-gradient(circle at 48% 46%, rgba(238, 241, 246, 0.035), transparent 24%),
    linear-gradient(180deg, #05070b 0%, #04060a 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
}

.brand-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: var(--bg);
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 0s linear 420ms;
}

.brand-intro.is-done {
  opacity: 0;
  visibility: hidden;
}

.brand-intro img {
  width: min(44vw, 340px);
  opacity: 0;
  transform: scale(0.86);
  backface-visibility: hidden;
  filter: drop-shadow(0 26px 70px rgba(22, 62, 115, 0.48));
  animation: introLogoPulse 1350ms cubic-bezier(.2,.7,.2,1) forwards;
}

.page-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.02), transparent 25%),
    radial-gradient(circle at 78% 18%, rgba(22, 62, 115, 0.18), transparent 20%),
    radial-gradient(circle at 50% 62%, rgba(22, 62, 115, 0.12), transparent 28%);
}

.site-header,
.legal-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(5, 7, 11, 0.72);
  backdrop-filter: blur(18px);
}

.header-inner,
.legal-header-inner {
  min-height: 84px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

.brand img,
.legal-brand img {
  width: 132px;
  height: auto;
}

.header-tagline {
  justify-self: center;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.site-header.scrolled .header-tagline {
  opacity: 1;
  transform: translateY(0);
}

.nav,
.legal-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 28px;
}

.nav a,
.legal-nav a,
.footer-links-block a {
  color: var(--muted);
  font-size: 0.96rem;
}

.nav a:hover,
.nav a:focus-visible,
.legal-nav a:hover,
.legal-nav a:focus-visible,
.footer-links-block a:hover,
.footer-legal-block a:hover,
.contact-mail a:hover {
  color: var(--text);
  outline: none;
}

.brand-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 118px 38px 38px;
  isolation: isolate;
}

.center-brand {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: min(44vw, 340px);
  min-width: 230px;
  aspect-ratio: 1.5;
  transform: translate(-50%, -50%);
}

.center-brand img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 62px rgba(0, 0, 0, 0.34));
}

.brand-motto {
  position: absolute;
  top: calc(50% + 108px);
  left: 50%;
  z-index: 5;
  width: min(90vw, 620px);
  margin: 0;
  color: rgba(238, 241, 246, 0.72);
  font-size: clamp(0.95rem, 1.5vw, 1.12rem);
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
  opacity: 0;
  animation: heroCardsSwoosh 1100ms cubic-bezier(.2,.7,.2,1) 1700ms forwards;
}

.hero-links {
  position: absolute;
  top: calc(50% + 174px);
  left: 50%;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(860px, calc(100% - 56px));
  opacity: 0;
  transform: translate(-50%, 24px);
  filter: blur(10px);
  animation: heroCardsSwoosh 1250ms cubic-bezier(.2,.7,.2,1) 1880ms forwards;
}

.hero-link-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 94px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(18, 24, 35, 0.92), rgba(13, 17, 25, 0.92));
  box-shadow: var(--shadow);
  color: var(--text);
  perspective: 900px;
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.hero-link-card::before,
.service-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at 50% 0%, rgba(185, 205, 232, 0.13), transparent 34%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.hero-link-card span {
  position: relative;
  z-index: 1;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-link-card:hover,
.hero-link-card:focus-visible {
  border-color: rgba(185, 205, 232, 0.34);
  background: linear-gradient(180deg, rgba(28, 38, 55, 0.96), rgba(16, 22, 33, 0.96));
  box-shadow: 0 28px 80px rgba(22, 62, 115, 0.3);
  transform: perspective(900px) rotateX(2deg) translateY(-6px) translateZ(18px);
  outline: none;
}

.hero-link-card:hover::before,
.hero-link-card:focus-visible::before,
.service-card:hover::before,
.service-card:focus-visible::before {
  opacity: 1;
}

.section {
  scroll-margin-top: 112px;
  padding: 76px 0 84px;
  border-top: 1px solid var(--line);
}

.reveal-section {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(.2,.7,.2,1);
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 40px;
  align-items: start;
  padding: 34px 30px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(18, 24, 35, 0.9), rgba(13, 17, 25, 0.92));
  box-shadow: var(--shadow);
  transform: perspective(900px) translateZ(0);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.service-card:hover,
.service-card:focus-visible {
  border-color: rgba(185, 205, 232, 0.34);
  background: linear-gradient(180deg, rgba(28, 38, 55, 0.96), rgba(16, 22, 33, 0.96));
  box-shadow: 0 28px 80px rgba(22, 62, 115, 0.3);
  transform: perspective(900px) rotateX(2deg) translateY(-6px) translateZ(18px);
  outline: none;
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.section-kicker,
.legal-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.2rem, 4.4vw, 4.8rem);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(1.12rem, 1.6vw, 1.38rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.85;
}

.split-copy {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

.contact-section {
  display: block;
}

.contact-copy-wide {
  max-width: 760px;
}

.contact-copy p {
  margin-top: 22px;
}

.contact-mail {
  margin-top: 18px;
  font-size: 1.02rem;
}

.contact-mail a,
.legal-content a,
.footer-legal-block a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.28);
  text-underline-offset: 4px;
}

.legal-page {
  padding-top: 146px;
}

.legal-intro {
  max-width: 820px;
  margin-bottom: 44px;
}

.legal-intro h1 {
  margin-bottom: 24px;
}

.legal-content {
  display: grid;
  gap: 34px;
  max-width: 900px;
}

.legal-content section {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.legal-content p + p {
  margin-top: 14px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.035);
  padding: 28px 0 34px;
  background: rgba(2, 4, 8, 0.18);
}

.footer-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.55fr 0.6fr;
  gap: 30px;
  align-items: start;
}

.footer-logo {
  width: 96px;
  height: auto;
  margin-bottom: 12px;
  opacity: 0.68;
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-brand-block p {
  max-width: none;
  white-space: nowrap;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.72;
}

.footer-legal-block p + p {
  margin-top: 14px;
}

.footer-legal-block p,
.footer-links-block a {
  font-size: 0.82rem;
  opacity: 0.74;
}

.footer-links-block {
  display: grid;
  gap: 9px;
  justify-items: start;
}

@keyframes introLogoPulse {
  0% {
    opacity: 0;
    transform: scale(0.82);
    filter: drop-shadow(0 18px 46px rgba(22, 62, 115, 0.36));
  }
  34% {
    opacity: 1;
    transform: scale(1.08);
    filter: drop-shadow(0 30px 76px rgba(22, 62, 115, 0.54));
  }
  62% {
    opacity: 1;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 26px 70px rgba(22, 62, 115, 0.48));
  }
}

@keyframes heroCardsSwoosh {
  to {
    opacity: 1;
    transform: translate(-50%, 0);
    filter: blur(0);
  }
}

@media (max-width: 980px) {
  .container {
    width: min(100% - 32px, 1000px);
  }

  .brand-stage {
    min-height: 92vh;
    padding-top: 112px;
  }

  .center-brand {
    width: min(34vw, 280px);
    min-width: 220px;
  }

  .hero-links {
    top: calc(50% + 154px);
    width: min(760px, calc(100% - 32px));
    gap: 12px;
  }

  .service-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .legal-header-inner {
    grid-template-columns: auto 1fr;
  }

  .legal-nav {
    gap: 16px;
    flex-wrap: wrap;
  }

  .footer-brand-block {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .brand-stage {
    min-height: 86vh;
    padding: 108px 16px 26px;
  }

  .brand-intro img {
    width: min(72vw, 300px);
  }

  .center-brand {
    width: min(46vw, 210px);
    min-width: 180px;
  }

  .brand-motto {
    top: calc(50% + 78px);
    font-size: 0.86rem;
  }

  .hero-links {
    top: calc(50% + 128px);
    gap: 8px;
    width: min(100% - 24px, 420px);
  }

  .hero-link-card {
    min-height: 68px;
  }

  .hero-link-card span {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  .section {
    padding: 52px 0 60px;
  }

  h1 {
    font-size: clamp(2.15rem, 10vw, 3.35rem);
    line-height: 1.18;
    letter-spacing: -0.04em;
  }

  .header-inner,
  .legal-header-inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 0 14px;
  }

  .brand img,
  .legal-brand img {
    width: 112px;
  }

  .nav,
  .legal-nav {
    justify-content: flex-start;
  }

  .header-tagline {
    display: none;
  }

  .footer-brand-block p {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .brand-intro {
    display: none;
  }

  .center-brand {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  .brand-motto,
  .hero-links,
  .reveal-section {
    opacity: 1;
    filter: none;
  }

  .brand-motto,
  .hero-links {
    transform: translate(-50%, 0);
  }
}
