/* ==========================================================================
   Eric Walker Painting — light, minimal, gallery-first design system
   ========================================================================== */

:root {
  --ink: #1e1e1e;
  --paper: #ffffff;
  --paper-2: #fafaf8;
  --white: #ffffff;

  --grey-100: #f2f1ef;
  --grey-300: #e3e1dd;
  --grey-500: #a3a09b;
  --grey-700: #6f6c67;

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --container: 1360px;
  --gutter: clamp(20px, 4vw, 56px);
  --header-h: 84px;
}

/* ---------- reset ---------- */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.1; font-weight: 500; }
p { line-height: 1.7; margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-700);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  color: var(--ink);
  border-bottom: 1px solid var(--grey-300);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo span { color: var(--grey-500); }

.main-nav { display: flex; align-items: center; gap: 2.4rem; }
.main-nav > ul { display: flex; align-items: center; gap: 2.4rem; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.open > a { border-color: var(--ink); }

.has-dropdown > .dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  color: var(--ink);
  width: max-content;
  max-width: min(680px, calc(100vw - 2 * var(--gutter)));
  column-count: 3;
  column-gap: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.2s ease, opacity 0.15s ease;
  box-shadow: 0 18px 40px rgba(0,0,0,0.1);
  border: 1px solid var(--grey-300);
  border-top: none;
  padding: 0;
}
.has-dropdown:hover > .dropdown,
.has-dropdown.open > .dropdown {
  max-height: 640px;
  opacity: 1;
  pointer-events: auto;
}
.dropdown li { break-inside: avoid; }
.dropdown li a {
  display: block;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 400;
  border-bottom: 1px solid var(--grey-100);
}
.dropdown li a:hover { background: var(--grey-100); color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }

/* ---------- mobile nav ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; z-index: 260; }
  .main-nav {
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.5rem var(--gutter) 3rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    gap: 0;
  }
  body.nav-open .main-nav { transform: translateX(0); }
  body.nav-open .nav-toggle .icon-menu { display: none; }
  body.nav-open .nav-toggle .icon-close { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .main-nav > ul > li { border-bottom: 1px solid var(--grey-300); }
  .main-nav > ul > li > a { color: var(--ink); padding: 1rem 0; width: 100%; }
  .has-dropdown > .dropdown {
    position: static;
    transform: none;
    max-height: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    width: 100%;
    max-width: none;
    column-count: 1;
  }
  .has-dropdown.open > .dropdown { max-height: 2000px; opacity: 1; }
  .dropdown li a { color: var(--ink); border-bottom-color: var(--grey-100); }
  .dropdown li a:hover { background: transparent; color: var(--grey-700); }
}

/* ---------- hero ---------- */
.hero {
  background: var(--paper);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  padding-top: clamp(50px, 8vw, 100px);
  padding-bottom: clamp(50px, 8vw, 100px);
  min-height: calc(100vh - var(--header-h));
}
.hero-text .eyebrow { margin-bottom: 1.4rem; display: block; }
.hero-text h1 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.hero-text h1 em {
  font-style: italic;
  color: var(--grey-700);
  font-weight: 400;
}
.hero-text p {
  margin-top: 1.8rem;
  font-size: 1.05rem;
  max-width: 40ch;
  color: var(--grey-700);
}
.hero-cta { margin-top: 2.4rem; display: flex; gap: 1.2rem; flex-wrap: wrap; }

.btn {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 1.7rem;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-solid { border-color: var(--ink); }
.btn-outline { border-color: var(--grey-500); }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.hero-frame {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--paper-2);
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; min-height: auto; padding-top: 2.5rem; }
  .hero-frame { order: -1; max-width: 460px; margin: 0 auto; }
}

/* ---------- section headers ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 500;
}
.section-head .eyebrow { margin-bottom: 0.7rem; display: block; }

/* ---------- featured rows (home) ---------- */
.featured-section { padding: clamp(70px, 9vw, 140px) 0; }
.featured-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(40px, 6vw, 80px) 0;
  border-top: 1px solid var(--grey-300);
}
.featured-row:last-of-type { border-bottom: 1px solid var(--grey-300); }
.featured-row:nth-child(even) .featured-image { order: 2; }
.featured-row:nth-child(even) .featured-text { order: 1; }
.featured-image { display: block; background: var(--paper-2); }
.featured-image img { width: 100%; height: auto; transition: opacity 0.2s ease; }
.featured-image:hover img { opacity: 0.92; }
.featured-text .eyebrow { margin-bottom: 0.8rem; display: block; }
.featured-text h3 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
}
.featured-meta {
  margin-top: 0.7rem;
  color: var(--grey-700);
  font-size: 0.95rem;
}
.featured-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.2rem;
}
.featured-link svg { width: 15px; height: 15px; }
.featured-link:hover { color: var(--grey-700); border-color: var(--grey-700); }
.featured-cta { text-align: center; margin-top: clamp(40px, 6vw, 70px); }

