/* Cube Studio — editorial architecture site
   Isolated under /. Do not share tokens with mBrics chrome. */

:root {
  --ink: #0b0a09;
  --ink-2: #13110f;
  --ink-3: #1c1916;
  --paper: #f3eee6;
  --paper-dim: #e6dfd4;
  --stone: #cfc6b8;
  --mute: #9a9286;
  --gold: #c4a574;
  --gold-soft: #d8c09a;
  --line: rgba(243, 238, 230, 0.12);
  --line-strong: rgba(243, 238, 230, 0.28);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", "Avenir Next", system-ui, sans-serif;
  --max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 80;
  background: var(--gold);
  color: var(--ink);
  padding: 0.4rem 0.8rem;
}

/* ——— Header ——— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  transition: background 0.4s var(--ease), border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(11, 10, 9, 0.78);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--paper);
}
.brand svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
}
.brand-name {
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}
.site-nav a {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--paper); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  transition: background 0.25s, color 0.25s;
}
.nav-cta:hover {
  background: var(--gold);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 1px;
  background: currentColor;
  content: "";
}
.nav-toggle span { top: 20px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.header-actions { display: flex; align-items: center; gap: 1rem; }

@media (max-width: 860px) {
  .site-nav {
    position: fixed;
    inset: 0;
    background: rgba(11, 10, 9, 0.96);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: var(--gutter);
    gap: 1.4rem;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
  }
  .site-nav.is-open { transform: none; }
  .site-nav a { font-size: 1.4rem; letter-spacing: 0.12em; }
  .nav-toggle { display: block; z-index: 60; }
  .nav-cta { display: none; }
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: end start;
  overflow: hidden;
}
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #13110f url("/media/hero-br-778.jpg?v=11") center / cover no-repeat;
}
.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.4s var(--ease), transform 8s linear;
  z-index: 0;
}
.hero-slides img.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(11,10,9,0.28) 0%, rgba(11,10,9,0.08) 35%, rgba(11,10,9,0.72) 100%),
    linear-gradient(90deg, rgba(11,10,9,0.45) 0%, transparent 45%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter) 5.5rem;
  max-width: 820px;
}
.kicker {
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
}
.hero-content .kicker,
.project-hero-copy .kicker {
  color: var(--paper);
  letter-spacing: 0.18em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 18px rgba(0, 0, 0, 0.55);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.4rem, 9vw, 7.4rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}
.hero h1 span {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: 0.62em;
  color: var(--paper-dim);
}
.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 300;
  color: var(--stone);
  max-width: 34rem;
  margin: 0 0 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: var(--gold);
  transition: transform 0.2s, background 0.2s;
}
.btn:hover { background: var(--gold-soft); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--paper); background: transparent; }

.hero-dots {
  position: absolute;
  right: var(--gutter);
  bottom: 5.6rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.hero-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
}
.hero-dots button.is-active { background: var(--gold); }

/* ——— Sections ——— */
.section,
.hospitality,
#approach,
#practice,
#contact,
#works,
#studio {
  scroll-margin-top: 76px;
}
.section {
  padding: clamp(4.5rem, 9vw, 8rem) var(--gutter);
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 2rem 4rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
  max-width: var(--max);
}
.eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-head h2,
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  margin: 0;
}
.lede {
  margin: 0.7rem 0 0;
  color: var(--stone);
  font-size: 1.08rem;
  max-width: 40rem;
}

.wrap { max-width: var(--max); margin-inline: auto; }

/* Studio */
.studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem 3.5rem;
  max-width: var(--max);
  margin-inline: auto;
  align-items: start;
}
.studio-copy p {
  color: var(--stone);
  font-size: 1.05rem;
  margin: 0 0 1.1rem;
}
.studio-copy p strong { color: var(--paper); font-weight: 400; }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stat {
  background: var(--ink-2);
  padding: 1.4rem 1.2rem;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
}
.stat span {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

.studio-figure {
  position: relative;
  min-height: 420px;
}
.studio-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 420px;
}
.studio-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
}

@media (max-width: 860px) {
  .section-head,
  .studio-grid { grid-template-columns: 1fr; }
  .studio-figure, .studio-figure img { min-height: 280px; }
}

