/*
 * Saleleni site design (v2): light, editorial, amber. SHARED by every page.
 *
 * Tokens, base resets, header, mobile menu, pill buttons, section headings, dark and amber bands, and the
 * footer. Page-specific styles live in home.css (homepage) and inner.css (Insights, articles, 404, privacy).
 * Every class is prefixed `sl-`. The few unprefixed hooks (`is-*`, `hamburger`, `mobile-nav-overlay`,
 * `skip-to-content`, `form-*`) are what main.js, form.js and WordPress itself look for.
 */

/* ---------- Tokens ---------- */
:root {
  --paper:     #F6F6F4;   /* page background: neutral light grey, not cream */
  --mist:      #ECEBE5;   /* slightly deeper panel */
  --ink:       #000000;
  --graphite:  #45464A;   /* body copy */
  --stone:     #6E6F73;   /* captions */
  --rule:      #D6D6D2;   /* hairlines */
  --amber:     #F8A61E;   /* brand amber: fills and big display type only (1.9:1 on paper); black on top is 10:1 */
  --amber-ink: #B35F00;   /* deeper tone of the same hue for small text, hover links and focus rings (4.3:1) */
  --tick:      #1FA89A;   /* dash markers, from the old site */

  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 5vw, 48px);
  --section: clamp(88px, 12vw, 168px);
  --sheet-r: clamp(32px, 6vw, 96px);   /* rounded top corners of the black bands */
  --header-h: 72px;
  --mist:      #ECEBE5;   /* slightly deeper panel */
}


/* ---------- Base (scoped to the .sl-site wrapper) ---------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.sl-body { margin: 0; background: var(--paper); }
.sl-site, .sl-site *, .sl-site *::before, .sl-site *::after { box-sizing: border-box; }
.sl-site {
  color: var(--ink); font-family: var(--font); font-size: 1.125rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
/* Resets against GeneratePress's element rules (ul bullets, h1..h3 sizes and margins, p margins, blockquote border,
   button and link colours). Each is `.sl-site :where(...)`, i.e. specificity (0,1,0): it beats GeneratePress's
   element selectors (0,0,1) but is beaten by any component class that comes after it. */
.sl-site :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd) { margin: 0; padding: 0; }
.sl-site :where(ul, ol) { list-style: none; }
.sl-site :where(h1, h2, h3, h4, h5, h6) { font-family: var(--font); font-size: 1em; font-weight: 800; line-height: 1.15; text-transform: none; }
.sl-site :where(blockquote) { border: 0; font-size: inherit; font-style: normal; }
.sl-site :where(cite) { font-style: normal; }
.sl-site :where(img) { display: block; max-width: 100%; height: auto; }
.sl-site :where(a) { color: inherit; text-decoration: none; }
.sl-site :where(a):is(:hover, :focus, :active) { color: inherit; }
.sl-site :where(button, input, select, textarea) { font-family: inherit; }
.sl-site :where(button) { padding: 0; border: 0; background: none; color: inherit; }
.sl-site :where(:focus-visible) { outline: 2px solid var(--amber-ink); outline-offset: 3px; border-radius: 4px; }
/* Belt and braces: every list we use is bullet-free even if a plugin or GeneratePress changes its list rules. */
.sl-nav__list, .sl-mobile-list, .sl-proof, .sl-ticks, .sl-steps, .sl-checklist__list, .sl-next, .sl-footer ul { list-style: none; }
.sl-nav__list li, .sl-mobile-list li, .sl-proof li, .sl-ticks li, .sl-steps li, .sl-checklist__list li, .sl-next li, .sl-footer li { list-style: none; }
.sl-site [id] { scroll-margin-top: calc(var(--header-h) + 24px); }
.sl-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-to-content {
  position: absolute; top: -100px; left: 16px; z-index: 2000; padding: 12px 20px;
  background: var(--amber); color: #000; font-weight: 700; text-decoration: none; border-radius: 0 0 10px 10px;
}
.skip-to-content:focus { top: 0; }


