/* ============================================================
   KITAB HOUSE PUBLISHING — style.css v3
   Palette:
     --red:    #C13B2A  (logo terracotta)
     --green:  #2C5F3F  (deep forest green)
     --gold:   #C89A3C  (warm accent)
     --cream:  #FAF6EF  (page background)
     --ink:    #1C1710  (warm near-black)
     --muted:  #6B6356  (secondary text)
     --white:  #FFFFFF
   Fonts:
     Display: Fraunces (poetic serif)
     Body:    Jost (clean humanist sans)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300;1,9..144,400&family=Jost:wght@300;400;500;600&display=swap');

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

:root {
  --red:    #C13B2A;
  --green:  #2C5F3F;
  --gold:   #C89A3C;
  --cream:  #FAF6EF;
  --ink:    #1C1710;
  --muted:  #6B6356;
  --white:  #FFFFFF;
  --radius: 4px;
  --nav-height: 78px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
}

/* ============================================================
   FOCUS — keyboard accessibility
   ============================================================ */

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

/* ============================================================
   SCROLL OFFSET — compensate for fixed nav
   ============================================================ */

section,
footer {
  scroll-margin-top: var(--nav-height);
}

/* ============================================================
   NAV
   ============================================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 3rem;
  box-shadow: 0 1px 18px rgba(0,0,0,0.15);
  min-height: var(--nav-height);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}

/* Logo — no circle, full height, natural proportions */
.nav-logo img {
  height: 56px;
  width: auto;
  object-fit: contain;
  border-radius: 0;
  border: none;
  display: block;
}

.nav-logo-text {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.04em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--gold);
}

/* ============================================================
   HERO — crossfade slideshow
   ============================================================ */

.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 12s infinite;
}

.hero-slide:nth-child(1) {
  background-image: url('images/hero_photo.webp');
  animation-delay: 0s;
}

.hero-slide:nth-child(2) {
  background-image: url('images/hero_photo_2.webp');
  animation-delay: 6s;
}

@keyframes heroFade {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  50%  { opacity: 1; }
  58%  { opacity: 0; }
  100% { opacity: 0; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(20, 44, 30, 0.55) 0%,
    rgba(28, 23, 16, 0.72) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.4rem;
  letter-spacing: -0.01em;
}

.hero-title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 300;
}

.hero-sub {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  letter-spacing: 0.02em;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: #a8331f;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.6);
  margin-left: 1rem;
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
}

.btn-buy {
  background: var(--red);
  color: var(--white);
  padding: 0.65rem 1.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
}

.btn-buy:hover {
  background: #a8331f;
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */

section {
  padding: 6rem 2rem;
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-label {
  display: block;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--green);
  margin-bottom: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-title em {
  font-style: italic;
}

/* ============================================================
   ABOUT
   ============================================================ */

#about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1.1rem;
  font-size: 1.02rem;
  font-weight: 300;
}

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

.about-image-wrap {
  position: relative;
}

.about-image-wrap::before {
  content: '';
  position: absolute;
  top: -1.5rem;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--gold);
}

.about-image {
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(28,23,16,0.12);
}

.about-image img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}

/* ============================================================
   BOOKS
   ============================================================ */

#books {
  background: var(--cream);
}

.books-intro {
  max-width: 560px;
  margin-bottom: 3.5rem;
}

.books-intro p {
  color: var(--muted);
  font-weight: 300;
  font-size: 1.02rem;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
}

.book-card {
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.1);
}

.book-cover {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.book-cover-placeholder {
  width: 100%;
  height: 300px;
  background: linear-gradient(160deg, var(--green) 0%, #1a3d28 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.6rem;
}

.book-cover-placeholder .ph-label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.book-cover-placeholder .ph-icon {
  font-size: 2.2rem;
  opacity: 0.45;
}

.book-info {
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  border-top: 2px solid var(--cream);
}

.book-badge {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.85rem;
  align-self: flex-start;
  border-radius: 2px;
}

.badge-published {
  background: rgba(44,95,63,0.1);
  color: var(--green);
}

.badge-coming {
  background: rgba(200,154,60,0.12);
  color: #8a6a1e;
}

.book-title {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.book-desc {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--muted);
  flex: 1;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.book-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.coming-soon-label {
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
}

/* ============================================================
   NEWS & EVENTS
   ============================================================ */

#news {
  background: var(--white);
}

.events-list {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.event-entry {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2.5rem;
}

.event-date-block {
  text-align: center;
  padding-top: 0.2rem;
}

.event-date-block .day {
  font-family: 'Fraunces', serif;
  font-size: 2.6rem;
  font-weight: 300;
  color: var(--red);
  line-height: 1;
}

.event-date-block .month-year {
  font-family: 'Jost', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.2rem;
}

.event-body h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.3rem;
  line-height: 1.25;
}

.event-location {
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.event-body p {
  font-size: 0.97rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 1.5rem;
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.photo-grid-item {
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #ede8e0;
  cursor: pointer;
  border-radius: var(--radius);
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}

.photo-grid-item:hover img {
  transform: scale(1.05);
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ede8e0;
  color: var(--muted);
  flex-direction: column;
  gap: 0.4rem;
  opacity: 0.6;
}

.photo-placeholder .ph-icon {
  font-size: 1.6rem;
}

.photo-placeholder .ph-label {
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,16,10,0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: rgba(255,255,255,0.7);
  font-size: 1.8rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color 0.2s;
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  padding: 0.5rem;
}

.lightbox-close:hover {
  color: var(--white);
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  padding: 4rem 2rem;
  text-align: center;
}

.footer-inner {
  max-width: 640px;
  margin: 0 auto;
}

.footer-name {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.footer-tagline {
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.75rem;
  letter-spacing: 0.04em;
}

.footer-contact {
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.footer-contact a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-separator {
  color: rgba(255,255,255,0.2);
  margin: 0 0.25rem;
}

.footer-divider {
  width: 32px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 0 auto 2rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.06em;
}

/* ============================================================
   RESPONSIVE — 768px
   ============================================================ */

@media (max-width: 768px) {
  nav {
    padding: 0.6rem 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: auto;
  }

  :root {
    --nav-height: 96px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-bottom: 0.35rem;
  }

  .nav-links a {
    font-size: 0.75rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-image-wrap {
    order: -1;
  }

  .about-image img {
    height: 320px;
  }

  .event-entry {
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
  }

  .event-date-block .day {
    font-size: 2rem;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-outline {
    margin-left: 0;
    margin-top: 0.6rem;
  }

  section {
    padding: 4.5rem 1.5rem;
  }
}

/* ============================================================
   RESPONSIVE — 480px
   ============================================================ */

@media (max-width: 480px) {
  nav {
    padding: 0.6rem 1.25rem;
  }

  :root {
    --nav-height: 108px;
  }

  .nav-logo img {
    height: 44px;
  }

  .nav-logo-text {
    font-size: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

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

  section {
    padding: 3.5rem 1.25rem;
  }

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

  .event-date-block {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    text-align: left;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
    opacity: 1;
  }

  .hero-slide:nth-child(2) {
    opacity: 0;
  }
}
