/* ============================================================
   COR DIAM — design system v4 · "Night Vault"
   Near-black ink, champagne, silver-grey. Cinematic chapters.
   ============================================================ */
:root {
  --ink: #0C0B0D;
  --ink-2: #121114;
  --ink-3: #1A181D;
  --champagne: #CDB287;
  --champagne-deep: #A8916B;
  --champagne-light: #EAD9B4;
  --silver: #9C9890;
  --silver-dim: #6B6862;
  --line-inv: rgba(205,178,135,0.16);
  --line-inv-soft: rgba(205,178,135,0.09);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --ease: cubic-bezier(0.25, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  color: var(--champagne-light);
  background: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--champagne); color: var(--ink); }
::-webkit-scrollbar { width: 0; height: 0; }
html { scrollbar-width: none; }

img, video { display: block; }
a { color: inherit; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(24px, 4.5vw, 72px); }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 clamp(24px, 4.5vw, 72px); }

/* ============ typography atoms ============ */
.overline {
  font-size: 0.66rem; font-weight: 400;
  letter-spacing: 0.5em; text-transform: uppercase;
  color: var(--champagne);
  display: inline-flex; align-items: center; gap: 16px;
}
.overline::before { content: ''; width: 34px; height: 1px; background: var(--champagne); }
.overline.no-rule::before { display: none; }

.headline {
  font-family: var(--font-display); font-weight: 300;
  line-height: 1.04; letter-spacing: 0.01em;
}
.headline em { font-style: italic; color: var(--champagne); }

.micro { font-size: 0.64rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--silver-dim); }

/* ============ reveal system ============ */
.rl { display: block; overflow: hidden; }
.rl > span { display: block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.rl.in > span { transform: none; }
.rv { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.fade-late { opacity: 0; transition: opacity 1.4s ease 0.2s; }
.fade-late.in { opacity: 1; }

/* ============ preloader ============ */
.preloader {
  position: fixed; inset: 0; z-index: 3000; background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.9s ease;
}
.preloader.done { opacity: 0; pointer-events: none; }
.preloader img { height: 84px; width: auto; opacity: 0; animation: preFade 1.1s ease 0.15s forwards; }
@keyframes preFade { to { opacity: 1; } }

/* ============ nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  height: 88px; pointer-events: none;
  transition: background 0.5s, height 0.5s;
}
.nav.solid, .nav.always-solid { background: rgba(12,11,13,0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); height: 64px; }
.nav .nav-in { pointer-events: auto; display: flex; align-items: center; gap: 12px; }
.nav-word {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.05rem; letter-spacing: 0.42em; text-transform: uppercase;
  text-decoration: none; color: var(--champagne-light);
}
.nav-word img { height: 30px; width: auto; }
.nav-links { position: absolute; right: clamp(24px, 4.5vw, 72px); top: 50%; transform: translateY(-50%); pointer-events: auto; display: flex; gap: 30px; list-style: none; }
.nav-links a { font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; text-decoration: none; color: var(--silver); transition: color 0.3s; position: relative; }
.nav-links a::after { content: ''; position: absolute; right: -14px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--champagne); transform: translateY(-50%) scale(0); transition: transform 0.25s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--champagne-light); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: translateY(-50%) scale(1); }
.nav-burger { display: none; position: absolute; right: clamp(24px, 4.5vw, 72px); top: 50%; transform: translateY(-50%); pointer-events: auto; background: none; border: none; color: var(--champagne-light); cursor: pointer; font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase; font-family: var(--font-body); }
@media (max-width: 900px) { .nav-links { display: none; } .nav-burger { display: block; } }

/* ============ menu overlay ============ */
.menu-overlay {
  position: fixed; inset: 0; z-index: 900; background: var(--ink-2);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(28px, 10vw, 120px);
  opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease);
}
.menu-overlay.open { opacity: 1; pointer-events: auto; }
.m-link {
  display: flex; align-items: baseline; gap: 24px; text-decoration: none;
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.4rem, 9vw, 4.4rem); line-height: 1.35;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), color 0.3s;
}
.menu-overlay.open .m-link { opacity: 1; transform: none; }
.m-link:hover { color: var(--champagne); font-style: italic; }
.m-link .m-num { font-family: var(--font-body); font-size: 0.62rem; letter-spacing: 0.3em; color: var(--silver-dim); }
.menu-close { position: absolute; top: 24px; right: clamp(24px, 4.5vw, 72px); background: none; border: none; color: var(--champagne-light); cursor: pointer; font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase; font-family: var(--font-body); }

