/*
Theme Name: JP Quinlan Memorial
Theme URI: 
Author: 
Description: A memorial theme for John (JP) Quinlan — celebrating a life well lived.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: jp-memorial
*/

/* ============================================================
   FONTS & VARIABLES
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Lato:wght@300;400;700&family=Dancing+Script:wght@500;700&display=swap');

:root {
  --color-bg:         #0f0e0c;
  --color-surface:    #1a1814;
  --color-surface2:   #242018;
  --color-border:     #3a3428;
  --color-gold:       #c9a84c;
  --color-gold-light: #e8c97a;
  --color-gold-dim:   #7a6530;
  --color-cream:      #f5ede0;
  --color-muted:      #9a8e7a;
  --color-white:      #ffffff;
  --color-accent:     #7eb8a4;   /* a warm sage/teal — life, memory */

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Lato', sans-serif;
  --font-script:  'Dancing Script', cursive;

  --radius: 4px;
  --transition: 0.3s ease;
  --max-width: 1100px;
  --section-pad: 80px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-gold-light); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-cream);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

.script { font-family: var(--font-script); color: var(--color-gold-light); }
.muted  { color: var(--color-muted); font-size: 0.9rem; }

p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--section-pad) 0; }
.section--dark { background: var(--color-surface); }
.section--darker { background: var(--color-bg); }

/* ============================================================
   ORNAMENTAL DIVIDER
   ============================================================ */
.ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0;
  color: var(--color-gold-dim);
}
.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gold-dim), transparent);
}
.ornament-icon { font-size: 1.1rem; }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 14, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-gold-light);
  letter-spacing: 0.02em;
}
.site-logo span { color: var(--color-muted); font-size: 0.8rem; font-style: normal; display: block; font-family: var(--font-body); }

.site-nav { display: flex; gap: 28px; list-style: none; }
.site-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 400;
  transition: color var(--transition);
}
.site-nav a:hover { color: var(--color-gold-light); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-cream);
  font-size: 1.5rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/hero-placeholder.jpg');
  background-size: cover;
  background-position: center top;
  filter: brightness(0.28) sepia(0.3);
  transform: scale(1.04);
  animation: slowZoom 20s ease-in-out infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1.04); }
  to   { transform: scale(1.10); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(15,14,12,0.7) 100%);
}

.hero-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--color-bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: heroFadeIn 1.6s ease both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-dates {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 20px;
}

.hero-name {
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-style: italic;
  color: var(--color-cream);
  text-shadow: 0 2px 40px rgba(0,0,0,0.8);
  margin-bottom: 6px;
}

.hero-nickname {
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--color-gold-light);
  margin-bottom: 28px;
}

.hero-quote {
  max-width: 540px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
  font-style: italic;
  color: rgba(245, 237, 224, 0.75);
  line-height: 1.8;
}

.btn {
  display: inline-block;
  padding: 13px 36px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-gold {
  background: var(--color-gold);
  color: var(--color-bg);
}
.btn-gold:hover {
  background: var(--color-gold-light);
  color: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,76,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-gold);
  border: 1px solid var(--color-gold-dim);
  margin-left: 12px;
}
.btn-outline:hover {
  background: rgba(201,168,76,0.1);
  border-color: var(--color-gold);
  color: var(--color-gold-light);
  transform: translateY(-2px);
}

/* ============================================================
   ABOUT / LIFE SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-photo {
  position: relative;
}

.about-photo img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  filter: sepia(0.15) brightness(0.9);
  transition: filter var(--transition);
}
.about-photo:hover img { filter: sepia(0) brightness(1); }

.about-photo-caption {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  padding: 10px 16px;
  font-family: var(--font-script);
  color: var(--color-gold-light);
  font-size: 1.1rem;
  border-radius: var(--radius);
}

.about-label {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 12px;
}

.about-text { color: rgba(245, 237, 224, 0.82); }

/* ============================================================
   MEMORY TILES / GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: sepia(0.2) brightness(0.8);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: sepia(0) brightness(1);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,14,12,0.0);
  transition: background var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.gallery-item:hover .gallery-item-overlay {
  background: rgba(15,14,12,0.5);
}

.gallery-item-label {
  color: var(--color-cream);
  font-family: var(--font-script);
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition);
}

.gallery-item:hover .gallery-item-label {
  opacity: 1;
  transform: translateY(0);
}

.gallery-placeholder {
  width: 100%; height: 100%;
  background: var(--color-surface2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  gap: 8px;
  transition: background var(--transition);
}
.gallery-item:hover .gallery-placeholder { background: var(--color-surface); }

.gallery-placeholder-icon { font-size: 2rem; opacity: 0.4; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--color-gold-dim) 10%, var(--color-gold-dim) 90%, transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 3px var(--color-gold-dim);
}

.timeline-year {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 4px;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-cream);
  margin-bottom: 4px;
}

.timeline-desc {
  color: var(--color-muted);
  font-size: 0.92rem;
}

/* ============================================================
   STORIES SECTION (plugin output)
   ============================================================ */
.stories-section { background: var(--color-surface); }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .section-label {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 10px;
}

/* ============================================================
   CANDLE / TRIBUTE BAR
   ============================================================ */
.tribute-bar {
  background: var(--color-surface2);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 40px 0;
  text-align: center;
}

.tribute-candles {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.candle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.candle-flame {
  font-size: 2rem;
  animation: flicker 2s ease-in-out infinite alternate;
  display: block;
}

@keyframes flicker {
  0%   { transform: rotate(-1deg) scale(1);   filter: brightness(1); }
  25%  { transform: rotate(1deg) scale(1.04); filter: brightness(1.1); }
  50%  { transform: rotate(-0.5deg) scale(0.98); }
  75%  { transform: rotate(1.5deg) scale(1.03); filter: brightness(0.95); }
  100% { transform: rotate(0deg) scale(1.05); filter: brightness(1.15); }
}

.candle:nth-child(2) .candle-flame { animation-delay: 0.3s; }
.candle:nth-child(3) .candle-flame { animation-delay: 0.7s; }
.candle:nth-child(4) .candle-flame { animation-delay: 0.15s; }
.candle:nth-child(5) .candle-flame { animation-delay: 0.55s; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0a0908;
  border-top: 1px solid var(--color-border);
  padding: 56px 0 32px;
  text-align: center;
}

.footer-name {
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: var(--color-gold-light);
  margin-bottom: 8px;
}

.footer-dates {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 24px;
}

.footer-verse {
  max-width: 480px;
  margin: 0 auto 32px;
  font-style: italic;
  color: rgba(245,237,224,0.5);
  font-size: 0.9rem;
  line-height: 1.9;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  font-size: 0.78rem;
  color: var(--color-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --section-pad: 56px; }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-photo-caption { bottom: 8px; right: 8px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .site-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(15,14,12,0.97); padding: 24px; gap: 16px; border-bottom: 1px solid var(--color-border); }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }

  .tribute-candles { gap: 20px; }

  .btn-outline { margin-left: 0; margin-top: 10px; }
}

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