/* Regal Studios. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 600;
  font-stretch: 100% 125%;
  font-display: swap;
}

/* Arial tuned to Archivo's metrics so the swap does not reflow text. */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial");
  size-adjust: 98.8%;
  ascent-override: 88.9%;
  descent-override: 21.3%;
  line-gap-override: 0%;
}

:root {
  /* Colour */
  --gold: #F5C242;
  --ink: #0E1A2B;
  --paper: #FAF8F3;
  --wash: #FBF0CC;
  --slate: #566070;
  --bronze: #7A5A00;
  --mist: #A3AEBF;
  --line: #E6E1D6;
  --line-dark: rgb(163 174 191 / 0.25);

  /* Type */
  --font: "Archivo", "Archivo Fallback", "Helvetica Neue", Arial, sans-serif;
  --t-word: clamp(3.375rem, 11.25vw, 10.5rem);
  --t-display: clamp(2.75rem, 6vw, 5.5rem);
  --t-heading: clamp(2.25rem, 4.2vw, 4rem);
  --t-lead: clamp(1.125rem, 1.6vw, 1.375rem);
  --t-body: 1.0625rem;
  --t-label: 1rem;
  --t-name: 0.875rem;
  --t-small: 0.875rem;

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 192px;

  /* Grid */
  --max: 1320px;
  --margin: clamp(20px, 5vw, 80px);
  --cols: 12;
  --gutter: 24px;
  --header-h: 72px;
  --brand-logo: 44px;
  --brand-gap: 12px;
  --brand-k: 2.6;
  --section-pad: clamp(96px, 14svh, 192px);

  /* Shape and motion */
  --chamfer: 8px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-ui: 200ms;
  --dur-reveal: 700ms;
}

@media (max-width: 719px) {
  :root {
    --cols: 4;
    --gutter: 16px;
  }
}

/* Base */

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

* {
  margin: 0;
}

/* Nothing may make the page wider than the screen (warped content widens near
   the edges); a page that can pan sideways also scrolls badly on iOS. */
html,
body {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  body {
    overflow-x: hidden;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* The background grid (warp.js): behind everything, above the page's paper.
   Navy sections (the hero, the footer) cover it. */
.page-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

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

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.on-dark :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--gold);
}

.nowrap {
  white-space: nowrap;
}

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

.skip-link {
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--gold);
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* Layout */

.wrap {
  width: 100%;
  /* content is at most --max wide; the margins sit outside it */
  max-width: calc(var(--max) + 2 * var(--margin));
  margin-inline: auto;
  padding-inline: var(--margin);
}

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

/* Type */

.lead {
  text-wrap: pretty;
  font-size: var(--t-lead);
  line-height: 1.45;
  max-inline-size: 60ch;
}

/* Buttons and links */

.btn {
  display: inline-block;
  border-radius: 999px; /* so the focus ring follows the pill */
  color: var(--ink);
  text-decoration: none;
}

/* The main button: a gold pill with spaced capitals, the same shape as the
   header button. */
.btn__body {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  height: 52px;
  padding-inline: 28px;
  border-radius: 999px;
  background: var(--gold);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn__arrow {
  letter-spacing: 0;
  transition: transform var(--dur-ui) var(--ease-out);
}

@media (hover: hover) {
  .btn:hover .btn__arrow {
    transform: translateX(4px);
  }
}


a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--bronze);
  text-underline-offset: 0.25em;
}

@media (hover: hover) {
  a:hover {
    text-decoration-thickness: 2px;
  }

}

/* Header */

.site-header {
  /* Transparent everywhere: no bar, no hairline. The logo
     and the button swap between light and dark versions instead. */
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: transparent;
  color: var(--ink);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

.brand-slot {
  /* Where the logo docks; main.js sets its width to the docked logo's. */
  display: block;
  height: var(--brand-logo);
}

/* The logo and name: drawn at hero size (crisp), scaled down by main.js as it
   docks into the header. Header sizes x --brand-k = hero sizes. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--brand-gap) * var(--brand-k));
  color: var(--paper);
  text-decoration: none;
  transform-origin: 0 0;
}

.brand.is-floating {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  will-change: transform;
}

.brand.is-dark {
  color: var(--ink);
}

.brand__logo {
  width: calc(var(--brand-logo) * var(--brand-k));
  height: calc(var(--brand-logo) * var(--brand-k));
  /* The logo file has blank space left of the oval (22.9% of its width); pull
     it back so the oval lines up with the headline's left edge. */
  margin-left: calc(var(--brand-logo) * var(--brand-k) * -0.229);
}

.brand__logo--dark,
.brand.is-dark .brand__logo--light {
  display: none;
}

