/* ============================================================
   SÖLVIK — Quiet Luxury Residences
   Style: Exaggerated Minimalism · warm golden-hour grading
   Type:  Cormorant Garamond (editorial italic serif)
          Josefin Sans (letterspaced uppercase sans)
   ============================================================ */

:root {
  /* Warm cinematic palette (golden hour / warm timber) */
  --cream:        #f4ece0;   /* headline off-white */
  --cream-dim:    #d9cbb6;
  --sand:         #c8a97e;
  --amber:        #c98a4b;
  --ember:        #a45f2c;
  --ink:          #100b06;   /* near-black warm */
  --ink-soft:     #1c140c;
  --line:         rgba(244, 236, 224, 0.22);
  --line-soft:    rgba(244, 236, 224, 0.12);

  /* Type */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Josefin Sans", "Helvetica Neue", Arial, sans-serif;

  --nav-h: 84px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: var(--ink); }

/* ─────────────────────────── NAVIGATION ─────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(1.4rem, 4vw, 4rem);
  color: var(--cream);
  transition: background-color 0.6s var(--ease-soft),
              backdrop-filter 0.6s var(--ease-soft),
              border-color 0.6s var(--ease-soft);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(16, 11, 6, 0.55);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
}

.nav__logo {
  justify-self: start;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: 0.42em;
  text-decoration: none;
  color: var(--cream);
  padding-left: 0.12em; /* optical: letterspacing pushes right */
  transition: color 0.4s var(--ease);
}
.nav__logo-mark { color: var(--amber); }
.nav__logo:hover { color: #fff; }

.nav__links {
  justify-self: center;
  display: flex;
  gap: clamp(1.5rem, 3.4vw, 3.4rem);
}
.nav__link {
  position: relative;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream-dim);
  padding: 0.4em 0;
  display: inline-block;
}
/* Letter-flip hover (adapted from 21st.dev micro-interaction): the label
   slides up and a brighter copy slides in from below. The real text is
   transparent (holds the width); two pseudo-labels animate inside a fixed
   1em clip window on the span, so nothing ever leaks a second line. */
.nav__link span {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1;
  height: 1em;
  color: transparent;
}
.nav__link span::before,
.nav__link span::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  transition: transform 0.55s var(--ease);
}
.nav__link span::before { top: 0;    color: var(--cream-dim); }
.nav__link span::after  { top: 100%; color: var(--cream); }
.nav__link:hover span::before,
.nav__link:hover span::after { transform: translateY(-100%); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

/* CTA button — fills warm on hover */
.nav__cta {
  justify-self: end;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.85em 1.6em;
}
.nav__cta-label {
  position: relative;
  z-index: 2;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream);
  transition: color 0.5s var(--ease);
}
.nav__cta-fill {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--cream);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
}
.nav__cta:hover .nav__cta-fill { transform: translateY(0); }
.nav__cta:hover .nav__cta-label { color: var(--ink); }

/* ─────────────────────────── CINEMATIC STAGE ─────────────────────────── */
/* Tall track so there is scroll distance to scrub through. */
.stage {
  position: relative;
  height: 720vh; /* longer track — six rooms, leisurely push-in per shot */
  background: var(--ink);
}
.stage__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* Cinematic warm grade — pulls neutral/cool footage toward golden hour */
  filter: saturate(1.1) contrast(1.05) sepia(0.14) brightness(1.02);
}

/* Cinematic colour grade + legibility scrims on top of the frame */
.stage__grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(16,11,6,0.55) 0%, rgba(16,11,6,0) 26%,
                    rgba(16,11,6,0) 62%, rgba(16,11,6,0.72) 100%),
    radial-gradient(120% 90% at 70% 20%, rgba(201,138,75,0.16), transparent 55%);
  mix-blend-mode: normal;
}
.stage__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 240px 40px rgba(16,11,6,0.6);
}

/* ─────────────────────────── EDITORIAL REVEALS ─────────────────────────── */
.reveal {
  position: absolute;
  z-index: 5;
  max-width: min(46rem, 84vw);
  padding: 0 clamp(1.4rem, 6vw, 6rem);
  opacity: 0;
  will-change: opacity, transform;
}
.reveal[data-align="left"]  { left: 0;  top: 50%; text-align: left;  transform: translateY(-46%); }
.reveal[data-align="right"] { right: 0; top: 50%; text-align: right; transform: translateY(-46%); }

.reveal__eyebrow,
.reveal__sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--sand);
}
.reveal__eyebrow { margin-bottom: 1.4rem; }
.reveal__sub {
  margin-top: 1.8rem;
  letter-spacing: 0.16em;
  color: var(--cream-dim);
  max-width: 34ch;
  margin-left: auto; /* right aligned block */
  line-height: 1.9;
}
.reveal[data-align="left"] .reveal__sub { margin-left: 0; }

