/*
  Shared page shell for navigation, glass panels, and footer.
  Loaded after page-specific CSS so common surfaces stay visually consistent.
*/
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-pill: 999px;
  --shadow-soft: 0 28px 60px rgba(2, 6, 16, 0.34);
  --shadow-card: 0 18px 38px rgba(2, 6, 16, 0.24);
  --section-pad: clamp(1.85rem, 3vw, 3rem);
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sub: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shell-glass-border: rgba(255, 255, 255, 0.06);
  --shell-glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  --shell-bar-bg: rgba(10, 8, 15, 0.9);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(209, 92, 255, 0.2), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(255, 79, 181, 0.12), transparent 22%),
    radial-gradient(circle at 72% 56%, rgba(255, 152, 40, 0.1), transparent 22%),
    linear-gradient(180deg, #16191f 0%, #0f1218 42%, #06040c 100%);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  font-weight: 400;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px),
    radial-gradient(circle at 75% 30%, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px),
    radial-gradient(circle at 55% 75%, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px);
  background-size: 260px 260px, 320px 320px, 280px 280px;
  opacity: 0.45;
}

body::after {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.015), transparent),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.01), transparent);
  mix-blend-mode: screen;
  opacity: 0.45;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(255, 152, 40, 0.9);
  outline-offset: 2px;
}

.container {
  width: min(92%, 1180px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--shell-bar-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

nav > .container {
  width: min(92%, 1180px);
}

.nav-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  min-width: 0;
  justify-self: start;
}

.nav-icon {
  width: clamp(140px, 15vw, 210px);
  height: 72px;
  object-fit: contain;
  object-position: left center;
  display: block;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav-links {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.nav-actions-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.nav-menu {
  display: contents;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(2, 6, 16, 0.14);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 79, 181, 0.24);
}

.nav-toggle span {
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

nav.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

nav.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

nav.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-sub);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}

.lang-switch a.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 79, 181, 0.82), rgba(255, 152, 40, 0.82));
  box-shadow: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: var(--font-sub);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  transform: translateY(-1px);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 79, 181, 0.24);
  box-shadow: 0 10px 24px rgba(255, 79, 181, 0.12);
}

section > .container,
.contact-bg > .container,
.hero-card,
.legal-card {
  padding: clamp(1.9rem, 3vw, 2.65rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--shell-glass-border);
  background: var(--shell-glass-bg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.contact-bg > .container {
  padding-block: clamp(1.25rem, 2vw, 1.75rem);
}

footer {
  margin-top: clamp(0.45rem, 1.2vw, 0.85rem);
  padding: clamp(1.05rem, 2vw, 1.45rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--shell-bar-bg);
  backdrop-filter: blur(18px);
}

.footer-top {
  display: grid;
  grid-template-columns: auto minmax(15rem, 24rem) minmax(18rem, max-content);
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
  gap: clamp(1rem, 2.6vw, 2.6rem);
  text-align: left;
}

.footer-brand {
  min-width: 0;
  max-width: 29rem;
  display: contents;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0;
  text-decoration: none;
  flex: 0 0 auto;
  align-self: start;
}

.footer-wordmark-img {
  width: clamp(138px, 14vw, 190px);
  height: auto;
  display: block;
}

.footer-text {
  min-width: 0;
  width: 100%;
  max-width: 24rem;
  display: grid;
  gap: 0.55rem;
  align-content: center;
}

.footer-copy {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 24rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.footer-legal {
  width: 100%;
  color: rgba(245, 239, 255, 0.62);
  font-size: 0.74rem;
  line-height: 1.55;
  margin-top: 0;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.footer-social-label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  color: var(--text);
}

.footer-social-link svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.footer-cols {
  width: auto;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0.55rem clamp(1.4rem, 3vw, 2.4rem);
  justify-content: start;
  justify-self: end;
  align-self: center;
  align-items: start;
}

.footer-link-col {
  min-width: 0;
  display: contents;
}

.footer-link-col a,
.footer-link-col .cookie-link-btn {
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
  text-align: left;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cookie-link-btn {
  border: none;
  background: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-link-col a:hover,
.footer-link-col a:focus-visible,
.footer-link-col .cookie-link-btn:hover,
.footer-link-col .cookie-link-btn:focus-visible,
.cookie-link-btn:hover,
.cookie-link-btn:focus-visible {
  color: var(--text);
}

@media (max-width: 760px) {
  nav .container {
    width: min(calc(100% - 1rem), 1180px);
  }

  .nav-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: stretch;
    gap: 0.75rem;
    padding: 0.65rem 0;
  }

  .nav-brand {
    justify-self: start;
  }

  .nav-icon {
    width: clamp(132px, 42vw, 170px);
    height: 58px;
  }

  .nav-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .nav-menu {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    padding: 0.85rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
      radial-gradient(circle at top left, rgba(255, 79, 181, 0.10), transparent 34%),
      radial-gradient(circle at 92% 8%, rgba(255, 152, 40, 0.08), transparent 28%),
      rgba(10, 8, 15, 0.96);
    box-shadow: 0 20px 42px rgba(2, 6, 16, 0.28);
    backdrop-filter: blur(18px);
  }

  nav.nav-open .nav-menu {
    display: grid;
    gap: 0.75rem;
  }

  .nav-links {
    display: grid;
    width: 100%;
    justify-content: stretch;
    gap: 0.45rem;
  }

  .nav-links a {
    width: 100%;
  }

  .nav-actions-group {
    width: 100%;
    justify-content: center;
    justify-self: stretch;
  }

  .lang-switch {
    width: 100%;
  }

  .lang-switch a {
    flex: 1;
  }

  .footer-top {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    justify-items: center;
    gap: 0.85rem;
    text-align: center;
  }

  footer {
    padding-top: 0.65rem;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .footer-logo {
    width: 100%;
    justify-content: center;
    justify-self: center;
    align-self: center;
  }

  .footer-logo picture {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .footer-wordmark-img {
    margin-inline: auto;
  }

  .footer-text {
    width: min(100%, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    justify-items: center;
    text-align: center;
  }

  .footer-copy {
    width: min(100%, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    align-items: center;
  }

  .footer-copy p,
  .footer-legal {
    width: min(100%, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    white-space: normal;
  }

  .footer-copy p {
    width: min(19rem, calc(100vw - 2rem));
    max-width: min(19rem, calc(100vw - 2rem));
  }

  .footer-brand p,
  .footer-legal {
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-cols {
    grid-area: auto;
    width: min(100%, 24rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    justify-self: center;
    gap: 0.65rem 0.75rem;
    text-align: center;
  }

  .footer-link-col {
    display: grid;
    gap: 0.55rem;
    justify-items: center;
  }

  .footer-link-col a,
  .footer-link-col .cookie-link-btn {
    display: block;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 540px) {
  .nav-menu {
    padding: 0.75rem;
    border-radius: 20px;
  }

  .nav-links {
    gap: 0.35rem;
  }

  .nav-links a {
    min-height: 38px;
    padding: 0.42rem 0.72rem;
    font-size: 0.62rem;
  }

  .nav-actions-group {
    width: 100%;
    justify-content: center;
  }

  section > .container,
  .contact-bg > .container,
  .hero-card,
  .legal-card {
    padding: 1.75rem;
  }

  .nav-icon {
    width: 148px;
    height: 58px;
  }

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