/*
Theme Name: Aykana Consultancy Services
Theme URI: https://aykana.co.ke
Author: Aykana Consultancy Services
Author URI: https://aykana.co.ke
Description: The strategic advisory firm that puts African markets in black and white. Pan-African advisory across trade and market development, investment facilitation, strategic partnerships, market entry, sector development, and people and organisational wellbeing. Includes a Services custom post type, native contact form, customizer-managed social links, and full responsive design.
Version: 2.6.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aykanna
Tags: business, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   AYKANA — THE EQUATOR SYSTEM, IN GLASS
   Layer 1: tokens, reset, typography, primitives.
   Layer 2: assets/css/main.css — nav, panels, ledgers, CTA.

   Two systems reconciled:

   The brand supplies the palette and the type. It is strictly
   monochrome (client instruction, 25 July): white, black and
   silver, no accent colour anywhere. Emphasis comes from weight.

   Apple's material grammar supplies the structure: one cool
   ground, content on unified white panels with hairline
   dividers, glass only where layers actually overlap, named
   radius and two-layer shadow tiers, spring easing.

   Where they conflict, the resolution is recorded inline. The
   short version: colour is the brand's, structure is Apple's,
   and there is no accent hue anywhere in the system. Grey is
   not used as a hierarchy dial below Graphite: below that,
   hierarchy steps down in size or weight, never in lightness.
   ============================================================ */

:root {
  /* ── Ground and surfaces ──
     Archive is the brand's own soft ground and lands within two
     points of Apple's #f5f5f7, so the cool grey-white ground the
     material grammar requires is already a brand token. */
  --bond: #FFFFFF;      /* surfaces: panels, cards, the reading plane */
  --archive: #F7F7F5;   /* page ground */
  --platinum: #E8EAEC;  /* tracks, quiet fills */
  --silver: #C9CDD2;    /* the Equator rule, structural hairlines */
  --graphite: #3B3E42;  /* secondary text, captions. The lightest legal text. */
  --ink: #111214;       /* primary text, dark surfaces */

  /* Ground-aware roles. Reversed blocks re-point these once, so no
     component needs a dark variant of its own. */
  --ground: var(--archive);
  --surface: var(--bond);
  --text: var(--ink);
  --text-quiet: var(--graphite);
  --line: var(--silver);
  --mark: var(--ink);   /* the destination tick: heaviest mark on the line */

  /* Hairline: the divider inside a panel. Apple's grammar, tinted with
     the brand's Ink rather than pure black so it stays in the palette. */
  --hairline: rgba(17, 18, 20, 0.08);
  --row-hover: rgba(17, 18, 20, 0.022);
  --track: var(--platinum);

  /* ── Type ── */
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Archivo', system-ui, sans-serif;
  --font-mono: 'Fragment Mono', ui-monospace, monospace;

  /* ── Spacing ── */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;

  /* Section rhythm, on Apple's scale. Sections breathe; panels are as
     short or tall as their content rather than padded to match. */
  --sheet-y: clamp(34px, 6vw, 56px);
  --sheet-y-lg: clamp(48px, 8vw, 78px);

  /* ── Layout ── */
  --page-max: min(1640px, 94vw);   /* grid / dense column */
  --read-max: min(960px, 90vw);    /* reading column */
  --gutter: 22px;
  --margin-col: 158px;  /* the reference column */
  --measure: 80ch;

  /* ── Radius: named tiers only, never an in-between value ── */
  --r-pill: 999px;
  --r-chip: 6px;
  --r-thumb: 12px;
  --r-sheet: 16px;
  --r-card: 18px;
  --r-panel: 22px;
  --r-hero: 26px;

  /* ── Shadow: always two-layer, tight contact plus soft spread.
     Tinted with Ink rather than pure black, and the focal tier drops
     Apple's blue cast because this system has no hue to cast. ── */
  --sh-card: 0 1px 2px rgba(17, 18, 20, 0.04), 0 8px 24px rgba(17, 18, 20, 0.05);
  --sh-panel: 0 1px 3px rgba(17, 18, 20, 0.05), 0 14px 40px rgba(17, 18, 20, 0.05);
  --sh-lift: 0 1px 2px rgba(17, 18, 20, 0.04), 0 12px 32px rgba(17, 18, 20, 0.10);
  --sh-hero: 0 2px 8px rgba(17, 18, 20, 0.08), 0 20px 54px rgba(17, 18, 20, 0.18);
  --sh-overlay: 0 2px 8px rgba(17, 18, 20, 0.10), 0 30px 80px rgba(17, 18, 20, 0.24);

  /* ── Rules and marks ── */
  --rule-w: 1px;
  --tick-h: 9px;
  --tick-w: 2px;

  /* ── Focus. Required. There is no accent hue, so the ring is Ink on
     light grounds and Bond on dark, which is also the brand's own
     "emphasis by weight, never colour" rule. ── */
  --focus: var(--ink);
  --focus-offset: 3px;

  /* ── Motion ── */
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);    /* enter: overlays, ~400ms */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);  /* small moves, ~200ms */
  --ease: var(--ease-out-quart);
  --dur: 240ms;

  color-scheme: light;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-optical-sizing: auto;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--ground);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

