/* =====================================================================
   JC Steinbrunner — Public Site Styles
   ===================================================================== */

:root {
  --bg: #FFFFFF;
  --bg-off: #F9F8F6;
  --text: #141414;
  --text-secondary: #6B6B6B;
  --text-light: #ADADAD;
  --border: #E8E8E8;
  --nav-height: 72px;
  --max: 1440px;
  --gap: 1.5rem;
  --section-gap: 6rem;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.25s;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

/* =====================================================================
   Layout
   ===================================================================== */

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

.container--narrow {
  max-width: 780px;
}

/* =====================================================================
   Navigation
   ===================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text);
  flex-shrink: 0;
}

/* On the hero (dark bg), logo shows white until scrolled */
body:has(.hero) .site-header:not(.scrolled) .nav-logo,
body:has(.hero) .site-header:not(.scrolled) .nav-links a {
  color: #ffffff;
}

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

.nav-links a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  transition: opacity var(--duration);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--duration) var(--ease);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--duration), opacity var(--duration);
}

/* =====================================================================
   Hero
   ===================================================================== */

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.03);
  transition: transform 8s var(--ease);
}

.hero-bg--placeholder {
  background: #1a1a1a;
  background: linear-gradient(135deg, #1a1a1a 0%, #3a3535 50%, #1a1a1a 100%);
}

.hero:hover .hero-bg {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.18) 0%,
    rgba(0,0,0,0.45) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #ffffff;
  padding: 2rem;
}

.hero-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}

/* =====================================================================
   Buttons
   ===================================================================== */

.btn {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.85rem 2.25rem;
  border: 1px solid transparent;
  transition: all var(--duration) var(--ease);
  cursor: pointer;
}

.btn--light {
  border-color: rgba(255,255,255,0.7);
  color: #ffffff;
}

.btn--light:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--text);
}

.btn--dark {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.btn--dark:hover {
  background: transparent;
  color: var(--text);
}

.btn--outline {
  border-color: var(--text);
  color: var(--text);
}

.btn--outline:hover {
  background: var(--text);
  color: #ffffff;
}

/* =====================================================================
   Flash messages
   ===================================================================== */

.flash-container {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
}

.flash {
  padding: 0.9rem 1.25rem;
  font-size: 0.875rem;
  border-left: 3px solid;
  background: var(--bg);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.flash--success { border-color: #2d6a4f; color: #2d6a4f; }
.flash--error   { border-color: #c0392b; color: #c0392b; }

/* =====================================================================
   Page header
   ===================================================================== */

.page-header {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}

/* =====================================================================
   Section
   ===================================================================== */

.section {
  padding: var(--section-gap) 0;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.section-cta {
  text-align: center;
  margin-top: 4rem;
}

/* =====================================================================
   Grid
   ===================================================================== */

.grid {
  display: grid;
  gap: var(--gap);
}

.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.grid-item {
  display: block;
  cursor: pointer;
}

.grid-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg-off);
  aspect-ratio: 4 / 5;
}

.grid-img-wrap--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.875rem;
}

.grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), opacity var(--duration);
}

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

.grid-info {
  padding: 0.85rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.grid-title {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
}

.grid-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* =====================================================================
   Portfolio detail
   ===================================================================== */

.detail-page {
  min-height: 100vh;
}

.detail-back {
  padding-top: calc(var(--nav-height) + 1.5rem);
  padding-bottom: 1.5rem;
}

.back-link {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  transition: color var(--duration);
}

.back-link:hover { color: var(--text); }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 5rem;
  padding-bottom: 6rem;
  align-items: start;
}

.detail-images { position: sticky; top: calc(var(--nav-height) + 2rem); }

.main-image-wrap {
  background: var(--bg-off);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 75vh;
}

.main-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.thumb-btn {
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--duration);
  flex-shrink: 0;
}

.thumb-btn--active { border-color: var(--text); }

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  padding-top: 0.5rem;
}

.detail-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.5rem;
  font-size: 0.875rem;
  margin-bottom: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.detail-meta dt {
  color: var(--text-secondary);
  font-weight: 400;
}

.detail-meta dd { color: var(--text); }

.detail-description {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.detail-no-image {
  aspect-ratio: 4/5;
  background: var(--bg-off);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

/* =====================================================================
   About
   ===================================================================== */

.about-bio {
  margin-bottom: 4rem;
}

.about-bio p,
.prose p {
  margin-bottom: 1.4em;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.shows-heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.shows-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.shows-table tr {
  border-bottom: 1px solid var(--border);
}

.shows-table td {
  padding: 0.9rem 1rem 0.9rem 0;
  vertical-align: top;
}

.show-year {
  width: 60px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.show-title { font-weight: 400; }

.show-venue, .show-location {
  color: var(--text-secondary);
}

/* =====================================================================
   Contact
   ===================================================================== */

.contact-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.7;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  gap: 1.5rem;
}

.form-row--2 { grid-template-columns: 1fr 1fr; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.75rem 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  outline: none;
  transition: border-color var(--duration);
  width: 100%;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-bottom-color: var(--text);
}

.form-group textarea {
  padding-top: 0.5rem;
}

.required { color: var(--text-secondary); }

.form-submit {
  padding-top: 0.5rem;
}

/* =====================================================================
   Empty state
   ===================================================================== */

.empty-state {
  text-align: center;
  padding: 6rem 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* =====================================================================
   Footer
   ===================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-name { font-family: var(--font-serif); font-size: 0.9rem; }

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

/* =====================================================================
   Responsive
   ===================================================================== */

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(3, 1fr); }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .detail-images { position: static; }
}

@media (max-width: 768px) {
  :root {
    --section-gap: 4rem;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1.5rem 2rem 2rem;
    flex-direction: column;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    z-index: 99;
  }

  .nav-links.open { display: flex; }
  .nav-links a { color: var(--text) !important; font-size: 0.9rem; }
  .nav-links a::after { display: none; }

  .nav-toggle { display: flex; }

  body:has(.hero) .site-header:not(.scrolled) .nav-toggle span { background: #fff; }

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

  .form-row--2 { grid-template-columns: 1fr; }

  .detail-layout { padding: 0 1rem 4rem; }

  .page-header { padding-top: calc(var(--nav-height) + 2.5rem); }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .nav { padding: 0 1rem; }
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero-name { font-size: 2.75rem; }
}
