/* Propuesta 3 — Editorial Luminoso · Identidad Stitchkin (colores stitchkin.cl) */
:root {
  --bg: #ffffff;
  --bg-soft: var(--st-bg-soft);
  --ink: var(--st-ink);
  --ink-dim: rgba(62, 62, 62, .6);
  --accent: var(--st-blue);
  --accent-dark: var(--st-blue-dark);
  --deep: var(--st-blue-deep);
  --cta: var(--st-orange);
  --cta-soft: var(--st-orange-soft);
  --line: rgba(62, 62, 62, .14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--cta); color: #fff; }

.label {
  font-size: .68rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .9rem;
}
.label::before { content: ""; width: 34px; height: 1px; background: var(--accent); opacity: .5; }

.section-title {
  font-weight: 100;
  font-size: clamp(2.1rem, 5.4vw, 4rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin-top: 1.2rem;
  color: var(--deep);
}
.section-title em { font-style: italic; font-weight: 300; color: var(--cta); }

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--deep);
  display: grid;
  place-items: center;
}
.loader-logo { height: 32px; filter: brightness(0) invert(1); }

/* ---------- Nav: transparente sobre el hero; barra azul sólida al pasar el hero ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .8rem clamp(1.4rem, 5vw, 4rem);
  color: #fff;
  background: transparent;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1), background .45s, box-shadow .45s;
}
.nav.is-hidden { transform: translateY(-110%); }
.nav.is-solid {
  background: var(--st-blue);
  box-shadow: 0 2px 14px rgba(11, 34, 51, .18);
}
.nav.is-solid .nav-links a { text-shadow: none; }
.nav-logo img {
  height: clamp(32px, 4vw, 46px);
  filter: brightness(0) invert(1);
}
.nav-links { display: flex; align-items: center; }
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(11, 34, 51, .35);
  transition: color .45s, border-color .45s, background .35s;
}
.nav-links a:not(.nav-cta) {
  padding: 0 .85rem;
  border-right: 1px solid rgba(255,255,255,.45);
}
.nav-links a:not(.nav-cta):first-child { padding-left: 0; }
.nav-cta {
  margin-left: .95rem;
  border: 1.5px solid #fff;
  padding: .52rem 1.1rem;
  border-radius: 99px;
  display: inline-block;
}
.nav-cta:hover { background: var(--cta); border-color: var(--cta); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 580px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.hero-reel {
  position: absolute;
  inset: -6%;
  will-change: transform;
  pointer-events: none;
}
.hero-reel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1.4s ease;
}
.hero-reel img.is-active { opacity: 1; z-index: 1; }
.hero-reel.is-live img.is-active { animation: kenBurns 7.4s ease-out forwards; }
.hero-reel.is-live img.is-active.is-alt { animation-name: kenBurnsAlt; }
@keyframes kenBurns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.08) translate3d(-1.2%, -0.8%, 0); }
}
@keyframes kenBurnsAlt {
  from { transform: scale(1.07) translate3d(-0.9%, 0.6%, 0); }
  to   { transform: scale(1.02) translate3d(0.8%, -0.4%, 0); }
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 34, 51, .48) 0%, rgba(11, 34, 51, .14) 48%, rgba(11, 34, 51, .06) 100%),
    linear-gradient(180deg, rgba(11, 34, 51, .18) 0%, transparent 38%, rgba(11, 34, 51, .48) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 clamp(1.4rem, 5vw, 4rem) clamp(3.5rem, 10vh, 6rem);
}
.hero-title {
  font-weight: 100;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  text-shadow: 0 8px 28px rgba(11, 34, 51, .45);
}
.hero-title .mask { display: block; overflow: hidden; padding-bottom: .1em; }
.hero-title .txt { display: inline-block; will-change: transform; }
.hero-title em { font-style: italic; font-weight: 300; color: var(--cta-soft); }

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-top: clamp(1.6rem, 4vh, 2.6rem);
  flex-wrap: wrap;
}
.mask-p { display: block; overflow: hidden; max-width: 460px; }
.mask-p .txt { display: inline-block; }
.hero-sub { color: rgba(255, 255, 255, .88); line-height: 1.8; font-size: .95rem; }
.hero-now-line {
  margin-top: 1.1rem;
  display: flex;
  align-items: baseline;
  gap: .7rem;
  flex-wrap: wrap;
}
.hero-now-line strong {
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-now-line em {
  font-style: normal;
  font-size: .78rem;
  color: rgba(255,255,255,.7);
}
.hero-dots { display: flex; gap: .35rem; margin-top: .85rem; }
.hero-dots button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px;
  background: rgba(255,255,255,.35); cursor: pointer;
  transition: width .35s, background .35s;
}
.hero-dots button.is-active { width: 22px; background: var(--cta); }

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  background: var(--cta);
  color: #fff;
  text-decoration: none;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 1rem 1.9rem;
  border-radius: 99px;
  transition: background .35s, box-shadow .35s;
}
.btn-pill svg { width: 15px; height: 15px; transition: transform .35s; }
.btn-pill:hover { background: var(--cta-soft); box-shadow: 0 14px 34px -12px rgba(255, 105, 0, .55); }
.btn-pill:hover svg { transform: translateY(3px); }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--accent);
  color: #fff;
  overflow: hidden;
  padding: 1.05rem 0;
}
.marquee-track {
  display: flex;
  gap: 2.6rem;
  width: max-content;
  will-change: transform;
  align-items: baseline;
}
.marquee-track span {
  font-weight: 100;
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  white-space: nowrap;
}
.marquee-track i { font-style: normal; opacity: .55; }

/* ---------- Proyectos: tarjetas editoriales (foto protagonista + interacción rica) ---------- */
.proyectos { padding: clamp(5rem, 13vh, 8.5rem) clamp(1.4rem, 5vw, 4rem); }
.section-head { max-width: 760px; margin-bottom: clamp(3rem, 7vh, 5rem); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: clamp(1.4rem, 2.6vw, 2.2rem);
}

