/* ============================================================
   ARTIST PORTFOLIO — styles.css
   Estética editorial contemporánea, fanzine y serigrafía.
   Paleta tierra: crema, ocre, terracota, negro profundo.
   ============================================================ */

/* --------------------------------------------------------
   0. CSS CUSTOM PROPERTIES (Design tokens)
-------------------------------------------------------- */
:root {
  /* Colores principales */
  --color-bg:        #f6f1e7;   /* crema cálida — fondo base */
  --color-primary:   #d49a43;   /* ocre dorado — énfasis */
  --color-secondary: #1a1a1a;   /* negro profundo — texto y fondo oscuro */
  --color-accent:    #a75a2d;   /* terracota — detalles */
  --color-text:      #111111;   /* texto principal */
  --color-muted:     #7a6e62;   /* texto secundario */
  --color-border:    #d9d0c0;   /* bordes sutiles */
  --color-white:     #fdfaf4;   /* blanco roto */

  /* Tipografía */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Escala tipográfica */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  /* Espaciado */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Transiciones */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast:   150ms;
  --duration-base:   300ms;
  --duration-slow:   600ms;

  /* Layout */
  --max-width: 1280px;
  --header-height: 64px;
  --radius-sm: 2px;
  --radius-md: 4px;
}

/* --------------------------------------------------------
   1. RESET & BASE
-------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

input, textarea, select {
  font: inherit;
}

/* --------------------------------------------------------
   2. UTILITIES
-------------------------------------------------------- */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  z-index: 999;
  transition: top var(--duration-fast);
}
.skip-link:focus {
  top: var(--space-sm);
}

/* Image placeholder (when image is missing) */
.img-placeholder,
.portrait-placeholder {
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* Section eyebrow label */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}
.section-eyebrow--light {
  color: var(--color-primary);
}

/* --------------------------------------------------------
   3. ANIMATIONS & REVEAL
-------------------------------------------------------- */

/* Fade-in on load */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp var(--duration-slow) var(--ease-out) forwards;
}
.fade-in--delay-1 { animation-delay: 0.15s; }
.fade-in--delay-2 { animation-delay: 0.35s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal — initial state */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}
.reveal--delay   { transition-delay: 0.12s; }
.reveal--delay-2 { transition-delay: 0.24s; }

/* Active state (added by JS) */
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------
   4. BUTTONS
-------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: background var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--color-secondary);
  color: var(--color-white);
  border: 2px solid var(--color-secondary);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(167, 90, 45, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--color-secondary);
  color: var(--color-white);
}

.btn--full {
  width: 100%;
}

/* --------------------------------------------------------
   5. HEADER / NAV
-------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  /* Subtle backdrop for scroll */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow var(--duration-base);
}

