/* ==========================================================
   Opidian Consults Cleaning Services
   Colours follow the Logo & Brand Guidelines v1.0
   ========================================================== */

@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable.woff2") format("woff2-variations"),
       url("../fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette */
  --opidian-teal: #299597;   /* symbol, accents, rules */
  --deep-teal: #04686a;      /* buttons and links on light backgrounds */
  --ink-teal: #0b4e50;       /* headings on light backgrounds */
  --black: #000000;          /* signature black: dark panels */
  --pale-teal: #9fd4d5;      /* small accents on black only, never body text */
  --mist: #eaf4f4;           /* panel backgrounds, never text */

  /* Supporting neutrals */
  --white: #ffffff;
  --text: #2a3637;           /* body copy: dark grey */
  --muted: #56696a;
  --mist-line: #cfe3e3;
  --card-teal: #c7e5e6;          /* light teal panel, e.g. the inspection card */
  --card-teal-line: #a9d1d3;     /* dividers inside that panel */
  --card-teal-muted: #4a5d5e;    /* secondary text on that panel */
  --on-dark: #ffffff;
  --on-dark-muted: #c8d1d1;
  --dark-line: #2a3333;

  /* Type */
  --font-body: "Lato", "Carlito", "Calibri", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --condensed: 68%;

  /* Layout */
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);
  --radius-card: 12px;
  --radius-btn: 6px;
  --header-h: 96px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-head);
  font-stretch: var(--condensed);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.005em;
  color: var(--ink-teal);
  text-wrap: balance;
}

h1 { font-size: clamp(2.75rem, 2rem + 3.6vw, 5rem); }
h2 { font-size: clamp(2.1rem, 1.6rem + 2vw, 3.25rem); }
h3 { font-size: 1.625rem; line-height: 1.1; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--opidian-teal);
  outline-offset: 3px;
  border-radius: 3px;
}

[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

.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: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--deep-teal); color: var(--white);
  font-weight: 700; text-decoration: none; border-radius: var(--radius-btn);
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3.25rem;
  padding: .85rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

/* On light backgrounds: white on Deep Teal */
.btn-primary { background: var(--deep-teal); color: var(--white); }
.btn-primary:hover { background: var(--ink-teal); }

/* On black panels: black on Opidian Teal */
.on-dark .btn-primary { background: var(--opidian-teal); color: var(--black); }
.on-dark .btn-primary:hover { background: var(--pale-teal); }

.btn-outline { border-color: var(--on-dark-muted); color: var(--on-dark); background: transparent; }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); }


.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--ink-teal); }

.btn-sm { min-height: 2.75rem; padding: .55rem 1.15rem; font-size: .95rem; }

.btn[disabled] { opacity: .6; cursor: progress; }

.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

.text-link {
  display: inline-block;
  font-weight: 700;
  color: var(--deep-teal);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .3em;
}
.text-link:hover { color: var(--ink-teal); }

/* ---------- Header (white, full-colour primary logo per brand guide) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--mist-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

/* Clear space around the logo is at least one third of the symbol height */
.brand { display: block; padding-block: 19px; line-height: 0; }
.brand img { height: 58px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 2rem; }

.site-nav ul {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul a {
  display: inline-block;
  padding: .4rem 0;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.site-nav ul a:hover { color: var(--ink-teal); }
.site-nav ul a[aria-current="page"] { color: var(--ink-teal); border-bottom-color: var(--opidian-teal); }

.nav-phone {
  font-weight: 700;
  text-decoration: none;
  color: var(--ink-teal);
  white-space: nowrap;
}
.nav-phone:hover { color: var(--deep-teal); text-decoration: underline; }

.nav-toggle {
  display: none;
  width: 2.75rem; height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--mist-line);
  border-radius: var(--radius-btn);
  color: var(--ink-teal);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.25rem; height: 2px;
  margin-inline: auto;
  background: currentColor;
  transition: transform .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  :root { --header-h: 78px; }
  .brand { padding-block: 15px; }
  .brand img { height: 46px; }
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1rem var(--gutter) 1.75rem;
    background: var(--white);
    border-bottom: 1px solid var(--mist-line);
    box-shadow: 0 18px 30px -14px rgba(0, 0, 0, .35);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a {
    display: block;
    padding: .9rem 0;
    font-size: 1.15rem;
    border-bottom: 1px solid var(--mist-line);
  }
  .site-nav ul a[aria-current="page"] { border-bottom-color: var(--mist-line); color: var(--deep-teal); }
  .nav-phone { font-size: 1.15rem; }
  .site-nav .btn { width: 100%; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section-mist { background: var(--mist); }
.section-white { background: var(--white); }

.on-dark { background: var(--black); color: var(--on-dark); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--white); }

.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { margin-top: 1rem; font-size: 1.125rem; color: var(--muted); }

.kicker {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pale-teal);
}

.lead {
  max-width: 36rem;
  margin-top: 1.5rem;
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--on-dark-muted);
}
.hero .lead { color: var(--muted); }

