/* ── LUME — one home, two atmospheres ──
   Every colour lives in a variable; [data-theme="night"] swaps the set
   and every image slot crossfades to its night twin. The transition is
   the product, so it is deliberately slow and even. */

:root {
  --bg: #f4f3f0;
  --bg-panel: #ffffff;
  --ink: #16171a;
  --ink-soft: rgba(22, 23, 26, 0.62);
  --ink-faint: rgba(22, 23, 26, 0.38);
  --line: rgba(22, 23, 26, 0.14);
  --header-bg: rgba(244, 243, 240, 0.82);
  --btn-bg: #16171a;
  --btn-ink: #ffffff;
  --pill-bg: rgba(255, 255, 255, 0.9);
  /* day: lift the left side so the dark hero copy reads on a bright photo */
  --shade: linear-gradient(75deg, rgba(248, 248, 246, 0.72) 0%, rgba(248, 248, 246, 0.34) 48%, rgba(248, 248, 246, 0) 76%);
}

[data-theme="night"] {
  --bg: #0b0c10;
  --bg-panel: #121319;
  --ink: #eceae4;
  --ink-soft: rgba(236, 234, 228, 0.6);
  --ink-faint: rgba(236, 234, 228, 0.35);
  --line: rgba(236, 234, 228, 0.14);
  --header-bg: rgba(11, 12, 16, 0.78);
  --btn-bg: #eceae4;
  --btn-ink: #0b0c10;
  --pill-bg: rgba(18, 19, 25, 0.85);
  --shade: linear-gradient(75deg, rgba(5, 6, 10, 0.62) 0%, rgba(5, 6, 10, 0.26) 52%, rgba(5, 6, 10, 0) 78%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  transition: background-color 0.75s ease, color 0.75s ease;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* every themed surface eases, never snaps */
.header, .btn, .mode-toggle, .room figcaption, .cta, .footer,
.approach__col, .spaces__grid figure {
  transition: background-color 0.75s ease, color 0.75s ease, border-color 0.75s ease;
}

/* ── image crossfade: both versions loaded, night fades in ── */
.frame { position: relative; overflow: hidden; }
.frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.frame .img-night {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}
[data-theme="night"] .frame .img-night { opacity: 1; }

/* ── header ── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(24px, 4.5vw, 64px);
  background: transparent;
}
.header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: 14px; padding-bottom: 14px;
}
.header { transition: background-color 0.75s ease, padding 0.4s ease, border-color 0.75s ease; }
.logo {
  font-size: 22px; font-weight: 600; letter-spacing: 0.16em;
  color: var(--ink); text-decoration: none;
  transition: color 0.75s ease;
}
.nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav a {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none;
  transition: color 0.3s ease;
}
.nav a:hover { color: var(--ink); }

/* ── the day / night switch: floats under the header, docks to the corner ──
   Apple style: labels either side of a sliding-knob track. */
:root { --toggle-w: 172px; }
.mode-toggle {
  position: fixed; z-index: 60;
  top: 84px; right: clamp(24px, 4.5vw, 64px);
  width: var(--toggle-w);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--pill-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  font-family: inherit; font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.75s ease, border-color 0.75s ease,
              transform 0.25s ease;
}
.mode-toggle:hover { transform: scale(1.03); }
.mode-toggle:active { transform: scale(0.97); }
/* no browser blue ring on tap; a quiet ink ring only for keyboard focus */
.mode-toggle { outline: none; -webkit-tap-highlight-color: transparent; }
.mode-toggle:focus { outline: none; }
.mode-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* the track and knob */
.switch {
  position: relative; flex-shrink: 0;
  width: 44px; height: 25px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.32);
  transition: background-color 0.5s ease;
}
[data-theme="night"] .switch { background: rgba(236, 234, 228, 0.28); }
.knob {
  position: absolute; top: 2px; left: 2px;
  width: 21px; height: 21px; border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.15);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="night"] .knob { transform: translateX(19px); }

.mt-day { color: var(--ink); }
.mt-night { color: var(--ink-faint); }
[data-theme="night"] .mt-day { color: var(--ink-faint); }
[data-theme="night"] .mt-night { color: var(--ink); }
.mt-day, .mt-night { transition: color 0.5s ease; }

/* ── hero ── */
.hero { position: relative; height: 100svh; min-height: 620px; }
.hero__frame { position: absolute; inset: 0; }
.hero__frame img { height: 100%; }
.hero__shade {
  position: absolute; inset: 0;
  background: var(--shade);
  transition: background 0.75s ease;
}
.hero__copy {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(24px, 4.5vw, 64px);
  max-width: 640px;
}
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  margin-bottom: 22px;
}
/* hero copy follows the theme: near-black by day, near-white by night */
.hero__copy .eyebrow { color: var(--ink-soft); transition: color 0.75s ease; }
.hero__copy h1 {
  font-size: clamp(42px, 6.2vw, 74px);
  font-weight: 500; line-height: 1.05; letter-spacing: -0.03em;
  color: var(--ink);
  transition: color 0.75s ease;
}
.hero__sub {
  margin-top: 22px; max-width: 320px;
  font-size: 14.5px; line-height: 1.65;
  color: var(--ink-soft);
  transition: color 0.75s ease;
}
.hero__copy .btn { margin-top: 34px; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  width: fit-content;
  padding: 15px 28px;
  border-radius: 999px; border: none;
  font-family: inherit; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
}
.btn--solid { background: var(--btn-bg); color: var(--btn-ink); }
.btn .arrow { transition: transform 0.3s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
  padding: 13px 24px; font-size: 12.5px;
  transition: background-color 0.75s ease, color 0.75s ease, border-color 0.3s ease;
}
.btn--ghost:hover { border-color: var(--ink-soft); }

