/* ============================================================
   renai.works — Styles
   Palette: Ink Black #1c1612, Cinder Brown #2e2318, Bark #4a3728,
   Amber Dust #8b6c4a, Old Gold #c9a96e, Parchment #e8dcc8,
   Verdigris #6b7c5a, Dusk Violet #3d2e45
   Fonts: Cinzel Decorative (display), Cormorant Garamond (sub),
   EB Garamond (body), Space Mono (label/micro)
   ============================================================ */

/* ── Variable fluid type scale ── */
:root {
  --type-display: clamp(3.5rem, 8vw, 9rem);
  --type-heading: clamp(1.4rem, 2.8vw, 2.4rem);
  --type-subhead: clamp(1.1rem, 2.2vw, 1.8rem);
  --type-body: clamp(0.95rem, 1.1vw, 1.15rem);
  --type-label: clamp(0.65rem, 0.9vw, 0.85rem);

  /* Colors */
  --ink-black: #1c1612;
  --cinder: #2e2318;
  --bark: #4a3728;
  --amber: #8b6c4a;
  --gold: #c9a96e;
  --parchment: #e8dcc8;
  --verdigris: #6b7c5a;
  --violet: #3d2e45;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--ink-black);
  color: var(--parchment);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--type-body);
  line-height: 1.75;
  overflow-x: hidden;
  position: relative;
}

/* Global noise texture overlay via pseudo-element */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.08;
  mix-blend-mode: overlay;
}

/* ── Typography base ── */
h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--verdigris);
}

p {
  font-size: var(--type-body);
  line-height: 1.75;
  color: var(--parchment);
}

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem var(--space-lg);
  background: linear-gradient(to bottom, rgba(28,22,18,0.9) 0%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.site-nav.visible {
  opacity: 1;
  pointer-events: all;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment);
  opacity: 0.7;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--gold);
}

/* ── Hero Section ── */
.hero-section {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ink-black);
}

/* Botanical silhouette layer */
.hero-botanical {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  filter: blur(3px);
}

.botanical-svg {
  width: 100%;
  height: 100%;
  position: absolute;
  bottom: 0;
}

/* Candlelight vignette */
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(10,7,4,0.65) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Hero content — blur-focus animation */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-md);
  filter: blur(2px);
  opacity: 0;
  animation: focusIn 1.2s ease-out 0.3s forwards;
  max-width: 900px;
}

@keyframes focusIn {
  to {
    filter: blur(0);
    opacity: 1;
  }
}

.hero-eyebrow {
  margin-bottom: 2.5rem;
}

.eyebrow-label {
  font-family: 'Space Mono', monospace;
  font-size: var(--type-label);
  letter-spacing: 0.2em;
  color: var(--amber);
  text-transform: uppercase;
}

.hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-weight: 600;
  font-size: var(--type-display);
  letter-spacing: 0.08em;
  animation: letterSpaceIn 1.4s ease-out 0.4s both;
  color: var(--parchment);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
}

@keyframes letterSpaceIn {
  from {
    letter-spacing: 0.2em;
  }
  to {
    letter-spacing: 0.08em;
  }
}

.hero-title-dot {
  color: var(--gold);
  font-size: 0.6em;
  vertical-align: middle;
  opacity: 0.8;
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-style: italic;
  font-size: var(--type-subhead);
  color: var(--parchment);
  opacity: 0.75;
  margin-top: 2rem;
  line-height: 1.6;
}

.hero-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 2.5rem auto;
  opacity: 0.5;
}

.hero-tagline {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: calc(var(--type-body) * 1.05);
  color: var(--parchment);
  opacity: 0.6;
  letter-spacing: 0.04em;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.scroll-line {
  width: 2px;
  height: 40px;
  background-color: var(--gold);
  margin: 0 auto;
  animation: pulseOpacity 2s ease-in-out infinite;
}

@keyframes pulseOpacity {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── Marbled Divider ── */
.marbled-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background: var(--ink-black);
}

/* ── Section reveal animation ── */
.section-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

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

/* Stagger children in grid */
.specimens-grid .section-reveal:nth-child(2) {
  transition-delay: 0.15s;
}

.specimens-grid .section-reveal:nth-child(3) {
  transition-delay: 0.3s;
}

/* ── Specimens Section ── */
.specimens-section {
  padding: var(--space-xl) var(--space-lg);
  background-color: var(--ink-black);
  position: relative;
}

.sigil-separator {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeInSigil 1s ease 0.5s forwards;
}

@keyframes fadeInSigil {
  to { opacity: 1; }
}

.specimens-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-catalog {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: var(--type-label);
  letter-spacing: 0.18em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.specimens-title {
  font-family: 'Cinzel Decorative', serif;
  font-weight: 600;
  font-size: var(--type-heading);
  color: var(--parchment);
  margin-bottom: 1.5rem;
}

.specimens-intro {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: var(--type-subhead);
  color: var(--parchment);
  opacity: 0.65;
  max-width: 52ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* Asymmetric 3-column grid: 5fr + 3fr + 4fr */
.specimens-grid {
  display: grid;
  grid-template-columns: 5fr 3fr 4fr;
  gap: var(--space-md);
  max-width: 1400px;
  margin: 0 auto;
}

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

/* Specimen cards */
.specimen-card {
  border: 1px solid var(--bark);
  background: var(--cinder);
  padding: var(--space-md);
  transition: transform 0.35s ease, border-color 0.35s ease, filter 0.35s ease, brightness 0.35s ease;
  filter: brightness(0.85) blur(0.5px);
  position: relative;
}

.specimen-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  filter: brightness(1) blur(0);
}

.specimen-image-area {
  width: 100%;
  margin-bottom: 1.25rem;
}

.specimen-crosshatch {
  position: relative;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 3px,
    rgba(138, 108, 74, 0.08) 3px,
    rgba(138, 108, 74, 0.08) 4px
  );
}

.specimen-visual {
  display: block;
  width: 100%;
  height: auto;
}

.specimen-label {
  border-top: 1px solid var(--bark);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.specimen-code {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--amber);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.specimen-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: var(--type-subhead);
  color: var(--parchment);
  line-height: 1.3;
}

.specimen-desc {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--type-body);
  color: var(--parchment);
  opacity: 0.6;
  line-height: 1.6;
}

