/* Red Moon Bakery — vanilla CSS; aligned with workspace AGENTS.md */

:root {
  --bg-deep: #1a0e12;
  --bg-elevated: #2a0f18;
  --bg-paper: #faf6f0;
  --bg-paper-wash: #f0e8de;
  --ink: #141011;
  --ink-soft: #4a3f42;
  --muted: #6b5f63;
  --crimson: #9b1b3a;
  --crimson-bright: #c4284a;
  --gold: #c9a227;
  --gold-soft: rgba(201, 162, 39, 0.35);
  --moon-glow: rgba(255, 236, 220, 0.12);
  --border: rgba(20, 16, 17, 0.12);
  --radius-lg: 20px;
  --radius: 12px;
  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --shadow-soft: 0 24px 60px rgba(10, 5, 8, 0.35);
  --shadow-paper: 0 18px 50px rgba(20, 16, 17, 0.08);
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-deep);
  -webkit-tap-highlight-color: rgba(201, 162, 39, 0.25);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg-paper);
  color: var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(26, 14, 18, 0.96) 0%, rgba(26, 14, 18, 0.88) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 236, 220, 0.06);
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #ffecd8;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.25rem;
}

.logo__moon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff5ea 0%, #e8c4a8 38%, #8b2940 100%);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.45), 0 0 24px var(--gold-soft);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.nav a {
  color: rgba(255, 236, 216, 0.92);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.15rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover {
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

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

.btn--primary {
  background: linear-gradient(135deg, var(--crimson-bright), var(--crimson));
  color: #fff;
  box-shadow: 0 8px 28px rgba(155, 27, 58, 0.45);
}

.btn--primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn--ghost {
  background: transparent;
  color: #ffecd8;
  border-color: rgba(255, 236, 216, 0.35);
}

.btn--ghost:hover {
  border-color: rgba(255, 236, 216, 0.65);
  background: rgba(255, 236, 220, 0.06);
}

.header-cta {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .site-header__inner {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .header-cta {
    margin-left: auto;
  }
}

/* Hero */

.hero {
  padding: clamp(2rem, 5vw, 4rem) 1.5rem 3rem;
  background:
    radial-gradient(ellipse 100% 80% at 50% -20%, var(--moon-glow), transparent 55%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-elevated) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 10% -20% auto -20%;
  height: 40%;
  background: radial-gradient(ellipse, rgba(155, 27, 58, 0.12), transparent 70%);
  pointer-events: none;
}

.hero__grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}

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

.hero__copy {
  animation: rise 0.9s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin: 0 0 1rem;
  font-weight: 600;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.35rem);
  line-height: 1.12;
  color: #fff6ee;
  margin: 0 0 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  color: rgba(255, 236, 220, 0.82);
  margin: 0 0 1.75rem;
  max-width: 36ch;
  font-size: 1.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__figure {
  margin: 0;
  animation: rise 1s ease-out 0.12s both;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 236, 220, 0.12);
}

.hero__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 544 / 508;
}

/* Sections */

.section {
  padding: clamp(3rem, 6vw, 5rem) 1.5rem;
}

.section__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section--paper {
  background: var(--bg-paper);
  color: var(--ink);
  background-image:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(155, 27, 58, 0.06), transparent 50%),
    linear-gradient(180deg, var(--bg-paper) 0%, var(--bg-paper-wash) 100%);
}

.section--deep {
  background: var(--bg-elevated);
  color: rgba(255, 246, 240, 0.92);
}

.section--deep .muted {
  color: rgba(255, 236, 220, 0.65);
}

.section__head {
  margin-bottom: 2rem;
}

.section__head h2 {
  margin: 0 0 0.5rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0;
}

.section--paper h2 {
  color: var(--ink);
}

.story-note {
  margin-top: 1.25rem;
  margin-bottom: 0;
  font-size: 0.98rem;
}

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pill-list li {
  padding: 0.85rem 1.1rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--crimson);
  box-shadow: var(--shadow-paper);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.cards--four {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 1024px) {
  .cards--four {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 236, 220, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 162, 39, 0.35);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  color: #fff8f0;
}

.card p {
  margin: 0;
  color: rgba(255, 236, 220, 0.78);
  font-size: 0.98rem;
}

/* Gallery — real shop & cake photography */
.gallery-section {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
}

.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1.15rem;
}

.gallery-item {
  margin: 0;
}

.gallery-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-paper);
  aspect-ratio: 1;
  background: #e8e4df;
}

.gallery-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: stretch;
}

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

.visit-copy .address {
  font-style: normal;
  font-weight: 500;
  margin: 1rem 0;
  line-height: 1.65;
}

.hours {
  margin: 1.25rem 0;
}

.fine-print {
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.visit-copy a:not(.btn) {
  color: var(--crimson);
  font-weight: 600;
}

.map-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.map-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.map-coords {
  font-size: 0.9rem;
  margin: 0 0 0.65rem;
  line-height: 1.4;
}

.geo-label {
  font-weight: 600;
  margin-right: 0.4rem;
  color: var(--crimson);
}

.geo-values data {
  font-variant-numeric: tabular-nums;
}

/* Leaflet: container must have explicit height (map-it skill) */
.map-leaflet {
  width: 100%;
  height: 380px;
  min-height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-paper);
  border: 1px solid var(--border);
  background: #e8e4df;
  z-index: 1;
}

.map-leaflet .leaflet-control-attribution {
  font-size: 0.7rem;
  background: rgba(250, 246, 240, 0.92);
  padding: 2px 6px;
  border-radius: 4px 0 0 0;
}

.map-foot {
  font-size: 0.88rem;
  margin: 0.75rem 0 0;
}

.map-foot a {
  color: var(--crimson);
  font-weight: 600;
}

.map-foot-sep {
  margin: 0 0.4rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  background: #120a0d;
  color: rgba(255, 236, 220, 0.75);
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}

.site-footer p {
  margin: 0.35rem 0;
}

/* Focus for links in header/footer */
.nav a:focus-visible,
.logo:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}
