/* Bushranger Films. Shared styles. Colours come from the brand colour sheet. */

@font-face {
  font-family: "Anton";
  src: url("/assets/fonts/anton-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Brand charcoals */
  --black: #000000;
  --night: #1E1C1F;
  --char: #2B2A29;
  --slate: #353B3C;
  --ember: #2E1D1A;

  /* Brand greys (decoration only below #8A8C8E) */
  --steel: #4B5255;
  --gunmetal: #6B7378;

  /* Brand rust browns */
  --rust-deep: #5F362B;
  --rust: #8A594C;
  --rust-light: #BF8E79;
  --rust-pale: #D4AE9C;

  /* Text, all AA or better on night, char, ember and black */
  --bone: #F3EEE9;
  --text: #D8D1CA;
  --muted: #A8A4A0;

  --display: "Anton", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --body: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(16px, 5vw, 56px);
  --max: 1180px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .09 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--bone);
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

p,
ul,
ol {
  margin: 0;
}

p + p {
  margin-top: 1em;
}

a {
  color: var(--rust-pale);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--bone);
}

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

::selection {
  background: var(--rust-light);
  color: var(--night);
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Skip link */

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--bone);
  color: var(--night);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
  color: var(--night);
}

/* Header */

.site-header {
  position: relative;
  z-index: 5;
  background: var(--black);
  border-bottom: 1px solid #262427;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 28px;
  padding-block: 14px;
}

.brand {
  display: inline-block;
  line-height: 0;
}

.brand img {
  width: auto;
  height: 52px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 12px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover {
  color: var(--rust-pale);
}

/* Hero: a title card */

.hero {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: clamp(28px, 5vh, 64px) 0 clamp(56px, 10vh, 120px);
  background:
    var(--grain),
    radial-gradient(ellipse 70% 60% at 50% 34%, rgba(107, 115, 120, 0.2), transparent 70%),
    linear-gradient(180deg, var(--black) 0%, var(--night) 42%, var(--night) 70%, var(--black) 100%);
  overflow: hidden;
}

.hero::after {
  /* thin letterbox rule under the card */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(420px, 60%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rust), transparent);
  transform: translateX(-50%);
}

.credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--rust-light);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  line-height: 1.5;
  text-transform: uppercase;
  text-wrap: balance;
}

.credit::before,
.credit::after {
  content: "";
  flex: 0 1 56px;
  height: 1px;
  background: var(--rust);
}

.viewfinder {
  --corner: var(--rust-light);
  --arm: clamp(18px, 3vw, 30px);
  position: relative;
  width: min(100%, 420px);
  margin: clamp(16px, 2.5vh, 26px) auto clamp(24px, 3.5vh, 36px);
  padding: clamp(16px, 3vw, 30px);
  background:
    linear-gradient(var(--corner) 0 0) top left / var(--arm) 2px no-repeat,
    linear-gradient(var(--corner) 0 0) top left / 2px var(--arm) no-repeat,
    linear-gradient(var(--corner) 0 0) top right / var(--arm) 2px no-repeat,
    linear-gradient(var(--corner) 0 0) top right / 2px var(--arm) no-repeat,
    linear-gradient(var(--corner) 0 0) bottom left / var(--arm) 2px no-repeat,
    linear-gradient(var(--corner) 0 0) bottom left / 2px var(--arm) no-repeat,
    linear-gradient(var(--corner) 0 0) bottom right / var(--arm) 2px no-repeat,
    linear-gradient(var(--corner) 0 0) bottom right / 2px var(--arm) no-repeat;
}

.viewfinder img {
  width: 100%;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
}

.hero h1 {
  max-width: 21ch;
  margin-inline: auto;
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 4rem);
  line-height: 0.98;
}

.lede {
  max-width: 58ch;
  margin: 20px auto 0;
  color: var(--text);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
}

.cta-row {
  margin-top: 28px;
}

.button {
  display: inline-block;
  padding: 16px 26px;
  border: 0;
  border-radius: 2px;
  background: var(--rust-light);
  color: var(--night);
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  background: var(--rust-pale);
  color: var(--night);
}

.button:active {
  transform: translateY(1px);
}

.aside-line {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Sections */

.section {
  padding-block: clamp(64px, 10vw, 128px);
}

.section-head {
  display: grid;
  gap: 18px 56px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head h2,
.split h2 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);
}

.section-head p {
  max-width: 56ch;
  color: var(--text);
  font-size: 1.125rem;
}

@media (min-width: 880px) {
  .section-head {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: end;
  }
}

/* Services */

.services {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
  counter-reset: svc;
}

.service {
  position: relative;
  padding: 28px 0 36px;
  border-top: 1px solid var(--steel);
}

.service .num {
  display: block;
  margin-bottom: 18px;
  color: var(--rust-light);
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.2em;
  line-height: 1;
}

.service h3 {
  margin-bottom: 14px;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
  line-height: 1.05;
}

.service p {
  color: var(--text);
}

