/* Lunar and Earth — brand stylesheet
   Palette sampled directly from the logo. */

:root {
  --paper:    #F7F5F2;  /* page */
  --shell:    #EFEBE5;  /* raised surfaces */
  --crescent: #E5DDD6;  /* rules, quiet fills */
  --taupe:    #B19A8A;  /* mid tone */
  --clay:     #9A8271;
  --earth:    #7D6855;  /* primary — the full moon in the mark */
  --ink:      #564E45;  /* body text */
  --muted:    #948B83;  /* captions */
  --alert:    #8C4B3C;

  --display: 'Jost', 'Century Gothic', sans-serif;
  --body:    'EB Garamond', Georgia, serif;
  --data:    'IBM Plex Mono', ui-monospace, monospace;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --shadow: 0 1px 2px rgba(86, 78, 69, .05), 0 8px 24px -12px rgba(86, 78, 69, .12);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--earth);
  margin: 0;
}

h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
h3 { font-size: 1rem; letter-spacing: .12em; }

a { color: var(--earth); text-decoration-thickness: 1px; text-underline-offset: .2em; }

:focus-visible {
  outline: 2px solid var(--earth);
  outline-offset: 3px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; margin-inline: auto; }

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

.site-header {
  border-bottom: 1px solid var(--crescent);
  background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1.1rem; flex-wrap: wrap;
}

.wordmark {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--earth);
}
.wordmark span {
  font-family: var(--display);
  font-weight: 300; letter-spacing: .2em; text-transform: uppercase;
  font-size: .95rem; white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.6rem); flex-wrap: wrap; }
.nav a {
  font-family: var(--display); font-size: .72rem; font-weight: 400;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding-block: .35rem;
  border-bottom: 1px solid transparent; transition: border-color .2s, color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--taupe); color: var(--earth); }

.social { display: flex; align-items: center; gap: .55rem; margin-left: .35rem; }
.social a {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  color: var(--taupe); transition: color .2s, background .2s;
}
.social a:hover { color: var(--paper); background: var(--earth); }
.social svg { width: 17px; height: 17px; fill: currentColor; display: block; }

@media (max-width: 560px) {
  .social { order: 3; margin-left: 0; }
  .social a { width: 26px; height: 26px; }
  .social svg { width: 15px; height: 15px; }
}

.basket-link { position: relative; }
.basket-count {
  font-family: var(--data); font-size: .62rem;
  background: var(--earth); color: var(--paper);
  border-radius: 999px; padding: .1rem .4rem; margin-left: .3rem;
}
.basket-count:empty, .basket-count[hidden] { display: none; }

/* Trade banner — the site tells you, plainly, which prices you are seeing. */
.trade-bar {
  background: var(--earth); color: var(--paper);
  font-family: var(--data); font-size: .7rem; letter-spacing: .08em;
  text-align: center; padding: .5rem 1rem;
}
.trade-bar a { color: var(--paper); }
.trade-bar button {
  background: none; border: 0; color: var(--paper);
  font: inherit; text-decoration: underline; cursor: pointer; padding: 0;
}

/* ---------- Moon rule — the divider, taken from the mark ---------- */

.moon-rule {
  display: flex; align-items: center; justify-content: center;
  gap: .55rem; padding: clamp(2rem, 6vw, 3.5rem) 0;
}
.moon-rule i {
  width: 11px; height: 11px; border-radius: 50%; display: block;
  background: var(--crescent);
}
.moon-rule i:nth-child(2) { background: var(--taupe); }
.moon-rule i:nth-child(3) { background: var(--earth); width: 15px; height: 15px; }
.moon-rule i:nth-child(4) { background: var(--taupe); }

/* ---------- Hero ---------- */

.hero { text-align: center; padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(2rem, 5vw, 3rem); }
.hero .phases { margin-bottom: 1.75rem; }
.hero p {
  max-width: 46ch; margin: 1.5rem auto 2.25rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink);
}
.eyebrow {
  font-family: var(--data); font-size: .68rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 1rem;
}

/* The moon-phase mark, taken straight from the logo */
.phases { display: block; width: clamp(200px, 42vw, 340px); height: auto; margin-inline: auto; }
.wordmark .mark { display: block; width: 74px; height: auto; flex: none; }