/* ============ buttons / links ============ */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 42px; text-decoration: none;
  border: 1px solid var(--champagne); border-radius: 999px;
  font-size: 0.68rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--champagne-light);
  transition: background 0.4s, color 0.4s;
}
.btn:hover { background: var(--champagne); color: var(--ink); }
.btn.solid { background: var(--champagne); color: var(--ink); }
.btn.solid:hover { background: var(--champagne-light); }
.t-link {
  display: inline-block; text-decoration: none;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--champagne); border-bottom: 1px solid var(--line-inv);
  padding-bottom: 7px; transition: border-color 0.3s, color 0.3s;
}
.t-link:hover { border-color: var(--champagne); color: var(--champagne-light); }

/* ============ chapter system ============ */
.chapter { position: relative; padding: clamp(100px, 15vh, 180px) 0; }
.chapter .ch-mark {
  position: absolute; top: clamp(60px, 9vh, 110px); right: clamp(20px, 4vw, 60px);
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(4rem, 10vw, 9rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(205,178,135,0.22);
  pointer-events: none; user-select: none;
}
.section-2 { background: var(--ink-2); }
.section-3 { background: var(--ink-3); }

/* ============ media ============ */
.frame { position: relative; }
.frame img, .frame video { width: 100%; object-fit: cover; }
.frame figcaption { margin-top: 14px; display: flex; justify-content: space-between; gap: 16px; }
.glow-frame { box-shadow: 0 0 0 1px var(--line-inv-soft), 0 40px 90px rgba(0,0,0,0.55); }

/* ============ footer ============ */
.footer { border-top: 1px solid var(--line-inv-soft); padding: clamp(60px, 9vh, 100px) 0 36px; text-align: center; }
.footer .f-word { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.6rem, 8vw, 7rem); letter-spacing: 0.3em; text-indent: 0.3em; color: transparent; -webkit-text-stroke: 1px rgba(205,178,135,0.35); }
.foot-tag { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--champagne); margin-top: 16px; letter-spacing: 0.16em; }
.foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 30px; margin-top: 32px; }
.foot-links a { font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase; text-decoration: none; color: var(--silver-dim); transition: color 0.3s; }
.foot-links a:hover { color: var(--champagne); }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: clamp(36px, 6vh, 60px); padding-top: 24px; border-top: 1px solid var(--line-inv-soft); font-size: 0.58rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--silver-dim); text-align: left; }
.foot-row a { text-decoration: none; }
.foot-row a:hover { color: var(--champagne); }

/* ============ lightbox ============ */
.lightbox { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(9,8,10,0.97); }
.lightbox.open { display: flex; align-items: center; justify-content: center; animation: lbFade 0.4s ease; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lb-stage img, .lb-stage video { max-width: 88vw; max-height: 82vh; width: auto; height: auto; object-fit: contain; }
.lb-cap { position: absolute; bottom: 32px; left: 0; right: 0; text-align: center; color: var(--silver); font-size: 0.64rem; letter-spacing: 0.3em; text-transform: uppercase; pointer-events: none; }
.lb-count { position: absolute; top: 28px; left: 32px; color: var(--champagne); font-size: 0.64rem; letter-spacing: 0.3em; }
.lb-close { position: absolute; top: 20px; right: 30px; background: none; border: none; color: var(--champagne-light); font-size: 1.7rem; cursor: pointer; font-weight: 200; }
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 1px solid var(--line-inv); color: var(--champagne-light);
  width: 54px; height: 54px; border-radius: 50%; cursor: pointer; font-size: 1rem; font-weight: 200;
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.lb-prev { left: 28px; } .lb-next { right: 28px; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--champagne); border-color: var(--champagne); color: var(--ink); }
@media (max-width: 640px) { .lb-prev { left: 10px; } .lb-next { right: 10px; } .lb-prev, .lb-next { width: 42px; height: 42px; } }

/* ============ faq ============ */
.faq-item { border-bottom: 1px solid var(--line-inv-soft); }
.faq-item:first-of-type { border-top: 1px solid var(--line-inv); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer; text-align: left;
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 28px 0;
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem); color: var(--champagne-light); line-height: 1.3;
  transition: color 0.3s;
}
.faq-q:hover { color: var(--champagne); }
.faq-q .fx { font-weight: 200; font-size: 1.4rem; color: var(--champagne); transition: transform 0.4s var(--ease); flex-shrink: 0; }
.faq-item.open .faq-q .fx { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.6s var(--ease); }
.faq-a p, .faq-a div { padding: 0 0 28px; color: var(--silver); max-width: 76ch; font-size: 1rem; }

