/* JJS - Component Styles
   All colour, spacing and type values reference tokens.css.
   No raw hex, hardcoded px, or font stacks outside of tokens. */


/* ── Font face ─────────────────────────────────────────────── */
@font-face {
  font-family: 'Ledger';
  src: url('../fonts/Ledger-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* ── Entrance animation ─────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--anim-distance));
  transition:
    opacity    var(--anim-duration) var(--anim-ease) calc(var(--i, 0) * var(--anim-delay-step)),
    transform  var(--anim-duration) var(--anim-ease) calc(var(--i, 0) * var(--anim-delay-step));
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ── Screen-reader only ─────────────────────────────────────── */
.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;
}


/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img  { display: block; max-width: 100%; }
ul   { list-style: none; }
a    { color: inherit; text-decoration: none; }

/* Scroll offset for fixed nav */
[id] { scroll-margin-top: var(--nav-h); }


/* ================================================================
   NAV
   White bar, fixed. Logo left. Hamburger right.
   ================================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

.nav {
  background: var(--jjs-neutral-0);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.nav__inner {
  width: 100%;
  max-width: var(--max-canvas);
  margin: 0 auto;
  padding: 8px var(--section-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo-link {
  display: block;
  line-height: 0;
  opacity: 0;
  transition: opacity var(--t-slow);
}

.nav__logo-link.logo--visible {
  opacity: 1;
}

.nav__logo-link img {
  height: 30px;
  width: auto;
}

/* Hamburger: fixed above overlay, morphs to X when open */
.nav__hamburger {
  position: fixed;
  top: calc((var(--nav-h) - 44px) / 2);
  right: max(var(--section-px), calc((100vw - var(--max-canvas)) / 2 + var(--section-px)));
  z-index: 201;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav__hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-primary);
  transition:
    transform 0.35s var(--anim-ease),
    opacity   0.2s ease,
    background var(--t-base);
}

/* Morph to X when open */
.nav__hamburger.is-open span {
  background: var(--jjs-neutral-0);
}
.nav__hamburger.is-open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav__hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__hamburger.is-open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}


/* ── Mobile nav overlay ─────────────────────────────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--jjs-neutral-950);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-slow);
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay__close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-overlay__close span {
  position: absolute;
  width: 24px; height: 1.5px;
  background: rgba(255,255,255,0.5);
  transition: background var(--t-base);
}

.nav-overlay__close span:first-child { transform: rotate(45deg); }
.nav-overlay__close span:last-child  { transform: rotate(-45deg); }
.nav-overlay__close:hover span       { background: rgba(255,255,255,0.9); }

.nav-overlay__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.nav-overlay__link {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--jjs-neutral-0);
  opacity: 0.8;
  transition: opacity var(--t-base), color var(--t-base);
}

.nav-overlay__link:hover {
  opacity: 1;
  color: var(--accent);
}


/* ================================================================
   SECTION BASE
   Sections fill full viewport width.
   Inner container caps at 1440px and holds padding.
   ================================================================ */
.section {
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.section__inner {
  max-width: var(--max-canvas);
  margin: 0 auto;
  padding: var(--section-py) var(--section-px);
}

/* Two-column layout: fluid main + 320px side. Matches Figma at 1440px. */
.section__row {
  display: grid;
  grid-template-columns: 1fr var(--col-side);
  gap: var(--col-gap);
  align-items: start;
}


/* ── Section label ──────────────────────────────────────────── */
.section-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--accent);
  margin-bottom: 40px;  /* 57px frame start - 17px label height */
}

.section-label--white  { color: var(--jjs-neutral-0); }
.section-label--hidden { visibility: hidden; }


/* ── Section heading ────────────────────────────────────────── */
.section-heading {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: 400;
  line-height: var(--lh-display, 1.2);
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-heading--white { color: var(--jjs-neutral-0); }


/* ── Body block ─────────────────────────────────────────────── */
.body-block p {
  font-family: var(--font-sans);
  font-size: var(--fs-body-lg);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-body);
}

.body-block p + p { margin-top: 24px; }

.body-block--white p { color: var(--jjs-neutral-0); }

.body-block__emphasis {
  font-weight: 500 !important;
}


/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--btn-w);
  height: var(--btn-h);
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--ls-btn);
  border-radius: var(--btn-r);
  cursor: pointer;
  transition: filter var(--t-base);
  margin-top: 40px;
}

