/* Onyx Advisory — institutional site */

:root {
  --bg: #0e1013;
  --bg-soft: #15181d;
  --ink: #eceae6;
  --ink-soft: #c5c1b8;
  --muted: #8f8b84;
  --line: #2a2e34;
  --line-strong: #3d434b;
  --header-bg: rgba(14, 16, 19, 0.96);
  --focus: #eceae6;
  --surface: #1a1e24;
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3.25rem, 6vw, 4.75rem);
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --header-h: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  opacity: 0.7;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--pad);
  top: -100%;
  z-index: 1000;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: min(100% - (var(--pad) * 2), var(--max));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1.5rem;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
}

.brand:hover {
  opacity: 1;
  color: var(--ink);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.8vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 400;
}

.site-nav a:hover {
  color: var(--ink);
  opacity: 1;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bars {
  display: block;
  width: 1.05rem;
  height: 1px;
  background: var(--ink);
  box-shadow: 0 -5px 0 var(--ink), 0 5px 0 var(--ink);
}

/* Hero */

.hero {
  position: relative;
  min-height: min(48vh, 26rem);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: #0b0d10;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 13, 16, 0.22) 0%,
    rgba(11, 13, 16, 0.42) 45%,
    rgba(11, 13, 16, 0.78) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - (var(--pad) * 2), var(--max));
  margin: 0 auto;
  padding: clamp(4.5rem, 8vw, 6rem) 0 clamp(2.25rem, 4vw, 3rem);
}

.hero-brand {
  margin: 0;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-title {
  margin: 1.1rem 0 0;
  max-width: min(48rem, 100%);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.84);
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid #eceae6;
  background: #eceae6;
  color: #0b0d10;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: transparent;
  color: #eceae6;
  opacity: 1;
}

/* Sections */

.section {
  padding: var(--section-y) 0;
  background: var(--bg);
}

.section-soft {
  background: var(--bg-soft);
}

.section-header {
  max-width: min(48rem, 100%);
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

.section-header h2,
.page-hero h1,
.legal-content h2 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
}

.section-intro {
  margin: 1rem 0 0;
  color: var(--muted);
  max-width: min(46rem, 100%);
  text-wrap: pretty;
}

/* Expertise */

.expertise-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.expertise-list--pillars {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.expertise-item {
  padding: 1.75rem 1.75rem 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.expertise-item:nth-child(even) {
  padding-left: 1.75rem;
  border-left: 1px solid var(--line);
}

.expertise-list--pillars .expertise-item {
  padding: 1.75rem 1.5rem 1.75rem 0;
  border-left: 0;
}

.expertise-list--pillars .expertise-item + .expertise-item {
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
}

.expertise-item h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.expertise-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: none;
  text-wrap: pretty;
}

.expertise-note {
  margin-top: 0.85rem !important;
  font-size: 0.82rem !important;
  line-height: 1.45;
  font-style: italic;
  color: var(--muted);
  opacity: 0.78;
  letter-spacing: 0.01em;
  max-width: 36rem;
}

/* Why us */

.why-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}

.why-item h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.why-item p {
  margin: 0;
  color: var(--muted);
  max-width: none;
  text-wrap: pretty;
}

/* About */

.about-block {
  max-width: 46rem;
}

.about-copy p {
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
  max-width: min(44rem, 100%);
  text-wrap: pretty;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.entity-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  max-width: min(44rem, 100%);
}

