:root {
  --bg: #f3f0ea;
  --bg2: #e7ebe8;
  --sf: rgba(255, 252, 247, 0.92);
  --ink: #101828;
  --mut: #4d5a6a;
  --ln: rgba(16, 24, 40, 0.12);
  --teal: #0f7a6e;
  --coral: #d4533c;
  --sand: #d9c4a3;
  --glow: rgba(15, 122, 110, 0.18);
  --radius: 2px;
  --max: 1120px;
  --font-d: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  --font-b: "Literata", "Iowan Old Style", Georgia, serif;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 17px/1.7 var(--font-b);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(15, 122, 110, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 15%, rgba(212, 83, 60, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 35% at 70% 90%, rgba(217, 196, 163, 0.35), transparent 55%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg2) 55%, #ebe4d8 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 30%, transparent 0 38%, rgba(16, 24, 40, 0.03) 39% 40%, transparent 41%),
    radial-gradient(circle at 80% 70%, transparent 0 28%, rgba(15, 122, 110, 0.04) 29% 30%, transparent 31%);
}

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

a { color: var(--teal); text-underline-offset: 0.18em }
a:hover { color: var(--coral) }

h1, h2, h3, .brand-name {
  font-family: var(--font-d);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.55em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem) }
h2 { font-size: clamp(1.45rem, 3vw, 2rem) }
h3 { font-size: 1.2rem }

p { margin: 0 0 1em }
.lead { color: var(--mut); font-size: 1.08rem; max-width: 62ch }

.w {
  width: min(100% - 2.4rem, var(--max));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(243, 240, 234, 0.82);
  border-bottom: 1px solid var(--ln);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  flex-wrap: nowrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.logo img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 20px var(--glow);
}

.brand-name {
  font-size: 1.35rem;
  margin: 0;
  letter-spacing: -0.03em;
}

.brand-name span { color: var(--teal) }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ln);
  background: var(--sf);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
  z-index: 60;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
}

nav[aria-label="Principal"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-family: var(--font-d);
  font-size: 0.92rem;
  font-weight: 600;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}

nav a[aria-current="page"],
nav a:hover { border-color: var(--coral); color: var(--ink) }

body.nav-open {
  overflow: hidden;
}

/* Hero — full bleed */
.hero-bleed {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  min-height: min(92vh, 820px);
  display: grid;
  align-items: end;
  color: #f7f3ec;
  overflow: hidden;
  margin-bottom: 3.5rem;
}

.hero-bleed picture,
.hero-bleed .hero-img {
  position: absolute;
  inset: 0;
}

.hero-bleed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-bleed::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(10, 18, 30, 0.88) 0%, rgba(10, 18, 30, 0.55) 48%, rgba(10, 18, 30, 0.25) 100%),
    linear-gradient(to top, rgba(10, 18, 30, 0.75), transparent 45%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(100% - 2.4rem, var(--max));
  margin: 0 auto;
  padding: 5.5rem 0 3.2rem;
  max-width: 36rem;
  justify-self: start;
  margin-left: max(1.2rem, calc((100vw - var(--max)) / 2));
}

.hero-kicker {
  font-family: var(--font-d);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9fd9d0;
  margin-bottom: 0.8rem;
}

.hero-copy h1 {
  color: #fff;
  margin-bottom: 0.4rem;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.hero-copy .brand-hero {
  display: block;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  color: #fff;
  margin-bottom: 0.35rem;
}

.hero-copy .brand-hero em {
  font-style: normal;
  color: #7fe0d2;
}

.hero-copy .lead {
  color: rgba(247, 243, 236, 0.88);
  margin-bottom: 1.4rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  padding: 0.72rem 1.25rem;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn:hover { transform: translateY(-2px) }

.btn-primary {
  background: var(--coral);
  color: #fff;
}

.btn-primary:hover { background: #bf4330; color: #fff }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff }

.btn-solid {
  background: var(--ink);
  color: #fff;
}

.btn-solid:hover { background: var(--teal); color: #fff }

/* Sections */
main { padding-bottom: 4rem; position: relative; z-index: 1 }

.sec { margin: 3.5rem 0 }
.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.sec-head h2 { margin: 0 }

.panel {
  background: var(--sf);
  border: 1px solid var(--ln);
  padding: 1.35rem 1.45rem;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  top: -40px;
  right: -30px;
  pointer-events: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* Review / content articles — interaction containers */
.review {
  display: flex;
  flex-direction: column;
  background: var(--sf);
  border: 1px solid var(--ln);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.08);
}

.review .media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1a2436;
}

.review .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.review:hover .media img { transform: scale(1.04) }

.review .body { padding: 1.15rem 1.2rem 1.35rem }

.meta {
  font-family: var(--font-d);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mut);
  margin-bottom: 0.55rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 0;
}

.chip {
  font-family: var(--font-d);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--ln);
  color: var(--mut);
  background: rgba(15, 122, 110, 0.06);
}

/* Tags / filters */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.tag {
  font-family: var(--font-d);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--ln);
  background: var(--sf);
  color: var(--ink);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tag:hover { border-color: var(--teal) }
.tag[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Forms / calculator */
label {
  display: block;
  font-family: var(--font-d);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mut);
  margin: 0.85rem 0 0.35rem;
}

input, select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--ln);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.res {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(120deg, rgba(15, 122, 110, 0.12), rgba(212, 83, 60, 0.08));
  border-left: 3px solid var(--teal);
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.05rem;
}

