/* Dreaming Arts — shared component patterns */

/* ---- Layout helpers ---- */
.wrap-680 { max-width: 680px; margin: 0 auto; }
.wrap-720 { max-width: 720px; margin: 0 auto; }
.wrap-760 { max-width: 760px; margin: 0 auto; }
.wrap-820 { max-width: 820px; margin: 0 auto; }
.wrap-880 { max-width: 880px; margin: 0 auto; }
.wrap-900 { max-width: 900px; margin: 0 auto; }
.wrap-1000 { max-width: 1000px; margin: 0 auto; }
.wrap-1040 { max-width: 1040px; margin: 0 auto; }
.wrap-1100 { max-width: 1100px; margin: 0 auto; }
.wrap-1180 { max-width: 1180px; margin: 0 auto; }
.wrap-1240 { max-width: 1240px; margin: 0 auto; }

.band { padding: clamp(60px, 7.5vw, 104px) clamp(20px, 5vw, 48px); }
.band-lg { padding: clamp(70px, 9vw, 130px) clamp(20px, 5vw, 48px); }
.band-xl { padding: clamp(76px, 10vw, 150px) clamp(20px, 5vw, 48px); }
.band-sm { padding: clamp(56px, 7vw, 100px) clamp(20px, 5vw, 48px); }

.bg-cream { background: var(--cream); }
.bg-sand { background: var(--sand); }
.bg-bark { background: var(--bark); }
.bg-bark-deep { background: var(--bark-deep); }
.bg-forest-band { background: #2A3A2C; }

.text-center { text-align: center; }

.grid { display: grid; gap: clamp(22px, 2.8vw, 40px); }
.grid-auto-220 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid-auto-230 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.grid-auto-260 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-auto-280 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-auto-300 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* ---- Eyebrow variants ---- */
.eyebrow-on-light { color: var(--brown-link-hover); }
.eyebrow-on-dark { color: var(--gold-on-dark); }

/* ---- Headings ---- */
.h1 {
  margin: 0;
  font-family: Spectral, serif;
  font-weight: 400;
  font-size: clamp(36px, 5.4vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.h1-home { font-size: clamp(40px, 6.6vw, 86px); }
.h2 {
  margin: 0;
  font-family: Spectral, serif;
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.2;
}
.h3 {
  margin: 0;
  font-family: Spectral, serif;
  font-weight: 400;
  font-size: clamp(20px, 2.1vw, 25px);
  line-height: 1.2;
}
.subhead {
  margin: 0;
  font-family: Spectral, serif;
  font-weight: 300;
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.4;
}
.pull-quote {
  margin: 0;
  font-family: Spectral, serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(21px, 2.8vw, 36px);
  line-height: 1.45;
}
.body-text {
  margin: 0;
  font-family: Karla, sans-serif;
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.75;
}
.body-narrow {
  margin: 0;
  font-family: Karla, sans-serif;
  font-size: clamp(15.5px, 1.55vw, 17.5px);
  line-height: 1.8;
}
.on-dark-heading { color: var(--ink-on-dark); }
.on-dark-body { color: var(--body-dark-1); }
.on-dark-muted { color: var(--muted-dark-1); }
.on-light-heading { color: var(--ink); }
.on-light-body { color: var(--body-light); }
.on-light-muted { color: var(--muted-light-1); }

/* text-shadow used for type set over photography */
.text-shadow-photo { text-shadow: 0 1px 3px rgba(20,17,14,0.9), 0 0 24px rgba(20,17,14,0.8); }

/* ---- Page hero ---- */
.hero {
  position: relative;
  min-height: clamp(360px, 58vh, 560px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bark-deep);
}
.hero-sm { min-height: clamp(340px, 54vh, 520px); }
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24,20,17,0.4) 0%, rgba(24,20,17,0.5) 40%, rgba(24,20,17,0.92) 100%);
}
.hero-content {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 96px) clamp(20px, 5vw, 48px);
}

/* ---- Winged sun watermark ---- */
.watermark {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(1000px, 135%);
  opacity: 0.05;
  pointer-events: none;
}
.watermark-holder { position: relative; overflow: hidden; }

