/* Plumbzy — full-bleed cyan, oversized two-tone uppercase headings, pill
   buttons with mint icon badges, diagonal section edges.
   Background palette sampled from the reference site: cyan #07abe3, deep navy
   #0d0f5d, mint #35dde3. The logo keeps its own blue plate as a badge. */

:root {
  --blue: #07abe3;          /* cyan — the page background */
  --blue-deep: #0d0f5d;     /* deep navy — footer, nav panel */
  --blue-mid: #0698ca;      /* raised panels on cyan */
  --mint: #35dde3;          /* icon badges, small accents */
  --red: #0d0f5d;           /* heading accent line — navy, per the reference */
  --red-bright: #0d0f5d;    /* same navy on cyan bands */
  --plumbzy-blue: #1b3a8a;  /* retained for the logo badge only */
  --ink: #14181f;
  --muted: #5a6472;
  --line: #dfe4ea;
  --line-blue: rgba(255, 255, 255, 0.22);
  --white: #fff;
  --wrap: 1180px;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;       /* diagonal dividers overhang deliberately */
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

a { color: var(--blue-deep); }   /* cyan on white is only 2.4:1 */
p, li { max-width: 68ch; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--white); padding: 0.5rem 1rem; z-index: 20; }

/* ---------- Headings: oversized, uppercase, two-tone ---------- */

h1, h2, h3 { letter-spacing: -0.02em; text-transform: uppercase; font-weight: 800; }
h1 { font-size: clamp(2.3rem, 6.5vw, 4.4rem); line-height: 0.95; margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); line-height: 1; margin: 3rem 0 1rem; }
h3 { font-size: 1.15rem; line-height: 1.25; margin: 1.75rem 0 0.5rem; text-transform: none; font-weight: 700; }

/* Second line in the accent colour — the PLUMB/ZY split, applied to headings. */
h1 .accent, h2 .accent { display: block; color: var(--red); }
.on-blue h1 .accent, .on-blue h2 .accent { color: var(--red-bright); }

/* ---------- Blue bands + diagonal edges ---------- */

.on-blue {
  background: var(--blue);
  color: var(--white);
  position: relative;
}
.on-blue { color: var(--blue-deep); }
.on-blue a { color: var(--blue-deep); }
.on-blue p, .on-blue li { color: var(--blue-deep); }

/* The slash: a lighter wedge cutting across the band. */
.on-blue::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,0.055) 42%);
  pointer-events: none;
}
.on-blue > * { position: relative; z-index: 1; }

/* Angled bottom edge into the next section.
   clip-path is correct here: the gradient-wedge alternative left a visible
   white seam because the wedge and the section edge never line up exactly at
   fractional viewport widths. Clipping descendants is no longer a problem —
   the job picker is a <dialog> in the top layer, which clip-path can't reach. */
.slant-b { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3.5vw), 0 100%); padding-bottom: 5vw; }

/* Mid-page bands slant on both edges. Both cuts run in the same direction as
   the hero's — left side lower — so the angles stay parallel down the page. */
.slant-tb {
  clip-path: polygon(0 3.5vw, 100% 0, 100% calc(100% - 3.5vw), 0 100%);
  padding-top: 6vw; padding-bottom: 6vw;
}

/* ---------- Header ---------- */

.site-head {
  background: var(--blue); position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--line-blue);
}
.head-inner { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 0; position: relative; }
.wordmark { display: block; line-height: 0; margin-right: auto; flex-shrink: 0; }
/* The logo keeps its blue plate as a badge — white-and-red letters directly on
   cyan would clash. Corners are transparent so the plate sits clean. */
.wordmark img { height: 46px; width: auto; display: block; }

/* Inline nav is gone — every width uses the hamburger, like the reference. */
.site-head nav {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  flex-direction: column; gap: 0; background: var(--blue-deep);
  padding: 0.5rem 1.25rem 1rem; border-bottom: 1px solid var(--line-blue);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
}
.site-head nav.open { display: flex; }
.site-head nav a {
  color: var(--white); text-decoration: none; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em;
  padding: 0.9rem 0.25rem; border-bottom: 1px solid var(--line-blue);
}
.site-head nav a:last-child { border-bottom: 0; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--red-bright); }

