/* ==========================================================================
   KUPLA · v4 — Sitio en mantención
   Misma gramática visual que la v2: tema oscuro, fotografía, hairlines,
   Archivo + Manrope + JB Mono y un solo acento. Página temporal.
   ========================================================================== */

/* ---------- Fuentes ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JB Mono";
  src: url("../fonts/jbmono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JB Mono";
  src: url("../fonts/jbmono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #0a0a0b;
  --ink-2: #0c0c0d;
  --ink-3: #111112;
  --bone: #f2efe9;
  --bone-2: #d8d3ca;
  --muted: #a6a199;
  --muted-2: #86817a;
  --accent: #f3671d;
  --accent-ink: #160a03;
  --line: rgba(242, 239, 233, 0.12);
  --line-strong: rgba(242, 239, 233, 0.24);

  --display: "Archivo", system-ui, sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JB Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --pad: clamp(1.15rem, 4.2vw, 4rem);
  --shell: 1560px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);

  --z-grain: 120;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ink);
  color-scheme: dark;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, p, figure, figcaption { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

/* ---------- Base ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.mono {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.accent { color: var(--accent); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--bone);
  color: var(--ink);
  padding: 0.7rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-height: 48px;
  padding: 0.55rem 0.6rem 0.55rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.45s var(--ease), background-color 0.45s var(--ease), border-color 0.45s var(--ease), color 0.45s var(--ease);
}

.btn:active { transform: scale(0.98); }

.btn .icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  transition: transform 0.5s var(--ease);
}

.btn .icon svg { width: 16px; height: 16px; }
.btn:hover .icon { transform: translate(2px, -2px); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn--primary .icon { background: rgba(10, 10, 11, 0.14); }
.btn--primary:hover { background: #ff7a33; border-color: #ff7a33; }

.btn--ghost {
  color: var(--bone);
  border-color: var(--line-strong);
  background: rgba(10, 10, 11, 0.18);
  padding-right: 1.35rem;
}
.btn--ghost:hover { border-color: var(--bone); background: rgba(242, 239, 233, 0.06); }

/* ---------- Header ---------- */
.top {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.brand { display: flex; align-items: center; flex: none; }
.brand img { width: auto; height: 48px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 239, 233, 0.035);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-2);
  white-space: nowrap;
}

.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(243, 103, 29, 0.16);
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Portada ---------- */
main {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.cover {
  display: flex;
  align-items: center;
  flex: 1;
  padding-block: clamp(2.5rem, 6vh, 5rem);
}

.cover__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 7rem);
}

.cover__copy { max-width: 620px; }

.cover__title {
  font-family: var(--display);
  font-size: clamp(3rem, 5.3vw, 5.5rem);
  font-weight: 520;
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin-left: -0.025em;
}

.cover__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.035em;
}

.cover__title .line > span { display: block; }

.cover__lede {
  max-width: 38ch;
  margin-top: clamp(1.4rem, 2.6vh, 2rem);
  color: var(--muted);
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
  line-height: 1.65;
}

.cover__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: clamp(1.8rem, 3.5vh, 2.4rem);
}

.cover__direct {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-top: 1.7rem;
  font-size: 0.82rem;
  color: var(--bone-2);
}
.cover__direct .mono { font-size: 0.56rem; }
.cover__direct a {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.1rem;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.cover__direct a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Obra principal ---------- */
.work {
  width: 100%;
  max-width: 760px;
  justify-self: end;
}

.work__frame {
  position: relative;
  padding: 0.5rem;
  border: 1px solid var(--line);
  background: rgba(242, 239, 233, 0.035);
}

.work__shots {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-3);
}

.work__shots img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s var(--ease), transform 1.1s var(--ease);
}
.work__shots img.is-active {
  opacity: 1;
  transform: none;
}
@media (hover: hover) and (pointer: fine) {
  .work__frame:hover .work__shots img.is-active { transform: scale(1.025); }
}

