/* Hollow Moon Apothecary — shared styles */

:root {
  --forest-dark: #0e1c14;
  --forest: #1a2f20;
  --forest-mid: #26402c;
  --sage: #8fa384;
  --plum-dark: #26132b;
  --plum: #3d1f45;
  --plum-mid: #5a3363;
  --gold: #cfa04c;
  --gold-light: #edd28f;
  --parchment: #f4e9d3;
  --parchment-dark: #e6d5ac;
  --ink: #241a1e;
  --safe-right: 84px;
  --shadow-deep: 0 12px 30px rgba(6, 12, 8, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "EB Garamond", serif;
  color: var(--parchment);
  background-color: var(--forest-dark);
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(90, 51, 99, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 0%, rgba(207, 160, 76, 0.12), transparent 45%),
    linear-gradient(180deg, var(--forest-dark) 0%, var(--forest) 45%, #101c14 100%);
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(237, 210, 143, 0.6), transparent),
    radial-gradient(1px 1px at 80% 15%, rgba(237, 210, 143, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 60% 40%, rgba(237, 210, 143, 0.4), transparent),
    radial-gradient(1px 1px at 30% 65%, rgba(237, 210, 143, 0.45), transparent),
    radial-gradient(1px 1px at 90% 70%, rgba(237, 210, 143, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 45% 85%, rgba(237, 210, 143, 0.4), transparent);
  animation: twinkle 6s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

h1, h2, h3, .brand-name {
  font-family: "Cinzel Decorative", serif;
  color: var(--gold-light);
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p { margin: 0 0 1em; }

a {
  color: var(--gold-light);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.sigil {
  font-family: "MedievalSharp", cursive;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(14, 28, 20, 0.95), rgba(14, 28, 20, 0.85));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(207, 160, 76, 0.35);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.8rem 1.5rem;
  padding-right: calc(1.5rem + var(--safe-right));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-glyph {
  font-size: 1.8rem;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(207, 160, 76, 0.6);
}

.brand-name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.15;
}

.brand-name em {
  font-style: normal;
  display: block;
  font-size: 0.85rem;
  color: var(--sage);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--parchment);
  font-family: "MedievalSharp", cursive;
  font-size: 1rem;
  letter-spacing: 0.03em;
  position: relative;
  padding-bottom: 4px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  width: 100%;
}

.site-nav a[aria-current="page"] {
  color: var(--gold-light);
}

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

.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  color: var(--parchment);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 20, 15, 0.35) 0%, rgba(14, 20, 15, 0.55) 55%, rgba(14, 20, 15, 0.92) 100%);
}

.hero-fog {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -10%;
  height: 45%;
  background: radial-gradient(ellipse at center, rgba(244, 233, 211, 0.18), transparent 70%);
  filter: blur(6px);
  animation: drift 14s ease-in-out infinite;
  z-index: 1;
}

@keyframes drift {
  0% { transform: translateX(-6%); }
  50% { transform: translateX(6%); }
  100% { transform: translateX(-6%); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 3rem 1.5rem;
  margin: 0 auto;
  text-align: center;
}

.hero-content .eyebrow {
  font-family: "MedievalSharp", cursive;
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.85rem;
  animation: flicker 5s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  45% { opacity: 0.85; }
  50% { opacity: 0.55; }
  55% { opacity: 0.9; }
}

.hero-content h1 {
  margin-top: 0.4rem;
}

.hero-content .lede {
  font-size: 1.15rem;
  color: var(--parchment-dark);
  font-style: italic;
}

.page-hero {
  min-height: 40vh;
}

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

.btn {
  display: inline-block;
  font-family: "MedievalSharp", cursive;
  text-decoration: none;
  padding: 0.7em 1.8em;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  background: linear-gradient(180deg, rgba(207, 160, 76, 0.15), rgba(207, 160, 76, 0.05));
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  letter-spacing: 0.03em;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(207, 160, 76, 0.25);
  background: linear-gradient(180deg, rgba(207, 160, 76, 0.3), rgba(207, 160, 76, 0.1));
}

.btn-solid {
  background: var(--gold);
  color: var(--plum-dark);
  font-weight: 600;
}

.btn-solid:hover {
  background: var(--gold-light);
}

/* ---------- Sections ---------- */

section {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0;
  background-color: var(--forest-dark);
}

.hero {
  background-color: var(--forest-dark);
}

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.8rem;
}

.section-heading .eyebrow {
  display: block;
  font-family: "MedievalSharp", cursive;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  color: var(--gold);
  margin: 1.2rem 0 2.4rem;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.alt-bg {
  background: linear-gradient(180deg, rgba(38, 19, 43, 0.55), rgba(38, 19, 43, 0.15));
  border-top: 1px solid rgba(207, 160, 76, 0.2);
  border-bottom: 1px solid rgba(207, 160, 76, 0.2);
}

/* ---------- Cards grid (general) ---------- */

.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.parchment-card {
  background: linear-gradient(180deg, var(--parchment), var(--parchment-dark));
  color: var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-deep);
  border: 1px solid rgba(61, 31, 69, 0.25);
}

/* ---------- Potion cards ---------- */

.potion-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.potion-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(6, 12, 8, 0.65);
}

.potion-visual {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  display: block;
}

.potion-visual.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, rgba(207, 160, 76, 0.25), transparent 60%), linear-gradient(150deg, var(--plum), var(--forest-mid));
  color: var(--gold-light);
  font-size: 3.2rem;
}

.potion-body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.potion-name {
  color: var(--plum-dark);
  font-size: 1.25rem;
  margin-bottom: 0.15em;
}

