/* 
  COLD PIPE COLLECTIVE — Avant-Garde Editorial Gallery Theme
  Identity: canvas, light, code — one language, different surfaces
  Artist Protection & Copyright Enforcement Enabled
*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;1,300&family=Inter:wght@300;400;500&family=Syne:wght@500;700;800&display=swap');

:root {
  --bg-primary: #050506;
  --bg-secondary: #0a0a0c;
  --bg-card: #0d0e12;
  --bg-card-hover: #14151a;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  
  --text-primary: #f4f4f6;
  --text-secondary: #a0a0ab;
  --text-muted: #60606c;
  --text-accent: #c8a97e; /* Tungsten Gold */
  
  --font-display: 'Syne', sans-serif;
  --font-serif: 'Cinzel', serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'Inter', sans-serif;

  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Deliberately NOT scroll-behavior:smooth here. Applying it to every
   element fought scroll snapping and made the walk stutter; the nav
   passes behavior:'smooth' per call where it is actually wanted. */

/* iOS Safari inflates type inside blocks it judges wider than the
   viewport — the corridor is full of fixed-px blocks, so it fired on
   plaques and panels and pushed the text over its neighbours. Desktop
   browsers never do this, which is why it only showed on iPhone. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Image Protection - Disable dragging & text selection */
img, canvas {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #25252d;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-accent);
}

/* Subtle Film Grain Noise */
.film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Header & Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background: rgba(5, 5, 6, 0.85);
  /* Safari only took the unprefixed property in 18; without the prefix
     the bar was plain translucent and the corridor read through it. */
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-light);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  text-decoration: none;
  text-transform: uppercase;
}

.brand-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border-light);
}

.nav-menu {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  white-space: nowrap;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--text-accent);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-editorial {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 0.6rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-editorial:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

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

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

.audio-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.audio-btn:hover, .audio-btn.active {
  border-color: var(--text-accent);
  color: var(--text-accent);
}

/* Page Shell */
main {
  position: relative;
  z-index: 2;
  margin-top: 75px;
}

/* Editorial Hero Section */
.hero-editorial {
  min-height: calc(100vh - 75px);
  padding: 5rem 4rem 3rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: block;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.5vw, 6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  color: var(--text-primary);
}

.hero-subhead {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 3rem;
  border-left: 2px solid var(--text-accent);
  padding-left: 1.5rem;
}

.hero-cta-group {
  display: flex;
  gap: 1.5rem;
}

.hero-featured-art {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  border: 1px solid var(--border-strong);
  overflow: hidden;
  background: var(--bg-card);
}

.hero-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) brightness(0.95);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-featured-art:hover .hero-featured-img {
  transform: scale(1.04);
}

.hero-art-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem;
  background: rgba(5, 5, 6, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Section Shared */
.section-editorial {
  padding: 7rem 4rem;
  border-bottom: 1px solid var(--border-light);
}

.section-head-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-accent);
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title-large {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.section-subtitle-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 450px;
  text-align: right;
}

/* Trilogy Showcase */
.trilogy-grid {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.trilogy-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border-light);
}

.trilogy-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trilogy-row.reverse {
  grid-template-columns: 1fr 1fr;
}

.trilogy-row.reverse .trilogy-visual {
  order: 2;
}
.trilogy-row.reverse .trilogy-info {
  order: 1;
}

.trilogy-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  border: 1px solid var(--border-strong);
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
}

.trilogy-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease, filter 0.5s ease;
}

.trilogy-visual:hover img {
  transform: scale(1.05);
}

.trilogy-catalog-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  color: var(--text-accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  letter-spacing: 0.1em;
}

.trilogy-info {
  display: flex;
  flex-direction: column;
}

.trilogy-index-header {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-accent);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.trilogy-title-text {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.trilogy-quote-block {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.trilogy-specs-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.spec-item-label {
  color: var(--text-muted);
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.spec-item-val {
  color: var(--text-primary);
}

/* Archive & Gallery Grid */
.archive-filters {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
}

.archive-filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: var(--transition);
  position: relative;
}

.archive-filter-btn.active, .archive-filter-btn:hover {
  color: var(--text-primary);
}

.archive-filter-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-accent);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.archive-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.archive-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.archive-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
}

.archive-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.archive-card:hover .archive-card-media img {
  transform: scale(1.06);
}

