/* ==========================================================================
   Onnen Solutions LTD — onnen.co.uk
   Ink #0F1419 · Signal #378ADD · Bone #F1EFE8 · Inter + JetBrains Mono
   ========================================================================== */

:root {
  --ink: #0F1419;
  --ink-raise: #141B22;
  --ink-raise-2: #1A222B;
  --line: rgba(241, 239, 232, 0.09);
  --line-strong: rgba(241, 239, 232, 0.16);
  --bone: #F1EFE8;
  --stone: #D3D1C7;
  --muted: #9B9A92;
  --signal: #378ADD;
  --deep: #185FA5;
  --mist: #85B7EB;
  --air: #B5D4F4;

  --jet: #545D66;
  --coral: #FF7F50;

  --accent-onassure: #378ADD;
  --accent-onbackup: #FFBF00;
  --ss-grad: linear-gradient(150deg, #FFC400 0%, #FF2D78 55%, #7B2FF7 100%);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  --container: 1160px;
  --radius: 16px;
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scrollbar-color: #2E3742 var(--ink);
}

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb {
  background: #2E3742;
  border-radius: 6px;
  border: 2px solid var(--ink);
}
::-webkit-scrollbar-thumb:hover { background: #3A4550; }

/* Soft cross-fade between pages in browsers that support it */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.22s; }

/* Type per brand guidelines V3: Inter 400 body 16/1.65, Inter 500 headings
   at -0.04em, JetBrains Mono 400 uppercase labels at 0.18em+ */
body {
  background: var(--ink);
  color: var(--stone);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--mist); text-decoration: none; }
a:hover { color: var(--air); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--deep); color: var(--bone); }

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-body);
  color: var(--bone);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; }
h3 { font-size: 1.125rem; letter-spacing: -0.02em; }

/* The wordmark's full stop, reused as punctuation. Never recoloured. */
.dot { color: var(--signal); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: var(--stone);
  max-width: 40em;
}

.measure { max-width: 42em; }

/* Spacing utilities: replace ad-hoc inline styles */
.mt { margin-top: 1rem; }
.mt-sm { margin-top: 0.8rem; }
.mt-lg { margin-top: 2.2rem; }
.mb { margin-bottom: 1rem; }
.grid-tight { gap: 1.1rem; }

/* Skip link: hidden until focused */
.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 200;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  background: var(--signal);
  color: #0B1015;
  font-weight: 500;
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 1rem; color: #0B1015; }

/* ---------- Layout ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section + .section { border-top: 1px solid var(--line); }

.section-head { margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.section-head p { max-width: 42em; margin-top: 0.9rem; }

/* ---------- Header ---------- */

/* Solid ink bar; page content and imagery start beneath it. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 76px;
}

.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 30px; width: auto; }

/* Quiet mono contact affordance on the right of the bar */
.header-mail {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.header-mail:hover { color: var(--bone); }

.site-nav { display: flex; align-items: center; gap: 0.25rem; }

.site-nav > ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.site-nav a.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0.2rem;
  margin-inline: 0.75rem;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--stone);
  transition: color 0.15s ease;
}

.site-nav a.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0.1rem;
  height: 2px;
  background: var(--signal);
  transition: right 0.2s ease;
}

.site-nav a.nav-link:hover { color: var(--bone); }
.site-nav a.nav-link:hover::after { right: 0; }
.site-nav a.nav-link[aria-current="page"] { color: var(--bone); }
.site-nav a.nav-link[aria-current="page"]::after { right: 0; }

/* Solutions dropdown — product logos, not text labels */

.nav-drop { position: relative; }

.nav-drop > button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.2rem;
  margin-inline: 0.75rem;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--stone);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-drop > button.is-current { color: var(--bone); }

.nav-drop > button:hover { color: var(--bone); background: none; }

.nav-drop > button .caret {
  width: 9px; height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.nav-drop.open > button .caret { transform: rotate(-135deg) translateY(-2px); }

.drop-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 300px;
  padding: 0.5rem;
  background: var(--ink-raise);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.nav-drop.open .drop-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.drop-panel a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0.9rem;
  border-radius: 7px;
}

.drop-panel a:hover { background: var(--ink-raise-2); }

.drop-panel img.drop-wordmark { height: 20px; width: auto; }
.drop-panel a span {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.drop-panel a:hover span { color: var(--stone); }

.drop-panel .drop-all {
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
  padding-top: 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--mist);
  justify-content: center;
}

/* Header CTA */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--signal); color: #0B1015; }
.btn-primary:hover { background: var(--bone); color: var(--ink); }

