/* Murdoch's - Agricultural Contractors - Field catalogue
   Palette: daylight paper, field-dark ink, one loader-yellow accent.
   Schibsted Grotesk only. Hairline rules, 2px corners. */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-var-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-var-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #1b1f18;
  --ink-raised: #2a3026;
  --paper: #f4f2ec;
  --paper-deep: #e8e5db;
  --line: #cfcbbe;
  --muted: #545a4e;
  --muted-on-dark: #bec2b3;
  --hivis: #f5b800;
  --hivis-deep: #dba400;
  --shell: 1180px;
  --header: 64px;
  --radius: 2px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--muted) var(--paper-deep);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--hivis);
  color: var(--ink);
}

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

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

p,
figure,
address {
  margin: 0;
}

address {
  font-style: normal;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  padding: 12px 18px;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

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

[id] {
  scroll-margin-top: calc(var(--header) + 24px);
}

/* ---------- call action ---------- */

.call {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--hivis);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  border-radius: var(--radius);
  transition: background-color 0.2s var(--ease-out);
}

.call:hover {
  background: var(--hivis-deep);
}

.call-small {
  font-size: 0.9375rem;
  padding: 9px 14px;
}

.call-large {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  letter-spacing: -0.01em;
  padding: 16px 24px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--header);
}

.wordmark {
  font-weight: 900;
  font-size: 1.375rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 0.9375rem;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--hivis);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
}

.hero > * {
  grid-area: 1 / 1;
}

.hero-photo img {
  width: 100%;
  height: clamp(440px, calc(100svh - var(--header) - 120px), 720px);
  object-fit: cover;
  object-position: 62% 55%;
}

.hero-shell {
  width: 100%;
  align-self: end;
  padding-bottom: 40px;
}

.hero-panel {
  background: var(--paper);
  max-width: 470px;
  padding: 32px 36px 36px;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px -12px rgba(27, 31, 24, 0.45);
}

.hero h1 {
  margin-bottom: 18px;
}

.hero-name {
  display: block;
  font-size: clamp(3rem, 5.6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.hero-trade {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.hero-line {
  color: var(--muted);
  max-width: 40ch;
  margin-bottom: 26px;
  text-wrap: pretty;
}

/* ---------- service index ---------- */

.service-index {
  background: var(--ink);
  color: var(--paper);
}

.index-list {
  list-style: none;
  margin-block: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.index-list li + li {
  border-left: 1px solid rgba(244, 242, 236, 0.22);
}

.index-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  padding: 26px 20px;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: inset 0 -4px 0 transparent;
  transition: box-shadow 0.25s var(--ease-out);
}

.index-list li:first-child a {
  padding-left: 0;
}

.index-list .icon {
  color: var(--hivis);
  transition: transform 0.25s var(--ease-out);
}

.index-list a:hover {
  box-shadow: inset 0 -4px 0 var(--hivis);
}

.index-list a:hover .icon {
  transform: translate(2px, 2px);
}

.service-index :focus-visible,
.contact :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--hivis);
}

/* ---------- services ---------- */

.services {
  padding-block: 96px;
}

.services-grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 48px;
  align-items: start;
}

.services-head {
  position: sticky;
  top: calc(var(--header) + 32px);
}

.services-head h2 {
  margin-bottom: 12px;
}

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

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service {
  position: relative;
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 8px 32px;
  align-items: baseline;
  padding-block: 30px 34px;
  border-top: 1px solid var(--ink);
}

.service:last-child {
  border-bottom: 1px solid var(--ink);
}

/* The one authored moment: the service chosen in the index gets the
   hi-vis rule drawn across it. */
.service::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--hivis);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
}

.service:target::before {
  transform: scaleX(1);
}

.service h3 {
  font-size: clamp(1.625rem, 3vw, 2.375rem);
}

.service p {
  color: var(--muted);
  max-width: 34ch;
}

/* ---------- photos ---------- */

.photos {
  border-top: 1px solid var(--line);
  padding-block: 96px;
}

.photos h2 {
  margin-bottom: 36px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.plate-wide {
  grid-column: span 7;
}

.plate-tall,
.plate-narrow {
  grid-column: span 5;
}

.plate-full {
  grid-column: 1 / -1;
}

.plate {
  background: var(--paper-deep);
  border-radius: var(--radius);
  overflow: hidden;
}

.plate img {
  width: 100%;
  height: clamp(260px, 36vw, 460px);
  object-fit: cover;
}

.plate-tall img {
  object-position: 50% 58%;
}

.plate-full img {
  height: clamp(260px, 32vw, 420px);
  object-position: 50% 68%;
}

/* ---------- contact ---------- */

.contact {
  background: var(--ink);
  color: var(--paper);
  padding-block: 96px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: end;
}

.contact h2 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}

.contact-lede {
  color: var(--muted-on-dark);
  max-width: 40ch;
}

.contact-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.contact address {
  color: var(--muted-on-dark);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--muted-on-dark);
  border-top: 1px solid rgba(244, 242, 236, 0.16);
  padding-block: 28px;
  font-size: 0.875rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- not found ---------- */

.not-found {
  padding-block: 120px;
}

.not-found h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}

.not-found p {
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 28px;
}

.not-found-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-weight: 700;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 0;
  }

  .index-list li {
    border-top: 1px solid rgba(244, 242, 236, 0.22);
  }

  .index-list li:nth-child(-n + 2) {
    border-top: none;
  }

  .index-list li:nth-child(odd) {
    border-left: none;
  }

  .index-list a,
  .index-list li:first-child a {
    padding: 20px 24px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .services-head {
    position: static;
  }
}

@media (max-width: 760px) {
  :root {
    --header: 56px;
  }

  .site-nav {
    display: none;
  }

  .header-row {
    justify-content: space-between;
  }

  .hero-photo img {
    height: clamp(220px, 38svh, 340px);
  }

  .hero > * {
    grid-area: auto;
  }

  .hero-shell {
    padding-inline: 0;
    padding-bottom: 0;
  }

  .hero-panel {
    max-width: none;
    padding: 28px 24px 32px;
    box-shadow: none;
  }

  .index-list a,
  .index-list li:first-child a {
    font-size: 1.0625rem;
    padding: 18px 24px;
  }

  .service {
    grid-template-columns: 1fr;
    padding-block: 24px 26px;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .plate-wide,
  .plate-tall,
  .plate-narrow,
  .plate-full {
    grid-column: auto;
  }

  .plate img {
    height: auto;
  }

  .plate-tall img {
    aspect-ratio: 4 / 5;
  }

  .services,
  .photos,
  .contact {
    padding-block: 64px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-row {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 380px) {
  .wordmark {
    font-size: 1.1875rem;
  }

  .call-small {
    padding-inline: 10px;
  }
}

/* ---------- reduced motion ---------- */

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

  .call,
  .index-list a,
  .index-list .icon,
  .service::before {
    transition: none;
  }
}
