/* ==========================================================
   Zoe Litaker Photography — base template
   Design tokens live at the top so Claude Code (or you)
   can retune the whole site from one place.
   ========================================================== */

:root {
  --color-text: #111111;
  --color-text-muted: #4a4a4a;
  --color-bg: #ffffff;
  --color-border: #111111;
  --color-mobile-bar: #52525b;

  --font-body: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;

  --sidebar-width: 280px;
  --gutter: 60px;
  --content-padding-right: 60px;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 60px;

  --content-max-width: 800px; /* narrow centered column used on Home / About / Rates */
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ==========================================================
   Layout shell
   Desktop: sidebar fixed to the left, content sits in the
   remaining space with a right-hand breathing margin.
   ========================================================== */

.sidebar {
  width: var(--sidebar-width);
  padding: var(--space-xl) 0 var(--space-xl) var(--space-lg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
}

.content {
  margin-left: calc(var(--sidebar-width) + var(--gutter));
  padding: var(--space-xl) var(--content-padding-right) var(--space-xl) 0;
}

/* ==========================================================
   Brand block
   ========================================================== */

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 var(--space-md) 0;
}

.tagline {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg) 0;
  max-width: 220px;
}

/* ==========================================================
   Nav
   ========================================================== */

.site-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.site-nav a {
  font-size: 16px;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-nav a:hover {
  opacity: 0.6;
}

.contact-btn {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  padding: 12px 20px;
  border: 1px solid var(--color-border);
  font-size: 15px;
  font-weight: 600;
}

.contact-btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* Hamburger toggle: desktop-hidden, mobile-only */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
}

/* ==========================================================
   Narrow centered column
   Used to wrap Home's gallery and the About/Rates content so
   they sit in a fixed-width block centered within the content
   area, rather than stretching to the far edge of the viewport.
   Movement/Portrait intentionally stay full-width (unwrapped).
   ========================================================== */

.narrow-column {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* ==========================================================
   Gallery grid (Home / Movement / Portrait)
   Base behavior: a tight CSS multi-column masonry — every tile is
   the same column width, packed with no gaps. Used as-is on the
   full-width Movement/Portrait pages.

   Home overrides this (see .narrow-column .gallery-grid below)
   with a real CSS grid instead: js/gallery.js flags landscape
   photos with a "wide" class so they span the full row width,
   while portrait/square photos pair up two per row underneath.
   ========================================================== */

.gallery-content {
  padding-top: var(--space-xl);
}

.gallery-grid {
  column-count: 3;
  column-gap: 24px;
}

.gallery-grid .tile {
  margin: 0 0 24px 0;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.gallery-grid .tile img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 1100px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    column-count: 1;
    column-gap: 0;
  }
  .gallery-grid .tile {
    margin-bottom: 0;
  }
}

/* Home's gallery lives in the narrower centered column and swaps
   the masonry above for a real grid, so landscape "wide" tiles can
   span the full row while portrait/square tiles pair up two per row. */
.narrow-column .gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-count: initial;
  gap: 24px;
}

.narrow-column .gallery-grid .tile {
  margin: 0;
  break-inside: auto;
}

.narrow-column .gallery-grid .tile.wide {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .narrow-column .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Text-content pages (About / Rates)
   Reuses .content as the wrapper; these rules only apply
   where the extra elements below exist.
   ========================================================== */

.page-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 var(--space-lg) 0;
}

.about-layout {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.about-portrait {
  flex: 0 0 280px;
  max-width: 280px;
  margin: 0;
}

.about-portrait img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.bio {
  flex: 1 1 auto;
  max-width: 600px;
  font-size: 16px;
  line-height: 1.7;
}

.bio p {
  margin: 0 0 1.2em 0;
}

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

.rates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-xl);
}

.rate-card img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto var(--space-sm) auto;
}

.rate-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 var(--space-xs) 0;
}

.rate-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-xs) 0;
}

.rate-price {
  font-weight: 700;
  color: var(--color-text) !important;
}

.inquire {
  border-top: 1px solid #e5e5e5;
  padding-top: var(--space-lg);
  max-width: 480px;
}

.inquire h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 var(--space-sm) 0;
}

.inquire p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-sm) 0;
}

.inquire-contact p {
  color: var(--color-text);
  margin: 0 0 4px 0;
}

.inquire-contact a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta-mailto {
  display: inline-block;
  margin-top: var(--space-sm);
  padding: 14px 28px;
  border: 1px solid var(--color-border);
  font-size: 15px;
  font-weight: 600;
}

.cta-mailto:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ==========================================================
   Footer
   Mirrors the content column's left offset so it lines up
   under the main column rather than the sidebar.
   ========================================================== */

.site-footer {
  margin-left: calc(var(--sidebar-width) + var(--gutter));
  padding: var(--space-lg) var(--content-padding-right) var(--space-xl) 0;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}

.site-footer p {
  margin: 0 0 4px 0;
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover {
  color: var(--color-text);
}

/* ==========================================================
   Scroll reveal (fade-in as images enter the viewport)
   Driven by js/reveal.js, which adds .is-visible via
   IntersectionObserver. Gated behind .js on <html> so
   content is never hidden if JS fails to load.
   ========================================================== */

.js .gallery-grid .tile {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .gallery-grid .tile.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .gallery-grid .tile {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================
   Mobile contact bar — hidden on desktop
   ========================================================== */

.mobile-contact-bar {
  display: none;
}

/* ==========================================================
   Mobile layout (< 768px)
   Sidebar becomes a top bar: hamburger left, centered
   brand block, nav collapses into a slide-down panel.
   Images go full-bleed. Contact becomes a fixed bottom bar.
   ========================================================== */

@media (max-width: 768px) {

  .sidebar {
    position: static;
    width: 100%;
    padding: var(--space-md) var(--space-md) 0 var(--space-md);
    align-items: center;
    text-align: center;
  }

  .nav-toggle {
    display: block;
    position: absolute;
    left: var(--space-md);
    top: var(--space-md);
  }

  .brand {
    width: 100%;
  }

  .brand-name {
    font-size: 22px;
  }

  .tagline {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .site-nav {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .site-nav.is-open {
    max-height: 300px;
  }

  .site-nav ul {
    align-items: center;
    padding-top: var(--space-sm);
  }

  .contact-btn {
    display: none; /* replaced by .mobile-contact-bar */
  }

  .content {
    margin-left: 0;
    padding: var(--space-md) 0 80px 0; /* bottom padding clears the fixed contact bar */
  }

  .page-title {
    text-align: left;
    padding: 0 var(--space-md);
  }

  .bio,
  .cta-mailto,
  .inquire {
    margin-left: var(--space-md);
    margin-right: var(--space-md);
    max-width: none;
  }

  .about-layout {
    flex-direction: column;
    padding: 0 var(--space-md);
    gap: var(--space-md);
  }

  .about-portrait {
    flex: none;
    max-width: 100%;
  }

  .rates-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--space-md);
    gap: var(--space-lg);
  }

  .inquire {
    padding-top: var(--space-lg);
  }

  .gallery-content {
    padding-top: var(--space-md);
  }

  .gallery-grid {
    padding: 0 var(--space-md);
  }

  .site-footer {
    margin-left: 0;
    padding: var(--space-lg) var(--space-md) 100px var(--space-md); /* bottom clears fixed contact bar */
  }

  .mobile-contact-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-mobile-bar);
    color: #ffffff;
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
  }
}