/* Hero photograph */
.hero-photo { display: block; margin: 2.25rem auto; max-width: 900px; }
.hero-photo img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--crescent);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--display); font-size: .74rem; font-weight: 400;
  letter-spacing: .18em; text-transform: uppercase;
  padding: .85rem 1.75rem; border-radius: 2px; cursor: pointer;
  border: 1px solid var(--earth); background: var(--earth); color: var(--paper);
  text-decoration: none; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-quiet { background: transparent; color: var(--earth); border-color: var(--taupe); }
.btn-quiet:hover { background: var(--shell); color: var(--earth); border-color: var(--earth); }

.btn-text {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--data); font-size: .68rem; letter-spacing: .1em;
  color: var(--muted); text-decoration: underline; text-underline-offset: .25em;
}
.btn-text:hover { color: var(--alert); }

/* ---------- Filters ---------- */

.filters { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2.5rem; }
.filters button {
  font-family: var(--display); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .55rem 1.1rem; border: 1px solid var(--crescent); background: transparent;
  color: var(--muted); border-radius: 2px; cursor: pointer; transition: all .2s;
}
.filters button:hover { border-color: var(--taupe); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--earth); border-color: var(--earth); color: var(--paper); }

/* ---------- The specimen card ---------- */

.grid {
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.specimen {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--crescent);
  transition: border-color .25s, transform .25s;
}
.specimen:hover { border-color: var(--taupe); transform: translateY(-2px); }

.specimen-image {
  aspect-ratio: 4 / 5; background: var(--shell);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.specimen-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.specimen-image .placeholder {
  font-family: var(--data); font-size: .6rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--taupe);
}

.one-of-one {
  position: absolute; top: 0; left: 0;
  background: var(--earth); color: var(--paper);
  font-family: var(--data); font-size: .55rem; letter-spacing: .16em;
  text-transform: uppercase; padding: .35rem .6rem;
}

/* Clearance and New in — the only two places the site raises its voice */
.badge {
  position: absolute; top: 0; right: 0; z-index: 1;
  font-family: var(--data); font-size: .55rem; letter-spacing: .16em;
  text-transform: uppercase; padding: .35rem .6rem;
}
.badge.sale { background: var(--alert); color: var(--paper); }
.badge.new  { background: var(--paper); color: var(--earth); border-bottom: 1px solid var(--crescent); border-left: 1px solid var(--crescent); }

.specimen-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.specimen-body h3 { color: var(--ink); margin-bottom: .4rem; }
.specimen-body .blurb { font-size: .95rem; color: var(--muted); margin: 0 0 1rem; flex: 1; }

/* The signature: a mineral-cabinet label. Monospace, hairline rules, one row per fact. */
.label {
  border-top: 1px solid var(--crescent);
  border-bottom: 1px solid var(--crescent);
  font-family: var(--data); font-size: .66rem; line-height: 1.9;
  color: var(--muted); margin-bottom: 1rem;
  padding-block: .4rem;
}
.label div { display: flex; justify-content: space-between; gap: 1rem; }
.label dt, .label span:first-child { letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.label span:last-child { color: var(--ink); text-align: right; }

.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.price {
  font-family: var(--display); font-size: 1.35rem; font-weight: 300;
  letter-spacing: .05em; color: var(--earth);
}
.price-was {
  font-family: var(--data); font-size: .68rem; color: var(--muted);
  text-decoration: line-through;
}
.no-discount {
  display: block; width: 100%;
  font-family: var(--data); font-size: .58rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-top: .3rem;
}

.trade-flag {
  font-family: var(--data); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--paper); background: var(--clay); padding: .18rem .45rem; margin-left: .4rem;
}
.sold-out { font-family: var(--data); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--alert); }

/* ---------- Forms ---------- */

.field { margin-bottom: 1.15rem; }
.field label {
  display: block; font-family: var(--data); font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem;
}
.field input, .field textarea, .field select {
  width: 100%; padding: .75rem .85rem;
  border: 1px solid var(--crescent); border-radius: 2px;
  background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1rem;
}
.field input:focus, .field textarea:focus { border-color: var(--taupe); }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: .35rem; }

