/* ============================================================
   PAICON 2026 Redesign — Design System (Phase 1: theme extraction)
   ------------------------------------------------------------
   ADDITIVE + SCOPED. This file does not change the current site:
   - Tokens live on :root but nothing references them yet (inert).
   - All component primitives are scoped under `.pi`, so a page only
     adopts the new look once it (or a section) is wrapped in `.pi`.
   Source of truth: "PAICON NEW WEBSITE ALL COMBINED" prototype.
   ============================================================ */

/* ---- Design tokens (prototype names; inert until referenced) ---- */
:root {
  /* Light surfaces */
  --bg:        #fbfaf6;   /* warm off-white page */
  --bg-2:      #f3f1ea;
  --bg-3:      #ebe7dc;

  /* Navy used as INK and as dark accent blocks */
  --navy:      #0a1240;
  --navy-2:    #0f185a;
  --navy-deep: #06092a;

  /* Text */
  --ink:       #0a1240;   /* primary text on light */
  --ink-2:     #3a426c;   /* secondary */
  --ink-3:     #6c759a;   /* tertiary / mono */
  --ink-on-dark:   #ffffff;
  --ink-2-on-dark: #cfd5f5;
  --ink-3-on-dark: #8a91c2;

  /* Lines */
  --line:         rgba(10, 18, 64, 0.10);
  --line-2:       rgba(10, 18, 64, 0.05);
  --line-on-dark: rgba(255, 255, 255, 0.12);

  /* Accents */
  --accent:    #e67a00;   /* PAICON orange */
  --teal:      #16a094;   /* deeper teal, legible on light */
  --teal-soft: #3dd4c0;
  --gold:      #d8a23a;

  /* Type */
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Shape & rhythm */
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:      0 24px 64px rgba(10, 18, 64, 0.18);
  --shadow-dark: 0 32px 80px rgba(0, 0, 0, 0.55);
  --shell: min(1320px, 92vw);  /* centered content container width */
}

/* ============================================================
   .pi — redesign scope. Wrap a page/section in this class to opt
   into the new warm-light theme. Current (dark) pages are untouched.
   ============================================================ */
.pi {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
/* Inter stylistic sets — match the design's letterforms across all redesigned pages */
.pi, .pi-home, .pi-about, .pi-article, .pi-careers, .pi-contact,
.pi-legal, .pi-media, .pi-paix, .pi-satsight {
  font-feature-settings: "ss01", "cv11";
}

/* Dark section variant (navy blocks inside a light page) */
.pi-dark {
  color: var(--ink-on-dark);
  background: var(--navy);
}

/* Headings default to serif display inside the redesign scope */
.pi h1, .pi h2, .pi h3,
.pi .serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.04;
  margin-top: 0;
}

/* ---- Layout container ---- */
.pi .shell {
  width: var(--shell);
  margin-inline: auto;
}

/* Generous vertical rhythm for full-width sections */
.pi .section {
  padding-block: clamp(72px, 9vw, 120px);
}

/* ---- Eyebrow (mono label) ---- */
.pi .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.pi .eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---- Buttons ---- */
.pi .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, filter .2s ease;
}
.pi .btn--primary {
  background: var(--accent);
  color: #2a1300;
  border-color: var(--accent);
}
.pi .btn--primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.pi .btn--ghost {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(10, 18, 64, 0.02);
}
.pi .btn--ghost:hover { background: rgba(10, 18, 64, 0.05); border-color: rgba(10, 18, 64, 0.2); }
.pi .btn--ghost-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}
.pi .btn--ghost-light:hover { background: rgba(255, 255, 255, 0.08); }
.pi .btn span[aria-hidden] { transition: transform .2s ease; }
.pi .btn:hover span[aria-hidden] { transform: translateX(2px); }

/* ---- Card ---- */
.pi .card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pi .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(10, 18, 64, 0.18);
}

/* ---- Highlight (marker underline on a word) ---- */
.pi .hl {
  background-image: linear-gradient(transparent 70%, rgba(230, 122, 0, 0.35) 70%);
}

/* ---- DotMesh animated background canvas (driven by dot-mesh.js) ---- */
.pi .dotmesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* ---- Optional film-grain overlay (opt-in: <body data-grain="on">) ---- */
body[data-grain="on"]::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.7'/></svg>");
}

/* ============================================================
   NAVBAR (global component — 2026 redesign)
   Not scoped under .pi because the navbar renders on every page,
   outside the page wrapper. Uses the :root tokens above.
   Solid cream background at all times so it stays legible over
   both the new light pages and the current dark pages.
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding: 16px 0;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, backdrop-filter .3s ease, padding .3s ease, border-color .3s ease;
}
.nav--scrolled {
  background: rgba(251, 250, 246, 0.85);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  padding: 10px 0;
  border-bottom-color: var(--line);
}
.nav__inner {
  width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
}
.nav__brand { display: inline-flex; align-items: center; text-decoration: none; }
.nav__brand-img { height: 52px; width: auto; display: block; }

/* ---- Desktop primary nav ---- */
.nav__primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.nav__primary > a,
.nav__btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .2s ease;
}
.nav__primary > a:hover,
.nav__btn:hover { color: var(--ink); }
.nav__primary > a.nav__link--accent { color: var(--accent); }
.nav__primary > a.nav__link--accent:hover { color: var(--accent); filter: brightness(0.9); }
.nav__primary > a.nav__link--active,
.nav__primary .nav__btn.nav__link--active { color: var(--ink); }
.nav__link--active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---- Services dropdown ---- */
.nav__btn { display: inline-flex; align-items: center; gap: 6px; }
.nav__caret { transition: transform .2s ease; display: inline-block; }
.nav__has-menu { position: relative; }
.nav__has-menu .nav__menu--open ~ .nav__btn .nav__caret,
.nav__has-menu[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }
/* Invisible bridge over the gap between the button and the menu so moving the
   cursor down to a menu item doesn't fire mouseleave and collapse the dropdown. */
