/* ==========================================================================
   Harpswell House, Inc. — "The Quarry" stylesheet
   Dark slate theme with inscriptional typography.
   Designed for legibility: generous text sizes, high contrast, and calm,
   slow animations (fully disabled for users who prefer reduced motion).
   ========================================================================== */

:root {
  --slate-900: #23282c;            /* deep charcoal slate */
  --slate-800: #2e343a;
  --slate-700: #3a424a;
  --cleft: #4a545c;                /* lighter cleft face */
  --vt-green: #7e907a;             /* Vermont green slate */
  --vt-red: #8f5a52;               /* Vermont red slate */
  --chalk: #eceae5;                /* chalk-line white (high contrast) */
  --chalk-dim: #c3c1bb;
  --hairline: rgba(232, 230, 225, 0.18);
  --ease: cubic-bezier(0.25, 0.6, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--slate-900);
  color: var(--chalk);
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  font-weight: 300;
  font-size: 18px;               /* generous base size for older readers */
  line-height: 1.75;
}

h1, h2, h3 {
  font-family: "Marcellus", Georgia, serif;
  font-weight: 400;
}

a {
  color: var(--chalk);
  transition: color 0.3s var(--ease);
}

a:hover {
  color: #ffffff;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--chalk);
  outline-offset: 3px;
}

/* ---- top bar ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5vw;
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  background: rgba(35, 40, 44, 0.96);
  z-index: 20;
}

.wordmark {
  font-family: "Marcellus", Georgia, serif;
  font-size: 21px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  color: var(--chalk);
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 18px;
  cursor: pointer;
  transition: border-color 0.3s var(--ease);
}

.menu-toggle:hover {
  border-color: var(--chalk);
}

/* ---- layout: sidebar + content ---- */
.layout {
  display: flex;
  gap: clamp(28px, 4vw, 56px);
  align-items: flex-start;
  padding: 48px 5vw 72px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---- sidebar ---- */
.sidebar {
  flex: 0 0 240px;
  position: sticky;
  top: 96px;
  font-size: 15.5px;
}

.store-link {
  display: block;
  border: 1px solid var(--hairline);
  padding: 12px 14px;
  text-decoration: none;
  letter-spacing: 0.05em;
  margin-bottom: 22px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.store-link:hover {
  border-color: var(--chalk);
  background: var(--slate-800);
}

.new-tag {
  display: inline-block;
  background: var(--vt-red);
  color: #ffffff;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 2px 8px;
  margin-right: 8px;
  border-radius: 2px;
}

.nav-heading {
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  margin: 24px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--hairline);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: 7px 10px;
  text-decoration: none;
  color: var(--chalk-dim);
  border-left: 2px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav-list a:hover {
  color: var(--chalk);
  background: var(--slate-800);
}

.nav-list a.active {
  color: #ffffff;
  border-left-color: var(--vt-green);
  background: var(--slate-800);
}

/* ---- main content ---- */
.content {
  flex: 1;
  min-width: 0;
}

/* page hero: title as an inscription */
.page-hero {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 36px;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  margin-bottom: 18px;
}

.page-hero h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #cfd3d6;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.75),
    0 -1px 0 rgba(255, 255, 255, 0.14);
}

.prose p {
  max-width: 68ch;
  margin-bottom: 18px;
  color: var(--chalk-dim);
}

.prose p:first-child {
  color: var(--chalk);
  font-size: 19.5px;
}

/* section labels */
.section-label {
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  margin: 48px 0 28px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
}

/* ---- About Us photo row ---- */
.photo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 40px;
}

.photo-row figure {
  margin: 0;
}

.photo-row img {
  width: 100%;
  display: block;
  border: 1px solid var(--hairline);
  filter: saturate(0.9);
}

.photo-row figcaption {
  font-size: 14px;
  color: var(--chalk-dim);
  margin-top: 8px;
}

/* ---- three stones (home page) ---- */
.stone-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

.stone {
  background: var(--slate-900);
  padding: 34px 28px;
}

.swatch {
  height: 10px;
  width: 64px;
  margin-bottom: 22px;
}

.stone h3 {
  font-size: 22px;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.stone p {
  color: var(--chalk-dim);
  font-size: 15.5px;
}

.s-black .swatch { background: linear-gradient(90deg, #2b3036, #454c53); }
.s-green .swatch { background: linear-gradient(90deg, #5d6d59, var(--vt-green)); }
.s-red .swatch   { background: linear-gradient(90deg, #6d3f3a, var(--vt-red)); }

/* ---- gallery ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
}

.gallery-item {
  margin: 0;
}

.gallery-item a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--slate-800);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  filter: saturate(0.9);
  transition: transform 0.7s var(--ease);
}

.gallery-item a:hover img,
.gallery-item a:focus img {
  transform: scale(1.035);
}

.gallery-item figcaption {
  font-size: 14.5px;
  color: var(--chalk-dim);
  margin-top: 10px;
  line-height: 1.5;
}

/* ---- store page ---- */
.store-note {
  border-left: 2px solid var(--vt-green);
  padding-left: 16px;
  font-style: italic;
}

.store-link.active {
  border-color: var(--vt-green);
  background: var(--slate-800);
}

.product-grid .gallery-item img {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  object-fit: contain;
  padding: 8px;
}

.product-grid figcaption {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.product-name {
  color: var(--chalk);
  font-size: 16.5px;
  letter-spacing: 0.02em;
}

.price {
  color: var(--vt-green);
  font-weight: 400;
}

.buy-link {
  color: var(--chalk-dim);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.buy-link:hover {
  color: var(--chalk);
}

.collection-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.collection-links a {
  border: 1px solid var(--hairline);
  padding: 11px 20px;
  text-decoration: none;
  color: var(--chalk-dim);
  font-size: 15.5px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}

.collection-links a:hover {
  border-color: var(--chalk);
  color: var(--chalk);
  background: var(--slate-800);
}

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 5vw 32px;
}

.foot-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--chalk-dim);
  font-size: 15.5px;
}

.fineprint {
  max-width: 1280px;
  margin: 18px auto 0;
  font-size: 13px;
  color: var(--cleft);
}

/* ---- lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 26, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  opacity: 1;
  transition: opacity 0.35s var(--ease);
}

.lightbox.is-hiding {
  opacity: 0;
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  margin: 0;
  max-width: 92vw;
  text-align: center;
}

.lightbox img {
  max-width: 92vw;
  max-height: 80vh;
  border: 1px solid var(--hairline);
  background: var(--slate-800);
}

.lightbox figcaption {
  color: var(--chalk);
  font-size: 16px;
  margin-top: 14px;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 20px;
  background: none;
  border: none;
  color: var(--chalk);
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 12px;
}

.lightbox-close:hover {
  color: #ffffff;
}

/* ---- gentle reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- responsive ---- */
@media (max-width: 860px) {
  .layout {
    flex-direction: column;
    padding-top: 28px;
  }

  .menu-toggle {
    display: inline-block;
  }

  .sidebar {
    position: static;
    flex: none;
    width: 100%;
    display: none;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hairline);
  }

  .sidebar.is-open {
    display: block;
  }

  .stone-row {
    grid-template-columns: 1fr;
  }

  .page-hero h1 {
    font-size: clamp(30px, 8vw, 40px);
  }

  body {
    font-size: 17px;
  }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .gallery-item img,
  .lightbox,
  .nav-list a,
  .store-link,
  .menu-toggle,
  a {
    transition: none;
  }
}