/* ============================================================
   Civil Mementó 2026 — shared stylesheet
   ============================================================ */

@font-face {
  font-family: "Spectral";
  src: url("assets/fonts/Spectral-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spectral";
  src: url("assets/fonts/Spectral-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ----------------------------------------------------------
   Palette — CSS custom properties
   ---------------------------------------------------------- */
:root {
  --bg:        #0e0c0b;
  --bg-card:   #161210;
  --bg-card-hover: #1e1915;
  --text:      #e8e0d5;
  --text-muted:#9a8e83;
  --accent:    #c87941;
  --border:    #2e2520;
  --shadow:    rgba(0, 0, 0, 0.6);
  --focus-ring: #c87941;

  --candle-wax:   #d4b896;
  --candle-flame: #f5c842;
  --candle-glow:  rgba(200, 121, 65, 0.35);
  --candle-tip:   #ff8c42;
}


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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

ul {
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  opacity: 0.8;
}

/* ----------------------------------------------------------
   Skip link
   ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 4px 4px;
  font-size: 0.9rem;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ----------------------------------------------------------
   Focus styles
   ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----------------------------------------------------------
   Site header
   ---------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem clamp(1rem, 5vw, 3rem);
}

.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-title {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-title h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1.2;
}

.site-title h1 span {
  display: block;
  font-size: 0.6em;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Language switcher */
.lang-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.lang-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  transition: color 0.2s;
}

.lang-nav a:hover,
.lang-nav a[aria-current="page"] {
  color: var(--accent);
}

.lang-nav a[aria-current="page"] {
  font-weight: 600;
}

.lang-divider {
  color: var(--border);
  user-select: none;
}


/* ----------------------------------------------------------
   CSS Candle
   ---------------------------------------------------------- */
.candle-wrap {
  display: flex;
  justify-content: center;
  padding: 2rem 0 1.5rem;
}

.candle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candle-flame {
  position: relative;
  width: 14px;
  height: 22px;
  background: radial-gradient(ellipse at 50% 80%, var(--candle-flame) 0%, var(--candle-tip) 40%, transparent 100%);
  border-radius: 50% 50% 30% 30% / 60% 60% 40% 40%;
  box-shadow:
    0 0 8px 4px var(--candle-glow),
    0 0 24px 8px var(--candle-glow);
  transform-origin: 50% 100%;
  animation: flicker 2.4s ease-in-out infinite;
}

.candle-body {
  width: 18px;
  height: 60px;
  background: linear-gradient(to bottom, var(--candle-wax) 0%, #b89a78 100%);
  border-radius: 2px 2px 4px 4px;
  position: relative;
}

.candle-body::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 7px;
  width: 3px;
  height: 10px;
  background: linear-gradient(to bottom, #2a1e12 0%, #4a3a28 60%, #3a2c1e 100%);
  border-radius: 2px 2px 0 0;
}

/* Flicker keyframes — multi-step for organic feel */
@keyframes flicker {
  0%   { transform: scaleX(1)    rotate(-1deg); opacity: 0.92; }
  15%  { transform: scaleX(0.9)  rotate(1.5deg); opacity: 1; }
  30%  { transform: scaleX(1.05) rotate(-0.5deg); opacity: 0.88; }
  45%  { transform: scaleX(0.95) rotate(2deg); opacity: 0.95; }
  60%  { transform: scaleX(1.02) rotate(-1.5deg); opacity: 0.9; }
  75%  { transform: scaleX(0.92) rotate(1deg); opacity: 1; }
  88%  { transform: scaleX(1.04) rotate(-2deg); opacity: 0.93; }
  100% { transform: scaleX(1)    rotate(-1deg); opacity: 0.92; }
}

@media (prefers-reduced-motion: reduce) {
  .candle-flame {
    animation: none;
  }
}

/* ----------------------------------------------------------
   Hero / intro section
   ---------------------------------------------------------- */
.site-intro {
  text-align: center;
  padding: 0 clamp(1rem, 5vw, 3rem) 3rem;
  max-width: 46rem;
  margin: 0 auto;
}

.site-intro p {
  color: var(--text);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.7;
}

/* Decorative rule */
.section-rule {
  border: none;
  border-top: 1px solid var(--border);
  max-width: 72rem;
  margin: 0 auto 2.5rem;
}

/* ----------------------------------------------------------
   Gallery grid
   ---------------------------------------------------------- */
.gallery-section {
  flex: 1;
  padding: 0 clamp(1rem, 5vw, 3rem) 4rem;
}


.gallery-section > h2 {
  max-width: 72rem;
  margin: 0 auto 2rem;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.gallery-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 1.5rem;
}

/* Person card */
.person-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

/* Clip only the photo, not the text below */
.person-card .photo-wrap {
  border-radius: 3px 3px 0 0;
}

.person-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--shadow);
}

.person-card figure {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.person-card .photo-wrap {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #1c1814;
}

.person-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.person-card figcaption {
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--border);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.person-card .person-name {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.person-card .person-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.person-card .person-years {
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.person-card .person-quote {
  margin: 0.75rem 0 0.5rem;
  padding: 0.45rem 0.65rem;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 2px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
  font-style: italic;
}

.wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s;
}

.wiki-link:hover {
  color: var(--accent);
  opacity: 1;
}

.wiki-link svg {
  display: block;
  flex-shrink: 0;
}

/* Collective memorial card — slightly softer border, italic name */
.person-card--collective {
  border-style: dashed;
}

.person-card--collective .person-name {
  font-style: italic;
  color: var(--text-muted);
}

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem clamp(1rem, 5vw, 3rem);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-contact a {
  color: var(--text-muted);
}

.footer-contact a:hover {
  color: var(--accent);
}
