/* ==========================================================================
   Muneris — site styles
   All colour comes from the tokens in brand.css. Nothing here hard-codes a
   brand colour except the three-segment accent rule, which quotes the symbol.
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

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

/* --- Layout primitives ---------------------------------------------------- */
.wrap {
  width: min(100% - (var(--gutter) * 2), 1140px);
  margin-inline: auto;
}
.wrap--narrow { width: min(100% - (var(--gutter) * 2), 780px); }

.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }
.section--dark { background: var(--deep); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: var(--on-dark-muted); }
.section--dark a { color: var(--accent-on-dark); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--deep); color: #fff; padding: .75rem 1.25rem;
}
.skip-link:focus { left: 0; }

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3, h4 {
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }

p, li { max-width: var(--measure); text-wrap: pretty; }
p + p { margin-top: 1em; }
h2 + p, h3 + p, h3 + ul, h3 + ol { margin-top: .7rem; }

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-muted);
  font-weight: 400;
}
.section--dark .lede { color: var(--on-dark-muted); }

.eyebrow {
  display: block;
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: var(--eyebrow-spacing);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .85rem;
}
.section--dark .eyebrow { color: var(--accent-on-dark); }

/* The symbol's three colours, used as a rule. The brand device of the site. */
.rule {
  display: flex; width: 84px; height: 4px; border-radius: 2px;
  overflow: hidden; margin-bottom: 1.5rem;
}
.rule::before, .rule::after, .rule i { content: ""; flex: 1; }
.rule::before { background: var(--brand-cyan); }
.rule i       { background: var(--brand-orange); }
.rule::after  { background: var(--brand-slate); }
.section--dark .rule::after { background: var(--on-dark-muted); }

.section-head { margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.25rem); }
.section-head p { margin-top: .9rem; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .82rem 1.55rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease,
              border-color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }

/* Brand orange carries the primary action. Ink type on it reads at 5.54:1 —
   white would only manage 2.35:1, so the label is deliberately dark. */
.btn--primary { background: var(--brand-orange); color: var(--ink); }
.btn--primary:hover { background: #F97C25; color: var(--ink); }

.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.section--dark .btn--ghost,
.cta .btn--ghost { border-color: var(--slate-soft); color: #fff; }
.section--dark .btn--ghost:hover,
.cta .btn--ghost:hover { border-color: var(--brand-cyan); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.btn-row--center { justify-content: center; }

/* --- Site header ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 76px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 38px; width: auto; }
.site-footer .brand img { height: 42px; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav a {
  font-size: var(--step--1);
  font-weight: 550;
  color: var(--text-muted);
  text-decoration: none;
  padding-block: .35rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"]:not(.btn) {
  color: var(--ink); border-bottom-color: var(--brand-orange);
}
.nav .btn, .nav .btn:hover, .nav .btn[aria-current="page"] { color: var(--ink); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: .5rem .7rem; cursor: pointer; color: var(--ink);
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    box-shadow: var(--shadow);
  }
  .nav[hidden] { display: none; }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"]:not(.btn) {
    border-bottom-color: var(--line); color: var(--accent);
  }
  .nav .btn { margin-top: 1rem; justify-content: center; border-bottom: 0; }
}

/* --- Hero ----------------------------------------------------------------- */
/* Light, on the brand's own ground, with the symbol's colours as soft light. */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(680px 380px at 88% -8%,  rgba(81, 200, 232, .38), transparent 68%),
    radial-gradient(560px 360px at 62% 108%, rgba(255, 138, 61, .20), transparent 66%),
    var(--surface);
  padding-block: clamp(4rem, 3rem + 6vw, 8rem);
  border-bottom: 1px solid var(--line);
}
.hero h1 { max-width: 18ch; }
.hero .lede { margin-top: 1.35rem; max-width: 56ch; }
.hero .wrap { position: relative; z-index: 1; }

/* Homepage only: the symbol as a large, quiet watermark. */
.hero--home::after {
  content: "";
  position: absolute; right: -3%; top: 50%; translate: 0 -50%;
  width: min(420px, 34vw); aspect-ratio: 256 / 272;
  background: url("../img/muneris-symbol.png") center / contain no-repeat;
  opacity: .16;
  pointer-events: none;
}
@media (max-width: 900px) { .hero--home::after { display: none; } }

/* --- Stat strip ----------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { background: var(--bg); padding: 1.75rem var(--gutter); }
.stat__value {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat__label {
  margin-top: .35rem;
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* --- Cards ---------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1rem, .6rem + 1.4vw, 1.6rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

.card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.15rem);
  display: flex; flex-direction: column;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
a.card { text-decoration: none; color: inherit; }
a.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow); transform: translateY(-2px);
}
.card__num {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .08em;
  margin-bottom: .9rem;
}
/* Diamond marker, cycling the symbol's three colours across the grid. */
.card__mark {
  display: block; width: .68rem; height: .68rem;
  margin-bottom: 1rem; border-radius: 1px;
  transform: rotate(45deg);
  background: var(--brand-cyan);
}
.grid > *:nth-child(3n+2) .card__mark { background: var(--brand-orange); }
.grid > *:nth-child(3n+3) .card__mark { background: var(--brand-slate); }

.card h3 { margin-bottom: .6rem; }
.card p { color: var(--text-muted); font-size: var(--step-0); }

/* Category label at the head of an engagement card. */
.card__tag {
  align-self: start;
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: var(--eyebrow-spacing);
  text-transform: uppercase;
  color: var(--accent);
  padding: .25rem .7rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
}

/* Sector / context line at the foot of an engagement card. */
.card__meta {
  margin-top: auto; padding-top: 1.25rem;
  font-size: var(--step--1); font-weight: 600;
  color: var(--accent-warm);
}
.section--dark .card__meta { color: var(--brand-orange); }
.card__link {
  margin-top: auto; padding-top: 1.25rem;
  font-size: var(--step--1); font-weight: 650; color: var(--accent-warm);
}
a.card:hover .card__link { color: var(--accent-deep); }
.section--dark .card {
  background: rgba(255, 255, 255, .05);
  border-color: var(--slate-soft);
}
.section--dark .card p { color: var(--on-dark-muted); }
.section--dark .card__num { color: var(--accent-on-dark); }

/* --- Feature list --------------------------------------------------------- */
.ticks { list-style: none; padding: 0; display: grid; gap: .8rem; }
.ticks li {
  position: relative; padding-left: 1.85rem; color: var(--text-muted);
}
.ticks li::before {
  content: ""; position: absolute; left: .15rem; top: .5em;
  width: .42rem; height: .78rem;
  border-right: 2px solid var(--brand-orange);
  border-bottom: 2px solid var(--brand-orange);
  transform: rotate(42deg);
}
.section--dark .ticks li { color: var(--on-dark-muted); }
.section--dark .ticks li::before { border-color: var(--brand-cyan); }

/* --- Split (text + aside) ------------------------------------------------- */
.split {
  display: grid; gap: clamp(2rem, 1.2rem + 3vw, 4rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.15rem);
}
.section--surface .panel { background: var(--bg); }
.panel h3 { margin-bottom: 1rem; }

/* --- Track record --------------------------------------------------------- */
.record { list-style: none; padding: 0; display: grid; gap: 0; }
.record li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  max-width: none;
}
.record li:last-child { border-bottom: 1px solid var(--line); }
.record__when {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-muted);
  letter-spacing: .02em;
  padding-top: .2rem;
}
.record__what h3 { font-size: var(--step-0); font-weight: 650; }
.record__what .org { color: var(--accent); font-weight: 650; }
.record__what p { margin-top: .45rem; color: var(--text-muted); font-size: var(--step-0); }
@media (max-width: 620px) {
  .record li { grid-template-columns: 1fr; gap: .4rem; }
}

