@import url("https://fonts.googleapis.com/css2?family=Familjen+Grotesk:wght@400;500;600;700&family=Martian+Mono:wght@400;500;600&display=swap");

:root {
  --mineral: #f4f8f6;
  --paper: #fff;
  --ink: #13211d;
  --muted: #46544e;
  --violet: #5946d2;
  --violet-deep: #33228f;
  --violet-soft: #ece8fc;
  --aqueous: #14a687;
  --aqueous-deep: #08745f;
  --mint: #def3ed;
  --mist: #e6f0eb;
  --rule: #4f5d57;
  --rule-soft: #b4d8cd;
  --rail: 188px;
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4.5rem;
  --s9: 7rem;
  --edge: clamp(1.25rem, 4.4vw, 4rem);
  --display: "Familjen Grotesk", Arial, sans-serif;
  --data: "Martian Mono", monospace;
  --motion-fast: 140ms;
  --motion-enter: 180ms;
  --motion-exit: 120ms;
  --motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-distance: 4px;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 16px/1.5 var(--display);
}
a {
  color: inherit;
}
img {
  display: block;
  width: 100%;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

.skip-link {
  position: fixed;
  top: -6rem;
  left: 1rem;
  z-index: 100;
  padding: 0.85rem 1rem;
  background: var(--violet);
  color: var(--paper);
  font: 500 0.875rem var(--data);
  text-transform: uppercase;
}
.skip-link:focus {
  top: 1rem;
}
.site-shell {
  width: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  background: var(--mineral);
}
.site-canvas {
  min-width: 0;
}

.site-header {
  height: 100vh;
  min-height: 620px;
  padding: var(--s6) var(--s5) var(--s5);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border-right: 1px solid var(--mist);
}
.site-header-brand {
  display: block;
  width: 100%;
  max-width: 172px;
  text-decoration: none;
}
.site-header-logo {
  width: 100%;
  height: auto;
}
.site-header-nav {
  margin: auto 0;
  display: grid;
}
.site-header-nav a {
  padding: var(--s4) 0;
  display: grid;
  gap: var(--s1);
  border-top: 1px solid var(--mist);
  text-decoration: none;
  transition: color var(--motion-fast) ease;
}
.site-header-nav a:first-child {
  border-top: 0;
}
.site-header-nav a span {
  color: var(--muted);
  font: 500 0.875rem var(--data);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-header-nav a b {
  font-size: 1.08rem;
  font-weight: 500;
}
.site-header-nav a[aria-current="page"] {
  color: var(--violet);
  padding-left: var(--s3);
}
@media (hover: hover) and (pointer: fine) {
  .site-header-nav a:hover {
    color: var(--violet);
    padding-left: var(--s3);
  }
}
.site-header-nav a[aria-current="page"] b::after {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  margin: 0 0 0.25rem 0.55rem;
  background: var(--aqueous);
}
.site-header-foot {
  display: grid;
  gap: var(--s3);
  font: 500 0.875rem var(--data);
  text-transform: uppercase;
}
.site-header-foot span {
  color: var(--muted);
}
.site-header-foot a {
  color: var(--violet);
  text-underline-offset: 4px;
}
.site-header-toggle {
  display: none;
}

main {
  min-width: 0;
  background: var(--mineral);
}
/* Enquiry form: fields, select, actions and status message. */
.enquiry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s5);
}
.field {
  min-width: 0;
  display: block;
}
.field-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font: 500 1rem/1.4 var(--display);
  text-transform: none;
}
.field-control {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--mist);
  border-radius: 8px;
  background: var(--mineral);
  color: var(--ink);
  font: 400 1rem/1.5 var(--display);
  transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}
textarea.field-control {
  resize: vertical;
  min-height: 10rem;
}
.field-control:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  box-shadow: none;
  background: var(--paper);
}
.select {
  position: relative;
  min-width: 0;
}
.select-trigger[hidden],
.select-native[hidden] { display: none; }
.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  cursor: pointer;
}
.select-trigger svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  max-height: 17rem;
  overflow: auto;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.4rem;
  border: 1px solid var(--mist);
  border-radius: 8px;
  background: var(--paper);
}
.select-options[hidden] { display: none; }
.select-options[data-enhanced="true"] {
  opacity: 0;
  transform: translateY(calc(-1 * var(--motion-distance)));
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--motion-exit) var(--motion-ease),
    transform var(--motion-exit) var(--motion-ease),
    visibility 0s linear var(--motion-exit);
}
.select-options[data-enhanced="true"][data-open="true"] {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--motion-enter) var(--motion-ease),
    transform var(--motion-enter) var(--motion-ease),
    visibility 0s linear 0s;
}
.select-options[data-instant="true"],
.select-options[data-instant="true"] li { transition: none; }
.select-options li {
  padding: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}
