/* ==========================================================================
   Space House
   Palette: Cloud White, Slate, Sage, Warm Sand, Muted Coral.
   Type: Figtree (SIL OFL), one family.
   ========================================================================== */

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2010-2027, U+2030-203A, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-ext.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
  unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C;
}

:root {
  /* Brand palette */
  --cloud: #fafafa;
  --slate: #607d8b;
  --sage: #9ac3a8;
  --sand: #d2b48c;
  --coral: #ed6f6c;

  /* Roles, derived from the palette */
  --bg: var(--cloud);
  --sage-surface: #e9f1ec;
  --text: #1f2b31;          /* deep slate, 13.9:1 on --bg */
  --text-body: #33444c;
  --muted: #536b77;         /* 5.4:1 on --bg */
  --line: rgba(96, 125, 139, 0.22);
  --line-strong: rgba(96, 125, 139, 0.45);
  --coral-ink: #b9433f;     /* coral for text and focus, 5.1:1 on --bg */
  --night: #243137;

  --font: "Figtree", "Avenir Next", "Segoe UI", Arial, sans-serif;

  --fs-small: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  --fs-h3: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
  --fs-h1: clamp(2.375rem, 1.5rem + 3.4vw, 4.5rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 8px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --gap: clamp(16px, 2.4vw, 32px);
  --section: clamp(64px, 32px + 6vw, 128px);
  --header: 80px;
  --max: 1312px;
}

/* ---- Base ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

h1, h2, h3 {
  margin: 0;
  color: var(--text);
  font-weight: 450;
  line-height: 1.12;
  text-wrap: balance;
}
h1 { letter-spacing: -0.03em; }
h2 { letter-spacing: -0.02em; }
h3 { letter-spacing: -0.01em; font-weight: 500; }

p, ul, ol, dl, dd { margin: 0; }
p { text-wrap: pretty; }

a {
  color: var(--text);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.24em;
  transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease), background-color 160ms var(--ease);
}
a:hover { color: var(--coral-ink); text-decoration-color: var(--coral); }

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

::selection { background: var(--sage); color: var(--text); }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

.flow > * + * { margin-top: 1.1em; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-body);
  max-width: 34em;
}

.muted { color: var(--muted); }

/* Small labels: sentence case, never tracked capitals. */
.label {
  margin-bottom: 12px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
}

/* ---- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: var(--header);
}

.site-header__logo { display: block; flex-shrink: 0; padding-block: 8px; }
.site-header__logo img { width: clamp(168px, 140px + 5vw, 216px); }

.site-nav ul {
  display: flex;
  gap: clamp(24px, 3vw, 40px);
  padding: 0;
  list-style: none;
}

.site-nav a,
.site-footer__nav a {
  position: relative;
  display: inline-block;
  padding-block: 8px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

/* The coral dot from the logo marks the current page. */
.site-nav a[aria-current="page"]::before,
.site-footer__nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--coral);
}

.site-header__end { display: flex; align-items: center; gap: clamp(24px, 3vw, 40px); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding-left: clamp(24px, 3vw, 40px);
  border-left: 1px solid var(--line-strong);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch:hover { color: var(--text); }

.menu-toggle { display: none; }

@media (max-width: 47.99rem) {
  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: none;
    color: var(--text);
    font: 500 var(--fs-small) / 1 var(--font);
    cursor: pointer;
  }
  .menu-toggle__close { display: none; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__close { display: inline; }

  .site-header__end { gap: 20px; }
  .lang-switch { min-height: 44px; padding-left: 0; border-left: 0; }

  .no-js .site-header__inner { flex-wrap: wrap; gap: 0 32px; padding-block: 12px; }
  .no-js .site-header__end { flex-wrap: wrap; }
  .no-js .site-nav ul { flex-wrap: wrap; column-gap: 28px; }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    height: calc(100vh - var(--header));
    height: calc(100dvh - var(--header));
    overflow-y: auto;
    background: var(--bg);
    border-top: 1px solid var(--line);
  }
  .js .site-nav.is-open { display: block; }

  .js .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 24px;
  }
  .js .site-nav li + li { border-top: 1px solid var(--line); }
  .js .site-nav a {
    display: block;
    padding: 16px 0 16px 20px;
    font-size: 1.625rem;
    font-weight: 450;
    letter-spacing: -0.015em;
    color: var(--text);
  }
  .js .site-nav a[aria-current="page"]::before { left: 0; }
}

