/* ========================================
   [CLIENT_NAME] — Stylesheet
   Aesthetic: editorial, warm earth tones,
   literary, grounded in cultural memory.
======================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Earth-tone palette — warm, grounded, Khmer-cultural reference */
  --c-ink:        #1a1512;   /* near-black text */
  --c-paper:      #f5efe4;   /* warm cream background */
  --c-paper-2:    #ebe2d1;   /* slightly deeper cream */
  --c-terracotta: #b8562f;   /* accent — clay red */
  --c-gold:       #c9a24b;   /* accent — muted gold */
  --c-moss:       #5c6b42;   /* accent — deep green */
  --c-dark:       #2a201a;   /* dark section bg */
  --c-dark-2:     #3a2d24;

  /* Typography */
  --f-display: 'Fraunces', 'Georgia', serif;
  --f-body:    'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing scale */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 5rem;
  --s-7: 8rem;

  --maxw: 1200px;
  --radius: 2px;
}

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- TYPOGRAPHY HELPERS ---------- */
.section__eyebrow {
  font-family: var(--f-body);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--c-terracotta);
  font-weight: 500;
  margin-bottom: var(--s-2);
}

.section__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-3);
}

.section__title em {
  font-style: italic;
  color: var(--c-terracotta);
}

.section__lede {
  font-size: 1.125rem;
  max-width: 56ch;
  color: color-mix(in srgb, var(--c-ink) 75%, transparent);
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--c-paper) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--c-ink) 8%, transparent);
}

.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-2) var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  gap: var(--s-4);
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--c-terracotta); }

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  height: 1px;
  width: 0;
  background: var(--c-terracotta);
  transition: width 0.3s;
}
.nav__links a:hover::after { width: 100%; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--c-ink);
  transition: transform 0.3s;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--s-7) var(--s-4) var(--s-6);
  background:
    radial-gradient(ellipse at top right, color-mix(in srgb, var(--c-gold) 20%, transparent), transparent 60%),
    radial-gradient(ellipse at bottom left, color-mix(in srgb, var(--c-terracotta) 15%, transparent), transparent 60%),
    var(--c-paper);
  overflow: hidden;
}

/* Subtle grain/noise for paper feel */
.hero__grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  animation: fadeUp 1s ease-out;
}

.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-terracotta);
  font-weight: 500;
  margin-bottom: var(--s-3);
  animation: fadeUp 1s 0.1s both;
}

.hero__title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-4);
  animation: fadeUp 1s 0.2s both;
}

.hero__title-line { display: block; }

.hero__title-sub {
  display: block;
  font-style: italic;
  font-weight: 300;
  font-size: 0.5em;
  color: color-mix(in srgb, var(--c-ink) 70%, transparent);
  margin-top: var(--s-2);
  line-height: 1.2;
}

.hero__tagline {
  max-width: 52ch;
  font-size: 1.125rem;
  color: color-mix(in srgb, var(--c-ink) 75%, transparent);
  margin-bottom: var(--s-5);
  animation: fadeUp 1s 0.3s both;
}

.hero__cta {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  animation: fadeUp 1s 0.4s both;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: transform 0.2s, background 0.2s, color 0.2s;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--c-ink);
  color: var(--c-paper);
}
.btn--primary:hover {
  background: var(--c-terracotta);
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: var(--c-ink);
  color: var(--c-ink);
}
.btn--ghost:hover {
  background: var(--c-ink);
  color: var(--c-paper);
}

/* ---------- SECTION BASE ---------- */
.section {
  padding: var(--s-7) var(--s-4);
}
.section__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.section__inner--narrow { max-width: 720px; text-align: center; }
.section__header { margin-bottom: var(--s-6); }
.section__header--center { text-align: center; }
.section__header--center .section__lede { margin: 0 auto; }

.section--dark {
  background: var(--c-dark);
  color: var(--c-paper);
}
.section--dark .section__title,
.section--dark .section__lede {
  color: var(--c-paper);
}
.section--dark .section__title em { color: var(--c-gold); }
.section--dark .section__eyebrow { color: var(--c-gold); }
.section--dark .section__title em { color: var(--c-gold); }
.section--dark .section__eyebrow { color: var(--c-gold); }