/* Works */
.works-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-auto-rows: 280px;
  gap: 1rem;
  max-width: var(--max);
  margin-inline: auto;
}
.work-card {
  position: relative;
  overflow: hidden;
  background: var(--ink-3);
  display: block;
  color: var(--paper);
}
.work-card.span-2 {
  grid-row: span 2;
}
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1.1s var(--ease), filter 0.6s;
  filter: saturate(0.92);
}
.work-card:hover img { transform: scale(1.1); filter: saturate(1.05); }
.work-card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 3.6rem 1.3rem 1.25rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(11, 10, 9, 0.52) 38%,
    rgba(11, 10, 9, 0.96) 100%
  );
}
.work-card h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  margin: 0 0 0.2rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}
.work-meta {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 0, 0, 0.55);
  line-height: 1.45;
  max-width: 28rem;
}
.works-more {
  max-width: var(--max);
  margin: 1rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .works-grid,
  .works-more { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .work-card.span-2 { grid-row: span 1; min-height: 320px; }
}

/* Approach */
.principles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: none;
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
}
.principle {
  background: var(--ink);
  padding: 2.4rem var(--gutter) 2.6rem;
}
.principle em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 0.85rem;
}
.principle h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  margin: 0 0 0.7rem;
}
.principle p {
  margin: 0;
  color: var(--mute);
  font-size: 0.95rem;
}

@media (max-width: 980px) {
  .principles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .principles { grid-template-columns: 1fr; }
}

/* Hospitality band */
.hospitality {
  position: relative;
  min-height: 70vh;
  display: grid;
  place-items: center start;
  overflow: hidden;
}
.hospitality img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hospitality::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,10,9,0.88) 0%, rgba(11,10,9,0.58) 48%, rgba(11,10,9,0.28) 100%);
}
.hospitality-copy {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 8vw, 7rem) var(--gutter);
  max-width: 38rem;
}
.hospitality-copy h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 500;
  line-height: 1.1;
  margin: 0.6rem 0 1rem;
}
.hospitality-copy p { color: var(--stone); }

/* Practice */
.people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: var(--max);
  margin-inline: auto;
}
.person {
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  min-height: 100%;
}
.person-mark {
  width: 48px;
  height: 48px;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 1.4rem;
}
.person h3 {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
}
.person .role {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.2rem;
}
.person p {
  color: var(--stone);
  margin: 0 0 0.9rem;
  font-size: 0.98rem;
}
.together {
  max-width: var(--max);
  margin: 1.25rem auto 0;
  border: 1px solid var(--line);
  padding: 1.6rem 1.8rem;
  color: var(--stone);
}
.together strong { color: var(--paper); font-weight: 400; }

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

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  max-width: var(--max);
  margin-inline: auto;
}
.contact-grid h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 500;
  margin: 0.5rem 0 1rem;
}
.form {
  display: grid;
  gap: 0.85rem;
}
.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.form input,
.form select,
.form textarea {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 300;
  color: var(--paper);
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 0.8rem 0.9rem;
  letter-spacing: 0.02em;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.form-note, .form-status {
  font-size: 0.9rem;
  color: var(--mute);
  margin: 0;
}
.form-status.is-ok { color: var(--gold); }
.form-status.is-err { color: #e8b4b4; }
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem var(--gutter) 2rem;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Project page */
.project-hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  place-items: end start;
  overflow: hidden;
}
.project-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.project-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(11, 10, 9, 0.35) 0%,
    rgba(11, 10, 9, 0.2) 35%,
    rgba(11, 10, 9, 0.88) 100%
  );
}
.project-hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter) 3.5rem;
}
.project-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  font-weight: 500;
  line-height: 0.95;
  margin: 0.4rem 0 0.5rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}
.project-body {
  max-width: 720px;
  padding: 3.5rem var(--gutter) 1rem;
  margin-inline: auto;
}
.project-body p {
  color: var(--stone);
  font-size: 1.12rem;
}
.gallery {
  padding: 1rem var(--gutter) 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 1400px;
  margin-inline: auto;
}
.gallery button {
  padding: 0;
  border: 0;
  background: var(--ink-3);
  overflow: hidden;
}
.gallery button:first-child,
.gallery button:nth-child(6) {
  grid-column: span 2;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 78vh;
  transition: transform 0.8s var(--ease);
}
.gallery button:hover img { transform: scale(1.04); }

@media (max-width: 700px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery button:first-child,
  .gallery button:nth-child(6) { grid-column: auto; }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11,10,9,0.94);
  z-index: 90;
  display: none;
  place-items: center;
  padding: 2rem;
}
.lightbox.is-open { display: grid; }
.lightbox img {
  max-width: min(1400px, 94vw);
  max-height: 88vh;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease) forwards;
}
@keyframes rise {
  to { opacity: 1; transform: none; }
}
