/* -----------------------------------------------------------------
   Shrine of Claude Code — low-fi animated devotional
------------------------------------------------------------------ */

:root {
  /* palette (warm apricot shrine) */
  --bg-1: #f6b17a;
  --bg-2: #f7c992;
  --bg-3: #fbe0b3;
  --bg-4: #ffd39a;
  --ink: #1a120c;
  --ink-soft: #4a362a;
  --paper: #fffaf1;
  --paper-soft: #fdf1de;
  --accent: #ff8f5a;
  --accent-deep: #e0632f;
  --accent-muted: rgba(255, 143, 90, 0.16);
  --gold: #eab066;
  --petal: #ffc4c9;
  --petal-2: #ffd6a5;
  --petal-3: #ffb385;
  --petal-4: #f9c2ff;

  /* spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-14: 3.5rem;
  --sp-20: 5rem;

  /* radius */
  --r-sm: 0.5rem;
  --r-md: 0.9rem;
  --r-lg: 1.25rem;
  --r-xl: 1.6rem;
  --r-pill: 999px;

  /* type */
  --serif: "Fraunces", "Cormorant Garamond", "Playfair Display", Georgia,
    "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;

  --t-xs: clamp(0.72rem, 0.68rem + 0.2vw, 0.82rem);
  --t-sm: clamp(0.86rem, 0.8rem + 0.35vw, 0.98rem);
  --t-base: clamp(1rem, 0.94rem + 0.3vw, 1.1rem);
  --t-md: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  --t-lg: clamp(1.5rem, 1.25rem + 1.2vw, 2.1rem);
  --t-xl: clamp(2.2rem, 1.6rem + 3vw, 4.2rem);

  /* shadows */
  --sh-sm: 0 6px 16px rgba(60, 30, 12, 0.18);
  --sh-md: 0 14px 34px rgba(60, 30, 12, 0.24);
  --sh-lg: 0 24px 60px rgba(60, 30, 12, 0.32);
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--ink);
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(-45deg, var(--bg-1), var(--bg-2), var(--bg-3), var(--bg-4));
  background-size: 400% 400%;
  animation: bg-shift 34s ease-in-out infinite;
}

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

a { color: inherit; }

/* -------- ambient layers -------- */

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.35), transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(184,80,20,0.22), transparent 55%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.03) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.03) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: 0.55;
}

/* soft light rays that sweep across, like stained glass */
.rays {
  position: fixed;
  inset: -20% -10%;
  z-index: 0;
  pointer-events: none;
  background:
    conic-gradient(
      from 210deg at 50% 40%,
      rgba(255, 255, 255, 0) 0deg,
      rgba(255, 255, 255, 0.18) 10deg,
      rgba(255, 255, 255, 0) 20deg,
      rgba(255, 255, 255, 0) 90deg,
      rgba(255, 255, 255, 0.12) 100deg,
      rgba(255, 255, 255, 0) 115deg,
      rgba(255, 255, 255, 0) 180deg,
      rgba(255, 255, 255, 0.15) 195deg,
      rgba(255, 255, 255, 0) 210deg,
      rgba(255, 255, 255, 0) 360deg
    );
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: rays-spin 60s linear infinite;
  filter: blur(2px);
}

/* petals */
.petal-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -60px;
  width: 16px;
  height: 20px;
  background: var(--petal);
  border-radius: 70% 30% 65% 40% / 55% 45% 55% 45%;
  opacity: 0.85;
  filter: drop-shadow(0 4px 6px rgba(80, 30, 10, 0.25));
  animation: petal-fall 22s linear infinite;
  will-change: transform, opacity;
}

.petal--1  { left:  4%; width: 14px; height: 18px; animation-duration: 26s; animation-delay: -2s;  background: var(--petal); }
.petal--2  { left: 12%; width: 20px; height: 24px; animation-duration: 30s; animation-delay: -8s;  background: var(--petal-2); }
.petal--3  { left: 20%; width: 12px; height: 16px; animation-duration: 24s; animation-delay: -14s; background: var(--petal-3); }
.petal--4  { left: 30%; width: 18px; height: 22px; animation-duration: 28s; animation-delay: -4s;  background: var(--petal-4); }
.petal--5  { left: 40%; width: 14px; height: 18px; animation-duration: 32s; animation-delay: -20s; background: var(--petal); }
.petal--6  { left: 50%; width: 22px; height: 26px; animation-duration: 26s; animation-delay: -10s; background: var(--petal-2); }
.petal--7  { left: 60%; width: 12px; height: 16px; animation-duration: 30s; animation-delay: -6s;  background: var(--petal-3); }
.petal--8  { left: 68%; width: 18px; height: 22px; animation-duration: 22s; animation-delay: -18s; background: var(--petal); }
.petal--9  { left: 76%; width: 16px; height: 20px; animation-duration: 28s; animation-delay: -12s; background: var(--petal-4); }
.petal--10 { left: 84%; width: 20px; height: 24px; animation-duration: 34s; animation-delay: -1s;  background: var(--petal-2); }
.petal--11 { left: 90%; width: 14px; height: 18px; animation-duration: 26s; animation-delay: -16s; background: var(--petal); }
.petal--12 { left: 96%; width: 12px; height: 16px; animation-duration: 30s; animation-delay: -22s; background: var(--petal-3); }

