/* =========================================================
   Bellemont Consulting Limited — Stylesheet
   Specialist risk advisory. Mobile-first, responsive.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand colours */
  --navy:  #312647;
  --violet: #7F719E;
  --mist:  #F4F2F7;
  --slate: #2C2C2C;
  --grey:  #6B6B6B;
  --white: #FFFFFF;

  /* Typography */
  --font-heading: "Shippori Mincho", Georgia, "Times New Roman", serif;
  --font-body: "Alegreya Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-accent: "Cormorant Garamond", serif;

  /* Fluid type scale */
  --fs-hero: clamp(2.25rem, 6vw, 4.25rem);
  --fs-h2:   clamp(1.6rem, 3.5vw, 2.5rem);
  --fs-h3:   clamp(1.2rem, 2vw, 1.4rem);
  --fs-body: clamp(1rem, 1.3vw, 1.125rem);
  --fs-small: 0.9rem;

  /* Layout */
  --container: 1140px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --space-section: clamp(4.5rem, 10vw, 9rem);
  --nav-height: 92px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.8;   /* airier leading — gives Alegreya Sans an editorial feel */
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;   /* Shippori Mincho reads tighter, more considered at size */
  color: var(--navy);
  margin: 0 0 0.6em;
}

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--navy); }

/* Custom text selection — the same violet across every section.
   (Safari/WebKit uses the standard ::selection; ::-moz-selection is the only
   real vendor prefix and must be a separate rule to avoid invalidating both.) */
::selection { background: var(--violet); color: var(--white); }
::-moz-selection { background: var(--violet); color: var(--white); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* Contact: tighter top padding, and blends seamlessly into the navy footer. */
#contact {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3rem, 8vw, 4rem);
  padding-bottom: 2rem;
}

/* Same grain as the footer, hero and dividers — Contact + footer read as one
   continuous grained navy panel. */
#contact::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  background-repeat: repeat;
}
#contact > .container { position: relative; z-index: 1; }

/* "Who we are" — warm off-white with a subtle CSS grain texture (no image). */
#people {
  position: relative;
  background-color: #FDFDFC;
}

#people::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.09;
}

/* Content sits above the grain pseudo-element. */
#people > * {
  position: relative;
  z-index: 1;
}

/* Full-width dividers — solid navy with grain texture (bleed edge to edge). */
.divider {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38vh;
  padding: clamp(2rem, 5vw, 3rem) var(--gutter);
  background-color: var(--navy);
}

/* Heavy film grain over the divider — same settings as the hero. */
.divider::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  background-repeat: repeat;
}

/* Quote + attribution inside a divider (sit above the navy + grain). */
.divider__quote {
  position: relative;
  z-index: 1;
  font-family: var(--font-accent);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  color: var(--white);
  letter-spacing: 0.02em;
  max-width: 700px;
  margin: 0 auto 1rem;
  line-height: 1.4;
  text-align: center;
}

.divider__attribution {
  position: relative;
  z-index: 1;
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--violet);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
}

@keyframes slowZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.12); }
}


.section__eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  color: var(--violet);
  margin: 0 0 0.8rem;
}

.section__title {
  font-size: var(--fs-h2);
  max-width: 22ch;
}

.section__intro {
  max-width: 60ch;
  color: var(--slate);
}

/* =========================================================
   Navigation — sticky, logo only
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  padding-bottom: 0.75rem;   /* white space below the content-width rule */
  transition: transform 0.25s ease;
  will-change: transform;
}

/* Auto-hide header — slides away on scroll down, back on scroll up
   (JS toggles .nav--hidden). Applies on all screen sizes. */
.nav--hidden { transform: translateY(-100%); }

.nav__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  /* Generous space flanking the centred logo (Services–logo–People).
     Mobile keeps the 1rem minimum so the single row still fits. */
  gap: clamp(1rem, 4vw, 3.25rem);
  min-height: var(--nav-height);
}

/* Violet rule spanning the content width (inset by the gutter on all screens,
   so it never reaches the page edges — including on mobile). */
.nav__inner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 2px;
  background: var(--violet);
}

