
/* =========================================
   1. GLOBAL VARIABLES
   ========================================= */

:root {
  --bg: #f7f3ec;
  --ink: #201d19;
  --mute: #6a645b;
  --line: #ddd5c7;
  --hl: #27384a;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* =========================================
   2. RESET AND GLOBAL STYLES
   ========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.7 var(--sans);
}

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

a {
  color: inherit;
}

/* =========================================
   3. TYPOGRAPHY
   ========================================= */

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 .6em;
}

h1 {
  font-size: clamp(2.8rem, 8vw, 6rem);
  letter-spacing: -.02em;
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  margin-top: 1.4em;
}

/* =========================================
   4. LAYOUT
   ========================================= */

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: clamp(2.5rem, 7vw, 5.5rem) 0;
}

section h2:first-child {
  margin-top: 0;
}

/* =========================================
   5. ACCESSIBILITY
   ========================================= */

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--ink);
  color: #fff;
  padding: .5rem 1rem;
  z-index: 99;
}

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

/* =========================================
   6. HEADER AND NAVIGATION
   ========================================= */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 243, 236, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  text-decoration: none;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  padding: .25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}

nav a:hover,
nav a[aria-current] {
  border-color: var(--ink);
}

.menu-btn {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Mobile navigation */

@media (max-width: 720px) {
  .menu-btn {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  nav ul.open {
    display: flex;
  }

  nav li a {
    display: block;
    padding: 1rem 1.5rem;
    border: 0;
  }
}

/* =========================================
   7. HOMEPAGE HERO
   ========================================= */

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 2rem;
}

.hero .wrap {
  animation: rise .9s both;
}

.hero p {
  max-width: 34rem;
  font: 1.2rem/1.6 var(--serif);
  color: var(--mute);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* =========================================
   8. BUTTONS AND LINKS
   ========================================= */

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  padding: .8rem 1.6rem;
  text-decoration: none;
  transition: background .3s, color .3s;
}

.btn:hover,
.btn.ghost {
  background: transparent;
  color: var(--ink);
}

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

.link {
  text-underline-offset: .25em;
}

/* =========================================
   9. PROFESSIONAL ARTWORK GRID
   ========================================= */

/* Main gallery, featured work and preview */

[data-gallery],
[data-featured],
[data-preview] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  width: 100%;
  align-items: stretch;
}

/* Override previous masonry and column layouts */

.masonry {
  columns: initial;
  column-count: initial;
  column-width: auto;
  column-gap: normal;
}

/* Individual artwork card */

.art {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Uniform 4:5 Instagram-style image frame */

.art .frame {
  display: flex;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 10px;
  background: transparent;
}

/* Show the complete artwork without cropping or distortion */

.art .frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}

/* Subtle professional hover effect */

@media (hover: hover) and (pointer: fine) {
  .art:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(32, 29, 25, .10);
  }

  .art:hover .frame img {
    transform: scale(1.025);
  }
}

.art:focus-visible {
  outline: 2px solid var(--hl);
  outline-offset: 4px;
}

/* Artwork captions */

.art .cap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 12px 2px;
  font-size: .9rem;
}

.art .cap b {
  font-weight: 600;
}

.art .cap i {
  font-style: normal;
  color: var(--mute);
  text-align: right;
}

/* =========================================
   10. OTHER CONTENT LAYOUTS
   ========================================= */

.split {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.prose {
  max-width: 40rem;
}

.prose.c {
  margin: 0 auto 1.5rem;
}

.cta {
  border-top: 1px solid var(--line);
  text-align: center;
}

.msg {
  color: var(--mute);
}

.gap {
  margin-top: 2.5rem;
}

/* =========================================
   11. GALLERY PAGE
   ========================================= */

.page-head {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

/* Placeholder images */

.ph {
  aspect-ratio: 4 / 5;
  background: #ebe5d8;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  color: var(--mute);
}

/* Gallery filter buttons */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.6rem;
  margin: 0 0 2.5rem;
}

.filters button {
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  font: inherit;
  color: var(--mute);
  cursor: pointer;
  padding: .15rem 0;
}

.filters button[aria-pressed=true] {
  color: var(--ink);
  border-color: var(--ink);
}

/* =========================================
   12. DETAILS AND TABLES
   ========================================= */

details {
  border-bottom: 1px solid var(--line);
  padding: .9rem 0;
}

summary {
  cursor: pointer;
  font: 1.2rem var(--serif);
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
}

/* =========================================
   13. FOOTER
   ========================================= */

footer.site {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--mute);
  font-size: .9rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

/* =========================================
   14. LIGHTBOX
   ========================================= */

body:has(dialog[open]) {
  overflow: hidden;
}

.lb {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  color: #fff;
}

.lb::backdrop {
  background: rgba(22, 19, 16, .95);
}

.lb[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade .3s;
}

.lb figure {
  margin: 0;
  width: min(88vw, 1400px);
  max-width: 88vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.lb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 88vw;
  max-height: 78vh;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.lb figcaption {
  padding-top: .8rem;
  font-size: .9rem;
  opacity: .85;
}

.lb button {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  padding: .5rem 1rem;
  cursor: pointer;
}

.lb-x {
  top: .5rem;
  right: .5rem;
}

.lb-p {
  left: .3rem;
  top: 45%;
}

.lb-n {
  right: .3rem;
  top: 45%;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

/* =========================================
   15. RESPONSIVE GRID
   ========================================= */

/* Tablet */

@media (max-width: 900px) {
  [data-gallery],
  [data-featured],
  [data-preview] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

/* Mobile */

@media (max-width: 560px) {
  [data-gallery],
  [data-featured],
  [data-preview] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .art .cap {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    min-height: 64px;
  }

  .art .cap i {
    text-align: left;
  }
}

/* Very small mobile screens */

@media (max-width: 359px) {
  [data-gallery],
  [data-featured],
  [data-preview] {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   16. REDUCED MOTION ACCESSIBILITY
   ========================================= */

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


/* =========================================
   PAYMENT PAGE
   ========================================= */

.payment-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.payment-label {
  display: block;
  margin-bottom: .5rem;
  color: var(--mute);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
}

.payment-section h2 {
  margin-top: 0;
}

.payment-email {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-top: 1.5rem;
  font-size: .95rem;
}

.payment-email span,
.payment-note {
  color: var(--mute);
}

.payment-email a {
  overflow-wrap: anywhere;
  text-underline-offset: .25em;
}

.payment-qr {
  width: min(100%, 240px);
  margin: 1.5rem 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
}

.payment-qr img {
  display: block;
  width: 100%;
  height: auto;
}

.payment-qr figcaption {
  padding-top: .8rem;
  color: var(--mute);
  font-size: .85rem;
  text-align: center;
}

.payment-note {
  font-size: .9rem;
}
.commission-status[data-status="open"] {
  color: #287548;
  border-color: #287548;
}

.commission-status[data-status="closed"] {
  color: #a33b32;
  border-color: #a33b32;
}

.commission-status[data-status="paused"] {
  color: var(--mute);
  border-color: var(--line);
}
.social-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 1.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  transition: transform .25s ease;
}

.social-links a:hover {
  transform: translateY(-4px);
}

.social-links img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
/* Smooth page transitions */

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-exit 0.3s ease both;
}

::view-transition-new(root) {
  animation: page-enter 0.4s ease both;
}

@keyframes page-exit {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* Keep artwork cards smaller on both Home and Gallery pages */
[data-preview],
[data-gallery] {
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, 240px), 280px)
  );
  justify-content: center;
  gap: 24px;
}

[data-preview] .art,
[data-gallery] .art {
  width: 100%;
}

