/*
  Opalus Investments — stylesheet
  Sections: Tokens & reset / Header & nav (incl. mobile drawer) / Hero / Thesis /
  Pillars / Statement / Why / Offices / Footer / Buttons / Scroll-reveal / Media queries
*/

:root {
  --navy: #00061E;
  --line: rgba(201, 161, 107, 0.28);
  --hairline: rgba(244, 241, 234, 0.14);
  --gold: #C9A16B;
  --gold-bright: #DDBA88;
  --ink: #14192E;
  --paper: #F6F4EF;
  --cream: #F4F1EA;
  --mist: #B9C0D6;
  --serif: "Playfair Display", "Didot", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  background: var(--navy);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 48px; }
img { display: block; }

/* Focus visibility (keyboard users) */
a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

/* Header */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  background: var(--navy);
  border-bottom: 1px solid rgba(244, 241, 234, 0.18);
  box-shadow: 0 22px 44px -30px rgba(0, 0, 0, 0.75), 0 2px 10px -2px rgba(0, 0, 0, 0.35);
}
.bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 92px;
  transition: height .35s cubic-bezier(.4,0,.2,1);
}
.logo img {
  height: 48px;
  transition: height .35s cubic-bezier(.4,0,.2,1);
}
header.scrolled .bar { height: 68px; }
header.scrolled .logo img { height: 38px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  position: relative;
  color: var(--cream); text-decoration: none;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 400;
  padding-bottom: 6px;
  transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.16,.84,.44,1);
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--gold-bright); }
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }

/* Active section indicator (scroll-spy) — applies the same way to every
   link, Contact included, since it's now a plain nav item like the rest. */
.nav-links a.active { color: var(--gold-bright); }
.nav-links a.active::after { transform: scaleX(1); }

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  position: relative;
  width: 32px; height: 24px;
  flex-direction: column; justify-content: space-between;
  background: none; border: none; padding: 0; cursor: pointer;
  z-index: 31;
}
.nav-toggle-bar {
  display: block; width: 100%; height: 1px;
  background: var(--cream);
  transition: transform .3s ease, opacity .3s ease;
}
header.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(11px) rotate(45deg); }
header.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
header.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(0, 6, 30, 0.92) 0%, rgba(0, 6, 30, 0.78) 44%, rgba(0, 6, 30, 0.84) 72%, #00061E 100%),
    url('../images/opalus-hero.jpg');
  background-size: cover;
  background-position: center 50%;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 150px; padding-bottom: 130px; }