/* ---------- Checklist ticks (used across the site) ---------- */

.checks { margin: 0; padding: 0; list-style: none; }
.checks li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: .7rem;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: .2em;
  width: 1.2rem; height: 1.2rem;
  border-radius: 4px;
  background: var(--opidian-teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l2.9 2.8L12.6 5' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.checks li:last-child { margin-bottom: 0; }


/* ==========================================================
   Motion: slow photo drift, and text that fades in on scroll
   All of it is switched off under "reduce motion" (see the
   prefers-reduced-motion block at the end of this file).
   ========================================================== */

/* Photos drift slowly, like a held camera shot */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-photo img,
  .js .split-photo img,
  .js .about-photo img {
    animation: drift 26s ease-in-out infinite alternate;
    will-change: transform;
  }
  .js .split-photo img { animation-duration: 30s; animation-direction: alternate-reverse; }
  .js .about-photo img { animation-duration: 34s; }

  /* Pause while a visitor is reading something else */
  .js .hero-photo img { animation-delay: .2s; }
}

@keyframes drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.1) translate3d(-1.4%, -1%, 0); }
}

/* Text and cards rise into place as they come into view */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
  }
  .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity .7s cubic-bezier(.2, .6, .3, 1),
                transform .7s cubic-bezier(.2, .6, .3, 1);
    transition-delay: var(--d, 0ms);
  }
}


/* --- Dark banners get a slow teal light moving behind the text --- */
.on-dark { position: relative; isolation: isolate; overflow: hidden; }
.on-dark > .wrap { position: relative; }

@media (prefers-reduced-motion: no-preference) {
  .js .on-dark::before {
    content: "";
    position: absolute;
    inset: -20%;
    z-index: -1;
    background:
      radial-gradient(38% 55% at 22% 32%, rgba(41, 149, 151, .30), transparent 68%),
      radial-gradient(32% 48% at 78% 68%, rgba(159, 212, 213, .16), transparent 70%);
    animation: banner-glow 26s ease-in-out infinite alternate;
    will-change: transform;
  }
  .js .cta-band::before { animation-duration: 20s; }
  .js .page-hero::before { animation-duration: 30s; }
}

@keyframes banner-glow {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.18); }
}

/* --- Headlines rise word by word --- */
.wordsplit .word {
  display: inline-block;
  overflow: hidden;
  padding-bottom: .08em;
  margin-bottom: -.08em;
  vertical-align: bottom;
}
.wordsplit .word-i { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .js .wordsplit .word-i { transform: translateY(108%); opacity: 0; }
  .js .wordsplit.is-in .word-i {
    transform: none;
    opacity: 1;
    transition: transform .8s cubic-bezier(.19, .72, .25, 1), opacity .5s ease;
    transition-delay: var(--d, 0ms);
  }
}

/* --- Small accents that draw themselves in --- */
@media (prefers-reduced-motion: no-preference) {
  .js .assurance h3::before,
  .js .split-copy h2 + .checks,
  .js .step::after {
    transform-origin: left center;
  }
  .js .assurance h3::before { transform: scaleX(0); transition: transform .7s ease .15s; }
  .js .assurance.is-in h3::before { transform: scaleX(1); }
  .js .step::after { transform: scaleX(0); transition: transform .8s ease .2s; }
  .js .step.is-in::after { transform: scaleX(1); }
  .js .kicker { position: relative; }
}

/* --- Cards lift a little under the cursor --- */
@media (prefers-reduced-motion: no-preference) {
  .service-card, .areas li, .contact-item, .scope {
    transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s ease, border-color .28s ease;
  }
  .service-card:hover, .scope:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 34px -24px rgba(0, 0, 0, .45);
    border-color: var(--card-teal-line);
  }
  .contact-item:hover { transform: translateY(-3px); border-color: var(--card-teal-line); }
  .areas li:hover { transform: translateY(-2px); border-color: var(--opidian-teal); }
}

