:root{
  --black:#0c0c0b;
  --white:#f7f5f1;
  --cream:#e7e0d3;
  --earth:#a08a6f;
  --line:rgba(247,245,241,0.14);
  --ease-out:cubic-bezier(0.16,1,0.3,1);
  --serif:'Fraunces', Georgia, serif;
  --sans:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*{margin:0;padding:0;box-sizing:border-box;}

html{scroll-behavior:auto;}

body{
  background:var(--black);
  color:var(--white);
  font-family:var(--sans);
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

/* ---------- Loader ---------- */
.loader{
  position:fixed;
  inset:0;
  z-index:100;
  background:var(--black);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1.25rem;
  transition:opacity .6s var(--ease-out), visibility .6s var(--ease-out);
}
.loader.is-hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.loader__label{
  font-family:var(--sans);
  font-size:0.7rem;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--cream);
  opacity:0.6;
}
.loader__bar{
  width:180px;
  height:1px;
  background:var(--line);
  overflow:hidden;
}
.loader__fill{
  height:100%;
  width:0%;
  background:var(--earth);
  transition:width .15s linear;
}

main.hidden{visibility:hidden;}

/* ---------- Grain overlay ---------- */
.grain{
  position:fixed;
  inset:0;
  z-index:150;
  pointer-events:none;
  opacity:0.045;
  mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:180px 180px;
}

/* ---------- Custom cursor ---------- */
.cursor-dot{
  position:fixed;
  top:0;
  left:0;
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--white);
  pointer-events:none;
  z-index:200;
  mix-blend-mode:difference;
  transform:translate(-50%,-50%);
  opacity:0;
  transition:opacity .3s var(--ease-out), width .35s var(--ease-out), height .35s var(--ease-out);
  will-change:transform;
}
.cursor-dot.is-active{opacity:1;}
.cursor-dot.is-hover{width:42px;height:42px;}

@media (hover:hover) and (pointer:fine){
  body.has-cursor, body.has-cursor a, body.has-cursor button{cursor:none;}
}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  width:100%;
  height:100vh;
  height:100svh;
  overflow:hidden;
  background:var(--black);
}

.hero__canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
}

.hero__overlay{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:0 1.5rem;
  pointer-events:none;
}

.hero__eyebrow{
  font-family:var(--sans);
  font-size:0.72rem;
  letter-spacing:0.22em;
  text-transform:uppercase;
  color:var(--cream);
  opacity:0.75;
  margin-bottom:1.1rem;
}

.hero__title{
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(2.6rem, 7vw, 6rem);
  line-height:0.98;
  letter-spacing:-0.02em;
  color:var(--white);
  text-shadow:0 2px 40px rgba(0,0,0,0.35);
}

.hero__sub{
  margin-top:1.4rem;
  font-family:var(--sans);
  font-weight:400;
  font-size:1rem;
  letter-spacing:0.01em;
  color:var(--cream);
  opacity:0.85;
}

.hero__scrollcue{
  position:absolute;
  bottom:2.4rem;
  left:50%;
  transform:translateX(-50%);
  width:1px;
  height:44px;
  background:var(--line);
  z-index:2;
  overflow:hidden;
}
.hero__scrollcue span{
  display:block;
  width:100%;
  height:40%;
  background:var(--white);
  animation:cueMove 1.8s ease-in-out infinite;
}
@keyframes cueMove{
  0%{transform:translateY(-100%);}
  100%{transform:translateY(250%);}
}

/* ---------- Panels ---------- */
.panel{
  position:relative;
  min-height:100vh;
  display:flex;
  align-items:center;
  background:var(--black);
  padding:8vh 6vw;
  overflow:hidden;
}

.panel--one{background:var(--black);}
.panel--two{background:#111110;}
.panel--three{
  background:var(--black);
  border-top:1px solid var(--line);
}

/* Oversized background numeral — outer handles JS parallax (y),
   inner handles the static vertical centering, so they don't fight
   over the transform property. */
.panel__bignum{
  position:absolute;
  top:50%;
  left:4vw;
  z-index:0;
  pointer-events:none;
  user-select:none;
}
.panel__bignum--right{left:auto;right:4vw;}

.panel__bignum__inner{
  display:block;
  transform:translateY(-50%);
  font-family:var(--serif);
  font-weight:300;
  font-size:clamp(9rem, 26vw, 22rem);
  line-height:1;
  letter-spacing:-0.03em;
  color:var(--white);
  opacity:0.045;
  white-space:nowrap;
}

.panel__grid{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6vw;
  width:100%;
  max-width:1180px;
  margin:0 auto;
  flex-wrap:wrap;
}

.panel__visual{
  flex:1 1 320px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--cream);
  min-width:260px;
}

.line-art{
  width:100%;
  height:auto;
  max-width:420px;
  overflow:visible;
  opacity:0.9;
}

.line-art .draw{
  stroke-dasharray:1;
  stroke-dashoffset:1;
}

.line-art .fill-dot{
  opacity:0;
}

.panel__inner{
  position:relative;
  z-index:1;
  max-width:640px;
  opacity:0;
  flex:1 1 380px;
}

.panel__inner > *{
  transform:translateY(26px);
}

