/* ==========================================================================
   CHRONICA — Main Layout, Typography, Hero & Ambient Visual System
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-void);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-void);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.65;
  position: relative;
}

::selection {
  background: rgba(245, 203, 167, 0.28);
  color: var(--accent-ivory);
}

/* Custom Ultra-Subtle Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #070605;
}
::-webkit-scrollbar-thumb {
  background: rgba(245, 203, 167, 0.16);
  border-radius: 999px;
  border: 2px solid #070605;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 203, 167, 0.34);
}

/* Subtle Museum Paper / Varnish Micro-Grain Overlay */
.ambient-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Top Reading Progress Hairline */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(212, 163, 115, 0.4), var(--accent-champagne), #fff3e4);
  z-index: 120;
  pointer-events: none;
  will-change: transform;
}

/* Container Utility */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* Editorial Reveal Animation (GPU Composited, Smooth & Never Jarring) */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(4px);
  transition:
    opacity 0.9s var(--ease-editorial),
    transform 0.9s var(--ease-editorial),
    filter 0.85s var(--ease-editorial);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }

/* ==========================================================================
   FLOATING NAVIGATION BAR
   ========================================================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  transition:
    background-color 0.45s var(--ease-silk),
    border-color 0.45s var(--ease-silk),
    backdrop-filter 0.45s var(--ease-silk);
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background-color: rgba(8, 7, 6, 0.78);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border-bottom-color: var(--border-subtle);
}

.nav-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 3.6vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 36px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}

.brand-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--accent-ivory);
  transition: transform 0.6s var(--ease-editorial);
}

.brand-mark:hover .brand-icon {
  transform: rotate(90deg);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.38rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: rgba(247, 243, 236, 0.72);
  font-size: 0.855rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  position: relative;
  padding: 6px 2px;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent-champagne);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease-editorial);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--accent-ivory);
}

.nav-links a.is-active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-cmd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 16, 14, 0.54);
  border: 1px solid var(--border-medium);
  color: rgba(247, 243, 236, 0.84);
  font-family: var(--font-sans);
  font-size: 0.81rem;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.nav-cmd-btn:hover {
  border-color: var(--border-accent);
  background: rgba(28, 24, 20, 0.85);
  color: var(--accent-ivory);
}

.nav-cmd-kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-champagne);
  background: rgba(245, 203, 167, 0.1);
  border: 1px solid rgba(245, 203, 167, 0.22);
  padding: 1px 6px;
  border-radius: 5px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-ivory);
  color: var(--text-on-accent);
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease-editorial), background-color 0.25s ease, box-shadow 0.35s ease;
}

.nav-cta:hover {
  background: var(--accent-champagne);
  box-shadow: 0 8px 28px rgba(245, 203, 167, 0.28);
}

/* ==========================================================================
   HERO SECTION — CLASSICAL PANTHEON ROTUNDA × DARK OBSIDIAN STUDIO
   ========================================================================== */
.hero-section {
  position: relative;
  padding-top: calc(var(--nav-height) + 46px);
  padding-bottom: 52px;
  overflow: hidden;
  background-color: var(--bg-void);
}

/* Classical Oil Painting Backdrop */
.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 920px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-painting {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.06);
  filter: contrast(1.06) brightness(0.95) saturate(0.98);
  will-change: transform;
  animation: heroBreath 24s ease-in-out infinite alternate;
}

@keyframes heroBreath {
  0% { transform: scale(1.04) translateY(0px); }
  100% { transform: scale(1.09) translateY(-10px); }
}

/* Multi-Stop Chiaroscuro Vignette Blending Seamlessly Into Void Obsidian */
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 74% 50% at 50% 24%, rgba(6, 5, 4, 0.08) 0%, rgba(6, 5, 4, 0.48) 64%, rgba(6, 5, 4, 0.9) 100%),
    linear-gradient(180deg,
      rgba(6, 5, 4, 0.56) 0%,
      rgba(6, 5, 4, 0.2) 18%,
      rgba(6, 5, 4, 0.26) 40%,
      rgba(6, 5, 4, 0.74) 68%,
      rgba(6, 5, 4, 0.98) 86%,
      #060504 100%
    );
}

/* Subtle Golden Chiaroscuro Dust Canvas */
#heroDustCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 920px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.78;
}

/* Hero Typography & Header Content */
.hero-header {
  position: relative;
  z-index: 4;
  text-align: center;
  max-width: 780px;
  margin: 0 auto 44px;
  padding: 0 20px;
}

/* Frosted Eyebrow Pill (Qredible Signature) */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(14, 12, 10, 0.72);
  border: 1px solid rgba(245, 203, 167, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 243, 236, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), var(--specular-top);
  margin-bottom: 22px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-champagne);
  box-shadow: 0 0 10px rgba(245, 203, 167, 0.8);
  animation: pulseSoft 2.8s ease-in-out infinite;
}

@keyframes pulseSoft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3rem, 6.2vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--accent-ivory);
  text-shadow: 0 12px 44px rgba(0, 0, 0, 0.72), 0 2px 10px rgba(0, 0, 0, 0.45);
  margin-bottom: 16px;
}

.hero-title em {
  font-style: italic;
  color: #fce5cd;
}

