/* Paul Mitchell Electric Fencing - site styles.
   Palette and type choices are documented in docs/superpowers/specs/. */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/assets/fonts/montserrat-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/assets/fonts/nunito-latin.woff2') format('woff2');
}
/* Metric-matched fallbacks so text barely moves if the web fonts arrive late. */
@font-face {
  font-family: 'Montserrat Fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 112%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Nunito Fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 100%;
  ascent-override: 101%;
  descent-override: 35%;
  line-gap-override: 0%;
}

:root {
  --ink: #27302d;
  --ink-2: #1b2220;
  --ink-3: #3a4541;
  --paper: #f4f4f4;
  --white: #ffffff;
  --line: #dfe3e1;
  --field-line: #8a9490;
  --muted: #5b6662;
  --blue: #146d9c;
  --blue-hover: #0f5a80;
  --sky: #70d0f0;
  --wa: #25d366;
  --wa-hover: #1ebe5a;
  --heading: 'Montserrat', 'Montserrat Fallback', 'Segoe UI', Arial, sans-serif;
  --body: 'Nunito', 'Nunito Fallback', 'Segoe UI', Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 30, 27, .12);
  --container: 1180px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
dialog:not([open]) { display: none; }
html.has-dialog { overflow: hidden; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-hover); }
h1, h2, h3, h4 { font-family: var(--heading); line-height: 1.12; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.015em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.25em; }
strong { font-weight: 700; }

/* Focus: dark ring on light surfaces, light ring on dark surfaces (both pass 3:1). */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible, .band :focus-visible,
.cta :focus-visible, .section--dark :focus-visible, .lightbox :focus-visible, .wa-float:focus-visible { outline-color: var(--sky); }

.container { width: min(var(--container), 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: clamp(3.25rem, 7vw, 5.5rem); }
.section--dark { background: var(--ink); color: #e8ecea; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--white { background: var(--white); }
.section-head { max-width: 760px; margin: 0 auto 2.5rem; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section--dark .section-head p { color: #c9d1ce; }
.eyebrow {
  display: inline-block; font-family: var(--heading); font-weight: 700; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: .75rem;
}
.section--dark .eyebrow { color: var(--sky); }
.eyebrow--light { color: #9fe0f8; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200; padding: .6rem 1rem;
  background: var(--white); color: var(--ink); border-radius: 8px; box-shadow: var(--shadow); font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.35rem; border-radius: 999px; font-family: var(--heading); font-weight: 700;
  font-size: .95rem; line-height: 1; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-hover); color: var(--white); }
.btn--wa { background: var(--wa); color: #072b15; }
.btn--wa:hover { background: var(--wa-hover); color: #072b15; }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: var(--white); border-color: var(--white); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--sm { padding: .55rem 1rem; font-size: .85rem; }

/* Header ---------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--ink); color: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.site-header .container { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); position: relative; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--white); text-decoration: none; margin-right: auto; }
.brand img { width: 58px; height: auto; }
.brand span { font-family: var(--heading); font-weight: 800; font-size: 1.05rem; line-height: 1.05; text-transform: uppercase; letter-spacing: .01em; }
.brand small { display: block; font-size: .78em; font-weight: 700; color: #d7dedb; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { color: #e6eae8; text-decoration: none; font-weight: 700; padding: .55rem .85rem; border-radius: 8px; font-size: .98rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); background: rgba(255,255,255,.1); }
.nav .btn { margin-left: .5rem; }
.nav .btn--wa, .nav .btn--wa:hover { color: #072b15; } /* beats the generic nav link colour */
.nav .btn:hover { background: var(--wa-hover); }
.nav-toggle {
  display: none; background: none; border: 0; color: var(--white); padding: .5rem; border-radius: 8px; cursor: pointer;
}
.nav-toggle svg { width: 28px; height: 28px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 959px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--ink-2);
    flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.25rem; gap: .25rem;
    border-top: 1px solid rgba(255,255,255,.08); display: none; box-shadow: 0 12px 24px rgba(0,0,0,.3);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem .9rem; font-size: 1.05rem; }
  .nav .btn { margin: .5rem 0 0; }
  .brand img { width: 48px; height: auto; }
  .brand span { font-size: .95rem; }
  /* Without JavaScript the menu button cannot work, so show the links inline instead. */
  .no-js .nav-toggle { display: none; }
  .no-js .site-header .container { flex-wrap: wrap; }
  .no-js .nav {
    display: flex; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%;
    padding: 0 0 .75rem; border: 0; box-shadow: none; gap: .15rem;
  }
  .no-js .nav a { padding: .5rem .7rem; font-size: .95rem; }
  .no-js .nav .btn { margin: 0; }
}

/* Hero ------------------------------------------------------------------ */
.hero { position: relative; isolation: isolate; color: var(--white); background: var(--ink-2); overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(20,26,24,.88) 0%, rgba(20,26,24,.72) 45%, rgba(20,26,24,.35) 100%);
}
.hero .container { padding-block: clamp(4.5rem, 12vw, 8.5rem); }
.hero__inner { max-width: 640px; }
.hero h1 { color: var(--white); margin-bottom: .5em; text-wrap: balance; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #e2e7e5; margin-bottom: 1.75rem; max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__tags { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin: 2rem 0 0; padding: 0; list-style: none; font-size: .9rem; color: #cfd6d3; font-weight: 600; }
.hero__tags li { display: inline-flex; align-items: center; gap: .45rem; }
.hero__tags li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); }
.hero--compact .container { padding-block: clamp(3.25rem, 8vw, 5.5rem); }
.hero--compact::after { background: linear-gradient(90deg, rgba(20,26,24,.85) 0%, rgba(20,26,24,.55) 60%, rgba(20,26,24,.3) 100%); }
@media (max-width: 700px) {
  /* Text spans the full width on phones, so darken the whole photo evenly. */
  .hero::after, .hero--compact::after { background: linear-gradient(180deg, rgba(20,26,24,.85), rgba(20,26,24,.72)); }
}

/* Intro band ------------------------------------------------------------ */
.band { background: var(--ink); color: var(--white); text-align: center; }
.band .container { padding-block: clamp(2rem, 4vw, 3rem); }
.band p { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; max-width: 900px; margin-inline: auto; text-wrap: balance; }

/* About ----------------------------------------------------------------- */
.about { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .about { grid-template-columns: 1.1fr 1fr; gap: 4rem; } }
.about__text p { color: var(--ink-3); }
.about__text p:first-of-type { font-size: 1.15rem; }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; padding-bottom: 1.25rem; }
.about__grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--line); }
.about__grid img { width: 100%; height: 100%; object-fit: cover; }
.about__grid figure:nth-child(2), .about__grid figure:nth-child(4) { transform: translateY(1.25rem); }
.checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .55rem; }
.checks li { display: flex; gap: .65rem; align-items: flex-start; font-weight: 600; }
.checks svg { width: 22px; height: 22px; flex: none; color: var(--blue); margin-top: .15rem; }