.select-options li.is-highlighted { background: var(--mint); }
.select-options li[aria-selected="true"] { color: var(--violet-deep); font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .field-control:hover { border-color: var(--aqueous-deep); }
  .select-options li:hover { background: var(--mint); }
}
.field-control[aria-invalid="true"] { border-color: var(--violet-deep); }
.field--wide,
.enquiry-form-actions,
.status-message {
  grid-column: 1 / -1;
}
.enquiry-form-actions {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 1rem;
}
.enquiry-form-actions p,
.status-message {
  margin: 0;
  font: 400 0.875rem/1.5 var(--display);
}
.status-message {
  min-height: 1.5em;
  color: var(--muted);
  transition: color var(--motion-fast) ease;
}
.status-message[data-state="error"] { color: var(--violet-deep); }
.status-message[data-state="success"] { color: var(--aqueous-deep); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--violet-deep);
  outline-offset: 4px;
  box-shadow: 0 0 0 3px var(--mineral);
}
.site-header a:focus-visible {
  outline-color: var(--mint);
  box-shadow: 0 0 0 3px var(--ink);
}

@media (max-width: 980px) {
  :root {
    --rail: 154px;
    --edge: clamp(1.25rem, 4vw, 3rem);
  }
  .site-header {
    padding-inline: var(--s4);
  }
}

@media (max-width: 760px) {
  .site-shell {
    grid-template-columns: 1fr;
  }
  .site-header {
    height: auto;
    min-height: 72px;
    padding: 0.85rem var(--edge);
    position: sticky;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--mist);
  }
  .site-header-toggle {
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 0.5rem;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }
  .site-header-toggle svg { width: 24px; height: 24px; }
  .site-header-toggle .site-header-close-icon { display: none; }
  .site-header-toggle[aria-expanded="true"] .site-header-menu-icon { display: none; }
  .site-header-toggle[aria-expanded="true"] .site-header-close-icon { display: block; }
  .site-header-nav {
    display: grid;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 3;
    margin: 0;
    padding: var(--s4) var(--edge);
    background: var(--paper);
    border-bottom: 1px solid var(--mist);
  }
  .site-header-nav[data-enhanced="true"] {
    opacity: 0;
    transform: translateY(calc(-1 * var(--motion-distance)));
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity var(--motion-exit) var(--motion-ease),
      transform var(--motion-exit) var(--motion-ease),
      visibility 0s linear var(--motion-exit);
  }
  .site-header-nav[data-enhanced="true"].is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    transition:
      opacity var(--motion-enter) var(--motion-ease),
      transform var(--motion-enter) var(--motion-ease),
      visibility 0s linear 0s;
  }
  .site-header-nav[data-enhanced="true"][data-instant="true"] {
    transition: none;
  }
  .site-header-nav a {
    padding: 0.8rem 0;
  }
  .site-header-foot {
    display: none;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }
  .site-header-brand {
    min-width: 0;
  }
  .enquiry-form {
    grid-template-columns: 1fr;
  }
  .field,
  .field--wide,
  .enquiry-form-actions,
  .status-message {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .site-header-nav[data-enhanced="true"],
  .site-header-nav[data-enhanced="true"].is-open {
    transform: none;
    transition: none;
  }
}

/* Shared components: one definition each. Page stylesheets add layout only. */

/* Button */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  max-width: 100%;
  min-height: 48px;
  padding: 0.8rem 1.15rem;
  border: 0;
  border-radius: 8px;
  background: var(--violet);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition:
    background-color var(--motion-fast) ease,
    transform var(--motion-fast) var(--motion-ease);
}
.button:disabled,
.button[aria-disabled="true"] {
  background: var(--mist);
  color: var(--muted);
  cursor: not-allowed;
}
.button--large {
  min-height: 52px;
  padding: 0.9rem 1.15rem;
}
.button svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button--inverse {
  flex-shrink: 0;
  background: var(--mint);
  color: var(--ink);
}
.home-story .button:not(:disabled):active:not(:focus-visible) { transform: scale(0.98); }

