/* ============================================================
   Highland Electric — stylesheet
   Everything visual is driven by the tokens in :root below.
   Change a value here and it updates across the whole site.
   ============================================================ */

:root {
  /* ---- Colour (verified against the live Squarespace site, 2026-08-08) ---- */
  --ink:        #011936;   /* darkest surface — header / hero / footer */
  --paper:      #014421;   /* site background */
  --paper-2:    #011936;   /* alt surface for content strips — reuses --ink; no second surface colour was found live */
  --body:       #7fdeff;   /* copy on --paper */
  --body-dark:  #7fdeff;   /* copy on --ink surfaces */
  --accent:     #7fdeff;   /* brand accent — buttons, links, borders */
  --accent-ink: #011936;   /* text on accent */
  --heading:    #e3b505;   /* h1/h2/h3 colour */
  --line:       rgba(127,222,255,.14);
  --line-light: rgba(127,222,255,.18);
  --surface-light: #ffffff;   /* deliberate one-off light card — homepage About section */

  /* ---- Type ---- */
  --display: "Archivo Black", "Arial Narrow", sans-serif;
  --text:    "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* ---- Layout ---- */
  --wrap:      1400px;
  --wrap-slim: 760px;
  --gutter:    clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
  --radius:    6px;
  --header-h:  116px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: .01em;
  color: var(--heading);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: var(--accent-ink);
  padding: .75rem 1.25rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ---- Layout helpers ---- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap.narrow { max-width: var(--wrap-slim); }
.section { padding-block: var(--section-y); }
.center { text-align: center; }

.eyebrow {
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .75rem;
}
.lede { font-size: clamp(1.05rem, 1.8vw, 1.25rem); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  padding: .85rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-solid   { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-solid:hover  { background: transparent; color: var(--accent); }
.btn-outline { background: transparent; color: var(--accent); border-color: currentColor; }
.btn-outline:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}
.brand { grid-column: 1; justify-self: start; }
.brand img { width: auto; height: 100px; }

.nav-desktop { grid-column: 2; justify-self: center; display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); }
.nav-desktop a,
.nav-mobile a {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--heading);
  text-decoration: none;
  padding-block: .35rem;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.nav-desktop a:hover,
.nav-mobile a:hover { color: var(--accent); }
.nav-desktop a.is-current { border-bottom-color: var(--accent); color: var(--accent); }

.nav-toggle {
  grid-column: 3; justify-self: end;
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: ""; position: absolute; left: 10px;
  width: 24px; height: 2px; background: var(--heading);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { top: -7px; left: 0; }
.nav-toggle-bar::after  { top:  7px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem var(--gutter) 1.75rem;
  background: var(--ink);
  border-top: 1px solid var(--line);
}
.nav-mobile a { font-size: 1.25rem; padding-block: .55rem; }

@media (max-width: 860px) {
  .brand img { height: 50px; }
  .nav-desktop { display: none; }
  .nav-toggle  { display: block; }
  .nav-mobile:not([hidden]) { display: flex; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: var(--paper);
  color: var(--body);
  padding-block: clamp(4rem, 11vw, 8rem);
  text-align: center;
}
.hero-mark {
  margin-inline: auto;
  max-width: min(620px, 90%);
}
.hero-strap {
  font-family: var(--display);
  font-size: clamp(.95rem, 2.2vw, 1.35rem);
  font-weight: 500;
  color: var(--heading);
  margin-top: 2rem;
}

/* ============================================================
   Services
   ============================================================ */
.services-strip { background: var(--paper); }

/* ---- Homepage auto-scrolling carousel ----
   The track is rendered with each slide twice back to back; animating
   from translateX(0) to translateX(-50%) moves exactly one full set,
   so the loop point is invisible. */
.carousel-strip {
  overflow: hidden;
  background: var(--paper);
}
.carousel-track {
  display: flex;
  width: max-content;
  animation: carousel-scroll 30s linear infinite;
}
.carousel-item {
  flex: 0 0 auto;
  width: clamp(220px, 24vw, 340px);
}
.carousel-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}
.carousel-item p {
  margin: 0;
  padding: 1.5rem 1rem;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--heading);
}
@keyframes carousel-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.svc-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}
.svc-detail {
  padding-top: 1.5rem;
  border-top: 3px solid var(--accent);
}
.svc-detail h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }

/* ============================================================
   Page head / about / accreditation
   ============================================================ */
.page-head {
  background: var(--paper-2);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.page-head h1, .page-head .eyebrow { margin-bottom: 0; }

/* Deliberate one-off: a light card against the site's dark theme, per
   the owner's reference screenshot (2026-08-09). */
.about-strip {
  background: var(--surface-light);
  color: var(--ink);
}
.about-strip h2 { color: var(--ink); }
.about-strip .about-napit { max-height: 150px; width: auto; margin-top: 1.5rem; }
.about-strip .split-media img { max-width: 75%; margin-inline: auto; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.split-media img {
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(1,25,54,.35);
}

.accred-block { background: var(--paper-2); }
.accred-logo { max-height: 130px; width: auto; margin: 0 auto 1.5rem; }

.prose h2 { margin-top: 2rem; }
.prose ul { list-style: disc; padding-left: 1.5em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .5em; }
.prose a { color: var(--accent); }

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.contact-card {
  padding: 2rem;
  background: var(--paper-2);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.contact-link {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--heading);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}
.contact-link:hover { color: var(--accent); }

.form-section { background: var(--paper-2); }
.contact-form { margin-top: 2rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.field label {
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--body-dark);
}
.field input, .field textarea {
  font: inherit;
  padding: .8rem 1rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(127,222,255,.25);
}
.field-hp { position: absolute; left: -9999px; }   /* honeypot */
.form-status { min-height: 1.5em; font-weight: 500; }
.form-status.is-error { color: #b3261e; }
.form-status.is-ok    { color: #1b7f4b; }

/* ============================================================
   Gallery
   ============================================================ */
.gallery-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.cat { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); }
.cat img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.cat:hover img { transform: scale(1.04); }
.cat figcaption {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(to top, rgba(1,25,54,.85), transparent);
  color: #fff;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  padding: 2.5rem 1.25rem 1rem;
}

.insta-section { background: var(--paper-2); }
.insta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .5rem;
  margin-block: 2rem;
}
.insta-grid img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.insta-grid a { display: block; position: relative; }
.insta-grid a::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(127,222,255,0);
  transition: background .2s ease;
}
.insta-grid a:hover::after { background: rgba(127,222,255,.28); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--body-dark);
  padding-top: clamp(3rem, 7vw, 4.5rem);
}
.footer-top {
  text-align: center;
  padding-bottom: clamp(2rem, 5vw, 3rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(2rem, 5vw, 3rem);
  padding-bottom: 3rem;
  text-align: center;
}
.footer-heading {
  color: var(--heading);
  font-size: 1.15rem;
  margin-bottom: .75rem;
}
.site-footer a:not(.btn) { color: var(--body-dark); text-decoration: none; border-bottom: 1px solid var(--line); }
.site-footer a:not(.btn):hover { color: var(--accent); border-color: var(--accent); }
.footer-legal { font-size: .875rem; color: var(--heading); }
.social { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; margin: 0; }
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  border-bottom: none;
}
.footer-legal-links {
  display: flex; flex-direction: column; gap: .6rem;
  align-items: center;
  margin-top: 1.25rem;
}

/* ---- Motion preference ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
