/* VERILENS tokens, base, layout, header and footer. Generated from the approved static site by tools/build.py: edit there, or add overrides in a child theme. */
/* ==========================================================================
   VERILENS — styles (light theme, built on the logo colours)
   1. Tokens   2. Base   3. Layout + shared components   4. Header + mega menu
   5. Sections (in page order)   6. Footer   7. RTL / Arabic   8. Motion prefs
   All spacing uses logical properties so the layout follows `dir`.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand: taken from the VERILENS logo file */
  --navy: #253b80;          /* wordmark */
  --cyan: #33c3e0;          /* mark gradient, start */
  --blue: #3583f0;          /* mark gradient, middle */
  --violet: #a36ff7;        /* mark gradient, end */
  --grad: linear-gradient(100deg, var(--cyan), var(--blue) 50%, var(--violet));
  --cta: #5b58f9;           /* call-to-action colour */
  --cta-hover: #4744e0;

  /* Surfaces and text */
  --bg: #ffffff;
  --tint: #f4f7fd;
  --tint-2: #e8eefb;
  --ink: #141d3d;
  --text: #2c3659;
  --mute: #5b6687;
  --blue-deep: #1f5fd0;     /* blue that passes contrast for small text */
  --line: rgba(37, 59, 128, 0.14);
  --line-strong: rgba(37, 59, 128, 0.3);
  --shadow: 0 1px 2px rgba(37, 59, 128, 0.06), 0 24px 60px -28px rgba(37, 59, 128, 0.35);

  /* Sentiment, always paired with a text label */
  --pos: #2e8b3d;
  --neu: #8b96b4;
  --neg: #e0344a;

  /* Type */
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-arabic: "Cairo", "Noto Sans Arabic", Tahoma, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem);
  --step-3: clamp(2rem, 1.3rem + 2.8vw, 3.35rem);
  --step-4: clamp(2.6rem, 1rem + 5vw, 5.1rem);

  /* Space + shape */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 9vw, 8.5rem);
  --radius: 8px;
  --radius-lg: 18px;
  --wrap: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6;
  overflow-x: clip; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
html:not(.js) [role="tabpanel"][hidden] { display: grid !important; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.logo-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
  position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 100;
  padding: 10px 16px; background: var(--navy); color: #fff; font-weight: 600;
  border-radius: var(--radius); transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- 3. Layout + shared components ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.tint { background: var(--tint); }

.section-head { max-width: 46rem; margin-block-end: clamp(2.5rem, 5vw, 4rem); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
h1, h2 { font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: var(--step-3); line-height: 1.08; }
h3 { font-weight: 600; font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.015em; }
.lede { margin-block-start: 1.4rem; font-size: var(--step-1); color: var(--mute); max-width: 40rem; text-wrap: pretty; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.6rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 1.5px solid transparent;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover { background: var(--cta-hover); box-shadow: 0 10px 24px -10px rgba(91, 88, 249, 0.75); }
.btn-ghost { border-color: var(--line-strong); color: var(--navy); background: rgba(255,255,255,.7); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-small { min-height: 44px; padding: 0 1.2rem; font-size: var(--step--1); }
.btn-block { width: 100%; }

.text-link {
  display: inline-block; margin-block-start: 1.5rem; color: var(--blue-deep); font-weight: 600;
  text-decoration: none; padding-block-end: 2px;
  background: var(--grad) no-repeat 0 100% / 100% 2px;
}
.text-link:hover { color: var(--navy); }

/* "Sample data" marker: an honest label, styled as a quiet tag */
.sample-tag { display: inline-flex; align-items: center; gap: .5em; font-size: var(--step--1); color: var(--mute); }
.sample-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--violet); flex: none; }

[data-tone="pos"] { --tone: var(--pos); }
[data-tone="neu"] { --tone: var(--neu); }
[data-tone="neg"] { --tone: var(--neg); }
.tone-key li, .legend li { display: inline-flex; align-items: center; gap: .5em; }
.tone-key li::before, .legend li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--tone); }

.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal:not(.is-in) { opacity: 0; transform: translateY(18px); }

/* ---------- 4. Header + mega menu ---------- */
.site-header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50; height: var(--header-h);
  transition: background-color .3s, border-color .3s, box-shadow .3s; border-block-end: 1px solid transparent;
}
.site-header.is-stuck, .site-header:has(.is-open) { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px); border-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; position: relative; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--navy); flex: none; }
.brand-mark { height: 30px; width: auto; aspect-ratio: 518 / 316; }
.brand-word { height: 13px; width: auto; aspect-ratio: 798 / 101; }