.site-header.is-scrolled {
  box-shadow: 0 2px 16px rgba(26, 26, 26, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.logo-mark {
  color: var(--color-primary);
  font-size: 1.1em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  position: relative;
  transition: color var(--duration-fast);
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-primary);
  transition: width var(--duration-base) var(--ease-out);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

/* CTA nav link */
.nav-link--cta {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 0.4rem 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.nav-link--cta::after { display: none; }
.nav-link--cta:hover,
.nav-link--cta.is-active {
  background: var(--color-accent);
  color: var(--color-white);
}

/* Mobile hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-out),
              opacity var(--duration-fast);
}

/* Mobile nav open state */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------
   6. HERO
-------------------------------------------------------- */
.hero {
  min-height: calc(100vh - var(--header-height));
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: var(--space-4xl) var(--space-xl) var(--space-3xl);
}

/* Decorative elements */
.hero-deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-deco--circle {
  width: clamp(200px, 30vw, 480px);
  height: clamp(200px, 30vw, 480px);
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.18;
  top: -10%;
  right: -5%;
}

.hero-deco--stamp {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 0.5rem 0.75rem;
  line-height: 1.3;
  text-align: center;
  bottom: 12%;
  right: 6%;
  transform: rotate(3deg);
}

.hero-deco--torn {
  width: 100%;
  height: 24px;
  background: var(--color-secondary);
  bottom: 0;
  left: 0;
  /* Rough torn-paper mask */
  clip-path: polygon(
    0% 100%, 0% 40%,
    2% 80%, 4% 20%, 6% 70%, 8% 30%, 10% 60%,
    12% 10%, 14% 50%, 16% 0%, 18% 55%, 20% 15%,
    22% 65%, 24% 25%, 26% 75%, 28% 5%,
    30% 45%, 32% 85%, 34% 35%, 36% 90%,
    38% 40%, 40% 80%, 42% 20%, 44% 60%,
    46% 10%, 48% 50%, 50% 0%, 52% 55%,
    54% 15%, 56% 65%, 58% 25%, 60% 75%,
    62% 5%, 64% 45%, 66% 85%, 68% 35%,
    70% 90%, 72% 40%, 74% 80%, 76% 20%,
    78% 60%, 80% 10%, 82% 50%, 84% 0%,
    86% 55%, 88% 15%, 90% 65%, 92% 25%,
    94% 75%, 96% 5%, 98% 45%, 100% 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

/* Portrait */
.hero-portrait {
  position: relative;
}

.portrait-frame {
  position: relative;
  aspect-ratio: 3/4;
  max-height: 520px;
  overflow: hidden;
}

.portrait-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-primary);
  opacity: 0.12;
  z-index: 1;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.portrait-bg-shape {
  position: absolute;
  bottom: -8px;
  left: -8px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--color-primary);
  z-index: -1;
  pointer-events: none;
}

/* Hero copy */
.hero-copy {
  max-width: 520px;
}

.hero-eyebrow {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-secondary);
  margin-bottom: var(--space-lg);
}

.hero-title-em {
  font-style: italic;
  color: var(--color-accent);
}

.hero-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
  max-width: 400px;
  line-height: 1.7;
}

/* Funding bar */
.funding-bar {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.funding-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.funding-amount strong {
  color: var(--color-accent);
  font-weight: 500;
}

.progress-track {
  height: 6px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  border-radius: 99px;
  transition: width 1s var(--ease-out);
}

/* --------------------------------------------------------
   7. SECARRAL
-------------------------------------------------------- */
.secarral {
  background: var(--color-bg);
  padding: var(--space-4xl) var(--space-xl);
  position: relative;
}

.secarral::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d9d0c0' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

.secarral-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.secarral-media {
  position: relative;
}

.album-stack {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: var(--space-lg);
}

.album-cover {
  position: relative;
  flex: 0 0 auto;
  width: min(280px, 55%);
  aspect-ratio: 1/1;
  background: var(--color-primary);
  overflow: hidden;
}

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

.album-cover-label {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Vinyl record */
.vinyl {
  flex: 0 0 auto;
  width: min(220px, 40%);
  aspect-ratio: 1/1;
  margin-bottom: var(--space-xl);
  position: relative;
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    #333 0%, #222 15%, #1a1a1a 16%,
    #2a2a2a 17%, #1a1a1a 30%,
    #222 31%, #111 60%,
    #1a1a1a 61%, #111 80%,
    #0a0a0a 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: spin 8s linear infinite;
  animation-play-state: paused;
}

.vinyl:hover .vinyl-disc {
  animation-play-state: running;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.vinyl-label {
  width: 35%;
  height: 35%;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--color-secondary);
  text-transform: uppercase;
  padding: 0 4px;
}

.secarral-badge {
  position: absolute;
  bottom: var(--space-xl);
  right: 0;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.5rem 0.875rem;
  transform: rotate(-2deg);
}

/* Secarral copy */
.secarral-copy {
  max-width: 480px;
}

.secarral-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-secondary);
  margin-bottom: var(--space-md);
}

.secarral-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.75;
  margin-bottom: var(--space-xl);
}

.secarral-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

/* --------------------------------------------------------
   8. PROYECTOS
-------------------------------------------------------- */
.proyectos {
  background: var(--color-secondary);
  padding: var(--space-4xl) var(--space-xl);
  position: relative;
}

/* Top torn edge */
.proyectos::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 100%; height: 28px;
  background: var(--color-bg);
  clip-path: polygon(
    0% 0%, 2% 60%, 4% 0%, 6% 80%, 8% 20%,
    10% 70%, 12% 10%, 14% 50%, 16% 90%,
    18% 30%, 20% 75%, 22% 15%, 24% 55%,
    26% 5%, 28% 45%, 30% 85%, 32% 25%,
    34% 65%, 36% 0%, 38% 70%, 40% 30%,
    42% 80%, 44% 20%, 46% 60%, 48% 0%,
    50% 50%, 52% 90%, 54% 35%, 56% 75%,
    58% 15%, 60% 55%, 62% 5%, 64% 45%,
    66% 85%, 68% 25%, 70% 65%, 72% 10%,
    74% 50%, 76% 90%, 78% 30%, 80% 70%,
    82% 15%, 84% 55%, 86% 0%, 88% 40%,
    90% 80%, 92% 20%, 94% 60%, 96% 5%,
    98% 45%, 100% 0%
  );
  pointer-events: none;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--color-bg);
  text-transform: uppercase;
}

