/* Covers Housing – site styles */

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #16181b;
  --text: #3d4249;
  --muted: #6b7079;
  --line: #e4e6e9;
  --bg-soft: #f5f6f7;
  --white: #ffffff;
  --accent: #1f4f8f;
  --error: #b42318;

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 12px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--white); color: var(--text);
  font: 400 1rem/1.6 var(--font); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.015em; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 16px; height: 16px; flex: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 8px; background: var(--white); color: var(--ink); font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 20px; border-radius: 8px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--white);
  font: 600 .9375rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: #2c3036; border-color: #2c3036; }
.btn .icon { transition: transform .15s; }
.btn:hover .icon { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: #c9ccd1; }
.btn--ghost:hover { background: var(--bg-soft); border-color: var(--ink); color: var(--ink); }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 24px; padding-bottom: 24px; }
.logo { display: block; flex: none; position: relative; z-index: 2; }
.logo img { display: block; width: clamp(128px, 12vw, 156px); height: auto; }

.nav { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link {
  display: block; padding: 10px 14px; border-radius: 8px;
  font: 500 .9375rem/1 var(--font); color: var(--white); text-decoration: none;
  background: none; border: 0; cursor: pointer; transition: background .15s;
}
.nav__link:hover, .has-sub.is-open > .nav__link { background: rgba(255,255,255,.14); }
.nav__link.is-active { background: rgba(255,255,255,.18); }
.has-sub > .nav__link::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg);
  transition: transform .15s;
}
.has-sub.is-open > .nav__link::after { transform: translateY(0) rotate(-135deg); }

.sub {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px;
  list-style: none; margin: 0; padding: 6px; background: var(--white);
  border-radius: 10px; box-shadow: 0 12px 32px -8px rgba(22,24,27,.25);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.has-sub::before { content: ""; position: absolute; inset: 100% 0 -10px 0; } /* hover bridge */
.has-sub.is-open .sub { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 1025px) {
  .has-sub:hover .sub { opacity: 1; visibility: visible; transform: none; }
}
.sub a { display: block; padding: 9px 12px; border-radius: 6px; text-decoration: none; font-size: .9375rem; color: var(--ink); }
.sub a:hover { background: var(--bg-soft); }
.sub a[aria-current] { font-weight: 600; }
.nav .lang { margin-left: 8px; border: 1px solid rgba(255,255,255,.5); font-size: .8125rem; font-weight: 600; }

.menu-toggle {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px; border-radius: 8px; cursor: pointer;
  font: 600 .875rem/1 var(--font); color: var(--white); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.5);
  position: relative; z-index: 2;
}
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
  display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 1px; transition: transform .2s, background .2s;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -5px; }
.menu-toggle__bars::after { top: 5px; }
.nav-open .menu-toggle__bars { background: transparent; }
.nav-open .menu-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-open .menu-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Home hero ---------- */
.hero {
  position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end; color: var(--white); background: #2b2622;
}
.hero__img, .page-hero__img {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 60%;
}
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(14,16,20,.55) 0%, rgba(14,16,20,0) 60%),
    linear-gradient(180deg, rgba(14,16,20,.55) 0%, rgba(14,16,20,.1) 30%, rgba(14,16,20,.45) 60%, rgba(14,16,20,.85) 100%);
}
.hero__inner { width: 100%; padding-top: 140px; padding-bottom: clamp(32px, 5vw, 56px); }
.hero h1 {
  margin: 0 0 12px; max-width: 22ch; color: var(--white);
  font-size: clamp(2.25rem, 4.6vw, 3.75rem); line-height: 1.05; font-weight: 600; letter-spacing: -.025em;
}
.hero h1, .hero__lede { text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.hero__lede { margin: 0 0 clamp(28px, 4vw, 44px); max-width: 52ch; font-size: 1.125rem; color: rgba(255,255,255,.88); }

.options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.option a {
  display: flex; flex-direction: column; height: 100%; padding: 22px 22px 20px; border-radius: var(--radius);
  background: var(--white); color: var(--ink); text-decoration: none;
  transition: background .2s, color .2s, transform .2s;
}
.option a:hover, .option a:focus-visible { background: var(--ink); color: var(--white); transform: translateY(-2px); }
.option h3 { margin: 0 0 4px; font-size: 1.1875rem; font-weight: 600; color: inherit; letter-spacing: -.01em; }
.option p { margin: 0 0 20px; font-size: .9375rem; color: var(--muted); transition: color .2s; }
.option a:hover p, .option a:focus-visible p { color: rgba(255,255,255,.7); }
.option__more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 600; }
.option__more .icon { transition: transform .2s; }
.option a:hover .option__more .icon { transform: translateX(3px); }

