/* ===========================================================
   Art by Roz — warm, classic gallery
   Palette: cream, terracotta, sage, walnut, dusk
   =========================================================== */

:root {
  --cream:      #f6efe2;
  --cream-deep: #efe4d0;
  --paper:      #fbf7ee;
  --walnut:     #4a382a;
  --walnut-soft:#6b5442;
  --terracotta: #b5623f;
  --terracotta-dark: #97492c;
  --sage:       #7c8465;
  --dusk:       #3a3226;
  --line:       #d8c9ae;
  --shadow:     rgba(74, 56, 42, 0.18);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body:  "Lora", Georgia, serif;

  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--walnut);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--dusk);
  line-height: 1.1;
  margin: 0 0 0.5em;
}

a { color: var(--terracotta-dark); }

.eyebrow {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.82rem;
  color: var(--terracotta);
  margin: 0 0 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--paper);
  background: var(--terracotta);
  padding: 0.7rem 1.9rem;
  border-radius: 2px;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 6px 18px -8px var(--shadow);
}
.btn:hover { background: var(--terracotta-dark); transform: translateY(-1px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 239, 226, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--dusk);
}
.brand-tag {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--walnut-soft);
}
.site-nav a {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--walnut);
  margin-left: 1.6rem;
  padding: 0.5rem 0 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.site-nav a:hover { color: var(--terracotta-dark); border-color: var(--terracotta); }
