/* kevinvillarreal.com — Dusk Pillars */
:root {
  --acc: #ff7a2f;
  --s0: #070404;
  --s1: #1c0907;
  --s2: #4d1609;
  --s3: #a3360d;
  --s4: #e8661d;
  --s5: #ffb459;
  --m1: #b8471a;
  --m2: #6b220d;
  --m3: #2c0d07;
  --m4: #070404;
  --sa: #fff1c9;
  --sb: #ff8a35;
  --cloud: #3d1209;
  --lit: #ff7a2f;
  --haze: #ff8c3a;
}

body {
  margin: 0;
  background: #070404;
  font-family: 'Geist', system-ui, sans-serif;
  font-weight: 300;
  color: #f6e7d8;
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: #f6e7d8;
  text-decoration: none;
}

a:hover {
  color: #ffffff;
}

@keyframes kv-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes kv-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

@keyframes kv-sunup {
  from {
    transform: translateY(70px);
  }
  to {
    transform: none;
  }
}

@keyframes kv-drift {
  from {
    transform: translateX(-30px);
  }
  to {
    transform: translateX(30px);
  }
}

/* STAGE */
.kv-stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 45% at 50% 108%, rgba(255, 110, 40, 0.35) 0%, transparent 70%),
    linear-gradient(to bottom, #050303 0%, #0b0605 45%, #1f0b06 80%, #341106 100%);
}

.kv-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: screen;
}

/* META ROWS */
.kv-meta {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #b98b70;
  animation: kv-in 0.9s ease both;
}

.kv-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kv-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 10px var(--acc);
  animation: kv-blink 2.4s ease-in-out infinite;
}

/* FRAME */
.kv-frame {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  height: min(74vh, 660px);
  height: min(74dvh, 660px);
  box-shadow: 0 40px 120px -30px rgba(255, 100, 30, 0.35);
}

.kv-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #8a5a42;
  border-style: solid;
  border-width: 0;
  pointer-events: none;
}

.kv-corner.tl {
  top: -9px;
  left: -9px;
  border-top-width: 1px;
  border-left-width: 1px;
}

.kv-corner.tr {
  top: -9px;
  right: -9px;
  border-top-width: 1px;
  border-right-width: 1px;
}

.kv-corner.bl {
  bottom: -9px;
  left: -9px;
  border-bottom-width: 1px;
  border-left-width: 1px;
}

.kv-corner.br {
  bottom: -9px;
  right: -9px;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

/* WRAP */
.kv-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid #2a140c;
  background: #0a0605;
}

/* SKY SCENE */
.kv-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #070404;
  transition: opacity 0.8s ease, transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.kv-sky svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.kv-sun-g {
  transform-box: view-box;
  animation: kv-sunup 3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.kv-clouds-a {
  animation: kv-drift 38s ease-in-out infinite alternate;
}

.kv-clouds-b {
  animation: kv-drift 52s ease-in-out infinite alternate-reverse;
}

.kv-stars circle {
  animation: kv-blink 4s ease-in-out infinite;
}

.kv-stars circle:nth-child(3n) {
  animation-delay: 1.3s;
}

.kv-stars circle:nth-child(3n + 1) {
  animation-delay: 2.6s;
}

.kv-wrap:not(.idle) .kv-sky {
  opacity: 0.5;
  transform: scale(1.05);
}

/* PILLARS */
.kv-pillar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 0 0 56px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(7, 4, 4, 0.85);
  background: transparent;
  transition: flex-grow 0.8s cubic-bezier(0.77, 0, 0.18, 1), background-color 0.6s ease;
  animation: kv-in 0.8s ease both;
}

.kv-pillar:nth-of-type(2) {
  animation-delay: 0.06s;
}

.kv-pillar:nth-of-type(3) {
  animation-delay: 0.12s;
}

.kv-pillar:nth-of-type(4) {
  animation-delay: 0.18s;
}

.kv-pillar:nth-of-type(5) {
  animation-delay: 0.24s;
}

.kv-pillar:nth-of-type(6) {
  animation-delay: 0.3s;
}

.kv-pillar:last-child {
  border-bottom: 0;
}

.kv-pillar::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #ffc874, var(--acc));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.kv-pillar.on::before {
  transform: scaleX(1);
  transition-delay: 0.25s;
}

.kv-wrap.idle .kv-pillar {
  flex-grow: 1;
}

@media (hover: hover) {
  .kv-wrap.idle .kv-pillar:hover {
    background: rgba(7, 4, 4, 0.5);
  }
}

.kv-pillar.on {
  flex-grow: 1;
  background: radial-gradient(ellipse 80% 55% at 25% 115%, rgba(255, 110, 40, 0.28), transparent 70%), #110806;
}

