/* ══════════════════════════════════════
   Hero
   ══════════════════════════════════════ */

/* Hero wrapper reserves space in the document flow */
.hero {
  height: 60vh;
  position: relative;
}

/* Hero content is fixed so it stays in place while content scrolls over */
.hero-content {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 40px;
  z-index: 1;
}

.hero-content .hero-text {
  max-width: 900px;
}

.hero-text {
  font-family: var(--font);
  font-weight: 300;
  font-size: clamp(26px, 5vw, 48px);
  line-height: 1.3;
  letter-spacing: -0.3px;
  color: var(--white);
}

.hero-text strong {
  font-weight: 400;
}

/* ── Scroll-down chevron (inside the fixed hero) ── */
.scroll-down {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  opacity: 0.6;
  transition: opacity 0.3s ease;
  animation: bounce 2.5s ease-in-out infinite;
  z-index: 1;
}

.scroll-down:hover {
  opacity: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ══════════════════════════════════════
   Project Grid
   ══════════════════════════════════════ */

.projects {
  position: relative;
  z-index: 2;
  background: var(--black);
  padding: 0 var(--grid-gap) var(--grid-gap);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Project Card ── */
.project-card {
  display: block;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.project-img-wrap {
  overflow: hidden;
  width: 100%;
}

.project-img-wrap img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ── Project Title (visible on hover) ── */
.project-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px;
  font-family: var(--font);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  /* subtle gradient for readability */
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, transparent 100%);
}

/* Always visible on mobile, hover-only on desktop */
@media (max-width: 767px) {
  .project-title {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .project-card:hover .project-title {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════
   Footer
   ══════════════════════════════════════ */

.site-footer {
  position: relative;
  z-index: 2;
  background: var(--black);
  padding: 40px 28px 32px;
}

.footer-inner {
  max-width: 100%;
}

.back-to-top-text {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  font-family: var(--font);
  font-weight: 300;
  font-size: 13px;
  color: var(--white);
  margin-bottom: 16px;
  transition: opacity 0.3s ease;
}

.back-to-top-text:hover {
  opacity: 0.4;
}

.footer-rule {
  border: none;
  border-top: 1px solid var(--white);
}

/* ══════════════════════════════════════
   Scroll-to-top FAB
   ══════════════════════════════════════ */

.scroll-to-top-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: translateY(12px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.scroll-to-top-fab.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* ══════════════════════════════════════
   Page-Load Animations
   ══════════════════════════════════════ */

[data-load] {
  opacity: 0;
}

[data-load="fade-up"] {
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-load].loaded {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════
   Scroll-Reveal Animations
   ══════════════════════════════════════ */

[data-reveal] {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger right-column cards on desktop */
@media (min-width: 768px) {
  .project-card[data-reveal]:nth-child(even) {
    transition-delay: 0.15s;
  }
}

/* ══════════════════════════════════════
   Reduced Motion
   ══════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-load] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-down {
    animation: none;
  }
}