.btn:hover { filter: brightness(0.9); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Gold bg, black text */
.btn--gold {
  background: var(--accent);
  color: var(--text-on-gold);
}

/* Black bg, white text */
.btn--dark {
  background: var(--text-primary);
  color: var(--jjs-neutral-0);
}


/* ================================================================
   1. HERO
   V-building architectural photo. Logo centered. No headline.
   ================================================================ */
.section--hero {
  min-height: 100vh;
  background: url('../images/img-hero-1.webp') center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__logo {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 5;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Start hidden, offset below center - no JS dependency */
  opacity: 0;
  transform: translate(-50%, calc(-50% + var(--anim-distance)));
  transition:
    opacity   var(--anim-duration) var(--anim-ease),
    transform var(--anim-duration) var(--anim-ease);
}

/* Entrance: fades in and slides up to center */
.hero__logo.hero__logo--visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* Exit: fades out and rises above center, 400ms ease-in */
.hero__logo.hero__logo--exit {
  opacity: 0;
  transform: translate(-50%, calc(-50% - var(--anim-distance)));
  transition:
    opacity   400ms cubic-bezier(0.64, 0, 0.78, 0),
    transform 400ms cubic-bezier(0.64, 0, 0.78, 0);
}

.hero__logo img {
  width: 320px;
  height: 160px;
  object-fit: contain;
}


/* ================================================================
   2. QUOTE (dark)
   Rainy-street photo + 30% black overlay. Headline + gold CTA.
   ================================================================ */
.section--quote {
  min-height: 100vh;
  background-color: #000;
  display: flex;
  align-items: center;
}

/* B&W photo layer - grayscale to match Figma MULTIPLY treatment */
.section--quote::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero.webp') center / cover no-repeat;
  filter: grayscale(1);
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

/* 30% black overlay */
.section--quote::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.30);
  pointer-events: none;
  z-index: 1;
}

.section--quote .section__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.quote__col {
  width: 688px;
  max-width: 100%;
}

.quote__heading {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: 400;
  line-height: 1.35;
  color: var(--jjs-neutral-0);
  margin-bottom: 0;
}


/* ================================================================
   3. ABOUT
   Cream bg. Ghost watermark. Text in left column only.
   ================================================================ */
.section--about {
  min-height: 100vh;
  background: var(--surface-about);
  display: flex;
  align-items: center;
}

/* Ghost silhouette watermark - DIFFERENCE blend at 10% per Figma */
.section--about::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/img-about.webp') center / cover no-repeat;
  opacity: 0.10;
  mix-blend-mode: difference;
  pointer-events: none;
}

.section--about .section__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.section--about .section__col-main {
  width: var(--col-main);
  max-width: 100%;
}


/* ================================================================
   4. INVESTIGATIONS
   Gold bg (#aa8652) + building image texture. Two-column.
   ================================================================ */
.section--investigations {
  min-height: 100vh;
  background-color: var(--accent);
  display: flex;
  align-items: center;
}

/* Image texture layer over gold */
.section--investigations::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/service-investigations.webp') center / cover no-repeat;
  opacity: 0.30;
  filter: grayscale(1);
  mix-blend-mode: plus-lighter;
  pointer-events: none;
}

.section--investigations .section__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Service card: dark panel (#1a1a1a, 90% opacity) */
.service-card {
  border-radius: var(--card-r-inv);
  padding: var(--card-pad);
}

.service-card--dark {
  background: var(--jjs-card-dark);
  border-radius: var(--card-r-inv);
}

.service-card--gold {
  background: var(--jjs-card-gold);
  border-radius: var(--card-r-risk);
}

.service-card__intro {
  font-family: var(--font-sans);
  font-size: var(--fs-body-md);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 12px;
}

.service-card--dark .service-card__intro { color: var(--jjs-neutral-0); }
.service-card--gold .service-card__intro { color: var(--text-primary); }

.service-card__list li {
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  font-weight: 300;
  line-height: 1.8;
}

.service-card--dark .service-card__list li { color: var(--jjs-neutral-0); }
.service-card--gold .service-card__list li { color: var(--text-primary); }

/* Bullet: small left-pad treatment via ::before */
.service-card__list li::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  opacity: 0.6;
}


/* ================================================================
   5. RISK MANAGEMENT
   Dark city photo + warm gold tint overlay. 100vh. Two-column.
   ================================================================ */
.section--risk {
  min-height: 100vh;
  background-color: #000;
  display: flex;
  align-items: center;
}

/* Photo at 50% luminosity - creates B&W luminance base */
.section--risk::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/service-risk.webp') center / cover no-repeat;
  opacity: 0.5;
  mix-blend-mode: luminosity;
  pointer-events: none;
  z-index: 0;
}

/* Gold COLOR blend - tints the luminance with brand gold */
.section--risk::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #aa8652;
  mix-blend-mode: color;
  pointer-events: none;
  z-index: 1;
}

.section--risk .section__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}


/* ================================================================
   6. TESTIMONIALS
   Warm cream bg. Three white cards. Slightly narrower gutter.
   ================================================================ */
