/* ============================================================
   Rock Land · style.css
   A cave: dark and sparkly. Mobile first.
   Colours: cave browns and charcoal, cream text, gem accents
   from the logo (red, blue, green, purple, yellow).
   ============================================================ */

:root {
  --cave: #1c1512;          /* deepest cave wall */
  --cave-2: #271d18;        /* lighter wall */
  --cave-3: #35271f;        /* panels and cards */
  --edge: rgba(245, 197, 66, .32);
  --ink: #f4e8d4;           /* cream text */
  --ink-dim: #cfbda2;
  --gold: #f5c542;
  --red: #e8484f;
  --blue: #4a8df8;
  --green: #35b96f;
  --purple: #a862f5;
  --torch: rgba(255, 176, 84, .42);   /* torchlight glow */
  --radius: 22px;
  --font-head: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.45;
  background:
    radial-gradient(55% 38% at 18% 8%, rgba(255, 150, 60, .20), transparent 70%),
    radial-gradient(45% 30% at 88% 28%, rgba(140, 90, 220, .16), transparent 70%),
    radial-gradient(60% 40% at 30% 70%, rgba(60, 130, 230, .10), transparent 70%),
    radial-gradient(70% 45% at 60% 100%, rgba(255, 120, 40, .14), transparent 70%),
    var(--cave);
}

.wrap { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 0 16px 48px; }

a { color: var(--gold); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 3px;
}

h1, h2, h3, .name, .price, .btn, .chip { font-family: var(--font-head); }
h2 { font-weight: 900; font-size: clamp(1.45rem, 5.5vw, 2rem); line-height: 1.15; margin: 0 0 8px; }
p { margin: 8px 0; }
.muted { color: var(--ink-dim); }
.small { font-size: .95rem; }
.label { text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; color: var(--gold); font-weight: 900; }

/* ---------- header ---------- */
.hero { text-align: center; padding-top: 22px; }
.logo {
  width: min(62vw, 250px); height: auto; display: block; margin: 0 auto;
  border-radius: 28px; border: 4px solid var(--gold);
  box-shadow: 0 0 36px var(--torch), 0 0 90px rgba(255, 150, 60, .25);
}
.logo-small { width: 64px; border-radius: 14px; border-width: 3px; box-shadow: 0 0 18px var(--torch); }
.headline {
  font-weight: 900; font-size: clamp(2.1rem, 9vw, 3.6rem); line-height: 1.1; margin: 20px 0 6px;
  color: var(--gold);
  text-shadow: 0 3px 0 #5a3b12, 0 0 28px rgba(245, 197, 66, .45);
}
.pitch { color: var(--ink-dim); font-weight: 800; letter-spacing: .5px; margin: 0 0 14px; }

.nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: var(--cave-3); color: var(--ink); text-decoration: none; font-weight: 800;
  border: 2px solid var(--edge);
}
.chip:hover { border-color: var(--gold); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; }

section { margin-top: 38px; }

/* ---------- rock photo, lit like torchlight on a cave wall ---------- */
.photo {
  --size: 160px;
  position: relative; width: var(--size); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  margin: 0 auto; background: #1a120e; flex: none;
  box-shadow: 0 0 0 5px rgba(245, 197, 66, .55), 0 0 28px 6px var(--torch), 0 0 70px rgba(255, 150, 60, .3);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.08); }
.photo::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 45%, transparent 46%, rgba(28, 18, 14, .72) 100%);
}
.photo .star {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  font-size: calc(var(--size) * .72); line-height: 1; color: var(--gold);
  text-shadow: 0 0 22px rgba(245, 197, 66, .95), 0 4px 0 #7a5a10;
}
.sold-tag {
  display: inline-block; background: var(--gold); color: #3a2a08; font-weight: 900;
  padding: 4px 14px; border-radius: 999px; letter-spacing: 1.5px; margin-top: 8px;
}
.sold-tag.big { font-size: 1.2rem; }
.price { font-weight: 900; font-size: 1.35rem; color: var(--green); }
.quote { font-style: italic; font-size: 1.15rem; margin: 10px 0; }

/* ---------- star rock ---------- */
.star-card {
  display: grid; gap: 18px; align-items: center; text-align: center; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, var(--cave-3), var(--cave-2));
  border-radius: var(--radius); padding: 22px 18px; border: 2px solid var(--edge);
  box-shadow: 0 0 40px rgba(255, 150, 60, .12) inset;
}
.star-card .name { font-weight: 900; font-size: clamp(1.7rem, 7vw, 2.4rem); margin: 4px 0; }
.star-card .facts-line { font-weight: 800; font-size: 1.25rem; margin: 0; }
.star-card .price { display: inline; }
@media (min-width: 640px) {
  .star-card { grid-template-columns: auto 1fr; text-align: left; padding: 28px; }
  .star-card .photo { margin: 0; }
}

