/* =====================================================================
   Beverly Barris Fine Art
   1. Tokens & reset
   2. Layout & utilities
   3. Buttons
   4. Forms & alerts
   5. Header / navigation
   6. Footer
   7. Grid & painting cards
   8. Gallery filters
   9. Painting detail
   10. Cart
   11. Order confirmation
   12. Error pages
   13. Home: hero, stats, features, CTA band
   14. About page
   15. Contact page
   ===================================================================== */

/* 1. TOKENS & RESET ===================================================== */
:root {
  --bg:     #1C1C1C;
  --fg:     #FFFFFF;
  --surface: #262626;
  --surface-2: #2E2E2E;
  --muted:  #A6A6A6;
  --line:   rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.9);
  --accent: #C7A567;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 10px 24px -14px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max:    1180px;
  --sans:   -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; outline: 0; }

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: var(--sans);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 0.6em; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 3vw + 1.2rem, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

a { color: var(--fg); text-decoration: none; }
a.underline, .prose a { color: var(--accent); }
img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: #1c1c1c; }

/* 2. LAYOUT & UTILITIES ================================================ */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 5rem 0; }
.section-tight { padding: 3rem 0; }

.muted  { color: var(--muted); }
.small  { font-size: 0.85rem; }
.center { text-align: center; }
.narrow { max-width: 480px; margin: 0 auto; }
.prose  { max-width: 680px; }
.prose p { color: var(--muted); }
.lead   { color: var(--muted); font-size: 1.1rem; margin-top: -0.75em; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.section-head { max-width: 640px; margin: 0 0 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* 3. BUTTONS ============================================================ */
.btn, .btn-ghost, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85em 1.9em;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn {
  color: var(--bg);
  background: var(--fg);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }

.btn-ghost, .btn-secondary {
  color: var(--fg);
  background: transparent;
  border-color: var(--line-strong);
}
.btn-ghost:hover, .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-lg { padding: 1em 2.3em; font-size: 1rem; }

.inline-form { display: inline; margin: 0; }

.linklike {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}
.linklike:hover { color: var(--fg); }

.actions { display: flex; gap: 1rem; flex-wrap: wrap; margin: 2rem 0; }
.actions.center { justify-content: center; }

/* 4. FORMS & ALERTS ===================================================== */
.form { display: flex; flex-direction: column; gap: 1.2rem; max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-label { font-size: 0.85rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

.form input, .form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form input::placeholder, .form textarea::placeholder { color: #7a7a7a; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.form textarea { resize: vertical; min-height: 140px; }
.form .btn { align-self: flex-start; }

.flash-area:empty { display: none; }
.flash-area { margin-top: 1.5rem; }
.alert, .alert-success, .alert-error {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.alert::before, .alert-success::before, .alert-error::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.alert-success::before { background: #3ecf8e; }
.alert-error::before   { background: #ff6b6b; }

/* 5. HEADER / NAVIGATION ================================================ */
.announce {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
}
.announce .container { text-align: center; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.02em; }
.announce strong { color: var(--fg); }

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(28, 28, 28, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  z-index: 40;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}
.brand { font-weight: 700; font-size: 1.35rem; text-decoration: none; letter-spacing: -0.01em; }

.nav-links { display: flex; align-items: center; gap: 2.1rem; }
.nav-links a { font-size: 0.94rem; text-decoration: none; color: var(--muted); transition: color 0.2s ease; position: relative; }
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--fg); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--accent);
}
.nav-links .btn, .nav-links .btn-ghost { font-size: 0.85rem; padding: 0.6em 1.4em; }
.nav-links .linklike { font-size: 0.94rem; text-align: left; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle-bar { display: block; width: 22px; height: 2px; background: var(--fg); transition: transform 0.2s ease, opacity 0.2s ease; }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 84px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.5rem 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a, .nav-links .inline-form {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a.active::after { display: none; }
}

/* 6. FOOTER ============================================================= */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 4.5rem 0 3rem;
}
.footer-brand .foot-word { font-weight: 700; font-size: 1.35rem; text-decoration: none; letter-spacing: -0.01em; }
.footer-brand p { color: var(--muted); max-width: 320px; margin: 1rem 0 1.5rem; }

.footer-social { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.footer-social a:hover { color: var(--fg); border-color: var(--line-strong); transform: translateY(-2px); }

.footer-col h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg); margin-bottom: 1.3rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.footer-col a { font-size: 0.95rem; color: var(--muted); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--fg); }
.footer-col p { color: var(--muted); margin: 0 0 0.85rem; font-size: 0.95rem; }

.foot-base {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
}

/* 7. GRID & PAINTING CARDS ============================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.25rem;
}

.card { display: flex; flex-direction: column; color: inherit; text-decoration: none; }

.card-img { position: relative; aspect-ratio: 4 / 5; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover .card-img img { transform: scale(1.06); }
.card:hover .card-title { color: var(--accent); }

.card-body { padding: 1.1rem 0.1rem 0; }
.card-title { margin: 0; font-size: 1.05rem; font-weight: 600; transition: color 0.2s ease; }
.card-meta { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--muted); }
.card-price { margin: 0.5rem 0 0; font-size: 0.95rem; font-weight: 600; }

.badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 999px;
  color: var(--bg);
  background: var(--fg);
}

/* 8. GALLERY FILTERS ===================================================== */
.gallery-head { margin-bottom: 2.5rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0 3rem; }
.filters a {
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--muted);
  padding: 0.55em 1.2em;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.2s ease;
}
.filters a:hover { color: var(--fg); border-color: var(--line-strong); }
.filters a.active { color: var(--bg); background: var(--fg); border-color: var(--fg); }

/* 9. PAINTING DETAIL ===================================================== */
.painting-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: start; }

.painting-stage { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.painting-stage img { width: 100%; }

.thumbs { display: flex; gap: 0.6rem; margin-top: 0.9rem; flex-wrap: wrap; }
.thumb { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: none; cursor: pointer; width: 72px; height: 72px; transition: border-color 0.2s ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active, .thumb:hover { border-color: var(--line-strong); }

.painting-info { position: sticky; top: 6rem; }
.painting-price { font-size: 1.4rem; font-weight: 600; margin: 0.6rem 0 1.4rem; }
.painting-note {
  margin-top: 1.75rem;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
}
.painting-note strong { color: var(--fg); }

.back-link { display: inline-block; margin-top: 1.75rem; color: var(--muted); transition: color 0.2s ease; }
.back-link:hover { color: var(--fg); }

.related { margin-top: 6rem; }

@media (max-width: 860px) {
  .painting-grid { grid-template-columns: 1fr; }
  .painting-info { position: static; }
}

/* 10. CART =============================================================== */
.cart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }

.cart-list { list-style: none; margin: 2rem 0; padding: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.cart-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 1.25rem; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
.cart-thumb { width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info p { margin: 0.2rem 0; }
.cart-name { font-weight: 600; text-decoration: none; }

.cart-summary { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; background: var(--surface); }
.cart-summary-row { display: flex; justify-content: space-between; margin: 0.85rem 0; }

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

/* 11. ORDER CONFIRMATION ================================================= */
.order-items { list-style: none; margin: 2rem 0; padding: 0; border-top: 1px solid var(--line); }
.order-row { display: flex; justify-content: space-between; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.order-total { display: flex; justify-content: space-between; font-weight: 600; margin: 1.25rem 0 2rem; font-size: 1.1rem; }

/* 12. ERROR PAGES ========================================================= */
.error-details { margin-top: 1.75rem; }
.error-stack {
  background: var(--surface);
  padding: 1.25rem;
  overflow: auto;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

/* 13. HOME: HERO, STATS, FEATURES, CTA BAND ============================= */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(28,28,28,0.6) 60%, var(--bg) 100%), url("/images/paintings/4.jpeg") center / cover no-repeat;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; text-align: center; margin: 0 auto; max-width: 760px; padding: 0 1.5rem; }
.hero .eyebrow { color: #f0dfb8; }
.hero h1 { font-size: clamp(2.6rem, 5vw + 1.2rem, 4.4rem); margin-bottom: 0.45em; }
.hero p.lead { font-size: 1.15rem; max-width: 560px; margin: 0 auto 2rem; color: rgba(255,255,255,0.82); }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--line);
}
.stat { text-align: center; }
.stat-num { display: block; font-size: clamp(1.8rem, 2vw + 1rem, 2.4rem); font-weight: 700; color: var(--accent); margin-bottom: 0.3rem; }
.stat-label { color: var(--muted); font-size: 0.9rem; letter-spacing: 0.02em; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.feature { padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s ease, transform 0.25s var(--ease); }
.feature:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.feature-num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-weight: 600; margin-bottom: 1.25rem; }
.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.split-img img { width: 100%; height: 100%; object-fit: cover; }
.split-copy p { color: var(--muted); }

.quote-block {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.quote-block blockquote {
  margin: 0 0 1.25rem;
  font-size: clamp(1.3rem, 1.6vw + 1rem, 1.8rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.quote-block cite { font-style: normal; color: var(--muted); font-size: 0.95rem; }

.cta-band {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4rem 3rem;
  text-align: center;
}
.cta-band h2 { margin-bottom: 0.6rem; }
.cta-band p { color: var(--muted); max-width: 480px; margin: 0 auto 2rem; }

@media (max-width: 860px) {
  .stats-strip { grid-template-columns: 1fr; gap: 2.25rem; }
  .features { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .cta-band { padding: 3rem 1.75rem; }
}

/* 14. ABOUT PAGE ========================================================= */
.about-hero { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: center; }
.about-portrait { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-facts { list-style: none; margin: 2rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.about-facts li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.about-facts span:first-child { color: var(--muted); }

@media (max-width: 860px) {
  .about-hero { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* 15. CONTACT PAGE ======================================================= */
.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 880px;
}
.method-card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, transform 0.25s var(--ease);
}
.method-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.method-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.method-name { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.3rem; }
.method-value { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.4rem; }
.method-card:hover .method-value { color: var(--accent); }

.contact-note { margin-top: 3rem; max-width: 640px; }

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