.panel__index{
  display:block;
  font-family:var(--sans);
  font-size:0.72rem;
  letter-spacing:0.2em;
  color:var(--earth);
  margin-bottom:1.6rem;
}

.panel__title{
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(2rem, 4.4vw, 3.4rem);
  line-height:1.05;
  letter-spacing:-0.015em;
  color:var(--white);
  margin-bottom:1.6rem;
}

.panel__text{
  font-family:var(--sans);
  font-weight:400;
  font-size:1.05rem;
  line-height:1.65;
  color:var(--cream);
  opacity:0.72;
  max-width:34rem;
}

.panel__link{
  display:inline-block;
  margin-top:2.4rem;
  font-family:var(--sans);
  font-size:0.85rem;
  letter-spacing:0.04em;
  color:var(--white);
  text-decoration:none;
  border-bottom:1px solid var(--line);
  padding-bottom:0.3rem;
  transition:border-color .4s var(--ease-out), opacity .4s var(--ease-out);
}
.panel__link:hover{
  border-color:var(--earth);
  opacity:0.8;
}

/* ---------- Places carousel (Apple-style component cards) ---------- */
.panel--places{
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap:3.4rem;
  background:#0e0e0d;
  padding-left:0;
  padding-right:0;
}

.places__header{
  position:relative;
  z-index:1;
  max-width:640px;
  width:100%;
  padding:0 6vw;
  flex:none;
}

.places__track{
  position:relative;
  z-index:1;
  display:flex;
  gap:1.5rem;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x proximity;
  padding:1rem 6vw 1.5rem;
  scrollbar-width:none;
  -ms-overflow-style:none;
  cursor:grab;
}
.places__track:active{cursor:grabbing;}
.places__track::-webkit-scrollbar{display:none;}

.place-card{
  position:relative;
  flex:0 0 300px;
  height:400px;
  border-radius:14px;
  overflow:hidden;
  scroll-snap-align:center;
  background:linear-gradient(155deg, #191815 0%, #0c0c0b 65%);
  border:1px solid var(--line);
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:1.5rem;
  opacity:0.42;
  transform:scale(0.93);
  transition:opacity .5s var(--ease-out), transform .5s var(--ease-out), flex-basis .5s var(--ease-out);
}

.place-card.is-active{
  opacity:1;
  transform:scale(1);
  flex-basis:340px;
  height:440px;
  border-color:rgba(160,138,111,0.35);
}

.place-card::before{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.25) 45%, transparent 75%);
  z-index:1;
  pointer-events:none;
}

.place-card__visual{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--earth);
  opacity:0.55;
  transition:opacity .5s var(--ease-out), transform .6s var(--ease-out);
  transform:scale(1.05);
}
.place-card.is-active .place-card__visual{
  color:var(--cream);
  opacity:0.9;
  transform:scale(1);
}

.place-card__icon{width:58%;height:58%;}

.place-card__hotspot{
  position:absolute;
  top:1.4rem;
  left:1.4rem;
  z-index:2;
  width:24px;
  height:24px;
  border-radius:50%;
  border:1px solid var(--line);
}
.place-card__hotspot::after{
  content:'';
  position:absolute;
  inset:6px;
  border-radius:50%;
  background:var(--earth);
  opacity:0;
  transition:opacity .5s var(--ease-out);
}
.place-card.is-active .place-card__hotspot::after{opacity:1;}

.place-card__num{
  position:absolute;
  top:1.4rem;
  right:1.4rem;
  z-index:2;
  font-family:var(--sans);
  font-size:0.72rem;
  letter-spacing:0.1em;
  color:var(--cream);
  opacity:0.55;
}

.place-card__body{
  position:relative;
  z-index:2;
}

.place-card__title{
  font-family:var(--serif);
  font-weight:600;
  font-size:1.4rem;
  letter-spacing:-0.01em;
  color:var(--white);
  margin-bottom:0.55rem;
}

.place-card__text{
  font-family:var(--sans);
  font-size:0.88rem;
  line-height:1.55;
  color:var(--cream);
  opacity:0.7;
}

.places__nav{
  position:relative;
  z-index:1;
  display:flex;
  gap:0.8rem;
  padding:0 6vw;
}

.places__arrow{
  width:42px;
  height:42px;
  border-radius:50%;
  border:1px solid var(--line);
  background:transparent;
  color:var(--white);
  font-family:var(--sans);
  font-size:1rem;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:border-color .35s var(--ease-out), opacity .35s var(--ease-out);
}
.places__arrow:hover{border-color:var(--earth);}
.places__arrow:disabled{opacity:0.3; cursor:default;}

@media (max-width:720px){
  .panel{padding:10vh 6vw;}
  .hero__scrollcue{bottom:1.8rem;}
  .panel__grid{gap:3rem;}
  .panel__bignum__inner{font-size:clamp(6rem, 30vw, 10rem); opacity:0.05;}
  .line-art{max-width:280px;}
  .cursor-dot{display:none;}

  .place-card{flex:0 0 240px; height:340px;}
  .place-card.is-active{flex-basis:260px; height:360px;}
  .place-card__title{font-size:1.15rem;}
  .place-card__text{font-size:0.82rem;}
  .places__nav{display:none;}
}

@media (prefers-reduced-motion: reduce){
  .hero__scrollcue span{animation:none;}
  .cursor-dot{display:none;}
}
