/*
Theme Name: Cassin Photo Monochrome
Theme URI: https://cassinphoto.com
Author: Cassin Photo Studio
Author URI: https://cassinphoto.com
Description: Stark gallery-white and pure-black responsive photography WordPress theme featuring blocky modern sans-serif typography, dedicated single-image click/tap and auto-advancing slideshows for Documentary, Portrait, and Analog Projects, plus an About page, Print Shop, and Contact form.
Version: 1.8.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cassinphoto
Tags: photography, portfolio, black, white, minimalist, block-themes, full-site-editing, responsive-layout
*/

:root {
  --cp-bg: #ffffff;
  --cp-fg: #000000;
  --cp-muted: #525252;
  --cp-subtle: #ebebeb;
  --cp-surface: #f7f7f7;
  --cp-border: #000000;
  --cp-border-light: #e0e0e0;
  --cp-font-display: 'Space Grotesk', 'Syne', 'Arial Black', 'Helvetica Neue', sans-serif;
  --cp-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cp-font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--cp-bg);
  color: var(--cp-fg);
  font-family: var(--cp-font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--cp-fg);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.65;
}

/* Blocky Modern Sans-Serif Typography */
h1, h2, h3, h4, .cp-brand, .cp-nav-link, .cp-btn, .cp-slide-title {
  font-family: var(--cp-font-display);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
}

/* Header & Responsive Navigation */
.cp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cp-bg);
  border-bottom: 2px solid var(--cp-border);
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cp-brand {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cp-brand-mark {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--cp-fg);
}

.cp-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.cp-nav-link {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.cp-nav-link.active,
.cp-nav-link:hover {
  opacity: 1;
  border-bottom-color: var(--cp-fg);
}

.cp-menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--cp-fg);
  color: var(--cp-fg);
  padding: 0.4rem 0.7rem;
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  cursor: pointer;
}

/* Single-Image Gallery Slideshow Layout */
.cp-slideshow-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 72px);
  padding: 1.25rem 2rem 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
  justify-content: space-between;
}

.cp-slideshow-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--cp-border-light);
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cp-section-kicker {
  font-family: var(--cp-font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cp-slideshow-Viewport {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cp-bg);
  min-height: 58vh;
  max-height: 74vh;
  overflow: hidden;
  user-select: none;
}

.cp-slide-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cp-slide-frame img,
.cp-slide-frame svg {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: none;
  transition: opacity 0.35s ease;
}

/* Left/Right Click & Tap Zones on Image */
.cp-click-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 10;
  cursor: pointer;
}

.cp-click-zone-prev {
  left: 0;
  cursor: w-resize;
}

.cp-click-zone-next {
  right: 0;
  cursor: e-resize;
}

/* Auto-Advance Progress Line */
.cp-progress-track {
  width: 100%;
  height: 2px;
  background: var(--cp-subtle);
  margin-top: 1rem;
  overflow: hidden;
}

.cp-progress-bar {
  height: 100%;
  background: var(--cp-fg);
  width: 0%;
  transition: width 0.1s linear;
}

/* Minimal Bottom Caption, Date & Title Bar */
.cp-caption-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1.5rem;
  padding-top: 0.9rem;
}

.cp-meta-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
}

.cp-slide-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.cp-slide-date {
  font-family: var(--cp-font-mono);
  font-size: 0.78rem;
  color: var(--cp-muted);
  text-transform: uppercase;
}

.cp-slide-caption {
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--cp-muted);
  max-width: 70ch;
}

.cp-controls-cluster {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cp-counter {
  font-family: var(--cp-font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--cp-bg);
  color: var(--cp-fg);
  border: 2px solid var(--cp-fg);
  padding: 0.5rem 0.95rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cp-btn:hover,
.cp-btn.cp-btn-primary {
  background: var(--cp-fg);
  color: var(--cp-bg);
}

.cp-btn.cp-btn-primary:hover {
  background: #262626;
}

/* Print Shop Grid */
.cp-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.cp-page-header {
  border-bottom: 2px solid var(--cp-fg);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}

.cp-page-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.cp-print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

.cp-print-card {
  border: 2px solid var(--cp-fg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--cp-bg);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .cp-header {
    padding: 0 1rem;
    height: 60px;
  }
  .cp-menu-toggle {
    display: inline-flex;
  }
  .cp-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--cp-bg);
    border-bottom: 2px solid var(--cp-fg);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.85rem;
  }
  .cp-nav.open {
    display: flex;
  }
  .cp-slideshow-shell {
    padding: 0.75rem 1rem 1.25rem;
    min-height: calc(100vh - 60px);
  }
  .cp-caption-bar {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