.switch {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(242, 239, 233, 0.2);
  border-radius: 999px;
  background: rgba(10, 10, 11, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.switch button {
  padding: 0.48rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--bone-2);
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.switch button.is-active { background: var(--accent); color: var(--ink); }
.switch button:not(.is-active):hover { background: rgba(242, 239, 233, 0.08); color: var(--bone); }

.work__meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.work__id { display: flex; flex-direction: column; gap: 0.2rem; }
.work__id .mono { color: var(--accent); font-size: 0.56rem; }
.work__id strong {
  font-family: var(--display);
  font-size: clamp(1.35rem, 1.8vw, 1.65rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.work__caption {
  text-align: right;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* ---------- Franja de servicios ---------- */
.strip {
  border-block: 1px solid var(--line);
  background: var(--ink-2);
}

.strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1rem;
}

.strip__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.8rem;
}

.strip__list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.strip__list li::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--accent);
  flex: none;
}

.strip__note {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.footer { padding: 1.8rem 0 2rem; }

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer__brand img { width: auto; height: 36px; }
.footer__brand span {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-size: 0.8rem;
  color: var(--bone-2);
}
.footer__contact a { transition: color 0.3s var(--ease); }
.footer__contact a:hover { color: var(--accent); }

.footer__legal {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- Intro ---------- */
.status,
.cover__lede,
.cover__actions,
.cover__direct,
.work {
  animation: rise 1s var(--ease) both;
}
.status { animation-delay: 0.15s; }
.cover__lede { animation-delay: 0.55s; }
.cover__actions { animation-delay: 0.68s; }
.cover__direct { animation-delay: 0.8s; }
.work { animation-delay: 0.42s; }

.cover__title .line > span {
  transform: translateY(112%);
  animation: lineUp 1.15s var(--ease) both;
}
.cover__title .line:nth-child(1) > span { animation-delay: 0.18s; }
.cover__title .line:nth-child(2) > span { animation-delay: 0.3s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes lineUp {
  from { transform: translateY(112%); }
  to { transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) and (min-width: 901px) {
  .cover__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    gap: clamp(1.5rem, 3.5vw, 3rem);
  }
  .cover__title { font-size: clamp(2.7rem, 4.8vw, 4.2rem); }
  .cover__lede { max-width: 34ch; font-size: 0.95rem; }
  .cover__actions { gap: 0.5rem; }
  .btn { font-size: 0.78rem; }
  .work__meta { gap: 1rem; }
  .work__caption { font-size: 0.7rem; }
}

@media (max-width: 900px) {
  .cover { align-items: flex-start; }
  .cover__grid {
    grid-template-columns: 1fr;
    gap: clamp(2.5rem, 6vw, 4rem);
  }
  .cover__copy { max-width: 720px; }
  .cover__title { font-size: clamp(3rem, 8.2vw, 4.8rem); }
  .cover__lede { max-width: 46ch; }
  .work { max-width: 760px; justify-self: start; }
}

@media (max-width: 700px) {
  .top { padding: 16px 0; }
  .brand img { height: 42px; }
  .status { font-size: 0.53rem; letter-spacing: 0.12em; padding: 0.5rem 0.7rem; gap: 0.55rem; }

  .cover { padding-block: 2.6rem 3.4rem; }
  .cover__title { font-size: clamp(2.75rem, 12.5vw, 4rem); }
  .cover__lede { font-size: 0.96rem; max-width: 40ch; }
  .cover__actions { gap: 0.5rem; }
  .btn { min-height: 46px; font-size: 0.8rem; padding-left: 1.1rem; }
  .btn .icon { width: 31px; height: 31px; }
  .cover__actions .btn--ghost { padding-right: 1.1rem; }
  .cover__direct { flex-wrap: wrap; gap: 0.4rem 0.7rem; }

  .work__shots { aspect-ratio: 4 / 3; }
  .switch { top: 10px; right: 10px; padding: 3px; }
  .switch button { padding: 0.45rem 0.68rem; font-size: 0.53rem; }
  .work__meta { align-items: flex-start; }
  .work__caption { font-size: 0.72rem; }

  .strip__inner { align-items: flex-start; flex-direction: column; gap: 0.7rem; }
  .strip__list { gap: 0.45rem 1.2rem; }
  .strip__list li { font-size: 0.52rem; }
  .strip__note { display: none; }

  .footer__inner { align-items: flex-start; flex-direction: column; gap: 1.1rem; }
  .footer__contact { gap: 0.35rem 1.1rem; font-size: 0.76rem; }
  .footer__brand span { display: none; }
}

@media (max-width: 390px) {
  .status { font-size: 0.52rem; padding: 0.45rem 0.6rem; }
  .cover__title { font-size: 2.6rem; }
  .cover__actions { width: 100%; }
  .cover__actions .btn--primary { width: 100%; }
  .cover__actions .btn--ghost { width: 100%; justify-content: center; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .cover__title .line > span { transform: none; }
  .status,
  .cover__lede,
  .cover__actions,
  .cover__direct,
  .work { opacity: 1; transform: none; }
  .work__frame:hover .work__shots img.is-active { transform: none; }
}
