/* ===== Testing Art Gallery — global styles ===== */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Work+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #f5f0e6;
  --surface: #fffcf6;
  --ink: #211c16;
  --muted: #6f675a;
  --line: #ded4c2;
  --accent: #b34e2a;
  --accent-ink: #fff9f2;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
  --space-9: 128px;

  --display: "Fraunces", serif;
  --body: "Work Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.eyebrow {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

@media (max-width: 640px) {
  .wrap { padding: 0 var(--space-4); }
}

/* ===== Nav ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.wordmark {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.wordmark span {
  display: block;
  font-family: var(--body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  gap: var(--space-5);
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 320px; }
  .main-nav a {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--line);
    width: 100%;
  }
  .nav-toggle { display: flex; }
}

/* ===== Footer ===== */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: var(--space-8);
  padding: var(--space-6) 0 var(--space-5);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 12px;
  font-family: var(--body);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-3);
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.footer-bottom {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover { background: var(--ink); color: var(--accent-ink); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
}

/* ===== Hero (shared, simple pages) ===== */

.page-hero {
  padding: var(--space-8) 0 var(--space-6);
  border-bottom: 1px solid var(--line);
}

.page-hero .eyebrow { margin-bottom: var(--space-3); }

.page-hero h1 {
  font-size: clamp(36px, 5.5vw, 64px);
  max-width: 16ch;
}

.page-hero .lede {
  margin-top: var(--space-4);
  max-width: 56ch;
  font-size: 18px;
  color: var(--muted);
}

/* ===== Landing hero ===== */

.home-hero {
  position: relative;
  padding: var(--space-8) 0 var(--space-7);
  overflow: hidden;
}

.home-hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-7);
  align-items: center;
}

.home-hero-copy .eyebrow {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.7s ease forwards 0.05s;
}

.home-hero-copy h1 {
  font-size: clamp(40px, 6vw, 76px);
  margin-top: var(--space-3);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease forwards 0.15s;
}

.home-hero-copy .lede {
  margin-top: var(--space-4);
  font-size: 18px;
  color: var(--muted);
  max-width: 46ch;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease forwards 0.3s;
}

.home-hero-copy .cta-row {
  margin-top: var(--space-5);
  display: flex;
  gap: var(--space-3);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease forwards 0.42s;
}

.home-hero-art {
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 1s ease forwards 0.2s;
}

.home-hero-art img { width: 100%; height: 100%; object-fit: cover; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

@media (max-width: 860px) {
  .home-hero .wrap { grid-template-columns: 1fr; gap: var(--space-5); }
  .home-hero-art { order: -1; }
}

/* ===== Filter bar ===== */

.filter-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--space-4) 0;
  position: sticky;
  top: 84px;
  background: var(--bg);
  z-index: 40;
}

.filter-bar .wrap {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-field select {
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 6px 20px 6px 0;
  min-width: 150px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236F675A'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}

.filter-field select:focus { outline: none; border-bottom-color: var(--accent); }

.filter-clear {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.filter-clear:hover { border-bottom-color: var(--accent); }

.filter-count {
  font-size: 13px;
  color: var(--muted);
  width: 100%;
  order: 99;
  padding-top: var(--space-2);
}

@media (max-width: 640px) {
  .filter-bar { position: static; }
  .filter-field select { min-width: 120px; }
}

/* ===== Gallery grid ===== */

.gallery-section { padding: var(--space-7) 0 var(--space-8); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6) var(--space-5);
}

@media (max-width: 960px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

.art-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.art-card.in-view { opacity: 1; transform: translateY(0); }

.art-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.art-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.art-card:hover .art-card-media img { transform: scale(1.045); }

.view-pill {
  position: absolute;
  left: 50%;
  bottom: var(--space-4);
  transform: translate(-50%, 10px);
  background: var(--ink);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.art-card:hover .view-pill,
.art-card:focus-within .view-pill {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (hover: none) {
  .view-pill { opacity: 1; transform: translate(-50%, 0); position: static; margin-top: var(--space-3); transform: none; }
}

.art-card-info {
  margin-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}

.art-card-title {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
}

.art-card-artist {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.art-card-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.no-results {
  padding: var(--space-8) 0;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  display: none;
}
.no-results.visible { display: block; }

/* ===== Artwork detail page ===== */

.artwork-detail { padding: var(--space-7) 0 var(--space-8); }

.artwork-columns {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-7);
  align-items: start;
}

.back-link {
  display: inline-block;
  margin-bottom: var(--space-5);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.back-link:hover { color: var(--accent); border-color: var(--accent); }

.artwork-media {
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.artwork-media img { width: 100%; height: 100%; object-fit: cover; }

.artwork-id-tag {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.artwork-info h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.artwork-info .artist-line {
  margin-top: var(--space-2);
  font-size: 17px;
  color: var(--muted);
}

.artwork-price {
  margin-top: var(--space-4);
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--display);
}

.artwork-desc {
  margin-top: var(--space-5);
  font-size: 16px;
  color: var(--ink);
  max-width: 52ch;
}

.spec-table {
  margin-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.spec-row dt { color: var(--muted); }
.spec-row dd { margin: 0; font-weight: 500; text-align: right; }

.artwork-cta {
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

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

/* ===== Generic content pages ===== */

.content-section {
  padding: var(--space-7) 0;
  border-bottom: 1px solid var(--line);
}
.content-section:last-of-type { border-bottom: none; }

.content-section .wrap {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: var(--space-6);
}

.content-section h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  position: sticky;
  top: 140px;
}

.content-body { max-width: 62ch; }
.content-body p + p { margin-top: var(--space-4); }
.content-body h3 {
  font-size: 18px;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

.content-body ul {
  margin: var(--space-3) 0 0;
  padding-left: 20px;
}
.content-body li { margin-bottom: var(--space-2); }

.step-list { counter-reset: step; margin-top: var(--space-3); }
.step-item {
  counter-increment: step;
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
}
.step-item:first-child { border-top: none; }
.step-item::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--display);
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
  width: 40px;
}
.step-item h3 { margin: 0 0 var(--space-2); font-size: 17px; }
.step-item p { color: var(--muted); font-size: 15px; }

@media (max-width: 860px) {
  .content-section .wrap { grid-template-columns: 1fr; }
  .content-section h2 { position: static; }
}

/* ===== Contact / forms ===== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
}

.form-field { margin-bottom: var(--space-4); }
.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.form-field textarea { resize: vertical; min-height: 120px; }

.form-note {
  margin-top: var(--space-3);
  font-size: 13px;
  color: var(--muted);
}

.info-block { margin-bottom: var(--space-5); }
.info-block h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}
.info-block p { color: var(--ink); font-size: 15px; }

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

/* ===== Exhibition list ===== */

.exhibition-list { margin-top: var(--space-3); }
.exhibition-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
}
.exhibition-item:first-child { border-top: none; }
.exhibition-item .ex-date {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.exhibition-item h3 { font-size: 20px; margin-bottom: var(--space-2); }
.exhibition-item p { color: var(--muted); font-size: 14px; }
.exhibition-item .ex-status {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .exhibition-item { grid-template-columns: 1fr; gap: var(--space-2); }
}
