/* =========================================================
   HOME PAGE
   ========================================================= */

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 64px;
  position: relative;
}

.hero__greeting {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-text-2);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

/* Splitting chars — hero name */
.hero__name .char {
  will-change: opacity, transform, filter;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-text-2);
  max-width: 640px;
  line-height: 1.4;
  margin-bottom: 0;
}

.hero__subtitle-line {
  display: block;
  opacity: 0;
  transform: translateY(12px);
  will-change: opacity, transform;
}

.hero__location {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  opacity: 0;
  transform: translateY(12px);
  margin-top: var(--space-lg);
}

.hero__scroll {
  position: absolute;
  right: var(--container-pad);
  bottom: 64px;
  width: 190px;
  height: 190px;
  opacity: 0;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero__scroll:hover {
  transform: scale(1.1);
}

.hero__scroll-ring {
  position: absolute;
  inset: 0;
  animation: scroll-spin 12s linear infinite;
  transition: animation-duration 0.6s ease;
}


.hero__scroll-text {
  fill: rgba(255, 255, 255, 0.85);
  font-size: 6.2px;
  font-weight: 500;
  text-transform: uppercase;
  font-family: inherit;
  transition: fill 0.3s ease;
}

.hero__scroll-text {
  letter-spacing: 0.25em;
}

.hero__scroll:hover .hero__scroll-text {
  fill: var(--color-accent);
}

.hero__scroll-text--brazil {
  opacity: 0;
  transition: opacity 0.3s ease, fill 0.3s ease;
}

.hero__scroll-text--berlin {
  opacity: 1;
  transition: opacity 0.3s ease, fill 0.3s ease;
}

.hero__scroll:hover .hero__scroll-text--berlin {
  opacity: 0;
}

.hero__scroll:hover .hero__scroll-text--brazil {
  opacity: 1;
}

.hero__scroll-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 0px transparent);
  transition:
    filter 0.4s ease,
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero__scroll-icon--berlin {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.hero__scroll-icon--brazil {
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
}

.hero__scroll:hover .hero__scroll-icon--berlin {
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  filter: drop-shadow(0 0 20px var(--color-accent)) drop-shadow(0 0 6px var(--color-accent));
}

.hero__scroll:hover .hero__scroll-icon--brazil {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  animation: christ-neon-pulse 1.8s ease-in-out 0.5s infinite;
}

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

@keyframes christ-neon-pulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 8px var(--color-accent))
      drop-shadow(0 0 16px var(--color-accent));
  }
  50% {
    filter:
      drop-shadow(0 0 14px var(--color-accent))
      drop-shadow(0 0 24px var(--color-accent))
      drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
  }
}

/* ── Work grid ───────────────────────────────────────────── */

.work {
  padding-block: var(--space-xl) var(--space-2xl);
}

.work__heading {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
}

/*
  Grid layout matching karencf.com:
  Row 1: 1 featured panel (full width)
  Row 2: 3 equal panels
  Row 3: 2 equal panels (last 2 projects don't exist so row 3 = 2)

  For 5 items:
  [  1 - featured  ]
  [  2  ][  3  ][  4  ]   ← but we only have 4 remaining
  Use: featured + 2-col + 2-col
*/

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* Card 1 — full width */
.work__grid .panel:nth-child(1) { grid-column: 1 / -1; }

/* Card 2 — spans 2 cols (left) */
.panel--wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
  align-self: start;
}

/* Card 5 — spans 2 cols (right) */
.panel--wide-right {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
  align-self: start;
}

.panel--wide .panel-cover,
.panel--wide-right .panel-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
}

.panel--wide .panel-cover video,
.panel--wide-right .panel-cover img {
  object-fit: cover;
}

/* ── Work panel ──────────────────────────────────────────── */

.panel {
  position: relative;
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: var(--color-surface);
  cursor: pointer;
  display: block;
}

/* Featured panel: no fixed aspect — image defines its own height */
.panel--featured .panel-cover {
  aspect-ratio: unset;
}

.panel--featured .panel-cover img {
  width: 100%;
  height: auto;
  object-fit: unset;
}

/* Single-column cards: fill row height set by adjacent wide panel */
.work__grid .panel:not(.panel--featured):not(.panel--wide):not(.panel--wide-right) {
  align-self: stretch;
}

.work__grid .panel:not(.panel--featured):not(.panel--wide):not(.panel--wide-right) .panel-cover {
  height: 100%;
  aspect-ratio: unset;
}

.panel-cover {
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
  border-radius: inherit;
}

.panel-cover img,
.panel-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel:hover .panel-cover img,
.panel:hover .panel-cover video {
  transform: scale(1.08);
}

/* Blur-only layer — no color, sits behind the gradient */
.panel-cover__blur {
  position: absolute;
  inset: 0;
  z-index: 1;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  mask-image: linear-gradient(to bottom, transparent 55%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 55%, black 100%);
  border-radius: inherit;
}

/* Gradient overlay — color only, sits on top of blur */
.panel-cover__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(10, 10, 10, 0.15) 50%,
    rgba(10, 10, 10, 0.45) 70%,
    rgba(10, 10, 10, 0.8) 100%
  );
  transition: opacity var(--dur-base) var(--ease-out);
}

/* Panel text overlaid */
.panel-info {
  position: absolute;
  bottom: 40px;
  left: 48px;
  right: 48px;
  z-index: 2;
  will-change: opacity, transform, filter;
}

.panel-info__category {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-2);
  margin-bottom: var(--space-xs);
}

.panel-info__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--color-text);
}

.panel--featured .panel-info__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.panel-info__desc {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  color: var(--color-text-2);
  margin-top: var(--space-xs);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .work__grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .work__grid .panel:nth-child(1),
  .panel--wide,
  .panel--wide-right {
    grid-column: 1;
  }

  .panel {
    border-radius: var(--radius-panel-mob);
  }

  .panel-cover {
    aspect-ratio: 1 / 1;
  }

  .panel--wide .panel-cover,
  .panel--wide-right .panel-cover {
    aspect-ratio: 4 / 3;
  }

  .panel--featured .panel-cover {
    aspect-ratio: 16 / 9;
  }

  .panel-info {
    bottom: 24px;
    left: 24px;
    right: 24px;
  }

  .panel-info__title,
  .panel--featured .panel-info__title {
    font-size: var(--text-lg);
  }
}