.section-title--light {
  color: var(--color-bg);
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-xl);
}

.project-card {
  background: var(--color-secondary);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  outline: none;
}

.card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-muted);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.project-card:hover .card-img {
  transform: scale(1.05);
}

/* Hover overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(167, 90, 45, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration-base);
}

.card-overlay span {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-white);
}

.project-card:hover .card-overlay,
.project-card:focus-visible .card-overlay {
  opacity: 1;
}

.card-body {
  padding: var(--space-md) var(--space-lg);
}

.card-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
}

/* --------------------------------------------------------
   9. ABOUT
-------------------------------------------------------- */
.about {
  background: var(--color-bg);
  padding: var(--space-4xl) var(--space-xl);
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 100%; height: 28px;
  background: var(--color-secondary);
  clip-path: polygon(
    0% 0%, 2% 60%, 4% 0%, 6% 80%, 8% 20%,
    10% 70%, 12% 10%, 14% 50%, 16% 90%,
    18% 30%, 20% 75%, 22% 15%, 24% 55%,
    26% 5%, 28% 45%, 30% 85%, 32% 25%,
    34% 65%, 36% 0%, 38% 70%, 40% 30%,
    42% 80%, 44% 20%, 46% 60%, 48% 0%,
    50% 50%, 52% 90%, 54% 35%, 56% 75%,
    58% 15%, 60% 55%, 62% 5%, 64% 45%,
    66% 85%, 68% 25%, 70% 65%, 72% 10%,
    74% 50%, 76% 90%, 78% 30%, 80% 70%,
    82% 15%, 84% 55%, 86% 0%, 88% 40%,
    90% 80%, 92% 20%, 94% 60%, 96% 5%,
    98% 45%, 100% 0%
  );
  pointer-events: none;
}

.about-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.about-portrait {
  position: relative;
}

.about-portrait img {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  filter: sepia(20%) contrast(1.05);
}

.about-deco {
  position: absolute;
  bottom: -var(--space-xl);
  left: var(--space-xl);
  width: 60%;
  height: 40%;
  border: 2px solid var(--color-primary);
  z-index: -1;
  transform: rotate(-2deg) translate(-8px, 8px);
}

.about-copy {
  max-width: 520px;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--color-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1;
}

.about-text {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

/* --------------------------------------------------------
   10. CONTACT
-------------------------------------------------------- */
.contact {
  background: var(--color-primary);
  padding: var(--space-4xl) var(--space-xl);
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 100%; height: 28px;
  background: var(--color-bg);
  clip-path: polygon(
    0% 0%, 2% 60%, 4% 0%, 6% 80%, 8% 20%,
    10% 70%, 12% 10%, 14% 50%, 16% 90%,
    18% 30%, 20% 75%, 22% 15%, 24% 55%,
    26% 5%, 28% 45%, 30% 85%, 32% 25%,
    34% 65%, 36% 0%, 38% 70%, 40% 30%,
    42% 80%, 44% 20%, 46% 60%, 48% 0%,
    50% 50%, 52% 90%, 54% 35%, 56% 75%,
    58% 15%, 60% 55%, 62% 5%, 64% 45%,
    66% 85%, 68% 25%, 70% 65%, 72% 10%,
    74% 50%, 76% 90%, 78% 30%, 80% 70%,
    82% 15%, 84% 55%, 86% 0%, 88% 40%,
    90% 80%, 92% 20%, 94% 60%, 96% 5%,
    98% 45%, 100% 0%
  );
  pointer-events: none;
}

.contact-inner {
  max-width: 720px;
  margin: 0 auto;
}

.contact-head {
  margin-bottom: var(--space-2xl);
}

.contact-head .section-eyebrow {
  color: var(--color-secondary);
  opacity: 0.7;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-secondary);
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
  display: none; /* Labels are visually replaced by placeholders */
}