/* ---- Kene rule divider ---- */
.kene-rule {
  display: block;
  width: min(420px, 70%);
  margin: clamp(30px, 3.6vw, 48px) auto;
}
.kene-rule-dark { opacity: 0.3; }
.kene-rule-light { opacity: 0.55; filter: invert(1) brightness(0.45); }

/* ---- Quote band ---- */
.quote-band { max-width: 880px; margin: 0 auto; text-align: center; }
.quote-band .attrib-name {
  margin: clamp(26px, 3vw, 40px) 0 0;
  font-family: Cinzel, serif;
  font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-on-dark);
}
.quote-band .attrib-source {
  margin: 10px 0 0;
  font-family: Karla, sans-serif;
  font-size: clamp(13px, 1.3vw, 15px);
  letter-spacing: 0.05em;
  color: var(--muted-dark-2);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 15px 30px;
  font-family: Karla, sans-serif;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--button-ink); }
.btn-gold:hover { background: var(--gold-hover); border-color: var(--gold-hover); color: var(--button-ink); }
.btn-outline-dark { border-color: rgba(43,37,33,0.4); color: var(--ink); background: transparent; }
.btn-outline-dark:hover { border-color: var(--brown-link-hover); color: var(--brown-link-hover); }
.btn-outline-light { border-color: rgba(245,240,231,0.4); color: var(--cream); background: transparent; }
.btn-outline-light:hover { border-color: var(--gold); color: var(--gold-hover); }
.btn-solid-dark { background: var(--bark); border-color: var(--bark); color: var(--cream); }
.btn-solid-dark:hover { background: var(--brown-link-hover); border-color: var(--brown-link-hover); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-row-center { justify-content: center; }

/* small uppercase text link */
.link-small {
  font-family: Karla, sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---- Portal / teaser cards ---- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--bark-card);
  border: 1px solid rgba(245,240,231,0.09);
  overflow: hidden;
  text-decoration: none;
}
.card:hover { border-color: rgba(217,162,43,0.55); }
.card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bark-deep); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: clamp(22px, 2.4vw, 32px); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-eyebrow { margin: 0; font-family: Cinzel, serif; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.card-title { margin: 0; font-family: Spectral, serif; font-weight: 400; font-size: clamp(21px, 2.2vw, 27px); line-height: 1.2; color: var(--cream); }
.card-desc { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted-dark-1); flex: 1; }
.card-link { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }

/* ---- Forms ---- */
.form-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  background: var(--sand-form);
  border: 1px solid rgba(43,37,33,0.14);
  padding: clamp(26px, 4vw, 48px);
}
.form-input, .form-textarea {
  padding: 15px 18px;
  background: var(--cream-raised);
  border: 1px solid rgba(43,37,33,0.22);
  outline: none;
  font-family: Karla, sans-serif;
  font-size: 16px;
  width: 100%;
}
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > * { flex: 1 1 160px; min-width: 0; }
.form-honeypot { display: none; }
.form-error { margin: 4px 0 0; font-family: Karla, sans-serif; font-size: 15px; line-height: 1.7; color: var(--error); }
.form-thanks {
  text-align: left;
  background: var(--sand-form);
  border: 1px solid rgba(43,37,33,0.14);
  padding: clamp(26px, 4vw, 48px);
}
.form-thanks-title { margin: 0; font-family: Spectral, serif; font-weight: 400; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; color: var(--ink); }
.form-thanks-body { margin: 12px 0 0; font-family: Karla, sans-serif; font-size: clamp(15px, 1.55vw, 17px); line-height: 1.75; color: var(--body-light); }

/* dark mailing-list variant (home hero band) */
.form-dark-input {
  flex: 1 1 200px; min-width: 0;
  padding: 15px 18px;
  background: rgba(247,243,235,0.07);
  border: 1px solid rgba(247,243,235,0.28);
  color: var(--ink-on-dark);
  outline: none;
  font-family: Karla, sans-serif;
  font-size: 16px;
}
.form-dark-panel {
  max-width: 560px; margin: 0 auto;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(230,201,138,0.4);
}