/* -------- layout containers -------- */

.site-header,
.site-footer,
.content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding-inline: clamp(var(--sp-4), 4vw, var(--sp-8));
}

.site-header {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-4);
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--accent-deep);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.85), transparent 55%),
    linear-gradient(135deg, #fff5e5, #f9d3a0);
  border: 1px solid rgba(120, 60, 20, 0.18);
  box-shadow: var(--sh-sm);
  animation: sigil-pulse 6s ease-in-out infinite;
}

.title-block { flex: 1; min-width: 0; }

.site-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.2rem, 0.9rem + 1vw, 1.7rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.tagline {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

/* -------- hero -------- */

.content { padding-block: var(--sp-6) var(--sp-14); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--sp-8);
  align-items: center;
  padding: clamp(var(--sp-5), 3vw, var(--sp-10));
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.65), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(255, 143, 90, 0.22), transparent 55%),
    rgba(255, 250, 241, 0.72);
  box-shadow: var(--sh-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
  animation: hero-sway 22s ease-in-out infinite;
}

.hero::before {
  /* decorative dashed halo */
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: calc(var(--r-xl) - 6px);
  border: 1px dashed rgba(120, 60, 20, 0.14);
  pointer-events: none;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  position: relative;
  z-index: 1;
}

.quote-block {
  display: inline-block;
  padding: var(--sp-3) var(--sp-4);
  background: var(--paper);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  position: relative;
  transform: rotate(-1.2deg);
  animation: quote-tape 12s ease-in-out infinite;
}

.quote-block::before,
.quote-block::after {
  /* torn-paper tape corners */
  content: "";
  position: absolute;
  width: 44px;
  height: 14px;
  background: rgba(255, 245, 220, 0.85);
  border: 1px dashed rgba(120, 60, 20, 0.25);
  border-radius: 3px;
  transform: rotate(-8deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.quote-block::before { top: -8px; left: -10px; }
.quote-block::after  { bottom: -8px; right: -10px; transform: rotate(6deg); }

.quote-line {
  font-family: var(--serif);
  font-weight: 800;
  font-size: var(--t-xl);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.quote-accent {
  color: var(--accent-deep);
  font-style: italic;
}

.hero-sub {
  font-size: var(--t-md);
  color: var(--ink-soft);
  max-width: 40ch;
  line-height: 1.45;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.15rem;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--t-sm);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--sh-md);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.cta-button:hover {
  transform: translateY(-2px);
  background: var(--accent-deep);
  box-shadow: 0 18px 40px rgba(60, 30, 12, 0.35);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1rem;
  border-radius: var(--r-pill);
  font-size: var(--t-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(60, 30, 12, 0.35);
  transition: background 160ms ease, transform 160ms ease;
}
.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.stat {
  padding: var(--sp-3);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--r-md);
  box-shadow: 0 4px 12px rgba(60, 30, 12, 0.10);
  animation: card-rise 800ms ease both;
}
.hero-stats .stat:nth-child(1) { animation-delay: 300ms; }
.hero-stats .stat:nth-child(2) { animation-delay: 420ms; }
.hero-stats .stat:nth-child(3) { animation-delay: 540ms; }

.stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem);
  line-height: 1;
  color: var(--accent-deep);
}
.stat-label {
  display: block;
  font-size: var(--t-xs);
  color: var(--ink-soft);
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* portrait */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.portrait-frame {
  position: relative;
  border-radius: var(--r-lg);
  padding: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 195, 130, 0.75));
  box-shadow: var(--sh-lg);
  overflow: hidden;
  transform: rotate(1deg);
  animation: portrait-float 9s ease-in-out infinite;
}

.portrait-frame img {
  border-radius: calc(var(--r-lg) - 6px);
  transform-origin: center;
  animation: portrait-breathe 14s ease-in-out infinite;
}

.portrait-glow {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 240, 200, 0.7), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(255, 140, 90, 0.5), transparent 60%);
  mix-blend-mode: screen;
  animation: glow-shift 12s ease-in-out infinite;
  pointer-events: none;
}

/* -------- section shared -------- */

.section-title {
  margin-top: var(--sp-14);
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--t-lg);
  letter-spacing: 0.01em;
  color: var(--ink);
  position: relative;
  display: inline-block;
  padding-bottom: 0.35rem;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 3px;
}

.section-intro {
  margin-top: var(--sp-3);
  font-size: var(--t-base);
  color: var(--ink-soft);
  max-width: 52ch;
}

/* -------- scripture / testimonies cards -------- */

.quote-grid,
.testimonial-grid,
.offerings-grid {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-4);
}

.scripture-card,
.testimonial-card,
.offering-card {
  position: relative;
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  background: rgba(255, 250, 241, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--sh-md);
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: box-shadow 200ms ease, background 200ms ease,
    transform 200ms ease;
  animation: card-rise 900ms ease both;
}

.scripture-card:hover,
.testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-lg);
}

