/* ============================================================
   PANEDAS STUDIO — hoja de estilos compartida
   Dirección: limpio, claro, refinado (ref. Apple) — el color
   lo aporta el trabajo, no la web. Negro cálido sobre papel,
   un único acento de uso mínimo.
   Tipografía: Inter Tight (titulares) / IBM Plex Mono (fichas,
               códigos) / Inter (cuerpo de texto)
   ============================================================ */

:root {
  --bg: #fbfaf7;
  --bg-panel: #f0eee7;
  --fg: #17160f;
  --fg-dim: #6b6862;
  --fg-faint: #a39e92;
  --accent: #b85c38;
  --line: #e3ded3;

  --display: "Inter Tight", sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --sans: "Inter", sans-serif;

  --maxw: 1800px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.eyebrow {
  display: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* ---------- NAV ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: blur(8px);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  display: flex;
  align-items: center;
}

.logo-mark {
  height: 38px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.6vw, 8px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a,
.nav-contact {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  padding: 7px 14px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-contact:hover {
  background: var(--fg);
  color: var(--bg);
}

.nav-links a[aria-current="page"],
.nav-contact[aria-current="page"] {
  background: var(--fg);
  color: var(--bg);
}

/* ---------- MOBILE MENU (burger + overlay) ---------- */
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  flex: none;
}
.nav-burger span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-burger span:first-child { top: 16px; }
.nav-burger span:last-child { top: 24px; }
.nav-burger.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-burger.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
}
.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-overlay-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-overlay-close {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--fg);
}
.nav-overlay-links {
  list-style: none;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
}
.nav-overlay-links a {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 13vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1;
  padding: 6px 0;
  color: var(--fg);
}
.nav-overlay-links a:hover { color: var(--accent); }

/* ---------- MOBILE MENU (burger + overlay) ---------- */
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  flex: none;
}
.nav-burger span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-burger span:first-child { top: 16px; }
.nav-burger span:last-child { top: 24px; }
.nav-burger.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-burger.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
}
.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-overlay-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-overlay-close {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--fg);
}
.nav-overlay-links {
  list-style: none;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
}
.nav-overlay-links a {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 13vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1;
  padding:2px 0;
  color: var(--fg);
}
.nav-overlay-links a:hover { color: #f90043; 
}

/* ---------- HERO ---------- */
.hero {
  padding: clamp(24px, 4vh, 48px) 0 clamp(48px, 8vh, 96px);
}

.hero-video {
  max-width: 1500px;
  margin: 0 auto clamp(40px, 6vh, 72px);
  aspect-ratio: 16/9;
  border-radius: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-video::after {
  content: attr(data-label);
  position: absolute;
  bottom: 16px;
  left: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 6.5vw, 53px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 18px 0 26px;
}

.hero .lede {
  max-width: 48ch;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--fg-dim);
}

/* ---------- SECTION HEADERS ---------- */
.section {
  padding: clamp(56px, 10vh, 110px) 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 5vh, 56px);
  flex-wrap: wrap;
}

.section-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.01em;
  margin: 6px 0 0;
}

.text-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--fg-faint);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- WORK GRID (home) ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.work-card {
  background: var(--bg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
}

.swatch {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.swatch::after {
  content: attr(data-label);
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.card-code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
}

.card-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(19px, 2.2vw, 23px);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 10px;
}

/* ---------- CAPABILITIES ---------- */
.cap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cap-pill {
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  border-radius: 100px;
  padding: 10px 18px;
  color: var(--fg-dim);
}

/* ---------- FILTER ---------- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 28px;
}
.filter-pill {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-pill:hover { border-color: var(--accent); color: var(--fg); }
.filter-pill.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.ledger-row.is-hidden { display: none; }

/* ---------- LEDGER (trabajos page) ---------- */
.ledger { }

.ledger-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 12px;
  border-radius: 10px;
  transition: background 0.2s ease;
}
.ledger-row:hover,
.ledger-row:focus-visible {
  background: var(--bg-panel);
}

.ledger-row .card-code { font-size: 13px; }

.ledger-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: -0.01em;
  line-height: 1.1;
  transition: color 0.2s ease;
}
.ledger-row:hover .ledger-title { color: var(--accent); }

.ledger-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--fg-dim);
}

.ledger-preview {
  position: sticky;
  top: 96px;
  align-self: start;
}

.ledger-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

/* ---------- CONTACT ---------- */
.contact-hero {
  padding: clamp(72px, 16vh, 160px) 0;
  text-align: left;
}
.contact-email {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 6.5vw, 76px);
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-block;
  border-bottom: 2px solid var(--line);
  padding-bottom: 10px;
  transition: border-color 0.2s, color 0.2s;
  word-break: break-word;
}
.contact-email:hover { color: var(--accent); border-color: var(--accent); }

.social-list { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 24px; flex-wrap: wrap; }
.social-list a {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.social-list a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- FOOTER ---------- */
.site-footer {
  padding: 32px 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--fg-faint);
}
.site-footer a { color: var(--fg-dim); }
.site-footer a:hover { color: var(--accent); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .work-grid { grid-template-columns: 1fr; }
  .ledger-grid { grid-template-columns: 1fr; }
  .ledger-preview { display: none; }
  .ledger-row { grid-template-columns: 44px 1fr; }
  .ledger-meta { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-links, .nav-contact { display: none; }
  .nav-burger { display: block; }

  .hero-video {
    max-width: 100%;
    aspect-ratio: 4/5;
    border-radius: 8px;
  }
}

@media (max-width: 560px) {
  .site-nav .wrap { height: 64px; }
  .nav-overlay-top { height: 64px; }
  .wordmark { font-size: 18px; }
}