/* AisleBench site styles. Colours, type and rules: docs/BRAND_FOUNDATION.md, docs/WEB_DESIGN.md. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-var.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #16262E;
  --paper: #F5F1E8;
  --card: #FBF9F4;
  --line: #DDD5C4;
  --secondary: #3B4B53;      /* ~8:1 on Paper */
  --teal: #16766F;           /* links and controls on Paper; never on Ink */
  --teal-hover: #0F5A54;
  --teal-on-ink: #45A79E;    /* the lightened teal, for Ink surfaces only */
  --footer-text: #C9CFCB;    /* ~8.5:1 on Ink */
  --amber: #D99A2B;          /* fill only, never text */
  --gutter: 20px;
  --measure: 1088px;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: Inter, "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* No fixed heights anywhere: the footer follows the content, and the page
   background fills a short screen (docs/WEB_DESIGN.md, phone review). */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--teal);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--teal-hover);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Ink frame: header and footer ---------- */

.site-header {
  background: var(--ink);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.site-header img {
  display: block;
  height: 44px;
  width: auto;
}

.site-header a,
.site-footer a {
  color: var(--teal-on-ink);
}

.site-header a:hover,
.site-footer a:hover {
  color: var(--paper);
}

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--teal-on-ink);
}

.header-contact {
  display: none;
  font-size: 15px;
  font-weight: 500;
}

.site-footer {
  background: var(--ink);
  color: var(--footer-text);
  font-size: 14px;
  line-height: 1.5;
}

.site-footer .wrap {
  padding-top: 32px;
  padding-bottom: 32px;
}

.site-footer p {
  margin: 0;
}

/* Two tiers, like a publisher's footer: what a visitor needs, then the
   company details the Companies Act requires, set small. Space separates
   them; a rule made the footer look heavy. */
.footer-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 28px;
  font-size: 13px;
}

/* ---------- Holding page ---------- */

.intro {
  padding: 56px 0 0;
}

.intro h1 {
  margin: 0;
  max-width: 900px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 7vw + 0.5rem, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.explainer {
  margin: 16px 0 0;
  font-size: clamp(1.1rem, 1vw + 0.9rem, 1.375rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--secondary);
}

.about {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

.about p {
  margin: 0;
  max-width: 34em;
}

.about strong {
  font-weight: 600;
}

.cards {
  display: grid;
  gap: 20px;
  margin: 48px 0 64px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.card--data {
  border-top: 6px solid var(--amber);
}

.card h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 1vw + 1.25rem, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  font-size: 16px;
  color: var(--secondary);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid var(--teal);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  color: var(--teal);
}

.button:hover {
  background: var(--teal);
  color: var(--paper);
}

.card .button {
  margin-top: auto;
  align-self: stretch;
}

/* ---------- 404 ---------- */

.not-found {
  padding: 72px 0;
}

.not-found h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
  line-height: 1.1;
}

.not-found p {
  margin: 0;
}

/* ---------- Wider screens ---------- */

@media (min-width: 768px) {
  :root {
    --gutter: 48px;
  }

  .site-header .wrap {
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .site-header img {
    height: 56px;
  }

  .header-contact {
    display: inline;
  }

  .intro {
    padding-top: 88px;
  }

  .about {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
    margin-top: 56px;
  }

  .about p {
    font-size: 19px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    margin: 64px 0 88px;
  }

  .card {
    padding: 32px 36px 36px;
  }

  .card--data {
    padding-top: 27px;
  }

  .card .button {
    align-self: flex-start;
  }

  .site-footer .wrap {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .footer-main {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
  }
}

@media (min-width: 1100px) {
  :root {
    --gutter: 96px;
  }
}
