:root {
  --navy: #1B3252;
  --heading: #1B3252;
  --orange: #FF7A52;
  --orange-ink: #C8401C;
  --paper: #FFFFFF;
  --mist: #EEF2F7;
  --ink: #14202E;
  --muted: #56627A;
  --line: #D5DCE6;
  --field: #FFFFFF;
  color-scheme: light;
  box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --heading: #9DB6DA;
    --orange-ink: #FF8E6B;
    --paper: #0F1826;
    --mist: #172338;
    --ink: #E8EEF7;
    --muted: #A3B0C4;
    --line: #2B3A52;
    --field: #132036;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --heading: #9DB6DA;
  --orange-ink: #FF8E6B;
  --paper: #0F1826;
  --mist: #172338;
  --ink: #E8EEF7;
  --muted: #A3B0C4;
  --line: #2B3A52;
  --field: #132036;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: inherit; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  scrollbar-color: var(--muted) var(--paper);
}
body {
  margin: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--orange-ink); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--orange-ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--navy); color: #FFFFFF; }
h1, h2, h3, p, a, label { overflow-wrap: anywhere; }
h2, h3, .sub { text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { max-width: 68rem; margin-inline: auto; padding-inline: 1.25rem; }
.skip-link {
  position: absolute;
  inset-inline-start: 1.25rem;
  top: -6rem;
  z-index: 2;
  background: var(--paper);
  padding: .7rem 1rem;
}
.skip-link:focus { top: 1rem; }
main:focus, section:focus { outline-offset: .35rem; }

.top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-block: 1rem; }
.logo { display: inline-flex; flex: 0 1 22rem; min-width: 0; background: #FFFFFF; padding: .2rem .3rem; border-radius: 4px; }
.logo img { width: 100%; height: auto; }
.lang { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button {
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: .35rem .7rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--heading); color: var(--paper); }
.lang button:focus-visible { outline-offset: -4px; }
.project-nav { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1.25rem; row-gap: .15rem; padding-block: .25rem 1rem; }
.nav-label { color: var(--muted); font-size: .875rem; }
.project-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding-block: .4rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .9375rem;
  text-decoration: none;
}
.project-link:hover { color: var(--heading); text-decoration: underline; }
.project-link[aria-current="page"] { color: var(--heading); font-weight: 600; border-bottom-color: var(--orange-ink); }

.hero {
  display: block;
  padding: 2rem 1.25rem 2.5rem;
  border-top: 4px solid var(--orange);
  background: var(--navy);
  color: #FFFFFF;
}
.hero-copy { max-width: 65ch; min-width: 0; }
.eyebrow { margin: 0 0 .8rem; color: #D5DCE6; font-size: .875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.25rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.08; letter-spacing: -.025em; }
.hero h1 { color: var(--orange); }
.sub { margin: .8rem 0 1.2rem; font-size: clamp(1.15rem, 3.2vw, 1.45rem); font-weight: 600; line-height: 1.4; }
.lede { max-width: 65ch; margin: 0 0 1.8rem; color: #D5DCE6; }
.btn {
  display: inline-block;
  max-width: 100%;
  min-height: 44px;
  padding: .85rem 1.4rem;
  border: 0;
  border-radius: 12px;
  background: var(--orange);
  color: #1A0F0A;
  font: inherit;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--heading); color: var(--paper); }
.hero .btn:hover { background: #FFFFFF; color: var(--navy); }
.hero .btn:focus-visible { outline-color: #FFFFFF; }
.btn:disabled { opacity: .65; cursor: progress; }
.poster { min-width: 0; margin: 2rem 0 3rem; }
.poster > img { width: 100%; height: auto; background: #FFFFFF; }
.cap { margin-top: .75rem; color: var(--muted); font-size: .9rem; }
section { padding-block: 3rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
h2 { margin: 0 0 .4rem; color: var(--heading); font-size: clamp(1.5rem, 4vw, 1.875rem); font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
.sec-lede { max-width: 65ch; margin: 0 0 1.6rem; color: var(--muted); }

.project-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 3rem; }
.project-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--mist); overflow: hidden; }
.project-image { display: block; background: #FFFFFF; }
.project-image img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.project-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; min-width: 0; padding: 1.25rem; }
.project-copy h2 { font-size: 1.5rem; }
.project-copy p { margin: .5rem 0 1rem; color: var(--muted); }
.project-cta { display: inline-flex; align-items: center; min-height: 44px; margin-top: auto; font-weight: 600; }

form { display: grid; gap: 1rem; max-width: 40rem; }
.row2 { display: grid; gap: 1rem; }
.row2 > *, form > * { min-width: 0; }
label { display: grid; gap: .35rem; font-weight: 500; font-size: 1rem; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .7rem .8rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  caret-color: var(--orange-ink);
}
textarea { min-height: 7rem; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { flex: none; width: 1.25rem; height: 1.25rem; min-height: 0; margin: .2rem 0 0; padding: 0; accent-color: var(--orange-ink); }
[aria-invalid="true"] { border-color: var(--orange-ink); }
.field-error { margin: 0; color: var(--orange-ink); font-size: .9rem; font-weight: 400; }
.field-error:empty, #submission-status:empty { display: none; }
#send { justify-self: start; }
#submission-status { max-width: 40rem; color: var(--muted); font-size: .9rem; }
.submit-error { max-width: 40rem; color: var(--orange-ink); }
.done { max-width: 40rem; margin-top: 1.5rem; padding: 1rem 1.1rem; border-radius: 14px; background: var(--mist); }
.done p { margin: 0; }
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 2rem 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 399px) {
  .wrap { padding-inline: 1rem; }
  .nav-label { flex-basis: 100%; }
  .project-nav { column-gap: 1rem; }
}
@media (min-width: 640px) {
  .row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero { padding: 2.5rem 2rem 3rem; }
  .project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .project-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