/* ---------- Header ---------- */
.sl-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 246, 244, 0.94);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--rule);
}
.admin-bar .sl-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .sl-header { top: 46px; } }
.sl-header .sl-wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.sl-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(0, 0, 0, .35); }
.sl-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.sl-brand img { width: 32px; height: 32px; }
.sl-nav { display: flex; align-items: center; gap: 32px; }
.sl-nav__list { display: flex; align-items: center; gap: 32px; }
.sl-nav__list a { text-decoration: none; font-size: 0.9375rem; font-weight: 500; color: var(--graphite); padding: 6px 0; }
.sl-nav__list a:hover, .sl-nav__list a.active { color: var(--ink); }
.sl-nav__list a.active { box-shadow: 0 2px 0 var(--ink); }

/* Hamburger + full-screen menu (small screens). main.js toggles `is-open` and aria-expanded. */
.hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; background: none; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s ease, opacity .25s ease; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav-overlay {
  position: fixed; inset: calc(var(--header-h) + 1px) 0 0 0; z-index: 99;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 24px var(--gutter) 40px; background: var(--paper);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.admin-bar .mobile-nav-overlay { inset-block-start: calc(var(--header-h) + 33px); }
.mobile-nav-overlay.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease; }
.sl-mobile-list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: clamp(1.75rem, 7vw, 2.5rem); font-weight: 900; letter-spacing: -0.03em; }


/* ---------- Pill button (from the old site) ---------- */
.sl-pill {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 10px 10px 10px 26px; min-height: 56px;
  border: 2px solid var(--ink); border-radius: 999px;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  text-decoration: none; color: var(--ink); background: transparent;
  transition: background-color .2s ease, color .2s ease;
}
.sl-pill__icon {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--paper); transition: background-color .2s ease;
}
.sl-pill__icon svg { width: 14px; height: 14px; }
.sl-pill:hover { background: var(--ink); color: var(--paper); }
.sl-pill:hover .sl-pill__icon { background: var(--amber); color: var(--ink); }
/* Primary: the one solid amber button per screen */
.sl-pill--primary { background: var(--amber); border-color: var(--amber); }
.sl-pill--primary:hover { background: var(--ink); border-color: var(--ink); }
.sl-pill--small { min-height: 44px; padding: 6px 6px 6px 18px; gap: 12px; font-size: 0.75rem; }
.sl-pill--small .sl-pill__icon { width: 28px; height: 28px; }