.hero-title-cn {
  display: block;
  font-family: var(--font-serif-cn);
  font-size: clamp(1.1rem, 1.8vw, 1.42rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  color: rgba(245, 203, 167, 0.9);
  margin-bottom: 14px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: clamp(0.92rem, 1.2vw, 1.02rem);
  color: rgba(240, 232, 222, 0.8);
  line-height: 1.72;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.78);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn-obsidian-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #1b1815 0%, #0d0b0a 100%);
  color: var(--accent-ivory);
  border: 1px solid rgba(245, 203, 167, 0.28);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), var(--specular-top);
  overflow: hidden;
  transition: transform 0.35s var(--ease-editorial), border-color 0.3s ease, box-shadow 0.35s ease;
}

.btn-obsidian-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(245, 203, 167, 0.14) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease-editorial);
}

.btn-obsidian-primary:hover::before {
  transform: translateX(120%);
}

.btn-obsidian-primary:hover {
  border-color: rgba(245, 203, 167, 0.6);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 28px rgba(245, 203, 167, 0.18);
}

.btn-micro-tour {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: rgba(245, 236, 224, 0.74);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  transition: color 0.25s ease, transform 0.3s var(--ease-editorial);
}

.btn-micro-tour:hover {
  color: var(--accent-champagne);
}

/* Floating Left / Right Fresco Annotation Callouts (Signature Qredible Detail) */
.hero-callout {
  position: absolute;
  top: 392px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 9px;
  border-radius: var(--radius-pill);
  background: rgba(14, 12, 10, 0.68);
  border: 1px solid rgba(245, 203, 167, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.76rem;
  color: rgba(247, 243, 236, 0.88);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  animation: calloutFloat 6.5s ease-in-out infinite;
}

.hero-callout-left {
  left: max(22px, calc(50% - 675px));
}

.hero-callout-right {
  right: max(22px, calc(50% - 675px));
  animation-delay: -3.2s;
}

.hero-callout-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245, 203, 167, 0.16);
  border: 1px solid rgba(245, 203, 167, 0.34);
  display: grid;
  place-items: center;
  color: var(--accent-champagne);
  font-size: 0.72rem;
}

.hero-callout::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, rgba(245, 203, 167, 0.45), transparent);
}

.hero-callout-left::after {
  left: 100%;
}

.hero-callout-right::after {
  right: 100%;
  background: linear-gradient(270deg, rgba(245, 203, 167, 0.45), transparent);
}

@keyframes calloutFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

/* ==========================================================================
   INSTITUTIONAL PROVENANCE MARQUEE STRIP
   ========================================================================== */
.provenance-strip {
  position: relative;
  z-index: 4;
  margin-top: 46px;
  padding: 20px 0 8px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 54px;
  animation: marqueeScroll 38s linear infinite;
}

.provenance-strip:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.institution-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(247, 243, 236, 0.46);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease;
  cursor: default;
}

.institution-item:hover {
  color: var(--accent-champagne);
}

.institution-item svg {
  width: 17px;
  height: 17px;
  opacity: 0.78;
}

/* ==========================================================================
   SECTION HEADER SYSTEM (Mirrors Qredible Editorial Split Header)
   ========================================================================== */
.section-block {
  position: relative;
  padding: clamp(78px, 9.5vw, 132px) 0;
  z-index: 2;
}

.section-header-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 60px);
}

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(22, 20, 18, 0.9);
  border: 1px solid var(--border-medium);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.section-pill svg {
  width: 12px;
  height: 12px;
  color: var(--accent-champagne);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 4.3vw, 3.65rem);
  line-height: 1.07;
  letter-spacing: -0.02em;
  color: var(--accent-ivory);
}

.section-title .cn-sub {
  display: block;
  margin-top: 10px;
  font-family: var(--font-serif-cn);
  font-size: clamp(1.1rem, 1.75vw, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--accent-champagne);
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.78;
  max-width: 440px;
  justify-self: end;
}

/* Spotlight Interactive Surface (Smooth Warm Champagne Sheen on Pointer) */
.spotlight-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: border-color 0.4s var(--ease-silk), transform 0.5s var(--ease-editorial);
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  background: radial-gradient(
    460px circle at var(--mx, 50%) var(--my, 50%),
    rgba(245, 203, 167, 0.11),
    transparent 62%
  );
  transition: opacity 0.45s ease;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card:hover {
  border-color: rgba(245, 203, 167, 0.26);
}

/* Divider Hairline */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 203, 167, 0.16) 50%, transparent 100%);
}

/* ==========================================================================
   FOOTER — MONUMENTAL CHIAROSCURO CLOSING
   ========================================================================== */
.site-footer {
  position: relative;
  padding: 112px 0 56px;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  background:
    radial-gradient(ellipse 65% 55% at 50% 108%, rgba(245, 203, 167, 0.11), transparent 72%),
    var(--bg-void);
}

.footer-manifesto {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 74px;
}

.footer-quote-en {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.2vw, 4.4rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--accent-ivory);
  margin-bottom: 14px;
}

.footer-quote-cn {
  font-family: var(--font-serif-cn);
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  color: var(--accent-champagne);
  margin-bottom: 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  padding-top: 44px;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 44px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a,
.footer-col button {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.87rem;
  cursor: pointer;
  transition: color 0.25s ease;
  text-align: left;
}

.footer-col a:hover,
.footer-col button:hover {
  color: var(--accent-champagne);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease-editorial);
}

.back-to-top:hover {
  border-color: var(--border-accent);
  color: var(--accent-champagne);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
