/* ==========================================================================
   Muzzonigro Capital and Family Office
   Palette: warm ink, camel, loden, limestone. Type: Spectral + Archivo.
   ========================================================================== */

/* Typefaces are served from this repository. No third party font CDN. */

@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("../fonts/spectral-latin-200-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/spectral-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/spectral-latin-300-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/archivo-latin-300-normal.woff2") format("woff2");
}

:root {
  /* two grounds, not one flat black, so the page has depth before anything is drawn on it */
  --ink: #16120e;
  --ink-raise: #1e1913;
  --ink-deep: #100d0a;

  --limestone: #e9e5dd;
  --bone: #cfc8bd;
  --taupe: #968b7d;

  --camel: #c19a61;
  --camel-deep: #7e623b;
  --loden: #7f8b67;

  --hair: rgba(233, 229, 221, 0.14);
  --hair-strong: rgba(233, 229, 221, 0.26);
  --hair-dark: rgba(22, 18, 14, 0.16);

  --serif: "Spectral", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --gutter: clamp(1.5rem, 5vw, 5.5rem);
  --rhythm: clamp(5rem, 11vh, 9.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--limestone);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  font-weight: 300;
  line-height: 1.62;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, blockquote, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--camel);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--limestone);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  z-index: 99;
  font-size: 0.9rem;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ grain */

/* A single fixed noise plate. Flat dark fields show every banding artefact,
   and this is what keeps the page from reading as a plain black rectangle. */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 60;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: overlay;
}

/* --------------------------------------------------------------- masthead */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  padding: clamp(1rem, 2.4vh, 1.75rem) var(--gutter);
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.nav.is-stuck {
  background: rgba(22, 18, 14, 0.82);
  backdrop-filter: saturate(130%) blur(12px);
  -webkit-backdrop-filter: saturate(130%) blur(12px);
  box-shadow: 0 1px 0 var(--hair);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2rem);
  max-width: 1520px;
  margin: 0 auto;
}

.mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  text-decoration: none;
  white-space: nowrap;
}

.mark__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-indent: 0.34em;
}

.mark__rule {
  width: 1px;
  height: 1.05em;
  background: var(--hair-strong);
  transform: translateY(0.12em);
}

.mark__sub {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--taupe);
  text-transform: lowercase;
  font-variant: small-caps;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
  font-size: 0.9rem;
}

.nav__links a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--bone);
  padding-bottom: 2px;
  background-image: linear-gradient(var(--camel), var(--camel));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), color 0.35s ease;
}

.nav__links a:hover { background-size: 100% 1px; color: var(--limestone); }

/* The wordmark plus three links has to survive a 360px screen without
   clipping, so both sides step down together. */
@media (max-width: 780px) {
  .mark__rule, .mark__sub { display: none; }
  .mark__name { font-size: 0.95rem; letter-spacing: 0.2em; text-indent: 0.2em; }
  .nav__links { gap: 1rem; font-size: 0.78rem; }
}

@media (max-width: 400px) {
  .mark__name { font-size: 0.85rem; letter-spacing: 0.15em; text-indent: 0.15em; }
  .nav__links { gap: 0.8rem; font-size: 0.73rem; }
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: clamp(7rem, 17vh, 10rem) var(--gutter) clamp(3rem, 9vh, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}

/* Bottom aligned once there is room for it to look deliberate rather than
   like the content fell down the page. */
@media (min-width: 900px) {
  .hero { align-content: end; }
}

.hero__art {
  position: absolute;
  inset: -8% -14% -12% 10%;
  z-index: -1;
  pointer-events: none;
}

.hero__art::before {
  /* warmth under the massif so the contours emerge from the ground */
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(52% 56% at 62% 44%, rgba(193, 154, 97, 0.15), rgba(193, 154, 97, 0) 70%);
}

.hero__art::after {
  /* keeps the contour field from competing with the headline */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--ink) 1%, rgba(22, 18, 14, 0) 13%),
    linear-gradient(96deg, var(--ink) 4%, rgba(22, 18, 14, 0.88) 24%, rgba(22, 18, 14, 0.12) 60%, rgba(22, 18, 14, 0) 78%);
}

.topo {
  width: 100%;
  height: 100%;
  display: block;
}

