* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

:root {
  --ink: #212121;
  --body: #4e4e4e;
  --paper: #fff;
  --soft: #f5f4ed;
  --border: #d8d8d8;
  --yellow: #ffc600;
  --dur: .6s;
  --ease: cubic-bezier(.33, 1, .68, 1);
  --pad: clamp(1.25rem, 8.3vw, 7.5rem);
}

body {
  margin: 0;
  color: var(--body);
  background: var(--paper);
  font: 300 18px/1.5 Archivo, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* Header and brush logo */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 130px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo__art {
  position: relative;
  display: block;
  width: clamp(215px, 26vw, 360px);
  aspect-ratio: 2048 / 640;
}

.site-logo__mark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Exact Prototype 19 painted links */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  white-space: nowrap;
}

.paint-link,
.wave-link {
  color: var(--ink);
  font-family: Syne, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}

.paint-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 80px;
  margin: 0 7px;
  font-size: 18px;
  letter-spacing: .02em;
}

.menu-item-text,
.wave-link > span {
  position: relative;
  display: inline-block;
  line-height: 1;
  padding: 0 12px 0 7px;
}

.menu-item-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  display: block;
  width: 100%;
  height: 12.084px;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--dur) var(--ease);
  pointer-events: none;
}

.menu-item-wave img {
  display: block;
  width: 100%;
  height: 12.084px;
  object-fit: fill;
}

.paint-link:hover .menu-item-wave,
.paint-link:focus-visible .menu-item-wave,
.paint-link.is-current .menu-item-wave,
.wave-link:hover .menu-item-wave,
.wave-link:focus-visible .menu-item-wave {
  clip-path: inset(0);
}

/* Public content */
.title-band {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
  align-items: end;
  padding: 88px var(--pad);
  background: var(--soft);
}

.title-band h1,
.content-page h1,
.about-hero h1,
.contact-layout h1,
.detail-panel h1 {
  margin: 0;
  color: var(--ink);
  font-family: Syne, Arial, sans-serif;
  font-weight: 700;
  line-height: .95;
  text-transform: uppercase;
}

.title-band h1 {
  font-size: clamp(3.4rem, 7vw, 7rem);
}

.title-band > p {
  max-width: 34rem;
  margin: 0;
}

.eyebrow {
  margin: 0 0 1.2rem;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.gallery {
  padding: 88px var(--pad) 145px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 72px 34px;
}

.art-card {
  min-width: 0;
}

.art-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  padding: clamp(2rem, 5vw, 5rem);
  overflow: hidden;
  background: #f8f7f2;
  text-decoration: none;
}

.art-media img {
  display: block;
  max-width: 100%;
  max-height: 620px;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 16px 45px rgba(33, 33, 33, .12);
  transition: transform .7s var(--ease);
}

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

.art-copy {
  display: grid;
  gap: .8rem;
  padding-top: 20px;
}

.art-copy h2 {
  margin: 0 0 5px;
  color: var(--ink);
  font: 700 clamp(1.35rem, 2.2vw, 2rem)/1 Syne, Arial, sans-serif;
  text-transform: uppercase;
}

.art-copy p {
  margin: 0;
}

.card-link {
  display: inline-flex;
  justify-self: start;
  margin-top: 18px;
  font-size: 14px;
}

.card-link .menu-item-wave {
  bottom: -11px;
  height: 9px;
}

.card-link .menu-item-wave img {
  height: 9px;
}

.empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border);
}

.content-page {
  max-width: 1200px;
  min-height: 70vh;
  padding: clamp(6rem, 10vw, 10rem) var(--pad);
}

.content-page h1,
.about-hero h1,
.contact-layout h1 {
  font-size: clamp(3.2rem, 7vw, 7rem);
}

.content-intro {
  max-width: 760px;
  margin: 3rem 0;
  font: italic clamp(1.35rem, 2vw, 2rem)/1.45 Georgia, serif;
}

.content-copy {
  max-width: 850px;
}

.about-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(3rem, 7vw, 8rem);
  align-items: center;
  padding: clamp(6rem, 10vw, 10rem) var(--pad);
}

.about-hero h1 {
  max-width: 14ch;
}

.about-hero blockquote {
  margin: 2.5rem 0 0;
  font: italic clamp(1.35rem, 2vw, 2rem)/1.4 Georgia, serif;
}

.about-hero figure {
  margin: 0;
}

.about-hero img {
  display: block;
  width: 100%;
  min-height: 620px;
  object-fit: cover;
  object-position: 50% 37%;
}

.artist-statement {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(3rem, 8vw, 9rem);
  padding: 7rem var(--pad) 10rem;
  background: var(--soft);
}