.primary-nav { display: flex; align-items: center; gap: 1.25rem; flex: 1; justify-content: flex-end; }
.menu { display: flex; gap: .15rem; margin-inline-end: auto; margin-inline-start: 1.5rem; }
.menu > li > button, .menu-link {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .8rem;
  background: none; border: 0; border-radius: 999px; font-size: .95rem; font-weight: 500; color: var(--text); text-decoration: none;
  transition: background-color .2s, color .2s;
}
.menu > li > button::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease); }
.menu > li > button:hover, .menu-link:hover, .has-mega.is-open > button { background: var(--tint-2); color: var(--navy); }
.has-mega.is-open > button::after { transform: translateY(1px) rotate(225deg); }

.mega h2 { font-family: var(--font-body); font-size: var(--step--1); font-weight: 500; letter-spacing: 0; color: var(--mute); margin-block-end: .6rem; }
.mega a { display: block; padding: .5rem .7rem; margin-inline: -.7rem; border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 500; }
.mega a:hover { background: var(--tint); color: var(--blue-deep); }
.mega a strong { display: block; font-family: var(--font-display); font-weight: 700; color: var(--navy); letter-spacing: .01em; }
.mega a span { display: block; font-size: var(--step--1); font-weight: 400; color: var(--mute); }
.mega-promo { background: linear-gradient(135deg, rgba(51,195,224,.14), rgba(53,131,240,.12) 50%, rgba(163,111,247,.16)); border-radius: 12px; padding: 1.25rem; align-self: start; }
.mega-promo h2 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.mega-promo p { font-size: var(--step--1); color: var(--text); }
.mega-promo .text-link { margin: 1rem 0 0; padding: 0 0 2px; border-radius: 0; color: var(--blue-deep); font-weight: 600; }
.mega-promo .text-link:hover { background: var(--grad) no-repeat 0 100% / 100% 2px; }

.nav-actions { display: flex; align-items: center; gap: .75rem; }
.lang-switch {
  background: none; border: 1.5px solid var(--line-strong); border-radius: 999px;
  min-height: 44px; padding: 0 1rem; font-size: var(--step--1); font-weight: 500; color: var(--navy); font-family: var(--font-arabic);
}
.lang-switch:hover { border-color: var(--navy); }
.nav-toggle { display: none; width: 46px; height: 46px; background: none; border: 1.5px solid var(--line-strong); border-radius: 50%; position: relative; flex: none; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { position: absolute; inset-inline: 13px; height: 2px; background: var(--navy); content: ""; transition: transform .25s var(--ease); }
.nav-toggle-bars { inset-block-start: 21px; }
.nav-toggle-bars::before { inset-inline: 0; inset-block-start: -6px; }
.nav-toggle-bars::after { inset-inline: 0; inset-block-start: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 1101px) {
  .has-mega { position: relative; }
  .has-mega:has(.mega-3) { position: static; }
  .mega {
    position: absolute; inset-block-start: calc(100% + 10px); inset-inline-start: 0; z-index: 5;
    display: grid; gap: 2rem; padding: 1.75rem; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
    visibility: hidden; opacity: 0; transform: translateY(8px);
    transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
  }
  .mega::before { content: ""; position: absolute; inset-inline: 0; inset-block-end: 100%; height: 26px; }
  .mega-2 { grid-template-columns: 1fr 1fr; width: 500px; }
  .mega-3 { grid-template-columns: 1.35fr 1fr 1fr; inset-inline: var(--gutter); inset-block-start: calc(100% - 4px); }
  #mega-resources { inset-inline-start: auto; inset-inline-end: 0; }
  .mega-cont { padding-block-start: 1.62rem; }
  .has-mega.is-open .mega { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
}
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: fixed; inset-inline: 0; inset-block-start: var(--header-h); max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 1.5rem;
    padding: 1rem var(--gutter) 2rem; background: #fff; border-block-end: 1px solid var(--line); box-shadow: var(--shadow);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
  }
  .primary-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .menu { flex-direction: column; gap: 0; margin: 0; }
  .menu > li { border-block-end: 1px solid var(--line); }
  .menu > li > button, .menu-link { width: 100%; justify-content: space-between; min-height: 56px; padding: 0; font-size: 1.1rem; border-radius: 0; color: var(--ink); }
  .menu > li > button:hover, .menu-link:hover, .has-mega.is-open > button { background: none; }
  .mega { display: none; padding-block: .25rem 1.25rem; gap: 1.25rem; }
  .has-mega.is-open .mega { display: grid; }
  .mega-cont { margin-block-start: -1.25rem; }
  .nav-actions { justify-content: space-between; }
}

