/* Hold the Rail — site-v1 stylesheet
   Palette and type carried over from the live CodeRick site (Nunito, purple/gold/cream),
   with accessibility and polish fixes applied. */

:root {
  --purple-950: #1e1533;
  --purple-900: #2a1c47;
  --purple-800: #3b2566;
  --purple-700: #4c2d8f;
  --purple-600: #5d3ab5;
  --purple-500: #7c5cd6;
  --purple-100: #ece7f9;
  --purple-50: #f5f2fc;
  --gold: #d4a843;
  --gold-deep: #a87f1f;
  --cream: #fdfbf4;
  --cream-warm: #f7f1e6;
  --ink: #2b2244;
  --ink-soft: #5a5470;
  --white: #ffffff;
  --card-lilac: #eee9fb;
  --card-peach: #faeed7;
  --card-sky: #ddedfa;
  --card-mint: #ddf2e4;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 6px rgba(43, 34, 68, 0.06), 0 12px 28px rgba(43, 34, 68, 0.08);
  --focus-ring: 3px solid #ffb703;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

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

/* ---------- Accessibility helpers ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--purple-900);
  color: var(--white);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.emoji { display: inline-block; }

/* ---------- Header ---------- */

.site-header {
  background: var(--cream);
  border-bottom: 1px solid rgba(43, 34, 68, 0.07);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.05;
}
.brand-bar {
  width: 6px;
  align-self: stretch;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
}
.brand-text { padding-left: 0.35rem; }
.brand-top {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.brand-main {
  display: block;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--purple-800);
}
.brand-spark { color: var(--gold); font-size: 1rem; margin-left: 0.2rem; }

.site-nav { display: flex; gap: 0.4rem; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--ink);
}
.nav-link:hover { background: var(--purple-100); }
.nav-link[aria-current="page"] {
  background: var(--purple-700);
  color: var(--white);
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  background: linear-gradient(115deg, var(--purple-900) 0%, var(--purple-700) 55%, var(--purple-600) 100%);
  color: var(--white);
  overflow: hidden;
  padding: 4.5rem 1.25rem 6.5rem;
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f3ecff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 900;
  margin: 0.9rem 0 1rem;
  line-height: 1.08;
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #efe9fb; /* ≥ 4.5:1 on purple-700 */
  max-width: 34rem;
  margin: 0 0 1.8rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn-gold {
  background: linear-gradient(180deg, #e6bd58, var(--gold));
  color: #3a2c05;
  box-shadow: 0 6px 18px rgba(212, 168, 67, 0.35);
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }
.btn-purple {
  background: var(--purple-700);
  color: var(--white);
}
.btn-purple:hover { background: var(--purple-600); }

/* Decorative rail card fills the previously-empty right half */
.hero-art { position: relative; display: grid; place-items: center; min-height: 260px; }
.rail-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 2rem 2.4rem;
  display: grid;
  gap: 1.1rem;
  transform: rotate(-2deg);
}
.rail-line {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 1.6rem;
}
.rail-line .bar {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--gold), rgba(212, 168, 67, 0.25));
}
.rail-line:nth-child(1) .bar { width: 150px; }
.rail-line:nth-child(2) .bar { width: 110px; }
.rail-line:nth-child(3) .bar { width: 180px; }

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 70px; display: block; }

/* ---------- Page hero (calendar / photos) ---------- */

.page-hero {
  background: linear-gradient(115deg, var(--purple-900), var(--purple-600));
  color: var(--white);
  text-align: center;
  padding: 3.5rem 1.25rem 4rem;
}
.page-hero .emoji { font-size: 2.2rem; }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3rem); font-weight: 900; margin: 0.5rem 0 0.8rem; }
.page-hero p { max-width: 38rem; margin: 0 auto; color: #efe9fb; font-size: 1.1rem; }

/* ---------- Sections ---------- */

.section { padding: 4rem 1.25rem; }
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-alt { background: var(--cream-warm); }

.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 900;
  text-align: center;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.section-lede {
  text-align: center;
  color: var(--ink-soft);
  max-width: 42rem;
  margin: 0 auto 2.5rem;
}
.welcome p {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1.15rem;
}

/* Value cards */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}
.value-card {
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.4rem;
  border: 2px solid rgba(43, 34, 68, 0.1);
  box-shadow: var(--shadow-card);
}
.value-card .emoji { font-size: 1.9rem; }
.value-card h3 { margin: 0.7rem 0 0.45rem; font-size: 1.15rem; font-weight: 900; }
.value-card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.value-lilac { background: var(--card-lilac); }
.value-peach { background: var(--card-peach); }
.value-sky { background: var(--card-sky); }
.value-mint { background: var(--card-mint); }