/* Pill call button with circular arrow badge. */
.tel {
  display: inline-flex; align-items: center; gap: 0.6rem; flex-shrink: 0;
  background: transparent; color: var(--blue-deep); text-decoration: none;
  border: 2px solid var(--blue-deep); border-radius: 999px;
  padding: 0.4rem 0.4rem 0.4rem 1.1rem; font-weight: 700; white-space: nowrap;
}
.tel:hover { background: rgba(13, 15, 93, 0.08); }
.tel::after {
  content: ""; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--mint) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230d0f5d'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.6 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.6 3.6a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center/16px no-repeat;
}
.tel-label { font-weight: 500; opacity: 0.9; }
.tel-num { margin-left: 0.35rem; }

.nav-toggle {
  display: flex; background: none; border: 0; padding: 0.5rem; cursor: pointer;
  width: 46px; height: 46px; align-items: center; justify-content: center;
  border-radius: 999px; flex-shrink: 0;
}
.nav-toggle:hover { background: rgba(13, 15, 93, 0.1); }
.nav-toggle:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 2px; }

.bars, .bars::before, .bars::after {
  display: block; width: 26px; height: 2.5px; border-radius: 2px;
  background: var(--blue-deep); transition: transform 0.18s ease, background 0.18s ease;
}
.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -8px; }
.bars::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { padding: clamp(3rem, 8vw, 6rem) 0 0; }
.hero h1 { max-width: 16ch; }
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 60ch; }
.hero .lede { color: var(--blue-deep); }

/* Non-home pages get a compact blue banner instead of a full hero. */
.page-head { padding: clamp(2.2rem, 5vw, 3.5rem) 0; }
.page-head h1 { margin-bottom: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.65rem;
  background: var(--red); color: var(--white); border: 2px solid var(--red);
  padding: 0.55rem 0.6rem 0.55rem 1.5rem; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: 1rem; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.btn::after {
  content: ""; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--mint) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230d0f5d'%3E%3Cpath d='M8 5l8 7-8 7z'/%3E%3C/svg%3E") center/13px no-repeat;
}
.btn:hover { background: #090a45; border-color: #090a45; }

/* Outline variant. Defaults to the on-white treatment, because most page bodies
   are plain .wrap divs rather than sections — a white-on-white default would be
   invisible on them. The blue-band treatment is the override. */
.btn.secondary { background: transparent; color: var(--blue-deep); border-color: var(--blue-deep); }
.btn.secondary::after {
  background-color: var(--blue-deep);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5l8 7-8 7z'/%3E%3C/svg%3E");
}
.btn.secondary:hover { background: var(--blue-deep); color: var(--white); }
.btn.secondary:hover::after { background-color: var(--white); background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230d0f5d'%3E%3Cpath d='M8 5l8 7-8 7z'/%3E%3C/svg%3E"); }

.on-blue .btn.secondary { color: var(--blue-deep); border-color: var(--blue-deep); }
.on-blue .btn.secondary::after {
  background-color: var(--blue-deep);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5l8 7-8 7z'/%3E%3C/svg%3E");
}
.on-blue .btn.secondary:hover { background: var(--blue-deep); color: var(--white); }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.75rem 0; }

/* ---------- Chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.chips li { max-width: none; }
.chips a {
  display: block; padding: 0.7rem 1.4rem; border-radius: 999px;
  border: 2px solid var(--blue-deep); color: var(--blue-deep);
  text-decoration: none; font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.chips a:hover { background: var(--blue-deep); color: var(--white); }

/* ---------- Cards ---------- */

.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin: 1.75rem 0; padding: 0; list-style: none; }
.cards li { max-width: none; }
.card {
  display: block; height: 100%; padding: 1.6rem; border-radius: var(--radius);
  text-decoration: none; color: inherit; background: var(--white);
  border: 1px solid var(--line); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(19, 39, 94, 0.13); }
.card strong {
  display: block; color: var(--blue-deep); margin-bottom: 0.45rem;
  text-transform: uppercase; font-size: 1rem; letter-spacing: -0.01em;
}
.card span { color: var(--muted); font-size: 0.96rem; }
.on-blue .card { background: var(--white); border-color: rgba(13, 15, 93, 0.14); }
.on-blue .card strong { color: var(--blue-deep); }
.on-blue .card span { color: var(--muted); }
.on-blue .card:hover { box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25); }

