/*
 * Ottercell Energy — layout and components.
 *
 * No colours, sizes or timings are defined in this file. Every value comes
 * from tokens.css; adjust it there.
 *
 * Breakpoints (the one thing that cannot be a variable):
 *   900px  two-column sections stack; navigation collapses
 *   760px  use-case rows drop to two columns
 *   560px  phone: narrower gutters, single-column spec strip
 */

/* ---------- fonts (self-hosted, SIL OFL 1.1; licences in ../fonts) ---------- */
@font-face {
  font-family: Sora;
  src: url("../fonts/sora-variable.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("../fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;

  /* Keeps anchor targets and focused elements clear of the sticky header. */
  scroll-padding-top: calc(var(--header-height) + var(--space-4));

  /* stylelint-disable-next-line property-no-vendor-prefix -- iOS Safari still needs the prefix */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--color-heading);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

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

@media (max-width: 560px) {
  .wrap {
    padding: 0 var(--gutter-narrow);
  }
}

/* ---------- accessibility utilities ---------- */
:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-offset);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: var(--z-skip-link);
  padding: var(--space-3) var(--space-5);
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-3);
  outline-color: var(--color-focus-on-brand);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- corner-bracket motif ---------- */
.bracketed {
  position: relative;
}

.bracketed::before,
.bracketed::after,
.bracketed .bl,
.bracketed .br {
  content: "";
  position: absolute;
  width: var(--bracket-size);
  height: var(--bracket-size);
  border: var(--bracket-width) solid var(--bracket-color);
}

.bracketed::before {
  top: calc(var(--bracket-width) * -1);
  left: calc(var(--bracket-width) * -1);
  border-right: none;
  border-bottom: none;
}

.bracketed::after {
  top: calc(var(--bracket-width) * -1);
  right: calc(var(--bracket-width) * -1);
  border-left: none;
  border-bottom: none;
}

.bracketed .bl {
  bottom: calc(var(--bracket-width) * -1);
  left: calc(var(--bracket-width) * -1);
  border-right: none;
  border-top: none;
}

.bracketed .br {
  bottom: calc(var(--bracket-width) * -1);
  right: calc(var(--bracket-width) * -1);
  border-left: none;
  border-top: none;
}

/* ---------- diagram colours (inline SVG) ---------- */
.svg-stroke-brand {
  stroke: var(--color-brand);
}

.svg-fill-brand {
  fill: var(--color-brand);
}

.svg-stroke-highlight {
  stroke: var(--color-highlight);
}

.svg-fill-highlight {
  fill: var(--color-highlight);
}

.svg-fill-highlight-soft {
  fill: var(--color-highlight-soft);
}

.svg-stroke-guide {
  stroke: var(--color-diagram-guide);
}

.svg-stroke-on-brand-line {
  stroke: var(--color-on-brand-line);
}

.svg-stop-highlight {
  stop-color: var(--color-highlight);
}

.svg-stop-brand {
  stop-color: var(--color-brand);
}

.svg-label {
  font-family: var(--font-mono);
  font-size: var(--diagram-label-size);
  fill: var(--color-text-muted);
}

.svg-label-on-brand {
  fill: var(--color-on-brand);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-header-bg);
  border-bottom: var(--border-on-brand);
}

/* The header and footer are dark, so focus rings use the on-dark colour. */
.site-header,
.site-footer {
  --color-focus: var(--color-focus-on-brand);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand img {
  height: var(--logo-height);
  width: auto;
}

.brand-name {
  display: block;
  font-family: var(--font-head);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  color: var(--color-on-brand);
  letter-spacing: var(--tracking-slight);
}

.site-nav ul {
  display: flex;
  gap: var(--nav-gap);
}

.site-nav a {
  display: inline-block;
  padding: var(--space-2) 0;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--color-on-brand);
  transition: color var(--duration-fast) var(--easing);
}

.site-nav a:hover {
  color: var(--color-highlight-soft);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  background: transparent;
  border: var(--border-on-brand);
  border-radius: var(--button-radius);
  color: var(--color-on-brand);
  cursor: pointer;
}

