:root {
  color-scheme: light;
  --ink: #171412;
  --muted: #665f58;
  --paper: #fbf8f2;
  --surface: #ffffff;
  --line: #dfd8ce;
  --clay: #b84a38;
  --clay-dark: #7f2e25;
  --moss: #486450;
  --moss-soft: #e7eee8;
  --sky: #dcecf2;
  --gold: #d7a642;
  --shadow: 0 20px 50px rgba(34, 28, 23, 0.12);
  --page-gutter: clamp(16px, 4vw, 56px);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 18px var(--page-gutter);
  background: rgba(251, 248, 242, 0.9);
  border-bottom: 1px solid rgba(223, 216, 206, 0.8);
  backdrop-filter: blur(14px);
}

.brand,
.site-nav,
.hero-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-name {
  overflow-wrap: anywhere;
}

.brand-mark {
  flex: 0 0 auto;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: "Playfair Display", Georgia, serif;
}

.site-nav {
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.link-button:hover,
.link-button:focus-visible {
  color: var(--clay);
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(34px, 7vw, 92px) var(--page-gutter) clamp(42px, 6vw, 76px);
}

.hero-copy {
  max-width: 670px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--clay-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 0.98;
}

h1 {
  max-width: 13ch;
  margin-bottom: 22px;
  font-size: clamp(3rem, 8vw, 7.2rem);
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.hero-copy p:not(.eyebrow),
.section-heading p,
.contact-copy p {
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--clay);
  color: #fffaf2;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--clay-dark);
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

.button.danger {
  border-color: #d9b8b3;
  background: #fff5f3;
  color: var(--clay-dark);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.hero-gallery {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  grid-template-rows: repeat(2, minmax(180px, 1fr));
  gap: 14px;
  min-height: clamp(320px, 46vw, 520px);
  min-width: 0;
}

.hero-gallery img,
.art-card img,
.shop-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface);
}

.hero-gallery img {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-gallery img:first-child {
  grid-row: 1 / 3;
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.intro-band div {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 24px 16px;
  text-align: center;
}

.intro-band div + div {
  border-left: 1px solid var(--line);
}

.metric {
  color: var(--moss);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
}

.section,
.shop-section,
.contact-section {
  padding: clamp(56px, 8vw, 110px) var(--page-gutter);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-heading code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--moss-soft);
  color: var(--moss);
  font-size: 0.9em;
}

.status-banner,
.empty-state {
  margin: 18px var(--page-gutter) 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
}

.portfolio-grid,
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 18px;
}

.art-card,
.shop-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(34, 28, 23, 0.08);
}

.shop-card {
  display: flex;
  flex-direction: column;
}

.art-card img {
  aspect-ratio: 4 / 5;
}

.shop-card img {
  flex: 0 0 auto;
  height: auto;
  aspect-ratio: 1 / 1;
}

.art-card-content,
.shop-card-content {
  padding: 18px;
}

.shop-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.art-meta,
.shop-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.art-card p,
.shop-card p {
  color: var(--muted);
  line-height: 1.55;
}

.shop-section {
  background: var(--moss-soft);
}

.shop-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
}

.price {
  color: var(--clay-dark);
  font-weight: 800;
}

.purchase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.buy-button {
  width: 100%;
  margin-top: 8px;
}

.shop-card .buy-button {
  margin-top: auto;
  background: var(--ink);
  color: var(--paper);
}

.shop-card .buy-button:hover,
.shop-card .buy-button:focus-visible {
  background: var(--clay-dark);
}

.contact-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(28px, 6vw, 90px);
  background: var(--ink);
  color: var(--paper);
}

.contact-copy p,
.contact-list dd,
.site-footer {
  color: rgba(251, 248, 242, 0.72);
}

.contact-list {
  display: grid;
  gap: 18px;
  margin: 30px 0 0;
}

.contact-list div {
  display: grid;
  gap: 4px;
}

.contact-list dt {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
  font-size: 1.1rem;
}

.contact-list a {
  text-decoration-color: rgba(251, 248, 242, 0.35);
}

