/* Night altar: deep blue-black, warm candlelight, one marigold accent.
   Radius system: pills for buttons, 14px for panels and the frame. */
:root {
  --bg: #0b0d12;
  --bg-2: #12151c;
  --panel: #151922;
  --ink: #ece8e1;
  --muted: #a7a196;
  --line: rgba(236, 232, 225, 0.12);
  --accent: #e8a243;
  --accent-ink: #1d1407;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  background:
    radial-gradient(900px 600px at 72% 20%, rgba(232, 162, 67, 0.10), transparent 65%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.6 Geist, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.bar, main, footer { position: relative; z-index: 1; }

a { color: inherit; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  font: 500 15px Geist, sans-serif; color: var(--accent-ink);
  background: var(--accent); padding: 12px 20px; border-radius: 999px;
  transition: transform .2s cubic-bezier(.16, 1, .3, 1), background .2s;
}
.btn:hover { background: #f0b25d; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: rgba(232, 162, 67, 0.5); background: rgba(232, 162, 67, 0.06); }
.btn:disabled { opacity: .55; cursor: default; }
.link {
  appearance: none; background: none; border: 0; padding: 4px 2px; cursor: pointer;
  font: 400 14px Geist, sans-serif; color: var(--muted); text-decoration: underline;
  text-decoration-color: rgba(167, 161, 150, 0.4); text-underline-offset: 4px;
}
.link:hover { color: var(--ink); text-decoration-color: var(--accent); }
.link:disabled { opacity: .55; cursor: default; }

/* Header */
.bar {
  height: 68px; max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark { font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.bar nav { display: flex; align-items: center; gap: 22px; }
.bar nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 15px; }
.bar nav a:not(.btn):hover { color: var(--ink); }

main { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Hero: text left, altar right */
.hero {
  min-height: calc(100dvh - 68px);
  display: grid; grid-template-columns: 5fr 6fr; gap: 56px; align-items: center;
  padding: 24px 0 72px;
}
.hero-copy h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.04; max-width: 14ch; }
.lede { color: var(--muted); font-size: 19px; max-width: 34ch; margin: 22px 0 32px; }

.altar { position: relative; display: grid; justify-items: center; text-align: center; }
.glow {
  position: absolute; inset: -12% -8% 10%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(232, 162, 67, 0.22), transparent);
  filter: blur(10px);
}
.frame {
  position: relative; margin: 0; width: min(420px, 100%);
  padding: 14px; border-radius: var(--radius);
  background: linear-gradient(160deg, #1d212b, #10131a);
  border: 1px solid rgba(232, 162, 67, 0.35);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 6px rgba(11, 13, 18, 0.9), 0 0 0 7px rgba(232, 162, 67, 0.15);
}
.frame canvas, .frame img { display: block; width: 100%; border-radius: 4px; background: #000; }
.mark {
  position: absolute; right: 22px; bottom: 20px; font-size: 11px; color: rgba(236, 232, 225, 0.7);
  background: rgba(11, 13, 18, 0.55); padding: 2px 8px; border-radius: 999px;
}
.remembered { margin: 4px 0 18px; min-height: 92px; }
.remembered h2 {
  font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 600;
  font-size: 34px; line-height: 1.1; letter-spacing: 0; padding-bottom: 2px;
}
.remembered p { color: var(--muted); max-width: 40ch; margin: 6px auto 0; font-size: 15px; }

/* candles stand on a thin shelf under the frame */
.candles {
  display: flex; align-items: flex-end; gap: 30px; margin-top: 34px; padding: 0 28px 6px;
  border-bottom: 1px solid rgba(232, 162, 67, 0.25);
}
.candles span, .candle span { display: block; }
.candles span {
  width: 10px; height: 30px; border-radius: 3px; position: relative;
  background: linear-gradient(#f3ead9, #cbbd9f);
}
.candles span::after, .candle span::after {
  content: ""; position: absolute; left: 50%; top: -17px; width: 9px; height: 15px; transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 72%, #fff 0 18%, #ffd27a 40%, #f08a24 72%, transparent 74%);
  filter: drop-shadow(0 0 10px rgba(255, 170, 70, 0.9));
  animation: flicker 1.4s ease-in-out infinite alternate;
}
.candles span:nth-child(2) { height: 38px; }
.candles span:nth-child(2)::after { animation-duration: 1.9s; }
.candles span:nth-child(3)::after { animation-duration: 1.1s; }
@keyframes flicker {
  50% { transform: translateX(-50%) scale(0.92, 1.06) rotate(-2deg); }
  to { transform: translateX(-50%) scale(1.04, 0.95) rotate(2deg); }
}

.remembered .credit { font-size: 13px; margin-top: 10px; color: #8f897f; }
.credit a { color: inherit; text-underline-offset: 3px; }

.light { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 4px 0 14px; }
#light-count { color: var(--muted); font-size: 14px; min-width: 9ch; text-align: left; }
.tools { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }

/* the extra candle a visitor lights */
.candles span.new::after { animation: catch 0.9s ease-out, flicker 1.3s 0.9s ease-in-out infinite alternate; }
@keyframes catch { from { opacity: 0; transform: translateX(-50%) scale(0.2); } }

/* Place a photo */
section h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; }
.sub { color: var(--muted); margin: 10px 0 0; max-width: 60ch; }
.place {
  padding: 56px; margin: 24px 0 96px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
}
.place-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 32px; }
.drop {
  min-height: 320px; border-radius: var(--radius); cursor: pointer; overflow: hidden;
  border: 1.5px dashed rgba(232, 162, 67, 0.45); background: rgba(232, 162, 67, 0.04);
  display: grid; place-items: center; text-align: center; transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(232, 162, 67, 0.08); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.drop img { width: 100%; height: 100%; max-height: 420px; object-fit: contain; }
.drop-text { display: grid; gap: 4px; color: var(--muted); }
.drop-text i { font-size: 34px; color: var(--accent); margin-bottom: 6px; }
.drop-text strong { color: var(--ink); font-weight: 500; font-size: 18px; }

.fields { display: grid; gap: 8px; align-content: start; }
.fields label { font-weight: 500; margin-top: 10px; }
.fields label:first-child { margin-top: 0; }
.opt { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 6px; }
input[type=text], textarea {
  width: 100%; background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font: inherit; resize: vertical;
}
input::placeholder, textarea::placeholder { color: #8a8478; }
input[type=text]:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.fields .check { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--muted); margin-top: 14px; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; }
.fields .btn { justify-self: start; margin-top: 18px; }
.error { color: #ff9b7a; margin: 6px 0 0; }

.working { margin-top: 32px; display: grid; justify-items: center; text-align: center; }
.candle { height: 64px; display: grid; place-items: end center; margin: 12px 0 22px; }
.candle span { width: 16px; height: 46px; border-radius: 4px; position: relative; background: linear-gradient(#f3ead9, #cbbd9f); }
.candle span::after { width: 15px; height: 26px; top: -28px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; text-align: left; }
.steps li { color: var(--muted); padding-left: 30px; position: relative; transition: color .3s; }
.steps li::before { content: ""; position: absolute; left: 6px; top: 9px; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--muted); }
.steps li.active { color: var(--ink); }
.steps li.active::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent); }
.steps li.done::before { background: var(--muted); }

/* Gallery: horizontal strip */
.gallery-section { margin: 24px 0 96px; }
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 220px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 28px 2px 12px; margin-top: 4px;
}
.gallery button {
  all: unset; cursor: pointer; scroll-snap-align: start; display: grid; gap: 10px;
}
.gallery img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--line); filter: saturate(0.9) brightness(0.92);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), filter .35s, border-color .35s;
}
.gallery button:hover img, .gallery button:focus-visible img {
  transform: translateY(-4px); filter: none; border-color: rgba(232, 162, 67, 0.5);
}
.gallery span { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 20px; line-height: 1.2; }

/* How it works */
.how { margin-bottom: 96px; }
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin-top: 28px; }
.how-grid > div { padding: 22px 0; border-top: 1px solid var(--line); }
.how-grid h3 { font-size: 20px; color: var(--accent); }
.how-grid p { color: var(--muted); margin: 6px 0 0; max-width: 46ch; }
.limits { margin-top: 40px; padding: 24px 28px; border-radius: var(--radius); border: 1px solid var(--line); max-width: 720px; }
.limits h3 { font-size: 18px; }
.limits ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.limits li { margin: 4px 0; }

footer { max-width: 1200px; margin: 0 auto; padding: 28px 24px 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* Mobile */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding-top: 32px; }
  .hero-copy { text-align: left; }
  .place { padding: 28px 20px; }
  .place-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .bar nav a:not(.btn) { display: none; }
}

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