.nav-toggle svg {
  width: var(--icon-size-menu);
  height: var(--icon-size-menu);
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* Narrow screens. Without JavaScript the links wrap under the brand so they
   are always reachable; with it (html.js) they collapse behind the toggle. */
@media (max-width: 900px) {
  .nav-row {
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-4);
    min-height: 0;
    padding-block: var(--space-4);
  }

  .nav-cta {
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    width: 100%;
  }

  .site-nav ul {
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-7);
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
  }

  .js .site-nav.is-open {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
    gap: 0;
    border-top: var(--border-on-brand);
  }

  .js .site-nav a {
    display: block;
    padding: var(--space-4) 0;
    border-bottom: var(--border-on-brand);
  }
}

@media (max-width: 560px) {
  .nav-cta .btn {
    display: none;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--button-padding-y) var(--button-padding-x);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  border-radius: var(--button-radius);
  cursor: pointer;
  border: var(--border-thin) solid transparent;
  transition:
    background-color var(--duration-fast) var(--easing),
    border-color var(--duration-fast) var(--easing),
    color var(--duration-fast) var(--easing);
}

.btn-primary {
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.btn-primary:hover {
  background: var(--color-accent);
}

.btn-ghost {
  border-color: var(--color-border);
  color: var(--color-text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ---------- sections (shared) ---------- */
section {
  padding: var(--section-padding) 0;
}

.section-head {
  max-width: var(--measure-section-head);
  margin-bottom: var(--space-14);
}

.section-head h2 {
  font-size: var(--text-title-lg);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-4);
}

.section-head p {
  color: var(--color-text-muted);
}

/* Value-over-label pairs, used in the hero, spec strip and origin section. */
.stat b {
  display: block;
  font-family: var(--font-mono);
}

.stat span {
  font-size: var(--text-sm);
}

/* ---------- hero ---------- */
.hero {
  padding: var(--hero-padding-top) 0 var(--hero-padding-bottom);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: var(--columns-hero);
  gap: var(--grid-gap-hero);
  align-items: center;
}

.eyebrow-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
}

.eyebrow-line .dot {
  flex: none;
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: var(--radius-round);
  background: var(--color-highlight);
  box-shadow: 0 0 0 var(--dot-ring) var(--color-highlight-glow);
}

.hero h1 {
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-6);
  max-width: var(--measure-display);
}

.hero .lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: var(--measure-text);
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-11);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) var(--space-9);
  padding-top: var(--space-6);
  border-top: var(--border);
  max-width: var(--measure-hero-stats);
}

.hero-meta .stat b {
  font-size: var(--text-xl);
  color: var(--color-heading);
}

.hero-meta .stat span {
  color: var(--color-text-muted);
}

.hero-visual {
  background:
    linear-gradient(
        var(--color-border-subtle) var(--border-thin),
        transparent var(--border-thin)
      )
      0 0 / var(--hero-grid-cell) var(--hero-grid-cell),
    linear-gradient(
        90deg,
        var(--color-border-subtle) var(--border-thin),
        transparent var(--border-thin)
      )
      0 0 / var(--hero-grid-cell) var(--hero-grid-cell),
    var(--color-surface);
  border: var(--border);
  border-radius: var(--panel-radius);
  padding: var(--panel-padding);
}

.hero-visual svg {
  width: 100%;
  height: auto;
  display: block;
}

.draw-line {
  stroke-dasharray: var(--draw-length);
  stroke-dashoffset: var(--draw-length);
  animation: draw var(--duration-draw) var(--easing) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: var(--hero-padding-top-narrow) 0 var(--hero-padding-bottom-narrow);
  }
}

/* ---------- spec strip ---------- */
.spec-strip {
  padding: 0;
  background: var(--color-brand);
}

.spec-strip .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.spec-item {
  padding: var(--space-8) var(--space-7);
  border-left: var(--border-on-brand);
}

.spec-item:first-child {
  border-left: none;
}

.spec-item b {
  font-size: var(--text-3xl);
  color: var(--color-on-brand);
  margin-bottom: var(--space-2);
}

.spec-item span {
  color: var(--color-on-brand-subtle);
}

@media (max-width: 900px) {
  .spec-strip .wrap {
    grid-template-columns: repeat(2, 1fr);
  }

  .spec-item:nth-child(3) {
    border-left: none;
  }
}

@media (max-width: 560px) {
  .spec-strip .wrap {
    grid-template-columns: 1fr;
  }

  .spec-item,
  .spec-item:nth-child(3) {
    border-left: none;
    border-top: var(--border-on-brand);
    padding-left: 0;
    padding-right: 0;
  }

  .spec-item:first-child {
    border-top: none;
  }
}