/* Service cards --------------------------------------------------------- */
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20,30,27,.18); color: inherit; }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card h3 { margin: 0; font-size: 1.2rem; }
.card p { color: var(--muted); font-size: .98rem; }
.card__more { margin-top: auto; padding-top: .6rem; font-family: var(--heading); font-weight: 700; font-size: .9rem; color: var(--blue); display: inline-flex; align-items: center; gap: .35rem; }
.card__more svg { width: 1em; height: 1em; transition: transform .2s; }
.card:hover .card__more svg { transform: translateX(3px); }

/* Gallery --------------------------------------------------------------- */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(6, 1fr); } }
.gallery a {
  display: block; background: var(--ink-2); border-radius: 10px; overflow: hidden; cursor: zoom-in;
  aspect-ratio: 1; width: 100%;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, opacity .35s; opacity: .95; }
.gallery a:hover img { transform: scale(1.05); opacity: 1; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1100px); width: fit-content; overflow: visible; }
.lightbox::backdrop { background: rgba(10,14,13,.9); }
.lightbox__frame { position: relative; display: grid; place-items: center; }
.lightbox img { max-height: 84vh; max-width: 96vw; width: auto; height: auto; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox figure { margin: 0; }
.lightbox figcaption { color: #d9dfdc; text-align: center; padding: .75rem 0 0; font-size: .95rem; }
.lightbox__btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: var(--white); cursor: pointer; display: grid; place-items: center;
}
.lightbox__btn:hover { background: rgba(255,255,255,.28); }
.lightbox__btn svg { width: 24px; height: 24px; }
.lightbox__btn--prev { left: .5rem; }
.lightbox__btn--next { right: .5rem; }
.lightbox__close { top: .5rem; right: .5rem; transform: none; width: 40px; height: 40px; }
@media (min-width: 1240px) {
  .lightbox__btn--prev { left: -4rem; }
  .lightbox__btn--next { right: -4rem; }
  .lightbox__close { top: -3rem; right: -3rem; }
}

/* CTA band -------------------------------------------------------------- */
.cta { position: relative; isolation: isolate; color: var(--white); text-align: center; overflow: hidden; background: var(--ink-2); }
.cta__media { position: absolute; inset: 0; z-index: -2; }
.cta__media img { width: 100%; height: 100%; object-fit: cover; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(18,24,22,.72); }
.cta .container { padding-block: clamp(3.5rem, 8vw, 6rem); max-width: 820px; }
.cta__title { color: var(--white); font-family: var(--heading); font-weight: 800; line-height: 1.15; font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 .6em; text-wrap: balance; }
.cta p { color: #dfe5e2; }
.cta .btn { margin-top: .75rem; }

/* Contact --------------------------------------------------------------- */
.contact { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1.15fr; gap: 4rem; align-items: start; } }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: 1rem; align-items: center; }
.contact-list a { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--blue); }
.contact-list small { display: block; color: var(--muted); font-weight: 600; font-size: .85rem; }
.contact-list__text { font-weight: 700; font-size: 1.05rem; }
.contact-list .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--white); box-shadow: var(--shadow); color: var(--blue);
}
.contact-list .ico--wa { color: #128c4a; }
.contact-list svg { width: 24px; height: 24px; }
.form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.25rem, 3vw, 2rem); }
.form h3 { margin-bottom: .25rem; }
.form > p { color: var(--muted); margin-bottom: 1.25rem; }
.form__grid { display: grid; gap: 1rem; }
@media (min-width: 560px) { .form__grid { grid-template-columns: 1fr 1fr; } .form__grid .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .35rem; }
.field__hint { font-weight: 600; color: var(--muted); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form.is-sending .btn { opacity: .6; pointer-events: none; }
.form__status--ok { color: #128c4a; }
.form__status--error { color: #b3261e; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: .7rem .85rem; border: 1.5px solid var(--field-line); border-radius: 10px; background: var(--white); color: var(--ink);
}
.field ::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.field textarea { min-height: 120px; resize: vertical; }
.form__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.form__note { font-size: .85rem; color: var(--muted); margin-top: .9rem; }
.form__status { margin-top: .75rem; font-weight: 700; color: var(--blue); min-height: 1.5em; }
.form__status a { font-weight: 700; }

/* Footer ---------------------------------------------------------------- */
.site-footer { background: var(--ink-2); color: #c4ccc9; font-size: .95rem; }
.site-footer .container { padding-block: 3rem 1.5rem; display: grid; gap: 2rem; }
@media (min-width: 800px) { .site-footer .container { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h3 { color: var(--white); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .9rem; }
.site-footer a { color: #e2e7e5; text-decoration: none; }
.site-footer a:hover { color: var(--sky); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer .brand { margin-bottom: 1rem; margin-right: 0; }
.site-footer .brand img { width: 50px; height: auto; }
.site-footer p { max-width: 42ch; }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .85rem; color: #8f9a96; }

/* Floating WhatsApp ----------------------------------------------------- */
.wa-float {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #062b14; display: grid; place-items: center; box-shadow: 0 10px 25px rgba(0,0,0,.3);
  transition: transform .18s;
}
.wa-float:hover { transform: scale(1.06); color: #062b14; }
.wa-float svg { width: 32px; height: 32px; }

/* Services page --------------------------------------------------------- */
.breadcrumb { background: var(--white); border-bottom: 1px solid var(--line); font-size: .9rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: .6rem 0; display: flex; flex-wrap: wrap; gap: .5rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: var(--line); }
.breadcrumb a { color: var(--blue); text-decoration: none; font-weight: 700; }
.breadcrumb a:hover { text-decoration: underline; }
.subnav { position: sticky; top: var(--header-h); z-index: 80; background: var(--white); border-bottom: 1px solid var(--line); }
.subnav ul { list-style: none; margin: 0 -6px; padding: .5rem 6px; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: thin; }
.subnav a { display: inline-block; white-space: nowrap; padding: .5rem .9rem; border-radius: 999px; font-family: var(--heading); font-weight: 700; font-size: .85rem; color: var(--ink); text-decoration: none; }
.subnav a:hover { background: var(--paper); }
.subnav a.is-active { background: var(--ink); color: var(--white); }
.service { scroll-margin-top: 60px; } /* the sticky sub-nav; the sticky header is handled by scroll-padding-top */
.service__grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) {
  .service__grid { grid-template-columns: 1.15fr .85fr; gap: 3.5rem; align-items: start; }
  .service--flip .service__grid > :first-child { order: 2; }
}
.service__text p { color: var(--ink-3); }
.section--dark .service__text p { color: #d3d9d6; }
.service__text .lead { font-size: 1.12rem; color: var(--ink); }
.section--dark .service__text .lead { color: var(--white); }
.steps { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .8rem; counter-reset: step; }
.steps li { position: relative; padding-left: 2.6rem; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: .1rem; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--blue); color: var(--white); font-family: var(--heading); font-weight: 800; font-size: .85rem; display: grid; place-items: center;
}
.section--dark .steps li::before { background: var(--sky); color: var(--ink-2); }
.steps strong { display: block; color: var(--ink); }
.section--dark .steps strong { color: var(--white); }
.bullets { display: grid; gap: .5rem; padding-left: 1.15rem; margin: .5rem 0 1rem; }
.photos { display: grid; gap: .8rem; grid-template-columns: repeat(2, 1fr); }
/* Only pin the photo column when the viewport is tall enough to show all of it. */
@media (min-width: 960px) and (min-height: 1100px) { .photos { position: sticky; top: calc(var(--header-h) + 72px); } }
.photos figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--line); }
.photos figure.tall { aspect-ratio: 3 / 4; }
.photos figure.wide { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos--single { grid-template-columns: 1fr; }

/* Utility --------------------------------------------------------------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.error-page__actions { margin-top: 1.5rem; display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