/* ── spaces ── */
.spaces { padding: clamp(80px, 11vw, 140px) clamp(24px, 4.5vw, 64px) 0; }
.spaces h2, .material h2, .cta h2 {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 500; line-height: 1.08; letter-spacing: -0.03em;
}
.section-sub {
  margin-top: 20px;
  font-size: 14px; line-height: 1.7; color: var(--ink-soft);
}
.spaces__grid {
  margin-top: clamp(36px, 5vw, 60px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
}
.spaces__grid figure {
  border: 1px solid var(--line);
  background: var(--bg-panel);
}
.room__frame { aspect-ratio: 0.72; }
.room__frame img {
  position: absolute; inset: 0;
  transition: opacity 1.1s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.room:hover .room__frame img { transform: scale(1.05); }
.room figcaption {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  border-top: 1px solid var(--line);
}
.room figcaption span { color: var(--ink-faint); font-weight: 500; }
.spaces__hint {
  margin-top: 18px;
  font-size: 12.5px; color: var(--ink-faint);
}

/* ── light as a material ── */
.material {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding: clamp(80px, 11vw, 150px) clamp(24px, 4.5vw, 64px);
  padding-right: clamp(24px, 8vw, 130px);
}
.material__frame { aspect-ratio: 1.35; margin-left: calc(clamp(24px, 4.5vw, 64px) * -1); }
.material__frame img { position: absolute; inset: 0; }
.material__sub {
  margin-top: 22px; max-width: 380px;
  font-size: 14.5px; line-height: 1.7; color: var(--ink-soft);
}
.material .btn { margin-top: 30px; }

/* ── approach ── */
.approach {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 0 clamp(24px, 4.5vw, 64px) clamp(80px, 10vw, 130px);
}
.approach__col {
  padding: 8px clamp(20px, 3vw, 44px) 8px 0;
  margin-right: clamp(20px, 3vw, 44px);
  border-right: 1px solid var(--line);
}
.approach__col:last-child { border-right: none; margin-right: 0; }
.approach__num { font-size: 12px; letter-spacing: 0.18em; color: var(--ink-faint); }
.approach__col h3 {
  margin-top: 10px;
  font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -0.02em;
}
.approach__col p:last-child {
  margin-top: 10px;
  font-size: 13px; line-height: 1.65; color: var(--ink-soft);
}

/* ── cta ── */
.cta {
  display: grid; grid-template-columns: 1fr 0.9fr;
  align-items: stretch;
  margin: 0 clamp(24px, 4.5vw, 64px) clamp(70px, 9vw, 110px);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  overflow: hidden;
}
.cta__copy {
  padding: clamp(44px, 6vw, 90px) clamp(30px, 4.5vw, 70px);
  display: flex; flex-direction: column; justify-content: center;
}
.cta h2 { max-width: 460px; }
.cta .btn { margin-top: 34px; }
.cta__frame { min-height: 320px; }
.cta__frame img { position: absolute; inset: 0; object-position: 78% 30%; }

/* ── footer ── */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 26px clamp(24px, 4.5vw, 64px) 34px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-soft);
}
.footer__links { display: flex; gap: clamp(24px, 4vw, 56px); }
.footer a {
  color: var(--ink-soft); text-decoration: none;
  transition: color 0.3s ease;
}
.footer a:hover { color: var(--ink); }
.footer__credit {
  width: 100%; text-align: center;
  margin-top: 14px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-faint);
}
.footer__credit a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }

/* ── reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in-view {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.75s ease, border-color 0.75s ease;
}

/* ── mobile ── */
@media (max-width: 860px) {
  .nav { display: none; }
  .mode-toggle { top: 74px; }
  .spaces__grid { grid-template-columns: repeat(2, 1fr); }
  .material { grid-template-columns: 1fr; padding-right: clamp(24px, 4.5vw, 64px); }
  .material__frame { margin-left: 0; }
  .approach { grid-template-columns: 1fr; gap: 30px; }
  .approach__col { border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 26px; margin-right: 0; }
  .approach__col:last-child { border-bottom: none; padding-bottom: 0; }
  .cta { grid-template-columns: 1fr; }
  .cta__frame { min-height: 240px; order: -1; }
  .footer { justify-content: center; text-align: center; }
}