.brand.is-dark .brand__logo--dark {
  display: block;
}

.brand__name {
  font-size: calc(var(--t-name) * var(--brand-k));
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand:focus-visible {
  outline-color: var(--gold);
}

.brand.is-dark:focus-visible {
  outline-color: var(--ink);
}

/* "Send a message" in the header: a filled pill with spaced capitals. Navy on
   light sections, paper over the navy hero. */
.header-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding-inline: 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-ui) var(--ease-out), color var(--dur-ui) var(--ease-out);
}

@media (hover: hover) {
  .header-link:hover {
    background: var(--slate);
  }

  .site-header.is-over-hero .header-link:hover {
    background: var(--mist);
  }

  html.hero-light .site-header.is-over-hero .header-link:hover {
    background: var(--slate);
  }
}

/* Over the navy hero (set by main.js): paper button, white logo. */
.site-header.is-over-hero .header-link {
  background: var(--paper);
  color: var(--ink);
}

.site-header.is-over-hero :focus-visible {
  outline-color: var(--gold);
}

/* Halfway through the hero's fade to paper, the button and logo turn dark. */
html.hero-light .site-header.is-over-hero .header-link {
  background: var(--ink);
  color: var(--paper);
}

html.hero-light .site-header.is-over-hero :focus-visible {
  outline-color: var(--ink);
}

html.hero-light .brand {
  color: var(--ink);
}

html.hero-light .brand .brand__logo--light {
  display: none;
}

html.hero-light .brand .brand__logo--dark {
  display: block;
}

@media (max-width: 479px) {
  :root {
    --brand-logo: 38px;
    --brand-gap: 8px;
    --t-name: 0.75rem;
    --brand-k: 1.8;
  }

  .brand__name {
    letter-spacing: 0.12em;
  }

  .header-link {
    height: 36px;
    padding-inline: 14px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }
}
/* Hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

/* As the hero scrolls away, a paper layer fades in over its navy (warp.js sets
   the opacity). Fading a layer needs no repaint, so it stays in step with the
   scroll on phones, where repainting the background each frame lagged. */
.hero__fade {
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.hero__traces {
  position: absolute;
  inset: 0;
}

.hero__traces canvas {
  display: block;
}

.hero__inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--header-h) + var(--s-9));
  padding-bottom: clamp(var(--s-8), 13svh, var(--s-10));
}

.hero__brand {
  height: calc(var(--brand-logo) * var(--brand-k));
  margin-bottom: clamp(var(--s-7), 7svh, var(--s-9));
}

.hero h1 {
  max-width: 11.5em;
  text-wrap: balance;
  font-size: var(--t-display);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
}

.hero .lead {
  margin-top: var(--s-6);
  max-width: 34em;
  font-size: var(--t-lead);
  color: var(--mist);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.hero .btn {
  margin-top: var(--s-7);
}

/* Short phones (an iPhone SE, 375 x 667): tighter spacing, so the board keeps a
   band above the logo for its chip, as on taller phones. */
@media (max-width: 479px) and (max-height: 740px) {
  :root {
    --brand-k: 1.6;
  }

  .hero__inner {
    padding-top: calc(var(--header-h) + 160px);
    padding-bottom: 28px;
  }

  .hero__brand {
    margin-bottom: 24px;
  }

  .hero .lead {
    margin-top: 16px;
  }

  .hero .btn {
    margin-top: 28px;
  }

}

/* Services: one section, a 2 x 2 grid of navy cards (one column on phones)
   on the light, gridded page. */

.services {
  padding-block: clamp(80px, 12svh, 144px);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-card {
  container-type: inline-size; /* the word scales to the card (see below) */
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.6vw, 40px);
  background: var(--ink);
  color: var(--paper);
  border: 1px solid rgb(163 174 191 / 0.35);
  letter-spacing: 0.01em;
}

.service-card__head {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
}

/* Gold on navy only, as the palette requires. */
.service-card__num {
  color: var(--gold);
  font-size: var(--t-small);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.service-card__word {
  /* Capped by the card's width so the longest word, "Conceptualize" (about
     7.9 times the font size wide), always fits beside its number (~64 px). */
  font-size: min(clamp(2.5rem, 4.6vw, 4.25rem), calc((100cqi - 64px) / 8.1));
  font-weight: 600;
  font-stretch: 125%;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.service-card__img {
  margin-top: var(--s-6);
}

.service-card__name {
  margin-top: var(--s-6);
  font-size: var(--t-label);
  font-weight: 600;
}

.service-card__text {
  margin-top: var(--s-2);
  max-inline-size: 46ch;
  color: var(--mist);
  font-size: var(--t-body);
  line-height: 1.55;
}

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

/* In a narrow card the number sits above the word, so the word gets the full
   width. */
@container (max-width: 480px) {
  .service-card__head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
  }

  .service-card__word {
    font-size: min(clamp(2.5rem, 4.6vw, 4.25rem), calc(100cqi / 8.1));
  }
}

/* Lenis smooth scrolling */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-stopped {
  overflow: clip;
}

/* Service photos: 3:2, with the same cut corner as the placeholders. */
.service__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% 100%, 0 100%, 0 var(--chamfer));
}

