/* ================================================
   Andrés Ore — Portafolio 26
   Colores y tipografías en :root para editarlos fácil
   ================================================ */
:root {
  --bg: #000;
  --text: #fff;
  --text-soft: #d6d6d6;
  --orange: #ffa012;       /* acento Divi original */
  --yellow: #ffdd44;       /* color de títulos h1-h6 del sitio original */
  --gold: #d4aa3c;         /* banda de fichas 1972 */
  --stripe-1: #a51d1a;
  --stripe-2: #e2521b;
  --stripe-3: #f6b21c;

  --f-display: "Gloock", Georgia, serif;
  --f-body: "Inter", Helvetica, Arial, sans-serif;
  --f-tech: "Geist Pixel", "Inter", monospace;       /* subtítulos, Índice-_, PORTAFOLIO.- */
  --f-card: "Fira Sans", "Inter", sans-serif;

  --pad: clamp(16px, 6vw, 120px);                   /* margen lateral de textos */
  --header-h: 66px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-weight: 300;                                 /* Inter Light */
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; margin: 0; }
main > section > img, main > section > video { margin: 0; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--pad);
  background: #000;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.logo img { width: auto; height: 36px; }
.menu { display: flex; gap: 22px; margin-left: auto; }
.menu a {
  text-decoration: none; font-weight: 600; font-size: 14px;
  color: rgba(255,255,255,.6); transition: color .2s;
}
.menu a:hover, .menu a[aria-current] { color: #fff; }
.lang { display: flex; align-items: center; gap: 4px; font-size: 13px; color: rgba(255,255,255,.4); }
.lang button {
  background: none; border: 0; padding: 6px 4px; cursor: pointer;
  font: 600 13px var(--f-body); color: rgba(255,255,255,.5); letter-spacing: .05em;
}
.lang button[aria-pressed="true"] { color: var(--orange); }
.menu-toggle { display: none; }

@media (max-width: 800px) {
  .site-header { gap: 12px; }
  .logo img { height: 28px; }
  .lang { margin-left: auto; }
  .menu-toggle {
    display: block; order: 3; width: 40px; height: 40px;
    background: none; border: 0; cursor: pointer; position: relative;
  }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
    content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: var(--orange);
    transition: transform .2s, opacity .2s;
  }
  .menu-toggle span { top: 19px; }
  .menu-toggle span::before { top: -7px; left: 0; right: 0; }
  .menu-toggle span::after { top: 7px; left: 0; right: 0; }
  .menu-toggle[aria-expanded="true"] span { background: transparent; }
  .menu-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }
  .menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: #000;
    border-top: 3px solid var(--orange);
    display: none;
  }
  .menu.open { display: flex; }
  .menu a { padding: 14px var(--pad); border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; }
}

main { padding-top: var(--header-h); }

/* ---------- Franja de color (firma del diseño) ---------- */
.stripe, .sec-title::after {
  background: linear-gradient(to bottom,
    var(--stripe-1) 0 33%, var(--stripe-2) 33% 66%, var(--stripe-3) 66% 100%);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 25%);
          mask-image: linear-gradient(to right, transparent, #000 25%);
}

/* ---------- Portada ---------- */
.hero { position: relative; overflow: hidden; background: #000; }
.hero-img { aspect-ratio: 2560 / 1429; object-fit: cover; }
.hero-text { position: absolute; left: 6%; top: 5%; right: 6%; }
.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(44px, 9.2vw, 200px);
  line-height: .95; letter-spacing: -.01em;
}
.hero-role {
  font-family: var(--f-tech); letter-spacing: -.01em;
  margin: .5em 0 0; font-size: clamp(10px, 1.5vw, 28px);
  text-transform: uppercase; letter-spacing: .02em; line-height: 1.3;
}
.hero-tag {
  position: absolute; right: 1.5%; bottom: 5%; margin: 0;
  font-family: var(--f-tech); font-weight: 400;
  font-size: clamp(22px, 4.5vw, 96px); line-height: 1;
  color: var(--orange); letter-spacing: -.01em;
}
@media (max-width: 700px) {
  .hero-img { aspect-ratio: 4 / 5; object-position: 38% center; }
  .hero-text { top: 6%; }
  .hero-role { font-size: 11px; max-width: 30ch; }
  .hero-tag { right: 5%; font-size: 30px; }
}

