/* R&J Capital — brand: charcoal #686870, steel blue #7098C8, white #FFFFFF, soft grey #F5F6F8 */
:root {
  --charcoal: #686870;
  --steel: #7098C8;
  --white: #FFFFFF;
  --soft: #F5F6F8;
  --charcoal-deep: #4a4a52;
  --steel-soft: rgba(112, 152, 200, 0.15);
  --max: 1080px;
  --font: "Montserrat", system-ui, -apple-system, sans-serif;
  --header-h: 84px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--steel);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover { color: var(--charcoal-deep); }

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(104, 104, 112, 0.12);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-link img {
  height: 52px;
  width: auto;
  display: block;
  background: transparent;
  box-shadow: none;
}
@media (min-width: 768px) {
  .logo-link img { height: 64px; }
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(104, 104, 112, 0.25);
  color: var(--charcoal);
  padding: 0.5rem 0.75rem;
  font-family: var(--font);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 2px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-nav a.is-active {
  color: var(--steel);
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid rgba(104, 104, 112, 0.12);
    padding: 1rem 1.5rem 1.5rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
}

/* —— Layout —— */
main { min-height: 60vh; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}
.section--soft { background: var(--soft); }
.section--tight { padding: 3rem 0; }

.eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 1rem;
}
.eyebrow--on-dark {
  color: rgba(112, 152, 200, 0.95);
}

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal-deep);
  line-height: 1.35;
  margin: 0 0 1.25rem;
}

h1 { font-size: clamp(1.35rem, 3.5vw, 1.85rem); }
h2 { font-size: clamp(1.05rem, 2.5vw, 1.25rem); }
h3 {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}

.on-dark {
  color: var(--white) !important;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
}

.lede {
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 38rem;
  margin: 0 0 1.5rem;
  color: var(--charcoal);
}

.prose {
  max-width: 40rem;
}
.prose p { margin: 0 0 1.25rem; }
.prose p:last-child { margin-bottom: 0; }

/* —— Video backgrounds —— */
.bg-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.bg-video__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.bg-video__overlay {
  position: absolute;
  inset: 0;
}
.bg-video__overlay--hero {
  /* Light veil only for white text contrast; video colors stay true */
  background:
    linear-gradient(180deg, rgba(20, 22, 28, 0.22) 0%, rgba(20, 22, 28, 0.28) 50%, rgba(20, 22, 28, 0.36) 100%);
}
.bg-video__overlay--contact {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.18) 55%, rgba(255, 255, 255, 0.26) 100%);
}
.bg-video__overlay--footprint {
  /* Light veil only for white text / dots contrast; video colors stay true */
  background:
    linear-gradient(180deg, rgba(20, 22, 28, 0.18) 0%, rgba(20, 22, 28, 0.22) 45%, rgba(20, 22, 28, 0.30) 100%);
}
/* No color filters on background videos — original clip colors */
.bg-video--soft .bg-video__media {
  opacity: 1;
  filter: none;
}

.section--video {
  position: relative;
  overflow: hidden;
  background: var(--soft);
  /* Match hero: full viewport so all three bg videos share the same stage */
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.section-video__content {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* —— Hero (full viewport) —— */
.hero-video {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #2a2c34;
}
.hero-video__content {
  position: relative;
  z-index: 1;
  padding: 4rem 1.5rem 5rem;
  width: 100%;
}
/* Logo band above HK hero */
.logo-band {
  background: var(--white);
  border-bottom: 1px solid rgba(104, 104, 112, 0.08);
  text-align: center;
}
.logo-band__inner {
  padding: 3.5rem 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-logo {
  margin: 0 auto;
  width: min(280px, 70vw);
  height: auto;
  display: block;
  background: transparent;
  box-shadow: none;
}
.hero-video h1 {
  margin-left: auto;
  margin-right: auto;
  max-width: 28em;
}
.hero-video .lede {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.25rem;
}

/* —— Buttons —— */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.9rem 1.6rem;
  border: 1px solid var(--charcoal);
  color: var(--charcoal);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.btn:hover {
  background: var(--charcoal);
  color: var(--white);
  border-color: var(--charcoal);
}
.btn--steel {
  border-color: var(--steel);
  color: var(--steel);
}
.btn--steel:hover {
  background: var(--steel);
  color: var(--white);
  border-color: var(--steel);
}
.btn--fill {
  background: var(--charcoal);
  color: var(--white);
}
.btn--fill:hover {
  background: var(--charcoal-deep);
  border-color: var(--charcoal-deep);
  color: var(--white);
}
.btn--on-dark {
  border-color: rgba(255, 255, 255, 0.85);
  color: var(--white);
}
.btn--on-dark:hover {
  background: var(--white);
  color: var(--charcoal-deep);
  border-color: var(--white);
}
.btn--steel-on-dark {
  border-color: var(--steel);
  color: #c5d8ef;
  background: rgba(112, 152, 200, 0.12);
}
.btn--steel-on-dark:hover {
  background: var(--steel);
  color: var(--white);
  border-color: var(--steel);
}

/* —— Cards / pillars —— */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.25rem 2.5rem;
  margin-top: 1rem;
}
@media (max-width: 720px) {
  .pillars { grid-template-columns: 1fr; gap: 2.5rem; }
}
.pillar {
  padding: 0;
  border-top: 1px solid rgba(112, 152, 200, 0.45);
  padding-top: 1.5rem;
}
.pillar p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* —— Footprint map (video backdrop; white dots + logo pins only — no map fill) —— */
#footprint.section--video {
  /* Fallback while video loads; video covers this */
  background: #2a2c34;
}

/* Footprint eyebrow — white over Amazon video (not steel blue) */
#footprint .eyebrow--on-dark {
  color: #ffffff;
  font-size: 0.95rem;
  letter-spacing: 0.26em;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}

