/* =========================================================
   Gary's Loft — main.css
   Editorial, minimal, photo-led. Inspired by homestudiosinc.com.
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f3ef;
  --ink: #0a0a0a;
  --ink-soft: #2a2a2a;
  --muted: #8a8a85;
  --rule: #1a1a1a;
  --accent: #0a0a0a;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(40px, 6vw, 80px);

  --t-fast: 220ms cubic-bezier(.2,.7,.2,1);
  --t-med:  420ms cubic-bezier(.2,.7,.2,1);
  --t-slow: 900ms cubic-bezier(.2,.7,.2,1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--t-fast);
}
a:hover { opacity: .55; }

/* Type ============================== */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin: 0;
}
h1 { font-size: clamp(48px, 9vw, 140px); }
h2 { font-size: clamp(36px, 6vw, 88px); }
h3 { font-size: clamp(24px, 3vw, 40px); }
h4 { font-size: clamp(18px, 1.6vw, 22px); }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

p { margin: 0 0 1.2em; max-width: 64ch; }

/* Layout helpers ==================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: var(--section) 0; }
.section--tight { padding: clamp(24px, 4vw, 48px) 0; }
.section--dark { background: var(--ink); color: var(--bg); }
.section--cream { background: var(--bg-alt); }

.rule { height: 1px; background: rgba(10,10,10,.12); width: 100%; margin: 0; }

/* NAV =============================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  transition: transform var(--t-med), background var(--t-med), color var(--t-med), border-color var(--t-med);
  border-bottom: 1px solid transparent;
  background: rgba(255,255,255,0);
  mix-blend-mode: difference;
  color: #fff;
}
.nav.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: rgba(10,10,10,.08);
  mix-blend-mode: normal;
  color: var(--ink);
}
.nav.hidden { transform: translateY(-120%); }

.nav__brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav__brand a { color: inherit; }
.nav__brand .amp { font-style: italic; }

.nav__links {
  display: flex; gap: clamp(14px, 2vw, 28px);
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav__links a { position: relative; }
.nav__links a.active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: currentColor;
}

.nav__cta {
  justify-self: end;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav__cta:hover { background: currentColor; color: var(--bg); opacity: 1; }

.nav__toggle { display: none; }

@media (max-width: 820px) {
  .nav { grid-template-columns: 1fr auto; padding: 16px var(--gutter); }
  .nav__links {
    position: fixed; inset: 0; background: var(--ink); color: #fff;
    flex-direction: column; align-items: center; justify-content: center;
    font-size: 24px; letter-spacing: 0.12em; gap: 28px;
    transform: translateY(-100%); transition: transform var(--t-med);
    z-index: 49;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__cta { display: none; }
  .nav__toggle {
    display: flex; flex-direction: column; gap: 5px;
    width: 28px; height: 22px; justify-content: center; align-items: flex-end;
    background: transparent; border: 0; cursor: pointer; color: inherit;
    z-index: 51;
  }
  .nav__toggle span { display: block; width: 24px; height: 1px; background: currentColor; transition: transform var(--t-fast); }
  .nav__toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* HERO ============================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: flex-end;
}
.hero__media,
.hero__media img,
.hero__media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 100%);
  z-index: 2;
}
.hero__inner {
  position: relative; z-index: 3;
  width: 100%;
  padding: 0 var(--gutter) clamp(48px, 8vw, 96px);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  flex-wrap: wrap;
}
.hero__title {
  font-size: clamp(54px, 11vw, 180px);
  line-height: .92;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.hero__title em { font-style: italic; font-weight: 300; }
.hero__meta {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  max-width: 280px; text-align: right;
}
.hero__scroll {
  position: absolute; left: var(--gutter); bottom: 20px;
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  z-index: 3;
}

/* Marquee strip ===================== */
.marquee {
  border-top: 1px solid rgba(10,10,10,.12);
  border-bottom: 1px solid rgba(10,10,10,.12);
  overflow: hidden;
  white-space: nowrap;
  padding: 18px 0;
}
.marquee__track {
  display: inline-flex; gap: 56px;
  animation: scroll 38s linear infinite;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  font-style: italic;
  color: var(--ink);
}
.marquee__track span { padding-right: 56px; border-right: 0; }
.marquee__track span::after { content: "✦"; padding-left: 56px; font-style: normal; color: var(--muted); }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Two-column intro =================== */
.intro {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.intro__label { padding-top: 6px; }
.intro__body p:first-of-type {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 1em;
  max-width: 28ch;
}
@media (max-width: 760px) { .intro { grid-template-columns: 1fr; } }

/* Spaces grid ======================= */
.spaces {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.space-card {
  position: relative;
  overflow: hidden;
  grid-column: span 6;
  aspect-ratio: 16/10;
  display: block;
  background: #0a0a0a;
  color: #fff;
}

.space-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  background: #0a0a0a;
  transition: transform var(--t-slow);
}
.space-card:hover img { transform: scale(1.03); }
.space-card__body {
  position: absolute; inset: 0; z-index: 2;
  padding: clamp(20px, 3vw, 36px);
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.6) 100%);
}
.space-card__title { font-size: clamp(28px, 4vw, 56px); }
.space-card__sub { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: .85; margin-top: 6px; }

