/* NT Allan Engineering Inc. - hand-written stylesheet.
   Re-creates the sage look of the live site without Elementor or Astra. */

@font-face {
  font-family: "Karla";
  src: url("/assets/fonts/karla.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("/assets/fonts/rubik.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #4e7d32;        /* button (darkened from live #74a84a for WCAG 4.5:1 with white text) */
  --green-dark: #2c541d;   /* headings, hover, current nav */
  --ink: #181818;
  --black: #000;
  --sage-top: #a9b4a0;     /* page gradient, top */
  --sage-bottom: #e8ebe6;  /* page gradient, bottom */
  --band-top: #f1f2ef;     /* talk-to-us band */
  --band-bottom: #858685;
  --wrap: 1100px;
  --body: "Karla", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --head: "Rubik", "Karla", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sage-bottom);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }
a:hover { color: var(--black); }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* The sage gradient lives on .page (header + main) and ends where the footer starts. */
.page {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--sage-top) 0%, var(--sage-bottom) 100%);
}
main { flex: 1 0 auto; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Headings */
h1, h2, h3 { font-family: var(--head); color: var(--green-dark); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 500; }

/* Header */
.site-header { padding: 14px 0 10px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 20px; text-decoration: none; color: var(--black); min-width: 0; }
.brand img { width: 154px; height: auto; flex: none; }
.brand-name { display: block; font: 700 clamp(1.3rem, 3.2vw, 2.06rem)/1.15 var(--head); color: var(--black); }
.brand-tag { display: block; font-size: clamp(.95rem, 1.8vw, 1.18rem); color: var(--black); margin-top: 4px; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 28px; }
.nav a { display: block; padding: 10px 0; font-size: .9375rem; text-transform: uppercase; text-decoration: none; color: var(--black); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--green-dark); }
.header-phone { font-size: .9375rem; text-decoration: none; color: var(--green-dark); font-weight: 700; letter-spacing: .5px; }
.header-phone:hover { color: var(--black); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  background: var(--green); color: #fff; border: 0; border-radius: 0;
  padding: 15px 40px; font: 400 .9375rem/1.2 var(--body);
  letter-spacing: 3px; text-transform: uppercase; text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--green-dark); color: #fff; }
.btn span { min-width: 0; overflow-wrap: anywhere; }
.btn svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
.btn-row { display: flex; flex-direction: column; align-items: center; gap: 20px; margin: 28px 0; }
.btn { max-width: 100%; }

/* Photos */
.photo { margin: 0; }
.photo img { width: 100%; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }

/* Home */
.hero { padding: 24px 0 36px; }
.hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 36px; align-items: center; }
.hero-text p { font-size: 1.15rem; }
.services { padding: 20px 0 10px; }
.services > .wrap > h2 { text-align: center; margin-bottom: 1.2em; }
.svc { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; margin: 0 0 56px; }
.svc.flip .svc-photo { order: 2; }
.svc-text h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin-bottom: .5em; }
.svc-text p:last-child { margin-bottom: 0; }
.svc-list { margin: 0; padding-left: 1.2em; }
.svc-list li { margin: .25em 0; }
.svc.no-photo { display: block; max-width: 760px; margin-left: auto; margin-right: auto; }
.about { padding: 10px 0 60px; }
.about h2 { text-align: center; }
.about p { max-width: 760px; margin-left: auto; margin-right: auto; }

/* Talk-to-us band */
.band { background: linear-gradient(180deg, var(--band-top) 0%, var(--band-bottom) 100%); padding: 56px 20px 72px; text-align: center; }
.band h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); text-transform: uppercase; letter-spacing: 4.9px; margin-bottom: 1.1em; }

/* Work */
.page-head { padding: 28px 0 8px; text-align: center; }
.page-head p { max-width: 720px; margin-left: auto; margin-right: auto; }
.projects { padding: 12px 0 24px; }
.project-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.project { background: rgba(255, 255, 255, .55); padding: 20px 22px; }
.project h3 { margin-bottom: .2em; }
.project .place { font-size: .9rem; text-transform: uppercase; letter-spacing: 2px; color: var(--green-dark); margin-bottom: .6em; }
.project p:last-child { margin-bottom: 0; }
.gallery-sec { padding: 24px 0 64px; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.gallery figcaption { font-size: .9rem; line-height: 1.4; padding-top: 8px; }

/* Contact */
.contact { padding: 8px 0 56px; text-align: center; }
.contact .photo { margin: 8px auto 36px; max-width: 880px; }
.contact-meta { font-size: .95rem; margin-top: -6px; }
.area { max-width: 720px; margin: 0 auto; text-align: left; }
.area h2 { text-align: center; }

/* 404 */
.nf { padding: 56px 0 72px; text-align: center; }

/* Footer: plain white, no gradient below it */
.site-footer { flex: none; background: #fff; color: var(--black); font-size: .9375rem; padding: 26px 0; }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px 24px; align-items: center; }
.footer-inner p { margin: 0; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.footer-nav a { display: block; padding: 6px 0; text-decoration: none; }
.footer-id { text-align: center; }
.footer-legal { text-align: right; }
.site-footer a { color: var(--black); }
.site-footer a:hover { color: var(--green-dark); }

@media (max-width: 920px) {
  .hero-grid, .svc { grid-template-columns: 1fr; gap: 20px; }
  .svc.flip .svc-photo { order: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-nav { justify-content: center; }
  .footer-legal { text-align: center; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
  .brand { gap: 12px; }
  .brand img { width: 84px; }
  .header-right { align-items: flex-start; width: 100%; }
  .nav { gap: 0 20px; }
  .btn { padding: 14px 16px; letter-spacing: 1px; font-size: .8rem; }
  .footer-id p { overflow-wrap: anywhere; }
  .gallery { grid-template-columns: 1fr; }
  .band { padding: 40px 20px 52px; }
  .band h2 { letter-spacing: 3px; }
}
