/* Calder Veritas Grid Walls — shared stylesheet */
:root {
  --ink: #1a2b33;
  --paper: #faf7f0;
  --paper-dim: #f1ece1;
  --teal: #0e7c6b;
  --teal-dark: #0a5c50;
  --gold: #c9a227;
  --gold-soft: #f5e9c8;
  --muted: #67707a;
  --line: #e3dccb;
  --card: #ffffff;
  --radius: 12px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: bold; color: var(--ink); text-decoration: none; }
.brand small { display: block; font-family: var(--sans); font-weight: normal; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.nav a { margin-left: 18px; color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--teal-dark); text-decoration: underline; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 { font-family: var(--serif); font-size: 2.6rem; margin: 0 0 12px; line-height: 1.2; }
.hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  background: var(--teal); color: #fff; text-decoration: none; font-weight: 600;
  border: 2px solid var(--teal); cursor: pointer; font-size: 1rem;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn.ghost { background: transparent; color: var(--teal-dark); }
.btn.ghost:hover { background: var(--paper-dim); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #3d2f04; }
.btn.gold:hover { background: #b08d1f; border-color: #b08d1f; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- stat strip ---------- */
.stats { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 8px 0 40px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 26px; text-align: center; min-width: 150px; }
.stat .num { font-family: var(--serif); font-size: 1.9rem; font-weight: bold; color: var(--teal-dark); }
.stat .lbl { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- wall cards (landing) ---------- */
.wall-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 24px 0 56px; }
.wall-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-decoration: none; color: var(--ink); display: block; }
.wall-card:hover { border-color: var(--teal); box-shadow: 0 6px 24px rgba(14,124,107,0.12); }
.wall-card h2 { font-family: var(--serif); margin: 0 0 8px; font-size: 1.45rem; }
.wall-card .price { display: inline-block; font-weight: 700; color: var(--teal-dark); background: #e2f2ee; border-radius: 999px; padding: 2px 12px; font-size: 0.85rem; margin-bottom: 10px; }
.wall-card p { color: var(--muted); margin: 0 0 14px; font-size: 0.96rem; }
.wall-card .go { font-weight: 600; color: var(--teal-dark); }

/* ---------- sections ---------- */
section.block { padding: 36px 0; }
section.block h2 { font-family: var(--serif); font-size: 1.8rem; margin: 0 0 10px; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 18px; }
.how .step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.how .step .n { font-family: var(--serif); font-size: 1.6rem; color: var(--gold); font-weight: bold; }
.how .step h3 { margin: 6px 0 6px; font-size: 1.05rem; }
.how .step p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- the grid ---------- */
.grid-shell { margin: 28px 0; }
.grid-meta { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.grid-meta .count { font-weight: 600; }
.grid-meta .hint { color: var(--muted); font-size: 0.9rem; }
.grid {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  background-color: #fff; border: 1px solid var(--line); border-radius: 8px;
  background-image:
    linear-gradient(rgba(26,43,51,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,43,51,0.055) 1px, transparent 1px);
  background-size: 1% 1%;
  cursor: crosshair; overflow: hidden;
}
.tile {
  position: absolute; border: 0; padding: 0; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55), inset 0 0 0 2px rgba(26,43,51,0.18);
  border-radius: 1px;
}
.tile:hover { filter: brightness(1.12); z-index: 5; }
.tile.flash { animation: tileflash 1.6s ease-in-out 3; z-index: 6; }
@keyframes tileflash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.9); }
}
.tile.golden { box-shadow: inset 0 0 0 2px #fff8, 0 0 10px #c9a227aa; }
.tile .star { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: clamp(6px, 1.2vw, 14px); text-shadow: 0 1px 2px rgba(0,0,0,0.5); pointer-events: none; }

/* ---------- recent tiles ---------- */
.recent { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.recent li a {
  display: inline-block; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; font-size: 0.88rem; color: var(--ink); text-decoration: none;
}
.recent li a:hover { border-color: var(--teal); }

/* ---------- claim box ---------- */
.claim { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 30px; margin: 40px 0; }
.claim h2 { font-family: var(--serif); margin-top: 0; }
.claim ol { margin: 12px 0 20px; padding-left: 22px; }
.claim ol li { margin-bottom: 8px; }
.claim .fine { color: var(--muted); font-size: 0.88rem; margin-top: 14px; }
.coords-picked { font-weight: 700; color: var(--teal-dark); }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(26,43,51,0.55);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius); max-width: 460px; width: 100%; padding: 30px; position: relative; }
.modal h3 { font-family: var(--serif); margin: 0 0 8px; font-size: 1.35rem; }
.modal .tag { display: inline-block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.modal p { color: var(--ink); }
.modal .ext-link { color: var(--teal-dark); font-weight: 600; word-break: break-all; }
.modal .close-x { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }
.share-row { display: flex; gap: 8px; margin-top: 16px; }
.share-row input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.85rem; color: var(--muted); }
.envelope { background: var(--paper-dim); border: 1px dashed var(--gold); border-radius: 8px; padding: 16px; font-family: var(--serif); font-style: italic; }
.countdown { font-weight: 700; color: var(--teal-dark); }