.kicker {
  font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
  display: block;
}
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.12; letter-spacing: 0.005em;
  margin: 34px 0 30px;
  text-shadow: 0 2px 30px rgba(0, 6, 30, 0.55);
}
.hero h1 em { font-style: italic; color: var(--gold-bright); }
.hero p.lede { max-width: 60ch; font-size: 17px; letter-spacing: 0.012em; color: #C6CCDC; text-shadow: 0 1px 18px rgba(0, 6, 30, 0.65); }
.actions { margin-top: 48px; display: flex; gap: 22px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center;
  text-decoration: none;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500;
  padding: 17px 36px;
  transition: background .3s ease, color .3s ease, border-color .3s ease,
              transform .3s cubic-bezier(.16,.84,.44,1), box-shadow .3s ease;
}
.btn-gold { background: var(--gold); color: #0A0F24; border: 1px solid var(--gold); }
.btn-gold:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn-ghost { border: 1px solid rgba(244, 241, 234, 0.35); color: var(--cream); background: rgba(0, 6, 30, 0.45); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn:hover { transform: translateY(-2px); }
.btn-gold:hover { box-shadow: 0 14px 26px -10px rgba(201, 161, 107, 0.5); }
.btn-ghost:hover { box-shadow: 0 14px 26px -12px rgba(0, 6, 30, 0.55); }
.btn-arrow {
  display: inline-block;
  max-width: 0; margin-left: 0;
  overflow: hidden; opacity: 0;
  transition: max-width .35s cubic-bezier(.16,.84,.44,1), margin-left .35s cubic-bezier(.16,.84,.44,1), opacity .3s ease;
}
.btn:hover .btn-arrow,
.btn:focus-visible .btn-arrow { max-width: 20px; margin-left: 10px; opacity: 1; }

/* Thesis */
.thesis { background: var(--paper); color: var(--ink); padding: 130px 0 120px; }
.thesis .kicker { color: #A57F49; }
/* Heading and copy sit in separate grid rows (col 1 only) so the figure —
   placed in row 2 alongside the copy — lines its top up with wherever the
   paragraph actually starts, however many lines the heading wraps to at a
   given width. Auto row sizing means this holds at every viewport, not
   just the widths it happened to be checked at. */
.thesis-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  column-gap: 76px;
  align-items: start;
  margin-top: 30px;
}
.thesis-grid > h2 { grid-column: 1; grid-row: 1; }
.thesis-grid > .copy { grid-column: 1; grid-row: 2; }
.thesis-grid > .thesis-figure { grid-column: 2; grid-row: 2; align-self: start; }
.thesis h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 4vw, 52px); line-height: 1.16;
  margin-bottom: 40px;
}
.thesis h2 em { font-style: italic; color: #A57F49; }
.thesis .copy p { max-width: 58ch; font-size: 16.5px; letter-spacing: 0.01em; color: #3C4257; }
.thesis .copy p + p { margin-top: 22px; }

/* Image sits beside the copy, like a photo attached to the text. Shown at
   its native 3:1 ratio with no cropping — object-fit: contain guarantees
   the whole photo stays in frame even if the box and image ratio ever
   drift out of sync. A solid gold panel sits offset behind it (same
   position the outline frame used) as a filled backing card instead of a
   hollow border. */
.thesis-figure { position: relative; margin: 0; }
.thesis-figure::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 24px;
    right: -14px;
    bottom: -14px;
    
    z-index: -1;
    border: 1px solid var(--gold);
}
.thesis-figure img {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
  aspect-ratio: 3 / 1;
}
.conviction {
  margin-top: 70px; padding-top: 34px; border-top: 1px solid rgba(20, 25, 46, 0.14);
  font-family: var(--serif); font-style: italic; font-size: 21px; color: #14192E;
}

/* Pillars */
.pillars { padding: 130px 0 140px; background: var(--navy); }
.pillars .wrap > .kicker { margin-bottom: 70px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; }
.pillar { border-top: 1px solid var(--line); padding-top: 30px; }
.pillar-mark { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.pillar-mark .badge {
  width: 42px; height: 42px; flex: 0 0 42px;
  border: 1px solid var(--gold); color: var(--gold);
  font-family: var(--serif); font-size: 15px; letter-spacing: 0.06em;
  display: flex; align-items: center; justify-content: center;
}
.pillar-mark .disc {
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
}
.pillar-art { position: relative; margin-bottom: 26px; border: 1px solid var(--hairline); overflow: hidden; }
.pillar-art img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  filter: saturate(0.5) contrast(1.05) brightness(0.9);
}
.pillar-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 6, 30, 0.14), rgba(0, 6, 30, 0.36));
}
.pillar h3 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin-bottom: 18px; }
.pillar p { max-width: 40ch; font-size: 16px; letter-spacing: 0.01em; color: var(--mist); }

/* Why Opalus */
.why { background: var(--paper); color: var(--ink); padding: 125px 0 115px; }
.why .kicker { color: #A57F49; }
.why h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 3.6vw, 46px); line-height: 1.18;
  margin: 30px 0 66px; max-width: 22ch;
}
.why h2 em { font-style: italic; color: #A57F49; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 52px 74px; }
.why-item { border-top: 1px solid rgba(20, 25, 46, 0.16); padding-top: 26px; }
.why-item h3 { font-family: var(--serif); font-weight: 500; font-size: 23px; margin-bottom: 14px; }
.why-item p { max-width: 42ch; font-size: 16.5px; letter-spacing: 0.01em; color: #3C4257; }

/* Statement */
.statement {
  position: relative; text-align: center; padding: 170px 0;
  background-image:
    linear-gradient(180deg, rgba(0, 6, 30, 0.78) 0%, rgba(0, 6, 30, 0.60) 50%, rgba(0, 6, 30, 0.82) 100%),
    url('../images/opalus-call-to-action.jpg');
  background-size: cover;
  background-position: center 42%;
}
.statement p {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 3.2vw, 40px); line-height: 1.35; margin: 0 auto;
  text-shadow: 0 2px 26px rgba(0, 6, 30, 0.6);
}
.statement p em { font-style: italic; color: var(--gold-bright); }

/* Offices */
.offices { padding: 130px 0 120px; background: var(--navy); }
.offices .wrap > .kicker { margin-bottom: 44px; }

/* Enquiry form */
.enquire { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 70px; margin-bottom: 84px; align-items: start; }
.enquire h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; margin-bottom: 22px; }
.enquire .note { color: var(--mist); font-size: 16px; max-width: 40ch; }
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
form .field { display: flex; flex-direction: column; margin-bottom: 24px; }
form label { font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin-bottom: 9px; }
form input, form select, form textarea {
  font-family: var(--sans); font-size: 15px; color: var(--cream);
  background: transparent; border: 0; border-bottom: 1px solid rgba(244, 241, 234, 0.28);
  padding: 9px 0; transition: border-color .25s;
}
form textarea { resize: vertical; min-height: 92px; }
form input:focus, form select:focus, form textarea:focus { outline: none; border-bottom-color: var(--gold); }
form select option { background: var(--navy); color: var(--cream); }
form .btn { margin-top: 10px; border: 1px solid var(--gold); cursor: pointer; font-family: var(--sans); }
form .privacy { margin-top: 18px; font-size: 12.5px; color: #6C7288; }

.grid2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.office { border: 1px solid var(--hairline); padding: 32px 20px 30px; }
.office h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; margin-bottom: 20px; }
.office dl { display: block; font-size: 14.5px; line-height: 1.7; letter-spacing: 0.01em; color: var(--mist); }
.office dt { font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin-top: 18px; }
.office dt:first-child { margin-top: 0; }
/* Reserve room for the tallest realistic address (~3 lines) so Phone
   starts at the same height in every card, regardless of how long that
   card's own address happens to be. */
