/* ============================================================
   MOEN DEVELOPMENT — Stylesheet
   Design tokens are at the top. Edit here to retheme the site.
   ============================================================ */

:root {
  --bg:          #f0ede8;
  --bg-alt:      #e8e4de;
  --text:        #1a1917;
  --text-muted:  #7a7770;
  --accent:      #bf3a1a;
  --border:      #c8c4be;
  --nav-height:  64px;

  --font-mono:   'IBM Plex Mono', monospace;
  --font-body:   'IBM Plex Sans', sans-serif;

  --space-xs:    0.5rem;
  --space-s:     1rem;
  --space-m:     2rem;
  --space-l:     4rem;
  --space-xl:    8rem;

  --max-width:   1100px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

.section {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border);
}

.section:first-of-type { border-top: none; }

/* ── Typography ──────────────────────────────────────────── */
.label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-m);
  display: block;
}

h1 {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

p { max-width: 60ch; }
p + p { margin-top: var(--space-s); }

/* ── Navigation ──────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: var(--space-m);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.nav-lang span { cursor: pointer; }
.nav-lang span.active { color: var(--text); font-weight: 500; }
.nav-lang span:hover { color: var(--text); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: var(--space-xl) 0;
  padding-top: calc(var(--space-xl) * 1.2);
}

.hero-status {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-l);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a9e5a;
  flex-shrink: 0;
}

.status-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero h1 {
  margin-bottom: var(--space-m);
  max-width: 16ch;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-l);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.cta:hover { color: var(--accent); border-color: var(--accent); }

/* ── Location note ── */
.location-note {
  text-align: left;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
  max-width: 60ch;
}

.section--compact {
  padding: var(--space-s) 0 0;
}


/* ── Showroom grid ───────────────────────────────────────── */
.showroom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.showroom-item {
  background: var(--bg);
  cursor: pointer;
  overflow: hidden;
}

.showroom-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
  transition: filter 0.3s, transform 0.3s;
}

.showroom-item:hover .showroom-img {
  filter: grayscale(0%);
  transform: scale(1.01);
}

.showroom-caption {
  padding: var(--space-s) var(--space-m);
}

.showroom-caption h3 {
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

.showroom-caption p {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: none;
}

.showroom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 6px;
}

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,14,12,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-m);
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: var(--space-m);
  right: var(--space-m);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #888;
  cursor: pointer;
  letter-spacing: 0.1em;
}
.lightbox-close:hover { color: #fff; }

/* ── Services page ───────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
}

.service-item {
  padding: var(--space-l) var(--space-m);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.service-item h3 {
  font-size: 0.95rem;
  margin-bottom: var(--space-s);
}

.service-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.service-item ul {
  margin-top: var(--space-s);
  list-style: none;
}

.service-item li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.service-item li:last-child { border-bottom: none; }

/* ── References ──────────────────────────────────────────── */
.ref-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
}

.ref-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: var(--space-m);
  padding: var(--space-m);
  border-bottom: 1px solid var(--border);
}
.ref-item:last-child { border-bottom: none; }

.ref-client {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
  display: block;
}

.ref-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
}

.contact-block {
  padding: var(--space-l) var(--space-m);
  border-right: 1px solid var(--border);
}
.contact-block:last-child { border-right: none; }

.contact-block h3 {
  margin-bottom: var(--space-m);
}

.contact-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.contact-row:last-child { border-bottom: none; }

.contact-row span:first-child {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 2px;
}

.contact-row a:hover { color: var(--accent); }

/* ── Page hero (inner pages) ─────────────────────────────── */
.page-hero {
  padding: var(--space-xl) 0 var(--space-l);
}

.page-hero h1 { margin-top: var(--space-s); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: var(--space-l) 0;
  margin-top: var(--space-xl);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-m);
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.footer-brand p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  max-width: none;
}

.footer-nav {
  display: flex;
  gap: var(--space-m);
  list-style: none;
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-nav a:hover { color: var(--text); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
  :root {
    --nav-height: auto;
    --space-m: 1.25rem;
    --space-l: 2rem;
    --space-xl: 3.5rem;
  }

  body {
    line-height: 1.55;
    overflow-wrap: break-word;
  }

  body,
  main,
  section,
  nav,
  footer {
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    min-width: 0;
    padding: 0 var(--space-s);
  }

  .section {
    padding: var(--space-l) 0;
  }

  h1 {
    font-size: 2.2rem;
    line-height: 1.12;
  }

  h2 {
    font-size: 1.45rem;
  }

  h3 {
    font-size: 0.95rem;
  }

  .nav-inner {
    flex-wrap: wrap;
    gap: var(--space-s);
    height: auto;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .nav-logo {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }

  .nav-links {
    order: 3;
    display: flex;
    width: 100%;
    gap: var(--space-s);
    overflow-x: auto;
    padding-top: 0.35rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    white-space: nowrap;
  }

  .nav-lang {
    flex-shrink: 0;
    font-size: 0.68rem;
  }

  .hero {
    padding: var(--space-l) 0;
  }

  .hero-inner {
    padding-top: var(--space-l) !important;
  }

  .hero-status {
    margin-bottom: var(--space-m);
  }

  .hero-disciplines {
    line-height: 1.6;
  }

  .hero h1 {
    max-width: 14ch;
  }

  .hero-sub {
    font-size: 1rem;
    margin-bottom: var(--space-m);
  }

  .hero-usps {
    margin-top: var(--space-l) !important;
  }

  .usp-item {
    padding: var(--space-m) var(--space-s) !important;
  }

  .page-hero {
    padding: var(--space-l) 0 var(--space-m);
  }

  .showroom-grid {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .showroom-grid,
  .ref-list,
  .contact-grid {
    min-width: 0;
  }

  .showroom-caption {
    padding: var(--space-s);
  }

  .service-item {
    min-width: 0;
    padding: var(--space-m);
    border-right: none;
  }

  .service-item p {
    max-width: none;
  }

  .ref-item {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: var(--space-xs);
    padding: var(--space-m);
  }

  .ref-year {
    justify-self: start;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-block {
    min-width: 0;
    padding: var(--space-m);
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .contact-block:last-child {
    border-bottom: none;
  }

  .contact-row {
    flex-direction: column;
    gap: 0.2rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: var(--space-s);
  }

  .glance-item { border-right: none; border-bottom: 1px solid var(--border); }
  .glance-item:last-child { border-bottom: none; }
  .work-item { grid-template-columns: 2rem 1fr; }
}