/* ---------- Notice ---------- */

.notice {
  border-left: 5px solid var(--red); background: #f7f9fc;
  padding: 1.15rem 1.4rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 2rem 0;
}
.notice p { margin: 0.35rem 0; }
.on-blue .notice { background: var(--white); border-left-color: var(--blue-deep); }

section { padding: 2.5rem 0; }
section.on-blue { padding: 3rem 0; }

/* ---------- Form ---------- */

form.enquiry { display: grid; gap: 1rem; max-width: 34rem; margin: 1.5rem 0; }
label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
input, textarea, select {
  width: 100%; padding: 0.8rem 0.95rem; border: 2px solid var(--line);
  border-radius: var(--radius); font: inherit; background: var(--white); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--blue-deep); border-color: var(--blue-deep); }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: 0.9rem; color: var(--muted); margin-top: 0.75rem; }

/* ---------- Footer ---------- */

.site-foot { background: var(--blue-deep); color: var(--white); margin-top: 0; padding: 3rem 0 2rem; }
.foot-logo { height: 36px; width: auto; display: block; margin-bottom: 1rem; }
.foot-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.site-foot p { color: rgba(255, 255, 255, 0.75); }
.site-foot h2 {
  font-size: 0.8rem; letter-spacing: 0.1em; color: var(--red-bright);
  margin: 1.5rem 0 0.6rem;
}
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 0.45rem; }
.site-foot a { color: rgba(255, 255, 255, 0.9); text-decoration: none; }
.site-foot a:hover { color: var(--red-bright); }
.legal {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-blue);
  font-size: 0.88rem;
}