.topo path {
  fill: none;
  stroke: var(--camel);
  stroke-width: 0.85;
  opacity: 0.42;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.8s cubic-bezier(0.33, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--i) * 55ms + 150ms);
}

.topo path:nth-child(5n) { stroke: var(--loden); opacity: 0.34; }
.topo path:nth-child(7n) { opacity: 0.24; }

@media (max-width: 900px) {
  /* on a narrow screen the field sits behind the type instead of beside it */
  .hero__art { inset: -6% -34% -4% -6%; }
  .hero__art::after {
    background:
      linear-gradient(180deg, var(--ink) 3%, rgba(22, 18, 14, 0) 26%),
      linear-gradient(90deg, rgba(22, 18, 14, 0.9) 2%, rgba(22, 18, 14, 0.62) 34%, rgba(22, 18, 14, 0.2) 78%, rgba(22, 18, 14, 0) 100%);
  }
  .topo path { opacity: 0.3; }
  .topo path:nth-child(5n) { opacity: 0.24; }
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__body { max-width: min(50rem, 100%); }

.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 1.1rem + 4.6vw, 5.15rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: clamp(1.5rem, 3.4vh, 2.25rem);
  text-wrap: balance;
}

.hero__title span { display: block; }

.hero__lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.72;
  color: var(--bone);
  max-width: 44ch;
}

/* ------------------------------------------------------------ band layout */

.band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
  padding: var(--rhythm) var(--gutter);
  max-width: 1520px;
  margin: 0 auto;
}

.band--rule { border-top: 1px solid var(--hair); }

@media (min-width: 900px) {
  .band { grid-template-columns: minmax(9rem, 2fr) minmax(0, 9fr); }
}

/* the raised ground gives the middle of the page a floor of its own */
.raise { background: var(--ink-raise); border-top: 1px solid var(--hair); }
.raise .band { border-top: 0; }

.band__label {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--camel);
  letter-spacing: 0.01em;
}

.lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.35rem);
  line-height: 1.34;
  letter-spacing: -0.015em;
  max-width: 30ch;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

/* ------------------------------------------------------- closing contact */

/* The one light panel on the page. It reads as a held breath at the end. */
.close {
  background: var(--limestone);
  color: #241e18;
  padding: clamp(5rem, 14vh, 9.5rem) var(--gutter);
}

.close__inner {
  max-width: 1520px;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.close h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--camel-deep);
  margin-bottom: 0.5rem;
}

.close__email {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.close__email a {
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 131, 78, 0.6);
  padding-bottom: 0.08em;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.close__email a:hover { color: var(--camel-deep); border-color: var(--camel-deep); }

/* ---------------------------------------------------------------- sectors */

.sectors { border-top: 1px solid var(--hair); }

.sectors li {
  display: grid;
  gap: 0.35rem 3rem;
  padding: clamp(1.35rem, 3vh, 2rem) 0;
  border-bottom: 1px solid var(--hair);
}

@media (min-width: 720px) {
  .sectors li { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: baseline; }
}

.sectors h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.95rem);
  letter-spacing: -0.01em;
}

.sectors p { color: var(--taupe); max-width: 44ch; }

/* ------------------------------------------------------------------ prose */

.prose { display: grid; gap: 1.25rem; max-width: 58ch; }
.prose p { color: var(--bone); }

/* ----------------------------------------------------------------- footer */

.foot {
  background: var(--ink-deep);
  padding: clamp(3rem, 8vh, 5rem) var(--gutter);
}

.foot__inner {
  max-width: 1520px;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}

.foot__mark {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-indent: 0.34em;
}

.foot__line { color: var(--bone); font-size: 0.95rem; }

.foot__legal {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--taupe);
  max-width: 68ch;
  margin-top: 0.75rem;
}

/* ---------------------------------------------------------- load sequence */

.hero__title span,
.hero__lede {
  opacity: 0;
  transform: translateY(0.75em);
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.25, 1) forwards;
}

.hero__title span:nth-child(1) { animation-delay: 0.15s; }
.hero__title span:nth-child(2) { animation-delay: 0.27s; }
.hero__lede { animation-delay: 0.52s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topo path { animation: none; stroke-dashoffset: 0; }
  .hero__title span,
  .hero__lede { animation: none; opacity: 1; transform: none; }
  * { transition-duration: 0.01ms !important; }
}