.service .more {
  display: inline-block;
  margin-top: 10px;
  padding-block: 8px;
  font-weight: 600;
}

@media (min-width: 880px) {
  .services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 40px;
  }

  .service {
    padding-bottom: 8px;
  }
}

/* Mining Boom */

.mining {
  position: relative;
  background:
    var(--grain),
    radial-gradient(ellipse 60% 70% at 88% 10%, rgba(138, 89, 76, 0.22), transparent 70%),
    var(--ember);
  border-block: 1px solid var(--rust-deep);
}

.mining .wrap {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
}

.mining h2 {
  font-size: clamp(3.25rem, 1.8rem + 6.4vw, 7.5rem);
  line-height: 0.9;
}

.sub {
  margin-top: 14px;
  color: var(--rust-pale);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-wrap: balance;
}

.mining .story {
  max-width: 58ch;
  margin-top: 30px;
}

.custom-card {
  align-self: start;
  padding: clamp(24px, 4vw, 44px);
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--rust-deep);
  border-top: 3px solid var(--rust-light);
}

.custom-card h3 {
  margin-bottom: 18px;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
}

.custom-card h4 {
  margin: 28px 0 12px;
  color: var(--rust-pale);
  font-family: var(--body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.4;
}

.uses {
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(191, 142, 121, 0.28);
}

.uses li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(191, 142, 121, 0.28);
  color: var(--bone);
}

.uses li::before {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  background: var(--rust-light);
  transform: translateY(-1px) rotate(45deg);
}

.custom-card .cta-row {
  margin-top: 30px;
}

@media (min-width: 960px) {
  .mining .wrap {
    grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
    align-items: start;
  }
}

/* About */

.split {
  display: grid;
  gap: 24px 56px;
}

.split .body {
  max-width: 62ch;
  padding-left: clamp(18px, 3vw, 32px);
  border-left: 2px solid var(--rust);
  font-size: 1.125rem;
}

@media (min-width: 880px) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

/* Contact */

.contact {
  background:
    var(--grain),
    radial-gradient(ellipse 80% 90% at 50% 120%, rgba(191, 142, 121, 0.14), transparent 70%),
    var(--char);
  text-align: center;
}

.contact h2 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);
}

.contact p {
  max-width: 54ch;
  margin: 20px auto 0;
  font-size: 1.125rem;
}

.big-mail {
  display: inline-block;
  margin-top: 34px;
  padding: 6px 2px;
  color: var(--bone);
  font-family: var(--display);
  /* the address is about 12.3em wide in Anton, so it always fits on one line */
  font-size: min(4.25rem, calc((100vw - 2 * var(--gutter)) / 12.9));
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-decoration: underline;
  text-decoration-color: var(--rust-light);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}

.big-mail:hover {
  color: var(--rust-pale);
}

/* Plain pages: privacy and 404 */

.page {
  padding-block: clamp(48px, 8vw, 104px);
}

.prose {
  max-width: 68ch;
}

.prose h1 {
  font-size: clamp(2.75rem, 1.6rem + 4.6vw, 5rem);
  margin-bottom: 12px;
}

.prose h2 {
  margin: 44px 0 12px;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
}

.prose .updated {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--steel);
  color: var(--muted);
  font-size: 0.9375rem;
}

.lost {
  text-align: center;
}

.lost .viewfinder {
  width: min(100%, 300px);
  margin-top: 0;
}

.lost h1 {
  max-width: 16ch;
  margin-inline: auto;
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
}

.lost p {
  margin-top: 26px;
}

/* Footer */

.site-footer {
  flex-shrink: 0;
  padding-block: 48px 40px;
  background: var(--black);
  border-top: 1px solid #262427;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid #262427;
}

.footer-name {
  color: var(--bone);
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding-block: 12px;
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.footer-links a:hover {
  color: var(--rust-pale);
}

.legal {
  max-width: 76ch;
  margin-top: 24px;
}

.legal + .legal {
  margin-top: 8px;
}

/* Motion: one quiet reveal on the title card, only when the visitor is fine with motion */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Text and the email button render immediately so nothing a reader needs is ever hidden */
  .hero .viewfinder {
    animation: iris 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
}

@keyframes iris {
  from {
    opacity: 0;
    transform: scale(0.97);
    filter: brightness(0.4);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

[id] {
  scroll-margin-top: 16px;
}

@media (max-width: 560px) {
  .site-header .wrap {
    padding-block: 12px 0;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    justify-content: space-between;
    gap: 0 12px;
  }

  .site-nav a {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .credit {
    letter-spacing: 0.16em;
    font-size: 0.8125rem;
  }

  .brand img {
    height: 44px;
  }

  .credit::before,
  .credit::after {
    display: none;
  }

  .button {
    display: block;
    width: 100%;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 380px) {
  .site-nav ul {
    gap: 0 8px;
  }

  .site-nav a {
    letter-spacing: 0.03em;
  }
}