/* Icon button and header extras */
/* Iconify brand marks, inactive until real profile URLs are supplied. */
.site-header-socials {
  display: flex;
  gap: 0.25rem;
  margin-left: -0.65rem;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
}
.icon-button svg {
  width: 19px;
  height: 19px;
}
.icon-button:disabled {
  opacity: 0.65;
  cursor: default;
}
/* The approved Material Statement keeps the sidebar and lets the sculpture cross chapters. */
.home-story .site-header-nav {
  margin: 3.5rem 0 auto;
  gap: 1.4rem;
}
.home-story .site-header-nav a {
  display: block;
  padding: 0.3rem 0;
  border: 0;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 400;
}
.home-story .site-header-nav a[aria-current="page"] {
  padding-left: 0;
  color: var(--violet);
}
.home-story .site-header-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 2px;
}
.home-story .site-header-foot {
  font-size: 0.875rem;
  line-height: 1.5;
}
.home-story .site-header-nav a { position: relative; width: fit-content; }
.home-story .site-header-nav a:not([aria-current])::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.15rem;
  height: 1px;
  background: currentColor;
  opacity: 0;
}
.home-story .site-header-nav a:focus-visible::after { opacity: 1; }
.home-story .site-header a:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
  box-shadow: none;
}

/* Site footer and final call to action */
.site-footer {
  padding: clamp(3rem, 5vw, 5rem) var(--story-space) 1.5rem;
  background-color: var(--ink);
  background-image: linear-gradient(rgba(19, 33, 29, .86), rgba(19, 33, 29, .86)), url("assets/backgrounds/footer-lab-v1.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--paper);
}
.final-cta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
}
.site-footer h2 {
  max-width: 21ch;
}
.site-footer-meta {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 2rem;
  border-top: 1px solid var(--muted);
}
.site-footer-meta p {
  max-width: 59ch;
  margin: 0;
  color: var(--mist);
  font-size: 0.875rem;
}
.site-footer-meta nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.site-footer-meta a {
  color: var(--mint);
  text-underline-offset: 4px;
}
.site-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
}
.site-footer-copyright {
  margin: 0;
  color: var(--mist);
  font-size: 0.875rem;
}
.creator-credit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--mist);
  font-size: 0.875rem;
  line-height: 1.5;
  text-decoration: none;
}
.creator-credit img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}
.creator-credit strong { color: var(--paper); font-weight: 600; }
.creator-credit:hover strong { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 600px) {
  .creator-credit { gap: 8px; }
  .creator-credit img { width: 28px; height: 28px; }
}
.site-footer a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
  box-shadow: none;
}

/* Media frame */
.media {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: var(--mist);
}
.media img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

@media (max-width: 1120px) {
  .final-cta { align-items: start; flex-direction: column; gap: 1.5rem; }
}
@media (max-width: 860px) {
  .site-footer-meta { flex-direction: column; gap: 1.5rem; }
}
@media (max-width: 760px) {
  .home-story .site-header-nav { margin: 0; gap: 0; }
  .home-story .site-header-nav a { padding: 0.8rem 0; }
}
@media (hover: hover) and (pointer: fine) {
  .icon-button:not(:disabled):hover {
    background-color: var(--violet-soft);
    color: var(--violet);
  }
  .button:not(:disabled):hover { background-color: var(--violet-deep); }
  .button--inverse:not(:disabled):hover { background-color: var(--paper); }
  .home-story .site-header-nav a:hover {
    padding-left: 0;
    color: var(--violet);
  }
  .home-story .site-header-nav a:hover::after { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .home-story .button:not(:disabled):active:not(:focus-visible) { transform: none; }
}

/* Typography roles. Page sections apply the same values through their own selectors. */
.heading-display {
  margin: 0;
  font-size: clamp(3.5rem, 7.8vw, 7.5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.heading-display--compact {
  font-size: clamp(3rem, 5.4vw, 6rem);
  font-weight: 600;
  line-height: 1.02;
}
.heading-section {
  margin: 0;
  font-size: clamp(2.2rem, 3.15vw, 3.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.heading-title {
  margin: 0;
  font-size: clamp(1.35rem, 1.7vw, 1.65rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.text-lead {
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.55;
}
.text-small {
  font-size: 0.875rem;
  line-height: 1.5;
}
.text-label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
}
