/* ==========================================================================
   ZURAB ARTSUEV — site officiel
   Une scène vide après la représentation : le contenu n’apparaît que là
   où une lumière se pose ; le reste demeure dans l’obscurité.
   ========================================================================== */

/* --- Tokens -------------------------------------------------------------- */
:root {
  --stage: #0c0a08;
  /* noir presque absolu, légèrement chaud */
  --wing: #17140f;
  /* noir charbon */
  --wing-soft: #211d16;
  /* panneaux / hairlines pleins */
  --hairline: rgba(242, 234, 217, 0.12);
  --hairline-strong: rgba(242, 234, 217, 0.22);
  --ivory: #f2ead9;
  /* blanc cassé / ivoire chaud */
  --bone: #cdc0a6;
  /* texte secondaire */
  --bone-dim: #948a76;
  /* texte tertiaire, discret */
  --gold: #b3925a;
  /* or désaturé / champagne */
  --gold-bright: #cbab77;
  --gold-dim: rgba(179, 146, 90, 0.55);
  --gold-wash: rgba(179, 146, 90, 0.09);

  --font-display: 'Fraunces', 'Iowan Old Style', 'Georgia', serif;
  --font-body: 'Archivo', -apple-system, 'Helvetica Neue', sans-serif;

  --measure: 60ch;
  --measure-wide: 72ch;

  --ease-stage: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-slow: 1.1s;
  --dur-med: 0.6s;
  --dur-fast: 0.3s;

  --gutter: 6vw;
}

@media (min-width: 860px) {
  :root {
    --gutter: 8vw;
  }
}

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

html {
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--stage);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--gold-dim);
  color: var(--stage);
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

.skip-link:focus {
  left: 1rem !important;
  top: 1rem !important;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--bone-dim);
  font-weight: 500;
}

/* --- Reveal on scroll (single, restrained device) ------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--dur-slow) var(--ease-stage),
    transform var(--dur-slow) var(--ease-stage);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Header / nav ---------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  padding: 1.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(12, 10, 8, 0.75), transparent);
  transition: background var(--dur-med) ease, backdrop-filter var(--dur-med) ease,
    border-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}

.site-header.is-scrolled {
  background: rgba(12, 10, 8, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.nav-mark {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: none;
  gap: 2.1rem;
}

.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--bone);
  position: relative;
  padding-bottom: 3px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right var(--dur-fast) var(--ease-stage);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  right: 0;
}

.nav-links a[aria-current="page"] {
  color: var(--ivory);
}

@media (min-width: 760px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }
}

.nav-toggle {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--bone);
}

.nav-toggle:hover {
  color: var(--ivory);
}

/* Fullscreen menu (mobile) --------------------------------------------------- */
.site-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--stage);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-stage), visibility var(--dur-med);
}

.site-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.site-menu nav {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  text-align: center;
}

.site-menu a {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 8vw, 2.4rem);
  color: var(--bone);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-med) var(--ease-stage), transform var(--dur-med) var(--ease-stage),
    color var(--dur-fast);
}

.site-menu.is-open a {
  opacity: 1;
  transform: translateY(0);
}

.site-menu a:hover,
.site-menu a[aria-current="page"] {
  color: var(--gold);
}

.site-menu.is-open a:nth-child(1) {
  transition-delay: 0.05s;
}

.site-menu.is-open a:nth-child(2) {
  transition-delay: 0.1s;
}

.site-menu.is-open a:nth-child(3) {
  transition-delay: 0.15s;
}

.site-menu.is-open a:nth-child(4) {
  transition-delay: 0.2s;
}

.site-menu.is-open a:nth-child(5) {
  transition-delay: 0.25s;
}

.menu-close {
  position: absolute;
  top: 1.5rem;
  right: var(--gutter);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--bone);
}

body.menu-lock {
  overflow: hidden;
}