.archive-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.archive-card-cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-accent);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.archive-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.archive-card-medium {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Manifesto Section */
.manifesto-editorial {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: flex-start;
}

.manifesto-big-text {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.manifesto-big-text span {
  color: var(--text-accent);
  font-style: italic;
}

.manifesto-body {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.manifesto-pillar-row {
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
}

.pillar-head {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.pillar-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Legal Rights & Copyright Section */
.copyright-protection-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 3rem 4rem;
  margin-top: 5rem;
  border-left: 3px solid var(--text-accent);
}

.copyright-protection-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copyright-protection-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Inquiry / Acquisition Form */
.inquiry-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 4rem;
}

.inquiry-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.inquiry-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  /* Grid items default to min-width:auto, which stops fields shrinking
     below their intrinsic size and pushed them out of the panel. */
  min-width: 0;
}

.inquiry-field.full {
  grid-column: span 2;
}

.inquiry-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.inquiry-input, .inquiry-select, .inquiry-textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: var(--transition);
  /* Without these the browser's default field width plus padding
     overflows the panel on narrow screens. */
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.inquiry-input:focus, .inquiry-select:focus, .inquiry-textarea:focus {
  outline: none;
  border-color: var(--text-accent);
}

.inquiry-textarea {
  resize: vertical;
  min-height: 140px;
}

/* Modal Lightbox */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 6, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  max-width: 1100px;
  width: 100%;
  /* svh is the toolbar-visible height on iOS; plain vh is the taller
     toolbar-hidden one, so the modal ran off the bottom of the screen. */
  max-height: 88vh;
  max-height: 88svh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  overflow: hidden;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 10;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.modal-artwork-wrap {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.modal-artwork-wrap img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

.modal-details-side {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.modal-cat-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-accent);
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.modal-art-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.modal-art-narrative {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-style: italic;
}

.modal-specs-table {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 1.25rem 0;
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.specs-row {
  display: flex;
  justify-content: space-between;
}

.specs-key {
  color: var(--text-muted);
}

.specs-val {
  color: var(--text-primary);
}

/* Toast */
.editorial-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--text-accent);
  padding: 1.2rem 2rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
}

.editorial-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
footer {
  padding: 3rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-legal-notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

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

/* ---------------------------------------------------------------
   Navbar shedding
   Five links plus three controls do not fit a laptop width at the
   original spacing. Drop the least important element at each step
   rather than letting the bar wrap.
   --------------------------------------------------------------- */

@media (max-width: 1350px) {
  .brand-status { display: none; }
}

@media (max-width: 1150px) {
  /* Instagram button keeps its icon, loses the handle */
  #instagram-nav-btn span { display: none; }
  #instagram-nav-btn { padding: 0.6rem 0.85rem; }
  .nav-menu { gap: 1.25rem; }
  .nav-link { font-size: 0.72rem; letter-spacing: 0.1em; }
}

@media (max-width: 900px) {
  .nav-menu { display: none; }
  .navbar { padding: 0.85rem 1.25rem; }
  .nav-brand { font-size: 1rem; letter-spacing: 0.08em; }
}

@media (max-width: 420px) {
  .nav-brand { font-size: 0.85rem; }
  .view-toggle { font-size: 0.55rem; padding: 0.45rem 0.55rem; }
  .audio-btn { width: 32px; height: 32px; }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-editorial {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .trilogy-row, .trilogy-row.reverse {
    grid-template-columns: 1fr;
  }
  
  .trilogy-row.reverse .trilogy-visual {
    order: 1;
  }
  
  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .manifesto-editorial {
    grid-template-columns: 1fr;
  }
  
  .modal-box {
    grid-template-columns: 1fr;
    max-height: 85vh;
  }
}

@media (max-width: 768px) {
  /* Navbar sizing is handled by the shedding blocks above, which fire
     at 900px — repeating it here would override them by source order. */

  .section-editorial {
    padding: 4rem 1.5rem;
  }
  
  .archive-grid {
    grid-template-columns: 1fr;
  }
  
  .inquiry-wrapper {
    padding: 2rem 1.5rem;
  }
  
  .inquiry-form-grid {
    grid-template-columns: 1fr;
  }
  
  .inquiry-field.full {
    grid-column: span 1;
  }
}