/* ---------- technology ---------- */
.software {
  background: var(--color-surface);
}

.software-grid {
  display: grid;
  grid-template-columns: var(--columns-technology);
  gap: var(--grid-gap);
  align-items: center;
}

.software-copy h2 {
  font-size: var(--text-title);
  margin-bottom: var(--space-5);
  max-width: var(--measure-title);
}

.software-copy p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: var(--measure-text);
}

.proto-list {
  border-top: var(--border);
}

.proto-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: var(--border);
  font-size: var(--text-md);
}

.proto-list li span:first-child {
  font-weight: var(--weight-medium);
}

.proto-list li span + span {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-align: right;
  white-space: nowrap;
}

.battery-grid {
  margin-top: var(--grid-gap);
  background: var(--color-bg);
  border: var(--border);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
}

.model-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin: 0 0 var(--space-8);
}

.model-card {
  display: flex;
  flex-direction: column;
  padding: var(--card-padding);
  background: var(--color-surface);
  border-radius: var(--card-radius);
}

.model-card h3 {
  margin-bottom: var(--space-1);
  font-size: var(--text-xl);
}

.model-card-meta {
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.model-card-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
}

.model-card-stats div {
  display: flex;
  flex-direction: column-reverse;
}

.model-card-stats dt {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
}

.model-card-stats dd {
  margin: 0;
  color: var(--color-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-md);
}

.spec-table caption {
  margin-bottom: var(--space-4);
  color: var(--color-heading);
  font-family: var(--font-head);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  text-align: left;
}

.spec-table th,
.spec-table td {
  padding: var(--space-2) var(--space-4);
  border-bottom: var(--border);
  text-align: left;
  vertical-align: top;
}

.spec-table thead {
  background: var(--color-header-bg);
  color: var(--color-on-brand);
}

.spec-table thead th {
  border-bottom: 0;
  color: var(--color-on-brand);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-align: left;
}

.spec-table thead th:not(:first-child) {
  border-left: var(--border-thin) solid var(--color-on-brand-border);
}

.spec-table th[scope="row"] {
  width: 40%;
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
}

.spec-table td {
  width: 30%;
  border-left: var(--border);
  font-weight: var(--weight-semibold);
  text-align: left;
}

