/* ==========================================================================
   Carnegie Hill Framing — Design tokens
   ========================================================================== */
:root {
  --maroon:        #5c1a1e;
  --maroon-dark:   #401215;
  --goldenrod:     #e0a72e;
  --teal:          #1c8c9c;
  --paper:         #faf6ee;
  --paper-dim:     #f1e9d8;
  --ink:           #211a16;
  --ink-soft:      #4a3f38;
  --gilt:          #c9a15a;
  --gilt-text:     #7a5a24; /* darker gilt for text on light backgrounds — meets 4.5:1 contrast */

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --radius: 2px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::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;
    scroll-behavior: auto !important;
  }
}

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

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }

.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;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--maroon);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

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

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gilt-text);
  margin: 0 0 var(--space-2);
}
/* on dark backgrounds (hero, reviews) the brighter goldenrod meets contrast instead */
.eyebrow--light { color: var(--goldenrod); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 var(--space-3);
  color: var(--maroon);
  max-width: 20ch;
}
.section-title--light { color: var(--paper); }

/* ==========================================================================
   Signature element: frame-corner motif
   ========================================================================== */
.frame-corner {
  position: relative;
  padding: 10px;
  background: var(--paper);
}
.frame-corner::before,
.frame-corner::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid var(--gilt);
  pointer-events: none;
}
.frame-corner::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}
.frame-corner::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}
.frame-corner img {
  width: 100%;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--goldenrod);
  color: var(--maroon-dark);
  border-color: var(--goldenrod);
}
.btn--primary:hover { background: #eab948; }

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
}
.btn--ghost:hover { background: rgba(250,246,238,0.12); }

/* ghost button on light backgrounds (visit section) */
.visit .btn--ghost {
  color: var(--maroon);
  border-color: var(--maroon);
}
.visit .btn--ghost:hover { background: rgba(92,26,30,0.08); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 3px solid var(--maroon);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.85rem var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 30px; width: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 2px solid var(--maroon);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--maroon);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
  font-size: 0.95rem;
}
.primary-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 0.25rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover { border-bottom-color: var(--gilt); }

.nav-cta {
  background: var(--maroon);
  color: var(--paper) !important;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--maroon-dark); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--maroon-dark);
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(33,26,22,0.35) 0%, rgba(33,26,22,0.55) 55%, rgba(33,26,22,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-5) var(--space-3) var(--space-5);
  color: var(--paper);
  width: 100%;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.6rem + 4.5vw, 5rem);
  line-height: 0.98;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
}
.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem);
  color: var(--goldenrod);
  margin: 0 0 var(--space-3);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon-dark);
  background: var(--gilt);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  margin: 0;
}

/* ==========================================================================
   Story
   ========================================================================== */
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.story-lede {
  font-size: 1.1rem;
  color: var(--ink);
}
.story-text p { margin: 0 0 var(--space-2); }
.story-text p:last-child { margin-bottom: 0; color: var(--ink-soft); }

/* ==========================================================================
   Services
   ========================================================================== */
.services {
  background: var(--paper-dim);
}
.services-lede {
  max-width: 60ch;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-4);
}
.tag-grid {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tag-grid li {
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--paper);
  border: 2px solid var(--maroon);
  color: var(--maroon);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}
.materials-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-items: start;
}
.materials-strip figure {
  margin: 0;
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.gallery-item {
  border: none;
  padding: 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.gallery-item:hover img { opacity: 0.92; }
.gallery-item img { transition: opacity 0.15s ease; }

/* ==========================================================================
   Reviews
   ========================================================================== */
.reviews {
  background: var(--maroon);
  color: var(--paper);
}
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.review-card {
  margin: 0;
  background: var(--maroon-dark);
}
.review-card::before,
.review-card::after {
  border-color: var(--goldenrod);
}
.review-card p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 var(--space-2);
  color: var(--paper);
}
.review-card footer {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--goldenrod);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Visit
   ========================================================================== */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.visit-list {
  margin: 0 0 var(--space-4);
  display: grid;
  gap: var(--space-3);
}
.visit-list div { border-bottom: 1px solid var(--paper-dim); padding-bottom: var(--space-2); }
.visit-list div:last-child { border-bottom: none; }
.visit-list dt {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gilt);
  margin-bottom: 0.3rem;
}
.visit-list dd {
  margin: 0;
  font-size: 1.05rem;
}
.visit-list a {
  text-decoration: none;
  border-bottom: 1px solid var(--maroon);
}
.visit-list a:hover { color: var(--maroon); }
.visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.visit-map iframe {
  width: 100%;
  height: 340px;
  border: 0;
  display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--maroon-dark);
  color: var(--paper-dim);
  padding: var(--space-5) var(--space-3);
  text-align: center;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
}
.footer-logo {
  height: 26px;
  width: auto;
  margin: 0 auto var(--space-2);
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.footer-address, .footer-tagline { margin: 0.3rem 0; font-size: 0.95rem; }
.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--goldenrod);
}
.footer-address a { text-decoration: underline; }
.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin: var(--space-3) 0;
  font-weight: 600;
  font-size: 0.9rem;
}
.footer-social a { text-decoration: none; }
.footer-social a:hover { color: var(--goldenrod); }
.footer-credit {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: var(--space-3);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(33,26,22,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: var(--space-3);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-3);
  background: transparent;
  border: 2px solid var(--paper);
  color: var(--paper);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive — tablet & up
   ========================================================================== */
@media (min-width: 700px) {
  .story-grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
  .materials-strip {
    grid-template-columns: 1.6fr 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .reviews-grid {
    grid-template-columns: 1fr 1fr;
  }
  .visit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

/* mobile nav */
@media (max-width: 699px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 3px solid var(--maroon);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-2) var(--space-3) var(--space-3);
    gap: var(--space-2);
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .nav-cta { text-align: center; }
}