.potion-tagline {
  font-style: italic;
  color: var(--plum);
  margin-bottom: 0.8em;
  font-size: 0.95rem;
}

.potion-desc {
  font-size: 0.98rem;
  margin-bottom: 0.9em;
}

.ingredient-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 1em;
}

.ingredient-tags li {
  background: rgba(61, 31, 69, 0.1);
  border: 1px solid rgba(61, 31, 69, 0.25);
  border-radius: 999px;
  padding: 0.25em 0.8em;
  font-size: 0.8rem;
  color: var(--plum);
}

.potion-card details {
  margin-top: auto;
  border-top: 1px dashed rgba(61, 31, 69, 0.35);
  padding-top: 0.8rem;
}

.potion-card summary {
  cursor: pointer;
  font-family: "MedievalSharp", cursive;
  color: var(--plum);
  font-size: 0.95rem;
  outline: none;
}

.potion-card summary::marker {
  color: var(--gold);
}

.side-effects-list {
  margin: 0.6em 0 0;
  padding-left: 1.2em;
  font-size: 0.9rem;
}

.potion-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.potion-price {
  font-family: "Cinzel Decorative", serif;
  color: var(--plum-dark);
  font-size: 1.05rem;
}

.tiny-btn {
  font-family: "MedievalSharp", cursive;
  font-size: 0.85rem;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  border: 1px solid var(--plum);
  color: var(--plum-dark);
  background: transparent;
  text-decoration: none;
}

.tiny-btn:hover {
  background: var(--plum);
  color: var(--parchment);
}

/* ---------- Spell of the week ---------- */

.spell-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  overflow: hidden;
}

.spell-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
}

.spell-content {
  padding: 2.2rem 2.4rem;
}

.spell-content .eyebrow {
  font-family: "MedievalSharp", cursive;
  color: var(--plum);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.spell-content h2,
.spell-content h3 {
  color: var(--plum-dark);
}

.spell-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 1.2rem;
}

.spell-columns h4 {
  font-family: "MedievalSharp", cursive;
  color: var(--plum);
  margin: 0 0 0.4em;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.spell-columns ul,
.spell-columns ol {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.95rem;
}

.intention-line {
  margin-top: 1.2rem;
  font-style: italic;
  border-left: 3px solid var(--gold);
  padding-left: 0.9rem;
  color: var(--plum-dark);
}

@media (max-width: 720px) {
  .spell-card {
    grid-template-columns: 1fr;
  }
  .spell-card img {
    min-height: 200px;
  }
  .spell-columns {
    grid-template-columns: 1fr;
  }
}

/* ---------- Lunar calendar ---------- */

.moon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.6rem;
}

.moon-card {
  text-align: center;
  padding: 1.6rem 1.2rem;
}

.moon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  position: relative;
  overflow: hidden;
  background: var(--gold-light);
  box-shadow: 0 0 18px rgba(237, 210, 143, 0.35);
}

.moon::after {
  content: "";
  position: absolute;
  top: -10%;
  height: 120%;
  width: 100%;
  border-radius: 50%;
  background: var(--plum-dark);
}

.moon-new::after { transform: translateX(0); }
.moon-waxing-crescent::after { transform: translateX(58%); }
.moon-first-quarter::after { transform: translateX(100%); }
.moon-waxing-gibbous::after { transform: translateX(142%); }
.moon-full::after { transform: translateX(210%); }
.moon-waning-gibbous::after { transform: translateX(142%) scaleX(-1); }
.moon-last-quarter::after { transform: translateX(100%) scaleX(-1); }
.moon-waning-crescent::after { transform: translateX(58%) scaleX(-1); }

.moon-card h3 {
  color: var(--plum-dark);
  font-size: 1.05rem;
  margin-bottom: 0.4em;
}

.moon-card p {
  font-size: 0.92rem;
  margin: 0;
}

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

.site-footer {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(180deg, rgba(14, 28, 20, 0.4), var(--forest-dark));
  border-top: 1px solid rgba(207, 160, 76, 0.25);
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  font-family: "MedievalSharp", cursive;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 0.7em;
  font-size: 1rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin-bottom: 0.5em;
}

.footer-grid a {
  color: var(--parchment-dark);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: var(--sage);
  border-top: 1px solid rgba(207, 160, 76, 0.15);
  padding-top: 1.4rem;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Misc decorative ---------- */

.corner-cobweb {
  position: absolute;
  width: 90px;
  height: 90px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 2;
}

.corner-cobweb.top-left {
  top: 0;
  left: 0;
  background:
    repeating-conic-gradient(from 0deg at 0% 0%, transparent 0deg 10deg, rgba(244, 233, 211, 0.35) 10deg 11deg),
    radial-gradient(circle at 0% 0%, transparent 15%, rgba(244, 233, 211, 0.15) 16% 17%, transparent 18%),
    radial-gradient(circle at 0% 0%, transparent 35%, rgba(244, 233, 211, 0.12) 36% 37%, transparent 38%);
}

.form-card {
  padding: 2.2rem 2.4rem;
  max-width: 560px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.form-row label {
  font-family: "MedievalSharp", cursive;
  font-size: 0.9rem;
  color: var(--plum-dark);
}

.form-row input {
  padding: 0.6em 0.8em;
  border-radius: 8px;
  border: 1px solid rgba(61, 31, 69, 0.35);
  background: rgba(255, 255, 255, 0.5);
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  color: var(--ink);
}

.text-plum { color: var(--plum-dark); }

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.feature-row img {
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow-deep);
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

@media (max-width: 800px) {
  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}
