/* ============================================================
   BAY49 THEME — colors & fonts from the original site
   Fonts are self-hosted (see ../fonts/) — no Google Fonts CDN.
   ============================================================ */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/playfairdisplay-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic; font-weight: 400 700; font-display: swap;
  src: url('../fonts/playfairdisplay-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/librebaskerville-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic; font-weight: 400; font-display: swap;
  src: url('../fonts/librebaskerville-italic.woff') format('woff');
}
@font-face {
  font-family: 'Jost';
  font-style: normal; font-weight: 300 500; font-display: swap;
  src: url('../fonts/jost-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/montserrat-bold.woff') format('woff');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/montserrat-extrabold.woff') format('woff');
}
@font-face {
  font-family: 'Oxygen';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/oxygen-bold.woff2') format('woff2');
}

:root {
  --color-text: #080808;
  --color-text-secondary: #5f6360;
  --color-bg: #fafafa;
  --color-bg-white: #ffffff;
  --color-footer-bg: #ccced4;
  --color-accent-label: #ffaa81;
  --color-accent-button: #ffcbaa;
  --font-heading: 'Playfair Display', serif;
  --font-accent: 'Libre Baskerville', serif;
  --font-body: 'Jost', sans-serif;
  --font-logo: 'Montserrat', sans-serif;
  --font-brand: 'Oxygen', sans-serif;
  --content-width: 980px;
}
* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-weight: 300; line-height: 1.7;
  min-height: 100%; min-height: 100dvh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  padding: 28px 0;
  background: rgba(255, 255, 255, 0.6);
}
.header-inner {
  display: flex; align-items: center; position: relative;
  max-width: var(--content-width); margin: 0 auto; padding: 0 40px;
}
.header-left { display: flex; align-items: center; gap: 20px; }
.menu-toggle { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--color-text); }
.social-icons { display: flex; gap: 16px; font-size: 16px; color: var(--color-text-secondary); }
.logo {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--font-brand); font-weight: 700; font-size: 20px; letter-spacing: 9px;
}
@media (max-width: 640px) {
  .logo { font-size: 15px; letter-spacing: 5px; }
  .header-inner { padding: 0 20px; }
  .header-left { gap: 10px; }
  .menu-toggle { font-size: 17px; }
  .social-icons { gap: 8px; font-size: 14px; }
}