/* footer mailing-list variant */
.form-footer-input {
  flex: 1 1 160px; min-width: 0;
  padding: 12px 15px;
  background: rgba(247,243,235,0.06);
  border: 1px solid rgba(247,243,235,0.24);
  color: var(--ink-on-dark);
  outline: none;
  font-size: 14px;
  font-family: Karla, sans-serif;
}
.btn-footer {
  padding: 12px 20px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.btn-footer:hover { background: var(--gold); color: var(--button-ink); }

/* ---- Modals / lightbox (shared) ---- */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20,17,14,0.88);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 3vw, 40px);
}
.overlay[hidden] { display: none; }
.modal-panel {
  position: relative;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--cream);
  border: 1px solid rgba(43,37,33,0.2);
  padding: clamp(26px, 3.4vw, 48px);
}
.modal-close {
  position: absolute;
  top: clamp(14px, 1.8vw, 22px);
  right: clamp(16px, 2vw, 26px);
  font-family: Karla, sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brown-link);
}
.modal-close:hover { color: var(--brown-link-hover); }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: #0A0C14;
  display: flex; flex-direction: column;
}
.lightbox[hidden] { display: none; }
.lightbox-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lightbox-scrim { position: absolute; inset: 0; background: rgba(8,9,16,0.72); }
.lightbox-close {
  position: absolute; top: 0; right: 0; z-index: 2;
  padding: clamp(12px, 1.6vw, 22px) clamp(14px, 2vw, 28px);
  font-family: Karla, sans-serif; font-size: 13px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--body-dark-1);
}
.lightbox-close:hover { color: var(--gold-on-dark); }
.lightbox-body {
  position: relative; z-index: 1; flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 44px);
  align-content: safe center; align-items: center; justify-content: center;
  padding: clamp(16px, 2.4vw, 28px) clamp(16px, 3vw, 44px);
}
.lightbox-image-col { flex: 1 1 min(100%, 640px); display: flex; align-items: center; justify-content: center; min-height: 0; }
.lightbox-image-col img { max-width: 100%; max-height: min(calc(72vh - 40px), 72vw); width: auto; height: auto; object-fit: contain; }
.lightbox-info { flex: 0 1 380px; max-width: 420px; }
.lightbox-count { margin: 0 0 clamp(8px, 1vw, 14px); font-family: Cinzel, serif; font-size: clamp(10px, 1vw, 12px); letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-on-dark); }
.lightbox-title { margin: 0; font-family: Spectral, serif; font-weight: 400; font-size: clamp(24px, 3vw, 38px); line-height: 1.15; color: var(--ink-on-dark); }
.lightbox-desc { margin: clamp(14px, 1.8vw, 24px) 0 0; font-family: Karla, sans-serif; font-size: clamp(15px, 1.5vw, 17px); line-height: 1.7; color: #D8D0C2; }
.lightbox-story { margin: clamp(14px, 1.6vw, 20px) 0 0; font-family: Karla, sans-serif; font-size: clamp(14px, 1.4vw, 16px); line-height: 1.75; color: var(--muted-dark-1); }
.lightbox-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 2.6vw, 34px); }
.lightbox-nav { display: flex; gap: 22px; margin-top: clamp(26px, 3vw, 40px); }
.lightbox-nav a { font-family: Karla, sans-serif; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-dark-1); }
.lightbox-nav a:hover { color: var(--gold-on-dark); }

/* ---- Gallery thumbnails ---- */
.gallery-item { display: block; text-decoration: none; }
.gallery-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #DCD3C2; border: 1px solid rgba(43,37,33,0.16); }
.gallery-item:hover .gallery-thumb { border-color: var(--brown-link-hover); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-caption { margin: 12px 0 0; font-family: Spectral, serif; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.35; color: var(--ink); }
.gallery-tbc { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: 0.14em; color: #8A7E71; }

@media (max-width: 640px) {
  .btn-row-center { justify-content: flex-start; }
}