/* Image placeholder: final 3:2 ratio, swap for <img> when photos arrive */

.placeholder {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--wash);
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% 100%, 0 100%, 0 var(--chamfer));
}

.placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  pointer-events: none;
}

/* The outline's cut corner, drawn as a 45° hairline */
.placeholder::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--chamfer) * 1.4142);
  height: 1px;
  background: var(--line);
  transform: translate(0, var(--chamfer)) rotate(-45deg);
  transform-origin: 0 0;
}

.placeholder p {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--slate);
}

/* Case study (navy): specs and a volume figure. */

.case {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(72px, 10svh, 120px);
  letter-spacing: 0.01em;
}

/* Computers: the grid canvas (warp.js) paints the navy under the case study so
   the warped grid continues through it. */
html.has-grid .case {
  background: transparent;
}

/* Touch screens: the section paints its own navy and a flat grid that moves
   with the page exactly (warp.js aligns it with the page grid). */
html.grid-css-dark .case {
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgb(163 174 191 / 0.2) 1.5px, transparent 1.5px),
    linear-gradient(to bottom, rgb(163 174 191 / 0.2) 1.5px, transparent 1.5px);
  background-size: var(--grid-cell, 64px) var(--grid-cell, 64px);
  background-position: var(--grid-x, 0) var(--grid-y, 0);
}

