/* Display face: Archivo Black at width 80 (OFL), tuned to match the design's Bell Gothic Black
   line lengths and cap height. Metric overrides pin the baseline so text sits where the PDF puts it. */
@font-face {
  font-family: "ML Display Archivo";
  src: url("/fonts/archivo-black-80.woff") format("woff");
  font-weight: 900;
  font-display: swap;
  ascent-override: 87.8%;
  descent-override: 21%;
  line-gap-override: 0%;
}

/* Helvetica where available (Mac), Arial elsewhere (metric-compatible), with fixed metrics. */
@font-face {
  font-family: "ML Sans";
  src: local("Helvetica Neue"), local("HelveticaNeue"), local("Helvetica"), local("Arial"), local("ArialMT");
  font-weight: 400;
  ascent-override: 90.5%;
  descent-override: 21.2%;
  line-gap-override: 0%;
}

/* Theme colours are overridden per site from Site settings (see layout.js themeStyle). */
:root {
  /* 1 unit = 1 px of the 1920-wide PDF artboard, scaled to the page width. */
  --u: calc(100cqw / 1920);
  --font-display: "ML Display Archivo", "Arial Black", sans-serif;
  --color-primary: #ef3522;
  --color-accent: #1d1d1b;
  --color-bg: #ffffff;
  --color-text: #ef3522;
  --color-muted: color-mix(in srgb, var(--color-text) 65%, var(--color-bg));
  --color-line: color-mix(in srgb, var(--color-text) 12%, var(--color-bg));
  --color-surface: color-mix(in srgb, var(--color-text) 3%, var(--color-bg));
  --radius: 14px;
  --container: 1120px;
  --space: clamp(3rem, 7vw, 5.5rem);
  --font: "ML Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  /* Makes 100cqw = page width without the scrollbar, so the artboard never overflows. */
  container-type: inline-size;
  position: relative;
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: var(--color-primary);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.container--narrow {
  --container: 760px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
}

/* Header: only the small menu, top-right (PDF: Helvetica 21px, baseline 51.6, right edge 1884). */
.site-header {
  position: absolute;
  inset: 0 0 auto auto;
  z-index: 10;
}

.site-nav {
  position: absolute;
  top: calc(31.7 * var(--u));
  right: calc(36 * var(--u));
  display: flex;
  gap: calc(20.5 * var(--u));
  white-space: nowrap;
  font-size: max(12px, calc(21 * var(--u)));
  line-height: 1.2;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 700px) {
  .site-nav {
    top: 16px;
    right: 16px;
    gap: 14px;
    font-size: 14px;
  }
}

/* Modules */
.module {
  padding-block: var(--space);
}

/* Consecutive plain modules share spacing; full-width bands (hero, cta) carry their own. */
.module + .module {
  padding-top: 0;
}

.module--hero + .module,
.module--cta + .module {
  padding-top: var(--space);
}

.module--hero,
.module--cta {
  padding-block: 0;
}

.page-title {
  padding-top: var(--space);
}

.intro,
.lead {
  color: var(--color-muted);
  max-width: 65ch;
}

.lead {
  font-size: 1.2rem;
}

.prose {
  max-width: 65ch;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.button:hover {
  filter: brightness(1.08);
}

.button--light {
  background: var(--color-bg);
  color: var(--color-text);
}

/* Hero */
.hero {
  padding-block: clamp(4rem, 12vw, 9rem);
  background: var(--color-surface);
}

.hero--image {
  color: #fff;
  background:
    linear-gradient(rgb(0 0 0 / 0.25), rgb(0 0 0 / 0.55)),
    var(--hero-image) center / cover no-repeat;
}

.hero--image .lead {
  color: rgb(255 255 255 / 0.9);
}

.hero__inner {
  max-width: var(--container);
}

.hero h1 {
  max-width: 18ch;
}

/* Text + image */
.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

@media (min-width: 820px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split--image-left .split__media {
    order: -1;
  }
}

.split__media {
  margin: 0;
}

.split__media img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Feature cards */
.cards {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card__icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Gallery */
.gallery {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
}

.gallery--cols-2 {
  --cols: 2;
}

.gallery--cols-4 {
  --cols: 4;
}

@media (max-width: 700px) {
  .gallery {
    --cols: 2;
  }
}

.gallery__item {
  margin: 0;
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.2s ease;
}

.gallery__item a:hover img {
  transform: scale(1.02);
}

.gallery__item figcaption {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 0.4rem;
}

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(94vw, 1400px);
}

.lightbox::backdrop {
  background: rgb(0 0 0 / 0.85);
}

.lightbox img {
  max-height: 85vh;
  width: auto;
  margin-inline: auto;
  border-radius: 8px;
}

.lightbox__caption {
  color: #fff;
  text-align: center;
  margin: 0.6rem 0 0;
}

.lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  font-size: 1.6rem;
  cursor: pointer;
}

/* Call to action */
.cta {
  background: var(--color-primary);
  color: #fff;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta h2 {
  margin-bottom: 0.3em;
}

.cta p {
  margin: 0;
  opacity: 0.9;
}

/* FAQ */
.faq__item {
  border-bottom: 1px solid var(--color-line);
  padding-block: 1rem;
}

.faq__item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
}

