/* MONORÉ - Spatial Refinement Studio
   Shared design system
   Palette and type per brand brief. No em dashes anywhere. */

:root {
  /* Primary */
  --teal:      #234B4B;
  --slate:     #506878;
  --storm:     #6C737A;
  --mist:      #D9DFE2;
  --bone:      #ECE8E2;
  --sandstone: #B8A89A;
  /* Accents */
  --moss:      #5C6A5B;
  --ink:       #1E2328;
  --bronze:    #8A715B;

  --bg:        #ECE8E2;   /* bone */
  --bg-deep:   #234B4B;   /* teal */
  --text:      #2A2E31;
  --text-soft: #6C737A;

  --serif: "Cormorant Garamond", "Canela", Georgia, serif;
  --sans:  "Inter", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1180px;
  --gutter: clamp(1.5rem, 6vw, 7rem);
  --section-y: clamp(5rem, 12vw, 11rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.005em;
  margin: 0;
}

.display {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 400;
  letter-spacing: 0.002em;
}

.h-lg { font-size: clamp(2rem, 4.6vw, 3.5rem); }
.h-md { font-size: clamp(1.5rem, 3vw, 2.3rem); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--storm);
  margin: 0 0 1.6rem;
}

.lede {
  font-size: clamp(1.12rem, 1.8vw, 1.45rem);
  font-weight: 300;
  line-height: 1.65;
  color: var(--text);
}

p { margin: 0 0 1.3rem; max-width: 60ch; }

.soft { color: var(--text-soft); }

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: var(--section-y) 0; }

.narrow { max-width: 760px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.spacer { height: clamp(2rem, 6vw, 5rem); }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(236, 232, 226, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(108, 115, 122, 0.16);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.35rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--teal);
}
.nav-links {
  display: flex;
  gap: clamp(1.4rem, 3vw, 3rem);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--storm);
}
.nav-links a { transition: color 0.3s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--teal); }

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.05rem 2.4rem;
  border: 1px solid currentColor;
  color: var(--teal);
  border-radius: 1px;
  transition: background 0.4s ease, color 0.4s ease;
}
.btn:hover { background: var(--teal); color: var(--bone); }

.btn-light { color: var(--bone); }
.btn-light:hover { background: var(--bone); color: var(--teal); }

.link-arrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.link-arrow:hover { border-color: var(--bronze); }

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

.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(180deg, rgba(30,35,40,0.48) 0%, rgba(35,75,75,0.62) 100%),
    var(--hero-img, linear-gradient(160deg, #2c4a4d 0%, #1e2328 100%));
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  color: var(--bone);
  position: relative;
}
.hero .wrap { width: 100%; }
.hero .eyebrow { color: rgba(217,223,226,0.75); }
.hero .display { color: var(--bone); max-width: 16ch; }
.hero .lede { color: rgba(236,232,226,0.86); max-width: 46ch; margin-top: 1.8rem; }
.hero .btn { margin-top: 2.6rem; }

/* ---------- Sectional tones ---------- */

.tone-deep {
  background: linear-gradient(165deg, #234B4B 0%, #1E2328 100%);
  color: var(--bone);
}
.tone-deep .eyebrow { color: var(--sandstone); }
.tone-deep .soft { color: rgba(236,232,226,0.7); }

.tone-slate {
  background: linear-gradient(165deg, #506878 0%, #3c4d59 100%);
  color: var(--bone);
}
.tone-slate .eyebrow { color: var(--mist); }

.tone-mist { background: var(--mist); }
.tone-sand { background: #E3DBD1; }

.rule {
  width: 46px;
  height: 1px;
  background: var(--bronze);
  border: 0;
  margin: 0 0 2.2rem;
}
.center .rule { margin-left: auto; margin-right: auto; }

/* ---------- Grids ---------- */

.grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3.4rem);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  padding: clamp(2rem, 3.5vw, 3rem);
  background: rgba(255,255,255,0.4);
  border: 1px solid rgba(108,115,122,0.18);
  border-radius: 2px;
}
.tone-deep .card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(236,232,226,0.16);
}
.card h3 { margin-bottom: 1rem; }
.card .num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--bronze);
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 1.4rem;
}

/* Method movements */
.movement {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2.4rem, 4vw, 3.4rem) 0;
  border-top: 1px solid rgba(108,115,122,0.22);
  align-items: baseline;
}
.movement:last-child { border-bottom: 1px solid rgba(108,115,122,0.22); }
.movement .idx {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--bronze);
}
.movement h3 { margin-bottom: 0.8rem; }

/* Split feature — image dominant, text secondary beside it */
.split {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2.5rem, 5vw, 6rem);
  align-items: center;
}
/* Let split sections breathe far wider than the 1180 text column */
.wrap.split { max-width: 1960px; }
/* Image is the hero of the row (~64% width); works whichever side it sits on */
.split > .feature { flex: 0 1 64%; min-width: 0; aspect-ratio: 4 / 3; }
/* Text is the slim, secondary column */
.split > div { flex: 1 1 300px; min-width: 0; }

