/* ============================================================
   Caedryn Limited — caedryn.com
   Design language: institutional minimalism (ref. Moelis & Co.)
   Ivory/white ground · ink navy text · bronze accent · serif display
   ============================================================ */

:root {
  --ink: #101820;
  --navy: #0a2239;
  --navy-deep: #071a2c;
  --ivory: #faf9f6;
  --paper: #ffffff;
  --stone: #f2f0ea;
  --line: #e3e0d8;
  --line-dark: rgba(255, 255, 255, 0.14);
  --grey: #5c6670;
  --grey-light: #8b949c;
  --bronze: #96793f;
  --bronze-soft: #b39a63;
  --serif: "Source Serif 4", "Songti SC", Georgia, serif;
  --sans: "Inter", "PingFang SC", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --max: 1200px;
  --pad: clamp(20px, 5vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--navy); color: #fff; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Typography ---------- */

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 22px;
}

.lede {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.6;
  color: var(--grey);
  font-weight: 400;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.site-header.solid,
.site-header.on-light {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  line-height: 1;
  white-space: nowrap;
}

.main-nav a { white-space: nowrap; }

.brand .wordmark {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.30em;
  color: #fff;
  transition: color 0.35s ease;
}

.brand .cn {
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--bronze-soft);
  transform: translateY(-1px);
}

.site-header.solid .wordmark,
.site-header.on-light .wordmark { color: var(--navy); }

.main-nav { display: flex; align-items: center; gap: 40px; }

.main-nav a {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}

.site-header.solid .main-nav a,
.site-header.on-light .main-nav a { color: var(--grey); }

.main-nav a:hover,
.main-nav a.active { color: var(--bronze); border-bottom-color: var(--bronze); }

.site-header.solid .main-nav a:hover,
.site-header.on-light .main-nav a:hover,
.site-header.solid .main-nav a.active,
.site-header.on-light .main-nav a.active { color: var(--navy); border-bottom-color: var(--bronze); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 40px; height: 40px;
  position: relative;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: currentColor;
  margin: 5px auto;
  color: #fff;
  transition: transform 0.3s, opacity 0.3s;
}

.site-header.solid .nav-toggle span,
.site-header.on-light .nav-toggle span { background: var(--navy); }

/* ---------- Hero (dark) ---------- */

.hero {
  position: relative;
  background: var(--navy-deep);
  color: #fff;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 140px;
  padding-bottom: 120px;
}

.hero h1 {
  font-size: clamp(38px, 5.6vw, 68px);
  max-width: 15em;
  color: #fff;
}

.hero .lede {
  margin-top: 28px;
  max-width: 36em;
  color: rgba(255, 255, 255, 0.72);
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}

/* subpage hero — shorter */
.hero.compact .hero-inner {
  min-height: 0;
  padding-top: 180px;
  padding-bottom: 90px;
}

.hero.compact h1 { font-size: clamp(34px, 4.4vw, 54px); }

/* ---------- Marker strip ---------- */

.markers {
  border-top: 1px solid var(--line-dark);
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.02);
}

.markers .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.marker {
  padding: 30px 28px 30px 0;
  border-left: 1px solid var(--line-dark);
  padding-left: 28px;
}

.marker:first-child { border-left: 0; padding-left: 0; }

.marker b {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.02em;
}

.marker span {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 9vw, 130px) 0; }
.section.tint { background: var(--ivory); }
.section.dark { background: var(--navy); color: #fff; }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 70px); }

.section-head h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  color: var(--navy);
}

.section.dark .section-head h2 { color: #fff; }

.section-head .lede { margin-top: 18px; font-size: 17.5px; }
.section.dark .lede { color: rgba(255,255,255,0.65); }

/* ---------- Practice cards ---------- */

.practices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.practice {
  background: var(--paper);
  padding: 46px 38px 42px;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease;
}

.practice:hover { background: var(--ivory); }

.practice .num {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--bronze);
  letter-spacing: 0.1em;
  margin-bottom: 26px;
}