.nav__has-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  max-width: 92vw;
  height: 18px;
  pointer-events: none;
}
.nav__has-menu:hover::after { pointer-events: auto; }
.nav__menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s ease;
  box-shadow: var(--shadow);
  min-width: 340px;
}
.nav__menu--open,
.nav__has-menu:hover .nav__menu,
.nav__has-menu:focus-within .nav__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav__has-menu:hover .nav__caret { transform: rotate(180deg); }
.nav__menu-group + .nav__menu-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}
.nav__menu-grouptitle {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 12px 6px;
}
.nav__menu-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  margin: 2px -6px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s ease;
}
.nav__menu-item:hover { background: var(--bg-2); }
.nav__menu-name { font-weight: 600; font-size: 14px; color: var(--navy); }
.nav__menu-tag { font-size: 12px; color: var(--ink-3); }

/* ---- Right side: CTA + burger ---- */
.nav__right { display: flex; align-items: center; gap: 14px; justify-self: end; }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.nav__cta:hover { background: var(--navy-2); transform: translateY(-1px); }
.nav__cta span[aria-hidden] { transition: transform .2s ease; }
.nav__cta:hover span[aria-hidden] { transform: translateX(2px); }

.nav__burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--navy);
  padding: 6px;
}
.nav__burger svg { display: block; }

/* ---- Mobile menu ---- */
.nav__mobile {
  display: none;
  width: var(--shell);
  margin: 14px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px;
}
.nav__mobile.is-open { display: block; }
.nav__mobile-link {
  display: block;
  padding: 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.nav__mobile-link:hover,
.nav__mobile-link.is-active { background: var(--bg-2); color: var(--accent); }
.nav__mobile-link--accent { color: var(--accent); }
.nav__mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 8px;
}
.nav__mobile-toggle:hover { background: var(--bg-2); }
.nav__mobile-toggle .nav__caret { color: var(--ink-3); }
.nav__mobile-sub { display: none; padding: 2px 0 6px 8px; }
.nav__mobile-sub.is-open { display: block; }
.nav__mobile-grouptitle {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px 12px 4px;
}
.nav__mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 4px 4px;
  padding: 13px 20px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background .2s ease;
}
.nav__mobile-cta:hover { background: var(--navy-2); }
.nav__mobile-cta span[aria-hidden] { transition: transform .2s ease; }
.nav__mobile-cta:hover span[aria-hidden] { transform: translateX(2px); }

@media (max-width: 1024px) {
  .nav__primary { display: none; }
  .nav__inner { grid-template-columns: 1fr auto; gap: 16px; }
  .nav__burger { display: inline-flex; }
  /* Contact lives in the mobile menu — hide the standalone header button */
  .nav__cta { display: none; }
}
@media (min-width: 1025px) {
  .nav__mobile { display: none !important; }
}

/* ============================================================
   FOOTER (global component — 2026 redesign)
   Explicit light background so it stays legible at the bottom of
   the current dark pages during migration. Newsletter form reuses
   the existing newsletter-subscription.js handler (footer-* ids).
   ============================================================ */
.footer-2026 {
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.footer-2026 .footer {
  width: var(--shell);
  margin: 0 auto;
  padding: 80px 0 40px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 1.55fr;
  gap: 64px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
  align-items: stretch;
}
.footer__brand { display: flex; flex-direction: column; }
.footer__brand p {
  margin: 18px 0 32px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
  max-width: 38ch;
}
.footer__brand .footer__connect { margin-top: 12px; }
.footer__connect .footer__col-h { margin-bottom: 22px; }
.footer__logo { display: inline-flex; align-items: center; margin-bottom: 4px; }
.footer__logo img { height: 64px; width: auto; display: block; }

.footer__nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: start;
  align-content: start;
}
.footer__nav > div { display: flex; flex-direction: column; gap: 12px; }
.footer__col-h {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.footer__nav a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}
.footer__nav a:hover { color: var(--accent); transform: translateX(2px); }
.footer__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  transition: color .2s ease;
}
.footer__nav a:hover .footer__arrow { color: var(--accent); }

.footer__news { display: flex; flex-direction: column; }
.footer__news-lede {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: none;
}
.footer__news-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}
.footer__news-fields input {
  grid-column: span 1;
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  color: var(--navy);
}
.footer__news-fields input[type="email"] { grid-column: 1 / -1; }
.footer__news-fields input::placeholder { color: var(--ink-3); }
.footer__news-fields input:focus { outline: none; border-color: var(--accent); }
.footer__news-btn {
  grid-column: 1 / -1;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #2a1300;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter .15s ease, transform .15s ease;
}
.footer__news-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.footer__news-msg { grid-column: 1 / -1; font-size: 13px; margin-top: 4px; }

.footer__social {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.footer__social a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom a { color: var(--ink-3); text-decoration: none; transition: color .2s ease; }
.footer__legal a:hover { color: var(--navy); }
.footer__cert { letter-spacing: 0.22em; }

@media (max-width: 980px) {
  .footer__top { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 560px) {
  .footer__nav { grid-template-columns: 1fr; }
  .footer__bottom { justify-content: center; text-align: center; }
}
