@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&family=Zen+Kaku+Gothic+New:wght@300;400;500;700&display=swap');

:root {
  --paper: #f6f2ea;
  --paper-deep: #efe9dc;
  --ink: #2b2620;
  --ink-soft: #55503f;
  --accent: #a4392a;   /* vermillion, restrained */
  --moss: #6b7355;
  --line: #d8d0bd;
  --max: 1080px;
  /* This site only has a light design — without this, phones/browsers in
     system dark mode render native form controls (button, select) with
     dark-mode UA chrome that can override our own styling (e.g. solid
     black buttons), regardless of the colors we set below. */
  color-scheme: light;
}

* { box-sizing: border-box; }

button, select {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Zen Kaku Gothic New', 'Cormorant Garamond', serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, .brand {
  font-family: 'Shippori Mincho', serif;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Header */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 242, 234, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  transform: translateZ(0);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
}

nav a {
  color: var(--ink-soft);
  text-decoration: none;
  text-transform: lowercase;
  margin-left: 28px;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}

nav a:hover { color: var(--accent); }

/* Hero */
.hero {
  position: relative;
  padding: 170px 0 140px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 55%;
  filter: saturate(0.9);
  z-index: -2;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(246,242,234,0) 0%,
    rgba(246,242,234,0) 35%,
    rgba(246,242,234,0.041) 43.12%,
    rgba(246,242,234,0.15) 51.25%,
    rgba(246,242,234,0.304) 59.38%,
    rgba(246,242,234,0.48) 67.5%,
    rgba(246,242,234,0.656) 75.62%,
    rgba(246,242,234,0.81) 83.75%,
    rgba(246,242,234,0.919) 91.88%,
    rgba(246,242,234,0.96) 100%);
  z-index: -1;
}

.hero-kicker {
  color: #e9e2cf;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-shadow: 0 0 3px rgba(20,18,14,0.95), 0 0 10px rgba(20,18,14,0.85), 0 2px 14px rgba(20,18,14,0.7);
}

.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  margin: 0 0 20px;
  color: #fbf8f1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: #f0ead9;
  max-width: 520px;
  margin: 0 auto;
  text-shadow: 0 0 3px rgba(20,18,14,0.95), 0 0 10px rgba(20,18,14,0.85), 0 2px 16px rgba(20,18,14,0.7);
}

/* Section title */
.section-title {
  font-size: 1.8rem;
  margin-bottom: 42px;
  position: relative;
  display: inline-block;
  text-transform: lowercase;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

/* Gallery */
.gallery { padding: 90px 0; }

/* Book tabs */
.book-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tab {
  font-family: 'Shippori Mincho', serif;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 10px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab:hover { border-color: var(--accent); color: var(--ink); }

.tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* Sort controls */
.sort-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 46px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.sort-controls label {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: lowercase;
}

.sort-controls select {
  font-family: 'Zen Kaku Gothic New', 'Cormorant Garamond', serif;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}

.sort-controls select:hover { border-color: var(--moss); }

/* Uniform gallery grid — same box size for every card regardless of the
   source photo's orientation (portrait/landscape/square) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
  justify-content: start;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -18px rgba(43, 38, 32, 0.35);
}

.card-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: var(--paper-deep);
}

/* Instagram-style carousel: swipe or click the arrows to see detail shots */
.card-carousel {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}

.carousel-slide { flex-shrink: 0; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 18, 14, 0.45);
  border: none;
  color: #f0ead9;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.carousel-arrow:hover { background: rgba(20, 18, 14, 0.7); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.dot.active {
  background: #fff;
  transform: scale(1.3);
}

.empty-state {
  color: var(--ink-soft);
  font-style: italic;
  padding: 40px 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 50px;
}

.page-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--ink); }

.page-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.page-btn:disabled { opacity: 0.4; cursor: default; }

.card-body { padding: 18px 20px 22px; }

.card-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--moss);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

.card-desc {
  font-size: 0.92rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
  white-space: pre-line;
}

/* Placeholder shown when an image file is missing (img elements can't
   render child content, so this is a sibling element, not a child) */
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
  background: repeating-linear-gradient(
    135deg, var(--paper-deep), var(--paper-deep) 10px, #f1ecdf 10px, #f1ecdf 20px
  );
}

.image-placeholder--gallery {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.image-placeholder--profile {
  width: 100%;
  height: 100%;
}

/* About / Contact */
.about, .contact {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.about-inner { max-width: 800px; }
.contact-inner { max-width: 640px; }

.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 44px;
  align-items: start;
}

.profile-photo-wrap {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-deep);
  flex-shrink: 0;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 87% center;
  display: block;
  transform: scale(1.8);
}

.about-text p { margin: 0 0 18px; }
.about-text p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .about-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.contact-inner { text-align: left; }

.email-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* Footer */
.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: #f0ead9;
  margin-top: 18px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: #f0ead9;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(240, 234, 217, 0.12);
  border: 1px solid rgba(240, 234, 217, 0.4);
  color: #f0ead9;
  font-size: 2rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-nav:hover { background: rgba(240, 234, 217, 0.25); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

@media (max-width: 600px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.6rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (max-width: 600px) {
  nav a { margin-left: 16px; font-size: 0.85rem; }
  .hero { padding: 80px 0 60px; }
}