/* Section botanical border rule */
.section-botanical-border {
  margin-top: var(--space-xl);
  overflow: hidden;
}

/* ── Workshop Section ── */
.workshop-section {
  padding: var(--space-xl) 0;
  background-color: var(--ink-black);
  position: relative;
}

.workshop-inner {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0 var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
  .workshop-inner {
    grid-template-columns: 1fr;
  }
  .workshop-vertical-text {
    display: none;
  }
}

/* Vertical running text (rotated 90°, bottom-to-top) */
.workshop-vertical-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--amber);
  text-transform: uppercase;
  opacity: 0.4;
  white-space: nowrap;
  align-self: stretch;
  display: flex;
  align-items: center;
  user-select: none;
}

.workshop-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.workshop-header {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--bark);
}

.workshop-title {
  font-family: 'Cinzel Decorative', serif;
  font-weight: 600;
  font-size: var(--type-heading);
  color: var(--parchment);
  margin-top: 1rem;
}

.workshop-text {
  max-width: 72ch;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.workshop-text p {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--type-body);
  line-height: 1.8;
  color: var(--parchment);
  opacity: 0.85;
}

.workshop-visual-panel {
  border: 1px solid var(--bark);
  background: var(--cinder);
  overflow: hidden;
  max-width: 700px;
}

/* ── Sigil full-width separator ── */
.sigil-full-separator {
  display: block;
  padding: var(--space-lg) 0;
  overflow: hidden;
}

/* ── Archive Section ── */
.archive-section {
  padding: var(--space-xl) var(--space-lg);
  background-color: var(--violet);
  position: relative;
}

/* Noise texture heavier on archive section */
.archive-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.archive-inner {
  max-width: 56ch;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.archive-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.archive-title {
  font-family: 'Cinzel Decorative', serif;
  font-weight: 600;
  font-size: var(--type-heading);
  color: var(--parchment);
  margin-top: 1rem;
}

.archive-text {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin-bottom: var(--space-lg);
}

.archive-text p {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: var(--type-body);
  line-height: 1.85;
  color: var(--parchment);
  opacity: 0.88;
}

/* Drop cap on first paragraph */
.archive-drop-cap::first-letter {
  font-family: 'Cinzel Decorative', serif;
  font-size: 3.5em;
  font-weight: 600;
  float: left;
  line-height: 0.75;
  margin: 0.08em 0.12em 0 0;
  color: var(--gold);
}

.archive-quote {
  border-left: 2px solid var(--gold);
  padding: 1.5rem var(--space-md);
  margin: 0;
  background: rgba(201, 169, 110, 0.04);
}

.archive-quote p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: var(--type-subhead);
  color: var(--parchment);
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.archive-quote cite {
  font-family: 'Space Mono', monospace;
  font-size: var(--type-label);
  letter-spacing: 0.1em;
  color: var(--amber);
  font-style: normal;
}

.archive-rule {
  margin-top: var(--space-md);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* ── Footer Altar ── */
.footer-altar {
  background-color: var(--cinder);
  border-top: 1px solid var(--bark);
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  position: relative;
}

/* Heavier noise on footer */
.footer-altar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.12;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.footer-sigil {
  position: relative;
  z-index: 1;
  opacity: 0.6;
}

.footer-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-domain {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--parchment);
  letter-spacing: 0.1em;
}

.footer-separator {
  color: var(--gold);
  opacity: 0.5;
}

.footer-coordinates {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--amber);
  text-transform: uppercase;
}

.footer-detail {
  position: relative;
  z-index: 1;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: var(--type-body);
  color: var(--parchment);
  opacity: 0.5;
}

.footer-rule {
  position: relative;
  z-index: 1;
}

.footer-credit {
  position: relative;
  z-index: 1;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--parchment);
  opacity: 0.3;
  text-transform: uppercase;
}

/* ── Responsive adjustments ── */
@media (max-width: 1200px) {
  .specimens-section,
  .archive-section {
    padding: var(--space-xl) var(--space-md);
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 2rem;
    --space-xl: 4rem;
  }

  .hero-title {
    flex-direction: column;
    gap: 0.1em;
  }

  .archive-inner {
    max-width: 100%;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .site-nav {
    padding: 1rem var(--space-md);
  }
}

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

  .nav-links {
    display: none;
  }
}
