/* =========================================================
   Mark Benveniste — official site
   Refined deep-blue system. One family (Schibsted Grotesk),
   near-black ink, a single deliberate blue for interaction.
   No editorial serif, no gold, no decorative badges.
   ========================================================= */

:root {
  /* surfaces */
  --paper:#ffffff;
  --bg:#f5f6f8;          /* cool light neutral for alternating sections */
  --dark:#0e1116;        /* near-black for inverted sections */
  --dark-2:#161b23;

  /* ink ramp (all AA+ on paper) */
  --ink:#11141a;         /* headings / strong text */
  --body:#3a414d;        /* body copy  ~9:1 */
  --muted:#697180;       /* meta / secondary ~4.6:1 */
  --line:#e5e8 ec;
  --line:#e5e8ec;
  --line-strong:#d3d8df;

  /* the single accent */
  --blue:#1a45c4;        /* links / marks ~6.6:1 on paper */
  --blue-strong:#12318f; /* hover / pressed */
  --blue-tint:#eef1fb;   /* faint fill */

  /* on-dark */
  --on-dark:rgba(255,255,255,.72);
  --on-dark-strong:#ffffff;

  --max:1160px;
  --sans:"Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* z-index scale */
  --z-nav:100;
  --z-nav-panel:110;
  --z-toast:200;

  --ease:cubic-bezier(.22,1,.36,1);   /* ease-out-quint */
}

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

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