.nav__group {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 4rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__group--left { justify-content: flex-end; }
.nav__group--right { justify-content: flex-start; }

.nav__group a {
  position: relative;
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--navy);
  transition: color 0.6s ease;
}
/* Thin violet underline that slides in from the left on hover. */
.nav__group a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--violet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}
.nav__group a:hover { color: var(--violet); }
.nav__group a:hover::after { transform: scaleX(1); }

.nav__logo-link {
  display: flex;
  justify-content: center;
}

.nav__logo { height: clamp(64px, 6.5vw, 80px); width: auto; }

/* Very narrow screens only: the single-row nav no longer fits, so stack the
   logo on top with the four links in a centred row below. Above 360px the
   default grid keeps the logo centred between Services and People. */
@media (max-width: 359px) {
  .nav__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.85rem 1.5rem;
    padding-block: 0.9rem;
  }
  .nav__logo-link { order: 1; flex-basis: 100%; }
  .nav__group--left { order: 2; }
  .nav__group--right { order: 3; }
  .nav__group { justify-content: center; gap: 1.5rem; }
}

/* =========================================================
   Hero — full viewport, navy, B mark + heading
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  align-items: center;

  /* Zooming image sits behind an animated navy reveal (see .hero__bg + ::before). */
  background-color: var(--navy);
}

/* Image layer — slow Ken Burns zoom. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("images/hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: slowZoom 20s ease-in-out infinite alternate;
  will-change: transform;
}

/* Navy brand overlay: starts solid, then eases back to a resting tint on load,
   slowly revealing the atmospheric image beneath — an elegant entrance. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--navy);
  animation: hero-reveal 3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes hero-reveal {
  0%   { opacity: 1; }
  100% { opacity: 0.55; }
}

/* Fine grain across the whole hero — tactile, print-like texture. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  background-repeat: repeat;
}

@media (prefers-reduced-motion: reduce) {
  /* No entrance animation or zoom — show the settled state directly. */
  .hero::before { animation: none; opacity: 0.55; }
  .hero__bg { animation: none; }
  /* (Hover transitions are disabled in a block at the end of the file, so it
     wins over the component rules that are defined below.) */
}

.hero__inner {
  position: relative;
  z-index: 3;                     /* text above the reveal overlay + grain */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.75rem;
  padding-block: var(--space-section);
}

.hero h1 {
  color: var(--white);
  font-size: var(--fs-hero);
  max-width: 16ch;
  margin: 0;
}

/* Each sentence highlights independently on hover. */
.hero__word { transition: color 0.6s ease; }
.hero__word:hover { color: var(--violet); }

/* =========================================================
   About
   ========================================================= */
.about__lead {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.3;
  max-width: 26ch;
  margin-bottom: 1.5rem;
}

.about__body { max-width: 62ch; }

@media (min-width: 900px) {
  .about__grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
  .about__lead { margin-bottom: 0; }
}

/* =========================================================
   Services — 3 columns
   ========================================================= */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  margin-top: clamp(2rem, 5vw, 3.5rem);
  /* Horizontal room so hover-lift shadows have space to breathe and aren't
     clipped at the grid edges. */
  padding: 0 0.5rem;
}

.service {
  margin: 0.5rem;   /* breathing room around each card */
  padding-top: 1.5rem;
  border-top: 2px solid var(--violet);
}

.service__numeral {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--violet);
  opacity: 0.35;
  margin-bottom: 0.5rem;
}

.service h3 {
  color: var(--navy);
  font-size: var(--fs-h3);
  margin-bottom: 0.6rem;
  transition: color 0.6s ease;
}
.service p { color: var(--slate); }

/* On hover, only the heading shifts to violet. */
.service:hover h3 { color: var(--violet); }

/* Optical margin alignment: the sans-serif body sits a hair left of the serif
   heading above, so their optical left edges agree — a well-set-book refinement. */
.about__body p,
.service p,
.member__bio {
  text-indent: -0.05em;
}

/* =========================================================
   Team
   ========================================================= */
.team__grid { margin-top: clamp(2rem, 5vw, 3rem); }