.spec-group th {
  padding: var(--space-2) var(--space-4);
  border-bottom: 0;
  background: var(--color-surface);
  color: var(--color-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.spec-table tfoot th,
.spec-table tfoot td {
  padding-top: var(--space-6);
  border-bottom: 0;
  text-align: left;
  vertical-align: middle;
}

.spec-note {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.spec-photo {
  width: 100%;
  max-width: 8.75rem; /* token-candidate: --spec-photo-max */
  height: auto;
  aspect-ratio: var(--battery-image-ratio);
  object-fit: contain;
}

/* On phones the spec name moves onto its own line, so the two values get the full width. */
@media (max-width: 600px) {
  .battery-grid {
    padding: var(--space-4);
  }

  .model-cards {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .model-card h3 {
    font-size: var(--text-md);
  }

  .model-card-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-table {
    font-size: var(--text-sm);
  }

  .spec-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: var(--border);
  }

  .spec-table th,
  .spec-table td {
    width: auto;
    padding: var(--space-2);
    border-bottom: 0;
  }

  .spec-table th[scope="row"] {
    grid-column: 1 / -1;
    width: auto;
    padding-bottom: 0;
  }

  .spec-table thead th:first-child,
  .spec-table tfoot th {
    display: none;
  }

  .spec-group th {
    grid-column: 1 / -1;
  }

  .spec-table tfoot td {
    padding-top: var(--space-4);
  }
}

@media (max-width: 900px) {
  .software-grid,
  .battery-grid {
    grid-template-columns: 1fr;
  }

  .model-cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- use cases ---------- */
.use-list {
  border-top: var(--border);
}

.use-row {
  display: grid;
  grid-template-columns: var(--columns-use-case);
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8) 0;
  border-bottom: var(--border);
  transition: background-color var(--duration-fast) var(--easing);
}

.use-row:hover {
  background: var(--color-surface);
}

.use-row .icon {
  width: var(--icon-size);
  height: var(--icon-size);
  stroke-width: var(--icon-stroke);
}

.use-row h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.use-row p {
  color: var(--color-text-muted);
  font-size: var(--text-md);
  max-width: var(--measure-text-wide);
}

@media (max-width: 760px) {
  .use-row {
    grid-template-columns: var(--columns-use-case-narrow);
    gap: var(--space-3) var(--space-5);
  }

  .use-row p {
    grid-column: 2 / 3;
  }
}

/* ---------- origin ---------- */
.origin {
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.origin-grid {
  display: grid;
  grid-template-columns: var(--columns-origin);
  gap: var(--grid-gap);
  align-items: center;
}

.origin h2 {
  color: var(--color-on-brand);
  font-size: var(--text-title);
  margin-bottom: var(--space-5);
  max-width: var(--measure-title);
}

.origin p {
  color: var(--color-on-brand-muted);
  max-width: var(--measure-text);
  margin-bottom: var(--space-7);
}

.origin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) var(--space-11);
}

.origin-stats .stat b {
  font-size: var(--text-2xl);
}

.origin-stats .stat span {
  color: var(--color-on-brand-subtle);
}

.origin-map {
  border: var(--border-on-brand);
  border-radius: var(--panel-radius);
  padding: var(--panel-padding);
  background: var(--color-on-brand-surface);
}

@media (max-width: 900px) {
  .origin-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: var(--columns-contact);
  gap: var(--grid-gap);
}

.contact-info h2 {
  font-size: var(--text-title);
  margin-bottom: var(--space-5);
  max-width: var(--measure-title);
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: var(--measure-text);
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-top: var(--space-6);
  border-top: var(--border);
  font-style: normal;
}

.contact-detail span {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-1);
}

.contact-detail b {
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}

.contact-form {
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--card-radius);
  padding: var(--form-padding);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--space-5);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.field label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.field .req {
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-md);
  padding: var(--control-padding-y) var(--control-padding-x);
  border: var(--border-control);
  border-radius: var(--control-radius);
  background: var(--color-control-bg);
  color: var(--color-text);
  transition: border-color var(--duration-fast) var(--easing);
}

.field ::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-accent);
}

.field textarea {
  resize: vertical;
  min-height: var(--textarea-min-height);
}

.contact-form .btn-primary {
  width: 100%;
  padding: var(--space-4);
  margin-top: var(--space-2);
}

.form-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  text-align: center;
}

.contact-form .btn-primary[aria-disabled="true"] {
  cursor: progress;
  background: var(--color-accent);
}

/* Spam trap. Moved off-screen rather than display:none, which some bots skip. */
.form-trap {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Submission result (set by js/site.js). Empty until there is something to say. */
.form-status {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-top: var(--space-4);
  text-align: center;
}

.form-status:empty {
  display: none;
}

.form-status.is-ok {
  color: var(--color-status-ok);
}

.form-status.is-error {
  color: var(--color-status-error);
}

/* Result shown after a no-JavaScript submission, when the Lambda redirects
   back to #contact-sent or #contact-error. */
.form-result {
  display: none;
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-5);
}

.form-result:target {
  display: block;
}

.form-result-ok {
  color: var(--color-status-ok);
}

.form-result-error {
  color: var(--color-status-error);
}

@media (max-width: 900px) {
  .contact-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .contact-form {
    padding: var(--form-padding-narrow);
  }
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-on-brand);
  padding: var(--footer-padding-top) 0 var(--footer-padding-bottom);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-head);
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
  color: var(--color-on-brand);
}

.footer-brand img {
  height: var(--logo-height-footer);
  width: auto;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-16);
}

.footer-col h2 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-wide);
  color: var(--color-on-brand-muted);
  margin-bottom: var(--space-3);
}

.footer-col a {
  display: block;
  padding: var(--space-1) 0;
  font-size: var(--text-md);
  transition: color var(--duration-fast) var(--easing);
}

.footer-col a:hover {
  color: var(--color-highlight-soft);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: var(--border-on-brand);
  font-size: var(--text-sm);
  color: var(--color-on-brand-muted);
}

/* ---------- user preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .draw-line {
    animation: none;
    stroke-dashoffset: 0;
  }

  * {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .btn,
  .nav-toggle {
    border-color: ButtonText;
  }

}