/* ---------- Home: hero ---------- */

.hero {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(4rem, 7vw, 6rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: clamp(2.25rem, 4vw, 3.5rem);
  align-items: center;
}

.hero h1 { max-width: 13ch; }

.hero-media { display: flex; flex-direction: column; gap: 1.4rem; }

.hero-photo {
  margin: 0;
  aspect-ratio: 16 / 10.5;
  border-radius: 4px;
  overflow: hidden;
  background: #1a2626;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }

/* The signed-off inspection sheet, below the hero photo */
.inspection {
  padding: .7rem 1.05rem .6rem;
  background: var(--card-teal);
  color: var(--text);
  border-radius: 10px;
}

.inspection-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: .45rem;
  margin-bottom: .45rem;
  border-bottom: 1px solid var(--card-teal-line);
}
.inspection-title {
  margin: 0;
  font-family: var(--font-head);
  font-stretch: var(--condensed);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.1;
  color: var(--ink-teal);
}
.inspection-meta { margin: 0; font-size: .85rem; color: var(--card-teal-muted); white-space: nowrap; }

.inspection-list { margin: 0; padding: 0; list-style: none; font-size: .9rem; line-height: 1.5; }
.inspection-list li {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .105rem 0;
}

.tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.1rem; height: 1.1rem;
  border: 1.5px solid var(--opidian-teal);
  border-radius: 4px;
  background: var(--opidian-teal);
}
.tick svg { width: 100%; height: 100%; }
.tick path {
  fill: none;
  stroke: var(--white);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16;
  stroke-dashoffset: 0;
}

.inspection-foot {
  margin: .45rem 0 0;
  padding-top: .45rem;
  border-top: 1px solid var(--card-teal-line);
  font-size: .8rem;
  color: var(--card-teal-muted);
}

/* One load moment: the sheet gets ticked off, line by line */
@media (prefers-reduced-motion: no-preference) {
  .js .inspection-list .tick {
    background: var(--white);
    border-color: var(--card-teal-line);
    animation: tick-box .25s ease forwards;
    animation-delay: calc(.5s + var(--i) * .32s);
  }
  .js .inspection-list .tick path {
    stroke-dashoffset: 16;
    animation: tick-draw .3s ease-out forwards;
    animation-delay: calc(.55s + var(--i) * .32s);
  }
}
@keyframes tick-box { to { background: var(--opidian-teal); border-color: var(--opidian-teal); } }
@keyframes tick-draw { to { stroke-dashoffset: 0; } }

/* ---------- Home: assurances ---------- */

.assurances { padding-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.assurance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--mist-line);
  padding-top: clamp(2rem, 4vw, 3rem);
}
.assurance h3 { margin-bottom: .6rem; }
.assurance h3::before {
  content: "";
  display: block;
  width: 2.5rem; height: 3px;
  margin-bottom: 1rem;
  background: var(--opidian-teal);
}
.assurance p { color: var(--muted); max-width: 22rem; }

/* ---------- Home: service cards ---------- */

.service-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--mist-line);
  border-radius: var(--radius-card);
  padding: clamp(1.5rem, 3vw, 2rem);
}

.service-card h3 { margin-bottom: .75rem; }
.service-card > p { color: var(--muted); margin-bottom: 1.5rem; }
.service-card .checks { font-size: .98rem; padding-top: 1.25rem; border-top: 1px solid var(--mist); }

/* ---------- Split (image + copy) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.split-photo {
  margin: 0;
  aspect-ratio: 5 / 4;
  border-radius: 4px;
  overflow: hidden;
  background: var(--mist);
}
.split-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

.split-copy h2 { margin-bottom: 1.25rem; }
.split-copy > p { color: var(--muted); font-size: 1.125rem; }
.split-copy .checks { margin-top: 1.75rem; font-size: 1.0625rem; }
.split-copy .checks li { margin-bottom: 1rem; }

/* ---------- CTA band ---------- */

.cta-band { padding-block: clamp(3.5rem, 7vw, 5rem); }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.cta-inner p { margin-top: .75rem; color: var(--on-dark-muted); font-size: 1.125rem; max-width: 34rem; }

/* ---------- Inner page hero ---------- */

