/* Ruth Karp — site styles (matches ruthkarp.com Wix design) */

@import url('https://fonts.googleapis.com/css2?family=Caudex:ital,wght@0,400;0,700;1,400;1,700&family=Niconne&display=swap');

:root {
  --bg-cream: #f7eed5;
  --panel: #ffffff;
  --ink: #080808;
  --ink-soft: #2b2b2b;
  --ink-muted: #5f6360;
  --rule: #d8d2bf;
  --accent: #4a4a4a;
  --max: 1280px;
  --serif: "Caudex", "Times New Roman", Georgia, serif;
  --script: "Niconne", "Snell Roundhand", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-cream);
  background-image: url("../images/about/bg-grid.png");
  background-repeat: repeat;
  background-attachment: fixed;
}

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

a { color: var(--ink); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--ink-muted); }

/* ---------- Layout shell (centered with bg showing on sides) ---------- */

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Brand panel (white block with giant wordmark) ---------- */

.brand-panel {
  background: var(--panel);
  margin: 1.2rem 4rem 0;
  padding: 3rem 2rem 3.5rem;
  text-align: center;
  position: relative;
}
.brand-link { display: block; }
.brand-link:hover { color: var(--ink); }
.brand-name {
  display: block;
  font-family: var(--script);
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  line-height: 0.95;
  color: var(--ink);
  letter-spacing: 0.01em;
  font-weight: 400;
}

/* ---------- Peonies divider (peonies image with dotted lines L/R) ---------- */

.peonies-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -1.2rem 4rem 0;
  padding: 0 2rem;
  gap: 1rem;
}
.peonies-divider .line {
  flex: 1;
  border-top: 2px dotted var(--ink-soft);
  height: 0;
}
.peonies-divider img {
  width: 130px;
  height: auto;
  flex: 0 0 auto;
}

/* ---------- Nav panel ---------- */

.nav-panel {
  background: var(--panel);
  margin: 1.6rem 4rem 0;
  padding: 1.2rem 1rem;
  position: relative;
}

.site-nav > ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav .submenu { margin: 0; padding: 0.4rem 0; }
.site-nav a {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

.has-submenu { position: relative; }
.has-submenu > a::after { content: " ▾"; font-size: 0.7rem; color: var(--ink-muted); }
.submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 0.4rem 0;
  min-width: 240px;
  display: none;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  list-style: none;
  z-index: 50;
}
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu { display: flex; }
.submenu a {
  display: block;
  padding: 0.65rem 1.3rem;
  border: 0;
  font-size: 1rem;
}
.submenu a:hover { background: var(--bg-cream); border: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  margin: 6px 0;
  transition: 0.2s;
}

/* ---------- Hero / main content panel ---------- */

.content-panel {
  background: var(--panel);
  margin: 1.6rem 4rem 0;
  padding: 2rem;
}

.hero-image {
  width: 100%;
}
.hero-image img { width: 100%; height: auto; display: block; }

.page-header {
  padding: 1rem 0 2rem;
  text-align: center;
}
.page-header h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  margin: 0;
  letter-spacing: 0.02em;
}

/* ---------- Gallery grid ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.gallery-item {
  margin: 0;
  background: var(--bg-cream);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  aspect-ratio: 4 / 5;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: #fff;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s;
}
.gallery-item:hover figcaption,
.gallery-item:focus-within figcaption { opacity: 1; transform: translateY(0); }

/* ---------- Home thumbnail strip below hero ---------- */

.home-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 2rem;
}
.home-strip a {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-cream);
  position: relative;
}
.home-strip a img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.home-strip a:hover img { transform: scale(1.05); }

/* ---------- About page ---------- */

.about-page {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 2.5rem 3rem;
  margin: 0 0 2rem;
  align-items: start;
}
.about-page figure { margin: 0; }
.about-portrait { grid-column: 1; grid-row: 1; }
.about-portrait img { width: 100%; }
.about-portrait figcaption,
.about-lighthouse figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-top: 0.5rem;
}
.about-text { grid-column: 2; grid-row: 1; }
.about-text p { margin: 0 0 1.2rem; color: var(--ink-soft); }
.about-illustration { grid-column: 1; grid-row: 2; text-align: center; }
.about-illustration img { max-width: 320px; margin: 0 auto; }
.about-illustration figcaption {
  font-family: var(--script);
  font-size: 1.6rem;
  color: var(--ink-muted);
  margin-top: 0.4rem;
}
.about-lighthouse { grid-column: 1; grid-row: 3; }
.about-lighthouse img { width: 100%; }
.about-text-2 { grid-column: 2; grid-row: 2 / span 2; }