.form-input {
  width: 100%;
  padding: 0.875rem var(--space-md);
  background: var(--color-white);
  border: 1.5px solid transparent;
  border-bottom-color: var(--color-secondary);
  border-radius: 0;
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--duration-fast),
              box-shadow var(--duration-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 2px 0 var(--color-secondary);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn--primary {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  margin-top: var(--space-sm);
}

.contact-form .btn--primary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* Social links */
.social-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  justify-content: center;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(26,26,26,0.2);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--color-secondary);
  color: var(--color-secondary);
  transition: background var(--duration-fast), color var(--duration-fast),
              transform var(--duration-fast);
}

.social-link:hover,
.social-link:focus-visible {
  background: var(--color-secondary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* --------------------------------------------------------
   11. FOOTER
-------------------------------------------------------- */
.site-footer {
  background: var(--color-secondary);
  color: var(--color-muted);
  padding: var(--space-xl) var(--space-xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-legal {
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

.footer-nav {
  display: flex;
  gap: var(--space-lg);
}

.footer-link {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color var(--duration-fast);
}

.footer-link:hover {
  color: var(--color-primary);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social-link {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  transition: color var(--duration-fast);
}

.footer-social-link:hover {
  color: var(--color-primary);
}

/* --------------------------------------------------------
   12. MODAL GALLERY
-------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base);
  padding: var(--space-xl);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
  /* Remove display:none override if set by JS */
  visibility: visible;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.modal-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  border: 2px solid var(--color-primary);
  transition: opacity var(--duration-base);
}

.modal-caption {
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-align: center;
}

/* Modal nav buttons */
.modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  color: var(--color-white);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast), transform var(--duration-fast);
  z-index: 10;
}

.modal-nav:hover {
  background: var(--color-primary);
  transform: translateY(-50%) scale(1.05);
}

.modal-nav--prev { left: var(--space-lg); }
.modal-nav--next { right: var(--space-lg); }

/* Close button */
.modal-close {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  background: rgba(255,255,255,0.1);
  color: var(--color-white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast), transform var(--duration-fast);
  z-index: 10;
}

.modal-close:hover {
  background: var(--color-accent);
  transform: rotate(90deg);
}

/* Counter */
.modal-counter {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-sm);
  color: var(--color-muted);
  letter-spacing: 0.1em;
}

/* --------------------------------------------------------
   13. RESPONSIVE — Mobile First
   Breakpoints: 480 / 768 / 1024 / 1440
-------------------------------------------------------- */

/* —— max 767 (mobile) —— */
@media (max-width: 767px) {
  :root {
    --header-height: 56px;
  }

  /* Nav mobile */
  .nav-toggle {
    display: flex;
  }

  .nav-inner {
    padding: 0 var(--space-lg);
    flex-wrap: wrap;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-xl);
    gap: var(--space-lg);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-out),
                transform var(--duration-base) var(--ease-out);
    z-index: 90;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .nav-link {
    font-size: var(--text-base);
  }

  .nav-link--cta {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }

  /* Hero */
  .hero {
    padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
    align-items: flex-start;
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .hero-portrait {
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-deco--circle {
    width: 200px;
    height: 200px;
    top: -5%;
    right: -10%;
  }

  /* Secarral */
  .secarral {
    padding: var(--space-3xl) var(--space-lg);
  }

  .secarral-inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .album-stack {
    justify-content: center;
  }

  .secarral-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .secarral-actions .btn {
    text-align: center;
    justify-content: center;
  }

  /* Proyectos */
  .proyectos {
    padding: var(--space-3xl) var(--space-lg);
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  /* About */
  .about {
    padding: var(--space-3xl) var(--space-lg);
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .about-portrait {
    display: flex;
    justify-content: center;
  }

  .about-portrait img {
    max-width: 280px;
  }

  /* Contact */
  .contact {
    padding: var(--space-3xl) var(--space-lg);
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Modal */
  .modal-nav { display: none; }
}

/* —— 480px —— */
@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }
}

/* —— min 768 —— */
@media (min-width: 768px) {
  .secarral-actions {
    flex-direction: row;
    align-items: center;
  }
}

/* —— min 1024 —— */
@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* —— 1440+ —— */
@media (min-width: 1440px) {
  .hero-title {
    font-size: var(--text-6xl);
  }
}
