:root {
  --bg: #f4f4f1;
  --ink: #141413;
  --muted: #6d6d68;
  --line: #dcdcd6;
  --panel-cd: #e9e5ef;
  --panel-mate: #dfe7e3;
  --accent: #d4471f;
  --shot-shadow: 0 1px 2px rgb(20 20 19 / .06), 0 24px 60px -20px rgb(40 24 64 / .28);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d;
    --ink: #ecece7;
    --muted: #8f8f88;
    --line: #262624;
    --panel-cd: #1c1a21;
    --panel-mate: #161a18;
    --accent: #ef6a43;
    --shot-shadow: 0 1px 2px rgb(0 0 0 / .4), 0 30px 70px -24px rgb(0 0 0 / .8);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd { margin: 0; }

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

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Cabecera */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.mark { width: 26px; height: 26px; }
.mark-bg { fill: var(--ink); }
.mark-fg { fill: none; stroke: var(--bg); stroke-width: 3.4; stroke-linecap: round; }

.nav { display: flex; gap: clamp(18px, 3vw, 36px); font-size: 15px; }
.nav a { color: var(--muted); transition: color .2s var(--ease); }
.nav a:hover { color: var(--ink); }

/* Presentación */
.intro {
  padding-top: clamp(72px, 13vw, 184px);
  padding-bottom: clamp(56px, 8vw, 112px);
}
.intro h1 {
  font: 400 clamp(46px, 7.4vw, 112px)/0.98 var(--serif);
  letter-spacing: -0.025em;
  max-width: 12.5em;
  text-wrap: balance;
}
.intro h1 em { font-style: italic; }
.intro-meta {
  display: flex;
  gap: 32px;
  margin-top: clamp(36px, 5vw, 64px);
  color: var(--muted);
  font-size: 15px;
}
.intro-meta p { display: flex; align-items: center; gap: 10px; }
.intro-meta p:first-child::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Rótulos de sección */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(28px, 4vw, 48px);
}
.label {
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Productos */
.work { padding-bottom: clamp(40px, 6vw, 80px); }

.case + .case { margin-top: clamp(72px, 10vw, 152px); }

.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 16 / 9;
}
.media img { transition: transform .9s var(--ease); }

.media-cd { background: var(--panel-cd); }
.media-cd img {
  position: absolute;
  left: 9%;
  top: 10%;
  width: 82%;
  max-width: none;
  border-radius: 10px;
  box-shadow: var(--shot-shadow);
}
.media-cd:hover img { transform: translateY(-1.2%); }

.media-mate { background: var(--panel-mate); }
.media-mate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}
.media-mate:hover img { transform: scale(1.02); }

.case-info {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 20px;
  align-items: start;
  padding-top: clamp(22px, 2.6vw, 32px);
}
.case-title {
  grid-column: 1 / span 5;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.num {
  font: 500 13px/1 var(--sans);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transform: translateY(-0.2em);
}
.case h3 {
  font: 400 clamp(36px, 3.8vw, 56px)/1 var(--serif);
  letter-spacing: -0.02em;
}
.case-desc {
  grid-column: 6 / span 4;
  font-size: 17px;
  line-height: 1.5;
  max-width: 30em;
  padding-top: 6px;
}
.case-meta {
  grid-column: 10 / span 3;
  display: grid;
  gap: 10px;
  padding-top: 8px;
  font-size: 14px;
}
.case-meta div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.case-meta dt { color: var(--muted); }
.case-meta dd { text-align: right; }

.go, .mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.go {
  grid-column: 10 / span 3;
  justify-self: start;
  font-size: 15px;
  font-weight: 500;
  padding: 2px 0;
}
.go::after, .mail::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(.0001);
  transition: transform .45s var(--ease);
}
.go:hover::after, .mail:hover::after { transform: scaleX(1); }
.go svg, .mail svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .35s var(--ease), color .2s;
}
.go:hover svg, .mail:hover svg { transform: translate(2px, -2px); color: var(--accent); }

/* Contacto */
.contact {
  padding-top: clamp(56px, 8vw, 120px);
  padding-bottom: clamp(80px, 11vw, 160px);
}
.contact-lead { color: var(--muted); font-size: 17px; margin-bottom: 14px; }
.mail {
  font: 400 clamp(38px, 6.4vw, 96px)/1.05 var(--serif);
  letter-spacing: -0.02em;
  gap: .12em;
}
.mail::after { bottom: 0.02em; }
.mail svg { width: .42em; height: .42em; stroke-width: 1.1; }

/* Pie */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
  position: relative;
}
.foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: var(--line);
}

/* Entrada suave */
@media (prefers-reduced-motion: no-preference) {
  .intro h1, .intro-meta {
    animation: rise .9s var(--ease) both;
  }
  .intro-meta { animation-delay: .12s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Tablet */
@media (max-width: 1024px) {
  .case-title { grid-column: 1 / -1; }
  .case-desc { grid-column: 1 / span 7; padding-top: 0; }
  .case-meta { grid-column: 8 / -1; padding-top: 2px; }
  .go { grid-column: 8 / -1; }
}

/* Celular */
@media (max-width: 680px) {
  .top-in { height: 60px; }
  .nav { font-size: 14px; }
  .intro { padding-top: 64px; padding-bottom: 56px; }
  .intro h1 { font-size: clamp(40px, 11.6vw, 56px); line-height: 1.02; }
  .intro-meta { font-size: 14px; gap: 24px; }

  .media { aspect-ratio: 4 / 3.4; border-radius: 4px; }
  .media-cd img { left: 6%; top: 8%; width: 165%; border-radius: 8px; }
  .media-mate img { object-position: 78% 50%; }

  .case-info { display: flex; flex-direction: column; gap: 16px; padding-top: 20px; }
  .case-title { gap: 12px; }
  .case h3 { font-size: 38px; }
  .case-desc { font-size: 16px; }
  .case-meta { width: 100%; padding-top: 0; }
  .go { margin-top: 2px; }

  .mail { font-size: clamp(34px, 10vw, 46px); }
  .foot { font-size: 13px; }
}