@property --vcard-angle { syntax: "<angle>"; initial-value: 120deg; inherits: false; }

.vcard {
  position: relative;
  text-decoration: none;
  color: inherit;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(0, 139, 201, .16);
  box-shadow: 0 2px 6px rgba(11, 34, 51, .04), 0 18px 44px -26px rgba(11, 34, 51, .18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1), box-shadow .55s, border-color .55s;
}
.vcard:hover {
  transform: translateY(-10px);
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(11, 34, 51, .05), 0 34px 64px -26px rgba(0, 99, 156, .38);
}

/* Anillo degradado azul→naranjo que gira alrededor de la card al hover */
.vcard::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--vcard-angle),
    rgba(0, 139, 201, .95), rgba(255, 105, 0, .8) 32%, rgba(0, 139, 201, .12) 58%, rgba(0, 139, 201, .95));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .5s;
  pointer-events: none;
}
.vcard:hover::after { opacity: 1; animation: vcardSpin 3.4s linear infinite; }
@keyframes vcardSpin { to { --vcard-angle: 480deg; } }

.vcard-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-soft);
  clip-path: inset(0% 0% 0% 0% round 21px 21px 0 0);
}
.vcard-media img {
  width: 100%;
  height: 116%;
  object-fit: cover;
  will-change: transform;
  transition: scale .9s cubic-bezier(.22, 1, .36, 1);
}
.vcard:hover .vcard-media img { scale: 1.07; }

/* Velo azul profundo que sube desde abajo al hover */
.vcard-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 34, 51, 0) 32%, rgba(11, 34, 51, .74) 100%);
  opacity: 0;
  transform: translateY(22%);
  transition: opacity .55s, transform .55s cubic-bezier(.22, 1, .36, 1);
}
.vcard:hover .vcard-veil { opacity: 1; transform: translateY(0); }