.case__title {
  max-width: 14em;
  font-size: var(--t-heading);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.case__specs {
  margin-top: var(--s-6);
  max-width: 52rem;
}

.case__spec {
  /* No dividers: in this section the grid is the only set of lines. */
  display: grid;
  gap: 2px;
  padding-block: var(--s-3);
}

/* Classes, not :first-child: the warp's strip copies are each a first child. */
.case__spec.is-first {
  padding-top: 0;
}

.case__spec dt {
  font-size: var(--t-small);
  color: var(--mist);
}

.case__spec dd {
  margin: 0;
  font-size: var(--t-lead);
}

.case__accent {
  display: block;
  color: var(--gold);
}

.case__figure {
  margin-top: var(--s-7);
  color: var(--gold);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 500;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
}

.case__body {
  margin-top: var(--s-4);
  max-inline-size: 52ch;
  color: var(--mist);
  font-size: var(--t-lead);
  line-height: 1.5;
}

/* Contact */

.contact {
  /* Contact and footer share the last screen below the header, so its rest
     point also shows the footer (--footer-h is set by main.js). */
  min-height: calc(100svh - var(--header-h) - var(--footer-h, 0px));
  display: flex;
  align-items: center;
  padding-block: clamp(24px, 5svh, 96px);
  border-top: 1px solid var(--line);
}

/* A gold trace routes in from the right edge into the contact buttons (flair.js). */
.contact {
  position: relative;
}

.contact__trace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.contact__trace path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Drawn in from the edge towards the button when it comes into view. */
.contact__trace-line {
  stroke-dasharray: var(--trace-len, 2000);
  stroke-dashoffset: var(--trace-len, 2000);
  transition: stroke-dashoffset 1.4s var(--ease-out);
}

.contact__inner {
  position: relative; /* above the trace */
}

.contact__trace.is-drawn .contact__trace-line {
  stroke-dashoffset: 0;
}

/* Then a short bright pulse runs along it into the button every few seconds. */
.contact__trace-pulse {
  stroke-width: 3;
  stroke-dasharray: 40 var(--trace-len, 2000);
  stroke-dashoffset: 40;
  opacity: 0;
}

.contact__trace.is-live .contact__trace-pulse {
  animation: trace-pulse 4s linear 1.6s infinite;
}

@keyframes trace-pulse {
  0% { stroke-dashoffset: 40; opacity: 1; }
  45% { stroke-dashoffset: calc(var(--trace-len, 2000) * -1); opacity: 1; }
  46%, 100% { stroke-dashoffset: calc(var(--trace-len, 2000) * -1); opacity: 0; }
}

.contact__title {
  max-width: 16em;
  text-wrap: balance;
  font-size: var(--t-heading);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.contact__lead {
  margin-top: var(--s-5);
  color: var(--slate);
}

/* The enquiry form: three questions. */
.enquiry {
  margin-top: var(--s-6);
  max-width: 40rem;
}

.enquiry__field {
  margin: 0 0 var(--s-5);
  padding: 0;
  border: 0;
  min-width: 0;
}

.enquiry__label {
  display: block;
  margin-bottom: var(--s-2);
  padding: 0;
  font-size: var(--t-label);
  font-weight: 600;
}

.enquiry__optional {
  margin-left: var(--s-2);
  color: var(--slate);
  font-size: var(--t-small);
  font-weight: 400;
}

/* 16 px or more, so iOS doesn't zoom in on focus. */
.enquiry__input {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 25px; /* a full pill on the 50 px email box, as on the buttons */
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  appearance: none;
}

input.enquiry__input {
  height: 50px;
}

.enquiry__textarea {
  padding-block: 14px;
  min-height: 7.5rem;
  resize: vertical;
}

.enquiry__input::placeholder {
  color: var(--slate);
  opacity: 0.75;
}

.enquiry__input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.enquiry__input[aria-invalid="true"] {
  border-color: #B42318;
}

.enquiry__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* Tap-to-select pills, the same shape as the buttons. */
.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.chip span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding-inline: 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background-color var(--dur-ui) var(--ease-out), color var(--dur-ui) var(--ease-out);
}

.chip input:checked + span {
  background: var(--ink);
  color: var(--paper);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.enquiry__error {
  min-height: calc(2 * 1.45em); /* room for two lines, always */
  margin-top: var(--s-3);
  color: #B42318;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.45;
}

/* The other way in: book a call instead of writing. */
.contact__or {
  margin-top: var(--s-6);
  max-width: 40rem;
}

.contact__or-divider {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  color: var(--slate);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 500;
  font-stretch: 112%;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.contact__or-divider::before,
.contact__or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Same size as the section heading: the second way in, given equal weight. */
.contact__or-title {
  margin-top: var(--s-6);
  font-size: var(--t-heading);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.contact__or-text {
  margin: var(--s-3) 0 var(--s-5);
  color: var(--slate);
  font-size: var(--t-lead);
}

.btn--submit {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.btn--submit:disabled {
  cursor: progress;
  opacity: 0.7;
}

.enquiry__done {
  margin-top: var(--s-6);
  padding: var(--s-6) var(--s-7);
  border: 1.5px solid var(--ink);
  border-radius: 25px;
  background: var(--paper);
  max-width: 40rem;
}

.enquiry__done:focus {
  outline: none;
}

.enquiry__done-title {
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.enquiry__done-text {
  margin-top: var(--s-3);
  color: var(--slate);
  font-size: var(--t-lead);
}

.contact__actions {
  margin-top: var(--s-2);
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

/* Secondary pill: same size as the main button, outlined in navy. */
.btn--outline .btn__body {
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  transition: background-color var(--dur-ui) var(--ease-out), color var(--dur-ui) var(--ease-out);
}

@media (hover: hover) {
  .btn--outline:hover .btn__body {
    background: var(--ink);
    color: var(--paper);
  }
}


/* Footer */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: var(--s-8);
  font-size: var(--t-small);
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.site-footer a {
  text-decoration-color: var(--gold);
}

.trace-mark {
  width: 220px;
  height: 24px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
}

.site-footer__row {
  margin-top: var(--s-6);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.site-footer__logo {
  flex: none;
  width: 56px;
  height: 56px;
}

.site-footer__meta {
  color: var(--mist);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 719px) {
  .site-footer__row {
    align-items: flex-start;
  }
}

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

/* Short phones: contact and footer share the last screen, so both need to be
   compact (placed last so it overrides the base rules above). */
@media (max-width: 479px) and (max-height: 740px) {
  .contact {
    padding-block: 16px;
  }

  .contact .btn {
    margin-top: 24px;
  }

  .site-footer {
    padding-block: 28px;
  }

  .site-footer__row {
    margin-top: 16px;
  }
}

/* Hero brand, "stacked" version: a larger logo, the name on
   two lines with a small gap, and a smaller headline. To go back to the first
   version, set data-hero="inline" on <html> in index.html. */
html[data-hero="stacked"] {
  --brand-k: 3.1;
  --t-name: 0.95rem;
}

@media (max-width: 479px) {
  html[data-hero="stacked"] {
    --brand-k: 2.2;
    --t-name: 0.8125rem;
  }
}

@media (max-width: 479px) and (max-height: 740px) {
  html[data-hero="stacked"] {
    --brand-k: 1.9;
  }
}

html[data-hero="stacked"] .brand__name > span {
  display: block;
}

html[data-hero="stacked"] .brand__name > span + span {
  margin-top: 0.22em;
}

html[data-hero="stacked"] .hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}
