/* ================================================================
   WOONKY — Main Stylesheet
   ================================================================ */

:root {
  --black: #0a0a0a;
  --white: #f5f5f0;
  --accent: #e32f5b;
  --gray: #888;
  --light: #141414;
  --card-bg: #111111;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--black); color: var(--white); font-family: var(--font-body); font-size: 16px; line-height: 1.6; overflow-x: hidden; }

/* ─── NAV ─── */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 48px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to bottom, rgba(10,10,10,0.96), transparent);
  transition: background 0.3s;
}
nav.site-nav.scrolled {
  background: rgba(10,10,10,0.97);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-logo { display: flex; align-items: center; text-decoration: none; }
.site-logo svg { height: 28px; width: auto; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: rgba(245,245,240,0.55); text-decoration: none;
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh; display: flex; align-items: flex-end;
  padding: 0 48px 88px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 55% at 15% 55%, rgba(227,47,91,0.07) 0%, transparent 60%);
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.hero-content { position: relative; z-index: 1; max-width: 1100px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 28px;
}
.hero-tag::before { content: ''; width: 24px; height: 1px; background: var(--accent); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 128px);
  font-weight: 300; line-height: 1; letter-spacing: -0.01em; margin-bottom: 28px;
}
.hero h1 em { font-style: italic; font-weight: 600; color: var(--accent); }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line span { display: inline-block; animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero h1 .line:nth-child(2) span { animation-delay: 0.1s; }
.hero-sub {
  font-size: 17px; color: rgba(245,245,240,0.45);
  max-width: 420px; font-weight: 300; line-height: 1.7;
  animation: fadeIn 1.2s 0.4s both;
}
.hero-scroll {
  position: absolute; bottom: 40px; right: 48px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(245,245,240,0.25); font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase; animation: fadeIn 1.5s 1s both;
}
.hero-scroll::after {
  content: ''; width: 1px; height: 44px;
  background: linear-gradient(to bottom, rgba(245,245,240,0.25), transparent);
  animation: scrollLine 2s 1.5s infinite;
}

@keyframes slideUp { from { transform: translateY(110%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ─── SECTIONS ─── */
.site-section { padding: 96px 48px; }
.section-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gray); margin-bottom: 56px;
  display: flex; align-items: center; gap: 14px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,0.07); max-width: 160px;
}

/* ─── PORTFOLIO GRID ─── */
#portfolio { padding-top: 72px; }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
.project-card {
  position: relative; aspect-ratio: 4/3; overflow: hidden;
  cursor: pointer; background: var(--card-bg);
  display: block; text-decoration: none; color: inherit;
}
.project-card img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s;
  filter: saturate(0.65) brightness(0.82);
}
.project-card:hover img { transform: scale(1.05); filter: saturate(1) brightness(0.65); }
.project-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.1) 55%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 20px;
}
.card-text-only {
  background: #111; border: 1px solid rgba(255,255,255,0.06);
  aspect-ratio: 4/3; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 18px 20px;
  text-decoration: none; color: inherit;
  transition: background 0.25s; position: relative; overflow: hidden;
}
.card-text-only:hover { background: #181818; }
.card-text-only::before {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 3px; height: 0; background: var(--accent);
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-text-only:hover::before { height: 100%; }
.card-brand {
  font-size: 9px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 4px;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
}
.project-card:hover .card-brand { opacity: 1; transform: translateY(0); }
.card-text-only .card-brand { opacity: 0.7; transform: none; }
.card-text-only:hover .card-brand { opacity: 1; }
.card-campaign {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.2vw, 18px); font-weight: 600; line-height: 1.15; color: var(--white);
}
.card-arrow {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; background: var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.6) rotate(-45deg);
  transition: opacity 0.25s, transform 0.25s;
}
.project-card:hover .card-arrow,
.card-text-only:hover .card-arrow { opacity: 1; transform: scale(1) rotate(0deg); }
.card-arrow svg { width: 12px; height: 12px; }