.office dd:first-of-type { min-height: 5.1em; }
.office dd { margin-top: 5px; font-weight: 500; overflow-wrap: break-word; }

.office dd.tbc { color: #6C7288; font-style: italic; }

/* Footer */
footer { border-top: 1px solid var(--hairline); padding: 34px 0; }
.foot { display: flex; justify-content: center; align-items: center; font-size: 12px; letter-spacing: 0.08em; color: #6C7288; }

/* ---------------------------------------------------------------- */
/* Scroll reveal                                                    */
/* Progressive enhancement: only active once the "js" class (set    */
/* synchronously in <head>) is present, so content stays visible    */
/* with JS disabled or before the script runs.                      */
/* ---------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,.84,.44,1), transform .8s cubic-bezier(.16,.84,.44,1);
  will-change: opacity, transform;
}
.js [data-reveal="scale"] { transform: scale(1.05); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

.js .hero .kicker { transition-delay: .05s; }
.js .hero h1 { transition-delay: .15s; }
.js .hero p.lede { transition-delay: .25s; }
.js .hero .actions { transition-delay: .35s; }

.js .thesis-grid > h2 { transition-delay: 0s; }
.js .thesis-grid > .copy { transition-delay: .08s; }
.js .thesis-grid > .thesis-figure { transition-delay: .15s; }

.js .pillar:nth-child(1) { transition-delay: .05s; }
.js .pillar:nth-child(2) { transition-delay: .15s; }
.js .pillar:nth-child(3) { transition-delay: .25s; }

.js .why-item:nth-child(1) { transition-delay: .05s; }
.js .why-item:nth-child(2) { transition-delay: .12s; }
.js .why-item:nth-child(3) { transition-delay: .05s; }
.js .why-item:nth-child(4) { transition-delay: .12s; }

.js .enquire form { transition-delay: .1s; }

.js .office:nth-child(1) { transition-delay: .05s; }
.js .office:nth-child(2) { transition-delay: .12s; }
.js .office:nth-child(3) { transition-delay: .19s; }
.js .office:nth-child(4) { transition-delay: .26s; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .btn-arrow, .nav-links a::after { transition: none; }
}

/* ---------------------------------------------------------------- */
/* Responsive                                                        */
/* ---------------------------------------------------------------- */
@media (max-width: 1080px) {
  .grid3 { gap: 36px; }
}
/* .wrap tops out at 1180px, so the 4-column office row only ever gets its
   full column width right up to that point — drop to 2 columns just below
   it instead of at 1080px, so the row is never squeezed narrower than what
   the email-width fix above assumes. */
@media (max-width: 1179px) {
  .grid2 { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 620px) {
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .grid3 { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 900px) {
  html { scroll-padding-top: 76px; }
  .wrap { padding: 0 26px; }
  .bar { height: 76px; }
  header.scrolled .bar { height: 60px; }
  header.scrolled .logo img { height: 34px; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: fixed;
    top: 76px; left: 0; right: 0; bottom: 0;
    background: var(--navy);
    padding: 12px 26px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.65,0,.35,1), top .35s cubic-bezier(.4,0,.2,1);
    border-top: 1px solid rgba(244, 241, 234, 0.14);
  }
  header.scrolled .nav-links { top: 60px; }
  header.nav-open .nav-links { transform: translateX(0); }
  .nav-links a {
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid rgba(244, 241, 234, 0.12);
    font-size: 13px;
  }
  .nav-links a::after { display: none; }

  .thesis-grid, .why-grid, .enquire { grid-template-columns: 1fr; gap: 40px; }
  .thesis-grid > h2,
  .thesis-grid > .copy,
  .thesis-grid > .thesis-figure { grid-column: 1; grid-row: auto; }
  .thesis-figure::before { top: 14px; left: 14px; right: -14px; bottom: -14px; }
  form .row { grid-template-columns: 1fr; gap: 0; }
  .grid3 { gap: 30px; }
  .pillar h3 { font-size: 25px; }
  .office { padding: 30px 26px 32px; }
}