.card {
  background: var(--shell); border: 1px solid var(--crescent);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.notice {
  padding: .85rem 1rem; border-left: 3px solid var(--taupe);
  background: var(--shell); font-size: .95rem; margin-bottom: 1.25rem;
  border-radius: 0;
}
.notice.bad { border-color: var(--alert); color: var(--alert); }
.notice.good { border-color: var(--earth); }
.notice[hidden] { display: none; }

/* ---------- Basket ---------- */

.basket-line {
  display: grid; grid-template-columns: 72px 1fr auto;
  gap: 1rem; align-items: center;
  padding: 1.1rem 0; border-bottom: 1px solid var(--crescent);
}
.basket-line img, .basket-line .thumb {
  width: 72px; aspect-ratio: 1; object-fit: cover; background: var(--shell); display: block;
}
.basket-line h3 { font-size: .9rem; margin-bottom: .25rem; }
.basket-line .meta { font-family: var(--data); font-size: .66rem; color: var(--muted); }
.qty { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; }
.qty input {
  width: 58px; padding: .3rem .4rem; text-align: center;
  border: 1px solid var(--crescent); background: var(--paper); font-family: var(--data); font-size: .8rem;
}

.totals { margin-top: 1.75rem; }
.totals div { display: flex; justify-content: space-between; padding: .45rem 0; font-family: var(--data); font-size: .8rem; }
.totals .grand {
  border-top: 1px solid var(--taupe); margin-top: .5rem; padding-top: .9rem;
  font-family: var(--display); font-size: 1.15rem; letter-spacing: .08em; color: var(--earth);
}

.empty { text-align: center; padding: 4rem 0; color: var(--muted); }

/* ---------- Product page ---------- */

.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 800px) { .product { grid-template-columns: 1fr; } }
.product .specimen-image { aspect-ratio: 1; }
.product .label { font-size: .72rem; }

/* ---------- Tables (admin) ---------- */

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--crescent); vertical-align: top; }
th {
  font-family: var(--data); font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); font-weight: 400;
}
td .mono { font-family: var(--data); font-size: .78rem; }

.tag {
  font-family: var(--data); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .15rem .45rem; border: 1px solid var(--crescent); color: var(--muted);
}
.tag.paid, .tag.approved { border-color: var(--earth); color: var(--earth); }
.tag.pending { border-color: var(--taupe); color: var(--clay); }
.tag.rejected { border-color: var(--alert); color: var(--alert); }

/* ---------- The promises bar, and the information links ---------- */

.promises {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.promise {
  padding: 0 clamp(1rem, 2.5vw, 2rem);
  border-left: 1px solid var(--crescent);
}
.promise:first-child { border-left: 0; padding-left: 0; }
.promise svg {
  width: 26px; height: 26px; display: block; margin-bottom: 1rem;
  fill: var(--taupe); color: var(--taupe);
}
.promise h3 {
  font-family: var(--display); font-weight: 300; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--earth);
  margin-bottom: .6rem;
}
.promise p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.6; }

@media (max-width: 900px) {
  .promises { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 0; }
  .promise:nth-child(odd) { border-left: 0; padding-left: 0; }
}
@media (max-width: 560px) {
  .promises { grid-template-columns: 1fr; gap: 2rem; }
  .promise { border-left: 0; padding-left: 0; padding-bottom: 2rem; border-bottom: 1px solid var(--crescent); }
  .promise:last-child { border-bottom: 0; padding-bottom: 0; }
}

.info-links {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-top: 2.5rem; text-align: left;
}
@media (max-width: 760px) { .info-links { grid-template-columns: 1fr; } }
.info-links a {
  display: block; padding: 1.25rem 1.35rem;
  border: 1px solid var(--crescent); border-radius: 2px;
  text-decoration: none; background: var(--paper);
  transition: border-color .2s, background .2s;
}
.info-links a:hover { border-color: var(--taupe); background: var(--shell); }
.info-links strong {
  display: block; font-family: var(--display); font-weight: 300;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--earth); margin-bottom: .4rem;
}
.info-links span { display: block; font-size: .88rem; color: var(--muted); line-height: 1.5; }

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

.site-footer {
  border-top: 1px solid var(--crescent); margin-top: clamp(4rem, 10vw, 7rem);
  padding-block: 3rem; font-size: .9rem; color: var(--muted);
}
.site-footer .wrap {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2.5rem;
}
@media (max-width: 860px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; gap: 2.5rem 2rem; } }
@media (max-width: 520px) { .site-footer .wrap { grid-template-columns: 1fr; gap: 2rem; } }
.site-footer a { color: var(--ink); text-decoration: none; display: block; padding-block: .2rem; }
.site-footer a:hover { color: var(--earth); text-decoration: underline; }
.site-footer h3 { margin-bottom: .75rem; color: var(--taupe); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
