/* ==========================================================================
   Sam Monroe — The House of Monroe
   Shared stylesheet
   ========================================================================== */

:root {
  --ink: #0b0a09;
  --ink-2: #12100e;
  --ink-3: #1a1714;
  --line: rgba(239, 233, 221, 0.12);
  --paper: #efe9dd;
  --muted: #9a9284;
  --gold: #c9a24b;
  --gold-soft: #e6cd8f;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: var(--ink); }

/* film grain over everything */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex; align-items: center; gap: 14px;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--gold); flex: none; }
.eyebrow.plain::before { display: none; }

.display {
  font-family: var(--display);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin: 0;
}
.display em, .gold-i { font-style: italic; color: var(--gold-soft); font-weight: 400; }
h2.display { font-size: clamp(40px, 6.4vw, 96px); }
h3.display { font-size: clamp(28px, 3.4vw, 46px); line-height: 1.02; }

.lede { color: #cfc8ba; font-size: clamp(15px, 1.2vw, 17.5px); max-width: 54ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid var(--line);
  background: rgba(11, 10, 9, 0.45);
  backdrop-filter: blur(8px);
  transition: transform .5s var(--ease), background .3s, border-color .3s, color .3s;
  cursor: pointer;
  color: var(--paper);
  font-family: var(--body);
}
.btn:hover { transform: translateY(-2px); border-color: var(--gold); color: var(--gold-soft); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #17120a; }
.btn.gold:hover { background: var(--gold-soft); color: #17120a; }
.btn .arr { transition: transform .5s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 10, 9, 0.82);
  backdrop-filter: blur(14px);
  padding-top: 12px; padding-bottom: 12px;
  border-bottom-color: var(--line);
}
.brand { font-family: var(--display); font-size: 22px; letter-spacing: -0.01em; }
.brand em { color: var(--gold-soft); font-weight: 400; }
.nav-links { display: flex; gap: clamp(14px, 2vw, 30px); }
.nav-links a {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  color: #b9b1a2; position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.nav-links a:hover, .nav-links a.on { color: var(--paper); }
.nav-links a:hover::after, .nav-links a.on::after { transform: scaleX(1); }
.nav .btn { padding: 9px 18px; font-size: 12px; }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 9px; right: 9px; height: 1px; background: var(--paper); transition: transform .4s var(--ease), top .4s var(--ease); }
.burger span:first-child { top: 16px; } .burger span:last-child { top: 24px; }
.menu-open .burger span:first-child { top: 20px; transform: rotate(45deg); }
.menu-open .burger span:last-child { top: 20px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: block; z-index: 2; }
  .nav .btn { display: none; }
  .nav-links {
    position: fixed; inset: 0; background: rgba(11,10,9,.97);
    flex-direction: column; justify-content: center; align-items: flex-start;
    padding: 0 var(--gutter); gap: 6px;
    opacity: 0; pointer-events: none; transition: opacity .4s;
  }
  .nav-links a { font-family: var(--display); font-size: 38px; letter-spacing: -0.01em; text-transform: none; color: var(--paper); }
  .menu-open .nav-links { opacity: 1; pointer-events: auto; }
}

/* scroll progress hairline */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; z-index: 70; }