body {
  margin:0;
  font-family:var(--sans);
  color:var(--body);
  background:var(--paper);
  line-height:1.6;
  font-size:18px;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

h1,h2,h3,h4 { color:var(--ink); font-weight:700; line-height:1.06; letter-spacing:-.025em; margin:0 0 .4em; text-wrap:balance; }
h1 { font-size:clamp(2.7rem, 6.2vw, 4.75rem); font-weight:800; letter-spacing:-.035em; }
h2 { font-size:clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size:clamp(1.15rem, 1.8vw, 1.35rem); font-weight:600; letter-spacing:-.015em; }
p  { margin:0 0 1.1em; }
strong { color:var(--ink); font-weight:600; }
a { color:var(--blue); text-decoration:none; }
a:hover { color:var(--blue-strong); }
img { max-width:100%; display:block; }

.wrap { max-width:var(--max); margin:0 auto; padding:0 clamp(20px,4vw,40px); }
.lead { font-size:clamp(1.15rem,1.6vw,1.32rem); color:var(--ink); line-height:1.5; text-wrap:pretty; max-width:34ch; }
p { text-wrap:pretty; }
:focus-visible { outline:2.5px solid var(--blue); outline-offset:3px; border-radius:2px; }

/* ---------- Buttons ---------- */
.btn {
  display:inline-flex; align-items:center; gap:.55em; padding:.85em 1.5em; border-radius:8px;
  font-family:inherit; font-weight:600; font-size:1rem; letter-spacing:-.01em; cursor:pointer;
  border:1px solid transparent; transition:background .2s var(--ease), color .2s, border-color .2s, transform .2s var(--ease);
}
.btn svg { width:1.05em; height:1.05em; }
.btn-primary { background:var(--blue); color:#fff; }
.btn-primary:hover { background:var(--blue-strong); color:#fff; transform:translateY(-1px); }
.btn-outline { background:transparent; color:var(--ink); border-color:var(--line-strong); }
.btn-outline:hover { color:var(--ink); border-color:var(--ink); background:#fff; transform:translateY(-1px); }
/* on dark */
.on-dark .btn-primary { background:#fff; color:var(--dark); }
.on-dark .btn-primary:hover { background:#e9ecf2; color:var(--dark); }
.on-dark .btn-outline { color:#fff; border-color:rgba(255,255,255,.32); }
.on-dark .btn-outline:hover { border-color:#fff; background:rgba(255,255,255,.06); color:#fff; }

/* text link with arrow */
.arrow-link { display:inline-flex; align-items:center; gap:.4em; font-weight:600; color:var(--blue); }
.arrow-link svg { width:1em; height:1em; transition:transform .2s var(--ease); }
.arrow-link:hover svg { transform:translateX(3px); }

/* ---------- Header / nav ---------- */
.site-header { position:sticky; top:0; z-index:var(--z-nav); background:rgba(255,255,255,.85); backdrop-filter:saturate(160%) blur(12px); border-bottom:1px solid var(--line); }
.nav { display:flex; align-items:center; justify-content:space-between; height:72px; gap:24px; }
.brand { font-weight:800; font-size:1.15rem; letter-spacing:-.03em; color:var(--ink); }
.brand span { color:var(--ink); }
.nav-links { display:flex; align-items:center; gap:clamp(18px,2.4vw,34px); list-style:none; margin:0; padding:0; }
.nav-links a { font-size:.98rem; font-weight:500; letter-spacing:-.01em; color:var(--muted); position:relative; transition:color .2s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color:var(--ink); }
/* animated underline: wipes in from the left on hover, stays for active page */
.nav-links a:not(.nav-cta)::after {
  content:""; position:absolute; left:0; right:0; bottom:-7px; height:2px; border-radius:2px;
  background:var(--blue); transform:scaleX(0); transform-origin:left;
  transition:transform .28s var(--ease);
}
.nav-links a:not(.nav-cta):hover::after,
.nav-links a[aria-current="page"]::after { transform:scaleX(1); }
.nav-cta { display:inline-flex; align-items:center; background:var(--ink); color:#fff !important; padding:.55em 1.15em; border-radius:8px; font-weight:600; font-size:.95rem; }
.nav-cta::after { display:none !important; }
.nav-cta:hover { background:var(--blue); }
.nav-toggle { display:none; flex-direction:column; gap:5px; background:none; border:0; cursor:pointer; padding:10px; margin:-10px; }
.nav-toggle span { display:block; width:24px; height:2px; background:var(--ink); border-radius:2px; transition:transform .28s var(--ease), opacity .2s; transform-origin:center; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity:0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

/* ---------- Section rhythm ---------- */
section.block { padding:clamp(64px,9vw,120px) 0; }
section.tint { background:var(--bg); }
.section-head { max-width:660px; margin-bottom:clamp(36px,5vw,60px); }
.section-head .lead { margin-top:.6em; max-width:52ch; }
.kicker { display:inline-flex; align-items:center; gap:.6em; font-size:.9rem; font-weight:600; color:var(--blue); margin:0 0 1rem; letter-spacing:-.01em; }
.kicker::before { content:""; width:26px; height:2px; background:var(--blue); }

/* ---------- Hero (light, editorial scale) ---------- */
.hero { padding:clamp(56px,8vw,104px) 0 clamp(48px,6vw,84px); border-bottom:1px solid var(--line); }
.hero .wrap { display:grid; grid-template-columns:1.25fr .9fr; gap:clamp(40px,6vw,80px); align-items:center; }
.hero h1 { margin-bottom:.28em; }
.hero .lead { max-width:42ch; color:var(--body); font-size:clamp(1.15rem,1.5vw,1.3rem); }
.hero .lead strong { color:var(--ink); }
.hero-actions { display:flex; gap:14px; flex-wrap:wrap; margin-top:2rem; }
.hero-figure { position:relative; justify-self:end; width:100%; max-width:420px; }
.hero-figure img { width:100%; aspect-ratio:5/6; object-fit:cover; object-position:50% 30%; border-radius:14px; }
.hero-figure figcaption { margin-top:14px; font-size:.9rem; color:var(--muted); display:flex; align-items:center; gap:.55em; }
.hero-figure figcaption b { color:var(--ink); font-weight:600; }
.hero-figure figcaption::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--blue); flex:none; }

/* ---------- Trust / logos ---------- */
.trust .wrap { display:flex; align-items:center; gap:clamp(24px,4vw,48px); padding:26px clamp(20px,4vw,40px); flex-wrap:wrap; border-bottom:1px solid var(--line); }
.trust .label { font-size:.82rem; font-weight:600; color:var(--muted); letter-spacing:-.01em; }
.trust-logos { display:flex; align-items:center; gap:clamp(20px,3vw,40px); flex-wrap:wrap; }
.trust-logos img { height:42px; width:auto; border-radius:6px; filter:grayscale(1); opacity:.82; transition:opacity .2s, filter .2s; }
.trust-logos img:hover { filter:grayscale(0); opacity:1; }

/* ---------- Metrics (hairline figure row, no cards) ---------- */
.metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:0; border-top:1px solid var(--line); }
.metric { padding:clamp(24px,3vw,36px) 28px clamp(24px,3vw,36px) 0; border-right:1px solid var(--line); }
.metric:last-child { border-right:0; padding-right:0; }
.metric .num { font-size:clamp(2.4rem,4vw,3.2rem); font-weight:800; letter-spacing:-.04em; color:var(--ink); line-height:1; }
.metric .num em { font-style:normal; color:var(--blue); }
.metric .label { margin-top:.7em; font-size:.95rem; color:var(--muted); line-height:1.4; }

/* ---------- Focus areas (typographic columns, no icon boxes) ---------- */
.focus { display:grid; grid-template-columns:repeat(3,1fr); gap:clamp(28px,3.5vw,48px); }
.focus-item { padding-top:22px; border-top:2px solid var(--ink); }
.focus-item h3 { margin-bottom:.5em; }
.focus-item p { margin:0; color:var(--body); font-size:1rem; }

/* ---------- Split ---------- */
.split { display:grid; grid-template-columns:1fr 1fr; gap:clamp(40px,6vw,80px); align-items:center; }

/* ---------- Pull quote (no side stripe) ---------- */
.pullquote { margin:0; }
.pullquote p { font-size:clamp(1.6rem,3vw,2.35rem); font-weight:600; line-height:1.22; letter-spacing:-.025em; color:var(--ink); text-wrap:balance; margin:0; }
.pullquote .mark { display:block; font-size:2.4rem; line-height:0; color:var(--blue); height:.5em; }
.pullquote cite { display:block; margin-top:1.2em; font-style:normal; font-size:.95rem; color:var(--muted); }

/* ---------- Timeline ---------- */
.timeline { margin:0; padding:0; list-style:none; }
.timeline li { position:relative; padding:0 0 clamp(28px,3vw,40px) 34px; border-left:1px solid var(--line-strong); }
.timeline li:last-child { padding-bottom:0; }
.timeline .dot { position:absolute; left:-5px; top:5px; width:9px; height:9px; border-radius:50%; background:var(--blue); box-shadow:0 0 0 4px var(--paper); }
.timeline.on-tint .dot { box-shadow:0 0 0 4px var(--bg); }
.timeline .role { font-size:1.2rem; font-weight:700; letter-spacing:-.02em; color:var(--ink); }
.timeline .org { font-weight:600; color:var(--body); font-size:1rem; }
.timeline .meta { font-size:.85rem; color:var(--muted); margin:3px 0 8px; }
.timeline p { font-size:.98rem; margin:0; color:var(--body); }

/* ---------- Pills ---------- */
.pills { display:flex; flex-wrap:wrap; gap:10px; margin:0; padding:0; list-style:none; }
.pills li { border:1px solid var(--line-strong); border-radius:999px; padding:.5em 1em; font-size:.92rem; color:var(--ink); font-weight:500; }

/* ---------- Insight cards (clickable, no gradient thumb) ---------- */
.posts { display:grid; grid-template-columns:repeat(3,1fr); gap:clamp(20px,2.5vw,28px); }
.post { position:relative; display:flex; flex-direction:column; padding:28px; background:var(--paper); border:1px solid var(--line); border-radius:14px; transition:border-color .2s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.post:hover { border-color:var(--line-strong); box-shadow:0 12px 40px rgba(17,20,26,.08); transform:translateY(-3px); }
.post .tag { font-size:.82rem; font-weight:600; color:var(--blue); margin-bottom:auto; }
.post h3 { margin:14px 0 .4em; }
.post h3 a { color:var(--ink); }
.post .post-link { position:absolute; inset:0; }        /* stretched link → whole card clickable */
.post p { font-size:.97rem; color:var(--body); margin:0 0 18px; }
.post .more { font-weight:600; font-size:.94rem; color:var(--blue); display:inline-flex; align-items:center; gap:.4em; }
.post .more svg { width:1em; height:1em; flex:none; transition:transform .2s var(--ease); }
.post:hover .more { color:var(--blue-strong); }
.post:hover .more svg { transform:translateX(3px); }

/* ---------- CTA band ---------- */
.cta-band { background:var(--dark); color:var(--on-dark); text-align:center; }
.cta-band h2 { color:#fff; }
.cta-band p { color:var(--on-dark); max-width:52ch; margin-inline:auto; }
.cta-actions { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-top:26px; }

/* ---------- Education rows ---------- */
.edu-row { display:flex; gap:20px; align-items:center; padding:22px 0; border-top:1px solid var(--line); }
.edu-row:last-child { border-bottom:1px solid var(--line); }
.edu-row img { height:52px; width:52px; object-fit:contain; border-radius:8px; flex:none; }
.edu-row h3 { margin:0 0 2px; }
.edu-row p { margin:0; font-size:.96rem; color:var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.contact-card { padding:28px; border:1px solid var(--line); border-radius:14px; }
.contact-card h3 { margin:0 0 6px; }
.contact-card p, .contact-card a { margin:0; font-size:1rem; }
.contact-card .muted { color:var(--muted); font-size:.92rem; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero { padding:clamp(56px,7vw,96px) 0 clamp(36px,4vw,52px); border-bottom:1px solid var(--line); }
.page-hero h1 { font-size:clamp(2.3rem,4.4vw,3.6rem); }   /* calmer than the homepage hero, fits long article titles */
.page-hero p, .page-hero .lead { color:var(--body); max-width:60ch; margin-top:.4em; }
.breadcrumb { font-size:.88rem; color:var(--muted); margin-bottom:18px; }
.breadcrumb a { color:var(--muted); }
.breadcrumb a:hover { color:var(--ink); }
.breadcrumb .sep { padding:0 .5em; color:var(--line-strong); }

/* ---------- Prose ---------- */
.prose { max-width:72ch; }
/* When .prose shares the container with .wrap, keep the section full-width
   and left-aligned, capping only the text children for readability. */
.wrap.prose { max-width:var(--max); }
.wrap.prose > * { max-width:72ch; }
.prose h2 { margin-top:1.8em; }
.prose h3 { margin-top:1.5em; }
.prose p, .prose li { color:var(--body); }
.prose ul { padding-left:1.15em; }
.prose li { margin-bottom:.5em; }
.prose li::marker { color:var(--blue); }

/* ---------- Blog listing / article ---------- */
.article { max-width:72ch; margin:0; }   /* left-aligned to match the page hero */
.article-meta { font-size:.88rem; color:var(--muted); margin-bottom:12px; }
.byline { display:flex; align-items:center; gap:12px; margin:28px 0 10px; padding-top:26px; border-top:1px solid var(--line); }
.byline img { width:48px; height:48px; border-radius:50%; object-fit:cover; }
.byline strong { color:var(--ink); display:block; font-size:1rem; }
.byline span { font-size:.88rem; color:var(--muted); }
.article-cta { margin-top:44px; padding:32px; background:var(--bg); border:1px solid var(--line); border-radius:14px; }
.article-cta p { margin:0 0 8px; }
.post-nav { display:flex; justify-content:space-between; gap:16px; margin-top:48px; padding-top:26px; border-top:1px solid var(--line); font-size:.96rem; flex-wrap:wrap; }

/* ---------- Footer ---------- */
.site-footer { background:var(--dark); color:var(--on-dark); padding:clamp(48px,6vw,72px) 0 28px; font-size:.95rem; }
.footer-top { display:grid; grid-template-columns:2fr 1fr 1fr; gap:40px; padding-bottom:36px; border-bottom:1px solid rgba(255,255,255,.12); }
.footer-top .brand { color:#fff; font-size:1.25rem; display:inline-block; margin-bottom:12px; }
.site-footer h4 { color:#fff; font-size:.82rem; letter-spacing:.02em; font-weight:600; margin:0 0 16px; text-transform:none; }
.site-footer ul { list-style:none; margin:0; padding:0; }
.site-footer li { margin-bottom:10px; }
.site-footer a { color:var(--on-dark); }
.site-footer a:hover { color:#fff; }
.footer-bottom { padding-top:22px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:.85rem; color:rgba(255,255,255,.5); }

/* ---------- Utilities ---------- */
.center { text-align:center; }
.mt-cta { margin-top:clamp(28px,4vw,44px); }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); border:0; }

/* ---------- Responsive ---------- */
@media (max-width:900px) {
  .hero .wrap { grid-template-columns:1fr; gap:40px; }
  .hero-figure { justify-self:start; max-width:340px; order:-1; }
  .split, .contact-grid, .footer-top { grid-template-columns:1fr; gap:32px; }
  .focus, .posts { grid-template-columns:1fr; }
  .metrics { grid-template-columns:1fr 1fr; }
  .metric { border-right:0; border-bottom:1px solid var(--line); padding:22px 0; }
  .metric:nth-child(odd) { padding-right:24px; border-right:1px solid var(--line); }
  .metric:last-child, .metric:nth-last-child(2) { border-bottom:0; }

  /* nav → dropdown panel */
  .nav-toggle { display:flex; }
  .nav-links {
    position:fixed; inset:72px 0 auto 0; z-index:var(--z-nav-panel);
    flex-direction:column; align-items:stretch; gap:2px;
    background:var(--paper); border-bottom:1px solid var(--line);
    padding:12px clamp(20px,4vw,40px) 22px;
    box-shadow:0 24px 40px rgba(17,20,26,.12);
    transform:translateY(-118%); transition:transform .32s var(--ease); will-change:transform;
  }
  .nav-links.open { transform:translateY(0); }
  .nav-links li { width:100%; }
  .nav-links > li > a:not(.nav-cta) { display:block; padding:14px 4px; font-size:1.05rem; color:var(--ink); border-bottom:1px solid var(--line); }
  .nav-links a::after { display:none !important; }
  .nav-cta { align-self:flex-start; margin-top:14px; padding:.7em 1.4em; font-size:1rem; }
}
@media (max-width:520px) {
  body { font-size:17px; }
  .metrics { grid-template-columns:1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}