.page-hero { padding-block: clamp(3.5rem, 8vw, 6rem); }
.page-hero h1 { max-width: 18ch; }

/* ---------- Services page ---------- */

.scope-list { display: grid; gap: 1.25rem; }

.scope {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.5rem clamp(2rem, 5vw, 4rem);
}
.scope h2 { font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem); margin-bottom: .9rem; }
.scope-intro p { color: var(--muted); }
.scope .checks { columns: 2; column-gap: 2rem; align-self: center; }
.scope .checks li { break-inside: avoid; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 3.75rem;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-head);
  font-stretch: var(--condensed);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--deep-teal);
}
.step::after {
  content: "";
  position: absolute;
  top: 1.1rem; left: 3.5rem; right: -1rem;
  height: 2px;
  background: var(--mist-line);
}
.step:last-child::after { display: none; }
.step h3 { margin-bottom: .6rem; }
.step p { color: var(--muted); }

/* ---------- About page ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.prose { max-width: 38rem; font-size: 1.125rem; }
.prose p { margin-bottom: 1.25em; }

.quote {
  margin: 2.5rem 0 0;
  padding: 2rem 2rem 1.75rem;
  background: var(--mist);
  border-left: 4px solid var(--opidian-teal);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}
.quote p {
  margin: 0 0 1rem;
  font-family: var(--font-head);
  font-stretch: var(--condensed);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
  line-height: 1.2;
  color: var(--ink-teal);
}
.quote footer { font-size: 1rem; color: var(--muted); }
.quote cite { font-style: normal; font-weight: 700; color: var(--text); }

.about-photo { margin: 0; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: var(--mist); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; }

.areas {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}
.areas li {
  padding: .5rem 1rem;
  background: var(--white);
  border: 1px solid var(--mist-line);
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink-teal);
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.form-card { padding: clamp(1.5rem, 4vw, 2.75rem); }
.form-card h2 { font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.4rem); margin-bottom: .5rem; }
.form-card form > p { color: var(--muted); margin-bottom: 2rem; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.field { display: flex; flex-direction: column; gap: .45rem; }
.field-full { grid-column: 1 / -1; }

.field label { font-weight: 700; font-size: .98rem; }
.field .optional { font-weight: 400; color: var(--muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .8rem .9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid #b4cfcf;
  border-radius: var(--radius-btn);
  transition: border-color .15s ease;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field select {
  appearance: none;
  padding-right: 2.5rem;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%230b4e50' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") right .85rem center / 1rem no-repeat;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid rgba(41, 149, 151, .35);
  outline-offset: 0;
  border-color: var(--deep-teal);
}

.honeypot { position: absolute; left: -9999px; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.form-note { margin: 0; font-size: .95rem; color: var(--muted); }
.form-note a { color: var(--deep-teal); font-weight: 700; }

.form-status {
  margin-top: 1.25rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-btn);
}
.form-status:empty { display: none; }
.form-status.is-error { background: #fdeceb; color: #8a1f17; border: 1px solid #f2c4bf; }

.form-success h2 { margin-bottom: .75rem; }
.form-success p { color: var(--muted); }
.form-success .checks { margin: 1.5rem 0; }

.contact-aside { display: grid; gap: 1.25rem; }
.contact-item { padding: 1.5rem 1.6rem; }
.contact-item h2 { font-size: 1.5rem; margin-bottom: .35rem; }
.contact-item a { font-size: 1.15rem; font-weight: 700; color: var(--deep-teal); text-decoration: none; word-break: break-word; }
.contact-item a:hover { text-decoration: underline; }
.contact-item p { color: var(--muted); }

/* ---------- Footer (black panel, reversed logo) ---------- */

.site-footer {
  background: var(--black);
  color: var(--on-dark-muted);
  font-size: 1rem;
}
.footer-grid {
  display: grid;
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--dark-line);
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer-logo { display: inline-block; line-height: 0; }
.footer-logo img { height: 60px; width: auto; }
.footer-about p { max-width: 24rem; margin-top: 1.5rem; }
.footer-h {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: var(--white);
}
.footer-list { margin: 0; padding: 0; list-style: none; }
.footer-list li { margin-bottom: .55rem; }
.footer-list a { text-decoration: none; }
.footer-list a:hover { color: var(--white); text-decoration: underline; }
.footer-base {
  padding-block: 1.5rem;
  border-top: 1px solid var(--dark-line);
  font-size: .9rem;
}