@media (max-width: 1000px) {
  .split { flex-direction: column; align-items: stretch; }
  .split > .feature,
  .split > div { flex: 1 1 auto; width: 100%; }
}
.swatch {
  min-height: 360px;
  border-radius: 2px;
}
.swatch-ocean {
  background:
    linear-gradient(180deg, rgba(30,35,40,0.2), rgba(35,75,75,0.5)),
    linear-gradient(160deg, #506878 0%, #234B4B 70%, #1E2328 100%);
}
.swatch-stone {
  background:
    linear-gradient(160deg, #B8A89A 0%, #8A715B 100%);
}
.swatch-mist {
  background:
    linear-gradient(160deg, #D9DFE2 0%, #6C737A 100%);
}

/* ---------- Image feature (swaps in for color swatch) ---------- */

.feature {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

/* ---------- Before / After ---------- */
/* The "after" shows on load. Hover (or tap) reveals the "before". */

.ba {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  background: var(--ink);
}
.ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ba .ba-before { z-index: 1; }
.ba .ba-after  { z-index: 2; transition: opacity 0.7s ease, transform 6s ease; }

.ba:hover .ba-after,
.ba:focus-visible .ba-after,
.ba.show-before .ba-after { opacity: 0; }

/* Corner tag that flips label */
.ba .ba-tag {
  position: absolute;
  z-index: 3;
  left: 1rem;
  top: 1rem;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone);
  background: rgba(30,35,40,0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.5rem 0.9rem;
  border-radius: 1px;
  pointer-events: none;
}
.ba .ba-tag .is-before { display: none; }
.ba:hover .ba-tag .is-after,
.ba:focus-visible .ba-tag .is-after,
.ba.show-before .ba-tag .is-after { display: none; }
.ba:hover .ba-tag .is-before,
.ba:focus-visible .ba-tag .is-before,
.ba.show-before .ba-tag .is-before { display: inline; }

.ba-caption {
  margin-top: 1.1rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}
.tone-deep .ba-caption,
.tone-slate .ba-caption { color: rgba(236,232,226,0.72); }

.ba-hint {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
}

/* Wide container so the gallery fills the screen, not the 1180 column */
.gallery-wide {
  width: 100%;
  max-width: 2100px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}

/* Gallery grid for transformations — large, immersive, multi-row */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 3.2vw, 4rem);
}
@media (max-width: 820px) {
  .gallery { grid-template-columns: 1fr; }
}

/* In the gallery, make each before/after large and cinematic */
.gallery .ba { aspect-ratio: 3 / 2; }
.gallery .ba-tag {
  left: 1.6rem;
  top: 1.6rem;
  font-size: 0.78rem;
  padding: 0.65rem 1.2rem;
  letter-spacing: 0.24em;
}
.gallery .ba-caption {
  margin-top: 1.6rem;
  font-size: 1.5rem;
  font-family: var(--serif);
  color: var(--text);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.gallery .ba-hint { margin-top: 0; font-size: 0.72rem; }

/* ---------- Quote band ---------- */

.quote {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1.25;
  font-weight: 400;
  max-width: 20ch;
  margin: 0 auto;
}

/* ---------- Form ---------- */

.form { max-width: 620px; }
.field { margin-bottom: 1.8rem; }
.field label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--storm);
  margin-bottom: 0.7rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text);
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(108,115,122,0.3);
  border-radius: 2px;
  padding: 0.95rem 1.1rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(255,255,255,0.8);
}
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

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

.footer {
  background: linear-gradient(180deg, #1E2328 0%, #234B4B 100%);
  color: rgba(236,232,226,0.8);
  padding: clamp(4rem, 8vw, 6rem) 0 3rem;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
}
.footer .brand { color: var(--bone); font-size: 1.2rem; }
.footer-tag { max-width: 30ch; margin-top: 1.2rem; font-size: 0.95rem; color: rgba(236,232,226,0.6); }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236,232,226,0.7);
}
.footer-links a:hover { color: var(--bone); }
.footer-base {
  max-width: var(--maxw);
  margin: 3.5rem auto 0;
  padding: 1.8rem var(--gutter) 0;
  border-top: 1px solid rgba(236,232,226,0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236,232,226,0.5);
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.reveal.in { opacity: 1; transform: none; }

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

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .swatch { min-height: 240px; order: -1; }
  .nav-links {
    position: fixed;
    inset: 64px 0 auto 0;
    background: rgba(236,232,226,0.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 1.6rem;
    padding: 2rem var(--gutter) 2.4rem;
    border-bottom: 1px solid rgba(108,115,122,0.18);
    transform: translateY(-120%);
    transition: transform 0.4s ease;
  }
  .nav-links.open { transform: none; }
  .nav-toggle {
    display: block;
    background: none;
    border: 0;
    font-family: var(--sans);
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--teal);
    cursor: pointer;
  }
  .movement { grid-template-columns: 1fr; gap: 0.6rem; }
}

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