.btn-ghost {
  border-color: rgba(241, 239, 232, 0.28);
  color: var(--bone);
  background: rgba(15, 20, 25, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: var(--mist);
  color: var(--bone);
  background: rgba(55, 138, 221, 0.12);
  transform: translateY(-1px);
}

.header-cta { flex: none; }

/* Primary action inside the mobile nav panel; hidden on desktop. */
.nav-cta { display: none; }

/* Mobile nav */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--bone);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .header-mail { display: none; }
  .header-cta { display: none; }

  .site-nav {
    position: fixed;
    inset: 76px 0 auto 0;
    display: none;
    background: var(--ink-raise);
    border-bottom: 1px solid var(--line-strong);
    padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
  }

  body.nav-open .site-nav { display: block; }
  body.nav-open { overflow: hidden; }

  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a.nav-link { display: block; padding: 0.9rem 0.5rem; font-size: 1.05rem; }
  .nav-cta { display: block; padding: 1.1rem 0.5rem 0.35rem; }
  .nav-cta .btn { width: 100%; }

  .nav-drop > button { display: none; }
  /* Static group label replaces the hidden dropdown button on mobile */
  .nav-drop::before {
    content: "Solutions";
    display: block;
    padding: 1rem 0.5rem 0.2rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .drop-panel {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    border: 0;
    box-shadow: none;
    background: none;
    padding: 0 0 0 0.5rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(520px, 86vh, 900px);
  padding-block: clamp(3rem, 8vh, 5rem);
  border-bottom: 1px solid var(--line);
}

/* Home hero copy sits high, over the clouds, leaving the bridge clear */
.hero-photo { align-items: flex-start; }
.hero-photo .container { padding-top: clamp(3rem, 9vh, 6rem); }

.hero h1 { font-size: clamp(2.75rem, 6vw, 4.5rem); }

/* Home hero: the Menai Suspension Bridge fills the viewport, monochrome,
   with the copy anchored to the lower left. Overlays keep text and the
   header legible without burying the photograph. */

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/img/menai-bridge.jpg") center 38% / cover no-repeat;
  filter: grayscale(1) contrast(1.1) brightness(0.82);
  transform: translateY(calc(var(--py, 0px) + 4%)) scale(1.16);
  will-change: transform;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 20, 25, 0.7) 0%, rgba(15, 20, 25, 0.32) 42%, rgba(15, 20, 25, 0.04) 72%),
    linear-gradient(0deg, var(--ink) 0%, rgba(15, 20, 25, 0.08) 16%),
    linear-gradient(90deg, rgba(15, 20, 25, 0.55) 0%, rgba(15, 20, 25, 0.2) 52%, rgba(15, 20, 25, 0.02) 100%);
}

.hero .container { position: relative; z-index: 1; }

/* Kicker chip above the headline */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  margin-bottom: 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(241, 239, 232, 0.26);
  background: rgba(15, 20, 25, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
}
.kicker::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
}
@media (max-width: 520px) { .kicker { font-size: 0.68rem; letter-spacing: 0.12em; } }

.hero .eyebrow { margin-bottom: 1.6rem; }
.hero h1 { max-width: 11.5em; text-shadow: 0 2px 28px rgba(15, 20, 25, 0.55); }
.hero .lead { margin-top: 1.25rem; max-width: 34em; color: rgba(241, 239, 232, 0.92); text-shadow: 0 1px 16px rgba(15, 20, 25, 0.6); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.9rem;
}

/* Home hero: a single CTA stays with the copy block over the clouds,
   left-aligned under the lead, so the bridge span is never covered. */
.hero-photo .hero-actions {
  margin-top: 2.1rem;
}

.hero-photo { padding-bottom: 2rem; }


/* Page hero (inner pages) */

/* Uniform page headers: same height on every page, photo beneath a scrim */
.page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(280px, 34vh, 400px);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.page-hero .container { width: 100%; }

.page-hero h1 { font-size: clamp(2.1rem, 4vw, 2.5rem); }
.page-hero .lead { margin-top: 1.3rem; }

/* Page-hero photo variant. Each page sets its own image via --hero-img. */

.page-hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-img) center 35% / cover no-repeat;
  filter: grayscale(1) contrast(1.05) brightness(0.62);
  transform: translateY(var(--py, 0px)) scale(1.1);
  will-change: transform;
}

.page-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 20, 25, 0.85) 0%, rgba(15, 20, 25, 0.55) 50%, rgba(15, 20, 25, 0.3) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(15, 20, 25, 0.2) 35%, rgba(15, 20, 25, 0.3) 100%);
}

.page-hero .container { position: relative; z-index: 1; }