/* ============ article pages ============ */
.page-hero { padding: calc(64px + clamp(80px, 14vh, 150px)) 0 clamp(50px, 8vh, 90px); }
.page-hero h1 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.8rem, 7.4vw, 6.4rem); line-height: 1.02;
  margin-top: 28px; max-width: 17ch; color: var(--champagne-light);
}
.page-hero .quick-answer {
  margin-top: clamp(32px, 5vh, 50px);
  border-left: 1px solid var(--champagne);
  padding: 4px 0 4px 28px;
  font-family: var(--font-display); font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.6; color: var(--champagne-light); max-width: 64ch;
}
.article-body h2 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.08;
  margin: clamp(60px, 9vh, 90px) 0 24px; color: var(--champagne-light);
}
.article-body h2 .h-num { font-style: italic; color: var(--champagne); font-size: 0.55em; letter-spacing: 0.2em; margin-right: 16px; }
.article-body h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin: 42px 0 14px; color: var(--champagne-light); }
.article-body p { margin-bottom: 1.6em; color: var(--silver); font-size: 1.05rem; max-width: 72ch; font-weight: 300; }
.article-body p strong { font-weight: 500; color: var(--champagne-light); }
.article-body p a { color: var(--champagne); }
.article-body ul.tick-list { list-style: none; margin: 0 0 1.6em; }
.article-body ul.tick-list li { padding: 12px 0 12px 32px; position: relative; border-bottom: 1px solid var(--line-inv-soft); color: var(--silver); max-width: 72ch; }
.article-body ul.tick-list li::before { content: '—'; position: absolute; left: 0; top: 12px; color: var(--champagne); }
.article-body figure.frame { margin: 52px 0; }
.article-body figure.frame img { aspect-ratio: 16/9; }
.article-body figure.frame.tall img { aspect-ratio: 4/4.6; }

.d-table { width: 100%; border-collapse: collapse; margin: 12px 0 2.2em; font-size: 0.95rem; }
.d-table caption { text-align: left; font-size: 0.64rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--silver-dim); padding-bottom: 16px; }
.d-table th { text-align: left; font-weight: 400; font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--champagne); padding: 16px 18px; border-bottom: 1px solid var(--line-inv); }
.d-table td { padding: 16px 18px; border-bottom: 1px solid var(--line-inv-soft); color: var(--silver); vertical-align: top; }
.d-table td:first-child { font-family: var(--font-display); font-size: 1.15rem; color: var(--champagne-light); white-space: nowrap; }
.d-table tr:hover td { background: rgba(205,178,135,0.05); }
@media (max-width: 640px) {
  .d-table { font-size: 0.85rem; }
  .d-table th, .d-table td { padding: 13px 10px; }
  .d-table td:first-child { white-space: normal; font-size: 1.02rem; }
}

.pull-quote {
  margin: clamp(52px, 8vh, 80px) 0; text-align: center;
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(1.6rem, 3.6vw, 2.8rem); line-height: 1.3; color: var(--champagne);
}

.glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line-inv); border-bottom: 1px solid var(--line-inv); margin: clamp(52px, 8vh, 76px) 0; }
.glance .g-cell { padding: 32px 26px; border-right: 1px solid var(--line-inv-soft); }
.glance .g-cell:last-child { border-right: none; }
.glance .g-val { font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(2rem, 3.2vw, 2.9rem); color: var(--champagne); line-height: 1.05; }
.glance .g-lab { font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--silver-dim); margin-top: 12px; }
@media (max-width: 860px) { .glance { grid-template-columns: 1fr 1fr; } .glance .g-cell:nth-child(2n) { border-right: none; } .glance .g-cell { border-bottom: 1px solid var(--line-inv-soft); } }

.next-chapter { display: block; text-decoration: none; background: var(--ink-2); padding: clamp(80px, 12vh, 130px) 0; text-align: center; border-top: 1px solid var(--line-inv-soft); }
.next-chapter h3 { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.2rem, 5.8vw, 4.6rem); margin-top: 26px; color: var(--champagne-light); transition: color 0.4s; }
.next-chapter:hover h3 { color: var(--champagne); }
.next-chapter .nc-go { margin-top: 24px; font-size: 0.64rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--silver-dim); }

.byline { display: flex; gap: 32px; flex-wrap: wrap; align-items: baseline; margin-top: 32px; font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--silver-dim); }
.byline b { color: var(--champagne-light); font-weight: 400; }

/* ============ article cards / index ============ */
.art-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(26px, 3.4vw, 48px); }
.art-card { text-decoration: none; display: flex; flex-direction: column; }
.art-card .art-media { overflow: hidden; }
.art-card .art-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform 1.3s var(--ease); filter: saturate(0.9); }
.art-card:hover .art-media img { transform: scale(1.05); filter: saturate(1.05); }
.art-card .art-no { font-family: var(--font-display); font-style: italic; color: var(--champagne); font-size: 0.95rem; letter-spacing: 0.2em; margin-top: 22px; }
.art-card h3 { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.5rem, 2.3vw, 2rem); line-height: 1.15; margin-top: 10px; color: var(--champagne-light); transition: color 0.3s; }
.art-card:hover h3 { color: var(--champagne); }
.art-card p { color: var(--silver); font-size: 0.94rem; margin-top: 12px; flex: 1; }
.art-card .art-more { margin-top: 20px; font-size: 0.64rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--champagne); }
@media (max-width: 960px) { .art-grid { grid-template-columns: 1fr; } }
