/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

body {
  background-color: #f8f4ed;
  font-family: "Inter", system-ui, sans-serif;
}

/* Splash */
.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: #f8f4ed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-text {
  font-family: "Instrument Serif", serif;
  font-size: 32px;
  font-weight: 400;
  color: #3e3e3e;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
}

@media (max-width: 768px) {
  .splash-text {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .splash-text {
    font-size: 24px;
  }
}

/* Page Layout */
.page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Blurred background */
.bg-blur {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-blur img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(80px) saturate(1.2);
  transform: scale(1.3);
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Ensure content sits above bg */
.header, .main, .footer {
  z-index: 1;
}


/* Entrance: everything hidden until JS animates in */
.page--loading .header,
.page--loading .project-info,
.page--loading .cta-button,
.page--loading .footer {
  opacity: 0;
}

/* Header */
.header {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: 90vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
}

.logo-link {
  text-decoration: none;
}

.logo {
  font-family: "Instrument Serif", serif;
  font-size: 32px;
  font-weight: 400;
  color: #3e3e3e;
  line-height: 1;
  white-space: nowrap;
}

/* Main Content */
.main {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  overflow: visible;
}

/* Gallery */
.gallery-container {
  width: 600px;
  height: 468px;
  position: relative;
  overflow: visible;
}

.gallery-stack {
  width: 100%;
  height: 100%;
  position: relative;
  perspective: 1000px;
}

.gallery-card {
  position: absolute;
  border-radius: 4px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  will-change: transform, opacity, width, height, filter;
  transform-origin: center bottom;
}

.gallery-card--peek-target {
  cursor: pointer;
}

/* Project Info */
.project-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.project-title-wrapper {
  overflow: hidden;
  height: 39px;
  display: flex;
  align-items: center;
}

.project-title {
  font-family: "Instrument Serif", serif;
  font-size: 32px;
  font-weight: 400;
  color: #3e3e3e;
  line-height: 1.2;
  letter-spacing: 0em;
  white-space: nowrap;
  text-align: center;
}

.project-tags-wrapper {
  overflow: hidden;
  height: 20px;
}

.project-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tag {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #7a7a7a;
  letter-spacing: -0.02em;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.tag-dot {
  width: 4px;
  height: 4px;
  border-radius: 99px;
  background-color: #989898;
  flex-shrink: 0;
}

/* CTA Button */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #3e3e3e;
  color: #fafafa;
  font-family: "Instrument Serif", serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0em;
  line-height: 1.2;
  padding: 12px 20px;
  border-radius: 99px;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
  white-space: nowrap;
}

.cta-button:hover {
  background-color: #2e2e2e;
  transform: scale(1.02);
}

/* Footer */
.footer {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: 90vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  z-index: 3;
}

.footer-about {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #7a7a7a;
  letter-spacing: -0.02em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-about:hover {
  color: #3e3e3e;
}

.footer-nav {
  display: flex;
  gap: 8px;
}

.nav-arrow {
  width: 32px;
  height: 32px;
  border-radius: 99px;
  border: none;
  background: transparent;
  outline: 1px solid rgba(122, 122, 122, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
  transition:
    outline-color 0.2s ease,
    background-color 0.2s ease;
}

.nav-arrow:hover {
  outline-color: rgba(122, 122, 122, 0.3);
  background-color: rgba(122, 122, 122, 0.05);
}

.nav-arrow svg {
  flex-shrink: 0;
}

/* About Overlay */
.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: #f8f4ed;
  overflow: hidden;
}

.about-body {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 96px;
  z-index: 1;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 600px;
  max-width: 90vw;
}

.about-heading {
  font-family: "Instrument Serif", serif;
  font-size: 32px;
  font-weight: 400;
  color: #3e3e3e;
  line-height: 1.2;
  letter-spacing: 0em;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-text p {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #7a7a7a;
  letter-spacing: -0.02em;
  line-height: 1.4;
  text-wrap: pretty;
}

.about-close {
  width: 32px;
  height: 32px;
  border-radius: 99px;
  border: none;
  background: transparent;
  outline: 1px solid rgba(122, 122, 122, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
  transition:
    outline-color 0.2s ease,
    background-color 0.2s ease;
}

.about-close:hover {
  outline-color: rgba(122, 122, 122, 0.3);
  background-color: rgba(122, 122, 122, 0.05);
}

.about-close svg {
  flex-shrink: 0;
}

.about-overlay .footer-link {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #7a7a7a;
  letter-spacing: -0.02em;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.about-overlay .footer {
  z-index: 3;
}

.about-overlay .footer-link:hover {
  color: #3e3e3e;
}

.about-back {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  border-radius: 99px;
  outline: 1px solid rgba(122, 122, 122, 0.1);
  padding: 8px 12px;
  cursor: pointer;
  transition:
    outline-color 0.2s ease,
    background-color 0.2s ease;
}

.about-back span {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #7a7a7a;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.about-back svg {
  flex-shrink: 0;
}

.about-back:hover {
  outline-color: rgba(122, 122, 122, 0.3);
  background-color: rgba(122, 122, 122, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding-top: 28px;
  }

  .logo {
    font-size: 26px;
  }

  .gallery-container {
    width: 340px;
    height: 266px;
  }

  .main {
    gap: 24px;
  }

  .project-title {
    font-size: 26px;
  }

  .project-title-wrapper {
    height: 32px;
  }

  .cta-button {
    font-size: 18px;
    padding: 10px 18px;
  }

  .footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .header,
  .footer {
    width: 340px;
  }

  .about-content {
    width: 340px;
  }

  .about-body {
    gap: 64px;
  }
}

@media (max-width: 480px) {
  .header {
    padding-top: 24px;
  }

  .logo {
    font-size: 24px;
  }

  .gallery-container {
    width: 300px;
    height: 234px;
  }

  .main {
    gap: 20px;
  }

  .project-title {
    font-size: 24px;
  }

  .project-title-wrapper {
    height: 30px;
  }

  .tag {
    font-size: 12px;
  }

  .cta-button {
    font-size: 16px;
    padding: 10px 16px;
  }

  .footer {
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .header,
  .footer {
    width: 300px;
  }

  .about-content {
    width: 300px;
  }

  .about-heading {
    font-size: 26px;
  }

  .about-text p {
    font-size: 14px;
  }

  .about-body {
    gap: 48px;
  }
}
