/* ============================================================
   VISIONS IN WOOD — The Thompson House
   Millie Rosenbloom × Quant49 Media
   ============================================================ */

:root {
  --bg: #0b0b0c;
  --bg-alt: #101012;
  --panel: #141416;
  --ink: #ece7dd;
  --ink-muted: #a39d90;
  --gold: #c6a15b;
  --gold-soft: #b5945a;
  --gold-dim: rgba(198, 161, 91, 0.35);
  --gold-faint: rgba(198, 161, 91, 0.14);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: #0b0b0c; }

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

/* ---------- Shared ---------- */

.gold-rule {
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.6rem auto;
}

.card-text {
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--ink-muted);
  font-weight: 300;
}

.card-fine { font-size: 0.85rem; margin-top: 1.1rem; }
.card-fine em { color: var(--gold-soft); font-style: normal; letter-spacing: 0.06em; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(8,8,9,0.82), rgba(8,8,9,0.55));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gold-faint);
  transition: background 0.5s var(--ease);
}

.header-inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 1.1rem 2.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  text-decoration: none;
}

.lockup-millie { height: 13px; width: auto; opacity: 0.95; }
.lockup-quant  { height: 34px; width: auto; }

.lockup-x {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--gold);
  transform: translateY(-1px);
}

.site-nav { display: flex; gap: 2.6rem; }

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 400;
  padding-bottom: 4px;
  position: relative;
  transition: color 0.35s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}

.site-nav a:hover { color: var(--gold); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-media, .hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media img {
  animation: heroDrift 22s var(--ease) forwards;
  transform-origin: center;
}

@keyframes heroDrift {
  from { transform: scale(1.08); }
  to   { transform: scale(1.0); }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(10,10,11,0.14) 0%, rgba(10,10,11,0.55) 100%),
    linear-gradient(180deg, rgba(10,10,11,0.42) 0%, rgba(10,10,11,0.08) 40%, rgba(11,11,12,0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 900px;
}

.hero-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 8.5vw, 6.8rem);
  line-height: 1.04;
  letter-spacing: 0.02em;
  color: #f3efe6;
  text-shadow: 0 2px 40px rgba(0,0,0,0.45);
}

.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: rgba(236,231,221,0.85);
  letter-spacing: 0.04em;
}

.hero-cta {
  display: inline-block;
  margin-top: 2.8rem;
  padding: 0.95rem 3rem;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-weight: 400;
  transition: all 0.5s var(--ease);
  background: rgba(11,11,12,0.25);
}

.hero-cta:hover {
  background: var(--gold);
  color: #0b0b0c;
  border-color: var(--gold);
}

.hero-scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scrollPulse 2.6s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.65); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ---------- Intro ---------- */

.intro {
  max-width: 760px;
  margin: 0 auto;
  padding: 7rem 2rem 2rem;
  text-align: center;
}

.intro p {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.85;
  font-weight: 400;
  color: rgba(236,231,221,0.9);
}

/* ---------- Sections ---------- */

.section { padding: 7.5rem 2.4rem; max-width: 1520px; margin: 0 auto; }

.section-alt {
  max-width: none;
  background: var(--bg-alt);
  border-top: 1px solid var(--gold-faint);
  border-bottom: 1px solid var(--gold-faint);
}

.section-alt > * { max-width: 1520px; margin-left: auto; margin-right: auto; }

.section-head { text-align: center; margin-bottom: 4.5rem; }

.section-number {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0.5em;
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  letter-spacing: 0.03em;
  color: #f3efe6;
}

.section-lede {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 1.12rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Tri grid ---------- */

.tri-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ---------- Style cards ---------- */

.style-card {
  background: var(--panel);
  border: 1px solid rgba(198,161,91,0.12);
  padding: 2.6rem 2.2rem;
  position: relative;
  transition: border-color 0.5s var(--ease), transform 0.5s var(--ease);
}

.style-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.style-card:hover { border-color: rgba(198,161,91,0.35); transform: translateY(-4px); }

.style-index {
  font-size: 0.68rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.style-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.9rem;
  letter-spacing: 0.02em;
  color: #f3efe6;
  margin-bottom: 0.3rem;
}

.style-tag {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-soft);
  font-size: 1rem;
  margin-bottom: 1.4rem;
}

/* ---------- Rooms / image rows ---------- */

.rooms { margin-top: 5rem; display: flex; flex-direction: column; gap: 4.5rem; }

.room-label {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: rgba(236,231,221,0.85);
  text-align: center;
  margin-bottom: 1.8rem;
  position: relative;
}

.room-label::before, .room-label::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 48px;
  height: 1px;
  background: var(--gold-dim);
  margin: 0 1.2rem;
}

.image-row { gap: 1.4rem; }

.compare-thumb {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(198,161,91,0.10);
  transition: border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
  aspect-ratio: 3 / 2;
}

.compare-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter 0.6s var(--ease);
}

.compare-thumb:hover { border-color: rgba(198,161,91,0.45); box-shadow: 0 18px 50px -18px rgba(0,0,0,0.8); }
.compare-thumb:hover img { transform: scale(1.045); }

.compare-thumb figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.6rem 1.2rem 0.85rem;
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(243,239,230,0.92);
  background: linear-gradient(180deg, transparent, rgba(8,8,9,0.78));
  text-align: center;
  pointer-events: none;
}

