/* ================================================================
   Belviston Developments — main stylesheet
   Palette: navy blue, sky blue, grey (from logo & business card)
   Built for WCAG 2.2 AA: contrast, focus states, reduced motion.
   Author Roger Udall www.rogerudall.co.uk
   ================================================================ */

/* ---------- Design tokens ---------- */
:root {
  --navy:        #0f0f6b;   /* brand navy (from logo #080884, softened) */
  --navy-deep:   #0a0a3f;   /* deep navy for hero / footer */
  --navy-ink:    #10133a;   /* near-navy body text */
  --sky:         #2a6099;   /* sky blue accent — AA on white/grey/tint (>=5.4:1) */
  --sky-hover:   #1f4d7d;   /* darker sky for button hover */
  --sky-light:   #a9c8ef;   /* light sky for text on navy backgrounds only */
  --sky-tint:    #eaf1fa;   /* pale sky background block */
  --grey-50:     #f5f6f8;   /* lightest grey background */
  --grey-100:    #eceef2;
  --grey-200:    #dfe3ea;
  --grey-500:    #5b6472;   /* muted body text (AA on white) */
  --grey-700:    #333a46;   /* strong body text */
  --white:       #ffffff;
  --silver:      #c9ccd6;

  --maxw:        1160px;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 18px 40px -20px rgba(15, 15, 107, .35);
  --shadow-sm:   0 6px 18px -10px rgba(16, 19, 58, .35);

  --font-body: "Helvetica Neue", Arial, "Segoe UI", system-ui, sans-serif;
  --font-head: "Helvetica Neue", Arial, "Segoe UI", system-ui, sans-serif;
  --header-h: 74px;
}

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

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

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

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

a { color: var(--sky); }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.5rem; }
.container.narrow { max-width: 780px; }
.container.center { text-align: center; }

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute !important;
  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: -60px;
  z-index: 1000;
  background: var(--navy);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 1rem; }

/* Visible focus for keyboard users everywhere */
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  letter-spacing: .01em;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary {
  background: var(--sky);
  color: #fff;
  border-color: var(--sky);
}
.btn-primary:hover { background: var(--sky-hover); border-color: var(--sky-hover); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.7);
}
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; transform: translateY(-2px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--grey-200);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--navy);
}
.brand-mark { display: inline-flex; color: var(--navy); }
.brand-mark img { width: 40px; height: 40px; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name-main {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--navy);
}
.brand-name-sub {
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-top: 3px;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: .3rem;
  margin: 0; padding: 0;
}
.primary-nav a {
  display: block;
  text-decoration: none;
  color: var(--navy-ink);
  font-weight: 600;
  font-size: .98rem;
  padding: .55rem .9rem;
  border-radius: 999px;
  position: relative;
  transition: color .2s ease, background-color .2s ease;
}
.primary-nav a:hover { background: var(--grey-100); }
.primary-nav a.is-current { color: var(--sky); }
.primary-nav a.is-current::after {
  content: "";
  position: absolute;
  left: .9rem; right: .9rem; bottom: .32rem;
  height: 2px;
  background: var(--sky);
  border-radius: 2px;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px; height: 46px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--grey-200);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 22px; height: 2px;
  margin-inline: auto;
  background: var(--navy);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,63,.72) 0%, rgba(10,10,63,.55) 45%, rgba(15,15,107,.82) 100%);
}
.hero-content {
  position: relative;
  padding-block: 5rem;
  max-width: 760px;
}
.hero-mark { display: inline-flex; color: var(--sky-light); margin-bottom: 1.1rem; }
.hero-mark img { width: 72px; height: 72px; }
.hero h1 { color: #fff; margin-bottom: 1rem; text-wrap: balance; }
.hero-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255,255,255,.92);
  max-width: 60ch;
  margin-bottom: 1.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ---------- Section shells & colour blocks ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); scroll-margin-top: var(--header-h); }