@media (max-width: 560px) {
  .wordmark img { height: 36px; }
  .tel { padding-left: 0.85rem; }
  .tel-label { display: inline; }
  .tel-num { display: none; }
  .btn { padding-left: 1.15rem; font-size: 0.92rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bars, .bars::before, .bars::after, .card { transition: none; }
}

/* ---------- Nav bar ---------- */
/* Same cyan as the hero, so the header and hero read as one block. Controls sit
   in navy rather than white: white on this cyan is only 2.6:1. */

/* ---------- Fixes from the palette swap ---------- */
/* .on-blue a set every anchor navy, which swallowed the filled button's label. */
.on-blue .btn { color: var(--white); }
.on-blue .btn.secondary { color: var(--blue-deep); }
.on-blue .btn.secondary:hover { color: var(--white); }

/* Display headings keep the white/navy two-tone split of the reference. */
.on-blue h1, .on-blue h2 { color: var(--white); }
.on-blue h1 .accent, .on-blue h2 .accent { color: var(--blue-deep); }

/* ---------- Hero job chat ---------- */
/* The thread opens inline in the hero. Never a modal: on a phone a modal hides
   the page and reads as an ad, and the visitor loses the context they typed in. */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.job-chat {
  display: flex; gap: 0.5rem; align-items: center; margin: 1.75rem 0 0;
  background: var(--white); border-radius: 999px; padding: 0.4rem 0.4rem 0.4rem 1.4rem;
  max-width: 40rem; box-shadow: 0 10px 24px rgba(13, 15, 93, 0.16);
}
.job-chat input {
  flex: 1; border: 0; padding: 0.7rem 0; font-size: 1.05rem; background: transparent;
  color: var(--ink); min-width: 0;
}
.job-chat input:focus { outline: none; }
.job-chat input::placeholder { color: #8791a3; }
.job-chat:focus-within { box-shadow: 0 0 0 3px var(--blue-deep), 0 10px 24px rgba(13, 15, 93, 0.16); }
.job-chat button {
  flex-shrink: 0; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--blue-deep); color: var(--white); font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.job-chat button:hover { background: #090a45; }
.job-chat button:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

.chat-thread {
  max-width: 40rem; margin: 1.75rem 0 0; max-height: 20rem; overflow-y: auto;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 0.6rem; padding-right: 0.25rem;
}
/* The thread sits above the input, so the newest message — always the question
   being answered — ends up directly on top of the box. */
.chat-thread:not([hidden]) + .job-chat { margin-top: 0.75rem; }
.bubble {
  padding: 0.75rem 1.1rem; border-radius: var(--radius); max-width: 85%;
  line-height: 1.5; font-size: 1rem; white-space: pre-wrap;
}
.bubble.me { background: var(--blue-deep); color: var(--white); align-self: flex-end; }
.bubble.bot { background: var(--white); color: var(--ink); align-self: flex-start; }

.bubble.typing { display: flex; gap: 5px; align-items: center; padding: 1rem 1.1rem; }
.bubble.typing span {
  width: 7px; height: 7px; border-radius: 50%; background: #8791a3;
  animation: blink 1.3s infinite both;
}
.bubble.typing span:nth-child(2) { animation-delay: 0.18s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* Once a thread is open the chips are clutter — the conversation is the path. */
.job-chat.started ~ .chips { display: none; }

@media (prefers-reduced-motion: reduce) {
  .bubble.typing span { animation: none; opacity: 0.5; }
}

/* ---------- Hero preset picker (modal) ---------- */
/* A centred <dialog> rather than a dropdown: anchored under the trigger, the
   list forced a page scroll to reach it and then a second scroll inside it.
   Native <dialog> also gives focus trapping, Escape, and a real backdrop —
   and renders in the top layer, so no ancestor overflow can clip it. */

.presets-open {
  display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
  margin-top: 0.85rem; padding: 0.55rem 1.2rem; border-radius: 999px;
  background: transparent; border: 2px solid var(--blue-deep); color: var(--blue-deep);
  font: inherit; font-weight: 700; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.presets-open::after {
  content: ""; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
}
.presets-open:hover { background: rgba(13, 15, 93, 0.08); }
.presets-open:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 2px; }

.preset-modal {
  border: 0; padding: 0; border-radius: 16px; color: var(--blue-deep);
  width: min(46rem, calc(100vw - 2rem));
  max-height: min(85vh, 46rem);
  overflow: hidden; flex-direction: column;
  box-shadow: 0 30px 70px rgba(9, 10, 60, 0.42);
}
.preset-modal[open] { display: flex; }
.preset-modal::backdrop { background: rgba(9, 10, 60, 0.55); }

.preset-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.15rem 1.4rem; border-bottom: 1px solid #e6eaf2; flex-shrink: 0;
}
.preset-modal-head h2 {
  margin: 0; font-size: 1.15rem; color: var(--blue-deep);
  text-transform: uppercase; letter-spacing: -0.01em;
}
.preset-close {
  border: 0; background: none; cursor: pointer; font-size: 1.9rem; line-height: 1;
  color: var(--muted); padding: 0 0.35rem; border-radius: 8px;
}
.preset-close:hover { color: var(--blue-deep); background: var(--blue-tint); }
.preset-close:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 2px; }

.preset-groups {
  overflow-y: auto; padding: 1.4rem; display: grid; gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.preset-group h3 {
  font-size: 0.7rem; letter-spacing: 0.1em; color: var(--blue-deep); opacity: 0.55;
  margin: 0 0 0.75rem; text-transform: uppercase; font-weight: 700;
}
.preset-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.preset-group li { margin: 0; max-width: none; }

/* Tiles, deliberately not pills — the CTA buttons are 999px-radius, uppercase
   and carry an icon badge. These are square-ish, sentence case and quieter, so
   a list of 16 doesn't read as 16 competing calls to action. */
.preset-group button {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--white); color: var(--blue-deep);
  border: 1.5px solid #dbe0ea; border-radius: 10px;
  padding: 0.8rem 0.95rem; font: inherit; font-size: 0.97rem;
  font-weight: 600; line-height: 1.3;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}
.preset-group button:hover {
  border-color: var(--blue-deep); background: var(--blue-tint); transform: translateY(-1px);
}
.preset-group button:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 2px; }

/* Once the thread is open, the picker and chips are clutter. */
.job-chat.started ~ .presets-open,
.job-chat.started ~ .chips { display: none; }

@media (max-width: 560px) {
  .preset-modal { width: calc(100vw - 1.5rem); max-height: 88vh; }
  .preset-groups { padding: 1.1rem; gap: 1.25rem; }
  .preset-group button { padding: 0.75rem 0.85rem; font-size: 0.94rem; }
}

@media (prefers-reduced-motion: reduce) {
  .preset-group button { transition: none; }
  .preset-group button:hover { transform: none; }
}