/* ---------- treasure map ---------- */
.map-wrap { background: var(--cave-3); border-radius: var(--radius); padding: 10px; border: 2px solid var(--edge); }
.map-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; }
.map-scroll svg { display: block; min-width: 720px; width: 100%; height: auto; }
.map-hint { display: none; text-align: center; margin-top: 8px; }
@media (max-width: 760px) { .map-hint { display: block; } }
#map text { font-family: var(--font-head); }
.pin { cursor: pointer; }
.pin:focus { outline: none; }
.pin-tail { fill: #5a3b22; }
.pin-ring { fill: #fff7e6; stroke: #5a3b22; stroke-width: 3px; }
.pin:hover .pin-ring, .pin:focus .pin-ring { stroke: var(--gold); stroke-width: 5px; }
.pin-shade { fill: rgba(40, 25, 10, .45); }
.pin-star { fill: var(--gold); font-size: 30px; font-weight: 900; paint-order: stroke; stroke: #5a3b22; stroke-width: 2px; }

/* ---------- all my rocks ---------- */
.rock-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 560px) { .rock-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 820px) { .rock-grid { grid-template-columns: repeat(4, 1fr); } }
.rock-tile {
  display: block; text-align: center; text-decoration: none; color: inherit;
  background: var(--cave-3); border-radius: var(--radius); padding: 18px 10px 16px; border: 2px solid transparent;
}
.rock-tile:hover { border-color: var(--edge); }
.rock-tile .photo { --size: 116px; }
.rock-tile .name { font-weight: 800; margin-top: 12px; line-height: 1.2; }

/* ---------- one rock's card ---------- */
.card {
  text-align: center; background: linear-gradient(180deg, var(--cave-3), var(--cave-2));
  border-radius: var(--radius); padding: 26px 18px; border: 2px solid var(--edge); margin-top: 18px;
}
.card .photo { --size: min(72vw, 320px); }
.card .name { font-weight: 900; font-size: clamp(1.8rem, 8vw, 2.6rem); line-height: 1.1; margin: 16px 0 4px; }
.facts {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; text-align: left;
  max-width: 400px; margin: 18px auto 0;
}
.facts dt { font-weight: 900; color: var(--ink-dim); }
.facts dd { margin: 0; font-weight: 700; }
.facts .price { font-size: 1.5rem; }
.facts small { font-weight: 600; font-size: .9rem; }
.why { margin-top: 18px; }
.delivery { color: var(--ink-dim); font-weight: 700; margin: 18px auto 0; max-width: 520px; }

.btn {
  display: inline-block; font-weight: 900; font-size: 1.3rem; padding: 14px 28px; margin-top: 18px;
  border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #ffd75e, #f0b52a); color: #3a2a08;
  box-shadow: 0 5px 0 #8a6412, 0 0 26px rgba(245, 197, 66, .4);
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #8a6412; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- order form ---------- */
.order {
  margin: 20px auto 0; max-width: 520px; text-align: left;
  background: var(--cave-2); border-radius: 18px; padding: 18px; border: 2px solid var(--edge);
}
.order h2 { margin-top: 0; }
.order label { display: block; font-weight: 800; margin: 14px 0 6px; }
.order input, .order textarea {
  width: 100%; font: inherit; font-size: 18px; padding: 12px 14px; border-radius: 12px;
  border: 2px solid #5a4638; background: var(--cave); color: var(--ink);
}
.order input[readonly] { color: var(--ink-dim); background: #241b17; }
.order .btn { width: 100%; }
.gotcha { display: none; }
.notice {
  padding: 12px 14px; border-radius: 12px; margin: 14px auto 0; max-width: 520px; font-weight: 700;
  background: rgba(245, 197, 66, .12); border: 2px dashed rgba(245, 197, 66, .55);
}
.notice.ok { background: rgba(53, 185, 111, .14); border-color: var(--green); border-style: solid; }
.notice.bad { border-color: var(--red); }

/* ---------- about ---------- */
.about .photo { --size: min(60vw, 260px); }
.about h1 { font-weight: 900; font-size: clamp(2rem, 8vw, 3rem); text-align: center; margin: 18px 0 4px; }
.about .story { max-width: 600px; margin: 0 auto; font-size: 1.2rem; font-weight: 600; line-height: 1.55; }
.about .story p { margin: 0 0 18px; }

/* ---------- dig for rocks ---------- */
.dig { text-align: center; }
.dig h1 { font-weight: 900; font-size: clamp(2rem, 8vw, 3rem); margin: 18px 0 4px; }
#dig {
  display: block; width: 100%; max-width: 560px; aspect-ratio: 1; margin: 16px auto 0;
  border-radius: 18px; touch-action: none; cursor: crosshair;
  border: 5px solid #5a3b22; box-shadow: 0 0 30px var(--torch);
}
#dig-progress { font-weight: 800; margin-top: 12px; }
#dig-message { font-family: var(--font-head); font-weight: 900; font-size: clamp(1.6rem, 7vw, 2.4rem); color: var(--gold); text-shadow: 0 0 24px rgba(245, 197, 66, .6); margin: 12px 0 0; }

/* ---------- footer ---------- */
.foot { margin-top: 48px; text-align: center; color: var(--ink-dim); font-size: .95rem; }
.foot .nav { margin-bottom: 14px; }

/* ---------- sparkles ---------- */
.sparkles { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.sparkle {
  position: absolute; line-height: 1; opacity: 0;
  text-shadow: 0 0 8px currentColor, 0 0 16px currentColor;
  animation: twinkle var(--dur, 4s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(45deg); }
}
.burst-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.spark {
  position: absolute; line-height: 1; transform: translate(-50%, -50%);
  text-shadow: 0 0 8px currentColor;
  animation: fly var(--dur, .7s) ease-out forwards;
}
@keyframes fly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.4); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2) rotate(90deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sparkle { animation: none; opacity: .55; }
  .spark { animation-duration: .01s; }
}

/* the shopkeeper photo is a scene, so it gets a rounded frame instead of a circle */
.about .about-photo { --size: min(90vw, 460px); aspect-ratio: 4 / 3; border-radius: 24px; }
.about .about-photo::after { border-radius: 24px; background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(28, 18, 14, .55) 100%); }