.nav-cart {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--walnut-soft);
  opacity: 0.55;
  margin-left: 1.6rem;
  padding: 0.5rem 0 2px;
  border-bottom: 1px solid transparent;
  cursor: not-allowed;
  user-select: none;
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(90deg,
      rgba(246, 239, 226, 0.97) 0%,
      rgba(246, 239, 226, 0.75) 100%),
    url("../images/hero-gallery-wall.png") center / cover no-repeat,
    linear-gradient(160deg, var(--cream-deep), var(--cream));
  color: var(--dusk);
}
.hero-inner {
  padding: clamp(4.5rem, 12vw, 9rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 720px;
}
.hero .eyebrow { color: var(--terracotta-dark); }
.hero h1 {
  color: var(--dusk);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 500;
  font-style: italic;
}
.hero-lede {
  font-size: 1.2rem;
  max-width: 34rem;
  margin: 1rem 0 2rem;
  color: var(--walnut-soft);
}

/* ---------- Updates signup ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.updates-section {
  background: #eef1e2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
}
.updates-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
}
.updates-text h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  margin: 0 0 0.2rem;
}
.updates-text p {
  margin: 0;
  color: var(--walnut-soft);
  font-style: italic;
}
.updates-disclosure { flex: 0 0 auto; }
.updates-trigger {
  display: none;
  cursor: pointer;
}
.updates-trigger::-webkit-details-marker { display: none; }
.updates-trigger::marker { content: ""; }
.updates-field {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.updates-form input[type="email"] {
  font: inherit;
  font-size: 1rem;
  min-width: 240px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  color: var(--walnut);
}
.updates-form input[type="email"]:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 1px;
}
.updates-form .btn {
  border: none;
  font-size: 1rem;
  cursor: pointer;
}
.updates-note {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--walnut-soft);
}
.updates-success {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--walnut);
}
.updates-hidden-iframe {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.updates-sticky-bar { display: none; }
.updates-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.updates-dismiss {
  display: none;
  background: none;
  border: none;
  color: var(--walnut-soft);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.updates-dismiss:hover { color: var(--terracotta-dark); }

/* ---------- Section headers ---------- */
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.section-head p { color: var(--walnut-soft); font-style: italic; margin: 0; }

.gallery-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

/* ---------- Gallery grid ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
}
.piece {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.75rem;
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  box-shadow: 0 10px 30px -20px var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.piece:hover, .piece:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px var(--shadow);
  outline: none;
}
.piece:focus-visible { border-color: var(--terracotta); }
.piece-frame {
  overflow: hidden;
  background: var(--cream-deep);
  aspect-ratio: 4 / 3;
}
.piece-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.piece:hover .piece-frame img { transform: scale(1.04); }
.piece-meta { padding: 0.85rem 0.4rem 0.4rem; }
.piece-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--dusk);
  display: block;
}
/* ---------- About ---------- */
.about-section {
  background: var(--cream-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about-image {
  display: block;
  width: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 20px 45px -25px var(--shadow);
}
.about-text h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.about-text p { font-size: 1.1rem; margin: 0 0 1.1rem; }

/* ---------- Contact ---------- */
.contact-section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; text-align: center; }
.contact-inner { max-width: 36rem; margin: 0 auto; }
.contact-inner h2 { font-size: clamp(2rem, 4vw, 2.6rem); }
.contact-inner p { font-size: 1.15rem; color: var(--walnut-soft); margin-bottom: 1.8rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dusk);
  color: var(--cream);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  text-align: center;
}
.site-footer .brand-name { color: var(--cream); font-size: 1.5rem; }
.footer-note { font-style: italic; color: #cbb99b; }
.footer-copy { font-size: 0.85rem; color: #a9967a; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(30, 25, 18, 0.9);
  padding: clamp(1rem, 5vw, 4rem);
}
.lightbox.open { display: flex; }
.lightbox-figure {
  margin: 0;
  max-width: 90vw;
  max-height: 86vh;
  text-align: center;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border: 8px solid var(--paper);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  background: var(--paper);
}
#lightbox-caption {
  margin-top: 1rem;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.3rem;
}
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}
.lightbox-close { top: 1.2rem; right: 1.6rem; font-size: 2.6rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 3.5rem; padding: 0 1rem; }
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }
.lightbox-close:hover, .lightbox-nav:hover { color: var(--terracotta); }
.lightbox-nav:hover { transform: translateY(-50%) scale(1.15); }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .header-inner { flex-direction: column; justify-content: center; gap: 0.5rem; }
  .brand { align-items: center; max-height: 3rem; opacity: 1; }
  .site-nav { width: 100%; display: flex; justify-content: center; }
  .site-nav a { margin: 0 0.8rem; font-size: 1rem; }
  .nav-cart { margin: 0 0.8rem; font-size: 1rem; }
  .brand-tag { display: none; }

  /* Sticky header on scroll: nav stays pinned, title collapses away */
  .site-header.is-scrolled .brand { max-height: 0; opacity: 0; margin: 0; pointer-events: none; }

  .about-inner { grid-template-columns: 1fr; }
  .about-image { width: 60%; max-width: 320px; margin: 0 auto 0.5rem; }

  /* Mobile sticky bar: hidden off-screen until js/gallery.js adds
     .is-stuck (visitor has scrolled past the inline signup above). The
     inline #updates section itself is untouched here — it keeps the same
     expanded, in-flow layout as desktop at every width. */
  body.updates-open { padding-bottom: 4.25rem; }
  .updates-sticky-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 0.65rem 1rem;
    box-shadow: 0 -10px 26px -16px var(--shadow);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s ease;
  }
  .updates-sticky-bar.is-stuck { transform: translateY(0); visibility: visible; }
  .updates-sticky-inner { position: relative; display: flex; align-items: center; flex-wrap: nowrap; gap: 0.6rem; }
  .updates-sticky-bar .updates-disclosure { flex: 1; min-width: 0; }

  /* Collapsed state: a single full-width "Get Updates" button */
  .updates-sticky-bar .updates-trigger {
    display: block;
    width: 100%;
    text-align: center;
    font-family: var(--serif);
    font-size: 1rem;
    letter-spacing: 0.03em;
    color: var(--paper);
    background: var(--terracotta);
    padding: 0.65rem 1rem;
    border-radius: 2px;
  }
  .updates-sticky-bar .updates-trigger:hover { background: var(--terracotta-dark); }
  .updates-sticky-bar .updates-disclosure[open] .updates-trigger { display: none; }

  /* Expanded state: email field + submit fill the bar */
  .updates-sticky-bar .updates-form { display: block; }
  .updates-sticky-bar .updates-field { flex-wrap: nowrap; }
  .updates-sticky-bar .updates-form input[type="email"] { min-width: 0; flex: 1; padding: 0.55rem 0.7rem; font-size: 0.92rem; }
  .updates-sticky-bar .updates-form .btn { padding: 0.55rem 1rem; font-size: 0.9rem; white-space: nowrap; }
  .updates-sticky-bar .updates-success {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
    margin: 0;
    padding: 0.65rem 1rem;
  }
  .updates-sticky-bar .updates-success[hidden] { display: none; }
  .updates-sticky-bar .updates-dismiss {
    display: block;
    position: absolute;
    top: -1.4rem;
    right: 0.25rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    width: 2rem;
    height: 1.4rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 460px) {
  .header-inner { flex-wrap: wrap; row-gap: 0.4rem; }
  .brand-name { font-size: 1.4rem; }
  .site-nav { width: 100%; display: flex; justify-content: center; }
  .site-nav a { margin: 0 0.6rem; font-size: 0.95rem; }
  .nav-cart { margin: 0 0.6rem; font-size: 0.95rem; }

  .hero-inner { padding-left: 1.25rem; padding-right: 1.25rem; }
  .hero-lede { font-size: 1.05rem; }
  .btn { padding: 0.65rem 1.5rem; font-size: 0.98rem; }

  .piece-title { font-size: 1.15rem; }

  .about-image { width: 75%; }

  .lightbox { padding: 0.5rem; }
  .lightbox-nav { font-size: 2.2rem; padding: 0 0.4rem; }
  .lightbox-close { top: 0.6rem; right: 0.8rem; font-size: 2.1rem; }
  #lightbox-caption { font-size: 1.05rem; }
}

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