/* ---------- Home: intro + highlights ---------- */
.intro { padding: clamp(56px, 8vw, 96px) 0 clamp(32px, 4vw, 48px); }
.intro__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.intro h2 { margin: 0 0 12px; font-size: 1.25rem; font-weight: 600; }
.intro p { margin: 0; }

.highlights { padding-bottom: clamp(56px, 8vw, 96px); }
.highlights__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.highlight {
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft);
  text-decoration: none; transition: background .2s, border-color .2s, color .2s;
}
.highlight strong { color: var(--ink); font-size: 1.0625rem; font-weight: 600; line-height: 1.35; transition: color .2s; }
.highlight span { display: inline-flex; align-items: center; gap: 8px; font-size: .9375rem; font-weight: 600; color: var(--accent); transition: color .2s; }
.highlight:hover { background: var(--ink); border-color: var(--ink); }
.highlight:hover strong, .highlight:hover span { color: var(--white); }

/* ---------- Sub page header ---------- */
.page-hero {
  position: relative; isolation: isolate; display: flex; align-items: flex-end;
  min-height: clamp(300px, 42vh, 400px); background: #2b2622; color: var(--white);
}
.page-hero__inner { width: 100%; padding-top: 120px; padding-bottom: clamp(28px, 4vw, 44px); }
.page-hero h1 {
  margin: 0; max-width: 24ch; color: var(--white); text-shadow: 0 2px 24px rgba(0,0,0,.45);
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; font-weight: 600; letter-spacing: -.025em;
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; font-size: .875rem; color: rgba(255,255,255,.75); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: rgba(255,255,255,.45); }
.breadcrumb a { color: rgba(255,255,255,.9); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--white); }

/* ---------- Content pages ---------- */
.content { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.content__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 72px); align-items: start; }

