/* Fine Art & Frame USA — gallery-white / walnut / brass palette */

:root {
  --bone: #faf8f4;
  --bone-2: #f1ede5;
  --ink: #1c1a17;
  --ink-soft: #4c463f;
  --walnut: #5f4630;
  --brass: #b08d57;
  --brass-deep: #7d5c2c; /* AA-contrast-safe on bone/white */
  --line: #e3ddd2;
  --shadow: 0 18px 40px -18px rgba(28, 26, 23, 0.28);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bone);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; }

img { max-width: 100%; display: block; }

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 200;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--ink);
  color: var(--bone);
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  text-decoration: none;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}

.brand-mark { color: var(--brass); font-size: 1.5rem; line-height: 1; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-name em { color: var(--brass); font-style: italic; }

.site-nav { display: flex; gap: 1.4rem; }

.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover, .site-nav a.active { color: var(--ink); border-bottom-color: var(--brass); }

.header-cta {
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--walnut);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  white-space: nowrap;
}

.header-cta:hover { border-color: var(--brass); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bone);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    padding: 0.95rem clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }

  .site-nav a:last-child { border-bottom: none; }
}

@media (max-width: 500px) {
  .site-header { gap: 0.7rem; }
  .brand-name { font-size: 0.95rem; }
  /* shrink the phone pill to just "Call" — the number still reads out to
     assistive tech via the tel: link and shows on the visit section */
  .header-cta { font-size: 0; padding: 0.45rem 0.85rem; }
  .header-cta::after { content: "Call"; font-size: 0.9rem; }
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem) 1.2rem;
  min-height: min(70vh, 640px);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brass-deep);
  margin-bottom: 1rem;
}

.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin-bottom: 1.2rem; }

.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 34rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

.hero-stage { position: relative; aspect-ratio: 6 / 5; max-height: 520px; }

#hero-canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }

#hero-canvas:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 8px; }

.hero-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0.4rem;
  display: flex;
  gap: 0.55rem;
  z-index: 2;
}

/* dots stay visually small but get a 26px+ hit area via the button box */
.hero-dot {
  position: relative;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.hero-dot::before {
  content: "";
  position: absolute;
  inset: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #8f8676;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot.active::before { background: var(--brass-deep); transform: translate(-50%, -50%) scale(1.35); }

.hero-caption[hidden] { display: none; }

.hero-caption {
  position: absolute;
  left: 50%;
  bottom: 2.4rem;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  background: rgba(250, 248, 244, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.hero-caption.show { opacity: 1; }

.hc-title { font-family: var(--font-display); font-size: 1rem; }

.hc-price { font-size: 0.9rem; font-weight: 600; color: var(--brass-deep); }

.hero-fallback {
  width: 70%; aspect-ratio: 4 / 5; margin: 8% auto;
  border: 22px solid var(--walnut);
  outline: 4px solid var(--brass);
  background: var(--bone-2);
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 1.2rem; }
  .hero-stage { order: -1; aspect-ratio: 5 / 4; max-height: 360px; margin: 0 auto; width: 100%; }
  .hero h1 { font-size: 2rem; }
  .hero-caption { bottom: 2rem; padding: 0.4rem 1rem; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
  .hc-title { font-size: 0.9rem; }
  .hc-price { font-size: 0.82rem; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--ink); color: var(--bone); }
.btn-primary:hover { box-shadow: var(--shadow); }

.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }

.btn-light { background: var(--bone); color: var(--ink); }

.btn-ghost-light { border: 1px solid rgba(250, 248, 244, 0.5); color: var(--bone); }

.text-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brass-deep);
  text-decoration: none;
}

.text-link:hover { text-decoration: underline; }

/* ---------- sections ---------- */

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

.section-tint { background: var(--bone-2); }

.section-head { max-width: 44rem; margin-bottom: 2.5rem; }

.section-head h2, .about-copy h2, .visit-grid h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.8rem; }

.section-head p { color: var(--ink-soft); }

.center { text-align: center; margin-top: 2.5rem; }

/* ---------- services ---------- */

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

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem;
}

.service-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }

.service-card p { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 0.6rem; }

/* ---------- featured / catalog cards ---------- */

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

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.8rem;
}

.art-card {
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
}

.art-card .art-frame {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
}

.art-card:hover .art-frame {
  transform: translateY(-4px) rotateX(2deg) rotateY(-2deg);
  box-shadow: var(--shadow);
}

.art-card img, .art-card canvas { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }

.art-card.sold .art-frame { opacity: 0.55; }

.badge-sold {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: var(--ink);
  color: var(--bone);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.art-card .art-title { font-family: var(--font-display); font-size: 1.05rem; margin-top: 0.8rem; }

.art-card .art-sub { font-size: 0.85rem; color: var(--ink-soft); }

.art-card .art-price { font-weight: 600; font-size: 0.95rem; margin-top: 0.15rem; }

/* ---------- about ---------- */

.about-split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.about-copy p { color: var(--ink-soft); margin-bottom: 1rem; max-width: 36rem; }

.about-facts { display: grid; gap: 1rem; }

.fact {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.fact-num { font-family: var(--font-display); font-size: 1.5rem; color: var(--walnut); }

.fact-label { font-size: 0.9rem; color: var(--ink-soft); }

@media (max-width: 760px) {
  .about-split { grid-template-columns: 1fr; }
}

/* ---------- visit ---------- */

.section-dark { background: var(--ink); color: var(--bone); }

.visit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.section-dark address { font-style: normal; font-size: 1.15rem; margin: 1rem 0; }

.visit-line { margin-bottom: 0.4rem; color: #d8d2c8; }

.visit-line a { color: var(--bone); }

.visit-note {
  border-left: 3px solid var(--brass);
  padding-left: 1.4rem;
  color: #d8d2c8;
  font-size: 1.02rem;
}

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

/* ---------- catalog page ---------- */

.catalog-head { padding-bottom: 0; }

.catalog-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.8rem; }

.filter-bar { display: flex; gap: 0.6rem; margin-top: 1.6rem; }

.chip {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.chip.active { background: var(--ink); color: var(--bone); border-color: var(--ink); }

/* ---------- modal ---------- */

.modal-backdrop[hidden] { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 26, 23, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  position: relative;
  background: var(--bone);
  border-radius: 16px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.modal-media { background: var(--bone-2); padding: 2rem; display: flex; align-items: center; }

.modal-media img, .modal-media canvas { width: 100%; box-shadow: var(--shadow); }

.modal-body { padding: 2rem; }

.modal-body h2 { font-size: 1.6rem; margin-bottom: 0.4rem; }

.modal-meta { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 1rem; }

.modal-desc { font-size: 0.98rem; color: var(--ink-soft); margin-bottom: 1.2rem; }

.modal-price { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 1.2rem; }

.modal-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1rem; }

.modal-fineprint { font-size: 0.8rem; color: var(--ink-soft); }

.modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  color: var(--ink-soft);
  z-index: 1;
}

.modal-close:hover { color: var(--ink); }

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

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem clamp(1rem, 4vw, 3rem);
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}
