/* hawthornebhaskar family site — shared styles */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::-webkit-scrollbar {
  display: none;
}

html {
  scrollbar-width: none;
}

body {
  font-family: "Inter", -apple-system, sans-serif;
  font-weight: 300;
  color: #111;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

/* ---------- shared type ---------- */

.serif {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
}

.meta {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---------- landing page ---------- */

.site-header {
  text-align: center;
  padding: 7rem 2rem 5rem;
}

.site-header h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 2.75rem;
}

.site-header .meta {
  margin-top: 1.25rem;
  color: #888;
}

.event-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.event-card .card-image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.event-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.event-card:hover .card-image img {
  transform: scale(1.03);
}

.event-card:hover {
  text-decoration: none;
}

.event-card h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  margin-top: 1.25rem;
}

.event-card .meta {
  margin-top: 0.5rem;
  color: #888;
}

/* ---------- event page ---------- */

.hero {
  position: relative;
  height: 100vh;
  /* on phones, 100vh jumps as the browser chrome hides; svh is stable */
  height: 100svh;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 50%);
}

.hero-text {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 3rem;
  color: #fff;
}

.hero-text .meta {
  color: rgba(255, 255, 255, 0.85);
}

.hero-text hr {
  border: none;
  border-top: 1px solid #fff;
  width: 40px;
  margin: 1.25rem 0;
}

.hero-text h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 3.5rem;
  line-height: 1.1;
}

.text-block {
  max-width: 640px;
  margin: 0 auto;
  padding: 5rem 2rem;
  font-size: 1.0625rem;
  line-height: 1.9;
  text-align: center;
}

.text-block p + p {
  margin-top: 1.6em;
}

/* Title header for text-first pages (no hero image) */
.post-header {
  text-align: center;
  padding: 7rem 2rem 1rem;
}

.post-header .meta {
  color: #888;
}

.post-header h1 {
  font-style: italic;
  font-size: 3rem;
  margin-top: 1rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0 0 6rem;
}

.gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* full — one big image at its natural shape */
.block-full {
  margin: 0 0 6rem;
}

.block-full img {
  width: 100%;
  height: auto;
}

.block-full img + img {
  margin-top: 4px;
}

.block-full .caption {
  text-align: center;
  font-style: italic;
  font-family: "Playfair Display", Georgia, serif;
  color: #666;
  font-size: 1.05rem;
  margin-top: 1rem;
  padding: 0 2rem;
}

/* duo / trio — photos side by side */
.block-row-wrap {
  margin: 0 0 6rem;
}

.block-row {
  display: grid;
  gap: 4px;
}

.block-row.duo {
  grid-template-columns: 1fr 1fr;
}

.block-row.trio {
  grid-template-columns: 1fr 1fr 1fr;
}

.block-row img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.row-caption {
  text-align: center;
  font-style: italic;
  font-family: "Playfair Display", Georgia, serif;
  color: #666;
  font-size: 1.05rem;
  margin-top: 1rem;
  padding: 0 2rem;
}

/* quote — large pull quote */
.block-quote {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

.block-quote blockquote {
  font-style: italic;
  font-size: 1.9rem;
  line-height: 1.4;
  text-align: center;
  color: #222;
}

/* heading — small section title */
.block-heading {
  text-align: center;
  padding: 3rem 2rem 1rem;
}

.block-heading h2 {
  font-style: italic;
  font-size: 1.75rem;
}

.featured {
  display: grid;
  grid-template-columns: 55% 45%;
  min-height: 500px;
  padding-bottom: 6rem;
  align-items: stretch;
}

.featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 4rem;
}

.featured-text .caption {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.featured-text p {
  font-weight: 400;
  line-height: 1.9;
  color: #444;
}

footer {
  text-align: center;
  padding: 8rem 2rem 4rem;
}

footer a {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
}

/* ---------- lightbox ---------- */

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(8, 8, 8, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox[hidden] {
  display: none;
}

#lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  cursor: zoom-out;
}

#lightbox button {
  position: absolute;
  z-index: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-family: "Inter", sans-serif;
  line-height: 1;
  padding: 0.5rem 1rem;
}

#lightbox button:hover {
  color: #fff;
}

#lightbox .lb-x {
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
}

#lightbox .lb-prev,
#lightbox .lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

#lightbox .lb-prev { left: 0.5rem; }
#lightbox .lb-next { right: 0.5rem; }

/* ---------- password gate ---------- */

#auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.5s ease;
}

#auth-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

#auth-overlay h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 2rem;
}

#auth-overlay input {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.1em;
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 0.5rem 1rem;
  width: 240px;
  outline: none;
  background: transparent;
}

#auth-overlay input:focus {
  border-bottom-color: #111;
}

#auth-overlay .hint {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #bbb;
}

#auth-overlay input.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-header h1 {
    font-size: 2rem;
  }

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

  .hero-text {
    padding: 2rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .post-header h1 {
    font-size: 2rem;
  }

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

  .featured {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .featured-text {
    padding: 3rem 2rem;
  }

  /* keep duos paired, but stack trios for legibility */
  .block-row.trio {
    grid-template-columns: 1fr;
  }

  .block-quote blockquote {
    font-size: 1.4rem;
  }
}
