/* === Fonts === */

@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-style: normal;
  src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "GT-Alpina";
  font-weight: 400;
  font-style: normal;
  src: url("/fonts/GT-Alpina-Standard-Medium.woff2") format("woff2");
  font-display: swap;
}

/* === Reset === */

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

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

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid #02588F;
  outline-offset: 2px;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* === Base === */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: #fff;
  color: #000;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "GT-Alpina", Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.125rem;
}

/* === Layout === */

main {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
}

/* === Header === */

.header {
  display: flex;
  padding: 2rem 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
}

.header nav {
  display: flex;
  align-items: center;
  width: 100%;
}

.header .logo {
  transition: opacity 0.2s;
}

.header .logo:hover {
  opacity: 0.6;
}

.header .logo svg {
  height: 1.25rem;
  width: auto;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  margin-left: auto;
}

.nav-link {
  display: block;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background-color: #f3f4f6;
}

.nav-link-cta {
  border: 1px solid #000;
  text-align: center;
}

.hamburger {
  display: block;
  padding: 0.5rem;
  margin-left: auto;
}

.hamburger svg {
  width: 1rem;
  height: 1rem;
}

/* === Drawer (mobile menu) === */

/* Native <dialog>. Opens and closes with invoker commands (commandfor) in HTML.
   The close animation needs transition-behavior: allow-discrete. Browsers without it close instantly. */
#drawer {
  margin: 0 0 0 auto;
  width: 75%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  background: #fff;
  color: inherit;
  overflow: auto;
  transform: translateX(100%);
  transition:
    transform 0.2s ease-in-out,
    overlay 0.2s ease-in-out allow-discrete,
    display 0.2s ease-in-out allow-discrete;
}

#drawer[open] {
  display: flex;
  flex-direction: column;
  transform: none;
}

#drawer::backdrop {
  background: rgb(0 0 0 / 0);
  transition:
    background-color 0.2s ease-in-out,
    overlay 0.2s ease-in-out allow-discrete,
    display 0.2s ease-in-out allow-discrete;
}

#drawer[open]::backdrop {
  background: rgb(0 0 0 / 0.5);
}

@starting-style {
  #drawer[open] {
    transform: translateX(100%);
  }

  #drawer[open]::backdrop {
    background: rgb(0 0 0 / 0);
  }
}

body:has(#drawer[open]) {
  overflow: hidden;
}

.drawer-close {
  padding: 2rem 1.5rem;
  margin-left: auto;
}

.drawer-close svg {
  width: 1rem;
  height: 1rem;
}

.drawer-nav {
  padding: 0 1.5rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* === Hero === */

.hero {
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* Two soft shadows drift behind the hero text. A radial gradient draws them the
   same in all browsers; a large filter: blur() looked much darker in Firefox.
   Each glow is centred on its left/top anchor with translate, so it stays in
   place when reduced motion stops the animation. The animation adds the drift.
   --bar-h is the height of the original blurred bar. The drift path and the glow
   size and strength follow it. */
.hero {
  --bar-h: 50px;
  --glow-alpha: 0.11;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 1100px;
  height: calc(var(--bar-h) + 620px);
  background: radial-gradient(
    closest-side,
    rgb(0 0 0 / var(--glow-alpha)),
    rgb(0 0 0 / calc(var(--glow-alpha) * 0.6)) 37%,
    rgb(0 0 0 / calc(var(--glow-alpha) * 0.14)) 75%,
    transparent
  );
  translate: -50% -50%;
  animation: heroDrift 30s linear infinite;
  pointer-events: none;
}

.hero::before {
  top: 60%;
  left: 0%;
}

.hero::after {
  top: 40%;
  left: 100%;
  animation-delay: -15s;
}

.hero-text {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: slideInUp 0.5s ease-in-out;
}

.hero-text h1 {
  max-width: 42rem;
  margin-bottom: 0;
}

.hero-text p {
  font-weight: 600;
}

/* === Sections === */

.layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 3rem 0;
}

.split {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.column {
  width: 100%;
}

.column img {
  width: 100%;
}

/* On mobile, image columns show first */
.split .column--image {
  order: -1;
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-wrap: pretty;
}

.prose a:hover {
  text-decoration: underline;
}

/* === Lists === */

.service-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Each term + description pair shows as one bulleted line: "Term: description" */
.service-list > div {
  display: list-item;
  list-style-type: square;
  list-style-position: inside;
}

.service-list dt,
.service-list dd {
  display: inline;
}

.service-list dt {
  font-weight: 600;
}

.service-list dt::after {
  content: ": ";
}

.privacy-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* === Contact === */

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info-row {
  display: flex;
  gap: 0.75rem;
}

.contact-info-row svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 3px;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.team-title {
  text-align: center;
  margin-bottom: 4rem;
}

.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.person-img {
  width: 12rem;
  height: 12rem;
  border-radius: 9999px;
  object-fit: cover;
  margin-bottom: 1rem;
}

.person-name {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  text-wrap: wrap;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.person-details {
  font-size: 0.875rem;
}

.person-title {
  margin-bottom: 0.5rem;
}

.person-contact {
  color: #4b5563;
}

.person-contact summary {
  cursor: pointer;
  list-style: none;
}

.person-contact summary::-webkit-details-marker {
  display: none;
}

.person-contact summary:hover,
.person-contact a:hover {
  text-decoration: underline;
}

.person-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* === Narrow page (privacy, 404) === */

.narrow {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 3rem 0;
  max-width: 65ch;
  margin: 0 auto;
}

.narrow .last-updated {
  font-size: 0.875rem;
}

.narrow h1 {
  margin-bottom: 0;
}

.narrow > header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* === Footer === */

.footer {
  padding: 3rem 0;
  font-size: 0.875rem;
  background-color: #f9fafb;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
}

.footer a:hover {
  text-decoration: underline;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* === Utilities === */

strong {
  font-weight: 600;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  background: #000;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.25rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* === Animations === */

@keyframes slideInUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Moves the glow centre along the path of the original 500px bar */
@keyframes heroDrift {
  0%, 100% { transform: translate(100px, calc(var(--bar-h) * -0.1)); }
  25%      { transform: translate(100px, calc(var(--bar-h) * -0.2)); }
  50%      { transform: translate(150px, calc(var(--bar-h) * -0.1)); }
  75%      { transform: translate(-100px, calc(var(--bar-h) * 0.2)); }
}

/* === Responsive === */

@media (min-width: 640px) {
  main {
    padding-left: 4rem;
    padding-right: 4rem;
  }

  .header {
    padding: 2rem 4rem;
  }

  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }

  .nav-links {
    display: flex;
  }

  .hamburger {
    display: none;
  }

  .hero {
    height: 600px;
  }

  .hero {
    --bar-h: 100px;
    --glow-alpha: 0.22;
  }

  .layout {
    gap: 6rem;
    padding: 6rem 0;
  }

  .split {
    flex-direction: row;
    gap: 4rem;
  }

  .column {
    width: 50%;
  }

  .split .column--image {
    order: 0;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .person {
    align-items: flex-start;
    text-align: left;
  }

  .narrow {
    padding: 6rem 0;
  }

  .footer {
    padding: 6rem 0;
  }

  .footer-inner {
    padding: 0 4rem;
  }
}

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::backdrop {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
