/* Taller San Cristóbal · SIDEBAR
   Sticky info column + scrolling content. Compact.
   ========================================================= */

:root {
  /* --color-primary y --color-accent vienen del Layout (define:vars con el theme del tenant). */
  --primary-strong: color-mix(in oklab, var(--color-primary), black 14%);
  --primary-soft: color-mix(in srgb, var(--color-primary) 10%, transparent);
  --primary-line: color-mix(in srgb, var(--color-primary) 28%, transparent);

  --bg: #efeae0;
  --surface: #ffffff;
  --surface-2: #f7f1e5;
  --ink: #15110a;
  --ink-soft: #3d362b;
  --muted: #6b6353;
  --rule: #d6cbb1;
  --rule-soft: color-mix(in srgb, var(--ink) 14%, transparent);

  --on-primary: #ffffff;
  --green: #16a34a;

  --pad-x: clamp(16px, 2.5vw, 32px);
  --gap: clamp(10px, 1.4vw, 14px);

  --font-display: "Instrument Serif", ui-serif, Georgia, serif;
  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Inter", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --shadow: 0 1px 0 rgba(20,20,30,0.04), 0 10px 28px -16px rgba(20,20,30,0.16);
}

[data-theme="dark"] {
  --bg: #0e0c08;
  --surface: #16130d;
  --surface-2: #1c1810;
  --ink: #ece4d0;
  --ink-soft: #c5bca6;
  --muted: #8c8270;
  --rule: #2a251a;
  --rule-soft: color-mix(in srgb, var(--ink) 18%, transparent);
  --primary-soft: color-mix(in srgb, var(--color-primary) 16%, transparent);
  --primary-line: color-mix(in srgb, var(--color-primary) 38%, transparent);
  --primary-strong: color-mix(in oklab, var(--color-primary), white 6%);
  --shadow: 0 1px 0 rgba(0,0,0,0.4), 0 10px 28px -16px rgba(0,0,0,0.7);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light dark; }
[data-theme="dark"] html, html[data-theme="dark"] { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
::selection { background: var(--color-primary); color: var(--on-primary); }

/* ============ SHELL ============ */
.shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
@media (min-width: 860px) {
  .shell {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}
@media (min-width: 1100px) {
  .shell {
    grid-template-columns: 380px minmax(0, 1fr);
  }
}
@media (min-width: 1400px) {
  .shell {
    grid-template-columns: 420px minmax(0, 1fr);
  }
}

/* ============ SIDEBAR ============ */
.sidebar {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 32px;
}
@media (min-width: 860px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: clamp(28px, 2.5vw, 40px);
  }
}
[data-theme="dark"] .sidebar { background: var(--surface); color: var(--ink); }

.sb-top { display: flex; flex-direction: column; gap: 20px; }

.sb-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--bg);
}
[data-theme="dark"] .sb-brand { color: var(--ink); }
.sb-brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  background: var(--color-primary);
  color: var(--on-primary);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}
.sb-brand > span:last-child { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.sb-brand-name {
  display: block;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
}
.sb-brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--bg) 65%, transparent);
}
[data-theme="dark"] .sb-brand-sub { color: var(--muted); }

.sb-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: color-mix(in srgb, var(--bg) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--bg) 16%, transparent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: color-mix(in srgb, var(--bg) 95%, transparent);
  letter-spacing: 0.02em;
  width: max-content;
  max-width: 100%;
}
[data-theme="dark"] .sb-status {
  background: var(--surface-2);
  border-color: var(--rule);
  color: var(--ink);
}
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--green);
  position: relative;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 30%, transparent);
}
.dot::after {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 999px;
  background: var(--green);
  opacity: 0.4;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.5); opacity: 0.55; }
  70%  { transform: scale(2); opacity: 0; }
  100% { transform: scale(2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .dot::after { animation: none; opacity: 0.45; transform: none; } }

.sb-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.3vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--bg);
  text-wrap: balance;
}
[data-theme="dark"] .sb-title { color: var(--ink); }
.sb-title em { font-style: italic; color: var(--color-accent); }

.sb-deck {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--bg) 75%, transparent);
}
[data-theme="dark"] .sb-deck { color: var(--ink-soft); }