/* ---------- preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: #070605;
  display: grid; place-items: center;
  transition: opacity .9s var(--ease) .1s, visibility 0s 1s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader .brand { font-size: clamp(30px, 4vw, 46px); opacity: 0; animation: fadeUp 1s var(--ease) .15s forwards; }
.loader-bar { width: 180px; height: 1px; background: var(--line); margin: 18px auto 14px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; background: var(--gold); transform: translateX(-100%); animation: load 1.5s var(--ease) .2s forwards; }
.loader .mono { color: var(--muted); opacity: 0; animation: fadeUp 1s var(--ease) .4s forwards; }
@keyframes load { to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
.line-mask { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.line-mask > span { display: block; transform: translateY(108%); transition: transform 1.3s var(--ease); transition-delay: var(--d, 0s); }
.in .line-mask > span, .line-mask.in > span { transform: none; }

/* ---------- hero (shared by pages) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; background: #14110e; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,10,9,.94) 0%, rgba(11,10,9,.72) 30%, rgba(11,10,9,.12) 62%, rgba(11,10,9,.35) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(11,10,9,0) 32%),
    linear-gradient(180deg, rgba(11,10,9,.7) 0%, rgba(11,10,9,0) 22%);
}
.hero-body { padding: 0 var(--gutter) clamp(56px, 9vh, 110px); width: 100%; }
.hero h1 { font-size: clamp(64px, 12.5vw, 210px); margin: 22px 0 0; }
.hero-meta { position: absolute; right: var(--gutter); bottom: 28px; color: #7d766a; }

/* ---------- sections ---------- */
section { position: relative; }
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); max-width: 1500px; margin: 0 auto; }
.pad { padding-top: clamp(90px, 13vw, 190px); padding-bottom: clamp(90px, 13vw, 190px); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* figures */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.figure { padding: 34px 24px 34px 0; border-bottom: 1px solid var(--line); }
.figure b { font-family: var(--display); font-weight: 500; font-size: clamp(38px, 4.6vw, 68px); line-height: 1; display: block; letter-spacing: -0.02em; }
.figure span { display: block; margin-top: 12px; font-size: 12.5px; color: var(--muted); max-width: 24ch; }
@media (max-width: 800px) { .figures { grid-template-columns: repeat(2, 1fr); } }

/* plate (framed photo) */
.plate { background: #ece4d2; padding: 12px 12px 0; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); transform: rotate(var(--rot, 1.5deg)); position: relative; }
.plate::before { content: ""; position: absolute; top: -9px; left: 50%; width: 44px; height: 16px; transform: translateX(-50%); background: linear-gradient(#cfc6b2, #9d937e); border-radius: 2px; }
.plate img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 12%; }
.plate figcaption { font-family: var(--mono); font-size: 9px; letter-spacing: .24em; text-transform: uppercase; color: #4a4336; text-align: center; padding: 11px 0; }
figure { margin: 0; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: #080706; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 40px; }
.footer h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin: 0 0 18px; font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer li a { color: #c8c0b1; font-size: 14.5px; transition: color .3s; }
.footer li a:hover { color: var(--gold-soft); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 30px; border-top: 1px solid var(--line); color: #6f685d; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .line-mask > span { transition: none; opacity: 1; transform: none; }
}

/* ===== mobile pass ===== */
html { -webkit-tap-highlight-color: transparent; }
html, body { overflow-x: clip; }
.plate figcaption { font-size: 10px; }

@media (max-width: 900px) {
  /* keep the primary action reachable next to the burger */
  .nav { padding-top: max(14px, env(safe-area-inset-top)); }
  .nav .btn { display: inline-flex; margin-left: auto; margin-right: 4px; padding: 8px 14px; font-size: 11.5px; }
  .nav-links { padding-bottom: env(safe-area-inset-bottom); }
  .nav-links a { padding: 8px 0; }
  .sticky { position: static; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .eyebrow { font-size: 10px; letter-spacing: .22em; gap: 10px; }
  .eyebrow::before { width: 24px; }
  .mono { font-size: 10px; letter-spacing: .18em; }
  .lede { font-size: 16px; }
  .btn { min-height: 46px; padding: 12px 20px; }
  .pad { padding-top: 84px; padding-bottom: 84px; }

  /* heroes read bottom-up on a phone: picture on top, words on a dark floor */
  .hero { min-height: 100svh; }
  .hero::before {
    background:
      linear-gradient(0deg, var(--ink) 3%, rgba(11,10,9,.9) 36%, rgba(11,10,9,.12) 68%),
      linear-gradient(180deg, rgba(11,10,9,.72) 0%, rgba(11,10,9,0) 20%);
  }
  .hero-body { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .hero-meta { display: none; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }

  .figures { grid-template-columns: repeat(2, 1fr) !important; }
  .figure { padding: 24px 12px 24px 0; }
  .figure b { font-size: 36px; }
  .figure span { font-size: 12.5px; }

  .plate { --rot: 0deg; max-width: 320px; margin-left: auto; margin-right: auto; }
  .footer-grid { padding-top: 48px; gap: 32px; }
  .footer-base { justify-content: center; text-align: center; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