/* Feature cards (calendar / photos pointers) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.4rem;
}
.feature-card {
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-card);
}
.feature-card .emoji { font-size: 2rem; }
.feature-card h3 { font-size: 1.35rem; font-weight: 900; margin: 0.8rem 0 0.5rem; }
.feature-card p { color: var(--ink-soft); margin: 0 0 1.3rem; }
.feature-gold { background: linear-gradient(160deg, #fbf3df, #f7ead0); }
.feature-lilac { background: linear-gradient(160deg, #f1edfb, #e9e3f8); }

/* Quote band */
.quote-band {
  background: linear-gradient(115deg, var(--purple-900), var(--purple-700));
  color: var(--white);
  text-align: center;
  padding: 4rem 1.25rem;
}
.quote-band .emoji { font-size: 2rem; }
.quote-band blockquote {
  margin: 1rem auto 0.8rem;
  max-width: 42rem;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 800;
  line-height: 1.4;
}
.quote-band cite { font-style: normal; color: #d8cdf2; font-weight: 700; }

/* ---------- Calendar page ---------- */

.tip-banner {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  background: var(--card-peach);
  border: 1px solid rgba(168, 127, 31, 0.25);
  border-radius: 14px;
  padding: 0.9rem 1.2rem;
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 0.98rem;
}

.calendar-frame {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 0.8rem;
  max-width: 1240px;
  margin: 0 auto;
}
.calendar-frame iframe {
  width: 100%;
  height: min(78vh, 900px);
  border: 0;
  border-radius: 12px;
}
.tip-banner a {
  color: var(--gold-deep);
  font-weight: 800;
}
.tip-banner a:hover { color: var(--purple-700); }

.section-inner.calendar-wide { max-width: 1240px; }

.calendar-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 1.2rem;
}

/* ---------- Photos page ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}
.filter-btn {
  font: inherit;
  font-weight: 800;
  min-height: 44px;
  padding: 0.45rem 1.3rem;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(43, 34, 68, 0.15);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.filter-btn:hover { background: var(--purple-100); }
.filter-btn[aria-pressed="true"] {
  background: var(--purple-700);
  border-color: var(--purple-700);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}
.gallery-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--purple-100);
  box-shadow: var(--shadow-card);
}
.gallery-card figure { margin: 0; }
.gallery-card img {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--purple-100);
}
.gallery-card figcaption {
  padding: 0.7rem 1rem 0.85rem;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.gallery-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--purple-700);
  background: var(--purple-100);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.7rem;
  white-space: nowrap;
}
.gallery-card.hidden { display: none; }

.placeholder-note {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  background: var(--purple-50);
  border: 1px solid rgba(93, 58, 181, 0.2);
  border-radius: 14px;
  padding: 0.9rem 1.4rem;
  width: fit-content;
  max-width: 100%;
  margin: 2.2rem auto 0;
  font-size: 0.98rem;
}

/* Lightbox */
.photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(94vw, 1100px);
}
.lightbox::backdrop { background: rgba(30, 21, 51, 0.88); }
.lightbox-inner {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.lightbox-inner img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: var(--purple-950);
}
.lightbox-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
}
.lightbox-close, .lightbox-nav {
  font: inherit;
  font-weight: 900;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-pill);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: rgba(30, 21, 51, 0.65);
  color: var(--white);
  font-size: 1.3rem;
}
.lightbox-close:hover { background: var(--purple-700); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 21, 51, 0.55);
  color: var(--white);
  font-size: 1.5rem;
}
.lightbox-nav:hover { background: var(--purple-700); }
.lightbox-prev { left: 0.7rem; }
.lightbox-next { right: 0.7rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--purple-950);
  color: #cfc4ea;
  padding: 2.2rem 1.25rem;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer .brand-top { color: #a99cc9; }
.site-footer .brand-main { color: var(--white); }
.footer-tagline { margin: 0; font-weight: 700; }
.footer-copy { margin: 0; font-size: 0.9rem; color: #a99cc9; }

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero { padding: 3.2rem 1.25rem 5rem; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .header-inner { flex-direction: column; gap: 0.5rem; padding-bottom: 0.6rem; }
  .site-nav { width: 100%; justify-content: center; }
  .nav-link { padding: 0.45rem 0.9rem; }
  .calendar-frame iframe { height: 480px; }
}