.reveal__line {
  font-family: var(--serif);
  font-weight: 400;
  font-style: normal;
  color: var(--cream);
  font-size: clamp(2.6rem, 8.4vw, 7.4rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 40px rgba(16, 11, 6, 0.5);
}
.reveal__line em {
  font-style: italic;
  font-weight: 500;
  color: #fbf4e8;
}

/* Smaller per-room captions during the walkthrough */
.reveal__caption {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--cream);
  font-size: clamp(1.9rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.005em;
  text-shadow: 0 2px 40px rgba(16, 11, 6, 0.5);
}
.reveal__caption em { font-style: italic; font-weight: 500; color: #fbf4e8; }
.reveal--sm { max-width: min(34rem, 84vw); }

/* Per-line clip-reveal: children start pushed down & masked */
.reveal__line,
.reveal__eyebrow,
.reveal__sub {
  --y: 26px;
}

/* ─────────────────────────── SCROLL INDICATOR ─────────────────────────── */
.scroller {
  position: absolute;
  left: 50%;
  bottom: clamp(1.6rem, 4vh, 3rem);
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  transition: opacity 0.6s var(--ease);
}
.scroller__label {
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.scroller__line {
  position: relative;
  width: 1px;
  height: 54px;
  background: var(--line);
  overflow: hidden;
}
.scroller__line::after {
  content: "";
  position: absolute;
  left: 0; top: -60%;
  width: 100%; height: 60%;
  background: linear-gradient(180deg, transparent, var(--amber));
  animation: scrollDrop 2.1s var(--ease) infinite;
}
@keyframes scrollDrop {
  0%   { transform: translateY(0);    opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: translateY(220%); opacity: 0; }
}
.scroller.is-hidden { opacity: 0; }

/* ─────────────────────────── EDITORIAL CLOSE ─────────────────────────── */
.closing {
  position: relative;
  z-index: 2;
  background: var(--ink);
  padding: clamp(7rem, 18vh, 14rem) clamp(1.4rem, 8vw, 10rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.closing__kicker {
  font-size: 0.68rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 2.4rem;
}
.closing__statement {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.6vw, 3.7rem);
  line-height: 1.2;
  font-weight: 400;
  color: var(--cream);
  max-width: 22ch;
}
.closing__statement em { font-style: italic; color: var(--sand); }

.closing__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(2rem, 6vw, 5rem);
  margin: clamp(3.5rem, 8vh, 6rem) 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 2.4rem 0;
  width: min(60rem, 100%);
}
.meta { display: flex; flex-direction: column; gap: 0.7rem; }
.meta__label {
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: 0.7;
}
.meta__value { font-family: var(--serif); font-size: 1.5rem; font-style: italic; color: var(--cream); }

.closing__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1.1em 2.2em;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.closing__cta svg { transition: transform 0.5s var(--ease); }
.closing__cta:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.closing__cta:hover svg { transform: translateX(5px); }

/* ─────────────────────────── FOOTER ─────────────────────────── */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 2.4rem clamp(1.4rem, 6vw, 6rem);
  border-top: 1px solid var(--line-soft);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.foot__mid { opacity: 0.6; }

/* ─────────────────────────── EDITORIAL SECTIONS ─────────────────────────── */
.editorial {
  position: relative;
  z-index: 2;
  background: var(--ink);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(5rem, 13vh, 10rem) clamp(1.4rem, 7vw, 7rem);
}
.section__eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--sand);
}
.section__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--cream);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: 2.4rem;
}
.section__lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.65;
  color: var(--cream-dim);
  max-width: 44ch;
}

/* Intro / manifesto */
.intro { text-align: center; }
.intro .section__eyebrow { margin-bottom: 2.6rem; }
.intro__statement {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5.2vw, 4.2rem);
  line-height: 1.18;
  font-weight: 400;
  color: var(--cream);
  max-width: 20ch;
  margin: 0 auto;
}
.intro__statement em { font-style: italic; color: var(--sand); }

/* The Residence — head + spec grid */
.residence {
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.spec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.spec__item {
  background: var(--ink);
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.spec__item dt {
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: 0.7;
}
.spec__item dd {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--cream);
}

/* The Spaces — numbered rooms */
.spaces { border-top: 1px solid var(--line-soft); }
.rooms { list-style: none; }
.room {
  display: grid;
  grid-template-columns: 5rem 1fr 1.4fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: baseline;
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.room:first-child { border-top: 1px solid var(--line-soft); }
.room__no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--sand);
}
.room__name {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 500;
  color: var(--cream);
}
.room__text {
  color: var(--cream-dim);
  font-size: 0.98rem;
  line-height: 1.85;
  max-width: 46ch;
}

/* Amenities */
.amenities { border-top: 1px solid var(--line-soft); }
.amenities__list {
  list-style: none;
  columns: 2;
  column-gap: clamp(2rem, 6vw, 6rem);
}
.amenities__list li {
  break-inside: avoid;
  padding: 1.1rem 0 1.1rem 1.6rem;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  color: var(--cream-dim);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.amenities__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.55rem;
  width: 6px; height: 6px;
  border: 1px solid var(--sand);
  transform: rotate(45deg);
}

/* The Setting */
.setting { border-top: 1px solid var(--line-soft); }
.setting__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2rem, 6vw, 6rem);
}
.setting__body p {
  color: var(--cream-dim);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.85;
  margin-bottom: 1.6rem;
  max-width: 52ch;
}
.setting__body p:last-child { margin-bottom: 0; }

/* Closing contact line */
.closing__contact {
  margin-top: 2.6rem;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.closing__contact a { color: var(--sand); text-decoration: none; }
.closing__contact a:hover { color: var(--cream); }

/* ─────────────────────────── FOCUS / A11Y ─────────────────────────── */
a:focus-visible,
.nav__cta:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ─────────────────────────── RESPONSIVE ─────────────────────────── */
@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .reveal[data-align="right"] { text-align: left; }
  .reveal[data-align="right"] .reveal__sub { margin-left: 0; }
  .foot { flex-direction: column; gap: 0.8rem; text-align: center; }

  .residence { grid-template-columns: 1fr; }
  .setting__grid { grid-template-columns: 1fr; }
  .room { grid-template-columns: 3rem 1fr; }
  .room__text { grid-column: 1 / -1; }
  .amenities__list { columns: 1; }
}

@media (max-width: 520px) {
  .spec { grid-template-columns: 1fr; }
}

/* ─────────────────────────── REDUCED MOTION ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroller__line::after { animation: none; }
  * { transition-duration: 0.001ms !important; }
}