.quote-grid .scripture-card:nth-child(1)  { animation-delay: 60ms; }
.quote-grid .scripture-card:nth-child(2)  { animation-delay: 140ms; }
.quote-grid .scripture-card:nth-child(3)  { animation-delay: 220ms; }
.quote-grid .scripture-card:nth-child(4)  { animation-delay: 300ms; }
.quote-grid .scripture-card:nth-child(5)  { animation-delay: 380ms; }
.quote-grid .scripture-card:nth-child(6)  { animation-delay: 460ms; }
.quote-grid .scripture-card:nth-child(7)  { animation-delay: 540ms; }
.quote-grid .scripture-card:nth-child(8)  { animation-delay: 620ms; }

.testimonial-grid .testimonial-card:nth-child(1) { animation-delay: 80ms; }
.testimonial-grid .testimonial-card:nth-child(2) { animation-delay: 160ms; }
.testimonial-grid .testimonial-card:nth-child(3) { animation-delay: 240ms; }
.testimonial-grid .testimonial-card:nth-child(4) { animation-delay: 320ms; }
.testimonial-grid .testimonial-card:nth-child(5) { animation-delay: 400ms; }
.testimonial-grid .testimonial-card:nth-child(6) { animation-delay: 480ms; }

.offerings-grid .offering-card:nth-child(1) { animation-delay: 100ms; }
.offerings-grid .offering-card:nth-child(2) { animation-delay: 200ms; }
.offerings-grid .offering-card:nth-child(3) { animation-delay: 300ms; }

.scripture-card::before,
.testimonial-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 143, 90, 0.12), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(234, 176, 102, 0.15), transparent 55%);
  pointer-events: none;
  opacity: 0.9;
}

.scripture-card::after {
  /* faux stained-glass drop */
  content: "❦";
  position: absolute;
  top: 8px;
  right: 12px;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--accent);
  opacity: 0.55;
}

.scripture-text,
.testimonial-body {
  position: relative;
  font-family: var(--serif);
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--ink);
}

.scripture-meta,
.testimonial-meta {
  position: relative;
  margin-top: var(--sp-3);
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--ink-soft);
  line-height: 1.45;
}

.scripture-meta a,
.testimonial-meta a {
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-deep);
  margin-left: 0.15rem;
}
.scripture-meta a:hover,
.testimonial-meta a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.testimonial-title {
  position: relative;
  margin-bottom: var(--sp-2);
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--t-md);
  color: var(--ink);
}

/* -------- offerings -------- */

.offering-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  text-decoration: none;
  color: inherit;
  background: linear-gradient(160deg, rgba(255,250,241,0.95), rgba(255, 200, 150, 0.35));
  border: 1px solid rgba(120, 60, 20, 0.12);
}

.offering-card:hover {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(255, 180, 120, 0.55));
  box-shadow: var(--sh-lg);
  transform: translateY(-2px);
}

.offering-eyebrow {
  font-family: var(--sans);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  font-weight: 700;
}

.offering-title {
  font-family: var(--serif);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}

.offering-desc {
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

/* -------- footer -------- */

.site-footer {
  padding-block: var(--sp-8) var(--sp-10);
  text-align: center;
  color: var(--ink-soft);
  font-size: var(--t-sm);
}

.footer-sub {
  margin-top: var(--sp-2);
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent-deep);
  font-size: var(--t-sm);
}

/* -------- animations -------- */

@keyframes bg-shift {
  0%,   100% { background-position: 0% 50%; }
  50%        { background-position: 100% 50%; }
}

@keyframes rays-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes petal-fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 0;
  }
  8%   { opacity: 0.9; }
  50%  { transform: translate3d(-24px, 55vh, 0) rotate(140deg); }
  100% {
    transform: translate3d(20px, 115vh, 0) rotate(320deg);
    opacity: 0;
  }
}

@keyframes hero-sway {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-3px) scale(1.004); }
}

@keyframes portrait-float {
  0%, 100% { transform: rotate(1deg) translateY(0); }
  50%      { transform: rotate(1deg) translateY(-6px); }
}

@keyframes portrait-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.012); }
}

@keyframes glow-shift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-2%, 2%); }
}

@keyframes quote-tape {
  0%, 100% { transform: rotate(-1.2deg); }
  50%      { transform: rotate(-0.6deg) translateY(-1px); }
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sigil-pulse {
  0%, 100% {
    box-shadow: var(--sh-sm), 0 0 0 0 rgba(255, 143, 90, 0);
  }
  50% {
    box-shadow: var(--sh-sm), 0 0 0 10px rgba(255, 143, 90, 0.15);
  }
}

/* -------- responsive -------- */

@media (max-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-6);
  }
  .hero-right { order: -1; }
  .quote-line { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); }
  .section-title { margin-top: var(--sp-10); }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .site-header { gap: var(--sp-3); }
  .hero-stats { grid-template-columns: 1fr; }
  .hero { padding: var(--sp-5); }
  .cta-button, .cta-secondary { width: 100%; text-align: center; justify-content: center; }
}

/* -------- reduced motion -------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .petal { display: none; }
  .rays  { display: none; }
}