/* ---- Hero (start page) ----------------------------------------------------- */

.hero__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: center;
  min-height: min(calc(100svh - var(--header)), 760px);
  padding-block: 48px 64px;
}

.hero__text { grid-column: 1 / span 7; }
.hero h1 {
  font-size: var(--fs-h1);
  line-height: 1.04;
  max-width: 13em;
}
.hero .lead { margin-top: 28px; }

.hero__orbit {
  grid-column: 8 / -1;
  width: 100%;
  max-width: 520px;
  justify-self: end;
  overflow: visible;
}
.hero__orbit-ring { fill: none; stroke-width: 10; stroke-linecap: round; }
.hero__orbit-back,
.hero__orbit-front { fill: none; stroke: var(--sand); stroke-width: 4; stroke-linecap: round; }
.hero__orbit-back { opacity: 0.55; }
.hero__orbit-dot { fill: var(--coral); }
.hero__orbit-planet { fill: var(--sand); }

.actions,
.intro__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 40px;
}

.intro__alt {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--muted);
}

/* ---- Page intro (inner pages) ---------------------------------------------- */

.intro {
  padding-top: clamp(56px, 24px + 6vw, 128px);
  padding-bottom: var(--section);
}

.intro h1 {
  grid-column: 1 / span 10;
  font-size: var(--fs-h1);
  line-height: 1.05;
  max-width: 15em;
}

.intro__body {
  grid-column: 6 / -1;
  margin-top: clamp(32px, 16px + 3vw, 56px);
}

/* ---- Sections ------------------------------------------------------------ */

.section { padding-bottom: var(--section); }

/* Section rule: a slate hairline with the coral dot at its start. */
.section > .wrap { position: relative; }
.section > .wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line-strong);
}
.section > .wrap::after {
  content: "";
  position: absolute;
  top: -3.5px;
  left: var(--gutter);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

.section__head {
  grid-column: 1 / span 4;
  padding-top: 32px;
}
.section__head h2 { font-size: var(--fs-h2); max-width: 11em; }
.section__head p { margin-top: 12px; color: var(--muted); max-width: 22em; }

.section__body,
.section__aside {
  grid-column: 6 / -1;
  padding-top: 40px;
}
.section__body--text > p { max-width: 36em; }
.section__aside { color: var(--muted); max-width: 30em; }

/* Sage band: the one coloured surface, used for the closing contact block. */
.band {
  padding-block: var(--section);
  background: var(--sage-surface);
}
.band .section__head,
.band .section__body { padding-top: 0; }

/* ---- Rows ------------------------------------------------------------------ */

.rows { padding: 0; list-style: none; }
.rows > li {
  display: grid;
  gap: 8px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
}
.rows > li:first-child { border-top: 0; padding-top: 0; }
.rows h3 { font-size: var(--fs-h3); }
.rows p { color: var(--muted); max-width: 34em; }

.section__more { margin-top: 40px; }

/* ---- Offer index (start page) ---------------------------------------------- */

.offer-index {
  grid-column: 1 / -1;
  margin-top: clamp(40px, 24px + 3vw, 64px);
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.offer-index a {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: baseline;
  margin-inline: calc(var(--gap) * -0.5);
  padding: 28px calc(var(--gap) * 0.5);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}
.offer-index li { padding-block: 4px; border-top: 1px solid var(--line); }
.offer-index li:first-child { border-top-color: var(--line-strong); }
.offer-index a:hover { background: var(--sage-surface); }
.offer-index a:hover .offer-index__title { color: var(--coral-ink); }

.offer-index__title {
  grid-column: 1 / span 5;
  color: var(--text);
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  transition: color 160ms var(--ease);
}
.offer-index__desc {
  grid-column: 6 / span 6;
  color: var(--muted);
}

/* ---- Buttons ----------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--cloud);
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 160ms var(--ease), transform 120ms var(--ease);
}
.button:hover { background: #33464f; color: var(--cloud); }
.button:active { transform: scale(0.98); }

.text-link { font-size: var(--fs-small); font-weight: 500; }

/* ---- Contact block ------------------------------------------------------------ */

.contact-cta { margin-top: 32px; }

.contact-cta__mail {
  display: inline-block;
  font-size: clamp(1.625rem, 1rem + 2.4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

.contact-cta__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 28px;
  color: var(--muted);
  font-size: var(--fs-small);
}

/* ---- Services (offer page) ------------------------------------------------------ */

.section.service { padding-bottom: clamp(56px, 24px + 5vw, 96px); }
.service .section__head h2 { max-width: 9em; }

.service__body { display: grid; gap: 32px; }
.service__body > p:first-child {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text);
  max-width: 32em;
}

.service__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px var(--gap);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.dash-list { padding: 0; list-style: none; }
.dash-list li { position: relative; padding-left: 20px; }
.dash-list li + li { margin-top: 8px; }
.dash-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  border-top: 1px solid var(--slate);
}

/* ---- Contact page --------------------------------------------------------------- */

.contact-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 4px var(--gap);
  align-items: baseline;
  padding-block: 24px;
  border-top: 1px solid var(--line);
}
.contact-list > div:first-child { border-top: 0; padding-top: 0; }
.contact-list dt {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
}
.contact-list dd {
  color: var(--text);
  font-size: var(--fs-h3);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.brief { padding: 0; list-style: none; max-width: 36em; }
.brief li {
  position: relative;
  padding: 16px 0 16px 20px;
  border-top: 1px solid var(--line);
}
.brief li:first-child { border-top: 0; padding-top: 0; }
.brief li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(16px + 0.8em);
  width: 8px;
  border-top: 1px solid var(--slate);
}
.brief li:first-child::before { top: 0.8em; }