.artist-statement h2 {
  margin: 0;
  color: var(--ink);
  font: 700 clamp(2.5rem, 5vw, 5rem)/1 Syne, Arial, sans-serif;
  text-transform: uppercase;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr minmax(360px, .8fr);
  gap: clamp(4rem, 9vw, 11rem);
  padding: clamp(6rem, 10vw, 10rem) var(--pad);
}

.contact-form {
  display: grid;
  gap: 24px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  font-weight: 500;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  padding: 14px 15px;
  background: #fff;
}

.honeypot {
  position: absolute;
  left: -10000px;
}

.primary-action,
.button-link {
  justify-self: start;
  border: 0;
  padding: 14px 18px;
  color: var(--ink);
  background: var(--yellow);
  font-family: Syne, Arial, sans-serif;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.form-success {
  padding: 1rem;
  background: #eaf4ed;
}

.form-error {
  padding: 1rem;
  background: #f8e9e7;
}

.artwork-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  min-height: calc(100vh - 130px);
  border-bottom: 1px solid var(--border);
}

.detail-gallery {
  display: grid;
  gap: 2rem;
  place-items: center;
  min-height: 700px;
  padding: clamp(3rem, 7vw, 7rem);
  background: var(--soft);
}

.detail-gallery img {
  max-width: 100%;
  max-height: 820px;
  object-fit: contain;
}

.detail-panel {
  position: sticky;
  top: 130px;
  align-self: start;
  padding: clamp(3rem, 6vw, 6rem);
}

.detail-panel h1 {
  max-width: 12ch;
  font-size: clamp(2.8rem, 5.4vw, 5.6rem);
}

.description {
  max-width: 34rem;
  margin: 2rem 0;
}

.purchase-box {
  margin-top: 2rem;
  padding: 1.5rem;
  border-left: 4px solid var(--yellow);
  background: var(--soft);
}

.purchase-box h2 {
  margin-top: 0;
  color: var(--ink);
  font-family: Syne, Arial, sans-serif;
  text-transform: uppercase;
}

.variant-list {
  list-style: none;
  padding: 0;
}

.variant-list li {
  display: flex;
  justify-content: space-between;
  padding: .7rem 0;
  border-bottom: 1px solid var(--border);
}

.muted {
  color: #777;
}

/* Exact Prototype 19 footer */
.site-footer {
  position: relative;
  overflow: hidden;
  background:
    var(--soft)
    url("/assets/footer-background.png")
    no-repeat center bottom / 100% auto;
}

.footer-main {
  display: grid;
  grid-template-columns:
    minmax(300px, 1fr)
    max-content
    max-content
    minmax(230px, max-content);
  column-gap: clamp(2rem, 3vw, 3.8rem);
  padding: 30px clamp(14px, 1.8vw, 28px) 20px var(--pad);
}

.footer-main h2 {
  margin: 0 0 22px;
  color: var(--ink);
  font: 700 20px/1 Syne, Arial, sans-serif;
  text-transform: uppercase;
}

.footer-intro p {
  max-width: 360px;
  margin: 0 0 18px;
}

.footer-email {
  display: inline-flex;
  font-size: clamp(16px, 1.45vw, 20px);
  text-transform: none;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column li {
  margin-bottom: 8px;
}

.footer-link {
  display: inline-flex;
  font: 300 18px/1.35 Archivo, Arial, sans-serif;
  text-transform: none;
  white-space: nowrap;
}

.footer-link .menu-item-wave {
  bottom: -7px;
  height: 9px;
}

.footer-link .menu-item-wave img {
  height: 9px;
}

.footer-bottom {
  min-height: 104px;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--pad) 28px;
}

.footer-bottom p {
  margin: 0;
  color: #aeada9;
  font-size: 16px;
}