/* --- Links / CTAs ----------------------------------------------------------- */
.link-quiet {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.link-quiet:hover {
  color: var(--ivory);
  border-color: var(--ivory);
}

/* --- Hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem var(--gutter) 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 50%;
  width: 140vw;
  height: 60vh;
  background: radial-gradient(ellipse at center, rgba(179, 146, 90, 0.10), transparent 60%);
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.9rem, 6vw + 1.4rem, 6.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ivory);
  opacity: 0;
  transform: translateY(14px);
  animation: rise var(--dur-slow) var(--ease-stage) forwards;
  animation-delay: 0.15s;
}

.hero-role {
  margin-top: 1.1rem;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  color: var(--bone-dim);
  opacity: 0;
  transform: translateY(10px);
  animation: rise var(--dur-slow) var(--ease-stage) forwards;
  animation-delay: 0.5s;
}

.hero-line {
  margin-top: 3rem;
  max-width: 30ch;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 2.4vw + 0.6rem, 1.6rem);
  line-height: 1.5;
  color: var(--bone);
  opacity: 0;
  transform: translateY(10px);
  animation: rise var(--dur-slow) var(--ease-stage) forwards;
  animation-delay: 0.85s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {

  .hero-name,
  .hero-role,
  .hero-line {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, transparent, var(--gold-dim));
  opacity: 0;
  animation: cue-fade var(--dur-slow) ease forwards;
  animation-delay: 1.4s;
}

@keyframes cue-fade {
  to {
    opacity: 1;
  }
}

/* --- Section rhythm ------------------------------------------------------------ */
.section {
  padding: 6.5rem var(--gutter);
  position: relative;
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-head {
  max-width: var(--measure);
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.2vw + 1rem, 2.7rem);
  color: var(--ivory);
}

.section-divider {
  border: 0;
  height: 1px;
  background: var(--hairline);
  margin: 0;
}

/* --- Intro / univers (homepage) ------------------------------------------------ */
.intro p {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 1.8vw + 0.9rem, 1.75rem);
  line-height: 1.55;
  max-width: var(--measure-wide);
  color: var(--bone);
}

/* --- Book feature / page --------------------------------------------------- */
.book-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 820px) {
  .book-grid {
    grid-template-columns: minmax(240px, 340px) 1fr;
    gap: 5rem;
  }
}

.book-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  max-width: 340px;
  background: linear-gradient(180deg, var(--wing-soft), var(--stage) 78%);
  border: 1px solid var(--hairline-strong);
  overflow: hidden;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.book-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--bone-dim);
  line-height: 1.8;
}

.book-cover-fallback span {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0;
  color: var(--bone);
  margin-bottom: 0.6rem;
}

.book-cover-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity var(--dur-med) ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.book-cover-image.is-loaded {
  opacity: 1;
}

.book-status {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  border: 1px solid var(--gold-dim);
  padding: 0.4em 0.85em;
  margin-top: 1.1rem;
}

.book-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3vw + 1rem, 2.6rem);
  color: var(--ivory);
}

.book-byline {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--bone-dim);
}

.book-desc {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--bone);
  max-width: var(--measure);
}

.book-block {
  margin-top: 2.2rem;
  max-width: var(--measure);
}

.book-block h3 {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--bone-dim);
  margin-bottom: 0.7rem;
}

.book-block p {
  color: var(--bone);
  line-height: 1.8;
}

.book-extract {
  margin-top: 2.4rem;
  padding-left: 1.4rem;
  border-left: 1px solid var(--gold-dim);
  max-width: var(--measure);
}

.book-extract p {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--bone);
  line-height: 1.8;
  font-size: 1.05rem;
}

.book-extract cite {
  display: block;
  margin-top: 0.9rem;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--bone-dim);
}

/* --- Écrits : liste éditoriale ----------------------------------------------- */
.works-list {
  border-top: 1px solid var(--hairline);
}

.work-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 1.2rem 1.4rem;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}

.work-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold-dim);
}

.work-main {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 0.35rem;
}

.work-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw + 0.8rem, 2.1rem);
  color: var(--ivory);
  transition: color var(--dur-fast) ease;
}

.work-tag {
  font-size: 0.8rem;
  color: var(--bone-dim);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--dur-med) var(--ease-stage), opacity var(--dur-med) ease,
    margin-top var(--dur-med) ease;
}

.work-row:hover .work-title,
.work-row:focus-visible .work-title {
  color: var(--gold-bright);
}