/* --- Pull quote ----------------------------------------------------------- */
.pull {
  border-left: 4px solid var(--brand-orange);
  padding-left: clamp(1.25rem, 1rem + 1vw, 2rem);
  font-size: var(--step-2);
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--ink);
  max-width: 24ch;
}
.section--dark .pull { border-color: var(--brand-cyan); color: #fff; }

/* --- Etymology note ------------------------------------------------------- */
.etymology {
  margin-top: 1.6rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--brand-cyan);
  color: var(--text-muted);
  font-size: var(--step-0);
}
.etymology strong { color: var(--ink); font-weight: 650; }

/* --- Tag list ------------------------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.tags li {
  font-size: var(--step--1);
  padding: .3rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--bg);
  max-width: none;
}
.section--dark .tags li {
  border-color: var(--slate-soft); color: var(--on-dark-muted); background: transparent;
}

/* --- Contact -------------------------------------------------------------- */
.contact-list { list-style: none; padding: 0; display: grid; gap: 1.5rem; }
.contact-list dt, .contact-list .label {
  font-size: var(--step--1);
  letter-spacing: var(--eyebrow-spacing);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .3rem;
}
.contact-list .value { font-size: var(--step-1); font-weight: 600; color: var(--ink); }
.contact-list .value a { text-decoration: none; }
.contact-list .value a:hover { text-decoration: underline; }

.field { display: grid; gap: .4rem; margin-bottom: 1.15rem; }
.field label { font-size: var(--step--1); font-weight: 650; color: var(--ink); }
.field input, .field textarea, .field select {
  font: inherit;
  font-size: var(--step-0);
  padding: .7rem .85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(23, 117, 143, .2);
  outline-offset: 0;
}
.field textarea { min-height: 9rem; resize: vertical; }
.form-note { font-size: var(--step--1); color: var(--text-muted); margin-top: 1rem; }

/* --- CTA band ------------------------------------------------------------- */
.cta {
  background: var(--deep);
  color: var(--on-dark);
  padding-block: clamp(3rem, 2.2rem + 3vw, 5rem);
}
.cta h2 { color: #fff; }
.cta p { color: var(--on-dark-muted); margin-top: .9rem; }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--deep);
  color: var(--on-dark-muted);
  padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) 2rem;
  font-size: var(--step--1);
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg,
      var(--brand-cyan) 0 33.33%,
      var(--brand-orange) 33.33% 66.66%,
      var(--brand-slate) 66.66% 100%) 1;
}
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--slate-soft);
}
.footer-grid h4 {
  color: #fff; font-size: var(--step--1);
  letter-spacing: var(--eyebrow-spacing); text-transform: uppercase;
  margin-bottom: .9rem; font-weight: 650;
}
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.footer-grid p { color: var(--on-dark-muted); max-width: 34ch; margin-top: 1rem; }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem;
  justify-content: space-between; padding-top: 1.5rem;
}
.footer-legal p { max-width: none; }

/* --- Utilities ------------------------------------------------------------ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mt-2 { margin-top: 2rem; }
.center { text-align: center; margin-inline: auto; }
.center p { margin-inline: auto; }
.center .rule { margin-inline: auto; }

/* --- Reveal on scroll ----------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .6s ease;
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .btn:hover, a.card:hover { transform: none; }
}

/* --- Print ---------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .cta, .btn-row { display: none; }
  body { color: #000; }
}