.faq__answer {
  padding-top: 0.75rem;
  color: var(--color-muted);
}

/* Map */
.map {
  margin-top: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-line);
}

.map iframe {
  display: block;
  width: 100%;
  height: clamp(280px, 45vw, 460px);
  border: 0;
}

.map + p {
  margin-top: 0.75rem;
}

/* Contact */
.contact-form {
  display: grid;
  gap: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--color-line);
  background: var(--color-bg);
  color: var(--color-text);
}

.contact-form button {
  justify-self: start;
}

/* Landing artboard (template.pdf page 1), positioned on the 1920×1080 grid in --u units. */
.module--landing {
  padding: 0;
}

.landing {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.landing__title {
  position: absolute;
  z-index: 1;
  left: 0;
  top: calc(39.45 * var(--u));
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(141.4 * var(--u));
  line-height: calc(124 * var(--u));
  /* PDF character spacing: -0.05em of the 132.5px original = -6.62px per letter. */
  letter-spacing: calc(-6.62 * var(--u));
  color: var(--color-primary);
  white-space: nowrap;
  text-wrap: nowrap;
}

.landing__line {
  display: block;
  padding-left: calc(213.6 * var(--u));
}

.landing__line:first-child {
  padding-left: calc(35.4 * var(--u));
}

.landing__dot {
  position: absolute;
  z-index: 1;
  left: calc(166 * var(--u));
  top: calc(587 * var(--u));
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
  border-radius: 50%;
  background: var(--color-primary);
}

.landing__body {
  position: absolute;
  z-index: 1;
  left: calc(36 * var(--u));
  top: calc(890.2 * var(--u));
  font-size: calc(34 * var(--u));
  line-height: calc(40.8 * var(--u));
  color: var(--color-text);
  white-space: nowrap;
}

.landing__body p {
  margin: 0;
}

.landing__bodyline {
  display: block;
}

/* The hands sit above the text, as in the PDF. */
.landing__floats {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  --ox: 0;
  --oy: 0;
}

.landing__float {
  position: absolute;
  left: calc((var(--x) + var(--ox)) * var(--u));
  top: calc((var(--y) + var(--oy)) * var(--u));
  width: calc(var(--w) * var(--u));
  max-width: none;
  height: auto;
  will-change: transform;
}

.landing[data-motion="float"] .landing__float {
  animation: landing-float var(--dur, 18s) ease-in-out var(--delay, 0s) infinite;
}

/* Slow, organic drift: a loose loop with a little rotation. */
@keyframes landing-float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(calc(var(--drift) * var(--u)), calc(var(--drift) * -0.8 * var(--u))) rotate(calc(var(--tilt) * 1deg));
  }
  50% {
    transform: translate(calc(var(--drift) * 0.3 * var(--u)), calc(var(--drift) * 0.9 * var(--u))) rotate(calc(var(--tilt) * -0.6deg));
  }
  75% {
    transform: translate(calc(var(--drift) * -0.9 * var(--u)), calc(var(--drift) * 0.2 * var(--u))) rotate(calc(var(--tilt) * 0.5deg));
  }
}

/* Phones: the artboard would be unreadably small, so stack it. Desktop/tablet keep the exact PDF layout. */
@media (max-width: 700px) {
  .landing {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    padding: 64px 16px 40px;
  }

  .landing__title {
    position: static;
    order: 1;
    font-size: 12.4cqw;
    line-height: 1;
    white-space: normal;
  }

  .landing__line,
  .landing__line:first-child {
    padding-left: 0;
  }

  .landing__line + .landing__line {
    padding-left: 8cqw;
  }

  /* Hands keep their relative arrangement, cropped to their area and enlarged. */
  .landing__floats {
    position: relative;
    order: 2;
    inset: auto;
    margin: 0 -16px;
    --u: calc(100cqw / 1540);
    --ox: -320;
    --oy: -110;
    height: calc(900 * var(--u));
  }

  .landing__dot {
    display: none;
  }

  .landing__body {
    position: static;
    order: 3;
    font-size: 17px;
    line-height: 1.35;
    white-space: normal;
  }

  .landing__bodyline {
    display: inline;
  }
}

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

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

  .gallery__item img {
    transition: none;
  }

  .landing__float {
    animation: none;
  }
}

/* Custom cursor: the red dot from the landing page (Site settings → "Use the red dot as mouse pointer").
   Sources: data/cursor/. A bigger dot on anything clickable; text fields keep the normal text cursor. */
:where(html.has-dot-cursor),
:where(html.has-dot-cursor) * {
  cursor: url("/media/cursor/dot.png") 12 12, auto;
  cursor: image-set(url("/media/cursor/dot.png") 1x, url("/media/cursor/dot@2x.png") 2x) 12 12, auto;
}

:where(html.has-dot-cursor) :is(a, button, summary, select, label, [role="button"]),
:where(html.has-dot-cursor) :is(a, button, summary, [role="button"]) * {
  cursor: url("/media/cursor/dot-link.png") 18 18, pointer;
  cursor: image-set(url("/media/cursor/dot-link.png") 1x, url("/media/cursor/dot-link@2x.png") 2x) 18 18, pointer;
}

:where(html.has-dot-cursor) :is(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"]), textarea) {
  cursor: text;
}