/* ============================================================
   TYPOGRAPHY
   Brand faces, Apple's typographic discipline: negative tracking
   that deepens with size, leading that tracks size inversely,
   tabular figures.
   ============================================================ */

h1, h2, h3, .display {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 500;
  text-wrap: balance;
}

h1, .t-display {
  font-size: clamp(2.35rem, 5.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h2, .t-h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.13;
  letter-spacing: -0.022em;
}

h3, .t-h3 {
  font-size: clamp(1.2rem, 1.9vw, 1.4rem);
  line-height: 1.24;
  letter-spacing: -0.012em;
}

h4, h5, h6 {
  font-family: var(--font-body);
  color: var(--text);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

p { max-width: var(--measure); }
p + p { margin-top: var(--s5); }

strong, b { font-weight: 600; }
em { font-style: italic; }

/* Long-form prose gets the tall leading; UI text keeps 1.6. */
.prose p,
.sheet__body--measure p,
.entry-content p {
  line-height: 1.85;
  color: var(--text-quiet);
}

/* The apparatus face: labels, reference numbers, metadata. */
.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-quiet);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.label--ink { color: var(--text); }

/* Labels carrying a proper noun keep their own casing: uppercasing
   "AfCFTA" to "AFCFTA" misspells the institution. */
.label--case { text-transform: none; letter-spacing: 0.04em; }

.lede {
  font-size: clamp(1.0625rem, 1.55vw, 1.3125rem);
  line-height: 1.55;
  color: var(--text-quiet);
  max-width: 80ch;
}

.quiet { color: var(--text-quiet); }

.figure,
.tabular {
  font-variant-numeric: lining-nums tabular-nums;
}

/* ============================================================
   LINKS
   No colour change on hover, because there is no colour. The
   underline rule extends and steps from Silver to Ink.
   ============================================================ */

a { color: inherit; text-decoration: none; }

.link {
  display: inline-block;
  font-weight: 500;
  padding-bottom: 2px;
  background-image: linear-gradient(var(--line), var(--line));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size var(--dur) var(--ease),
              background-image var(--dur) var(--ease);
}

.link:hover,
.link:focus-visible {
  background-image: linear-gradient(var(--text), var(--text));
  background-size: 100% 2px;
}

/* Directional link: the destination tick is the arrow. */
.link-east {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  font-weight: 500;
  font-size: 0.9375rem;
}

.link-east::after {
  content: '';
  width: 28px;
  height: var(--rule-w);
  background: var(--line);
  transition: width var(--dur) var(--ease-out-quart), background-color var(--dur) var(--ease-out-quart);
}

.link-east:hover::after,
.link-east:focus-visible::after {
  width: 46px;
  background: var(--mark);
}

/* ============================================================
   PRIMITIVES: THE RULE AND THE TICK
   The brand's one motif, kept as the section boundary. Inside a
   panel, dividers are hairlines instead.
   ============================================================ */

.rule {
  position: relative;
  border: 0;
  border-top: var(--rule-w) solid var(--line);
}

.rule--tick::after {
  content: '';
  position: absolute;
  right: 0;
  top: calc(50% - (var(--tick-h) / 2));
  width: var(--tick-w);
  height: var(--tick-h);
  background: var(--mark);
}

.rule--ledger {
  border: 0;
  border-top: 3px double var(--line);
}

/* ============================================================
   GROUNDS
   ============================================================ */

.ground--bond { background: var(--bond); }
.ground--archive { background: transparent; }

/* Reversed block. Graphite is unreadable on Ink, so the quiet role
   steps up to a dimmed Bond rather than down to Graphite. */
.ground--ink {
  --ground: var(--ink);
  --surface: rgba(255, 255, 255, 0.06);
  --text: var(--bond);
  --text-quiet: rgba(255, 255, 255, 0.74);
  --line: rgba(255, 255, 255, 0.22);
  --hairline: rgba(255, 255, 255, 0.14);
  --row-hover: rgba(255, 255, 255, 0.05);
  --mark: var(--bond);
  --focus: var(--bond);
  --logo-ink: #FFFFFF;
  --logo-ground: #111214;
  --logo-line: rgba(255, 255, 255, 0.5);
  --logo-desc: rgba(255, 255, 255, 0.7);
  color: var(--bond);
}

/* ============================================================
   GLASS
   Only where layers actually overlap: the sticky masthead, the
   disclosed mobile menu, and chips sitting on a reversed block.
   Plain content never gets glass.
   ============================================================ */

.glass {
  background: rgba(247, 247, 245, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.glass-chip {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  /* Required through Safari 17: without the prefix the frost silently
     disappears rather than degrading. */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ============================================================
   BUTTONS
   Pill tier, 44px hit area, press feedback on pointer-down.
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 26px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out-quart),
              color var(--dur) var(--ease-out-quart),
              border-color var(--dur) var(--ease-out-quart),
              box-shadow var(--dur) var(--ease-out-quart),
              transform 100ms ease-out;
}

.btn:active { transform: scale(0.975); }

.btn--primary {
  background: var(--ink);
  color: var(--bond);
  border-color: var(--ink);
  box-shadow: var(--sh-card);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #000;
  border-color: #000;
  box-shadow: var(--sh-lift);
}

.ground--ink .btn--primary {
  background: var(--bond);
  color: var(--ink);
  border-color: var(--bond);
}

.ground--ink .btn--primary:hover,
.ground--ink .btn--primary:focus-visible {
  background: var(--platinum);
  border-color: var(--platinum);
}

.btn--ruled {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border-color: var(--hairline);
  box-shadow: 0 1px 2px rgba(17, 18, 20, 0.05);
}

.btn--ruled:hover,
.btn--ruled:focus-visible {
  background: var(--bond);
  border-color: rgba(17, 18, 20, 0.18);
}

.ground--ink .btn--ruled {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--bond);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: none;
}

.ground--ink .btn--ruled:hover,
.ground--ink .btn--ruled:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Visually smaller, but the hit area stays at the 44px floor: the rule is
   about the target, not the pixels you can see. */
.btn--sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.875rem;
}

/* ============================================================
   FOCUS — required, global, never removed
   ============================================================ */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: var(--focus-offset);
  border-radius: inherit;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed !important;
  top: var(--s4);
  left: var(--s4);
  z-index: 2000;
  width: auto;
  height: auto;
  clip: auto;
  padding: var(--s3) var(--s5);
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bond);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Glass is an enhancement, never a requirement. Both preferences
   collapse it to a solid surface rather than degrading it. */
@media (prefers-reduced-transparency: reduce) {
  .glass,
  .glass-chip,
  .site-header,
  .desktop-menu-wrap,
  .practice-rail,
  .ground--ink .btn--ruled {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .glass,
  .site-header,
  .desktop-menu-wrap,
  .practice-rail { background: var(--bond) !important; }
  .glass-chip,
  .ground--ink .btn--ruled { background: rgba(255, 255, 255, 0.18) !important; }
}

@media (prefers-contrast: more) {
  :root {
    --hairline: rgba(17, 18, 20, 0.3);
    --row-hover: rgba(17, 18, 20, 0.05);
  }
  .glass,
  .glass-chip,
  .site-header,
  .desktop-menu-wrap,
  .practice-rail {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: var(--bond) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