.back-to-top {
  position: fixed;
  right: clamp(16px, 1.8vw, 28px);
  bottom: clamp(16px, 2vw, 28px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  color: var(--ink);
  background: rgba(245, 244, 237, .96);
  border: 1px solid var(--ink);
  border-radius: 50%;
  font: 700 9px/1 Syne, Arial, sans-serif;
  letter-spacing: .11em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.back-to-top:hover {
  color: var(--soft);
  background: var(--ink);
  transform: translateY(-4px);
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-block: 16px;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .paint-link {
    flex: 0 0 auto;
    min-height: 48px;
    font-size: 16px;
  }

  .title-band,
  .about-hero,
  .contact-layout,
  .artwork-detail,
  .artist-statement {
    grid-template-columns: 1fr;
  }

  .title-band {
    align-items: start;
    flex-direction: column;
  }

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

  .detail-panel {
    position: static;
  }

  .footer-main {
    grid-template-columns: repeat(2, 1fr);
    padding: 42px var(--pad) 48px;
  }

  .footer-intro {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .site-logo__art {
    width: min(68vw, 300px);
  }

  .title-band,
  .gallery,
  .about-hero,
  .artist-statement,
  .contact-layout,
  .content-page {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

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

  .art-media {
    min-height: 380px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 38px 1.25rem 44px;
  }

  .footer-bottom {
    padding: 0 1.25rem 24px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 58px;
    height: 58px;
    font-size: 8px;
  }
}

/* Stage 4 — mobile layout refinement */
@media (max-width: 700px) {
  html {
    scroll-padding-top: 24px;
  }

  body {
    overflow-x: hidden;
    font-size: 16px;
  }

  .site-header {
    position: relative;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding: 12px 16px 10px;
  }

  .site-logo {
    justify-content: center;
    width: 100%;
  }

  .site-logo__art {
    width: min(62vw, 245px);
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
    width: 100%;
    margin: 0;
    padding-top: 6px;
    overflow: visible;
    white-space: normal;
    border-top: 1px solid var(--border);
  }

  .main-nav .paint-link {
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    font-size: 13px;
    letter-spacing: .015em;
    text-align: center;
  }

  .main-nav .menu-item-text {
    max-width: 100%;
    padding: 0 4px;
  }

  .main-nav .menu-item-wave {
    display: block;
    left: 3px;
    right: 3px;
    bottom: -8px;
    width: calc(100% - 6px);
    height: 7px;
  }

  .main-nav .menu-item-wave img {
    height: 7px;
  }

  .title-band {
    gap: 1.5rem;
    padding: 48px 20px 54px;
  }

  .title-band h1 {
    font-size: clamp(2.35rem, 10.5vw, 3.4rem);
    line-height: .98;
  }

  .title-band > p {
    font-size: 15px;
  }

  .content-page,
  .checkout-result {
    min-height: 0;
    padding: 54px 20px 92px;
  }

  .content-page h1,
  .checkout-result h1,
  .about-hero h1,
  .contact-layout h1,
  .detail-panel h1 {
    max-width: 100%;
    font-size: clamp(2.15rem, 9.6vw, 3.15rem);
    line-height: .99;
    overflow-wrap: normal;
    word-break: normal;
  }

  .about-hero h1 {
    font-size: clamp(2.05rem, 8.8vw, 2.9rem);
    line-height: 1.02;
  }

  .checkout-result h1 {
    font-size: clamp(2.25rem, 10vw, 3.25rem);
  }

  .eyebrow {
    margin-bottom: 1rem;
    font-size: 11px;
    letter-spacing: .15em;
  }

  .content-intro {
    margin: 1.75rem 0 2rem;
    font-size: clamp(1.08rem, 5.2vw, 1.35rem);
    line-height: 1.48;
  }

  .button-link {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 12px 18px;
    font-size: 14px;
    text-align: center;
  }

  .gallery {
    padding: 48px 20px 88px;
  }

  .art-media {
    min-height: 280px;
    padding: 28px 20px;
  }

  .about-hero,
  .artist-statement,
  .contact-layout,
  .artwork-detail {
    gap: 34px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .footer-main {
    gap: 30px;
    padding: 34px 20px 40px;
  }

  .footer-bottom {
    padding: 0 20px 22px;
  }

  .back-to-top {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    font-size: 7px;
  }
}

@media (max-width: 380px) {
  .site-logo__art {
    width: min(68vw, 225px);
  }

  .main-nav .paint-link {
    font-size: 12px;
  }

  .content-page h1,
  .checkout-result h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .about-hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.55rem);
  }
}

/* Stage 4 — purchase form layout refinement */
.checkout-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.checkout-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
}

.checkout-label {
  color: var(--body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.checkout-field select,
.checkout-field input[type="number"] {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
}

.checkout-field--price {
  gap: 3px;
}

.checkout-price {
  margin: 0;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1.2;
}

.checkout-fields-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 120px);
  gap: 14px;
  align-items: end;
}

.checkout-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

.checkout-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
}

.checkout-submit {
  width: 100%;
  min-height: 50px;
  justify-self: stretch;
  margin: 2px 0 0;
  padding: 13px 18px;
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 700px) {
  .purchase-box {
    padding: 20px 18px;
  }

  .checkout-form {
    gap: 15px;
  }

  .checkout-fields-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .checkout-field--quantity input[type="number"] {
    max-width: 120px;
  }

  .checkout-submit {
    font-size: 13px;
  }
}