/* ---------- 6. Footer ---------- */
.site-footer { position: relative; overflow: clip; background: #fff; padding-block: 4rem 2rem; font-size: .95rem; }
.site-footer > .wrap { position: relative; }
/* A flowing gradient line along the top, and a faint mark with a shimmering dot field in the corner */
.site-footer::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet), var(--cta), var(--cyan)); background-size: 200% 100%; animation: footer-flow 8s linear infinite; }
@keyframes footer-flow { to { background-position: -200% 0; } }
.footer-deco { position: absolute; inset-inline-end: -70px; bottom: -50px; width: min(48vw, 540px); pointer-events: none; }
.footer-deco svg { width: 100%; opacity: .08; animation: footer-drift 9s ease-in-out infinite alternate; }
.footer-deco span { position: absolute; inset: -18%; background-image: radial-gradient(var(--blue) 1.2px, transparent 1.7px); background-size: 16px 16px; opacity: .4;
  -webkit-mask: radial-gradient(closest-side, #000 15%, transparent 72%) no-repeat 0 0 / 70% 70%; mask: radial-gradient(closest-side, #000 15%, transparent 72%) no-repeat 0 0 / 70% 70%; animation: footer-shimmer 11s ease-in-out infinite alternate; }
@keyframes footer-drift { to { transform: translate(-14px, -10px) rotate(-3deg); } }
@keyframes footer-shimmer { to { -webkit-mask-position: 100% 100%; mask-position: 100% 100%; } }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 2.5rem; }
.footer-logo { width: 150px; margin-inline-start: -4px; }
.footer-brand p { margin-block: 1rem 1.5rem; color: var(--mute); max-width: 22rem; }
.site-footer h2 { font-family: var(--font-body); font-size: .95rem; font-weight: 600; letter-spacing: 0; color: var(--ink); margin-block-end: 1rem; }
.site-footer ul { display: grid; gap: .55rem; color: var(--mute); }
.site-footer ul a { text-decoration: none; display: inline-block; padding-block: .15rem; }
.site-footer ul a:hover { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 4px; }
.placeholder { color: #7d88a8; }
.footer-base { margin-block-start: 3.5rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--mute); font-size: var(--step--1); }
.footer-legal { display: flex !important; flex-wrap: wrap; gap: .5rem 1.5rem !important; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- WordPress integration (theme) ---------- */
.admin-bar .site-header { inset-block-start: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { inset-block-start: 46px; } }
.vl-header-static .site-header { position: absolute; }
.vl-header-solid .site-header { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px); border-color: var(--line); }
.brand .brand-img { height: 34px; width: auto; }
.site-footer .brand-img { height: 56px; width: auto; }
.brand-text { font-family: var(--font-display); font-weight: 700; letter-spacing: .12em; }
/* Ordinary pages and posts (not built from VERILENS sections) */
.vl-plain { padding-block: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem)) var(--section); }
.vl-plain h1 { font-size: var(--step-3); line-height: 1.08; margin-block-end: 1.5rem; }
.vl-plain .vl-meta { color: var(--mute); font-size: var(--step--1); margin-block-end: 2rem; }
.vl-pagination { margin-block-start: 3rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.vl-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding-inline: .6rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--navy); }
.vl-pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.vl-search-form { display: flex; gap: .6rem; max-width: 34rem; margin-block: 1.5rem; }
.vl-search-form input[type="search"] { flex: 1; min-height: 52px; padding: 0 1rem; border: 1.5px solid var(--line-strong); border-radius: 999px; font: inherit; }
.comments-area { max-width: 46rem; margin: 4rem auto 0; }
.comments-area ol { list-style: none; padding: 0; } .comments-area li { padding-block: 1.25rem; border-block-start: 1px solid var(--line); }
.comments-area textarea, .comments-area input:not([type="submit"]):not([type="checkbox"]) { width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius); font: inherit; }
.alignwide { max-width: var(--wrap); } .alignfull { max-width: none; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