/* ---------- Contact ---------- */

.contact-card {
  max-width: 540px;
  margin: 1rem auto 2rem;
  border: 1px solid var(--rule);
  padding: 2.5rem;
  text-align: center;
  background: #fff;
}
.contact-card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  letter-spacing: 0.04em;
}
.contact-row { margin: 0.7rem 0; }
.contact-row strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.15rem;
  font-weight: 700;
}
.contact-row a { font-size: 1.05rem; }
.contact-row a:hover { text-decoration: underline; }
.socials {
  display: flex; justify-content: center;
  gap: 1.2rem;
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}
.socials a { font-size: 0.92rem; }

/* ---------- Prose ---------- */

.prose {
  max-width: 720px;
  margin: 0 auto;
  color: var(--ink-soft);
  text-align: center;
}
.prose p { margin: 0 0 1.1rem; font-size: 1.15rem; line-height: 1.8; }

/* ---------- Footer ---------- */

.site-footer {
  margin: 2rem 4rem 1.5rem;
  background: var(--panel);
  padding: 1.4rem 1rem;
  text-align: center;
}
.site-footer p {
  margin: 0.3rem 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.site-footer a { color: var(--ink-muted); }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 13, 10, 0.94);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw; max-height: 86vh; object-fit: contain;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.lightbox .caption {
  position: absolute;
  bottom: 1.6rem;
  left: 0; right: 0;
  text-align: center;
  color: #f5f0e6;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
}
.lightbox .close, .lightbox .nav-arrow {
  position: absolute;
  background: none; border: 0;
  color: #f5f0e6; cursor: pointer;
  padding: 0.4rem 0.8rem; line-height: 1;
}
.lightbox .close { top: 1rem; right: 1rem; font-size: 2rem; }
.lightbox .nav-arrow { top: 50%; transform: translateY(-50%); font-size: 2.5rem; }
.lightbox .prev { left: 1rem; }
.lightbox .next { right: 1rem; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .brand-panel, .nav-panel, .content-panel, .peonies-divider, .site-footer {
    margin-left: 2.5rem; margin-right: 2.5rem;
  }
}

@media (max-width: 900px) {
  .brand-panel, .nav-panel, .content-panel, .peonies-divider, .site-footer {
    margin-left: 1.5rem; margin-right: 1.5rem;
  }
  .about-page { grid-template-columns: 1fr; gap: 2rem; }
  .about-portrait, .about-text, .about-illustration, .about-lighthouse, .about-text-2 {
    grid-column: 1; grid-row: auto;
  }
}

@media (max-width: 720px) {
  .brand-panel { padding: 2rem 1rem 2.4rem; }
  .brand-name { font-size: 14vw; }
  .peonies-divider { padding: 0 0.5rem; margin: -0.6rem 1rem 0; gap: 0.5rem; }
  .peonies-divider img { width: 90px; }
  .nav-panel { margin: 1rem 1rem 0; padding: 0.6rem 1rem; min-height: 50px; }

  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    margin-top: 0.6rem;
    border-top: 1px solid var(--rule);
    padding-top: 0.5rem;
  }
  .site-nav.open { display: block; }
  .site-nav > ul {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .site-nav li { width: 100%; }
  .site-nav li a {
    display: block;
    padding: 0.7rem 1.5rem;
    border-bottom: 1px solid var(--rule);
    text-align: center;
  }
  .site-nav li:last-child a { border-bottom: 0; }
  .has-submenu > a::after { content: ""; }
  .submenu {
    position: static;
    display: flex;
    transform: none;
    border: 0;
    background: var(--bg-cream);
    padding: 0;
    min-width: 0;
    box-shadow: none;
    width: 100%;
  }
  .submenu a { padding: 0.6rem 1.5rem; }

  .content-panel { margin: 1rem 1rem 0; padding: 1.2rem; }
  .site-footer { margin: 1.5rem 1rem 1rem; }

  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-item figcaption { opacity: 1; transform: none; font-size: 0.85rem; }
  .home-strip { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .brand-panel { padding: 1.5rem 0.8rem 2rem; }
  .peonies-divider img { width: 72px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .home-strip { grid-template-columns: repeat(2, 1fr); }
  .site-nav a { font-size: 1.1rem; }
}
