:root,
[data-theme="dark"] {
  --color-bg: #0c1614;
  --color-surface: #142724;
  --color-ink: #f4f1ea;
  --color-muted: #8a9d98;
  --color-accent: #5fb3a3;
  --color-border: rgba(244, 241, 234, 0.08);
  --color-header-bg: rgba(12, 22, 20, 0.55);
}

[data-theme="light"] {
  --color-bg: #f6f1e7;
  --color-surface: #ece3d3;
  --color-ink: #1c2624;
  --color-muted: #6c7d79;
  --color-accent: #2f8f7e;
  --color-border: rgba(28, 38, 36, 0.14);
  --color-header-bg: rgba(246, 241, 231, 0.7);
}

:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  --space-gutter: clamp(1.25rem, 5vw, 4rem);
  --section-pad: clamp(4rem, 12vh, 9rem);
  --max-text: 34rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto; /* Lenis owns smooth scroll; native smooth would double up */
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem var(--space-gutter);
  color: var(--color-ink);
  /* Semi-transparent, blurred scrim so the bar reads over any section or
     photo while still letting content show through. */
  background: var(--color-header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.75rem);
}

.site-header__mark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-decoration: none;
  font-variant-caps: small-caps;
  letter-spacing: 0.14em;
}

.site-header__nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.site-header__nav a {
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s var(--ease-out);
}

.site-header__nav a:hover {
  opacity: 1;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

.theme-toggle__icon {
  width: 100%;
  height: 100%;
}

.theme-toggle__icon--moon {
  display: none;
}

[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

[data-theme="light"] .theme-toggle__icon--moon {
  display: block;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 101;
  height: 2px;
  background: transparent;
}

.scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--color-accent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: var(--space-gutter);
  padding: var(--section-pad) var(--space-gutter);
  overflow: hidden;
}

.hero__layer {
  position: absolute;
  inset: -10% -5%;
  pointer-events: none;
}

.hero__layer--back {
  background:
    radial-gradient(55% 50% at 78% 25%, rgba(95, 179, 163, 0.18), transparent 70%),
    radial-gradient(50% 60% at 10% 85%, rgba(230, 210, 170, 0.14), transparent 70%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 36rem;
}

.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 1.5rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 7vw, 6rem);
  line-height: 0.98;
  margin: 0;
  letter-spacing: -0.02em;
}

.hero__line {
  display: block;
  overflow: hidden;
}

.hero__lede {
  max-width: var(--max-text);
  margin: 2rem 0 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--color-muted);
}

.hero__media {
  position: relative;
  z-index: 1;
  margin: 0;
  height: 80svh;
  border-radius: 6px;
  overflow: hidden;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: var(--space-gutter);
  z-index: 2;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ---------- Room reveals (per-item sticky image) ---------- */
.work {
  background: var(--color-bg);
  padding: 0 var(--space-gutter);
}

.work__item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-gutter);
  align-items: start;
}

/* The image pins for the taller text column, then releases to the next item. */
.work__visual {
  position: sticky;
  top: 0;
  height: 100svh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work__visual img {
  width: 100%;
  height: 78svh;
  object-fit: cover;
  border-radius: 6px;
}

.work__panel {
  min-height: 130svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--max-text);
}

.work__index {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-accent);
  margin: 0 0 0.75rem;
}

.work__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.work__type {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin: 0 0 1.5rem;
}

.work__desc {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--color-ink);
  opacity: 0.85;
  margin: 0;
}

/* ---------- Horizontal gallery ---------- */
.gallery {
  position: relative;
  background: var(--color-surface);
  overflow: hidden;
}

.gallery__track {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  height: 100svh;
  padding: 0 var(--space-gutter);
  width: max-content;
  will-change: transform;
}

.gallery__intro {
  flex: 0 0 auto;
  width: min(80vw, 26rem);
}

.gallery__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 0.95;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.gallery__sub {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0;
}

.gallery__item {
  position: relative;
  flex: 0 0 auto;
  width: min(70vw, 24rem);
  aspect-ratio: 3 / 4;
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1.25rem 1.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--color-ink);
  background: linear-gradient(to top, rgba(12, 22, 20, 0.85), transparent);
}

