/* =========================================================
   Marks Law — shared styles
   Classic, restrained palette (Paul Weiss / Ropes Gray cues)
   Branding (fonts/logo) is placeholder — finalize later.
   ========================================================= */

:root {
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Public Sans", system-ui, -apple-system, sans-serif;

  --bg: #ffffff;
  --bg-2: #f4f6fa;
  --bg-3: #eef1f7;
  --ink: #16223f;       /* near-black navy for headings */
  --ink-2: #3c4a68;     /* body text */
  --mute: #6e788c;      /* secondary */
  --rule: #e1e6f0;      /* hairlines */
  --rule-2: #d3dae8;
  --navy: #1b2c52;      /* primary brand */
  --accent: #2b5cc4;    /* link / hover blue */
  --accent-ink: #1a3f8f;
  --card: #ffffff;
  --shadow: 0 1px 0 rgba(22,34,63,.04), 0 22px 50px -28px rgba(22,34,63,.22);
  --shadow-lift: 0 1px 0 rgba(22,34,63,.05), 0 30px 60px -24px rgba(22,34,63,.30);
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .18s ease; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.eyebrow {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.serif { font-family: var(--font-display); }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 25px;
  letter-spacing: .01em;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 11px;
}
.wordmark .crest {
  width: 30px; height: 30px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-size: 14px; font-weight: 600; letter-spacing: 0;
  font-family: var(--font-display);
  transition: background .2s ease, color .2s ease;
}
.wordmark:hover .crest { background: var(--navy); color: #fff; }
.wordmark:hover { color: var(--accent); }

.nav-links { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  position: relative; padding: 6px 0; letter-spacing: .005em;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 2px; background: var(--accent); transition: right .22s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { right: 0; }
.nav-links a.active { color: var(--navy); }
.nav-links a.active::after { right: 0; background: var(--navy); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; font-size: 14px; font-weight: 600;
  font-family: var(--font-sans); cursor: pointer;
  border-radius: 2px; transition: background .2s, color .2s, border-color .2s, transform .15s;
  border: 1px solid transparent;
}
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--rule-2); }
.btn-ghost:hover { border-color: var(--navy); color: var(--accent); }

/* ---------------- Page header band ---------------- */
.page-head {
  background: var(--navy);
  color: #fff;
  padding: 88px 0 76px;
  position: relative;
  overflow: hidden;
}
.page-head::after {
  content: ""; position: absolute; right: -120px; top: -60px;
  width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
}
.page-head::before {
  content: ""; position: absolute; right: -40px; bottom: -160px;
  width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}
.page-head .eyebrow { color: #9db4e6; }
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02; letter-spacing: -.015em;
  margin: 14px 0 0; color: #fff;
  max-width: 14ch;
}
.page-head p.lede {
  margin: 20px 0 0; max-width: 60ch; font-size: 18px;
  color: #c8d4ec; text-wrap: pretty;
}

/* ---------------- Sections ---------------- */
section.band { padding: 96px 0; }
section.band.alt { background: var(--bg-2); }
.section-head h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.05;
  letter-spacing: -.015em; color: var(--ink); margin: 8px 0 0;
}
.section-head { margin-bottom: 48px; max-width: 70ch; }
.section-head p { font-size: 17px; color: var(--ink-2); margin: 16px 0 0; }

/* ---------------- Footer ---------------- */
footer.site-foot {
  background: var(--ink);
  color: #aeb9d0;
  padding: 72px 0 40px;
  font-size: 14px;
}
.foot-top {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.10);
}
.foot-top .wordmark { color: #fff; }
.foot-top .wordmark .crest { border-color: rgba(255,255,255,.5); color: #fff; }
.foot-blurb { margin: 18px 0 0; max-width: 42ch; color: #97a3bd; line-height: 1.65; }
.foot-col h5 {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: #7e8cab; margin: 0 0 16px; font-weight: 600;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { padding: 6px 0; }
.foot-col a:hover { color: #fff; }

.foot-disclaimer {
  padding: 32px 0 0; font-size: 12px; line-height: 1.7; color: #7e8aa6;
  max-width: 100ch;
}
.foot-bottom {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
  align-items: center; margin-top: 28px;
}
.foot-bottom .terms-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,.22); color: #cdd6ea;
  padding: 10px 18px; border-radius: 2px; font-size: 13px; font-weight: 500;
}
.foot-bottom .terms-btn:hover { background: #fff; color: var(--ink); border-color: #fff; }
.foot-copy { font-size: 12px; color: #6c7894; letter-spacing: .02em; }

/* ---------------- Email disclaimer modal ---------------- */
.modal-veil {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(16,22,40,.55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-veil.open { display: flex; }
.modal {
  background: #fff; width: min(560px, 100%); border-radius: 4px;
  box-shadow: var(--shadow-lift); padding: 40px 40px 32px;
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal .eyebrow { color: var(--accent); }
.modal h3 {
  font-family: var(--font-display); font-weight: 500; font-size: 26px;
  color: var(--ink); margin: 10px 0 16px; letter-spacing: -.01em;
}
.modal p { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); margin: 0 0 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------------- Password gate ---------------- */
#pw-gate {
  position: fixed; inset: 0; z-index: 9999; background: var(--navy);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans);
}
#pw-gate .panel { width: min(420px, 90vw); text-align: center; padding: 40px 32px; }
#pw-gate .mark { font-family: var(--font-display); font-size: 40px; font-weight: 500; margin: 0 0 6px; }
#pw-gate .sub { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: #9db4e6; margin: 0 0 30px; }
#pw-gate input {
  width: 100%; padding: 14px 16px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22); color: #fff; border-radius: 3px;
  font-size: 15px; text-align: center; letter-spacing: .12em; font-family: inherit;
}
#pw-gate input:focus { outline: none; border-color: #9db4e6; }
#pw-gate button {
  margin-top: 13px; width: 100%; padding: 14px 22px; background: #fff; color: var(--navy);
  border: 0; border-radius: 3px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background .2s;
}
#pw-gate button:hover { background: #cdd6ea; }
#pw-gate .err { color: #ffb3b3; font-size: 12px; margin-top: 12px; letter-spacing: .04em; min-height: 16px; }
body.locked { overflow: hidden; }
body.locked > *:not(#pw-gate) { filter: blur(9px); pointer-events: none; user-select: none; }

/* ---------------- Utilities ---------------- */
/* Reveal is progressive enhancement: content is visible by default, and only
   hidden (for the entrance animation) once JS confirms it's running by adding
   `js` to <html>. If JS is absent or the observer never fires, content stays
   visible — never blank. */
.reveal { transition: opacity .7s ease, transform .7s ease; }
html.js .reveal { opacity: 0; transform: translateY(16px); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .wrap { padding: 0 22px; }
  .nav-inner { height: 64px; }
  .wordmark { font-size: 21px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--rule);
    flex-direction: column; gap: 0; align-items: stretch;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links a { padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .nav-links a::after { display: none; }
  section.band { padding: 64px 0; }
  .page-head { padding: 60px 0 52px; }
  .foot-top { grid-template-columns: 1fr; gap: 32px; }
  .modal { padding: 28px 24px 24px; }
}