.work-row:hover .work-tag,
.work-row:focus-visible .work-tag {
  max-height: 2rem;
  opacity: 1;
  margin-top: 0.15rem;
}

@media (min-width: 640px) {
  .work-row {
    grid-template-columns: 3.2rem 1fr;
  }
}

.works-intro {
  max-width: var(--measure);
  color: var(--bone);
  font-size: 1.02rem;
  line-height: 1.75;
}

/* --- Reading panel (immersive) ------------------------------------------------- */
.reading-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--stage);
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  transition: opacity var(--dur-med) var(--ease-stage), visibility var(--dur-med);
}

.reading-panel.is-active {
  opacity: 1;
  visibility: visible;
}

.reading-topbar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem var(--gutter);
  background: linear-gradient(to bottom, var(--stage) 60%, transparent);
}

.reading-close {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--bone);
}

.reading-close:hover {
  color: var(--gold-bright);
}

.reading-index {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--bone-dim);
}

.reading-body {
  max-width: var(--measure);
  margin: 2rem auto 5rem;
  padding: 0 var(--gutter);
}

.reading-body h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
  margin-bottom: 2.4rem;
}

.reading-body p {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.2vw + 0.8rem, 1.28rem);
  line-height: 2;
  color: var(--bone);
  margin-bottom: 1.7em;
}

.reading-nav {
  max-width: var(--measure);
  margin: 0 auto 4rem;
  padding: 1.6rem var(--gutter) 0;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--hairline);
}

.reading-nav button {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--bone);
  padding: 0.4rem 0;
}

.reading-nav button:hover:not(:disabled) {
  color: var(--gold-bright);
}

.reading-nav button:disabled {
  color: var(--wing-soft);
  cursor: default;
}

.reading-nav .all-works {
  color: var(--bone-dim);
}

.reading-nav .all-works:hover {
  color: var(--gold-bright);
}

/* --- Citations ---------------------------------------------------------------- */
.citations-list {
  display: flex;
  flex-direction: column;
}

.citation-block {
  min-height: 70svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem var(--gutter);
  border-bottom: 1px solid var(--hairline);
}

.citation-block:last-child {
  border-bottom: 0;
}

.citation-text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw + 1rem, 3rem);
  line-height: 1.4;
  max-width: 22ch;
  color: var(--ivory);
}

.citation-source {
  margin-top: 1.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--bone-dim);
}

/* --- About ---------------------------------------------------------------------- */
.about-body p {
  max-width: var(--measure);
  color: var(--bone);
  font-size: 1.08rem;
  line-height: 1.9;
  margin-bottom: 1.5em;
}

.about-body p:first-child {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ivory);
  line-height: 1.65;
}

/* --- Preview lists (homepage) ----------------------------------------------------- */
.preview-works {
  max-width: var(--measure-wide);
}

.preview-work {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
}

.preview-work:first-child {
  border-top: 1px solid var(--hairline);
}

.preview-work-num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-dim);
  font-size: 0.95rem;
}

.preview-work-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.4vw + 0.7rem, 1.4rem);
  color: var(--bone);
  transition: color var(--dur-fast) ease;
}

.preview-work:hover .preview-work-title {
  color: var(--gold-bright);
}

.spotlight {
  text-align: center;
}

.spotlight .citation-text {
  max-width: 24ch;
  margin: 0 auto;
}

/* --- Footer ------------------------------------------------------------------------ */
.site-footer {
  padding: 4rem var(--gutter) 3rem;
  text-align: center;
  border-top: 1px solid var(--hairline);
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--bone);
}

.footer-role {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--bone-dim);
}

.footer-copy {
  margin-top: 1.4rem;
  font-size: 0.72rem;
  color: var(--wing-soft);
}

/* --- Page header (non-hero pages) --------------------------------------------------- */
.page-head {
  padding: 9.5rem var(--gutter) 3rem;
  max-width: 1180px;
  margin: 0 auto;
}

.page-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw + 1rem, 4rem);
  color: var(--ivory);
}

@media (min-width: 700px) {
  .section {
    padding: 8rem var(--gutter);
  }
}