@media (max-width: 760px) {
  .spaces { gap: 16px; }
  .space-card,
  .space-card:nth-child(4n+1),
  .space-card:nth-child(4n+2),
  .space-card:nth-child(4n+3),
  .space-card:nth-child(4n+4) { grid-column: span 12; aspect-ratio: 4/5; }
}

/* Editorial split ==================== */
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.split--rev { grid-template-columns: 1fr 1.2fr; }
.split--rev .split__media { order: 2; }
.split--rev .split__body  { order: 1; }
.split__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.split__body h2 { margin-bottom: .4em; }
@media (max-width: 760px) {
  .split, .split--rev { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
}

/* Use cases grid (Events) =========== */
.uses {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.use {
  display: flex; flex-direction: column;
}
.use__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #111; }
.use__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.use:hover .use__media img { transform: scale(1.04); }
.use__num { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--muted); margin-top: 16px; }
.use__title { font-size: clamp(28px, 3.4vw, 44px); margin: 6px 0 10px; }
.use__copy  { color: var(--ink-soft); }
@media (max-width: 700px) { .uses { grid-template-columns: 1fr; } }

/* Full-bleed image ================= */
.fullbleed { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.fullbleed img { width: 100%; height: 100%; object-fit: cover; }

/* Gallery (space pages) =========== */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense; /* fill orphan cells if a row doesn't sum to 12 */
  gap: 16px;
}
.gallery figure { margin: 0; grid-column: span 6; aspect-ratio: 4/5; overflow: hidden; background: #111; cursor: zoom-in; }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figure.wide { grid-column: span 8; aspect-ratio: 16/10; }
.gallery figure.narrow { grid-column: span 4; aspect-ratio: 3/4; }
.gallery figure.full { grid-column: span 12; aspect-ratio: 21/9; }
@media (max-width: 760px) {
  .gallery figure,
  .gallery figure.wide,
  .gallery figure.narrow,
  .gallery figure.full { grid-column: span 12; aspect-ratio: 4/5; }
}

/* Specs table ======================= */
.specs {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 60px);
  align-items: start;
}
.specs__list { border-top: 1px solid rgba(10,10,10,.15); }
.specs__row {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  padding: 18px 0; border-bottom: 1px solid rgba(10,10,10,.10);
  font-size: 14px;
}
.specs__row dt { color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: 11px; }
.specs__row dd { margin: 0; color: var(--ink); }
@media (max-width: 760px) {
  .specs { grid-template-columns: 1fr; }
  .specs__row { grid-template-columns: 1fr; gap: 4px; }
}

/* Buttons =========================== */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  padding: 16px 28px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  border-radius: 999px;
  transition: background var(--t-fast), color var(--t-fast);
  cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--bg); opacity: 1; }
