/* CQR Group Ltd — static site styles
   Palette: deep navy, warm gold, ivory. Fonts: Cormorant Garamond + Outfit */
:root {
  --navy: #0b1f33;
  --navy-2: #10283f;
  --navy-3: #18385a;
  --gold: #c4a35a;
  --gold-2: #dcc07e;
  --ivory: #f6f1e8;
  --paper: #fbf9f5;
  --ink: #16212c;
  --muted: #5d6772;
  --line: rgba(11, 31, 51, 0.1);
  --line-light: rgba(255, 255, 255, 0.12);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 31, 51, 0.04), 0 12px 32px -12px rgba(11, 31, 51, 0.18);
  --header-h: 4.75rem;
  --max: 74rem;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.15; }
h2 { font-family: var(--serif); font-size: clamp(2.1rem, 4vw, 3.1rem); letter-spacing: -0.01em; color: var(--navy); }
h3 { font-size: 1.15rem; font-weight: 600; color: var(--navy); }
p { margin: 0 0 1rem; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 3rem, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--gold); color: var(--navy); padding: 0.6rem 1rem; font-weight: 600; border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  font: 500 0.95rem/1 var(--sans); letter-spacing: 0.02em; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--gold); color: var(--navy); }
.btn-solid:hover { background: var(--gold-2); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  transition: background 0.3s, box-shadow 0.3s, height 0.3s;
}
.site-header.is-scrolled {
  background: rgba(11, 31, 51, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 var(--line-light);
}
.header-inner {
  width: min(100% - 3rem, var(--max)); margin-inline: auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: #fff; }
.brand-mark { border-radius: 6px; }
.brand-logo { display: block; height: 46px; width: auto; }
.site-footer .brand-logo { height: 40px; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1; letter-spacing: 0.01em; }
.brand-name small {
  display: block; margin-top: 0.3rem; font-family: var(--sans); font-size: 0.62rem;
  font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2rem; }
.site-nav a {
  position: relative; color: rgba(255, 255, 255, 0.82); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.03em;
  transition: color 0.2s;
}
.site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transition: transform 0.25s;
}
.site-nav a:hover, .site-nav a.is-active { color: #fff; }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }
.nav-cta { padding: 0.55rem 1.15rem; border: 1px solid var(--gold); border-radius: 999px; color: var(--gold-2) !important; }
.nav-cta:hover { background: var(--gold); color: var(--navy) !important; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 11px; width: 22px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform 0.25s, background 0.25s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 5rem; color: #fff; background: var(--navy); overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 85% 10%, rgba(196, 163, 90, 0.16), transparent 60%),
    radial-gradient(50rem 40rem at 0% 100%, rgba(24, 56, 90, 0.9), transparent 70%),
    linear-gradient(160deg, var(--navy-2), var(--navy) 60%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: 4rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 2.25rem; height: 1px; background: var(--gold); }
.hero h1 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(2.8rem, 6.2vw, 5.25rem);
  line-height: 1.02; letter-spacing: -0.015em; margin-bottom: 1.6rem;
}
.hero h1 em { font-style: italic; color: var(--gold-2); }
.hero-lead { max-width: 36rem; font-size: clamp(1.05rem, 1.4vw, 1.2rem); font-weight: 300; color: rgba(255,255,255,0.8); margin-bottom: 2.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-panel {
  position: relative; padding: 2.25rem; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  border: 1px solid var(--line-light);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
}
.hero-panel::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, rgba(196,163,90,0.6), transparent 40%) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; border: 1px solid transparent;
}
.hero-panel-mark { display: block; width: 64px; height: 64px; margin: -0.25rem 0 1.5rem -0.35rem; }
.hero-facts { margin: 0; display: grid; gap: 0; }
.hero-facts div { padding: 0.95rem 0; border-top: 1px solid var(--line-light); }
.hero-facts dt { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 0.2rem; }
.hero-facts dd { margin: 0; font-family: var(--serif); font-size: 1.45rem; line-height: 1.25; color: #fff; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 1.75rem; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(255,255,255,0.35); border-radius: 999px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  background: var(--gold); border-radius: 2px; animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Values strip ---------- */
.values { background: var(--navy-2); color: #fff; border-top: 1px solid var(--line-light); }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.value { padding: 2.75rem 2rem; border-left: 1px solid var(--line-light); }
.value:first-child { border-left: 0; padding-left: 0; }
.value svg { width: 28px; height: 28px; margin-bottom: 1.1rem; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.value h3 { color: #fff; font-size: 1.05rem; margin-bottom: 0.45rem; }
.value p { margin: 0; font-size: 0.93rem; color: rgba(255,255,255,0.65); line-height: 1.6; }

/* ---------- Sections ---------- */
.section { padding: clamp(5rem, 10vw, 8rem) 0; }
.kicker {
  display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: #9a7b34;
}
.kicker::before { content: ""; width: 1.75rem; height: 1px; background: currentColor; }
.section-head.center { text-align: center; max-width: 40rem; margin: 0 auto 3.5rem; }
.section-head.center .kicker::after { content: ""; width: 1.75rem; height: 1px; background: currentColor; }
.section-sub { margin: 1rem 0 0; color: var(--muted); font-size: 1.1rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 5rem; align-items: start; }
.about .section-head h2 { max-width: 14ch; }
.lede { font-family: var(--serif); font-size: clamp(1.45rem, 2.2vw, 1.8rem); line-height: 1.4; color: var(--navy); margin-bottom: 1.5rem; }
.about-copy > p:not(.lede) { color: var(--muted); }
.name-note {
  margin: 2.25rem 0 0; display: flex; align-items: center; gap: 1.5rem;
  padding: 1.5rem 1.75rem; background: var(--ivory); border-radius: var(--radius); border-left: 3px solid var(--gold);
}
.name-note-mark { font-family: var(--serif); font-size: 2.4rem; font-weight: 600; letter-spacing: 0.06em; color: var(--gold); line-height: 1; }
.name-note figcaption { color: var(--ink); line-height: 1.55; }
.name-note em { font-family: var(--serif); font-size: 1.2em; color: var(--navy); }

/* Businesses */
.businesses { background: var(--ivory); }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.card {
  display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(11,31,51,0.05), 0 24px 48px -16px rgba(11,31,51,0.25); }
.card-logo {
  height: 200px; display: grid; place-items: center; padding: 2rem;
  background: linear-gradient(180deg, #fff, #f7f8f6); border-bottom: 1px solid var(--line);
}
.card-logo img { height: 110px; width: auto; max-width: 100%; object-fit: contain; }
.card-logo img.wide { height: auto; width: min(320px, 100%); }
.card-body { padding: 2rem 2.25rem 2.25rem; display: flex; flex-direction: column; flex: 1; }
.card-tag {
  align-self: flex-start; margin-bottom: 0.9rem; padding: 0.3rem 0.75rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: #1f7a3c; background: rgba(31, 155, 72, 0.1);
}
.card h3 { font-family: var(--serif); font-size: 2rem; font-weight: 600; margin-bottom: 0.6rem; }
.card-body > p:not(.card-tag):not(.card-foot) { color: var(--muted); }
.card-foot {
  margin: auto 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; color: var(--navy); font-weight: 500;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

/* Investments / structure */
.structure { max-width: 56rem; margin: 0 auto; }
.structure-top {
  position: relative; width: fit-content; margin: 0 auto; display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.75rem 1rem 1rem; background: var(--navy); color: #fff; border-radius: 14px; box-shadow: var(--shadow);
}
.structure-top img { border-radius: 8px; }
.structure-top strong { display: block; font-family: var(--serif); font-size: 1.4rem; font-weight: 600; line-height: 1.1; }
.structure-top span { font-size: 0.8rem; letter-spacing: 0.08em; color: var(--gold-2); }
.structure-branches { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 4rem; }
.structure-branches::before {
  content: ""; position: absolute; top: -4rem; left: 50%; width: 1px; height: 2rem; background: var(--gold);
}
.structure-branches::after {
  content: ""; position: absolute; top: -2rem; left: 25%; right: 25%; height: 2rem;
  border: 1px solid var(--gold); border-bottom: 0; border-radius: 10px 10px 0 0;
}
.branch { padding: 2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.branch-role { margin-bottom: 0.6rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #9a7b34; }
.branch h3 { font-family: var(--serif); font-size: 1.6rem; margin-bottom: 0.6rem; }
.branch p:last-child { margin: 0; color: var(--muted); }

/* History / timeline */
.history { background: var(--ivory); }
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 44rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6.5rem; top: 0.5rem; bottom: 0.5rem; width: 1px; background: linear-gradient(var(--gold), rgba(196,163,90,0.2)); }
.timeline li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 2.5rem; position: relative; padding-bottom: 3rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(6.5rem - 6px); top: 0.7rem; width: 13px; height: 13px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--gold);
}
.tl-year { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; color: var(--navy); line-height: 1.1; text-align: right; padding-right: 1.75rem; }
.tl-body { padding: 1.5rem 1.75rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tl-body h3 { margin-bottom: 0.4rem; }
.tl-body p { margin: 0; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 5rem; align-items: start; }
.contact-info > p { color: var(--muted); margin: 1.25rem 0 2rem; max-width: 30rem; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 1.1rem 0; border-top: 1px solid var(--line); display: grid; gap: 0.15rem; }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.contact-value { font-family: var(--serif); font-size: 1.5rem; color: var(--navy); }
a.contact-value:hover { color: #9a7b34; }
.contact-form { padding: 2.5rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; margin-bottom: 0.4rem; font-size: 0.85rem; font-weight: 500; color: var(--navy); }
.field input, .field textarea {
  width: 100%; padding: 0.85rem 1rem; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid rgba(11,31,51,0.16); border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(196,163,90,0.18); }
.contact-form .btn { width: 100%; margin-top: 0.4rem; }
.form-note { margin: 1rem 0 0; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 3rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.75rem; font-size: 0.9rem; }
.site-footer nav a:hover, .footer-meta a:hover { color: var(--gold-2); }
.footer-meta { flex-basis: 100%; margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--line-light); font-size: 0.85rem; color: rgba(255,255,255,0.55); }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .hero-copy > *, .js .hero-panel { animation: rise 0.9s ease both; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.js .hero-panel { animation-delay: 0.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-panel { max-width: 34rem; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .value { padding: 2.25rem 1.75rem; }
  .value:nth-child(odd) { border-left: 0; padding-left: 0; }
  .value:nth-child(n+3) { border-top: 1px solid var(--line-light); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about .section-head h2 { max-width: none; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; z-index: 2; }
  .site-nav {
    position: fixed; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
    background: rgba(11, 31, 51, 0.98); opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 1.75rem; text-align: center; }
  .site-nav a { font-family: var(--serif); font-size: 2rem; color: #fff; }
  .nav-cta { font-family: var(--sans) !important; font-size: 1rem !important; padding: 0.8rem 1.75rem; }
  .brand { position: relative; z-index: 2; }
  /* no backdrop-filter here: it would trap the fixed full-screen menu inside the header */
  .site-header, .site-header.is-scrolled { background: rgba(11, 31, 51, 0.97); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 4.25rem; }
  .wrap, .header-inner { width: min(100% - 2.5rem, var(--max)); }
  .hero { min-height: auto; padding: calc(var(--header-h) + 3.5rem) 0 4.5rem; }
  .hero-panel { padding: 1.75rem; }
  .hero-panel-mark { display: none; }
  .brand-logo { height: 38px; }
  .hero-facts div:first-child { border-top: 0; padding-top: 0; }
  .hero-facts dd { font-size: 1.25rem; }
  .scroll-cue { display: none; }
  .btn { flex: 1 1 auto; }
  .values-grid { grid-template-columns: 1fr; }
  .value, .value:nth-child(odd) { padding: 1.75rem 0; border-left: 0; }
  .value + .value { border-top: 1px solid var(--line-light); }
  .cards, .structure-branches, .field-row { grid-template-columns: 1fr; }
  .card-logo { height: 170px; }
  .card-body { padding: 1.75rem; }
  .structure-branches { margin-top: 2.5rem; gap: 1.25rem; }
  .structure-branches::after { display: none; }
  .structure-branches::before { top: -2.5rem; height: 2.5rem; }
  .timeline::before { left: 0.4rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0.75rem; padding-left: 2rem; }
  .timeline li::before { left: calc(0.4rem - 6px); top: 0.6rem; }
  .tl-year { text-align: left; padding: 0; font-size: 1.8rem; }
  .name-note { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .contact-form { padding: 1.75rem; }
  .contact-value { font-size: 1.3rem; word-break: break-word; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Refinements */
h1, h2, h3, .lede, .hero-facts dd, .tl-year, .contact-value, .card h3, .branch h3 { font-variant-numeric: lining-nums; }
.card-logo { background: #fff; }
.timeline::before { bottom: auto; height: calc(100% - 4rem); }
.contact-info > p.kicker { color: #9a7b34; margin: 0 0 1rem; }