/* GHOST NUMERAL */
.kv-ghost {
  position: absolute;
  z-index: 0;
  right: -0.04em;
  bottom: -0.22em;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(220px, 30vw, 440px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px #4a2214;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
  user-select: none;
}

.kv-pillar.on .kv-ghost {
  opacity: 1;
  transform: none;
  transition-delay: 0.3s;
}

/* PILLAR HEAD */
.kv-head {
  position: relative;
  z-index: 1;
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  height: 56px;
  padding: 0 20px;
  box-sizing: border-box;
  background: none;
  border: 0;
  color: #f1d9c4;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.kv-head:hover,
.kv-pillar.on .kv-head {
  color: #fff4ea;
}

.kv-head:focus-visible {
  outline: 1px solid var(--acc);
  outline-offset: -6px;
}

.kv-head .kv-num,
.kv-head .kv-tag,
.kv-head .kv-label {
  text-shadow: 0 0 14px #070404, 0 0 4px #070404, 0 1px 2px #070404;
}

.kv-num {
  order: 0;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: color 0.4s ease;
}

.kv-head:hover .kv-num,
.kv-pillar.on .kv-num {
  color: #ffc874;
}

.kv-label {
  order: 1;
  flex: 1;
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.kv-head:hover .kv-label {
  font-style: italic;
}

.kv-tag {
  order: 2;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #e8c3a6;
  white-space: nowrap;
}

/* PILLAR BODY */
.kv-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.35s ease, transform 0.5s ease;
  padding: 20px 20px 32px;
  box-sizing: border-box;
}

.kv-pillar.on .kv-body {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease 0.35s, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s;
}

.kv-wrap.idle .kv-head {
  flex: 1 1 auto;
  height: auto;
  min-height: 56px;
}

.kv-wrap.idle .kv-body {
  flex: 0 0 0;
  padding: 0;
}

/* CONTENT */
.kv-inner {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.kv-inner h1 em,
.kv-inner h2 em {
  background: linear-gradient(to bottom, #ffd27a, var(--acc));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em;
}

.kv-eyebrow {
  margin: 0;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #c99a7e;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid #34190f;
  transition: padding 0.4s ease;
}

.kv-row:last-child {
  border-bottom: 1px solid #34190f;
}

a.kv-row:hover {
  padding-left: 10px;
}

a.kv-row:hover .kv-arrow {
  color: var(--acc);
  transform: translate(2px, -2px);
}

.kv-arrow {
  display: inline-flex;
  transition: transform 0.3s ease, color 0.3s ease;
  color: #a57a62;
}

.kv-shot {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(to bottom, #1d0c07, #140806);
  border: 1px solid #3a1c10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #c99a7e;
}

/* INTRO */
.kv-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 28px 40px;
  width: 100%;
}

.kv-intro .kv-inner {
  flex: 999 1 320px;
  min-width: 0;
}

.kv-portrait {
  position: relative;
  margin: 0;
  flex: 0 0 auto;
  width: clamp(120px, 16vw, 220px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px) rotate(-1.5deg);
  transition: opacity 0.7s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.kv-pillar.on .kv-portrait {
  opacity: 1;
  transform: rotate(-1.5deg);
  transition-delay: 0.45s;
}

.kv-portrait-img {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  overflow: hidden;
  border-radius: 2px;
  background: radial-gradient(ellipse 90% 70% at 50% 110%, rgba(255, 122, 47, 0.45), transparent 70%),
    linear-gradient(to bottom, #2a120a, #130806);
  border: 1px solid #5a2a16;
  box-shadow: 0 0 0 6px #120806, 0 0 0 7px #3a1c10, 0 24px 60px -18px rgba(255, 110, 40, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #c99a7e;
  text-align: center;
}

.kv-portrait-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.25) saturate(1.1) contrast(1.05);
}

.kv-portrait-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255, 110, 40, 0.28), transparent 55%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.kv-portrait figcaption {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #a57a62;
  padding-left: 2px;
}

@media (max-width: 767px) {
  .kv-portrait {
    width: 96px;
  }
  .kv-portrait figcaption {
    display: none;
  }
}

.kv-hint {
  transition: opacity 0.5s ease;
}

.kv-hint.off {
  opacity: 0;
}

/* DESKTOP: VERTICAL PILLARS */
@media (min-width: 768px) {
  .kv-stage {
    padding: 32px 40px;
  }

  .kv-wrap {
    flex-direction: row;
  }

  .kv-pillar {
    flex: 0 0 84px;
    flex-direction: row;
    border-bottom: 0;
    border-right: 1px solid rgba(7, 4, 4, 0.85);
  }

  .kv-pillar:last-child {
    border-right: 0;
  }

  .kv-head {
    flex: 0 0 84px;
    width: 84px;
    height: 100%;
    flex-direction: column;
    padding: 30px 0;
    justify-content: space-between;
    align-items: center;
  }

  .kv-wrap.idle .kv-head {
    width: 100%;
    flex-basis: 100%;
  }

  .kv-label {
    order: 2;
    flex: 0 0 auto;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 28px;
  }

  .kv-tag {
    order: 1;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }

  .kv-body {
    transform: translateX(-24px);
    padding: 40px 48px 40px 16px;
    display: flex;
    align-items: flex-end;
  }

  .kv-pillar.on .kv-body {
    transform: none;
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  .kv-pillar,
  .kv-body,
  .kv-pillar.on .kv-body,
  .kv-ghost,
  .kv-portrait,
  .kv-pillar.on .kv-portrait,
  .kv-pillar::before,
  .kv-meta,
  .kv-sun-g,
  .kv-clouds-a,
  .kv-clouds-b,
  .kv-stars circle,
  .kv-sky,
  .kv-dot {
    transition: none;
    animation: none;
  }
}