/* Mobile nav */
.mobile-nav {
  position: fixed; inset: 0; height: 100vh; height: 100dvh; background: var(--color-bg-white);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 32px; transform: translateX(-100%); transition: transform 0.3s ease; z-index: 1000;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a { font-family: var(--font-heading); font-weight: 700; letter-spacing: 1px; font-size: 20px; }
.mobile-nav-close { position: absolute; top: 28px; right: 40px; background: none; border: none; cursor: pointer; font-size: 22px; }

/* Page heading */
.page-title { font-family: var(--font-heading); font-weight: 700; letter-spacing: 0.4em; text-align: center; font-size: 20px; margin: 60px 0 40px; }
.page-section { max-width: var(--content-width); margin: 0 auto; padding: 0 40px 80px; }
.page-heading-row { display: flex; align-items: center; justify-content: center; gap: 40px; margin-bottom: 40px; }
.portrait img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.page-body-row { display: flex; gap: 24px; max-width: 640px; margin: 0 auto; }
.divider { width: 1px; background: var(--color-text); flex-shrink: 0; }

/* About page: portrait sits dead-center on the page; title hugs its left edge;
   the divider below aligns to that same center column, with body text to its right. */
.about-page .page-heading-row {
  display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; gap: 24px;
  margin-bottom: 40px;
}
.about-page .page-title { grid-column: 1; justify-self: end; margin: 0; }
.about-page .portrait { grid-column: 2; justify-self: center; }
.about-page .page-body-row {
  display: grid; grid-template-columns: 1fr 120px 1fr; gap: 24px;
  max-width: none; margin: 0;
}
.about-page .divider { grid-column: 2; justify-self: center; align-self: stretch; }
.about-page .page-body { grid-column: 3; }
.about-page .arrow-link {
  display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; gap: 24px;
  width: auto;
}
.about-page .arrow-bullet { grid-column: 2; justify-self: center; }
.about-page .arrow-link-text { grid-column: 3; }
@media (max-width: 640px) {
  .about-page .page-heading-row, .about-page .page-body-row { display: flex; flex-direction: column; align-items: center; }
  .about-page .divider { display: none; }
  .about-page .arrow-link { display: flex; align-items: center; gap: 10px; width: fit-content; }
}
.page-body { font-size: 16px; }
.page-body p { margin: 0 0 20px; }
.page-body a { text-decoration: underline; }
.arrow-link { display: flex; align-items: center; gap: 10px; font-family: var(--font-accent); margin-top: 40px; width: fit-content; }
.arrow-bullet { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--color-text); color: #fff; font-size: 11px; }

/* Homepage hero */
.hero-band {
  background-color: #ece9e2;
  background-size: cover;
  background-position: center;
  background-blend-mode: lighten;
  background-attachment: fixed;
  padding: 90px 20px 50px;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .hero-band { background-attachment: scroll; }
}
.hero-inner { position: relative; max-width: var(--content-width); min-height: 420px; margin: 0 auto; }
.hero-logo {
  display: block;
  width: 45%;
  max-width: 380px;
  margin: 0 auto;
}
.hero-tagline {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--color-text-secondary);
  font-size: 20px;
  letter-spacing: 2px;
  line-height: 1.6;
  position: absolute;
  left: 50%;
  top: 48%;
  margin: 0;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.85), 0 0 22px rgba(255, 255, 255, 0.6);
  transform: translate(-50%, -50%);
  animation: heroTaglineIn 1.8s ease-out 0.2s both;
}
@keyframes heroTaglineIn {
  from { opacity: 0; transform: translate(-50%, -42%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
.intro-text {
  max-width: 700px; margin: 20px auto 0; padding: 0 24px;
  text-align: center; font-size: 15px; letter-spacing: 1px; line-height: 1.6;
}

/* Feature blocks */
.feature-block { display: flex; align-items: center; gap: 60px; max-width: var(--content-width); margin: 90px auto; padding: 0 40px; }
.feature-block.feature-right { flex-direction: row-reverse; }
.feature-image { flex: 1.1; }
.feature-image img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; }
.feature-text { flex: 1; position: relative; display: flex; align-items: flex-start; gap: 24px; }
.feature-label {
  writing-mode: vertical-rl;
  color: var(--color-accent-label);
  font-family: var(--font-logo);
  font-weight: 700;
  letter-spacing: 3px;
  font-size: 20px;
  flex-shrink: 0;
}
.feature-body { display: flex; gap: 24px; }
.feature-divider { width: 1px; align-self: stretch; background: var(--color-text); flex-shrink: 0; min-height: 90px; }
.feature-heading { font-weight: 500; color: var(--color-text); margin: 0 0 8px; }
.feature-text p { margin: 0 0 8px; }
@media (max-width: 720px) {
  .feature-block, .feature-block.feature-right { flex-direction: column; gap: 24px; padding: 0 24px; }
  .feature-label { writing-mode: horizontal-tb; display: block; margin-bottom: 12px; }
  .hero-inner { min-height: 320px; }
  .hero-logo { width: 70%; max-width: 240px; margin: 0 auto; }
  .hero-tagline { font-size: 16px; }
}

/* Gallery grid */
.gallery-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; max-width: var(--content-width); margin: 0 auto; padding: 0 40px 80px; }
.gallery-item { display:block; background:#eee; aspect-ratio: 1/1; border-radius: 16px; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gallery-grid { gap: 10px; padding: 0 20px 60px; } }

/* Item page — 1-3 photos: a plain fluid row, each tile capped at the same
   ~280px "standard" size used elsewhere but free to shrink together (never
   wrap) so it still fits on tablet/mobile widths without a carousel. */
.item-page .item-photos {
  display: flex; gap: 16px; justify-content: center;
  max-width: 872px; margin: 0 auto 32px;
}
.item-photo-trigger {
  display: block; flex: 1 1 280px; max-width: 280px; min-width: 0;
  aspect-ratio: 1/1; padding: 0; border: none; background: #eee; cursor: pointer;
}
.item-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 480px) {
  .item-page .item-photos { gap: 8px; }
}

.item-caption { display: flex; gap: 24px; max-width: 500px; margin: 0 auto 40px; }
@media (max-width: 640px) {
  .item-caption .divider { display: none; }
}

/* Item page carousels (shared base). Each track holds every photo three times
   back-to-back, giving buffer on both sides so auto-slide and backward
   dragging can both loop seamlessly (position re-centers after every stop). */
.item-carousel { margin: 0 auto; overflow: hidden; }
.item-carousel-track { display: flex; transition: transform 0.5s ease; touch-action: pan-y; }
.item-carousel-slide {
  aspect-ratio: 1/1; padding: 0; border: none; cursor: grab; display: block; background: #eee;
}
.item-carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

/* Desktop, 4+ photos: ~3.2 photos visible, so there's a clear peek of the next one. */
.item-carousel-desktop { max-width: 872px; margin-bottom: 16px; }
.item-carousel-desktop .item-carousel-track { gap: 16px; }
.item-carousel-desktop .item-carousel-slide { flex: 0 0 calc((100% - 48px) / 3.2); }

/* Mobile (any photo count above 1): one dominant photo with a peek of the next. */
.item-carousel-mobile { display: none; max-width: 640px; margin-bottom: 16px; }
.item-carousel-mobile .item-carousel-track { gap: 12px; }
.item-carousel-mobile .item-carousel-slide { flex: 0 0 88%; }

.item-carousel-dots { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 20px auto 32px; }
.item-carousel-dot {
  width: 6px; height: 6px; border-radius: 3px; border: none; padding: 0;
  background: var(--color-text-secondary); opacity: 0.35; cursor: pointer;
  transition: width 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}
.item-carousel-dot.is-active { width: 22px; opacity: 1; background: var(--color-text); }
.item-carousel-arrow {
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 4px; margin: 0 4px;
  font-size: 11px; color: var(--color-text-secondary); opacity: 0.5; cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.item-carousel-arrow:hover { opacity: 1; color: var(--color-text); }

@media (max-width: 640px) {
  .item-carousel-desktop { display: none; }
  .item-carousel-mobile { display: block; }
}

/* Photo enlarge modal */
.photo-modal { display: none; position: fixed; inset: 0; z-index: 200; }
.photo-modal.is-open { display: block; }
.photo-modal-backdrop { position: absolute; inset: 0; background: rgba(8, 8, 8, 0.92); }
.photo-modal-close {
  position: absolute; top: 20px; right: 24px; z-index: 2;
  background: none; border: none; color: #fff; font-size: 26px; cursor: pointer;
}
.photo-modal-stage {
  position: relative; z-index: 1; height: 100%;
  display: flex; align-items: center; justify-content: center; gap: 24px;
  padding: 80px 24px 120px;
}
.photo-modal-image { max-width: 100%; max-height: 100%; object-fit: contain; }
.photo-modal-arrow { flex-shrink: 0; background: none; border: none; padding: 0; cursor: pointer; }
.photo-modal-arrow .arrow-bullet { background: rgba(255, 255, 255, 0.15); }
.photo-modal-thumbs {
  position: absolute; left: 0; right: 0; bottom: 24px; z-index: 2;
  display: flex; justify-content: center; gap: 12px; padding: 0 24px;
  overflow-x: auto;
}
.photo-modal-thumb {
  flex-shrink: 0; width: 60px; height: 60px; padding: 0; cursor: pointer;
  border: 2px solid transparent; opacity: 0.5; transition: opacity 0.2s ease, border-color 0.2s ease;
  background: none;
}
.photo-modal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-modal-thumb.is-active { opacity: 1; border-color: #fff; }
@media (max-width: 640px) {
  .photo-modal-stage { padding: 60px 12px 110px; gap: 8px; }
  .photo-modal-thumb { width: 44px; height: 44px; }
}

/* Item page: prev/next + back-to-gallery row, aligned to the photo box's width */
.item-bottom-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  max-width: 872px; margin: 0 auto;
}
.item-bottom-nav .item-nav-prev { justify-self: start; }
.item-bottom-nav .item-nav-next { justify-self: end; }
.item-nav .arrow-bullet { width: 36px; height: 36px; font-size: 13px; }
.back-to-gallery { font-family: var(--font-accent); text-align: center; }
@media (max-width: 640px) {
  .item-bottom-nav { max-width: 640px; }
  .item-nav .arrow-bullet { width: 30px; height: 30px; font-size: 11px; }
}

/* Contact form */
.contact-form { max-width: 620px; margin: 0 auto; }
.form-row { display: flex; gap: 40px; }
.contact-form input, .contact-form textarea { width: 100%; border: none; border-bottom: 1px solid var(--color-text-secondary); background: transparent; font-family: var(--font-body); font-size: 15px; padding: 12px 0; margin-bottom: 24px; color: var(--color-text); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--color-text); }
.send-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 20px auto 0; background: var(--color-accent-button); border: none; border-radius: 30px;
  padding: 14px 44px; font-family: var(--font-accent); font-style: italic; font-weight: 700;
  font-size: 15px; cursor: pointer;
}
.send-btn.is-loading { opacity: 0.7; cursor: default; pointer-events: none; }
.send-btn-spinner {
  display: none; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(8, 8, 8, 0.25); border-top-color: var(--color-text);
  animation: send-btn-spin 0.7s linear infinite;
}
.send-btn.is-loading .send-btn-spinner { display: inline-block; }
@keyframes send-btn-spin { to { transform: rotate(360deg); } }
.notices { max-width: 620px; margin: 0 auto 24px; padding: 16px 20px; border-radius: 6px; text-align: center; font-size: 14px; }
.notices.green { background: #eaf3ea; color: #2b5c2b; }
.notices.red { background: #f7e6e6; color: #7a2020; }
.notices.yellow { background: #f8f1de; color: #6b5720; }
.notices p { margin: 0; }

/* Footer */
.site-footer { background: var(--color-footer-bg); text-align: center; padding: 24px; margin-top: 60px; }
.site-footer p { margin: 0; font-size: 12px; letter-spacing: 2px; color: var(--color-text); }
