/* ==========================================================================
   Pixelry Studio — Quiet Luxury Architectural Monograph
   Aesthetic: Pinned Split-Grid Editorial, Monochromatic Class & Wealth.
   Colors: Bone Chalk White & Basalt Obsidian.
   ========================================================================== */

:root {
  --bg-page: #faf9f6;
  --bg-card: #ffffff;
  --bg-subtle: #f4f3ef;

  --text-main: #18181b;
  --text-muted: #71717a;
  --text-dim: #a1a1aa;

  --border-clean: #e4e4e7;
  --border-hover: #18181b;

  --font-serif: 'Syne', sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', monospace;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-pill: 9999px;

  --curva: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

/* Dark Mode Modifier */
body.mode-obsidian {
  --bg-page: #0a0b0e;
  --bg-card: #121318;
  --bg-subtle: #181920;

  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #52525b;

  --border-clean: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.35);
  color-scheme: dark;
}

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

html {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  background: var(--bg-page);
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
}

/* Top Subtle Bar */
.monograph-top-bar {
  position: sticky;
  top: 0;
  width: 100%;
  height: 64px;
  padding: 0 clamp(24px, 4vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-clean);
  background: color-mix(in srgb, var(--bg-page) 85%, transparent);
}

.brand-minimal {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font: 700 0.95rem/1 var(--font-mono);
  letter-spacing: 0.06em;
}
.brand-square-dot {
  width: 7px;
  height: 7px;
  background: var(--text-main);
  border-radius: 1px;
}

.top-bar-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.btn-clean-toggle {
  background: transparent;
  border: 1px solid var(--border-clean);
  color: var(--text-muted);
  font: 600 0.72rem/1 var(--font-mono);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-clean-toggle:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
}

/* MASTER ASYMMETRIC SPLIT-GRID LAYOUT */
.monograph-layout {
  display: grid;
  grid-template-columns: 42% 58%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
}

/* LEFT COLUMN: PINNED EDITORIAL MONOLITH */
.col-left-pinned {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  padding: clamp(40px, 5vw, 80px) clamp(24px, 4vw, 60px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-clean);
}

.monolith-statement {
  max-width: 440px;
}
.pre-tag {
  font: 700 0.72rem/1 var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 24px;
}
.main-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.title-italic {
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
}
.monolith-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Minimal Table of Contents Navigation */
.pinned-toc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 36px 0;
}
.toc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 500 0.85rem/1 var(--font-mono);
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s var(--curva);
}
.toc-link:hover {
  color: var(--text-main);
  transform: translateX(6px);
}
.toc-link span { color: var(--text-dim); }

.pinned-bottom-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.btn-wa-minimal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-clean);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s;
}
.btn-wa-minimal:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
}
.wa-purity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
}
.btn-wa-minimal strong { font-size: 0.92rem; }
.btn-wa-minimal span:last-child { font-size: 0.78rem; color: var(--text-muted); margin-left: auto; }

/* RIGHT COLUMN: CONTINUOUS FLOW */
.col-right-flow {
  padding: clamp(40px, 5vw, 80px) clamp(24px, 4vw, 70px);
  display: flex;
  flex-direction: column;
  gap: 110px;
}

.flow-section {
  display: flex;
  flex-direction: column;
}

.section-head-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.sec-idx {
  font: 700 0.8rem/1 var(--font-mono);
  color: var(--text-dim);
}
.sec-title {
  font: 600 0.76rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* SECTION 01: 3D PAVILION VIEWPORT */
.canvas-holder-sculpture {
  background: radial-gradient(circle at 50% 42%, #3a3e48 0%, #1a1c22 60%, #0e0f12 100%);
  border: 1px solid var(--border-clean);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 480px;
  position: relative;
  cursor: grab;
}
.canvas-holder-sculpture:active { cursor: grabbing; }

#sculptureCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sculpture-control-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-clean);
  border-top: none;
  padding: 14px 22px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.slider-control-box {
  display: flex;
  align-items: center;
  gap: 14px;
  font: 500 0.75rem/1 var(--font-mono);
  color: var(--text-muted);
}
.slider-control-box input[type="range"] {
  width: 140px;
  accent-color: var(--text-main);
  cursor: pointer;
}
.sculpture-tip {
  font: 500 0.72rem/1 var(--font-mono);
  color: var(--text-dim);
}

/* SECTION 02: TRES PRINCIPIOS */
.principles-stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.principle-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-clean);
}
.principle-row h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.principle-row p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* SECTION 03: REGISTRO DE OBRAS */
.monograph-works-table {
  display: flex;
  flex-direction: column;
}
.work-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-clean);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.2s var(--curva);
}
.work-item-row:hover {
  padding-left: 10px;
}
.work-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
}
.work-type {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.work-meta {
  font: 500 0.78rem/1 var(--font-mono);
  color: var(--text-dim);
}

/* SECTION 04: FORMULARIO Y CONSULTA */
.consultation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-clean);
  border-radius: var(--radius-md);
  padding: 38px 32px;
}
.consultation-card h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.consultation-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 26px;
}

.clean-inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font: 700 0.72rem/1 var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.form-field input, .form-field textarea {
  background: var(--bg-subtle);
  border: 1px solid var(--border-clean);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--text-main);
}
.btn-submit-monograph {
  background: var(--text-main);
  color: var(--bg-page);
  font: 700 0.85rem/1 var(--font-mono);
  padding: 14px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-submit-monograph:hover { opacity: 0.9; }

.feedback-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-clean);
  padding: 14px;
  border-radius: var(--radius-sm);
  font: 500 0.85rem/1.5 var(--font-mono);
  color: var(--text-main);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .monograph-layout { grid-template-columns: minmax(0, 1fr); }
  .col-left-pinned { position: relative; top: 0; height: auto; border-right: none; border-bottom: 1px solid var(--border-clean); }
  .principle-row { grid-template-columns: 1fr; gap: 8px; }
}

/* Aviso de concepto (Laboratorio Pixelry) */
.aviso-concepto {
  position: relative;
  z-index: 110;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  padding: 9px 16px;
  background: #121316;
  color: #e7e8ec;
  font: 500 0.78rem/1.4 var(--font-mono);
  text-align: center;
}
.aviso-concepto a { color: #ff7a52; text-decoration: underline; text-underline-offset: 3px; }
.aviso-concepto a:hover { color: #fff; }
.btn-submit-monograph { padding: 14px 28px; }
a.btn-submit-monograph { color: var(--bg-page); }
.nota-concepto { margin-top: 18px; font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); }
.btn-clean-toggle, .brand-minimal { white-space: nowrap; }

@media (max-width: 520px) {
  .monograph-top-bar { padding: 0 16px; }
  .brand-minimal { font-size: 0.82rem; }
  .top-bar-controls { gap: 8px; }
  .top-bar-controls a.btn-clean-toggle { display: none; }
  .btn-wa-minimal { display: flex; flex-wrap: wrap; row-gap: 4px; }
  .btn-wa-minimal span:last-child { margin-left: 17px; flex-basis: 100%; }
}