.brief-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 40px;
}
.brief-actions .muted { font-size: var(--fs-small); }

/* ---- Footer ----------------------------------------------------------------------- */

.site-footer {
  background: var(--night);
  color: #c9d3d8;
  font-size: var(--fs-small);
}
.site-footer a { color: #f0f3f4; text-decoration-color: rgba(240, 243, 244, 0.35); }
.site-footer a:hover { color: #fff; text-decoration-color: var(--coral); }
.site-footer :focus-visible { outline-color: var(--coral); }

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px var(--gap);
  padding-block: clamp(48px, 32px + 4vw, 80px) 32px;
}

.site-footer__brand { grid-column: 1 / span 5; }
.site-footer__brand img { width: 192px; }
.site-footer__brand p { margin-top: 20px; color: #a9b8bf; max-width: 18em; }

.site-footer__col--contact { grid-column: 6 / span 4; }
.site-footer__col--nav { grid-column: 10 / span 3; }

.site-footer__heading {
  margin-bottom: 12px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: #a9b8bf;
}

.footer__contact > div + div { margin-top: 4px; }
.footer__contact dt {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-footer__nav { padding: 0; list-style: none; }
.site-footer__nav a { padding-block: 4px; color: #c9d3d8; }
.site-footer__nav a:hover,
.site-footer__nav a[aria-current="page"] { color: #fff; }

.site-footer__legal {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid rgba(240, 243, 244, 0.12);
  color: #a9b8bf;
  font-size: 0.8125rem;
}
.site-footer__company:not(:empty)::before { content: " · "; }

/* ---- 404 -------------------------------------------------------------------------- */

.page-404 .intro { min-height: 55vh; }

/* ---- Responsive ------------------------------------------------------------------- */

@media (max-width: 63.99rem) {
  .hero__text { grid-column: 1 / span 8; }
  .hero__orbit { grid-column: 9 / -1; }
  .intro h1 { grid-column: 1 / -1; }
  .intro__body { grid-column: 4 / -1; }
  .section__head { grid-column: 1 / -1; }
  .section__body,
  .section__aside { grid-column: 1 / -1; padding-top: 28px; }
  .band .section__body { padding-top: 24px; }
  .section__head h2 { max-width: 16em; }
  .section__head p { max-width: 34em; }
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer__col--contact { grid-column: 1 / span 6; }
  .site-footer__col--nav { grid-column: 7 / span 6; }
}

@media (max-width: 47.99rem) {
  .hero__inner { min-height: 0; padding-block: 40px 64px; }
  .hero__text { grid-column: 1 / -1; }
  .hero__orbit {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    width: 72%;
    max-width: 300px;
    margin-top: 48px;
  }
  .intro__body { grid-column: 1 / -1; }
  .contact-list > div,
  .service__cols { grid-template-columns: minmax(0, 1fr); }
  .offer-index a { grid-template-columns: minmax(0, 1fr); row-gap: 8px; padding-block: 24px; }
  .offer-index__title,
  .offer-index__desc { grid-column: 1; }
}

@media (max-width: 29.99rem) {
  .site-footer__col--contact,
  .site-footer__col--nav { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