.prose { max-width: 70ch; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose dl { margin: 0 0 1.1em; }
.prose .lead { font-size: 1.1875rem; line-height: 1.55; color: var(--ink); }
.prose h2 { margin: 2em 0 .6em; font-size: 1.5rem; font-weight: 600; }
.prose h3 { margin: 1.4em 0 .5em; font-size: 1.0625rem; font-weight: 600; }
.prose ul { padding-left: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 22px; margin-bottom: .45em; }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.prose a:not(.btn) { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:not(.btn):hover { text-decoration-thickness: 2px; }
.callout {
  padding: 14px 18px; border-radius: 8px; background: var(--bg-soft);
  border-left: 3px solid var(--accent); color: var(--ink);
}
.callout a { font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em !important; }

.toc { padding: 20px 24px !important; border-radius: var(--radius); background: var(--bg-soft); }
.toc li:last-child { margin-bottom: 0; }
.job { padding-top: 8px; }
.job + .job { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 16px; }
.job__facts, .details dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; }
.job__facts dt, .details dt { color: var(--muted); }
.job__facts dd, .details dd { margin: 0; color: var(--ink); }

.details { display: grid; gap: 16px; }
.details > div { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.details h2 { margin: 0 0 16px; font-size: 1.125rem; }
.details dl { margin: 0; }

.link-list { list-style: none; padding: 0 !important; margin: 0 0 2em !important; border-top: 1px solid var(--line); }
.link-list li { padding: 0 !important; margin: 0 !important; border-bottom: 1px solid var(--line); }
.link-list li::before { display: none; }
.link-list a { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; color: var(--ink) !important; text-decoration: none; font-weight: 500; }
.link-list a:hover { color: var(--accent) !important; }

/* Sidebar card */
.aside { position: sticky; top: 24px; }
.card { padding: 28px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.card__title { margin: 0 0 10px; font-size: 1.125rem; font-weight: 600; }
.card p, .card address { margin: 0 0 14px; }
.card__list { list-style: none; margin: 0 0 14px; padding: 0; }
.card__list li { margin-bottom: 4px; }
.card__list a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; text-decoration-color: #c9ccd1; }
.card__list a:hover { color: var(--accent); text-decoration-color: currentColor; }
.card__meta { font-size: .9375rem; color: var(--muted); }
.card .btn { margin-top: 8px; }

/* ---------- Forms ---------- */
.form { margin-top: 8px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9375rem; color: var(--ink); }
.field__optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px;
  font: 400 1rem/1.4 var(--font); color: var(--ink); background: var(--white);
  border: 1px solid #c9ccd1; border-radius: 8px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder { color: #9a9fa7; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,79,143,.18); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error { margin: 6px 0 0 !important; color: var(--error); font-size: .875rem; }
.form__alert {
  margin-bottom: 20px; padding: 14px 16px; border-radius: 8px;
  background: #fef3f2; border: 1px solid #fecdca; color: var(--error); font-size: .9375rem;
}
.form__alert ul { margin: 6px 0 0 !important; }
.form__alert li::before { background: var(--error) !important; }
.form__alert a { color: var(--error) !important; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); }
.foot { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; font-size: .9375rem; }
.foot__title { margin: 0 0 14px; font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.foot p, .foot address { margin: 0 0 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 10px; }
.foot li strong { color: var(--ink); font-weight: 600; }
.foot__hours { color: var(--muted); }
.checks li { position: relative; padding-left: 24px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 10px; height: 5px;
  border: solid var(--accent); border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.partner { display: inline-block; }
.partner img { display: block; width: 88px; height: 88px; border-radius: 8px; background: var(--white); padding: 8px; border: 1px solid var(--line); transition: border-color .15s; }
.partner:hover img { border-color: var(--ink); }
.foot a { text-decoration-color: rgba(31,79,143,.35); text-underline-offset: 3px; }
.foot a:hover { color: var(--accent); }

.legal__inner {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--line);
  font-size: .8125rem; color: var(--muted);
}
.legal__sep { margin-left: 12px; }
.legal a { color: var(--muted); }
.legal a:hover { color: var(--ink); }
.legal__links { display: flex; gap: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: 0; z-index: 1; overflow-y: auto;
    padding: 96px var(--gutter) 40px; background: var(--ink);
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  }
  .nav-open { overflow: hidden; }
  .nav-open .site-nav { opacity: 1; visibility: visible; }
  .nav { flex-direction: column; align-items: stretch; gap: 0; max-width: 560px; margin: 0 auto; }
  .nav__item { border-bottom: 1px solid rgba(255,255,255,.12); }
  .nav__link { width: 100%; padding: 16px 4px; border-radius: 0; font-size: 1.125rem; text-align: left; }
  .nav__link:hover, .nav__link.is-active, .has-sub.is-open > .nav__link { background: none; }
  .has-sub > .nav__link { display: flex; justify-content: space-between; align-items: center; }
  .has-sub::before { display: none; }
  .sub {
    position: static; min-width: 0; padding: 0 0 12px; background: none; box-shadow: none; border-radius: 0;
    opacity: 1; visibility: visible; transform: none; display: none;
  }
  .has-sub.is-open .sub { display: block; }
  .sub a { color: rgba(255,255,255,.8); padding: 10px 4px 10px 16px; }
  .sub a:hover { background: none; color: var(--white); }
  .nav__item:last-child { border-bottom: 0; padding-top: 20px; }
  .nav .lang { display: inline-block; width: auto; margin: 0; padding: 10px 14px; border-radius: 8px; font-size: .875rem; }

  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro__grid, .highlights__grid { grid-template-columns: 1fr; }
  .content__grid { grid-template-columns: 1fr; }
  .aside { position: static; max-width: 560px; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero__inner { padding-top: 120px; }
  .options { grid-template-columns: 1fr; gap: 8px; }
  .option a { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
  .option p { display: none; }
  .option h3 { margin: 0; font-size: 1.0625rem; }
  .option__more { margin: 0; }
  .option__more > span { display: none; }
  .page-hero { min-height: 260px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .job__facts, .details dl { grid-template-columns: 1fr; gap: 0; }
  .job__facts dd, .details dd { margin-bottom: 10px; }
  .foot { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
  .legal__sep { display: block; margin: 4px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