.entity-facts > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.entity-facts > div:nth-child(even) {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.entity-facts-wide {
  grid-column: 1 / -1;
  padding-left: 0;
  border-left: 0;
}

.entity-facts dt {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.entity-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  overflow-wrap: break-word;
}

.director {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  column-gap: clamp(1.5rem, 3.5vw, 2.5rem);
  row-gap: 1.5rem;
  align-items: start;
  max-width: 52rem;
}

.director-photo {
  margin: 0;
  background: var(--surface);
  aspect-ratio: 1;
  overflow: hidden;
  width: 100%;
}

.director-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.director-body {
  min-width: 0;
  padding-top: 0.15rem;
}

.director-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.director h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.director-role {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  text-decoration: none;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.linkedin-link:hover {
  opacity: 1;
  color: var(--ink);
  border-color: var(--ink);
}

.linkedin-link svg {
  width: 0.95rem;
  height: 0.95rem;
}

.director-bio {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
  text-wrap: pretty;
  max-width: 36rem;
}

.director-meta {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.director-meta li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.director-meta span:first-child {
  color: var(--muted);
}

.director-meta span:last-child {
  color: var(--ink-soft);
}

/* Contact form */

.section-contact {
  padding: clamp(3rem, 5.5vw, 4.25rem) 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-intro {
  max-width: none;
}

.contact-intro h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.contact-intro p {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: min(36rem, 100%);
  text-wrap: pretty;
}

.contact-details {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.contact-detail-link {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.contact-detail-link:hover {
  opacity: 0.7;
}

.contact-form {
  position: relative;
  display: grid;
  gap: 0.85rem;
  padding: 1.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.form-row {
  display: grid;
  gap: 0.3rem;
}

.form-row label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--ink);
}

.form-row textarea {
  resize: vertical;
  min-height: 6.5rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin-top: 0.15rem;
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  min-height: 2.55rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
}

.btn-dark:hover {
  background: transparent;
  color: var(--ink);
  opacity: 1;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-note.is-error {
  color: #d48a8a;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  background: var(--bg);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.footer-company {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.88rem;
  max-width: min(48rem, 100%);
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.footer-disclaimer {
  margin: 0.85rem 0 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* Legal */

.page-hero {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
}

.page-hero p {
  margin: 1rem 0 0;
  color: var(--muted);
  max-width: 36rem;
}

.legal-content {
  padding: clamp(2.5rem, 6vw, 4rem) 0 var(--section-y);
  max-width: 42rem;
}

.legal-content h2 {
  margin: 2.5rem 0 0.85rem;
  font-size: 1.25rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: var(--ink-soft);
}

.legal-content ul {
  padding-left: 1.2rem;
}

.legal-content li + li {
  margin-top: 0.45rem;
}

/* Reveal — only hide when JS is active, so cached/old JS cannot blank the page */

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(0.55rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive */

@media (max-width: 900px) {
  .expertise-list,
  .expertise-list--pillars,
  .why-list,
  .contact-layout,
  .entity-facts {
    grid-template-columns: 1fr;
  }

  .expertise-item,
  .expertise-item:nth-child(even),
  .expertise-list--pillars .expertise-item,
  .expertise-list--pillars .expertise-item + .expertise-item {
    padding: 1.35rem 0;
    border-left: 0;
  }

  .why-item + .why-item {
    padding-top: 1.35rem;
    border-top: 1px solid var(--line);
  }

  .why-item p {
    max-width: none;
  }

  .entity-facts > div:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .director {
    grid-template-columns: 10rem minmax(0, 1fr);
    column-gap: 1.35rem;
    row-gap: 1.35rem;
  }

  .contact-intro {
    max-width: none;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 3.75rem;
    --pad: 1.15rem;
    --section-y: 2.75rem;
  }

  body {
    font-size: 1rem;
    line-height: 1.6;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--bg);
    padding: 0.5rem var(--pad) 2rem;
    transform: translateY(-0.4rem);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border-top: 1px solid var(--line);
    overflow-y: auto;
  }

  .site-nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
    width: 100%;
    font-size: 1.05rem;
  }

  .hero {
    min-height: min(42vh, 22rem);
  }

  .hero-content {
    padding: 4rem 0 2.15rem;
  }

  .hero-brand {
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.2;
    white-space: normal;
  }

  .hero-title {
    margin-top: 0.85rem;
    font-size: 1.02rem;
    line-height: 1.5;
    max-width: none;
  }

  .hero-actions {
    margin-top: 1.4rem;
  }

  .section-header {
    margin-bottom: 1.35rem;
  }

  .section-header h2,
  .contact-intro h2 {
    font-size: 1.7rem;
  }

  .section-intro {
    margin-top: 0.75rem;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .expertise-item h3,
  .why-item h3 {
    font-size: 1.02rem;
  }

  .expertise-item p,
  .why-item p,
  .about-copy p,
  .director-bio {
    font-size: 0.97rem;
    line-height: 1.55;
  }

  .about-copy p {
    margin-bottom: 1rem;
  }

  .entity-facts {
    margin-top: 1.5rem;
    max-width: none;
  }

  .entity-facts > div {
    padding: 0.85rem 0;
  }

  .entity-facts dd {
    font-size: 0.97rem;
    line-height: 1.45;
    overflow-wrap: break-word;
  }

  .director {
    grid-template-columns: 1fr;
    row-gap: 1.25rem;
  }

  .director-photo {
    width: 9.5rem;
  }

  .director h3 {
    font-size: 1.2rem;
  }

  .director-meta li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 0.7rem 0;
    font-size: 0.95rem;
  }

  .section-contact {
    padding: 2.5rem 0;
  }

  .contact-intro p {
    margin-top: 0.7rem;
  }

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

  .contact-form {
    padding: 1rem;
    gap: 0.75rem;
  }

  .site-footer {
    padding: 1.5rem 0 2rem;
  }

  .footer-copy,
  .footer-company {
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .footer-disclaimer {
    margin-top: 0.75rem;
    font-size: 0.78rem;
    line-height: 1.5;
  }
}

@media (max-width: 420px) {
  .director-photo {
    width: 8.25rem;
  }

  .contact-detail-link {
    white-space: normal;
    overflow-wrap: break-word;
  }
}
