/* Ccomunica v3 — diseño editorial, inspirado en estudios como Obys, Pentagram, Instrument */

@font-face { font-display: swap; }

:root {
  --black: #0b0b0b;
  --white: #fbfaf8;
  --paper: #f2efe9;
  --red: #ff3d1f;
  --grey: #8a8a85;
  --line: rgba(11, 11, 11, 0.12);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --edge: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

.wrap { padding-left: var(--edge); padding-right: var(--edge); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--grey);
}

/* Custom cursor */

.cursor-dot {
  position: fixed;
  z-index: 999;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
  mix-blend-mode: difference;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .cursor-dot { display: block; }
}

.cursor-dot.grow { width: 64px; height: 64px; background: var(--white); }

/* Progress bar */

.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--red);
  z-index: 200;
}

/* Header */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--edge);
  mix-blend-mode: difference;
  color: var(--white);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle .bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle .bars span {
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-open .nav-toggle .bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-open .nav-toggle .bars span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle .bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Fullscreen nav overlay */

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--edge);
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(.77,0,.18,1);
}

.nav-open .nav-overlay { transform: translateY(0); }

.nav-overlay-list {
  list-style: none;
  margin: 0; padding: 0;
}

.nav-overlay-list li {
  border-top: 1px solid rgba(255,255,255,0.14);
}
.nav-overlay-list li:last-child { border-bottom: 1px solid rgba(255,255,255,0.14); }

.nav-overlay-list a {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 18px 4px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 5rem);
  font-weight: 500;
  transition: opacity 0.25s ease, padding-left 0.25s ease;
}

.nav-overlay-list a .idx {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--red);
  font-weight: 600;
}

.nav-overlay-list a:hover { padding-left: 18px; opacity: 0.75; }

.nav-overlay-foot {
  margin-top: 48px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
}

.nav-overlay-foot a:hover { color: var(--white); }

/* Hero */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 140px;
  padding-bottom: 40px;
  position: relative;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  gap: 24px;
}

.hero-top p {
  max-width: 320px;
  font-size: 1rem;
  color: var(--grey);
  margin: 0;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero h1 em {
  font-style: italic;
  color: var(--red);
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 48px;
  gap: 24px;
  flex-wrap: wrap;
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey);
}

.scroll-cue .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.4; }
}

/* Marquee */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 22px 0;
  background: var(--black);
  color: var(--white);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: scroll-left 32s linear infinite;
  gap: 0;
}

.marquee-track span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  padding: 0 32px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 32px;
}

.marquee-track span::after {
  content: '\2022';
  color: var(--red);
  font-style: normal;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Section shell */

.section { padding: 140px 0; }
.section-tight { padding: 90px 0; }
.section-black { background: var(--black); color: var(--white); }
.section-paper { background: var(--paper); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 72px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 32px;
}

.section-black .section-head,
.section-black .index-row { border-color: rgba(255,255,255,0.15); }

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.02;
  margin: 0;
  max-width: 720px;
}

.section-head .num {
  font-size: 0.85rem;
  color: var(--red);
  font-weight: 600;
}

.section-head-sub {
  max-width: 340px;
  color: var(--grey);
  font-size: 0.98rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: translateY(0); }

/* Services — index list style */

.index-list { border-top: 1px solid var(--line); }

.index-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}

.index-row:hover { background: rgba(255, 61, 31, 0.04); }
.section-black .index-row:hover { background: rgba(255,255,255,0.04); }

.index-row .num { color: var(--red); font-size: 0.9rem; font-weight: 600; }

.index-row h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 500;
  margin: 0;
}

.index-row .tags {
  color: var(--grey);
  font-size: 0.92rem;
  line-height: 1.7;
}

@media (max-width: 760px) {
  .index-row { grid-template-columns: 40px 1fr; }
  .index-row .tags { grid-column: 2 / -1; }
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}

.about-media { position: sticky; top: 120px; }
.about-media img { border-radius: 2px; }

.about-lede {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.28;
  font-weight: 400;
  margin: 0 0 48px;
}

.about-lede em { font-style: italic; color: var(--red); }