.section--muted { background: var(--c-paper-2); }

/* ---------- PERFORMANCES / SHOWS ---------- */
.shows {
  display: grid;
  gap: 1px;
  background: color-mix(in srgb, var(--c-paper) 15%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--c-paper) 15%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--c-paper) 15%, transparent);
}

.show {
  background: var(--c-dark);
  padding: var(--s-4) 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-4);
  align-items: baseline;
  transition: background 0.3s, padding-left 0.3s;
}
.show:hover {
  background: var(--c-dark-2);
  padding-left: var(--s-3);
}

.show__day {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--c-gold);
}

.show__time {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--c-paper);
  margin-bottom: 4px;
}
.show__venue {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c-paper) 60%, transparent);
}

/* ---------- ABOUT / BIO SPLIT ---------- */
.section__inner--split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--s-6);
  align-items: start;
}
.section__inner--reverse .about__portrait { order: 2; }

.about__portrait {
  position: relative;
}
.about__portrait img {
  aspect-ratio: 4/5;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 20px 20px 0 -5px var(--c-terracotta);
}
.section--muted .about__portrait img {
  box-shadow: -20px 20px 0 -5px var(--c-moss);
}

.about__copy p {
  margin-bottom: var(--s-3);
  max-width: 60ch;
}

/* ---------- BOOKS ---------- */
.books {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}

.book { text-align: center; }
.book__cover {
  aspect-ratio: 2/3;
  background: var(--c-paper-2);
  margin-bottom: var(--s-2);
  overflow: hidden;
  transition: transform 0.4s;
}
.book:hover .book__cover { transform: translateY(-6px); }
.book__cover img { width: 100%; height: 100%; object-fit: cover; }

.book__title {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.book__meta {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c-ink) 60%, transparent);
}

/* ---------- GALLERY ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
}
.gallery__item {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--c-dark-2);
}
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.gallery__item:hover img { transform: scale(1.05); }
/* Make every 4th item a wider portrait for visual rhythm */
.gallery__item:nth-child(4) { grid-column: span 2; }

/* ---------- CONTACT ---------- */
.section--contact {
  background: var(--c-paper-2);
  text-align: center;
}
.contact__email {
  display: inline-block;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-style: italic;
  color: var(--c-terracotta);
  margin: var(--s-3) 0 var(--s-4);
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
.contact__email:hover { border-bottom-color: var(--c-terracotta); }

.socials {
  display: flex;
  justify-content: center;
  gap: var(--s-3);
}
.socials a {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--c-ink);
  transition: background 0.2s, color 0.2s;
}
.socials a:hover {
  background: var(--c-ink);
  color: var(--c-paper);
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--c-ink);
  color: color-mix(in srgb, var(--c-paper) 60%, transparent);
  padding: var(--s-4);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}
.footer a { color: var(--c-gold); }

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 64px; right: 0;
    flex-direction: column;
    background: var(--c-paper);
    padding: var(--s-4);
    gap: var(--s-3);
    width: 100%;
    border-top: 1px solid color-mix(in srgb, var(--c-ink) 10%, transparent);
    transform: translateX(100%);
    transition: transform 0.3s;
  }
  .nav__links--open { transform: translateX(0); }
  .nav__toggle { display: flex; }

  .section { padding: var(--s-6) var(--s-3); }
  .hero { padding: var(--s-7) var(--s-3) var(--s-5); }

  .section__inner--split {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
  .section__inner--reverse .about__portrait { order: 0; }

  .show {
    grid-template-columns: 1fr;
    gap: var(--s-1);
    padding: var(--s-3) 0;
  }

  .books { grid-template-columns: 1fr 1fr; gap: var(--s-3); }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery__item:nth-child(4) { grid-column: span 2; }

  .footer__inner { flex-direction: column; gap: var(--s-1); text-align: center; }
}

@media (max-width: 480px) {
  .books { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
