/* Epic Engineering Limited: site styles.
   Design from the approved mockup (mockup/index.html). Brand colours sampled from the ute signage. */

:root {
  --blue: #1F45B5;
  --blue-dark: #17348A;
  --navy: #14213D;
  --red: #C8102E;
  --ink: #1C2333;
  --muted: #5A6475;
  --line: #DDE1E8;
  --paper: #F4F5F7;
  --white: #FFFFFF;
  --wrap: 1120px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Source Sans 3", "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; color: var(--navy); }
h2 { font-size: 34px; font-weight: 700; margin-bottom: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 3px;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.topbar :focus-visible,
.contact :focus-visible,
footer :focus-visible { outline-color: var(--white); }
.skip-link:focus-visible { outline-color: var(--red); }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #C9D1E3; font-size: 14px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 9px; padding-bottom: 9px; }
.topbar strong { color: var(--white); font-weight: 600; }
.topbar a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.masthead { border-bottom: 1px solid var(--line); background: var(--white); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
nav { display: flex; align-items: center; gap: 28px; font-size: 16px; font-weight: 600; }
nav a { color: var(--navy); }
nav .navlinks { display: flex; gap: 28px; }
nav .navlinks a:hover { color: var(--blue); }

/* Logo (recreated from the ute signage) */
.logo { display: block; width: 190px; height: auto; }
.logo-sm { width: 140px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 12px 20px; border-radius: 3px; font-size: 16px; font-weight: 700; }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-dark); }
.btn-line { border: 2px solid var(--navy); color: var(--navy); padding: 10px 18px; }
.btn-line:hover { background: var(--navy); color: var(--white); }

/* ---------- Hero ---------- */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { font-size: 48px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 18px; }
.hero .lead { font-size: 20px; color: var(--muted); margin-bottom: 28px; max-width: 34ch; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-photo { position: relative; }
.hero-photo::before { content: ""; position: absolute; left: -10px; top: 24px; bottom: 24px; width: 6px; background: var(--red); }
.hero-photo img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: var(--line); }

/* ---------- Services ---------- */
.services-head { margin-bottom: 36px; }
.services-head p { color: var(--muted); max-width: 52ch; }
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); list-style: none; }
.service { background: var(--white); padding: 26px 24px 28px; border-top: 4px solid transparent; }
.service:hover { border-top-color: var(--blue); }
.service .num { font-size: 13px; font-weight: 700; color: var(--red); letter-spacing: 1px; }
.service h3 { font-size: 22px; margin: 6px 0 8px; }
.service p { color: var(--muted); font-size: 16px; }
.service-ask { background: var(--paper); display: flex; flex-direction: column; justify-content: center; }
.service-ask a { color: var(--blue); font-weight: 700; white-space: nowrap; }

/* ---------- About ---------- */
.about { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
.about p { margin-bottom: 16px; }
.facts { align-self: start; padding: 8px 24px; background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--blue); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 600; text-align: right; }
.facts a:hover { color: var(--blue); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 32px; }
.gallery img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; background: var(--line); }

/* ---------- Contact ---------- */
.contact { background: var(--blue); color: var(--white); }
.contact h2 { color: var(--white); }
.contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact .intro { color: #D6DEF5; margin-bottom: 28px; font-size: 18px; }
.clist { list-style: none; }
.clist li { display: grid; grid-template-columns: 110px 1fr; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .22); }
.clist li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .22); }
.clist .k { color: #B9C6EC; font-size: 15px; }
.clist .v { font-size: 18px; font-weight: 600; }
.clist .v small { display: block; font-size: 14px; font-weight: 400; color: #C9D3F0; }
.clist a:hover { text-decoration: underline; }

.map { position: relative; min-height: 380px; overflow: hidden; border-radius: 4px; background: #EEF1F6; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.directions { display: inline-block; margin-top: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.directions:hover { text-decoration-thickness: 2px; }

/* ---------- Footer ---------- */
footer { background: var(--navy); color: #AEB8CE; font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 32px; }

/* ---------- 404 ---------- */
.notfound { padding: 96px 0; }
.notfound p { color: var(--muted); font-size: 20px; margin-bottom: 28px; max-width: 46ch; }
.notfound .ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  nav .navlinks { display: none; }
  .hero .wrap, .about .wrap, .contact .wrap { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: 36px; }
  .hero-photo::before { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery img:last-child { grid-column: span 2; aspect-ratio: 4 / 3; }
  .section { padding: 56px 0; }
  .services { grid-template-columns: 1fr 1fr; }
  .service-ask { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .logo { width: 150px; }
  nav .btn { padding: 9px 12px; font-size: 14px; }
  .clist li { grid-template-columns: 1fr; gap: 2px; }
  .services { grid-template-columns: 1fr; }
}