.contact-form {
  display: grid;
  gap: 16px;
  align-self: start;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(251, 248, 242, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: rgba(251, 248, 242, 0.82);
  font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid rgba(251, 248, 242, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--paper);
  font: inherit;
  padding: 12px 14px;
}

.contact-form textarea,
.admin-form textarea {
  resize: vertical;
}

.admin-body {
  min-height: 100vh;
  background: var(--paper);
}

.admin-shell {
  padding: clamp(30px, 5vw, 64px) var(--page-gutter);
}

.admin-panel,
.admin-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(34, 28, 23, 0.08);
}

.admin-panel {
  padding: clamp(18px, 3vw, 28px);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(min(100%, 320px), 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
}

.admin-stack {
  display: grid;
  gap: 20px;
}

.admin-menu {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-menu-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.admin-menu-button.active,
.admin-menu-button:hover,
.admin-menu-button:focus-visible {
  border-color: var(--line);
  background: var(--moss-soft);
  color: var(--moss);
}

.full-width {
  grid-column: 1 / -1;
}

.admin-form {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
}

.compact-form {
  max-width: 480px;
}

.admin-form h1,
.admin-form h2,
.admin-panel h1,
.admin-panel h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.two-column,
.three-column,
.admin-heading-row,
.admin-actions,
.admin-item-title {
  display: flex;
  gap: 12px;
}

.two-column > *,
.three-column > * {
  flex: 1 1 0;
  min-width: min(100%, 14rem);
}

.inline-admin-form {
  margin: 18px 0;
  box-shadow: none;
}

.checkout-shell {
  padding: clamp(30px, 5vw, 64px) var(--page-gutter);
}

.checkout-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(34, 28, 23, 0.08);
}

.checkout-status {
  margin-bottom: 18px;
}

#checkout {
  min-height: 520px;
}

.checkbox-label {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  flex-direction: row;
}

.checkbox-label input {
  width: auto;
}

.form-message {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.admin-heading-row,
.admin-item-title {
  align-items: center;
  justify-content: space-between;
}

.admin-items {
  display: grid;
  gap: 14px;
}

.admin-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-item img {
  width: 112px;
  height: 112px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--paper);
}

.invoice-icon {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 6px;
  background: var(--moss-soft);
  color: var(--moss);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
}

.invoice-error {
  color: var(--clay-dark) !important;
  font-weight: 700;
}

.admin-item h3,
.admin-item p {
  margin-bottom: 8px;
}

.admin-item p {
  color: var(--muted);
  line-height: 1.45;
}

.admin-actions {
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill.available {
  background: var(--moss-soft);
  color: var(--moss);
}

.status-pill.reserved {
  background: #fff2cf;
  color: #745300;
}

.status-pill.sold {
  background: #f6d8d2;
  color: var(--clay-dark);
}

.status-pill.sent {
  background: var(--moss-soft);
  color: var(--moss);
}

.status-pill.failed,
.status-pill.missing-email {
  background: #f6d8d2;
  color: var(--clay-dark);
}

.status-pill.pending,
.status-pill.not-configured {
  background: #fff2cf;
  color: #745300;
}

.site-footer {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 24px var(--page-gutter);
  background: var(--ink);
  border-top: 1px solid rgba(251, 248, 242, 0.1);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--paper);
}

@media (max-width: 980px) {
  .hero,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-gallery {
    min-height: 420px;
  }

  .portfolio-grid,
  .shop-grid,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer,
  .intro-band {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.4rem, 14vw, 4.8rem);
  }

  .hero-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: 0;
  }

  .hero-gallery img,
  .hero-gallery img:first-child {
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }

  .intro-band div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .portfolio-grid,
  .shop-grid {
    grid-template-columns: 1fr;
  }

  .two-column,
  .admin-heading-row,
  .admin-item-title {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-item {
    grid-template-columns: 1fr;
  }

  .admin-item img,
  .invoice-icon {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .site-footer {
    flex-direction: column;
  }
}