/* ---------- Trust band ---------- */
.proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(2rem, 8vw, 6rem);
  padding: var(--section-pad) var(--space-gutter);
  text-align: center;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.proof__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 16rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s var(--ease-out);
}

.proof__item:hover {
  transform: translateY(-3px);
}

.proof__item:hover .proof__label {
  color: var(--color-accent);
}

.proof__score {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--color-accent);
  line-height: 1;
}

.proof__label {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---------- Testimonials ---------- */
.reviews {
  padding: var(--section-pad) var(--space-gutter);
}

.reviews__eyebrow {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.reviews__faces {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  max-width: 60rem;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
}

.reviews__face {
  position: relative;
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.reviews__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.reviews__face figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 1rem 0.9rem;
  font-size: 0.8rem;
  color: #f4f1ea;
  background: linear-gradient(to top, rgba(12, 22, 20, 0.85), transparent);
}

/* Drag-scrollable review wheel, independent of page scroll. */
.reviews__wheel {
  overflow-x: auto;
  overflow-y: hidden;
  /* Keep this scroll contained so reaching an edge never chains into the
     page scroll (which desynced the smooth-scroll engine and caused jumps). */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.reviews__wheel::-webkit-scrollbar {
  display: none;
}

.reviews__wheel.is-dragging {
  cursor: grabbing;
}

.reviews__rail {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2rem);
  width: max-content;
  padding: 0.5rem clamp(1.25rem, 5vw, 4rem);
}

.reviews__card {
  flex: 0 0 min(85vw, 22rem);
  margin: 0;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.reviews__quote,
.reviews__face img {
  pointer-events: none; /* let drags start anywhere on a card without selecting text or the image */
}

.reviews__hint {
  text-align: center;
  margin: 1.5rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.reviews__quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.reviews__quote::before {
  content: "\201C";
  color: var(--color-accent);
  margin-right: 0.1em;
}

.reviews__quote::after {
  content: "\201D";
  color: var(--color-accent);
  margin-left: 0.05em;
}

.reviews__author {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-ink);
  margin-top: auto;
}

.reviews__author span {
  display: block;
  font-weight: 400;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.reviews__source {
  display: block;
  text-align: center;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  font-size: 0.9rem;
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  width: fit-content;
  margin-inline: auto;
  transition: border-color 0.2s var(--ease-out);
}

.reviews__source:hover {
  border-color: var(--color-accent);
}

/* ---------- Visit / contact ---------- */
.contact {
  min-height: 90svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: var(--section-pad) var(--space-gutter);
}

.contact__photo {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.contact__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact__body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 9vw, 6.5rem);
  line-height: 0.95;
  margin: 0;
  letter-spacing: -0.02em;
}

.contact__details {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact__link {
  font-size: clamp(1.1rem, 3vw, 1.75rem);
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease-out);
  width: fit-content;
}

.contact__link--sm {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
}

.contact__link:hover {
  border-color: var(--color-accent);
}

.contact__line {
  font-size: 1rem;
  color: var(--color-muted);
  margin: 0;
}

.contact__note {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 2rem var(--space-gutter);
  font-size: 0.8rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
}

.site-footer p {
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero__media {
    height: 60svh;
    order: 2;
  }

  .contact {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact__details,
  .contact__link {
    align-items: center;
    margin-inline: auto;
  }
}

@media (max-width: 720px) {
  /* Stack each room as image then text; drop the sticky pin so nothing
     overlaps in a single column. */
  .work__item {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .work__visual {
    position: static;
    height: auto;
  }

  .work__visual img {
    height: auto;
    aspect-ratio: 4 / 5;
    max-width: 22rem;
    margin: 0 auto;
  }

  .work__panel {
    min-height: auto;
    max-width: none;
    padding: 0 0 3rem;
  }

  /* The pinned sideways gallery becomes a simple vertical stack on phones. */
  .gallery {
    overflow: visible;
  }

  .gallery__track {
    flex-direction: column;
    align-items: stretch;
    width: auto;
    height: auto;
    padding: var(--section-pad) var(--space-gutter);
  }

  .gallery__intro {
    width: auto;
  }

  .gallery__item {
    width: 100%;
    aspect-ratio: 4 / 5;
  }

  .site-header__nav {
    gap: 1rem;
  }
}