/* ---------- About + Index ---------- */
.about { padding: clamp(48px, 8vw, 140px) 0 clamp(48px, 7vw, 120px); }
.about-row {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: clamp(24px, 4vw, 80px); padding-left: var(--pad);
}
.about-text h2 { font-family: var(--f-display); font-size: clamp(40px, 5vw, 96px); line-height: 1; margin-bottom: .45em; }
.about-text p { margin: 0; text-align: justify; font-size: clamp(14px, 1.1vw, 19px); color: var(--text-soft); line-height: 1.45; }
.about-photo { position: relative; padding-right: clamp(20px, 3vw, 48px); }
.side-label {
  position: absolute; right: 0; top: 0; bottom: 0; writing-mode: vertical-rl;
  font-size: 11px; color: rgba(255,255,255,.35); letter-spacing: .1em; white-space: nowrap; overflow: hidden;
}
.index-row {
  display: grid; grid-template-columns: .55fr 1fr; align-items: center;
  gap: clamp(24px, 4vw, 80px); padding: clamp(48px, 7vw, 120px) var(--pad) 0;
}
.index-device img { max-width: 420px; margin-inline: auto; }
.index-title { font-family: var(--f-tech); font-weight: 400; font-size: clamp(36px, 4.6vw, 88px); color: var(--orange); line-height: 1; margin-bottom: .4em; }
.index ol { list-style: none; margin: 0; padding: 0; border-top: 1px dashed rgba(255,255,255,.7); }
.index li { border: 1px dashed rgba(255,255,255,.7); border-top: 0; }
.index a {
  display: block; padding: .55em .8em; text-decoration: none;
  font-size: clamp(13px, 1.05vw, 18px); line-height: 1.35; transition: background .2s;
}
.index a:hover { background: rgba(255,160,18,.12); }
.index strong { display: block; font-weight: 400; text-transform: uppercase; }
.index span::before { content: "• "; }
@media (max-width: 800px) {
  .about-row { grid-template-columns: 1fr; padding-right: var(--pad); }
  .about-photo { order: -1; padding-right: 0; margin-right: calc(-1 * var(--pad)); }
  .side-label { display: none; }
  .index-row { grid-template-columns: 1fr; }
  .index-device img { max-width: 240px; }
}

/* ---------- Encabezado de cada proyecto ---------- */
.project { padding-top: clamp(56px, 7vw, 120px); }
.sec-head { padding: 0 var(--pad) clamp(24px, 3vw, 56px); }
.sec-title {
  position: relative;
  font-family: var(--f-display);
  font-size: clamp(38px, 7vw, 150px);
  line-height: .98; letter-spacing: -.01em;
}
/* franja que sale a la derecha, a la altura del corte entre las 2 líneas */
.sec-title::after {
  content: ""; position: absolute; right: calc(-1 * var(--pad)); top: .9em;
  width: 42%; height: .16em; z-index: -1;
}
.tags {
  margin: .9em 0 0; font-family: var(--f-tech); font-size: clamp(11px, 1.3vw, 24px);
  text-transform: uppercase; letter-spacing: -.03em;
}
.sec-head .body {
  margin: clamp(24px, 3.5vw, 64px) 0 0; text-align: justify;
  font-size: clamp(14px, 1.1vw, 19px); line-height: 1.45; color: var(--text-soft);
}
@media (max-width: 700px) {
  .sec-title::after { top: auto; bottom: -.25em; width: 60%; height: .12em; }
  .sec-head .body { text-align: left; }
}

