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

:root {
  --bg: #f0ece4;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.above-fold {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; object-fit: cover; }

/* ── Navigation ── */
.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2rem 3rem 1rem;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links a {
  position: relative;
  transition: opacity 0.3s;
}

.nav-links a:hover { opacity: 0.55; }

/* ── Hero ── */
.hero {
  position: relative;
  width: 100%;
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-text {
  font-family: var(--serif);
  font-size: 36vw;
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  line-height: 0.85;
  letter-spacing: -0.03em;
  user-select: none;
  pointer-events: none;
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -60%);
}

.hero-subtitle {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Carousel track */
.hero-track {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 3vw;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  opacity: 0;
}

.hero-track.ready {
  opacity: 1;
}

.hero-item {
  flex-shrink: 0;
  pointer-events: none;
  width: 12vw;
  opacity: 0.7;
  scale: 0.3;
  transform: scale(0.92);
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-item.loaded {
  scale: 1;
  transition: scale 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-item.active {
  width: 28vw;
  opacity: 1;
  transform: scale(1.05);
}

.hero-item.adjacent {
  width: 14vw;
  opacity: 0.85;
  transform: scale(1);
}

.hero-item img,
.hero-item canvas.gif-frozen {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Hide default cursor globally */
*, *::before, *::after { cursor: none !important; }

.hero { cursor: none; }

/* Custom cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1002;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background 0.3s ease,
              border-color 0.3s ease,
              padding 0.3s ease,
              font-size 0.3s ease,
              opacity 0.3s ease;
  /* Default: small dot */
  width: 12px;
  height: 12px;
  border-radius: 50px;
  background: #CFC1B2;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Alexandria', var(--sans);
  font-size: 0px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 1;
}

/* Hovering links / buttons — hollow circle */
.custom-cursor.is-hover {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid #CFC1B2;
}

.custom-cursor.is-nav {
  width: auto;
  height: auto;
  padding: 8px 20px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(26, 26, 26, 0.1);
  color: var(--text);
}

.custom-cursor.is-nav.is-prev::before {
  content: '←';
  margin-right: 8px;
  font-style: normal;
}

.custom-cursor.is-nav.is-next::after {
  content: '→';
  margin-left: 8px;
  font-style: normal;
}

.custom-cursor.is-nav.is-view::after {
  content: '→';
  margin-left: 8px;
  font-style: normal;
}

/* Indicators */
.hero-indicators {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 10;
}

.hero-tick {
  width: 2px;
  height: 14px;
  background: #ffffff;
  border-radius: 1px;
  cursor: pointer;
  transition: background 0.3s, height 0.3s;
}

.hero-tick.active {
  background: #E4DDD4;
  height: 20px;
}

/* ── Showcase ── */
.showcase {
  padding: 0 3rem 0;
}

.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.showcase-label h2 {
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.showcase-tag {
  font-size: 1.2rem;
  font-style: normal;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.showcase-img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.showcase-img.img-visible {
  opacity: 1;
  transform: translateY(0);
}

.showcase-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
}

/* WebGL distortion canvas overlay */
.distort-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}

.showcase-img:hover img {
  transform: scale(1.04);
}

.showcase-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.7rem 2rem;
  border: 1px solid var(--text);
  border-radius: 100px;
  font-family: 'Alexandria', var(--sans);
  font-size: 0.85rem;
  transition: background 0.3s, color 0.3s;
}

.btn-view:hover {
  background: var(--text);
  color: var(--bg);
}

/* ── Footer ── */
.footer {
  padding: 0 3rem 2rem;
  margin-top: 4rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* CTA banner */
.footer-cta {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid rgba(26,26,26,0.12);
  border-bottom: 1px solid rgba(26,26,26,0.12);
  margin-bottom: 3rem;
}

.footer-cta-label {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 0.8rem;
}

.footer-cta-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-style: italic;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.footer-cta-heading:hover {
  opacity: 0.55;
}

/* Grid */
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-style: italic;
  display: block;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 240px;
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin-bottom: 0.5rem;
}

.footer-list a {
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer-list a:hover {
  opacity: 0.55;
}

/* Newsletter */
.newsletter-form {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(26,26,26,0.3);
  max-width: 280px;
  transition: border-color 0.3s ease;
}

.newsletter-form:focus-within {
  border-color: var(--text);
}

.newsletter-form input {
  flex: 1;
  padding: 0.5rem 0;
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.8rem;
  outline: none;
  color: var(--text);
}

.newsletter-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.5rem 0 0.5rem 0.75rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.newsletter-btn:hover {
  transform: translateX(3px);
  opacity: 0.6;
}

.newsletter-note {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.5;
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(26,26,26,0.08);
  padding-top: 1.5rem;
}

.footer-copyright,
.footer-credit {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.credit-link {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.3s;
}

.credit-link:hover {
  color: var(--text);
}

/* ── Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
}

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hide custom cursor on touch devices ── */
@media (hover: none) {
  *, *::before, *::after { cursor: auto !important; }
  .custom-cursor { display: none !important; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav { padding: 1.5rem 1.5rem 0.5rem; align-items: center; }
  .nav-logo { font-size: 1.8rem; }
  .nav-hamburger { display: flex; padding: 8px; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1.5rem;
    gap: 1.2rem;
    font-size: 0.8rem;
    z-index: 100;
    border-bottom: 1px solid rgba(26,26,26,0.1);
  }
  .nav-links.open { display: flex; }
  .nav { position: relative; }

  .hero { height: 70vh; min-height: 300px; }
  .hero-item { width: 20vw; }
  .hero-item.active { width: 55vw; }
  .hero-item.adjacent { width: 28vw; }

  .hero-indicators { gap: 6px; }
  .hero-tick { width: 3px; height: 12px; padding: 0 4px; box-sizing: content-box; background-clip: content-box; }
  .hero-tick.active { height: 16px; }

  .showcase { padding: 1.5rem 1.5rem; }
  .showcase-header { margin-bottom: 0.5rem; }
  .showcase-label h2 { font-size: 0.7rem; }
  .showcase-tag { font-size: 0.65rem; }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }

  .footer { padding: 0 1.5rem 1.5rem; }
  .footer-cta { padding: 3rem 1rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-col--brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

  .newsletter-form { max-width: 100%; }
  .newsletter-btn { padding: 0.75rem 0 0.75rem 0.75rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .showcase-label h2 { font-size: 1.2rem; }
  .showcase-tag { font-size: 0.8rem; }
  .hero-indicators { bottom: 5rem; }
}

@media (max-width: 480px) {
  .hero-text { font-size: 26vw; }
  .hero { min-height: 250px; }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { grid-template-columns: 1fr; }
  .hero-indicators { gap: 4px; }
  .hero-tick { height: 10px; }
  .hero-tick.active { height: 14px; }
}