/* ---------- press ---------- */
.press-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0; }
.press-facts .fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.press-facts .fact strong { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 4px; }
.angle { border-left: 4px solid var(--gold); padding: 4px 0 4px 16px; margin: 18px 0; }
.angle h3 { margin: 0 0 4px; font-family: var(--serif); }

/* ---------- faq / footer ---------- */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
footer.site-footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 28px 0 40px; color: var(--muted); font-size: 0.88rem; }
footer.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer.site-footer a { color: var(--muted); }
.updates-wrap { margin-top: 18px; }
.updates-form { max-width: 420px; }
.updates-form label { display: block; margin-bottom: 8px; }
.updates-row { display: flex; gap: 8px; }
.updates-row input[type="email"] { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: inherit; font-size: 0.95rem; }
.updates-row button { padding: 9px 18px; border: none; border-radius: 8px; background: var(--accent, #2f6fed); color: #fff; font-weight: 600; cursor: pointer; }
.updates-row button:disabled { opacity: 0.6; cursor: default; }
.updates-msg { display: block; margin-top: 8px; min-height: 1.2em; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.9rem; }
  .nav a { margin-left: 12px; font-size: 0.88rem; }
}

/* ---------- spotlight strip (paid boosts) ---------- */
.spotlight { margin: 26px 0 6px; }
.spotlight h3 { font-family: Georgia, serif; margin: 0 0 10px; font-size: 1.25rem; }
.spot-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; }
.spot-card {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  background: var(--card); border: 2px solid var(--gold); border-radius: var(--radius);
  padding: 10px 14px; cursor: pointer; font-family: var(--sans); font-size: 0.9rem;
  box-shadow: 0 2px 12px rgba(201,162,39,0.25);
}
.spot-card:hover { box-shadow: 0 4px 18px rgba(201,162,39,0.45); }
.spot-swatch { width: 26px; height: 26px; border-radius: 6px; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(26,43,51,0.2); }
.spot-label { font-weight: 600; color: var(--ink); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot-until { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.spot-empty { color: var(--muted); font-style: italic; margin: 0 0 10px; }
.spot-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.spot-cta .btn { padding: 9px 20px; font-size: 0.92rem; }
.spot-fine { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }

/* ---------- sort toggle ---------- */
.sort-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.sort-lbl { margin-right: 2px; }
.sort-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 5px 14px; font-size: 0.85rem; cursor: pointer;
}
.sort-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }

/* ---------- likes ---------- */
.like-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; }
.like-btn {
  border: 2px solid #e0a3a3; background: #fff; color: #c0392b;
  border-radius: 999px; padding: 7px 18px; font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.like-btn:hover { background: #fdf0f0; }
.like-btn.liked { background: #c0392b; border-color: #c0392b; color: #fff; cursor: default; }
.like-hint { font-size: 0.82rem; color: var(--muted); }
/* highly-loved tiles glow on the grid */
.tile.loved { box-shadow: inset 0 0 0 2px #fff8, 0 0 12px 3px rgba(192,57,43,0.55); z-index: 4; }

/* ---------- gifts & prayers ---------- */
.gift-line { background: var(--gold-soft); border-radius: 8px; padding: 10px 14px; font-size: 0.95rem; }
.prayer-anon { color: var(--muted); font-size: 0.88rem; font-style: italic; }

/* ---------- love packs ---------- */
.love-wrap { margin: 14px 0 4px; }
.love-count { font-weight: 700; font-size: 1.05rem; color: #c0392b; }
.love-panel { background: var(--paper-dim); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-top: 10px; }
.love-panel p { margin: 0 0 10px; font-size: 0.93rem; }
.love-panel .btn { padding: 9px 20px; font-size: 0.92rem; }