.section-light { background: var(--white); }
.section-grey  { background: var(--grey-50); }
.section-sky   { background: var(--sky-tint); }
.section-navy  { background: var(--navy); color: #fff; }
.section-navy h2 { color: #fff; }
.section-navy .section-intro,
.section-navy p { color: rgba(255,255,255,.9); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--sky);
  margin: 0 0 .8rem;
}
.eyebrow-light { color: var(--sky-light); }

.section-head { max-width: 760px; margin-bottom: 2.6rem; }
.section-intro { font-size: 1.1rem; }

/* ---------- Split (text + image) ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.split-text h2 { margin-bottom: .6rem; }
.split-reverse .split-text { order: 2; }
.split-reverse .split-media { order: 1; }

/* ---------- Value grid ---------- */
.value-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.value-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
}
.value-card h3 { color: #fff; margin-bottom: .5rem; }
.value-card p { color: rgba(255,255,255,.86); margin: 0; font-size: .98rem; }
.value-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 54px; height: 54px;
  border-radius: 12px;
  background: rgba(169,200,239,.16);
  color: var(--sky-light);
  margin-bottom: 1.1rem;
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
.team-card {
  display: flex;
  gap: 1.4rem;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
}
.team-photo {
  flex: 0 0 auto;
  width: 96px; height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.team-photo img.avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-photo-placeholder { background: var(--navy); color: var(--sky-light); }
.team-photo-placeholder img { width: 56px; height: 56px; }
.team-photo-empty { background: var(--grey-100); color: var(--grey-500); border: 1px dashed var(--grey-200); }
.team-name { margin-bottom: .1rem; }
.team-role {
  color: var(--sky);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  margin-bottom: .9rem;
}
.team-body p:last-child { margin-bottom: 0; }
.team-card-placeholder { background: var(--grey-50); border-style: dashed; }

/* Single feature card — image left, bio right */
.team-feature {
  display: grid;
  grid-template-columns: 320px 1fr;
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.team-feature-photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
  display: block;
}
.team-feature-body { padding: clamp(1.8rem, 3.5vw, 3rem); align-self: center; }
.team-feature-body p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .team-feature { grid-template-columns: 1fr; }
  .team-feature-photo img { max-height: 380px; }
}

/* ---------- Case studies ---------- */
.coming-soon-tag {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1.4rem;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--sky);
  color: var(--navy);
  font-weight: 600;
  font-size: .92rem;
}
.coming-soon-tag span { color: var(--sky); font-size: .7rem; }

/* ---------- Contact ---------- */
.contact-cards {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.contact-cards li {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 1.5rem min(2.2rem, 5vw);
  min-width: min(240px, 100%);
  max-width: 100%;
}
.contact-label {
  display: block;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--sky-light);
  margin-bottom: .3rem;
}
.contact-value {
  display: block;
  /* vw cap keeps the email on one line: it shrinks with the viewport and,
     unlike rem, is immune to the user's device text-size setting. */
  font-size: min(1.25rem, 5vw);
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  max-width: 100%;
  white-space: nowrap;
}
a.contact-value:hover { color: var(--sky-light); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.82);
  padding-block: 2.2rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.brand-footer { color: #fff; }
.brand-footer .brand-mark { color: var(--sky-light); }
.brand-footer .brand-name-main { color: #fff; }
.brand-footer .brand-name-sub { color: rgba(255,255,255,.6); }
.footer-copy { margin: 0; font-size: .92rem; }
.footer-nav a { color: #fff; text-decoration: none; font-weight: 400; font-size: .92rem; }
.footer-nav a:hover { text-decoration: underline; }

.footer-credit {
  margin-top: 1.4rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255,255,255,.14);
  text-align: center;
}
.footer-credit p { margin: 0; font-size: .92rem; font-weight: 400; color: #fff; }
.footer-credit a { color: #fff; text-decoration: none; font-weight: 400; }
.footer-credit a:hover { text-decoration: underline; }

/* ---------- Privacy / content pages ---------- */
.page-hero {
  background: var(--navy);
  color: #fff;
  padding-block: clamp(3rem, 6vw, 4.5rem);
  scroll-margin-top: var(--header-h);
}
.page-hero h1 { color: #fff; margin-bottom: .4rem; }
.page-hero p { color: rgba(255,255,255,.85); margin: 0; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.6rem; color: var(--navy); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--sky); }
.updated-note { color: var(--grey-500); font-size: .92rem; }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--grey-200);
    box-shadow: var(--shadow-sm);
    display: none;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: .5rem 1rem 1rem; }
  .primary-nav a { padding: .9rem .6rem; border-radius: 8px; }
  .primary-nav a.is-current::after { display: none; }
  .primary-nav a.is-current { background: var(--sky-tint); }

  .split { grid-template-columns: 1fr; }
  .split-reverse .split-text { order: 1; }
  .split-reverse .split-media { order: 2; }
  .split-media img { aspect-ratio: 16 / 10; }

  .value-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brand-name-sub { letter-spacing: .2em; }
  .team-card { flex-direction: column; text-align: left; }
  .field-row { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }
}

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

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .hero-actions, .skip-link { display: none; }
  .hero, .section-navy { color: #000; }
  body { color: #000; }
}