/* ─── AWARDS ─── */
#awards { background: var(--light); border-top: 1px solid rgba(255,255,255,0.05); }
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 3px;
}
.award-item {
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.06);
  padding: 24px 16px; transition: background 0.2s, border-color 0.2s;
}
.award-item:hover { background: #222; border-color: rgba(227,47,91,0.2); }
.award-icon {
  width: 40px; height: 40px; background: rgba(227,47,91,0.1);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.award-icon svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; }
.award-name {
  font-family: var(--font-display); font-size: 13px; font-weight: 400;
  color: rgba(245,245,240,0.5); text-align: center; line-height: 1.3;
}
.award-item:hover .award-name { color: rgba(245,245,240,0.8); }

/* ─── ABOUT ─── */
#about { background: var(--black); border-top: 1px solid rgba(255,255,255,0.05); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; max-width: 1200px; }
.about-h2 {
  font-family: var(--font-display); font-size: clamp(38px, 4.5vw, 64px);
  font-weight: 300; line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 28px;
}
.about-h2 em { font-style: italic; font-weight: 600; color: var(--accent); }
.about-text { font-size: 16px; line-height: 1.8; color: rgba(245,245,240,0.55); margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 36px; border-top: 1px solid rgba(255,255,255,0.07); margin-top: 8px; }
.stat-number { font-family: var(--font-display); font-size: 52px; font-weight: 300; color: var(--white); line-height: 1; margin-bottom: 4px; }
.stat-number span, .stat-number em { color: var(--accent); font-style: italic; }
.stat-label { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.capabilities { display: flex; flex-direction: column; }
.capability {
  padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
  transition: padding-left 0.3s; cursor: default;
}
.capability:hover { padding-left: 10px; }
.capability-name { font-family: var(--font-display); font-size: 15px; font-weight: 400; color: var(--white); }
.capability-desc { font-size: 12px; color: var(--gray); text-align: right; }

/* ─── CLIENTS ─── */
#clients { background: var(--light); border-top: 1px solid rgba(255,255,255,0.05); }
.clients-logo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px; margin-bottom: 48px;
}
.client-logo-item {
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 28px; min-height: 110px; transition: background 0.25s;
}
.client-logo-item:hover { background: #222; }
.client-logo-item img {
  max-width: 130px; max-height: 52px; width: 100%; height: auto;
  object-fit: contain; filter: brightness(0) invert(1);
  opacity: 0.45; transition: opacity 0.25s;
}
.client-logo-item:hover img { opacity: 0.85; }
.clients-historical { padding-top: 36px; border-top: 1px solid rgba(255,255,255,0.07); }
.clients-historical-label {
  font-size: 10px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gray); margin-bottom: 14px;
}
.clients-historical-list {
  font-family: var(--font-display); font-size: 14px; font-weight: 300;
  color: rgba(245,245,240,0.28); line-height: 2; letter-spacing: 0.01em;
}

/* ─── CONTACT ─── */
#contact { background: var(--black); text-align: center; padding: 120px 48px; }
.contact-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}
.contact-tag::before { content: ''; width: 24px; height: 1px; background: var(--accent); }
.contact-h2 {
  font-family: var(--font-display); font-size: clamp(48px, 8vw, 100px);
  font-weight: 300; line-height: 0.95; letter-spacing: -0.02em; margin-bottom: 40px;
}
.contact-h2 em { font-style: italic; font-weight: 600; color: var(--accent); }
.contact-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.contact-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; background: transparent;
  border: 1px solid rgba(255,255,255,0.14); color: var(--white);
  text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s;
}
.contact-link:hover { background: rgba(255,255,255,0.06); }
.contact-link.primary { background: var(--accent); border-color: var(--accent); }
.contact-link.primary:hover { background: #e8476e; border-color: #e8476e; }

/* ─── FOOTER ─── */
.site-footer {
  padding: 28px 48px; border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy { font-size: 12px; color: var(--gray); }
.social-links { display: flex; gap: 24px; }
.social-links a {
  color: rgba(245,245,240,0.28); transition: color 0.2s;
  font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-decoration: none;
}
.social-links a:hover { color: var(--white); }

/* ─── SINGLE TRABAJO ─── */
.project-hero { width: 100%; height: 72vh; min-height: 440px; object-fit: cover; display: block; filter: brightness(0.85); margin-top: 68px; }
.project-hero-placeholder { width: 100%; height: 72vh; min-height: 440px; background: #111; display: flex; align-items: center; justify-content: center; margin-top: 68px; }
.project-hero-placeholder svg { width: 120px; opacity: 0.07; }
.project-wrap { max-width: 860px; margin: 0 auto; padding: 72px 40px 100px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(245,245,240,0.4); text-decoration: none;
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 48px; transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }
.back-link svg { width: 16px; height: 16px; }
.brand-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
  background: rgba(227,47,91,0.07);
  border: 1px solid rgba(227,47,91,0.2); padding: 5px 12px; margin-bottom: 20px;
}
.project-title {
  font-family: var(--font-display); font-size: clamp(36px, 5vw, 72px);
  font-weight: 300; line-height: 1; letter-spacing: -0.01em; margin-bottom: 12px;
}
.project-desc {
  font-size: 18px; line-height: 1.75; color: rgba(245,245,240,0.8);
  border-left: 3px solid var(--accent); padding-left: 22px; margin-bottom: 40px;
  font-family: var(--font-display); font-style: italic; font-weight: 300;
}
.project-text { font-size: 16px; line-height: 1.85; color: rgba(245,245,240,0.55); margin-bottom: 20px; }
.project-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; margin-top: 48px; }
.project-gallery img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.project-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 64px; border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 64px; gap: 20px;
}
.project-nav a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; max-width: 280px; }
.project-nav a.next { text-align: right; }
.pnav-label { font-size: 10px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gray); }
.pnav-title { font-family: var(--font-display); font-size: 18px; font-weight: 400; color: rgba(245,245,240,0.7); line-height: 1.2; transition: color 0.2s; }
.project-nav a:hover .pnav-title { color: var(--accent); }

/* ─── REVEAL ANIMATION ─── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  nav.site-nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .site-section { padding: 60px 20px; }
  #awards, #clients { padding: 60px 20px; }
  .hero { padding: 0 20px 64px; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .site-footer { flex-direction: column; gap: 16px; text-align: center; }
  #contact { padding: 80px 20px; }
  .clients-logo-grid { grid-template-columns: repeat(2, 1fr); }
  .awards-grid { grid-template-columns: repeat(3, 1fr); }
  .project-wrap { padding: 48px 20px 80px; }
  .project-gallery { grid-template-columns: 1fr; }
  .project-nav { flex-direction: column; align-items: flex-start; }
  .project-nav a.next { align-self: flex-end; text-align: right; }
}
@media (max-width: 480px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .clients-logo-grid { grid-template-columns: repeat(2, 1fr); }
  .awards-grid { grid-template-columns: repeat(2, 1fr); }
}
