@import url("./tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

h1,
h2,
h3 {
  color: var(--brand);
  line-height: 1.08;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.045em;
}

h3 {
  letter-spacing: -0.018em;
}

:focus-visible {
  outline: 3px solid rgba(47, 107, 138, 0.38);
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(calc(100% - 2rem), var(--container-narrow));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-section);
}

.surface {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  content: "";
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--white);
  font-weight: 750;
}

.skip-link:focus {
  transform: translateY(0);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

a.button:hover {
  transform: translateY(-2px);
  border-color: #b9c5cc;
}

.button--primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--white);
}

a.button--primary:hover {
  border-color: var(--brand-light);
  background: var(--brand-light);
}

.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  background: var(--surface-soft);
  color: #475965;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.2;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.6rem);
}

.section-heading h2 {
  max-width: 780px;
  margin-bottom: 0;
}

.section-heading .eyebrow {
  margin-bottom: 0.75rem;
}

.section-heading .lead {
  max-width: 530px;
  margin-bottom: 0.2rem;
  color: var(--muted);
}

/* NAVBAR */
.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(14px);
}

.nav-row {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.header-actions,
.desktop-nav {
  display: flex;
  align-items: center;
}

.brand {
  flex: 0 0 auto;
  color: var(--brand);
}

.brand-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-block: 0.05rem;
  font-family: var(--font-sans);
  font-size: 1.3125rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.84;
  white-space: nowrap;
}

.brand-name span {
  display: block;
}

.brand-last-name {
  margin-left: 2.387em;
}

.desktop-nav {
  gap: clamp(0.8rem, 2vw, 1.45rem);
  color: #51606c;
  font-size: 0.88rem;
  font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 150ms ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--accent);
}

.header-actions {
  gap: 0.65rem;
}

.language-switch {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 0.4rem;
  padding-inline: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.language-switch a {
  display: grid;
  min-width: 1.35rem;
  min-height: 2rem;
  place-items: center;
}

.language-switch a[aria-current="page"] {
  color: var(--brand);
}

.language-switch a:hover {
  color: var(--accent);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--brand);
}

.mobile-menu {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-nav {
  display: grid;
  gap: 0.15rem;
  padding-block: 0.75rem 1rem;
}

.mobile-nav a {
  padding: 0.72rem 0.2rem;
  color: var(--brand);
  font-weight: 750;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner,
.footer-side,
.social-links {
  display: flex;
  align-items: center;
}

.footer-inner {
  min-height: 128px;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}

.footer-brand {
  color: var(--brand);
  font-weight: 850;
}

.site-footer p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Shared closing identity footer */
.site-footer--identity .footer-identity {
  display: grid;
  min-height: 128px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: 1.5rem;
}

.footer-identity-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-wordmark {
  display: inline-flex;
  color: var(--brand);
}

.footer-wordmark:hover {
  color: #173b50;
}

.site-footer--identity .footer-meta {
  margin: 0;
  color: #74838c;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.015em;
  line-height: 1.4;
}

.footer-meta time {
  white-space: nowrap;
}

.footer-identity-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-footer--identity .social-links a {
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.site-footer--identity .social-links a:hover {
  transform: translateY(-1px);
  border-color: #b9c8d0;
  background: #fbfcfd;
}

.site-footer--identity .footer-copyright {
  margin: 0;
  color: #7a8992;
  font-size: 0.72rem;
  line-height: 1.4;
}

.not-found {
  display: grid;
  min-height: calc(100vh - 197px);
  place-content: center;
  padding-block: 4rem;
  text-align: center;
}

.not-found strong {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.not-found h1 {
  max-width: 720px;
  margin: 0.8rem auto 1rem;
  font-size: clamp(3rem, 9vw, 6rem);
  letter-spacing: -0.06em;
}

.not-found p {
  max-width: 520px;
  margin-inline: auto;
  color: var(--muted);
}

.not-found .button {
  margin-top: 1rem;
}

.footer-side {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.social-links {
  gap: 0.45rem;
}

.social-links a {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--brand);
}

.social-links svg {
  width: 17px;
  fill: currentColor;
}

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

  .menu-button {
    display: block;
  }
}

@media (max-width: 760px) {
  .section-heading {
    display: block;
    margin-bottom: 1.55rem;
  }

  .section-heading .lead {
    margin-top: 0.85rem;
    margin-bottom: 0;
    font-size: 0.94rem;
    line-height: 1.65;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 4.5rem;
  }

  body {
    font-size: 0.96rem;
    line-height: 1.62;
  }

  .container,
  .container--narrow {
    width: min(calc(100% - 1.25rem), var(--container));
  }

  .section {
    padding-block: clamp(3.75rem, 15vw, 4.75rem);
  }

  .surface {
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(17, 42, 58, 0.045);
  }

  h2 {
    font-size: clamp(2rem, 10.5vw, 2.75rem);
    line-height: 1.02;
  }

  .section-heading .eyebrow {
    margin-bottom: 0.65rem;
    font-size: 0.69rem;
  }

  .nav-row {
    min-height: 60px;
    gap: 0.55rem;
  }

  .brand-name {
    font-size: 1.1875rem;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .menu-button {
    width: 40px;
    height: 40px;
  }

  .mobile-menu {
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
  }

  .mobile-nav {
    gap: 0;
    padding-block: 0.45rem 0.8rem;
  }

  .mobile-nav a {
    display: flex;
    min-height: 50px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    font-size: 0.94rem;
  }

  .mobile-nav a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .footer-inner {
    display: grid;
    min-height: 0;
    gap: 1.25rem;
    padding-block: 1.6rem;
  }

  .footer-side {
    align-items: flex-start;
  }

  .social-links a {
    width: 38px;
    height: 38px;
  }

  .site-footer--identity .footer-identity {
    min-height: 0;
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    gap: 0.95rem;
    padding-block: 1.3rem;
    text-align: center;
  }

  .site-footer--identity .footer-wordmark {
    display: none;
  }

  .site-footer--identity .footer-meta {
    font-size: 0.7rem;
  }

  .footer-identity-main,
  .footer-identity-side {
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    gap: 0.65rem;
  }

  .site-footer--identity .social-links {
    justify-content: center;
  }
}

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

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