/* ---------- Pillars ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-raise);
}

.pillar {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background 0.25s ease;
}

.pillar:hover { background: var(--ink-raise-2); }

.pillar:first-child { border-left: 0; }

.pillar .eyebrow { margin-bottom: 0.2rem; color: var(--mist); }
.pillar p { font-size: 0.98rem; color: var(--stone); }

.pillar .pillar-link {
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 0.92rem;
  font-weight: 500;
}

@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar { border-left: 0; border-top: 1px solid var(--line); }
  .pillar:first-child { border-top: 0; }
}

/* ---------- Cards & grids ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--ink-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.1rem);
}

.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.98rem; }

/* Checklist with dot markers */

.dotlist { list-style: none; display: grid; gap: 0.65rem; }

.dotlist li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.98rem;
}

.dotlist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
}

/* ---------- Service detail blocks ---------- */

.service-block {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.service-block + .service-block { border-top: 1px solid var(--line); }

.service-block h2 { margin-bottom: 1rem; }
.service-block .service-body p + p { margin-top: 1rem; }

.service-side {
  align-self: start;
  display: grid;
  gap: 1.25rem;
}

.service-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-raise);
}

.service-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.05) brightness(0.72);
  transition: transform 0.6s ease, filter 0.6s ease;
}

/* On hover the photograph quietly regains its colour */
.service-figure:hover img {
  transform: scale(1.04);
  filter: grayscale(0.05) contrast(1.02) brightness(0.92);
}

.service-figure figcaption {
  padding: 0.8rem 1.2rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.service-aside {
  background: var(--ink-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  align-self: start;
}

.service-aside h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

@media (max-width: 860px) {
  .service-block { grid-template-columns: 1fr; }
}

/* ---------- Solutions / product panels ---------- */

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: var(--ink-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent, var(--signal));
}

.product-card.ss::before { background: var(--ss-grad); }

.product-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }

.product-card img.product-logo {
  height: 34px;
  width: auto;
  align-self: flex-start;
}

.product-card .product-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.product-card p { font-size: 0.98rem; }

.product-card .product-link {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.94rem;
  font-weight: 500;
}

/* Full product panels (solutions page) */

.product-panel {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding: clamp(2rem, 4vw, 3rem);
  background: var(--ink-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.product-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--accent, var(--signal));
}

.product-panel.ss::before { background: var(--ss-grad); }

.product-panel + .product-panel { margin-top: 1.5rem; }

.product-panel img.product-logo { height: 40px; width: auto; margin-bottom: 1.2rem; }
.product-panel h3 { position: absolute; left: -9999px; } /* logo is the heading visually */
.product-panel .product-body p + p { margin-top: 0.9rem; }
.product-panel .product-actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }

@media (max-width: 860px) {
  .product-panel { grid-template-columns: 1fr; }
}

/* ---------- Team ---------- */

.team-card h3 { margin-bottom: 0.25rem; }

/* Compact avatar beside the name; swaps to a real photograph later. */
.team-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.1rem;
}

.team-photo {
  width: 64px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--ink-raise-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  overflow: hidden;
}

.team-photo img { width: 28px; height: 28px; opacity: 0.5; }

.team-role {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-bio { font-size: 0.98rem; }

.team-links {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- Stats / values ---------- */

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

@media (max-width: 860px) { .values { grid-template-columns: 1fr; } }

.value h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.value p { font-size: 0.96rem; }

/* ---------- CTA band ---------- */

/* Photographic close: the Snowdon Horseshoe behind an ink scrim,
   in the same rounded-panel language as the North Wales panel. */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.75rem, 4vw, 3rem);
  text-align: center;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/img/snowdon.jpg") center 40% / cover no-repeat;
  filter: grayscale(1) contrast(1.06) brightness(0.7);
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.5);
}

.cta-band h2 { color: var(--bone); }
.cta-band p { color: var(--stone); }
.cta-band .eyebrow { color: var(--stone); justify-content: center; }

.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { max-width: 18em; margin-inline: auto; }
.cta-band p { max-width: 36em; margin: 1rem auto 0; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- North Wales panel ---------- */

/* Rounded photographic panel: Castell Caernarfon at dusk, monochrome. */
.wales-panel {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 440px;
  display: flex;
  align-items: flex-end;
}

.wales-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/img/caernarfon-castle.jpg") center 30% / cover no-repeat;
  filter: grayscale(1) contrast(1.06) brightness(0.62);
}

.wales-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 20, 25, 0.85) 0%, rgba(15, 20, 25, 0.3) 55%, rgba(15, 20, 25, 0.05) 100%);
}

.wales-panel .inner {
  position: relative;
  z-index: 1;
  padding: clamp(1.75rem, 4vw, 3rem);
  max-width: 42em;
}

