/* Brand configuration. Visby CF is not supplied/licensed for this project yet.
   Add its licensed @font-face here, then set --font-display to "Visby CF".
   Poppins is the explicit temporary display fallback. */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/poppins-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/poppins-latin-medium.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --navy: #273a6a;
  --blue: #0578ff;
  --white: #ffffff;
  --grey: #e0e0e0;
  --text-secondary: #e0e0e0;
  --text-quiet: #d0d8e8;
  --font-body: "Poppins", sans-serif;
  --font-display: var(--font-body);
  --page-gutter: clamp(1.5rem, 5.55vw, 7rem);
  --header-top: clamp(2rem, 4.8vh, 3.5rem);
  --footer-bottom: clamp(1.75rem, 4.2vh, 3rem);
  --logo-width: 15rem;
  --heading-size: clamp(3rem, 5.28vw, 5rem);
  --body-size: 1.25rem;
  --nav-size: 1rem;
  --email-size: 1.125rem;
  --footer-size: 0.875rem;
  --copy-width: 37rem;
  --grid-spacing: 2rem;
  --grid-stroke: 1px;
  --grid-angle: -15deg;
  --grid-alpha: 0.34;
}

* { box-sizing: border-box; }

html { background: var(--navy); }

body {
  margin: 0;
  position: relative;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

/* Only this inert decoration is clipped. All content remains in normal flow.
   Perpendicular angled gradients cover any page height without rotated corners. */
.grid-decoration {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(155deg, #000 0%, rgb(0 0 0 / 0.7) 20%, transparent 61%);
  -webkit-mask-image: linear-gradient(155deg, #000 0%, rgb(0 0 0 / 0.7) 20%, transparent 61%);
}

.grid-decoration::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(var(--grid-angle), var(--blue) 0 var(--grid-stroke), transparent var(--grid-stroke) var(--grid-spacing)),
    repeating-linear-gradient(calc(var(--grid-angle) + 90deg), var(--blue) 0 var(--grid-stroke), transparent var(--grid-stroke) var(--grid-spacing));
  opacity: var(--grid-alpha);
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(4.5rem, 1.65fr) auto minmax(3.5rem, 0.8fr) auto;
  padding: var(--header-top) var(--page-gutter) var(--footer-bottom);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: block;
  width: var(--logo-width);
  max-width: 100%;
  height: auto;
}

nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2.5rem; row-gap: 0.25rem; }

a {
  color: var(--white);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  font-size: var(--nav-size);
}

nav a:hover { text-decoration: underline; }

a:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 6px;
  border-radius: 1px;
}

main { grid-row: 3; min-width: 0; }

h1 {
  max-width: 65rem;
  margin: 0 0 1.7rem;
  font-family: var(--font-display);
  font-size: var(--heading-size);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

p { margin: 0; }

.description {
  max-width: var(--copy-width);
  color: var(--text-secondary);
  font-size: var(--body-size);
  line-height: 1.65;
  text-wrap: pretty;
}

.email {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 100%;
  min-height: 2.75rem;
  margin-top: 2rem;
  text-decoration: none;
  font-size: var(--email-size);
}

.email-address {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(255 255 255 / 0.7);
  text-underline-offset: 0.35em;
}

.email:hover .email-address { text-decoration-color: var(--white); }
.link-arrow { flex-shrink: 0; font-size: 1.25em; line-height: 1; }

footer {
  grid-row: 5;
  color: var(--text-quiet);
  font-size: var(--footer-size);
  letter-spacing: 0.015em;
}

footer span { margin-inline: 0.3em; }

::selection { background: var(--white); color: var(--navy); }

@media (max-width: 48rem) {
  :root {
    --logo-width: 11.5rem;
    --heading-size: clamp(2.375rem, 6.3vw, 3rem);
    --body-size: 1.125rem;
    --grid-spacing: 1.875rem;
    --grid-alpha: 0.3;
  }
  .page { grid-template-rows: auto minmax(5.5rem, 1.4fr) auto minmax(4rem, 0.85fr) auto; }
  .site-header { gap: 1rem; }
  nav { gap: 1.5rem; }
  .grid-decoration {
    mask-image: linear-gradient(155deg, #000 0%, rgb(0 0 0 / 0.65) 15%, transparent 52%);
    -webkit-mask-image: linear-gradient(155deg, #000 0%, rgb(0 0 0 / 0.65) 15%, transparent 52%);
  }
}

@media (max-width: 34rem) {
  :root { --logo-width: 9rem; --nav-size: 0.9375rem; }
  .site-header { gap: 0.75rem; flex-wrap: wrap; }
  nav { gap: 1.125rem; }
  h1 { margin-bottom: 1.5rem; line-height: 1.18; }
}

@media (max-width: 22rem) {
  :root { --page-gutter: 1.25rem; --logo-width: 7.5rem; --nav-size: 0.875rem; }
  nav { gap: 0.875rem; }
}

/* The complete design is static, including when reduced motion is requested. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