.section--testimonials {
  min-height: 100vh;
  background: var(--surface-testimonials);
  display: flex;
  align-items: center;
}

.testimonials__inner {
  max-width: var(--max-canvas);
  margin: 0 auto;
  padding: var(--testi-py) var(--testi-px);
  width: 100%;
}

.testimonials__header {
  margin-bottom: 59px;  /* 92px to grid - 33px heading height */
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Card: white, 28px padding, radius 3 */
.testimonial-card {
  background: var(--jjs-neutral-0);
  border-radius: var(--card-r-test);
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
}

.testimonial-card blockquote {
  font-family: var(--font-serif);
  font-size: var(--fs-testimonial);
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-testimonial);
  flex: 1;
}

.testimonial-card blockquote p { margin: 0; }

.testimonial-attribution {
  font-family: var(--font-sans);
  font-size: var(--fs-attribution);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--ls-attribution);
  color: var(--accent);
  margin-top: 24px;
}


/* ================================================================
   7. CONTACT
   Black base + desaturated city photo + 60% black overlay (Figma exact).
   ================================================================ */
.section--contact {
  min-height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
}

/* Desaturated city photo - saturation:-1 in Figma = grayscale(1) in CSS */
.section--contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/img-contact.webp') center / cover no-repeat;
  filter: grayscale(1);
  pointer-events: none;
  z-index: 0;
}

/* 60% black overlay */
.section--contact::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.60);
  pointer-events: none;
  z-index: 1;
}

.section--contact .section__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.section--contact .section__col-main {
  width: var(--col-main);
  max-width: 100%;
}

.contact-details {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-number,
.contact-email {
  font-family: var(--font-sans);
  font-size: var(--fs-contact-num);
  font-weight: 300;
  color: var(--jjs-neutral-0);
  line-height: 1.5;
  transition: color var(--t-base);
}

.contact-number:hover,
.contact-email:hover {
  color: var(--accent);
}


/* ================================================================
   FOOTER
   White bg. Nav left. Logo right. Copyright right-aligned.
   ================================================================ */
.footer {
  background: var(--surface-footer);
  padding: 40px 0 16px;
}

.footer__inner {
  max-width: var(--max-canvas);
  margin: 0 auto;
  padding: 8px var(--section-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Footer nav: About | Investigations | Risk Management | Contact
   Exact gaps from Figma: 32px between each item */
.footer__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.footer__nav a {
  font-family: var(--font-sans);
  font-size: var(--fs-nav);
  font-weight: 400;
  color: var(--text-primary);
  opacity: 0.55;
  transition: color var(--t-base), opacity var(--t-base);
}

.footer__nav a:hover {
  color: var(--accent);
  opacity: 1;
}

.footer__logo img {
  height: 30px;
  width: auto;
}

.footer__copyright {
  max-width: var(--max-canvas);
  margin: 0 auto;
  padding: 0 var(--section-px);
  margin-top: 32px;  /* 8px inner bottom padding + 32px = 40px Figma itemSpacing */
  text-align: right;
  font-family: var(--font-sans);
  font-size: var(--fs-copyright);
  font-weight: 400;
  color: var(--text-primary);
  opacity: 0.22;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Large tablet / small desktop: tighten gutter + gap so two columns scale down */
@media (max-width: 1200px) {

  :root {
    --section-px: 100px;
    --col-gap:     60px;
  }
}

/* Tablet: 900px */
@media (max-width: 900px) {

  :root {
    --section-px: 48px;
    --testi-px:   48px;
    --col-gap:    40px;
  }

  .section__row {
    grid-template-columns: 1fr;
  }

  .section--about .section__col-main,
  .section--contact .section__col-main,
  .quote__col {
    width: 100%;
  }

  .section-heading { font-size: 30px; }
  .quote__heading  { font-size: 30px; }

  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .footer__inner { flex-direction: column; gap: 24px; align-items: flex-start; }
  .footer__copyright { text-align: left; }
}

/* Mobile: 600px */
@media (max-width: 600px) {

  :root {
    --section-px: 24px;
    --testi-px:   24px;
    --section-py: 72px;
    --testi-py:   72px;
    --btn-w: 100%;
  }

  .section-heading { font-size: 26px; }
  .quote__heading  { font-size: 26px; }

  .body-block p   { font-size: 18px; }

  .hero__logo img { width: 220px; height: auto; }

  .testimonials__grid { grid-template-columns: 1fr; }

  .testimonial-card { min-height: auto; }

  .section--hero { min-height: 600px; }

  .footer__nav { flex-direction: column; align-items: flex-start; gap: 16px; }

  .nav__inner { padding: 8px 24px; }
}