.about-fact {
  display: flex;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.about-fact:last-child { border-bottom: 1px solid var(--line); }

.about-fact .n {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--red);
  min-width: 90px;
}

.about-fact p { margin: 0; color: var(--black); }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { position: static; }
}

/* Work grid — editorial */

.work-list { display: flex; flex-direction: column; }

.work-item {
  display: grid;
  grid-template-columns: 90px 1fr 1.3fr;
  align-items: center;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.work-item .num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--red);
}

.work-item h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  margin: 0 0 8px;
}

.work-item .client {
  color: var(--grey);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.work-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 2px;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.work-item:hover .work-thumb,
.work-item:focus-within .work-thumb { opacity: 1; transform: scale(1); }

.work-thumb img { width: 100%; height: 100%; object-fit: cover; }

.work-item:hover h3,
.work-item:focus-within h3 { color: var(--red); }

@media (max-width: 900px) {
  .work-item { grid-template-columns: 40px 1fr; }
  .work-thumb {
    grid-column: 1 / -1;
    order: 3;
    opacity: 1;
    transform: none;
    margin-top: 12px;
  }
}

/* Clients marquee duo */

.clients-marquees { display: flex; flex-direction: column; gap: 20px; }

.clients-row { overflow: hidden; }

.clients-track {
  display: flex;
  width: max-content;
  gap: 56px;
  align-items: center;
  animation: scroll-left 40s linear infinite;
}

.clients-row.reverse .clients-track { animation-direction: reverse; }

.clients-track img {
  height: 34px;
  width: auto;
  filter: invert(1) grayscale(1) brightness(1.6);
  opacity: 0.7;
}

/* CTA / footer */

.cta {
  padding: 160px 0 100px;
  text-align: left;
}

.cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 8vw, 6.4rem);
  line-height: 0.98;
  margin: 0 0 40px;
  max-width: 900px;
}

.cta h2 em { font-style: italic; color: var(--red); }

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--red);
  padding-bottom: 6px;
}

.cta-link .arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

.cta-link:hover .arrow { transform: translateX(8px); }

.site-footer {
  padding: 40px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

.site-footer a:hover { color: var(--white); }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }

/* Utility */

.only-mobile { display: none; }

@media (max-width: 760px) {
  .hero-top { flex-direction: column; }
  .section { padding: 90px 0; }
  .section-head { margin-bottom: 44px; padding-bottom: 24px; }
  .header-right .eyebrow { display: none; }
  .nav-toggle .label { display: none; }
}

/* Páginas de proyecto individual */

.back-link {
  position: fixed;
  top: 96px;
  left: var(--edge);
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--white);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.back-link .arrow { transition: transform 0.2s ease; }
.back-link:hover .arrow { transform: translateX(-6px); }

.project-hero {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 140px;
  padding-bottom: 56px;
}

.project-hero .eyebrow { margin-bottom: 24px; }

.project-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 900px;
}

.project-hero h1 em { font-style: italic; color: var(--red); }

.project-cover {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.project-cover img { width: 100%; height: 100%; object-fit: cover; }

.project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-meta div {
  padding: 28px var(--edge);
  border-left: 1px solid var(--line);
}

.project-meta div:first-child { border-left: none; }

.project-meta .eyebrow { display: block; margin-bottom: 10px; }
.project-meta p { margin: 0; font-family: var(--font-display); font-size: 1.15rem; }

.project-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.project-body .lede {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.4;
  margin: 0;
}

.project-gallery {
  display: grid;
  gap: 24px;
}

.project-gallery img { border-radius: 2px; }

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 40px;
  margin-top: 40px;
  gap: 24px;
  flex-wrap: wrap;
}

.project-nav a {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.project-nav a:hover { color: var(--red); }
.project-nav .next { text-align: right; margin-left: auto; }

@media (max-width: 900px) {
  .project-meta { grid-template-columns: repeat(2, 1fr); }
  .project-meta div:nth-child(3) { border-left: none; }
  .project-body { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .project-meta { grid-template-columns: 1fr; }
  .project-meta div { border-left: none; border-top: 1px solid var(--line); }
  .project-meta div:first-child { border-top: none; }
}