.wales-panel .eyebrow { color: var(--stone); }
.wales-panel h2 { color: #FFFFFF; }
.wales-panel p { margin-top: 0.9rem; color: var(--stone); }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-line { display: grid; gap: 0.35rem; padding-block: 1.1rem; border-top: 1px solid var(--line); }
.contact-line:first-of-type { border-top: 0; padding-top: 0; }

.contact-line .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-line a { font-size: 1.15rem; font-weight: 500; color: var(--bone); }
.contact-line a:hover { color: var(--mist); }

.contact-form { display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.45rem; }

.field label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--bone);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 0.98rem;
  color: var(--bone);
  background: var(--ink-raise);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  width: 100%;
  transition: border-color 0.15s ease;
}

.field select { appearance: none; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--signal);
}

.field textarea { min-height: 150px; resize: vertical; }

.form-note { font-size: 0.85rem; color: var(--muted); }

/* Honeypot: visually removed, still present for bots */
.field.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-sent {
  background: var(--ink-raise);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}
.form-sent h3 { margin-bottom: 0.6rem; }
.form-sent p { color: var(--stone); font-size: 0.98rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.75rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand img { height: 34px; width: auto; margin-bottom: 1rem; }
.footer-brand p { color: var(--muted); max-width: 26em; }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--stone); }
.footer-col a:hover { color: var(--bone); }

.footer-col img.footer-wordmark { height: 14px; width: auto; }

.footer-bottom {
  display: grid;
  gap: 0.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
}

.footer-bottom .statutory {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ---------- Reveal on scroll ---------- */

/* Hidden state only once JS has stamped html.js, so content stays
   visible when scripts are blocked or fail. */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.in { opacity: 1; transform: none; }

/* Sibling cards arrive a beat apart */
.grid-2 > .reveal:nth-child(2),
.grid-3 > .reveal:nth-child(2),
.values > .reveal:nth-child(2) { transition-delay: 0.1s; }

.grid-3 > .reveal:nth-child(3),
.values > .reveal:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .product-card:hover { transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Cookie consent bar ---------- */

.consent-bar {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.5rem;
  width: min(680px, calc(100vw - 2rem));
  padding: 1.1rem 1.4rem;
  background: var(--ink-raise);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.consent-bar p { flex: 1 1 20em; font-size: 0.88rem; color: var(--stone); margin: 0; }
.consent-bar .consent-actions { display: flex; gap: 0.6rem; }
.consent-bar .btn { padding: 0.55rem 1.2rem; font-size: 0.88rem; }

/* ---------- 404 ---------- */

/* The bridge that doesn't reach: the Menai photo sits low and dark while
   a request trace and the 404 numeral carry the page. */
.notfound {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(560px, calc(100svh - 80px), 1000px);
  padding-block: clamp(3.5rem, 9vh, 6rem);
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.notfound::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/img/menai-bridge.jpg") center 88% / cover no-repeat;
  filter: grayscale(1) contrast(1.1) brightness(0.45);
}

.notfound::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 20, 25, 0.92) 0%, rgba(15, 20, 25, 0.72) 55%, rgba(15, 20, 25, 0.3) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(15, 20, 25, 0) 22%);
}

.notfound .container { position: relative; z-index: 1; }

.nf-trace {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.7ch;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.nf-trace .nf-method { color: var(--mist); }
.nf-trace .nf-path { color: var(--bone); word-break: break-all; }
.nf-trace .nf-status { color: var(--coral); }

.nf-cursor {
  align-self: center;
  width: 0.6ch;
  height: 1.05em;
  background: var(--mist);
  animation: nf-blink 1.1s steps(2, jump-none) infinite;
}
@keyframes nf-blink { 50% { opacity: 0; } }

.nf-code {
  margin-top: 1.4rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(4.5rem, 13vw, 6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--bone);
  text-shadow: 0 2px 28px rgba(15, 20, 25, 0.55);
}

.notfound h1 {
  margin-top: 1.1rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.notfound .lead {
  max-width: 34em;
  margin-inline: auto;
  margin-top: 1.1rem;
  color: rgba(241, 239, 232, 0.92);
}

.notfound .hero-actions { justify-content: center; margin-top: 2rem; }

.nf-links { margin-top: 2.6rem; font-size: 0.9rem; color: var(--muted); }
.nf-links a { margin-inline: 0.15rem; }

/* Entrance: quick staggered rise. Content is visible by default; the
   animation only runs when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .notfound .container > * {
    animation: nf-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
  .notfound .container > *:nth-child(2) { animation-delay: 0.08s; }
  .notfound .container > *:nth-child(3) { animation-delay: 0.16s; }
  .notfound .container > *:nth-child(4) { animation-delay: 0.24s; }
  .notfound .container > *:nth-child(5) { animation-delay: 0.32s; }
  .notfound .container > *:nth-child(6) { animation-delay: 0.4s; }
}
@keyframes nf-rise {
  from { opacity: 0; transform: translateY(14px); }
}