/* Table */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--sf);
}

th, td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--ln);
  white-space: nowrap;
}

th {
  font-family: var(--font-d);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(16, 24, 40, 0.04);
}

th button {
  all: unset;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

th button:hover { color: var(--teal) }

/* Accordion */
details {
  border-top: 1px solid var(--ln);
  padding: 0.85rem 0;
  background: transparent;
}

details:first-of-type { border-top: 0 }

summary {
  cursor: pointer;
  font-family: var(--font-d);
  font-weight: 700;
  list-style: none;
}

summary::-webkit-details-marker { display: none }

summary::after {
  content: "+";
  float: right;
  color: var(--coral);
  font-weight: 700;
}

details[open] summary::after { content: "–" }
details p { margin-top: 0.65rem; color: var(--mut) }

/* Glossary term buttons */
button.term {
  all: unset;
  color: var(--teal);
  border-bottom: 1px dotted var(--teal);
  cursor: help;
  font: inherit;
}

button.term:hover { color: var(--coral); border-color: var(--coral) }

dialog {
  max-width: 440px;
  width: calc(100% - 2rem);
  border: 1px solid var(--ln);
  background: #fffcf7;
  color: var(--ink);
  padding: 1.4rem;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.2);
}

dialog::backdrop { background: rgba(10, 18, 30, 0.45) }
dialog h3 { margin-bottom: 0.5rem }
dialog p { color: var(--mut) }

/* Mission / surreal float strip */
.float-strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.float-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #152033;
}

.float-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.float-visual::after {
  content: "";
  position: absolute;
  width: 40%;
  height: 40%;
  border: 1px solid rgba(127, 224, 210, 0.45);
  top: 12%;
  left: 10%;
  animation: drift 9s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg) }
  50% { transform: translate(12px, -10px) rotate(3deg) }
}

.prose-block h3 { margin-top: 1.4rem }
.prose-block ul { padding-left: 1.2rem; color: var(--mut) }
.prose-block li { margin-bottom: 0.4rem }

/* Contact / legal band */
.contact-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.contact-band .panel strong {
  display: block;
  font-family: var(--font-d);
  margin-bottom: 0.4rem;
}

/* Page intro (inner pages) */
.page-intro {
  margin: 1.5rem 0 2rem;
  max-width: 68ch;
}

.page-intro .eyebrow {
  font-family: var(--font-d);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.article-full {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: var(--sf);
  border: 1px solid var(--ln);
  overflow: hidden;
}

.article-full .media { min-height: 220px }
.article-full .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-full .body { padding: 1.4rem 1.5rem 1.6rem }

.vacancy {
  border-left: 3px solid var(--coral);
}

.surreal-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(2px);
  opacity: 0.5;
}

/* Footer */
.site-footer {
  background: #101828;
  color: rgba(247, 243, 236, 0.78);
  padding: 2.8rem 0 2rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.site-footer a { color: #7fe0d2 }
.site-footer a:hover { color: #fff }
.site-footer strong { color: #fff; font-family: var(--font-d) }

.site-footer .grid-auto { margin-bottom: 1.5rem }

.dis {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .grid-2,
  .float-strip,
  .article-full,
  .contact-band,
  .grid-3 { grid-template-columns: 1fr }
  .hero-bleed { min-height: min(78vh, 640px) }
  .hero-copy { margin-left: auto; margin-right: auto; padding-top: 4.5rem }

  .nav-toggle { display: inline-flex }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(10, 18, 30, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  nav[aria-label="Principal"] {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 55;
    width: min(86vw, 320px);
    height: 100dvh;
    margin: 0;
    padding: 5.5rem 1.4rem 2rem;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.15rem;
    background: #fffcf7;
    border-left: 1px solid var(--ln);
    box-shadow: -18px 0 40px rgba(16, 24, 40, 0.14);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s ease;
  }

  nav[aria-label="Principal"].is-open {
    transform: translateX(0);
    visibility: visible;
  }

  nav[aria-label="Principal"] a {
    padding: 0.85rem 0.2rem;
    border-bottom: 1px solid var(--ln);
    font-size: 1.05rem;
  }

  nav[aria-label="Principal"] a[aria-current="page"] {
    border-bottom-color: var(--coral);
    color: var(--coral);
  }
}

@media (max-width: 560px) {
  body { font-size: 16px }
  .btn { width: 100%; }
  .cta-row { flex-direction: column }
  .brand-name { font-size: 1.15rem }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