/* ---------- Concepto Rancagua ---------- */
.concept {
  display: grid; grid-template-columns: 1.35fr 1fr; align-items: center;
  gap: clamp(24px, 5vw, 100px); padding: clamp(48px, 6vw, 110px) var(--pad);
}
.concept-text p { margin: 0 0 1.2em; text-align: justify; font-size: clamp(14px, 1.1vw, 19px); line-height: 1.45; color: var(--text-soft); }
.palette { list-style: none; display: flex; margin: 2.5em 0 0; padding: 0; }
.palette li { flex: var(--w) 1 0; min-width: 0; }
.palette li::before { content: ""; display: block; height: clamp(36px, 3.4vw, 64px); background: var(--c); }
.palette span { display: block; margin-top: 1.4em; font-size: clamp(9px, .95vw, 17px); color: var(--text-soft); }
.concept-logo img { max-width: 520px; margin-inline: auto; }
@media (max-width: 800px) {
  .concept { grid-template-columns: 1fr; }
  .concept-logo { order: -1; }
  .concept-logo img { max-width: 260px; }
  .palette { flex-wrap: wrap; }
  .palette li { flex: 1 0 33%; }
  .palette span { margin: .5em 0 1em; font-size: 12px; }
}

/* ---------- Bloques CTA (fullwidth header Divi) ---------- */
.cta { padding: clamp(40px, 5vw, 80px) var(--pad); background: #000; }
.cta h2 { font-family: var(--f-tech); color: var(--orange); font-size: clamp(30px, 3.2vw, 56px); line-height: 1.1; }
.cta p { margin: .6em 0 0; font-size: clamp(14px, 1.1vw, 18px); text-transform: uppercase; }
.btn {
  display: inline-block; margin-top: 20px; padding: .3em 1em;
  font: 500 clamp(16px, 1.2vw, 20px)/1.7 var(--f-body); color: #fff; text-decoration: none;
  border: 2px solid #fff; border-radius: 3px; transition: background .2s, border-color .2s;
}
.btn:hover { background: rgba(255,255,255,.2); border-color: transparent; }

/* ---------- Video YouTube (carga al hacer clic) ---------- */
.video { background: #000; }
.yt {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden;
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.yt:hover img { opacity: 1; }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; translate: -50% -50%;
  background: rgba(0,0,0,.75); border-radius: 14px; transition: background .2s;
}
.yt:hover .yt-play { background: #f00; }
.yt-play::after {
  content: ""; position: absolute; left: 31px; top: 16px;
  border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff;
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Sliders ---------- */
.slider { position: relative; background: var(--orange); }
.track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.track::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; overflow: hidden; }
.arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 3;
  width: 48px; height: 48px; border: 0; background: none; cursor: pointer; opacity: .85;
}
.arrow::before {
  content: ""; position: absolute; inset: 14px; border: solid #fff; border-width: 0 3px 3px 0;
}
.prev { left: 12px; }  .prev::before { rotate: 135deg; }
.next { right: 12px; } .next::before { rotate: -45deg; }
.dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.dots button[aria-current="true"] { background: #fff; }

/* Slider personajes */
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.char-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 34%) 1fr; align-items: center;
  gap: clamp(20px, 4vw, 70px); padding: clamp(40px, 6vw, 110px) clamp(56px, 9vw, 180px);
  min-height: min(56vw, 900px);
}
.char-text { text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.char-text h3 { font-family: var(--f-display); color: var(--text); font-size: clamp(30px, 3.8vw, 72px); line-height: 1.05; }
.char-text h3 a { text-decoration: none; }
.quote { margin: .5em 0 0; font-size: clamp(16px, 1.5vw, 26px); font-weight: 600; text-transform: uppercase; line-height: 1.3; }

/* Ficha de personaje (imagen + banda en HTML)
   Todo se mide en cqi (% del ancho de la ficha) para que escale igual que la imagen original */
.card { margin: 0; background: #000; container-type: inline-size; }
.chars .card { box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.card-photo img { aspect-ratio: 1448 / 1226; object-fit: cover; }
.card-band {
  position: relative; display: flex; align-items: center;
  aspect-ratio: 1448 / 310;
  background: var(--gold); color: #1a1a1a;
  padding: 0 14cqi 0 16.2cqi;
  font-family: var(--f-card); font-size: 3.15cqi; line-height: 1.2;
}
.card-band::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12.7%; background: #0b0b0e; }
.card-band dl { margin: 0; }
.card-band dl > div { display: flex; gap: .3em; }
.card-band dt { font-weight: 600; text-transform: uppercase; white-space: nowrap; }
.card-band dt::after { content: ":"; }
.card-band dd { margin: 0; white-space: nowrap; }
.card-year {
  position: absolute; right: 1.5cqi; top: 50%; translate: 0 -50%; rotate: -90deg;
  font: italic 900 6.4cqi/1 var(--f-body); color: rgba(0,0,0,.38); letter-spacing: -.02em;
}
/* Grillas de 3 fichas (antes eran imágenes) */
.char-grid { display: grid; grid-template-columns: repeat(3, 1fr); background: #000; }
@media (max-width: 800px) {
  .char-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 36px 44px 56px; }
  .chars .card { width: min(100%, 360px); text-align: left; }
  .arrow { top: 36%; }
}

/* Slider galería */
.gale-btn { position: absolute; left: 50%; bottom: 12%; translate: -50% 0; margin: 0; }

/* ---------- Propiedad intelectual ---------- */
.ip {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(20px, 3vw, 60px);
  padding-left: var(--pad);
  background: radial-gradient(120% 90% at 70% 40%, #1b1b1d, #0b0b0c 70%);
}
.ip p { margin: 0; text-align: justify; font-size: clamp(14px, 1.3vw, 22px); line-height: 1.4; color: var(--text-soft); }
@media (max-width: 800px) {
  .ip { grid-template-columns: 1fr; padding: 40px var(--pad) 0; }
  .ip img { margin-right: calc(-1 * var(--pad)); width: calc(100% + var(--pad)); }
}

/* ---------- Cierre ---------- */
.end { padding-bottom: clamp(60px, 8vw, 140px); text-align: center; }
.end img { width: 100%; }
.end-title { margin: clamp(30px, 4vw, 70px) 0 .2em; font-family: var(--f-display); font-size: clamp(32px, 4vw, 72px); line-height: 1.1; }
.end-link { color: var(--orange); text-decoration: none; font-size: clamp(14px, 1.2vw, 20px); letter-spacing: .05em; }

/* ---------- Contacto ---------- */
.contact { padding: clamp(56px, 7vw, 120px) var(--pad); border-top: 1px solid #222; }
.contact-title { font-family: var(--f-tech); color: var(--orange); font-size: clamp(32px, 4vw, 72px); line-height: 1.1; }
.contact-lead { margin: .6em 0 0; max-width: 40em; color: var(--text-soft); font-size: clamp(14px, 1.2vw, 20px); }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px clamp(16px, 2vw, 32px);
  max-width: 900px; margin-top: clamp(28px, 3vw, 48px);
}
.contact-form label { display: grid; gap: .4em; font: 400 13px/1.2 var(--f-tech); text-transform: uppercase; letter-spacing: .06em; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .7em .8em; font: 300 16px/1.4 var(--f-body); color: var(--text);
  background: #0e0e0f; border: 1px solid #3a3a3a; border-radius: 3px; text-transform: none; letter-spacing: 0;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--orange); }
.contact-form .btn { justify-self: start; margin-top: 0; background: none; cursor: pointer; }
.contact-form .btn:disabled { opacity: .5; cursor: wait; }
.contact-status { grid-column: 1 / -1; margin: 0; min-height: 1.6em; color: var(--orange); }
.contact-status.error { color: #ff6b5a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 700px) {
  .contact-form { grid-template-columns: 1fr; }
}

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