.sl-text-link {
  font-weight: 700; font-size: 1rem; text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.sl-text-link:hover { color: var(--amber-ink); }


.sl-pill--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sl-pill--ink .sl-pill__icon { background: var(--amber); color: var(--ink); }
.sl-pill--ink:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.sl-pill--ink:hover .sl-pill__icon { background: var(--ink); color: var(--amber); }

/* ---------- Section headings (old-site uppercase heavy) ---------- */
.sl-section { padding: calc(var(--section) / 2) 0; }
.sl-section__title {
  margin: 0; max-width: 20ch;
  font-size: clamp(2rem, 5.2vw, 4.25rem); font-weight: 900;
  line-height: 1; letter-spacing: -0.022em; word-spacing: 0.05em; text-transform: uppercase;
}
.sl-section__intro { margin: 32px 0 0; max-width: 38em; font-size: clamp(1.125rem, 1.5vw, 1.25rem); line-height: 1.75; }


/* A plain section: half the section spacing above and below (neighbouring sections add up to one full gap). */
.sl-section { padding: calc(var(--section) / 2) 0; }

/* ---------- Dark band ----------
   A black band with large rounded top corners (ninjapromo-style). In normal flow here; on the homepage the
   first one rises over the hero (see home.css). */
.sl-section--dark {
  position: relative; z-index: 1;
  padding-top: var(--section); padding-bottom: var(--section);
  background: var(--ink); color: var(--paper);
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  --rule: rgba(246, 246, 244, 0.18);
  --graphite: #B4B5B8;
  --stone: #8E8F93;
}
.sl-section--dark .sl-text-link:hover { color: var(--amber); }
.sl-section--amber { background: var(--amber); padding-block: var(--section); --graphite: rgba(0, 0, 0, .78); --rule: rgba(0, 0, 0, .22); }
.sl-section--amber :focus-visible { outline-color: #000; }

/* Buttons on a dark band */
.sl-section--dark .sl-pill { border-color: var(--paper); color: var(--paper); }
.sl-section--dark .sl-pill:hover { background: var(--paper); color: var(--ink); }
.sl-section--dark .sl-pill__icon { background: var(--amber); color: var(--ink); }
.sl-section--dark .sl-pill--primary { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.sl-section--dark .sl-pill--primary .sl-pill__icon { background: var(--ink); color: var(--amber); }
.sl-section--dark .sl-pill--primary:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.sl-section--dark .sl-text-link { color: var(--paper); }
.sl-section--dark :focus-visible { outline-color: var(--amber); }
.sl-section-cta { margin-top: 56px; }

/* ---------- Post grid: image-led, no card boxes (homepage teaser, Insights, related posts, 404) ---------- */
.sl-insights__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; }
.sl-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; margin-top: 56px; }
.sl-post a { display: block; text-decoration: none; }
.sl-post__img { aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #E3E2DC; }
.sl-post__img img { width: 100%; height: 100%; object-fit: cover; }
.sl-post__cat { display: block; margin-top: 20px; font-size: 0.875rem; font-weight: 700; color: var(--graphite); }
.sl-post__title { margin-top: 6px; font-size: 1.375rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.sl-post a:hover .sl-post__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.sl-post__meta { margin-top: 10px; font-size: 0.875rem; color: var(--stone); }

/* ---------- Card (a light panel with a soft lift) ---------- */
.sl-card { --rule: #D6D6D2; --graphite: #45464A; --stone: #6E6F73; color: var(--ink); }
.sl-card__title { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }

/* ---------- Footer ---------- */
.sl-footer { background: var(--ink); color: var(--paper); padding-bottom: 40px; --rule: rgba(246, 246, 244, 0.18); }
.sl-footer :focus-visible { outline-color: var(--amber); }
.sl-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-top: 64px; border-top: 1px solid var(--rule); }
.sl-footer__brand img { width: 64px; height: 64px; }
.sl-footer__tag { margin-top: 18px; max-width: 22em; color: #B4B5B8; font-size: 1rem; line-height: 1.6; }
.sl-footer__social { display: inline-flex; margin-top: 20px; color: var(--paper); }
.sl-footer__social svg { width: 22px; height: 22px; }
.sl-footer__social:hover { color: var(--amber); }
.sl-footer h2 { font-size: 0.9375rem; font-weight: 800; }
.sl-footer ul { margin-top: 16px; display: grid; gap: 10px; }
.sl-footer a { color: #B4B5B8; text-decoration: none; font-size: 1rem; }
.sl-footer a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.sl-footer__loc { margin-top: 16px; color: #8E8F93; font-size: 0.9375rem; line-height: 1.5; }
.sl-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule); color: #8E8F93; font-size: 0.875rem; }
.sl-footer__bottom a { font-size: 0.875rem; }


/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .sl-nav__list { gap: 22px; }
  .sl-nav { gap: 22px; }
}
@media (max-width: 860px) {
  .sl-nav__list { display: none; }
  .hamburger { display: flex; }
  .sl-nav { gap: 6px; }
  .sl-posts { grid-template-columns: minmax(0, 1fr); }
  .sl-footer__grid { grid-template-columns: minmax(0, 1fr) 1fr; }
  .sl-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .sl-footer__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .sl-site *, .sl-site *::before, .sl-site *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