.vcard-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  z-index: 2;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: .42rem .9rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, .92);
  color: var(--deep);
  backdrop-filter: blur(6px);
  transition: background .4s, color .4s;
}
.vcard-badge.hot { background: var(--cta); color: #fff; }

/* Número editorial que aparece sobre la foto al hover */
.vcard-index {
  position: absolute;
  right: 1.1rem; bottom: .4rem;
  z-index: 2;
  font-weight: 100;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -.02em;
  color: rgba(255, 255, 255, .92);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s .06s, transform .55s .06s cubic-bezier(.22, 1, .36, 1);
}
.vcard:hover .vcard-index { opacity: 1; transform: translateY(0); }

.vcard-body {
  padding: 1.35rem 1.5rem 1.5rem;
  display: grid;
  gap: .35rem;
  align-content: start;
  flex: 1;
}
.vcard-logo {
  width: auto;
  max-width: 148px;
  max-height: 64px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: .4rem;
  background: #fff;
  border: 1.5px solid #fff;
  border-radius: 10px;
  padding: .2rem .28rem;
}
.vcard-body:has(.vcard-logo) .vcard-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.vcard-comuna {
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .55rem;
}
.vcard-comuna::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cta);
}
.vcard-name {
  font-weight: 100;
  font-size: 1.6rem;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--deep);
  line-height: 1.05;
}
.vcard-tipos { font-size: .85rem; color: var(--ink-dim); }

.vcard-foot {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.vcard-entrega {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color .4s;
}
.vcard:hover .vcard-entrega { color: var(--accent-dark); }
.vcard-arrow {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0, 139, 201, .35);
  color: var(--accent);
  display: grid;
  place-items: center;
  transition: background .4s, border-color .4s, color .4s, transform .55s cubic-bezier(.22, 1, .36, 1);
}
.vcard-arrow svg { width: 16px; height: 16px; }
.vcard:hover .vcard-arrow {
  background: var(--cta);
  border-color: var(--cta);
  color: #fff;
  transform: rotate(-45deg);
}

/* ---------- Nosotros ---------- */
.nosotros { padding: clamp(5rem, 13vh, 8.5rem) clamp(1.4rem, 5vw, 4rem); background: var(--bg-soft); border-block: 1px solid var(--line); }
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.nosotros-media { border-radius: 22px; overflow: hidden; aspect-ratio: 4/5; }
.nosotros-media img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.nosotros-copy { margin-top: 1.5rem; color: var(--ink-dim); line-height: 1.85; max-width: 480px; }
.nosotros-firmas {
  display: flex;
  gap: clamp(1.8rem, 4vw, 3.5rem);
  margin-top: 2.6rem;
  flex-wrap: wrap;
}
.nosotros-firmas div { display: grid; gap: .25rem; }
.nosotros-firmas strong { font-weight: 100; font-size: 2.2rem; color: var(--accent); }
.nosotros-firmas span { font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-dim); }

/* ---------- Contacto ---------- */
.contacto { padding: clamp(5rem, 13vh, 8.5rem) clamp(1.4rem, 5vw, 4rem); }
.contacto-inner { max-width: 820px; margin-inline: auto; }

.form { margin-top: 2.4rem; display: grid; gap: 1.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.field { display: grid; gap: .5rem; }
.field label { font-size: .64rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-dim); }
.field input, .field select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 300;
  padding: .95rem 1.1rem;
  outline: none;
  transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 139, 201, .15); }
.field input::placeholder { color: rgba(62, 62, 62, .3); }

.btn-brand {
  justify-self: start;
  background: var(--cta);
  color: #fff;
  border: none;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  padding: 1.05rem 2.2rem;
  border-radius: 99px;
  cursor: pointer;
  transition: background .35s, box-shadow .35s;
}
.btn-brand:hover { background: var(--cta-soft); box-shadow: 0 14px 34px -12px rgba(255, 105, 0, .5); }
.form-ok { display: none; color: var(--accent-dark); font-size: .88rem; font-weight: 700; }
.form-ok.show { display: block; }

/* ---------- Footer ---------- */
.footer {
  background: var(--deep);
  color: rgba(255, 255, 255, .85);
  padding: 2.6rem clamp(1.4rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-size: .78rem;
}
.footer-logo { height: 24px; filter: brightness(0) invert(1); }
.back-hub { color: var(--cta-soft); text-decoration: none; letter-spacing: .08em; }
.back-hub:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nosotros-grid { grid-template-columns: 1fr; }
  .nosotros-media { aspect-ratio: 16/11; }
  .nav-links a:not(.nav-cta) { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-reel.is-live img.is-active,
  .hero-reel.is-live img.is-active.is-alt { animation: none; transform: scale(1.02); }
  .vcard, .vcard-media img, .vcard-veil, .vcard-index, .vcard-arrow, .vcard-entrega { transition: none; }
  .vcard:hover::after { animation: none; }
}
