/* ---------------------------------------------------------------
   Portfolio — Franco Orihuela
   Rediseño "blueprint": tablero técnico monocromo. Titulares en
   Barlow Condensed a gran escala, tarjetas y botones enmarcados
   como objetos de plano (bordes finos + marcas de esquina en cruz),
   spotlight que sigue el cursor y revelado al hacer scroll.
   ------------------------------------------------------------- */

:root {
  --ink: #080808;
  --ink-soft: #111113;
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --text-faint: #5c5c5c;
  --divider: rgba(255, 255, 255, 0.14);
  --accent: #ffffff;

  --font-heading: 'Barlow Condensed', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, sans-serif;

  --content-w: 1160px;
  --margin: 24px;

  --ease: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }
a { color: inherit; }

/* ---------- Background layers ---------- */
.bg-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(640px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.09), transparent 60%);
}
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  background-image:
    repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 96px);
}

.wrap, section, .topbar, footer {
  position: relative;
  z-index: 1;
}

/* ---------- Skip link / focus ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: var(--margin); }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: padding 0.4s var(--ease), background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.topbar.is-scrolled {
  padding: 16px 40px;
  background: rgba(8, 8, 8, 0.94);
  border-bottom-color: var(--divider);
}
.mark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
}
.topbar a[href="#contacto"] {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.topbar a[href="#contacto"]:hover { border-color: #fff; color: #fff; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 140px 24px 90px;
}
.hero__kicker {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 28px;
}
.hero h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(48px, 9vw, 140px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  max-width: 1160px;
  color: #fff;
}
.hero__sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 0 44px;
}

.hero__ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 16px 30px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.35s var(--ease), letter-spacing 0.3s ease;
}
.btn--primary {
  position: relative;
  background: #fff;
  color: #000;
}
.btn--primary:hover {
  background: #e2e2e2;
  transform: translateY(-3px);
  letter-spacing: 0.05em;
}
.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-3px);
}

/* ---------- Blueprint frame (corner registration marks) ---------- */
.blueprint { position: relative; }
.blueprint > .corner {
  position: absolute;
  width: 11px;
  height: 11px;
  color: rgba(255, 255, 255, 0.55);
}
.blueprint > .corner::before,
.blueprint > .corner::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }
.btn--primary > .corner { color: rgba(0, 0, 0, 0.4); }

/* ---------- Section heading ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--divider);
  padding-top: 22px;
  margin: 40px 0 20px;
}
.section-head h2 {
  font-family: var(--font-heading);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -0.01em;
  margin: 0;
  color: #fff;
}
.section-head span {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

#catalogo, .contact, .site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* ---------- Catalog grid ---------- */
.catalog {
  list-style: none;
  margin: 0 0 120px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 28px;
}

.dish { min-width: 0; }

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--ink-soft);
  overflow: hidden;
  border: 1px solid var(--divider);
  transition: transform 0.4s var(--ease), border-color 0.3s ease;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.55);
}

.card__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid var(--divider);
}
.card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  filter: grayscale(1) contrast(1.1);
  transition: transform 0.4s ease, filter 0.4s ease;
}
.card:hover .card__thumb img,
.card:focus-visible .card__thumb img {
  transform: scale(1.04);
  filter: grayscale(0.4) contrast(1.1);
}
.card__num {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  padding: 4px 9px;
}

.card__body { padding: 20px 20px 24px; }
.card__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: #fff;
}
.card__sector {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}
.card__blurb {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Contact ---------- */
.contact { padding-top: 20px; padding-bottom: 140px; }
.contact h2 {
  font-family: var(--font-heading);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  max-width: 16ch;
  color: #fff;
}
.contact p {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 36px;
}
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
}
.contact__link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 19px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 3px;
  overflow-wrap: anywhere;
  max-width: 100%;
  transition: border-color 0.25s ease, opacity 0.25s ease;
}
.contact__link:hover { border-color: #fff; opacity: 0.75; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--divider);
  padding-top: 24px;
  padding-bottom: 56px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .catalog { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar { padding: 18px 20px; }
  .topbar.is-scrolled { padding: 14px 20px; }
  .hero { padding: 120px 20px 64px; }
  #catalogo, .contact, .site-footer { padding-left: 20px; padding-right: 20px; }
  .catalog { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { flex-direction: column; gap: 8px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card, .card__thumb img, .btn, .topbar {
    transition-duration: 0.001ms !important;
  }
  .card:hover, .card:focus-visible,
  .btn--primary:hover, .btn--ghost:hover {
    transform: none;
  }
  .bg-spotlight { display: none; }
}