.btn--light { border-color: #fff; color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--bg); color: var(--ink); }

/* Forms ============================= */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.field input, .field select, .field textarea {
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(10,10,10,.25);
  padding: 12px 0;
  font-family: inherit; font-size: 16px; color: var(--ink);
  border-radius: 0;
  outline: none;
  transition: border-color var(--t-fast);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }

/* Footer ============================ */
.footer {
  background: var(--ink); color: #cfcfca;
  padding: clamp(40px, 6vw, 72px) 0 28px;
}
.footer a { color: #fff; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 60px);
}
.footer__brand h2 {
  font-size: clamp(40px, 6vw, 80px);
  color: #fff;
  line-height: .95;
  margin-bottom: 24px;
}
.footer__brand p { color: #9d9d97; max-width: 36ch; font-size: 14px; }
.footer__col h4 {
  font-family: var(--sans); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase;
  color: #9d9d97; font-weight: 500; margin-bottom: 18px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.footer__bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #7c7c76;
}
@media (max-width: 820px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* Reveal on scroll =================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--t-slow), transform var(--t-slow); }
.reveal.in { opacity: 1; transform: none; }

/* Lightbox =========================== */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.94);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 4vw;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__close {
  position: absolute; top: 24px; right: 32px;
  background: transparent; border: 0; color: #fff; font-size: 14px;
  letter-spacing: .2em; text-transform: uppercase; cursor: pointer;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; color: #fff; font-size: 14px;
  letter-spacing: .2em; text-transform: uppercase; cursor: pointer;
  padding: 16px;
}
.lightbox__nav.prev { left: 16px; }
.lightbox__nav.next { right: 16px; }
.lightbox__nav:hover { color: rgba(255,255,255,.7); }
.lightbox__count {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .2em;
}
@media (max-width: 600px) {
  .lightbox__nav { font-size: 12px; padding: 12px 8px; }
  .lightbox__close { top: 16px; right: 20px; font-size: 12px; }
}

/* Other spaces (compact row on space detail pages) ==== */
.other-spaces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.other-space-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
  background: #111;
  color: #fff;
  text-decoration: none;
}
.other-space-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
  filter: brightness(.85);
}
.other-space-card:hover img { transform: scale(1.04); opacity: 1; }
.other-space-card__body {
  position: absolute; inset: 0; z-index: 2;
  padding: 16px;
  display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.55) 100%);
}
.other-space-card__title {
  font-family: var(--serif);
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 400;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
@media (max-width: 640px) {
  .other-spaces { grid-template-columns: 1fr; gap: 10px; }
  .other-space-card { aspect-ratio: 16/9; }
}

/* Contact-sheet gallery (justified, uncropped) ==== */
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}
.photo-grid figure {
  margin: 0;
  height: 140px;
  cursor: zoom-in;
  overflow: hidden;
  background: #f4f3ef;
}
.photo-grid figure img {
  height: 100%;
  width: auto;
  display: block;
  transition: opacity var(--t-fast);
}
.photo-grid figure:hover img { opacity: .82; }
.photo-grid figure.floorplan {
  height: 140px;
  padding: 8px;
  border: 1px solid rgba(10,10,10,.15);
  background: #fff;
}
.photo-grid figure.floorplan img { object-fit: contain; }
@media (max-width: 760px) {
  .photo-grid figure { height: 100px; }
}

/* Wedding proof 3-up grid =========== */
.weddings-3up {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.weddings-3up figure {
  margin: 0;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #111;
  cursor: zoom-in;
}
.weddings-3up figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.weddings-3up figure:hover img { transform: scale(1.04); }
@media (max-width: 760px) {
  .weddings-3up { grid-template-columns: 1fr; }
  .weddings-3up figure { aspect-ratio: 4/5; }
}

/* Quick Facts block ================= */
.quick-facts {
  background: var(--bg-alt);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(10,10,10,.08);
}
.quick-facts__label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 8px;
}
.quick-facts__title {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 40px);
  margin: 0 0 28px;
  line-height: 1.05;
}
.quick-facts__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 32px;
}
.quick-facts__item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(10,10,10,.08);
  margin: 0;
}
.quick-facts__item dt {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.quick-facts__item dd { margin: 0; font-size: 14px; color: var(--ink); line-height: 1.5; }
@media (max-width: 760px) {
  .quick-facts__grid { grid-template-columns: 1fr; }
  .quick-facts__item { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
}

/* FAQ ============================== */
.faq { display: block; }
.faq details {
  border-bottom: 1px solid rgba(10,10,10,.14);
  padding: 24px 0;
}
.faq details:first-of-type { border-top: 1px solid rgba(10,10,10,.14); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  color: var(--ink);
  line-height: 1.2;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 24px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform var(--t-fast);
  font-weight: 300;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p {
  margin: 16px 0 0;
  max-width: 70ch;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}

/* Page hero (non-home) =============== */
.page-hero {
  padding: clamp(100px, 11vw, 140px) 0 clamp(32px, 5vw, 56px);
  background: var(--bg-alt);
}
.page-hero h1 { margin-bottom: 20px; max-width: 14ch; }
.page-hero .meta {
  display: flex; gap: 32px; flex-wrap: wrap;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
}
