/* Massachusetts History — Masterpiece Styles */

:root {
  --parchment: #f5f0e1;
  --parchment-deep: #e8ddc0;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --sepia: #8b7355;
  --sepia-light: #c4b08a;
  --gold: #b8965a;
  --gold-deep: #8a6d3b;
  --red: #7a2e2e;
  --shadow: rgba(0, 0, 0, 0.15);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Libre Franklin', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--sans);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
}

/* Header */
.site-header {
  background: var(--ink);
  color: var(--parchment);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--parchment);
}

.site-title span { color: var(--gold); }

.main-nav { display: flex; gap: 2rem; }

.main-nav a {
  color: var(--parchment);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* Hero */
.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--ink);
}

.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.45;
  filter: sepia(0.3) contrast(1.05);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--parchment);
  max-width: 800px;
  padding: 2rem;
}

.hero-kicker {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Sections */
.section { padding: 5rem 0; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-mark {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 1rem;
}

.section h2 {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.section-intro {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 700px;
  margin-bottom: 3rem;
}

/* Region cards */
.regions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.region-card {
  background: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
}

.region-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.region-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  filter: sepia(0.25);
}

.region-card-body { padding: 1.75rem; }

.region-card h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.region-card .era {
  font-size: 0.85rem;
  color: var(--sepia);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.region-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 3rem auto 0;
  padding-left: 2rem;
  border-left: 3px solid var(--sepia-light);
}

.timeline-item { margin-bottom: 2.5rem; position: relative; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.65rem;
  top: 0.3rem;
  width: 1rem;
  height: 1rem;
  background: var(--gold);
  border-radius: 50%;
  border: 3px solid var(--parchment);
  box-shadow: 0 0 0 2px var(--gold);
}

.timeline-year {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-deep);
}

.timeline-item h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 0.25rem 0 0.5rem;
}

.timeline-item p { color: var(--ink-soft); }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.gallery figure {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 4px 15px var(--shadow);
  aspect-ratio: 4/3;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.2);
  transition: transform 0.4s, filter 0.4s;
}

.gallery figure:hover img {
  transform: scale(1.05);
  filter: sepia(0);
}

.gallery figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: white;
  padding: 2rem 1.25rem 1rem;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--parchment);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-inner p { opacity: 0.7; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.8rem; }
  .section h2 { font-size: 2.2rem; }
  .main-nav { display: none; }
  .regions { grid-template-columns: 1fr; }
}

/* Store — NBMA-style rebuild (all classes prefixed .store-) */
.store-ticket {
  border-block: 2px solid var(--ink);
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 0.5rem 0 2.5rem;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.store-ticket--inner {
  border-block: 1px solid var(--sepia-light);
  margin: 1.25rem 0 0;
}

.store-feature {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  background: white;
  border: 1px solid var(--sepia-light);
  box-shadow: 0 18px 44px var(--shadow);
  overflow: hidden;
}

.store-feature-cover { background: var(--parchment-deep); }

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

.store-feature-body {
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--parchment);
  display: flex;
  flex-direction: column;
}

.store-folio {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.store-feature-body h3 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  line-height: 1.05;
  margin: 0.6rem 0 0.4rem;
}

.store-feature-body p { color: var(--ink-soft); }

.store-byline {
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}

.store-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--sepia-light);
}

.store-price {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--red);
}

.store-buy {
  display: inline-block;
  background: var(--ink);
  color: var(--parchment);
  border: 1px solid var(--ink);
  padding: 0.65rem 1.3rem;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.store-buy:hover { background: var(--red); border-color: var(--red); }

.store-buy--orange { background: #ff9f1c; border-color: #ff9f1c; color: #1a0a2e; }
.store-buy--orange:hover { background: #ffb84d; border-color: #ffb84d; }

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.store-card {
  background: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

.store-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.store-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}

.store-cover--bw { filter: grayscale(1) contrast(1.05); }

.store-typecover {
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, var(--parchment) 0%, var(--parchment-deep) 100%);
  border-bottom: 1px solid var(--sepia-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.75rem 1.25rem;
}

.store-typecover-mark {
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: auto;
}

.store-typecover-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--ink);
}

.store-typecover-rule {
  width: 52px;
  height: 2px;
  background: var(--gold);
  margin: 1rem auto;
}

.store-typecover-author {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sepia);
  margin-top: auto;
}

.store-card-body {
  padding: 1.25rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.store-card-body h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.store-card-body p { color: var(--ink-soft); font-size: 0.95rem; }

.store-card--dark { background: #241243; color: #f5f0e1; }
.store-card--dark h3 { color: #ff9f1c; }
.store-card--dark p, .store-card--dark .store-byline { color: #f5f0e1; opacity: 0.88; }
.store-card--dark .store-price { color: #ff9f1c; }
.store-card--dark .store-price-row { border-top-color: rgba(245, 240, 225, 0.25); }

.store-era {
  font-size: 0.8rem;
  color: var(--sepia);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.store-card--dark .store-era { color: #ff9f1c; }

.store-halloween-section { background: #1a0a2e; }

.store-free {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: #ff9f1c;
}

.store-ledger { border-top: 2px solid var(--ink); margin-top: 2rem; }

.store-ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--sepia-light);
}

.store-ledger-row:last-child { border-bottom: 2px solid var(--ink); }

.store-ledger-row strong { font-family: var(--serif); font-size: 1.3rem; }

.store-ledger-row small {
  display: block;
  color: var(--ink-soft);
  font-style: italic;
}

.store-stamp {
  display: inline-block;
  border: 2px solid var(--red);
  color: var(--red);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  transform: rotate(-2deg);
  border-radius: 2px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .store-feature { grid-template-columns: 1fr; }
  .store-ticket { flex-direction: column; gap: 0.4rem; }
}

/* Explore grid: fixed 3-across so cards land 3 on top, 3 on bottom */
.regions-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .regions-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .regions-3 { grid-template-columns: 1fr; } }
