/* Custavaris – custavaris.com */

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --navy: #0B1F3A;
  --blue: #2F6FED;
  --white: #FFFFFF;
  --grey: #F4F6F9;
  --text: #1B2433;
  --muted: #5B6778;

  --bg: var(--white);
  --bg-alt: var(--grey);
  --fg: var(--text);
  --fg-muted: var(--muted);
  --heading: var(--navy);
  --link: var(--blue);
  --link-hover: var(--navy);
  --rule: #DDE2E9;
  --accent: var(--blue);
  --field-bg: var(--white);
  --field-border: #8A95A5;
  --button-bg: var(--navy);
  --button-fg: var(--white);
  --button-hover: #16345F;
  --focus: var(--blue);

  --font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --gutter: 16px;
  --wide: 1120px;
  --text-w: 720px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1F3A;
    --bg-alt: #081830;
    --fg: #E4E9F0;
    --fg-muted: #A9B5C6;
    --heading: #FFFFFF;
    --link: #93B4F8;
    --link-hover: #FFFFFF;
    --rule: #22385A;
    --accent: #5B8EF2;
    --field-bg: #0F2747;
    --field-border: #6F82A0;
    --button-bg: #FFFFFF;
    --button-fg: #0B1F3A;
    --button-hover: #DCE6FA;
    --focus: #93B4F8;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  font-optical-sizing: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

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

/* Links and focus */

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

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--button-bg);
  color: var(--button-fg);
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Layout */

.wrap {
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

@media (min-width: 1100px) {
  :root { --gutter: 48px; }
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: block;
  width: 160px;
  flex: none;
}

.brand img {
  width: 100%;
}

@media (min-width: 720px) {
  .brand { width: 220px; }
  .site-header .wrap { padding-top: 30px; padding-bottom: 30px; }
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 6px 0;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--heading);
  border-bottom-color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--heading);
  border-bottom-color: var(--accent);
}

@media (max-width: 419px) {
  .site-nav { width: 100%; }
  .site-nav ul { gap: 4px 20px; }
}

/* Type */

h1,
h2,
h3 {
  margin: 0;
  color: var(--heading);
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.25;
}

h1 {
  font-size: clamp(26px, 5.6vw, 44px);
  letter-spacing: 0.06em;
  line-height: 1.18;
  max-width: 20ch;
}

h2 {
  font-size: 14px;
  letter-spacing: 0.16em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--fg);
  max-width: 40em;
}

@media (min-width: 720px) {
  .lead { font-size: 21px; }
}

/* Hero */

.hero {
  padding: 64px 0 64px;
}

@media (min-width: 720px) {
  .hero { padding: 112px 0 104px; }
}

.marker {
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 28px;
  border: 2px solid var(--heading);
  position: relative;
}

.marker::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--accent);
}

.hero h1 {
  margin-bottom: 28px;
}

/* Sections */

.section {
  border-top: 1px solid var(--rule);
  padding: 48px 0;
}

@media (min-width: 720px) {
  .section { padding: 72px 0; }
}

.section .wrap {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .section .wrap {
    grid-template-columns: 240px minmax(0, var(--text-w));
    gap: 48px;
  }
  .section h2 {
    padding-top: 6px;
  }
}

.section-body {
  max-width: var(--text-w);
}

/* Definition list */

.facts {
  margin: 0;
  display: grid;
  gap: 18px;
}

.facts div {
  display: grid;
  gap: 2px;
}

@media (min-width: 600px) {
  .facts div {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
  }
}

.facts dt {
  color: var(--fg-muted);
  font-size: 15px;
  font-weight: 500;
  padding-top: 1px;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Form */

.contact-intro {
  margin-bottom: 28px;
}

.field {
  margin: 0 0 20px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 17px;
  color: var(--fg);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 2px;
}

.field textarea {
  resize: vertical;
  min-height: 9em;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.button {
  display: inline-block;
  padding: 13px 26px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--button-fg);
  background: var(--button-bg);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.button:hover {
  background: var(--button-hover);
}

.form-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--fg-muted);
}

/* Simple pages */

.page {
  padding: 56px 0 72px;
}

@media (min-width: 720px) {
  .page { padding: 96px 0 112px; }
}

.page .wrap > * {
  max-width: var(--text-w);
}

.page h1 {
  margin-bottom: 36px;
}

.page h2 {
  margin: 44px 0 14px;
}

.page h1 + h2 {
  margin-top: 0;
}

/* Footer */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--fg-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--fg);
}

.site-footer a:hover {
  color: var(--heading);
}