.member { max-width: 68ch; }
.member + .member { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

.member__name {
  font-size: var(--fs-h3);
  margin-bottom: 0.15rem;
}

.member__role {
  font-family: var(--font-body);
  color: var(--violet);
  font-size: 1rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.member__bio { color: var(--slate); }

/* =========================================================
   Locations — 3 columns
   ========================================================= */
.locations__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(2rem, 5vw, 3rem);
  /* Columns are centred on the page by the grid; content within each is aligned
     by geography (see the per-column rules below). */
  text-align: left;
}

.location {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  color: var(--navy);
  padding-block: 1rem;
}

/* City name highlights to violet when its location is hovered. */
.location__name { transition: color 0.6s ease; }
.location:hover .location__name { color: var(--violet); }

.location__rule {
  width: 40px;
  height: 2px;
  background: var(--violet);
  margin: 0 0 1.5rem;
}

/* Alignment reflects geography: London (west) left, Ho Chi Minh City (centre)
   centred, Singapore (east) right — text plus the violet rule in each column. */
.location:nth-child(1) { text-align: left; }
.location:nth-child(2) { text-align: center; }
.location:nth-child(3) { text-align: right; }
.location:nth-child(1) .location__rule { margin: 0 auto 1.5rem 0; }
.location:nth-child(2) .location__rule { margin: 0 auto 1.5rem; }
.location:nth-child(3) .location__rule { margin: 0 0 1.5rem auto; }

/* Mobile: centre every column (matches the per-column specificity so it wins). */
@media (max-width: 768px) {
  .location:nth-child(1),
  .location:nth-child(2),
  .location:nth-child(3) { text-align: center; }
  .location:nth-child(1) .location__rule,
  .location:nth-child(2) .location__rule,
  .location:nth-child(3) .location__rule { margin: 0 auto 1.5rem; }
}

.location__coords {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--grey);
  margin-top: 0.4rem;
}

.location__desc {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;               /* override the inherited 800 from .location */
  font-size: 0.8rem;
  color: var(--grey);
  letter-spacing: 0.08em;
  margin-top: 0.75rem;
}

/* =========================================================
   Contact
   ========================================================= */
/* Left-aligned text block inside the standard container, so the contact
   content lines up with the footer copyright at every width. */
.contact__inner { max-width: 680px; margin-inline: 0; }

.contact__details {
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.6;
}

.contact__details a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.6s ease;
}
/* No underline until hover; colour eases to violet to match the other hovers. */
.contact__details a:hover {
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.contact__address {
  margin-top: 1.1rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--mist);
  max-width: 30ch;
}

.contact__company {
  margin-top: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--mist);
  opacity: 0.6;
}

/* Navy contact section — text flips to light for the navy background,
   creating a natural transition into the navy footer. */
.section--navy .section__title { color: var(--white); }
.section--navy .section__eyebrow { color: var(--violet); }
.section--navy .contact__details { color: var(--mist); }
.section--navy .contact__details a { color: var(--mist); }
.section--navy .contact__details a:hover { color: var(--violet); }

/* =========================================================
   Footer — navy, white logo
   ========================================================= */
.footer {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--mist);
  padding-top: 1rem;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

/* Same grain as the hero and dividers — reads as one navy material. */
.footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  background-repeat: repeat;
}

.footer__inner {
  position: relative;
  z-index: 1;   /* copyright sits above the grain */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer__copy {
  font-size: var(--fs-small);
  color: rgba(244, 242, 247, 0.7);
  margin: 0;
}

/* ---------- Tablet / desktop ---------- */
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .locations__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Reduced motion: cancel every hover transition — both the fade-in (on the
   :hover states) and the fade-out (on the base states). Placed at the end of
   the file so it overrides the component rules above by source order. */
@media (prefers-reduced-motion: reduce) {
  .nav__group a,
  .nav__group a::after,
  .contact__details a,
  .service h3,
  .service:hover h3,
  .hero__word,
  .hero__word:hover,
  .location__name,
  .location:hover .location__name { transition: none; }
}