@media (max-width: 760px) {
  .featured-row { grid-template-columns: 1fr; gap: 1.6rem; }
  .featured-row:nth-child(even) .featured-image,
  .featured-row:nth-child(even) .featured-text { order: 0; }
}

/* ---------- gallery ---------- */
.gallery-section { padding: clamp(70px, 9vw, 140px) 0; }

.filter-bar {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.filter-bar button {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--grey-700);
  padding: 0.2rem 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.filter-bar button.active,
.filter-bar button:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}
.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 4/5;
}
.gallery-item a { display: block; width: 100%; height: 100%; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(0deg, rgba(255,255,255,0.95), rgba(255,255,255,0));
  color: var(--ink);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.gallery-item:hover .gallery-caption { transform: translateY(0); }
.gallery-caption .cap-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
}
.gallery-caption .cap-cat {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-700);
  font-weight: 500;
}
.gallery-item.is-hidden { display: none; }

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

/* ---------- quote strip (about teaser on home) ---------- */
.blockquote-strip {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(70px, 10vw, 140px) 0;
  text-align: center;
}
.blockquote-strip blockquote {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  max-width: 32ch;
  margin: 0 auto;
  line-height: 1.4;
}
.blockquote-strip cite {
  display: block;
  font-style: normal;
  margin-top: 1.6rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-700);
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--paper);
  color: var(--ink);
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--grey-300);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--grey-300);
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-logo span { color: var(--grey-500); }
.footer-contact p { margin: 0 0 0.4rem; color: var(--grey-700); }
.footer-contact a:hover { color: var(--ink); }
.footer-social { display: flex; gap: 0.8rem; }
.footer-social a {
  width: 40px; height: 40px;
  border: 1px solid var(--grey-300);
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  color: var(--ink);
}
.footer-social a:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom {
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--grey-500);
}
.footer-bottom a:hover { color: var(--ink); }

/* ---------- scroll to top ---------- */
#toTop {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--grey-300);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 150;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
#toTop.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#toTop svg { width: 18px; height: 18px; }

/* ---------- page title / breadcrumb bands ---------- */
.page-band {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(60px, 9vw, 110px) 0 clamp(30px, 5vw, 50px);
}
.page-band h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 500;
  margin-top: 0.7rem;
}

/* ---------- painting detail ---------- */
.painting-detail { padding: clamp(20px, 4vw, 40px) 0 clamp(80px, 10vw, 140px); }
.painting-detail .container {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.painting-figure { background: var(--paper-2); }
.painting-figure img { width: 100%; height: auto; }
.painting-meta {
  color: var(--ink);
  padding-top: 0.5rem;
  position: sticky;
  top: calc(var(--header-h) + 40px);
}
.painting-meta h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  margin-bottom: 1.8rem;
}
.painting-meta ul { display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 2.2rem; }
.painting-meta li {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--grey-300);
}
.painting-meta li:last-child { border-bottom: none; }
.painting-meta .meta-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  color: var(--grey-500);
}
.painting-meta .meta-value a { text-decoration: underline; }
.painting-meta .meta-value a:hover { opacity: 0.7; }

.painting-nav {
  display: flex;
  justify-content: space-between;
  margin-top: clamp(30px, 4vw, 50px);
  gap: 1rem;
  flex-wrap: wrap;
}
.painting-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--grey-700);
}
.painting-nav a:hover { color: var(--ink); }
.painting-nav .nav-next { margin-left: auto; text-align: right; }
.painting-nav svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .painting-detail .container { grid-template-columns: 1fr; }
  .painting-meta { position: static; }
}

/* ---------- about page ---------- */
.about-section { padding: clamp(60px, 8vw, 120px) 0; }
.about-section .container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.about-portrait {
  position: relative;
  background: var(--paper-2);
}
.about-copy h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 500; margin-bottom: 1.4rem; }
.about-copy p { color: var(--grey-700); }
@media (max-width: 860px) {
  .about-section .container { grid-template-columns: 1fr; }
  .about-portrait { max-width: 460px; margin: 0 auto; order: -1; }
}

/* ---------- contact page ---------- */
.contact-section { padding: clamp(60px, 8vw, 120px) 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(40px, 6vw, 90px);
}
.contact-info h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 500; margin-bottom: 1.1rem; }
.contact-info p { color: var(--grey-700); }
.contact-info .contact-detail { margin-top: 1.8rem; }
.contact-info .contact-detail a { font-weight: 500; }
.contact-info .contact-detail a:hover { color: var(--grey-700); }

.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  color: var(--grey-700);
}
.field input,
.field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--grey-300);
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.2rem;
  color: var(--ink);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.contact-form .btn { align-self: flex-start; }

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

/* ---------- thank you ---------- */
.thankyou-section {
  padding: clamp(90px, 14vw, 180px) 0;
  text-align: center;
}
.thankyou-section h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 500; margin-bottom: 1.2rem; }
.thankyou-section p { max-width: 46ch; margin: 0 auto 2.2rem; color: var(--grey-700); }