.practice h3 {
  font-size: 24px;
  color: var(--navy);
  margin-bottom: 16px;
}

.practice p { font-size: 15px; color: var(--grey); flex: 1; }

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}

.textlink::after {
  content: "";
  width: 26px; height: 1px;
  background: var(--bronze);
  transition: width 0.25s ease;
}

.textlink:hover::after { width: 44px; }

.section.dark .textlink { color: #fff; }

/* ---------- Two-column editorial ---------- */

.split {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

.split h2 { font-size: clamp(28px, 3.4vw, 42px); color: var(--navy); }
.section.dark .split h2 { color: #fff; }

.split .body p { margin-bottom: 1.2em; color: var(--grey); }
.split .body p:last-child { margin-bottom: 0; }
.section.dark .split .body p { color: rgba(255,255,255,0.7); }

.principles { list-style: none; margin-top: 8px; }

.principles li {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.principles li:last-child { border-bottom: 1px solid var(--line); }

.section.dark .principles li { border-color: var(--line-dark); }

.principles b {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 6px;
}

.section.dark .principles b { color: #fff; }

.principles span { font-size: 15px; color: var(--grey); }
.section.dark .principles span { color: rgba(255,255,255,0.6); }

/* ---------- Insights cards ---------- */

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

.insight-card {
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.insight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(10, 34, 57, 0.25);
}

.insight-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--navy) 0%, #123a5c 60%, #1d5078 100%);
  position: relative;
  overflow: hidden;
}

.insight-media .glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 52px;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.2em;
}

.insight-media iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.insight-body {
  padding: 26px 28px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.insight-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.insight-meta .type { color: var(--bronze); }
.insight-meta .date { color: var(--grey-light); font-weight: 500; }

.insight-body h3 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 12px;
  line-height: 1.3;
}

.insight-body p { font-size: 14.5px; color: var(--grey); flex: 1; }

.insight-body .textlink { margin-top: 22px; font-size: 12px; }

/* filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

.filter-bar button {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  background: none;
  border: 1px solid var(--line);
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.25s;
}

.filter-bar button:hover { border-color: var(--navy); color: var(--navy); }

.filter-bar button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--navy-deep);
  color: #fff;
  padding: clamp(70px, 8vw, 110px) 0;
  position: relative;
  overflow: hidden;
}

.cta-band .wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-band h2 {
  font-size: clamp(26px, 3.2vw, 40px);
  max-width: 18em;
  color: #fff;
}

.btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 18px 42px;
  border: 1px solid var(--bronze-soft);
  color: #fff;
  transition: background 0.3s, color 0.3s;
  white-space: nowrap;
}

.btn:hover { background: var(--bronze-soft); color: var(--navy-deep); }

.btn.dark { border-color: var(--navy); color: var(--navy); }
.btn.dark:hover { background: var(--navy); color: #fff; }

/* ---------- Footer ---------- */

.site-footer {
  background: #06121e;
  color: rgba(255, 255, 255, 0.6);
  padding: 70px 0 40px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid .brand .wordmark { color: #fff; font-size: 20px; }

.footer-grid h4 {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 18px;
}

.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: #fff; }

.footer-tag {
  margin-top: 18px;
  max-width: 26em;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
}

.footer-legal {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- Article / longform ---------- */

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(60px, 7vw, 100px) var(--pad);
}

.article .eyebrow { margin-bottom: 16px; }

.article h1 {
  font-size: clamp(30px, 4vw, 46px);
  color: var(--navy);
  margin-bottom: 20px;
}

.article .byline {
  font-size: 14px;
  color: var(--grey-light);
  padding-bottom: 34px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.article h2 {
  font-size: 26px;
  color: var(--navy);
  margin: 48px 0 18px;
}

.article h3 {
  font-size: 20px;
  color: var(--navy);
  margin: 36px 0 14px;
}

.article p { margin-bottom: 1.25em; color: #333a41; font-size: 16.5px; }

.article ul, .article ol { margin: 0 0 1.5em 1.4em; color: #333a41; font-size: 16.5px; }
.article li { margin-bottom: 0.6em; }

.article blockquote {
  border-left: 2px solid var(--bronze);
  padding: 6px 0 6px 28px;
  margin: 36px 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.5;
  color: var(--navy);
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 14.5px;
}

.article th, .article td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.article th {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  border-bottom: 2px solid var(--navy);
}

.article .disclaimer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--grey-light);
}

.article-actions {
  display: flex;
  gap: 16px;
  margin: 40px 0 8px;
  flex-wrap: wrap;
}

/* ---------- Service detail sections ---------- */

.service-block {
  padding: clamp(60px, 7vw, 100px) 0;
  border-top: 1px solid var(--line);
}

.service-block:first-of-type { border-top: 0; }

.service-block .split h2 { font-size: clamp(26px, 3vw, 38px); }

.scope-list { list-style: none; margin-top: 34px; }

.scope-list li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--grey);
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 24px;
  width: 16px; height: 1px;
  background: var(--bronze);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
}

.contact-item { margin-bottom: 36px; }

.contact-item h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 10px;
}

.contact-item p, .contact-item a {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--navy);
}

.contact-item a:hover { color: var(--bronze); }

.contact-note {
  background: var(--ivory);
  border: 1px solid var(--line);
  padding: 40px;
  font-size: 15px;
  color: var(--grey);
}

.contact-note h3 { font-size: 22px; color: var(--navy); margin-bottom: 14px; }

/* ---------- Subscribe gate ---------- */

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(7, 26, 44, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate-modal {
  position: relative;
  background: var(--paper);
  max-width: 480px;
  width: 100%;
  padding: 48px 44px 38px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
}

.gate-modal h3 {
  font-size: 27px;
  color: var(--navy);
  margin-bottom: 14px;
}

.gate-modal .gate-copy { font-size: 15px; color: var(--grey); margin-bottom: 26px; }

.gate-form { display: flex; gap: 10px; flex-wrap: wrap; }

.gate-form input {
  flex: 1;
  min-width: 200px;
  font-family: var(--sans);
  font-size: 15px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  outline: none;
}

.gate-form input:focus { border-color: var(--navy); }

.gate-form .btn { padding: 15px 30px; cursor: pointer; background: none; font-family: var(--sans); }

.gate-error { color: #a03030; font-size: 13px; margin-top: 12px; }

.gate-privacy {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--grey-light);
}

.gate-privacy a { color: var(--bronze); }

.gate-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--grey-light);
  cursor: pointer;
}

.gate-close:hover { color: var(--navy); }

body.gate-locked { overflow: hidden; }

body.gate-locked .article,
body.gate-locked main {
  filter: blur(7px);
  pointer-events: none;
  user-select: none;
}

/* ---------- Video poster (plays after subscribe) ---------- */

.video-poster { cursor: pointer; }

.video-poster .play-badge {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px; height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.25s, transform 0.25s;
}

.video-poster:hover .play-badge {
  background: rgba(179, 154, 99, 0.85);
  transform: scale(1.06);
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

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

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .practices { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .markers .wrap { grid-template-columns: 1fr 1fr; }
  .marker { border-left: 0; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .insight-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }

  .main-nav {
    position: fixed;
    inset: 0;
    background: var(--navy-deep);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }

  .main-nav.open { transform: none; }

  .main-nav a { color: #fff !important; font-size: 17px; }

  body.nav-open .nav-toggle span { background: #fff; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Print (whitepaper pages) ---------- */

@media print {
  .site-header, .site-footer, .cta-band, .article-actions { display: none !important; }
  .article { max-width: none; padding: 0; }
  body { font-size: 12pt; }
}