/* ==========================================================
   Chat assistant
   ========================================================== */

.chat-launcher {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .45rem 1.2rem .45rem .45rem;
  background: var(--black);
  color: var(--white);
  border: 1px solid rgba(159, 212, 213, .45);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .45);
}
.chat-launcher img { width: 2.6rem; height: 2.6rem; border-radius: 10px; }
.chat-launcher:hover { background: #151c1c; }
.chat-launcher[aria-expanded="true"] { display: none; }

.chat-panel {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 95;
  display: flex;
  flex-direction: column;
  width: min(24rem, calc(100vw - 2rem));
  height: min(38rem, calc(100vh - 2rem));
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(159, 212, 213, .45);
}
.chat-panel[hidden] { display: none; }

.chat-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1rem;
  background: var(--black);
  color: var(--white);
}
.chat-head img { width: 2.5rem; height: 2.5rem; border-radius: 10px; }
.chat-head-text { flex: 1; min-width: 0; line-height: 1.3; }
.chat-title { margin: 0; font-weight: 700; font-size: 1rem; }
.chat-sub { margin: 0; font-size: .82rem; color: var(--on-dark-muted); }
.chat-close {
  flex: none;
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid #3a4444;
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
}
.chat-close:hover { background: #1b2323; }
.chat-close svg { width: 1rem; height: 1rem; }

.chat-log {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--mist);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  overscroll-behavior: contain;
}

.msg {
  max-width: 88%;
  padding: .7rem .9rem;
  border-radius: 14px;
  font-size: .96rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.msg p { margin: 0 0 .5em; }
.msg p:last-child { margin: 0; }
.msg a { color: var(--deep-teal); font-weight: 700; }
.msg ul { margin: .3rem 0 .5rem; padding-left: 1.1rem; }
.msg-bot {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--mist-line);
  border-bottom-left-radius: 4px;
}
.msg-user {
  align-self: flex-end;
  background: var(--deep-teal);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.chat-typing { align-self: flex-start; display: flex; gap: 4px; padding: .9rem 1rem; }
.chat-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--opidian-teal);
  opacity: .4;
  animation: chat-dot 1s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 50% { opacity: 1; transform: translateY(-2px); } }

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-self: stretch;
  margin-top: .15rem;
}
.chat-chip {
  padding: .45rem .8rem;
  background: var(--white);
  border: 1.5px solid var(--deep-teal);
  border-radius: 999px;
  color: var(--deep-teal);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.chat-chip:hover { background: var(--deep-teal); color: var(--white); }

.chat-form {
  display: flex;
  gap: .5rem;
  padding: .75rem;
  border-top: 1px solid var(--mist-line);
  background: var(--white);
}
.chat-input {
  flex: 1;
  min-width: 0;
  padding: .7rem .85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  border: 1.5px solid #b4cfcf;
  border-radius: 10px;
}
.chat-input:focus-visible { outline: 3px solid rgba(41, 149, 151, .35); outline-offset: 0; border-color: var(--deep-teal); }
.chat-send {
  flex: none;
  width: 2.9rem;
  display: grid; place-items: center;
  background: var(--deep-teal);
  color: var(--white);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.chat-send:hover { background: var(--ink-teal); }
.chat-send svg { width: 1.2rem; height: 1.2rem; }

.chat-foot {
  margin: 0;
  padding: 0 .9rem .6rem;
  background: var(--white);
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .service-cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .step:nth-child(2)::after { display: none; }
}

@media (max-width: 860px) {
  .hero-grid,
  .split,
  .about-grid,
  .contact-grid,
  .scope { grid-template-columns: 1fr; }

  .hero h1 { max-width: none; }
  .hero-media { max-width: 34rem; }

  .assurance-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo { aspect-ratio: 4 / 3; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .actions .btn { width: 100%; }
  .field-grid { grid-template-columns: 1fr; }
  .scope .checks { columns: 1; }
  .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-inner .btn { width: 100%; }
  .inspection-meta { display: none; }

  .chat-launcher { padding: .4rem; }
  .chat-launcher-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .chat-panel { right: 0; bottom: 0; width: 100vw; height: 88vh; height: 88dvh; border-radius: 16px 16px 0 0; }
  .site-footer { padding-bottom: 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .wordsplit .word-i { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