.footprint-copy {
  max-width: 48rem;
  position: relative;
  z-index: 1;
}
.footprint-copy h2.on-dark {
  font-size: clamp(1.45rem, 3.8vw, 1.95rem);
  letter-spacing: 0.16em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.55);
}
.footprint-copy .lede {
  max-width: 42rem;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  line-height: 1.7;
}
.footprint-copy .lede.on-dark {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

.map-wrap {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 2.75rem auto 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  padding: 0.5rem 0 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  z-index: 1;
}
#world-map {
  display: block;
  width: 100%;
  height: auto;
  touch-action: manipulation;
  background: transparent;
}
.map-tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -130%);
  background: rgba(32, 33, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s ease;
  z-index: 5;
}
.map-tooltip.is-visible { opacity: 1; }
.map-tooltip strong {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
}

/* Land dots — white, slightly softened over video */
.map-dot {
  fill: rgba(255, 255, 255, 0.78);
  pointer-events: none;
}
.map-ocean {
  fill: none;
}

/* Presence markers — R&J hex logo at 100% opacity */
.map-marker {
  opacity: 0;
  transition: opacity 0.45s ease;
}
.map-wrap.is-ready .map-marker {
  opacity: 1;
}
.map-marker.is-stagger {
  transition-delay: var(--stagger, 0ms);
}
.map-marker__logo {
  opacity: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.55));
}
.map-marker:focus-visible {
  outline: 1.5px solid rgba(255, 255, 255, 0.45);
  outline-offset: 4px;
}

/* —— Contact —— */
.contact-panel {
  max-width: 32rem;
}
.contact-panel--glass {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(104, 104, 112, 0.1);
  padding: 2.25rem 1.75rem;
  border-radius: 2px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 40px rgba(74, 74, 82, 0.06);
}
@media (min-width: 768px) {
  .contact-panel--glass {
    padding: 2.75rem 2.5rem;
  }
}
.contact-email {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--steel);
  margin: 1.5rem 0 2rem;
  word-break: break-all;
}
.contact-email:hover { color: var(--charcoal-deep); }

.contact-form {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(104, 104, 112, 0.12);
}
.contact-form label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--charcoal-deep);
  border: 1px solid rgba(104, 104, 112, 0.25);
  background: var(--white);
  padding: 0.75rem 0.9rem;
  border-radius: 2px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--steel);
  outline-offset: 1px;
  border-color: var(--steel);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.form-note {
  font-size: 0.85rem;
  color: var(--charcoal);
  opacity: 0.85;
  margin: 0;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid rgba(104, 104, 112, 0.12);
  padding: 2.5rem 0;
  margin-top: 0;
  background: var(--white);
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-brand img {
  height: 28px;
  width: auto;
  display: block;
  background: transparent;
  box-shadow: none;
}
.footer-brand span {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.footer-meta {
  font-size: 0.75rem;
  color: var(--charcoal);
  opacity: 0.8;
}
.footer-meta a { color: var(--charcoal); }
.footer-meta a:hover { color: var(--steel); }

/* —— Utilities —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.divider {
  height: 1px;
  background: rgba(104, 104, 112, 0.12);
  border: 0;
  margin: 0;
}

/* —— Scroll reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.45s ease var(--reveal-delay, 0ms),
    transform 0.45s ease var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .map-marker {
    opacity: 1;
    transition: none;
  }
  .bg-video__media {
    /* Keep poster-like stillness: pause via JS; hide continuous motion cue */
    animation: none;
  }
}
