/* ============================================================
   Kara Beth Rasure — site stylesheet
   Clean white gallery aesthetic
   ============================================================ */

:root {
  --ink: #1a1a1a;
  --ink-soft: #555;
  --ink-faint: #999;
  --line: #e8e8e8;
  --paper: #ffffff;
  --accent: #b08d57; /* brass */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --max: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 300;
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.main-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover { color: var(--ink); }

.main-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- Hero (homepage) — artworks floating in space ---------- */

.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.float-field {
  position: absolute;
  inset: 0;
}

.float-item {
  position: absolute;
  will-change: transform;
}

.float-item img {
  width: 100%;
  height: auto;
  animation: bob var(--bob-dur, 7s) ease-in-out var(--bob-delay, 0s) infinite alternate;
  transition: transform 0.4s ease;
}

.float-item:hover img { transform: scale(1.06); }

.float-item .float-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -1.6rem;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.float-item:hover .float-label { opacity: 1; }

@keyframes bob {
  from { transform: translateY(calc(var(--bob-amp, 10px) * -1)) rotate(calc(var(--bob-rot, 0.6deg) * -1)); }
  to   { transform: translateY(var(--bob-amp, 10px)) rotate(var(--bob-rot, 0.6deg)); }
}

.hero .hero-text {
  position: relative;
  text-align: center;
  padding: 3rem 1.5rem;
  pointer-events: none;
}

.hero h1 {
  font-weight: 100;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  letter-spacing: 0.14em;
  margin: 0;
}

.hero p.tagline {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Page shell ---------- */

main.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.page-title {
  font-weight: 200;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
  text-align: center;
}

.page-intro {
  text-align: center;
  color: var(--ink-soft);
  max-width: 48rem;
  margin: 0 auto 3rem;
  font-size: 0.95rem;
}

.rule {
  width: 42px;
  height: 1px;
  background: var(--accent);
  border: 0;
  margin: 1.4rem auto 2.6rem;
}

/* ---------- Homepage collection cards ---------- */

.collections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.2rem 1.8rem;
}

.collection-card { display: block; }

.collection-card .frame {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.collection-card .frame img {
  max-height: 88%;
  max-width: 88%;
  width: auto;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.collection-card:hover .frame { transform: translateY(-6px); }
.collection-card:hover .frame img { transform: scale(1.04); }

.collection-card h2 {
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0.9rem 0 0.1rem;
  text-align: center;
}

.collection-card p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-align: center;
}

.more-link {
  display: block;
  text-align: center;
  margin-top: 3.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.more-link:hover { color: var(--ink); }

/* ---------- Gallery grid ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 2.4rem 1.8rem;
}

.work {
  cursor: zoom-in;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
}

.work .frame {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.work .frame img {
  max-height: 92%;
  max-width: 92%;
  width: auto;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.work:hover .frame { transform: translateY(-6px); }
.work:hover .frame img { transform: scale(1.03); }

.work .label {
  margin-top: 0.75rem;
  display: block;
  text-align: center;
}

.work .label .title {
  display: block;
  font-weight: 400;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
}

.work .label .caption {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.1rem;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 2rem;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.12);
}

.lightbox .lb-label {
  text-align: center;
  margin-top: 1.4rem;
  max-width: 44rem;
}

.lightbox .lb-title {
  font-weight: 300;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lightbox .lb-caption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

.lightbox .lb-count {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-top: 0.7rem;
}

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 1.9rem;
  line-height: 1;
  padding: 0.6rem 0.9rem;
  transition: color 0.2s;
}

.lightbox button:hover { color: var(--ink); }

.lightbox .lb-close { top: 0.8rem; right: 1rem; font-size: 1.6rem; }
.lightbox .lb-prev { left: 0.4rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 0.4rem; top: 50%; transform: translateY(-50%); }

/* ---------- Content pages (about / news / contact) ---------- */

.prose {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}

.prose p { color: var(--ink-soft); }

.prose .big {
  font-weight: 200;
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.portrait {
  max-width: 460px;
  margin: 0 auto 2.5rem;
}

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

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0.7rem 1.8rem;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}

.btn:hover { background: var(--ink); color: #fff; }

.contact-line {
  font-weight: 200;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  margin: 0.3rem 0;
}

.insta-embed {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.insta-embed iframe {
  border: 1px solid var(--line);
  width: min(100%, 540px);
  height: 720px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 1.5rem 2.6rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.shown {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  .site-header .inner { justify-content: center; text-align: center; }
  .main-nav { gap: 1.1rem; justify-content: center; }
  .hero { min-height: 52vh; }
  .float-item { width: 24% !important; }
  .float-item:nth-child(5), .float-item:nth-child(6) { display: none; }
}