.compare-thumb::after {
  content: "⇆  Compare";
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(8,8,9,0.65);
  border: 1px solid var(--gold-faint);
  padding: 0.35rem 0.7rem;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}

.compare-thumb:hover::after { opacity: 1; }

/* ---------- Profile cards (buyers, renovations) ---------- */

.profile-card {
  background: var(--panel);
  border: 1px solid rgba(198,161,91,0.12);
  display: flex;
  flex-direction: column;
  transition: border-color 0.5s var(--ease), transform 0.5s var(--ease);
}

.profile-card:hover { border-color: rgba(198,161,91,0.3); transform: translateY(-4px); }

.profile-media { overflow: hidden; aspect-ratio: 3 / 2; }

.profile-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}

.profile-card:hover .profile-media img { transform: scale(1.05); }

.profile-for {
  font-size: 0.64rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 1.8rem 2.2rem 0.4rem;
}

.profile-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.75rem;
  color: #f3efe6;
  padding: 0 2.2rem 1rem;
}

.profile-card .card-text { padding: 0 2.2rem; }
.profile-card > .card-text:last-child, .profile-card .card-fine { padding-bottom: 2.4rem; }

/* ---------- Spec list ---------- */

.spec-list {
  list-style: none;
  margin: 1.6rem 2.2rem 0;
  border-top: 1px solid var(--gold-faint);
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(198,161,91,0.09);
  font-size: 0.82rem;
  color: var(--ink);
  text-align: right;
}

.spec-list li span {
  color: var(--gold-soft);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 0.25em;
  text-align: left;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--gold-faint);
  padding: 5rem 2rem 3.5rem;
  text-align: center;
  background: #08080a;
}

.footer-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.footer-lockup .lockup-millie { height: 12px; }
.footer-lockup .lockup-quant { height: 36px; }

.footer-line {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 1.02rem;
  margin-bottom: 1rem;
}

.footer-fine { font-size: 0.7rem; letter-spacing: 0.08em; color: rgba(163,157,144,0.55); }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- Compare modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5,5,6,0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}

.modal.open { opacity: 1; pointer-events: auto; }

.modal-inner {
  width: min(1240px, 94vw);
  text-align: center;
  transform: translateY(16px) scale(0.985);
  transition: transform 0.55s var(--ease);
}

.modal.open .modal-inner { transform: none; }

.modal-title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: #f3efe6;
  margin-bottom: 1.2rem;
  letter-spacing: 0.03em;
}

.modal-sep { color: var(--gold); margin: 0 0.8rem; }

#modalStyle { font-style: italic; color: var(--gold-soft); }

.modal-close {
  position: absolute;
  top: 1.4rem; right: 2rem;
  background: none;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.4s var(--ease);
}

.modal-close:hover { background: var(--gold); color: #0b0b0c; }

.compare {
  position: relative;
  width: 100%;
  max-height: 76vh;
  aspect-ratio: 3 / 2;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(198,161,91,0.25);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: ew-resize;
  background: #0e0e10;
}

.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare-before-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

.compare-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos, 50%);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.compare-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(243,239,230,0.9);
  box-shadow: 0 0 12px rgba(0,0,0,0.6);
}

.compare-knob {
  position: relative;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(8,8,9,0.7);
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 1.15rem;
  backdrop-filter: blur(4px);
}

.compare-tag {
  position: absolute;
  top: 1.1rem;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  background: rgba(8,8,9,0.65);
  border: 1px solid var(--gold-faint);
  color: rgba(243,239,230,0.9);
  pointer-events: none;
}

.tag-before { left: 1.1rem; }
.tag-after { right: 1.1rem; color: var(--gold); }

.modal-hint {
  margin-top: 1.1rem;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .tri-grid { gap: 1.4rem; }
  .style-card, .profile-card .card-text { padding-left: 1.6rem; padding-right: 1.6rem; }
  .style-card { padding: 2rem 1.6rem; }
  .profile-for, .profile-name { padding-left: 1.6rem; padding-right: 1.6rem; }
  .spec-list { margin-left: 1.6rem; margin-right: 1.6rem; }
}

/* Mid widths (preview panels, tablets): text cards stack for readability,
   but the image rows STAY three-across — the side-by-side comparison is the point */
@media (max-width: 1100px) {
  .tri-grid { grid-template-columns: 1fr; max-width: 720px; margin-left: auto; margin-right: auto; }
  .image-row { grid-template-columns: repeat(3, 1fr); max-width: none; gap: 0.9rem; }
  .compare-thumb figcaption { font-size: 0.55rem; letter-spacing: 0.2em; padding: 1.1rem 0.6rem 0.6rem; }
  .compare-thumb::after { display: none; }
  .section { padding: 5rem 1.8rem; }
}

@media (max-width: 820px) {
  .site-nav { gap: 1.4rem; }
  .site-nav a { font-size: 0.62rem; letter-spacing: 0.22em; }
  .header-inner { padding: 0.9rem 1.2rem; flex-direction: column; gap: 0.8rem; }
  .hero { min-height: 560px; }
  .lockup-millie { height: 10px; }
  .lockup-quant { height: 28px; }
  .room-label::before, .room-label::after { width: 24px; margin: 0 0.7rem; }
}

/* Phones: everything stacks */
@media (max-width: 620px) {
  .image-row { grid-template-columns: 1fr; }
  .section { padding: 4.5rem 1.4rem; }
  .compare-thumb figcaption { font-size: 0.62rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img { animation: none; }
}