.sb-ctas { display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 38px;
  padding-inline: 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .12s, background-color .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { height: 44px; padding-inline: 20px; font-size: 14px; }
.btn-primary { background: var(--color-primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-primary[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn-primary[aria-disabled="true"]:hover { background: var(--color-primary); }
.btn-ghost {
  background: transparent;
  border-color: color-mix(in srgb, var(--bg) 22%, transparent);
  color: var(--bg);
}
.btn-ghost:hover { border-color: var(--bg); background: color-mix(in srgb, var(--bg) 8%, transparent); }
[data-theme="dark"] .btn-ghost { color: var(--ink); border-color: var(--rule); }
[data-theme="dark"] .btn-ghost:hover { background: var(--surface-2); border-color: var(--rule-soft); }

/* Facts */
.sb-facts {
  display: grid;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
}
[data-theme="dark"] .sb-facts { border-color: var(--rule); }
.sb-fact { display: flex; flex-direction: column; gap: 2px; }
.sb-fact-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 55%, transparent);
}
[data-theme="dark"] .sb-fact-label { color: var(--muted); }
.sb-fact-value {
  font-size: 13.5px;
  color: var(--bg);
  letter-spacing: -0.005em;
}
[data-theme="dark"] .sb-fact-value { color: var(--ink); }
.sb-fact-link {
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 30%, transparent);
  padding-bottom: 1px;
  width: max-content;
  transition: color .2s, border-color .2s;
}
[data-theme="dark"] .sb-fact-link { border-color: var(--rule-soft); }
.sb-fact-link:hover { color: var(--color-accent); border-color: var(--color-accent); }

.sb-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--bg) 18%, transparent);
  color: var(--bg);
  border-radius: 8px;
  transition: background-color .2s, border-color .2s;
}
[data-theme="dark"] .icon-btn { color: var(--ink); border-color: var(--rule); }
.icon-btn:hover { background: color-mix(in srgb, var(--bg) 8%, transparent); }
.icon-btn .icon-sun { display: none; }
.icon-btn .icon-moon { display: block; }
[data-theme="dark"] .icon-btn .icon-sun { display: block; }
[data-theme="dark"] .icon-btn .icon-moon { display: none; }
.sb-foot {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--bg) 55%, transparent);
}
[data-theme="dark"] .sb-foot { color: var(--muted); }
.sb-foot strong { color: var(--bg); font-weight: 600; }
[data-theme="dark"] .sb-foot strong { color: var(--ink); }
.sb-foot a {
  color: var(--color-accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ============ MAIN ============ */
.main {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.6vw, 20px);
  padding: clamp(14px, 1.6vw, 20px);
  min-width: 0;
}

/* Banner */
.banner {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}
.banner img {
  width: 100%;
  height: clamp(220px, 36vw, 380px);
  object-fit: cover;
  display: block;
}
.banner-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: white;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.6));
}
.banner-num {
  color: var(--color-accent);
  font-weight: 700;
}

/* Block */
.block {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: clamp(18px, 2vw, 24px);
  box-shadow: var(--shadow);
}
.block-head { margin-bottom: 14px; }
.block-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.block-tag {
  display: inline-block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.block-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}
.block-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.block-body {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.block-quote {
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--rule-soft);
}
.block-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 22px);
  font-style: italic;
  color: var(--ink);
  line-height: 1.25;
  text-wrap: balance;
}
.block-quote footer {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ============ TURNERO ============ */
.t-form {
  display: grid;
  gap: 12px;
}
.t-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 760px) {
  .t-row { grid-template-columns: 100px 1fr; align-items: start; gap: 16px; }
}
.t-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 10px;
}
.t-pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.t-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.t-pick input { position: absolute; opacity: 0; pointer-events: none; }
.t-pick-t { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.t-pick-s { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.t-pick:hover { border-color: var(--rule-soft); background: var(--surface); }
.t-pick.is-chosen {
  border-color: var(--color-primary);
  background: var(--primary-soft);
}
.t-pick.is-chosen .t-pick-s { color: var(--color-primary); }
.t-select, .t-fields input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  font-size: 13.5px;
  transition: border-color .15s;
}
.t-select:focus, .t-fields input:focus { outline: 0; border-color: var(--color-primary); background: var(--surface); }
.t-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.t-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
  flex-wrap: wrap;
}
.t-note { margin: 0; font-size: 13px; color: var(--ink-soft); }
@media (max-width: 560px) { .t-foot .btn { width: 100%; } }

/* ============ ROW-2 layout ============ */
.row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 1.6vw, 20px);
}
@media (min-width: 1100px) {
  .row-2 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
}
.row-2 > aside { display: flex; flex-direction: column; gap: 0; }
.row-2 > aside .block-sub {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
}

/* ============ SERVICES LIST ============ */
.srv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
@media (min-width: 760px) { .srv-list { grid-template-columns: 1fr 1fr; gap: 4px 22px; } }
.srv-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.srv-list li:last-child { border-bottom: 0; }
@media (min-width: 760px) {
  .srv-list li:nth-last-child(2) { border-bottom: 0; }
}
.srv-n {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  line-height: 1;
}
.srv-list h3 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.srv-list p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
  text-wrap: pretty;
}

/* ============ HOURS LIST ============ */
.hours-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hours-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 13px;
}
.hours-list li:last-child { border-bottom: 0; }
.hours-list li > span:first-child { color: var(--ink); font-weight: 500; }
.hours-list li > span:nth-child(2) { font-family: var(--font-mono); color: var(--ink-soft); font-size: 12.5px; }
.hours-list .is-today { background: var(--primary-soft); margin-inline: -8px; padding-inline: 8px; border-radius: 6px; }
.hours-list .is-today > span:first-child { font-weight: 700; color: var(--color-primary); }
.hours-list .is-closed > span:nth-child(2) { font-style: italic; color: var(--muted); }

/* ============ GALLERY ============ */
.gal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  grid-auto-rows: 130px;
}
@media (min-width: 760px) {
  .gal {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 150px;
    gap: 8px;
  }
}
.gal-cell {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
  cursor: zoom-in;
}
.gal-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gal-cell:hover img { transform: scale(1.05); }
.gal-lead { grid-column: span 2; grid-row: span 2; }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.9); padding: 32px;
  animation: lb-in .2s;
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: min(95vw, 1400px); max-height: 90vh; object-fit: contain; border-radius: 6px; }
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: 8px;
}
.lightbox-close:hover { background: rgba(255,255,255,0.18); }
