﻿
    /* ===================== PALETTE SYSTEM =====================
   Each palette defines the accent trio + neutral anchors used to
   compose dark/light themes. Switchable via body[data-palette].
   --accent      primary brand color
   --accent-light brighter variant (used on dark bg)
   --accent-dark  deeper variant
   --accent-2     secondary/contrast accent
   --n-dark / --n-light : neutral anchors for dark & light themes
   --accent-rgb / --accent2-rgb : for translucent glows
*/

    /* P1 â€” Teal (current OptiPID brand, kept for comparison) */
    body[data-palette="teal"] {
      --accent: #2e8b8b;
      --accent-light: #3fa8a8;
      --accent-dark: #1f6363;
      --accent-2: #d9a441;
      --accent-rgb: 46, 139, 139;
      --accent2-rgb: 217, 164, 65;
      --n-dark: #0c1414;
      --n-dark-soft: #16201f;
      --n-light: #f4f1ea;
      --n-light-soft: #ffffff;
      --n-dark-rgb: 12, 20, 20;
      --n-light-rgb: 244, 241, 234;
    }

    /* P2 â€” Deep Atlantic (premium corporate blue + steel) */
    body[data-palette="atlantic"] {
      --accent: #2563b8;
      --accent-light: #4d8bdf;
      --accent-dark: #1a4585;
      --accent-2: #5fcfd6;
      --accent-rgb: 37, 99, 184;
      --accent2-rgb: 95, 207, 214;
      --n-dark: #0a0f17;
      --n-dark-soft: #131b28;
      --n-light: #f3f5f8;
      --n-light-soft: #ffffff;
      --n-dark-rgb: 10, 15, 23;
      --n-light-rgb: 243, 245, 248;
    }

    /* P3 â€” Electric Signal (high-tech, bright cyan on near-black) */
    body[data-palette="electric"] {
      --accent: #0bbfd4;
      --accent-light: #2ad8ec;
      --accent-dark: #0892a3;
      --accent-2: #8b5cf6;
      --accent-rgb: 11, 191, 212;
      --accent2-rgb: 139, 92, 246;
      --n-dark: #070b10;
      --n-dark-soft: #10161e;
      --n-light: #eef2f5;
      --n-light-soft: #ffffff;
      --n-dark-rgb: 7, 11, 16;
      --n-light-rgb: 238, 242, 245;
    }

    /* P4 â€” Graphite & Signal Orange (bold, high-contrast neutral + 1 accent) */
    body[data-palette="graphite"] {
      --accent: #f0612e;
      --accent-light: #ff7a47;
      --accent-dark: #c64a1f;
      --accent-2: #3aa3a3;
      --accent-rgb: 240, 97, 46;
      --accent2-rgb: 58, 163, 163;
      --n-dark: #14161a;
      --n-dark-soft: #1e2127;
      --n-light: #f5f4f2;
      --n-light-soft: #ffffff;
      --n-dark-rgb: 20, 22, 26;
      --n-light-rgb: 245, 244, 242;
    }

    /* P5 â€” Sage Mineral (clean, fresh green + warm neutral, understated) */
    body[data-palette="sage"] {
      --accent: #3f9d6f;
      --accent-light: #56bd8a;
      --accent-dark: #2c7551;
      --accent-2: #e0a458;
      --accent-rgb: 63, 157, 111;
      --accent2-rgb: 224, 164, 88;
      --n-dark: #101513;
      --n-dark-soft: #19211d;
      --n-light: #f4f3ee;
      --n-light-soft: #ffffff;
      --n-dark-rgb: 16, 21, 19;
      --n-light-rgb: 244, 243, 238;
    }

    /* back-compat aliases so existing rules referencing teal/amber still work */
    :root,
    body {
      --teal: var(--accent);
      --teal-light: var(--accent-light);
      --teal-dark: var(--accent-dark);
      --amber: var(--accent-2);
    }

    /* DARK theme (default) â€” composed from palette neutrals */
    body[data-theme="dark"] {
      --bg: var(--n-dark);
      --bg-soft: var(--n-dark-soft);
      --bg-card: rgba(var(--n-light-rgb), 0.03);
      --bg-card-border: rgba(var(--n-light-rgb), 0.08);
      --bg-card-hover: rgba(var(--accent-rgb), 0.08);
      --text: var(--n-light);
      --text-soft: rgba(var(--n-light-rgb), 0.62);
      --text-faint: rgba(var(--n-light-rgb), 0.38);
      --hero-bg-1: rgba(var(--accent-rgb), 0.20);
      --hero-bg-2: rgba(var(--accent2-rgb), 0.08);
      --nav-bg: rgba(var(--n-dark-rgb), 0.82);
      --line: rgba(var(--n-light-rgb), 0.1);
    }

    /* LIGHT theme */
    body[data-theme="light"] {
      --bg: var(--n-light);
      --bg-soft: var(--n-light-soft);
      --bg-card: var(--n-light-soft);
      --bg-card-border: rgba(var(--n-dark-rgb), 0.09);
      --bg-card-hover: rgba(var(--accent-rgb), 0.05);
      --text: var(--n-dark);
      --text-soft: rgba(var(--n-dark-rgb), 0.68);
      --text-faint: rgba(var(--n-dark-rgb), 0.42);
      --hero-bg-1: rgba(var(--accent-rgb), 0.12);
      --hero-bg-2: rgba(var(--accent2-rgb), 0.06);
      --nav-bg: rgba(var(--n-light-rgb), 0.85);
      --line: rgba(var(--n-dark-rgb), 0.1);
    }

    * {
      margin-top: 40px;
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'Archivo', sans-serif;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      transition: background .5s, color .5s;
    }

    canvas {
      display: block;
    }

    em {
      font-style: italic;
      color: var(--teal);
    }

    body[data-theme="dark"] em {
      color: var(--teal-light);
    }

    /* ===================== NAV ===================== */
    nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 40;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.1rem 6vw;
      backdrop-filter: blur(16px);
      background: var(--nav-bg);
      border-bottom: 1px solid var(--line);
      transition: background .5s, border-color .5s;
      box-sizing: border-box;
      flex-wrap: nowrap;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-family: 'Archivo';
      font-weight: 900;
      font-size: 1.15rem;
      letter-spacing: -0.02em;
      flex: 0 0 auto;
      min-width: 0;
    }

    /* Logo container + SVG mark wrapper */
    .logo .mark-wrap {
      width: 300px;
      height: 75px;
      min-width: 0;
      position: relative;
      flex-shrink: 0;
      display: block;
      overflow: hidden;
    }

    .logo-svg {
      width: 100%;
      max-width: 600px;
      height: 100%;
      display: block;
      opacity: 0;
      will-change: opacity, filter, transform;
      transition: filter 220ms ease, transform 220ms ease, opacity 220ms ease;
      transform: translateZ(0) scale(1);
      background: transparent;
      filter: drop-shadow(0 6px 18px rgba(var(--accent-rgb), 0.08));
      display: block;
    }

    /* aura behind logo */
    .logo .logo-aura {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%) scale(0.98);
      width: 320px;
      height: 120px;
      border-radius: 999px;
      pointer-events: none;
      background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.04) 45%, transparent 70%);
      filter: blur(18px);
      opacity: 0;
      z-index: -1;
    }

    /* one-time fade-in on page load (plays once) */
    @keyframes optipidLogoFadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    /* subtle breathing + awake sequence â€” cycles every 6.5s for a gentle premium effect */
    @keyframes optipidLogoAwaken {

      0%,
      100% {
        filter: drop-shadow(0 6px 18px rgba(var(--accent-rgb), 0.08)) brightness(1) saturate(1);
        transform: scale(1);
      }

      50% {
        filter: drop-shadow(0 12px 36px rgba(var(--accent-rgb), 0.18)) brightness(1.08) saturate(1.18);
        transform: scale(1.01);
      }
    }

    /* animate primary teal fills inside the SVG to cycle between deep brand teal and a brighter green accent */
    @keyframes optipidLogoColor {

      0%,
      100% {
        fill: var(--accent-dark);
      }

      30%,
      70% {
        fill: var(--accent);
      }

      50% {
        fill: var(--accent-light);
      }
    }

    /* Fade in once, then pulse with stronger contrast, saturation, and scale */
    @keyframes optipidLogoPulse {

      0%,
      100% {
        filter: drop-shadow(0 6px 22px rgba(var(--accent-rgb), 0.10)) brightness(0.78) saturate(0.80);
        transform: scale(1);
      }

      20%,
      80% {
        filter: drop-shadow(0 22px 42px rgba(var(--accent-rgb), 0.32)) brightness(1.28) saturate(1.42);
        transform: scale(1.07);
      }

      50% {
        filter: drop-shadow(0 12px 28px rgba(var(--accent-rgb), 0.20)) brightness(1.08) saturate(1.12);
        transform: scale(1.04);
      }
    }

    .logo-svg {
      transform-origin: center center;
      animation: optipidLogoFadeIn 0.6s ease forwards 0s, optipidLogoPulse 7s ease-in-out 0.6s infinite;
    }

    /* Target the main mark portions and animate them together */
    .logo-svg .fil0,
    .logo-svg .fil1,
    .logo-svg .fil2 {
      animation: optipidLogoColor 7s ease-in-out infinite;
      transition: fill .6s ease, opacity .6s ease;
    }

    /* Keep the word-mark split color and animate each hue family separately */
    .logo-svg .fil3 {
      animation: optipidLogoTealColor 7s ease-in-out infinite;
      transition: fill .6s ease, opacity .6s ease;
    }

    .logo-svg .fil4 {
      animation: optipidLogoGreenColor 7s ease-in-out infinite;
      transition: fill .6s ease, opacity .6s ease;
    }

    @keyframes optipidLogoTealColor {

      0%,
      100% {
        fill: #025D6C;
      }

      50% {
        fill: #1f6363;
      }
    }

    @keyframes optipidLogoGreenColor {

      0%,
      100% {
        fill: #25AB51;
      }

      50% {
        fill: #36c164;
      }
    }

    /* Aura pulse tied to the logo rhythm for extra brand presence */
    @keyframes optipidAuraPulse {

      0%,
      100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.96);
      }

      40%,
      60% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.06);
      }
    }

    .logo .logo-aura {
      animation: optipidAuraPulse 7s ease-in-out infinite;
    }

    /* gentle hover enhancement (subtle increase in glow & brightness, tiny scale) */
    .logo img.mark:hover,
    .logo img.light-logo:hover,
    .logo img.dark-logo:hover {
      filter: drop-shadow(0 10px 28px rgba(var(--accent-rgb), 0.14));
      transform: translateY(-1px) scale(1.02);
    }

    /* Respect reduced-motion preference */
    @media (prefers-reduced-motion: reduce) {

      .logo img.mark,
      .logo img.light-logo,
      .logo img.dark-logo,
      .logo-svg {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
      }
    }

    .logo b {
      color: var(--teal);
      font-weight: 900;
    }

    .logo span {
      color: var(--text);
    }

    .nav-links {
      display: flex;
      gap: 1.2rem;
      align-items: center;
      flex: 1 1 auto;
      justify-content: flex-end;
      flex-wrap: nowrap;
    }

    .nav-links a {
      color: var(--text-soft);
      text-decoration: none;
      font-size: 0.9rem;
      font-weight: 500;
      letter-spacing: 0.01em;
      transition: color .2s;
      cursor: pointer;
      position: relative;
      white-space: nowrap;
    }

    .nav-links a:hover {
      color: var(--teal);
    }

    .nav-links a.active {
      color: var(--teal);
    }

    .nav-cta {
      background: var(--teal);
      color: #fff;
      padding: 0.6rem 1.2rem;
      border-radius: 3px;
      font-size: 0.86rem;
      font-weight: 600;
      transition: background .2s, transform .2s;
    }

    .nav-cta:hover {
      background: var(--teal-light) !important;
      transform: translateY(-1px);
      color: #fff !important;
    }

    /* ===================== MOBILE NAV / HAMBURGER ===================== */
    /* Hamburger button: hidden on desktop, revealed at tablet/mobile widths. */
    .nav-toggle {
      display: none;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 5px;
      width: 44px;
      height: 44px;
      padding: 0;
      margin-left: 1rem;
      background: transparent;
      border: 1px solid var(--line);
      border-radius: 6px;
      cursor: pointer;
      flex: 0 0 auto;
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
      transition: border-color .2s, background .2s;
    }

    .nav-toggle:hover { border-color: var(--teal); }
    .nav-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

    .nav-toggle .bar {
      display: block;
      width: 22px;
      height: 2px;
      background: var(--text);
      border-radius: 2px;
      transition: transform .3s ease, opacity .2s ease;
    }

    /* Bars morph into an X when the menu is open. */
    nav.nav-open .nav-toggle .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    nav.nav-open .nav-toggle .bar:nth-child(2) { opacity: 0; }
    nav.nav-open .nav-toggle .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    @media (max-width: 880px) {
      .nav-toggle { display: flex; }

      /* Links collapse into a dropdown panel anchored under the fixed nav bar. */
      .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 0.25rem 6vw 1.1rem;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
        box-sizing: border-box;
        max-height: calc(100vh - 100%);
        overflow-y: auto;
        /* closed state */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity .28s ease, transform .28s ease, visibility .28s;
      }

      nav.nav-open .nav-links {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
      }

      /* Touch-friendly full-width tap targets. */
      .nav-links a {
        display: block;
        width: 100%;
        padding: 0.95rem 0.25rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--line);
        white-space: normal;
      }

      .nav-links a.nav-cta {
        margin-top: 0.85rem;
        text-align: center;
        padding: 0.95rem 1.2rem;
        border-bottom: none;
      }
    }

    /* ===================== HERO ===================== */
    .hero {
      position: relative;
      height: 100vh;
      min-height: 660px;
      overflow: hidden;
      margin-top: 30px;
      background: radial-gradient(ellipse 80% 60% at 70% 35%, var(--hero-bg-1), transparent 70%),
        radial-gradient(ellipse 60% 80% at 15% 80%, var(--hero-bg-2), transparent 60%),
        var(--bg);
      transition: background .5s;
    }

    /* hero always uses dark canvas backdrop for 3D pop, even in light mode */
    body[data-theme="light"] .hero {
      background:
        radial-gradient(ellipse 80% 60% at 70% 35%, rgba(var(--accent-rgb), 0.24), transparent 70%),
        radial-gradient(ellipse 60% 80% at 15% 80%, rgba(var(--accent2-rgb), 0.12), transparent 60%),
        var(--n-dark);
    }

    #three-canvas {
      position: absolute;
      inset: 0;
      z-index: 1;
    }

    .hero-grain {
      position: absolute;
      inset: 0;
      z-index: 2;
      pointer-events: none;
      opacity: 0.05;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    }

    .hero-content {
      position: relative;
      z-index: 3;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 0 6vw;
      max-width: 820px;
      pointer-events: none;
    }

    .hero-content>* {
      pointer-events: auto;
    }

    .hero,
    .hero * {
      color: #f4f1ea;
    }

    /* hero text always light over dark 3D */
    .eyebrow {
      font-size: 0.72rem;
      letter-spacing: 0.3em;
      text-transform: uppercase;
      color: var(--teal-light);
      font-weight: 700;
      margin-bottom: 1.5rem;
      display: flex;
      align-items: center;
      gap: 0.8rem;
      opacity: 0;
      animation: rise .9s .2s forwards cubic-bezier(.2, .8, .2, 1);
    }

    .eyebrow::before {
      content: '';
      width: 42px;
      height: 1px;
      background: var(--teal);
    }

    .hero h1 {
      font-family: 'Fraunces', serif;
      font-weight: 400;
      font-size: clamp(2.5rem, 5.6vw, 4.8rem);
      line-height: 1.0;
      letter-spacing: -0.02em;
      margin-bottom: 1.5rem;
    }

    .hero h1 .line {
      display: block;
      overflow: hidden;
    }

    .hero h1 .line span {
      display: block;
      transform: translateY(110%);
      animation: rise 1s forwards cubic-bezier(.2, .8, .2, 1);
    }

    .hero h1 .line:nth-child(1) span {
      animation-delay: .35s;
    }

    .hero h1 .line:nth-child(2) span {
      animation-delay: .5s;
    }

    .hero h1 em {
      font-style: italic;
      color: var(--teal-light);
    }

    .hero p.sub {
      font-size: clamp(1rem, 1.4vw, 1.2rem);
      line-height: 1.6;
      color: rgba(244, 241, 234, 0.72);
      max-width: 520px;
      margin-bottom: 1.4rem;
      opacity: 0;
      animation: rise .9s .85s forwards cubic-bezier(.2, .8, .2, 1);
    }

    .trustline {
      font-size: 0.82rem;
      color: var(--teal-light);
      font-weight: 600;
      letter-spacing: 0.04em;
      margin-bottom: 2.2rem;
      opacity: 0;
      animation: rise .9s .95s forwards cubic-bezier(.2, .8, .2, 1);
    }

    .hero-cta {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      opacity: 0;
      animation: rise .9s 1.05s forwards cubic-bezier(.2, .8, .2, 1);
    }

    .btn {
      font-family: 'Archivo';
      font-weight: 600;
      font-size: 0.92rem;
      padding: 0.95rem 1.7rem;
      border-radius: 3px;
      cursor: pointer;
      border: none;
      transition: transform .25s, box-shadow .25s, background .25s;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
    }

    .btn-primary {
      background: var(--teal);
      color: #f4f1ea;
    }

    .btn-primary:hover {
      background: var(--teal-light);
      transform: translateY(-2px);
      box-shadow: 0 14px 30px -10px rgba(46, 139, 139, 0.6);
    }

    .btn-ghost {
      background: transparent;
      color: #f4f1ea;
      border: 1px solid rgba(244, 241, 234, 0.28);
    }

    .btn-ghost:hover {
      border-color: var(--teal-light);
      color: var(--teal-light);
    }

    @keyframes rise {
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    /* ===================== SECTIONS ===================== */
    section.block {
      padding: 6.5rem 6vw;
      position: relative;

    }

    .section-tag {
      font-size: 0.7rem;
      letter-spacing: 0.3em;
      text-transform: uppercase;
      color: var(--teal);
      font-weight: 700;
      margin-bottom: 1rem;
    }

    .block h2 {
      font-family: 'Fraunces', serif;
      font-weight: 400;
      font-size: clamp(1.8rem, 3.5vw, 2.9rem);
      line-height: 1.05;
      letter-spacing: -0.01em;
      max-width: 720px;
      margin-bottom: 1.1rem;
    }

    .block .lede {
      color: var(--text-soft);
      max-width: 620px;
      line-height: 1.7;
      font-size: 1.06rem;
    }

    .soft-bg {
      background: var(--bg-soft);
      transition: background .5s;
    }

    /* problem strip */
    .problem-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 1px;
      margin-top: 3rem;
      background: var(--line);
      border: 1px solid var(--line);
      border-radius: 6px;
      overflow: hidden;
    }

    .problem-cell {
      background: var(--bg);
      padding: 1.6rem;
      transition: background .3s;
      cursor: pointer;
    }

    .problem-cell:hover {
      background: var(--bg-card-hover);
    }

    .problem-cell .pc-ico {
      color: var(--amber);
      font-family: 'Fraunces';
      font-size: 1rem;
      margin-bottom: 0.6rem;
    }

    .problem-cell p {
      font-size: 0.92rem;
      color: var(--text-soft);
      line-height: 1.5;
      font-weight: 500;
    }

    .loss-banner {
      margin-top: 2.5rem;
      padding: 1.6rem 2rem;
      border-radius: 6px;
      background: linear-gradient(100deg, var(--teal-dark), var(--teal));
      color: #f4f1ea;
      font-family: 'Fraunces';
      font-size: clamp(1.1rem, 2vw, 1.5rem);
      font-weight: 400;
    }

    .loss-banner b {
      color: var(--amber);
      font-weight: 600;
    }

    /* services */
    .svc-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
      gap: 1.5rem;
      margin-top: 3rem;
    }

    .svc-card {
      background: var(--bg-card);
      border: 1px solid var(--bg-card-border);
      padding: 2.1rem 1.9rem;
      border-radius: 6px;
      transition: transform .3s, border-color .3s, background .3s;
      cursor: pointer;
    }

    .svc-card:hover {
      transform: translateY(-6px);
      border-color: var(--teal);
      background: var(--bg-card-hover);
    }

    .svc-card .num {
      font-family: 'Fraunces';
      font-size: 1.05rem;
      color: var(--amber);
      margin-bottom: 0.9rem;
    }

    .svc-card h3 {
      font-size: 1.18rem;
      font-weight: 700;
      margin-bottom: 0.7rem;
      letter-spacing: -0.01em;
    }

    .svc-card p {
      color: var(--text-soft);
      font-size: 0.93rem;
      line-height: 1.6;
      margin-bottom: 1rem;
    }

    .svc-card ul {
      list-style: none;
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
    }

    .svc-card ul li {
      font-size: 0.76rem;
      color: var(--teal);
      border: 1px solid var(--bg-card-border);
      padding: 0.25rem 0.6rem;
      border-radius: 100px;
      font-weight: 600;
    }

    /* case studies */
    .case-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 1.5rem;
      margin-top: 3rem;
    }

    .case-card {
      background: var(--bg-card);
      border: 1px solid var(--bg-card-border);
      border-radius: 6px;
      overflow: hidden;
      transition: transform .3s, border-color .3s;
      display: flex;
      flex-direction: column;
      cursor: pointer;
    }

    .case-card:hover {
      transform: translateY(-5px);
      border-color: var(--teal);
    }

    .case-top {
      padding: 1.6rem 1.7rem 1.2rem;
      border-bottom: 1px solid var(--bg-card-border);
    }

    .case-loc {
      font-size: 0.74rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--teal);
      font-weight: 700;
      margin-bottom: 0.5rem;
    }

    .case-title {
      font-family: 'Fraunces';
      font-size: 1.12rem;
      line-height: 1.25;
      font-weight: 500;
    }

    .case-body {
      padding: 1.4rem 1.7rem;
      flex: 1;
    }

    .case-sys {
      font-size: 0.78rem;
      color: var(--text-faint);
      margin-bottom: 1rem;
      font-weight: 600;
      letter-spacing: 0.02em;
    }

    .case-metrics {
      display: flex;
      flex-direction: column;
      gap: 0.7rem;
    }

    .case-metric {
      display: flex;
      align-items: baseline;
      gap: 0.7rem;
    }

    .case-metric b {
      font-family: 'Fraunces';
      font-size: 1.6rem;
      color: var(--teal);
      min-width: 78px;
      font-weight: 400;
    }

    body[data-theme="dark"] .case-metric b {
      color: var(--teal-light);
    }

    .case-metric span {
      font-size: 0.85rem;
      color: var(--text-soft);
      line-height: 1.3;
    }

    /* ===================== CASE STUDIES WORLD MAP ===================== */
    .world-map-wrapper {
      position: relative;
      width: 100%;
      aspect-ratio: 2/1;
      max-height: 680px;
      margin-top: 3rem;
      border-radius: 6px;
      overflow: hidden;
      border: 1px solid var(--bg-card-border);
      background: var(--bg-card);
    }

    .world-map {
      width: 100%;
      height: auto;
      display: block;
    }

    .world-map .land {
      fill: var(--bg-soft);
      stroke: var(--line);
      stroke-width: 0.5;
    }

    body[data-theme="light"] .world-map .land {
      fill: grey;
    }

    .world-map .ocean {
      fill: var(--bg);
    }

    .pin {
      fill: var(--accent);
      cursor: pointer;
      transition: filter .2s;
      filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.3));
    }

    .pin:hover,
    .pin:focus {
      filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.8));
    }

    .pin:focus {
      outline: 2px solid var(--accent-light);
      outline-offset: 2px;
    }

    .pin-center {
      fill: white;
      pointer-events: none;
    }

    .active-preview {
      position: absolute;
      min-width: 240px;
      max-width: 300px;
      background: var(--bg-card);
      border: 1px solid var(--bg-card-border);
      border-radius: 6px;
      padding: 1.2rem 1.4rem;
      pointer-events: none;
      opacity: 0;
      transform: translateY(10px);
      transition: opacity .2s, transform .2s;
      z-index: 10;
    }

    .active-preview.show {
      opacity: 1;
      transform: translateY(0);
    }

    .active-preview .preview-loc {
      font-size: 0.74rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--teal);
      font-weight: 700;
      margin-bottom: 0.4rem;
    }

    .active-preview .preview-title {
      font-family: 'Fraunces', serif;
      font-size: 1rem;
      line-height: 1.3;
      font-weight: 500;
    }

    /* ===================== CASE STUDY OVERLAY ===================== */
    .case-study-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      backdrop-filter: blur(12px);
      z-index: 100;
      padding: 6vw;
      overflow-y: auto;
      cursor: pointer;
    }

    .case-study-overlay.active {
      display: block;
    }

    .overlay-content {
      max-width: 900px;
      margin: 0 auto;
      background: var(--bg);
      border-radius: 6px;
      border: 1px solid var(--line);
      cursor: auto;
    }

    .overlay-hero {
      padding: 3rem 2rem 2rem;
      background: linear-gradient(100deg, var(--teal-dark), var(--teal));
      color: #f4f1ea;
      border-radius: 6px 6px 0 0;
    }

    .overlay-hero h2 {
      font-family: 'Fraunces', serif;
      font-weight: 400;
      font-size: clamp(1.8rem, 3.2vw, 2.6rem);
      line-height: 1.1;
      letter-spacing: -0.01em;
      margin-bottom: 0.8rem;
    }

    .overlay-hero .overlay-sys {
      font-size: 0.9rem;
      opacity: 0.85;
      font-weight: 500;
    }

    .overlay-section {
      padding: 2.5rem 2rem;
      border-bottom: 1px solid var(--line);
    }

    .overlay-section:last-of-type {
      border-bottom: none;
    }

    .overlay-section h3 {
      font-family: 'Fraunces', serif;
      font-weight: 400;
      font-size: 1.25rem;
      margin-bottom: 0.8rem;
    }

    .overlay-section p {
      color: var(--text-soft);
      line-height: 1.7;
      font-size: 0.98rem;
    }

    .overlay-kpis {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 1.2rem;
      margin-top: 1.5rem;
    }

    .overlay-kpi {
      background: var(--bg-card);
      border: 1px solid var(--bg-card-border);
      border-radius: 6px;
      padding: 1.4rem;
      text-align: center;
    }

    .overlay-kpi .kpi-val {
      font-family: 'Fraunces', serif;
      font-size: 1.8rem;
      color: var(--teal);
      font-weight: 400;
      display: block;
      margin-bottom: 0.3rem;
    }

    body[data-theme="dark"] .overlay-kpi .kpi-val {
      color: var(--teal-light);
    }

    .overlay-kpi .kpi-label {
      font-size: 0.78rem;
      color: var(--text-soft);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .overlay-graphs {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1.5rem;
      margin-top: 1.5rem;
    }

    .overlay-graph {
      background: var(--bg-card);
      border: 1px solid var(--bg-card-border);
      border-radius: 6px;
      padding: 1rem;
      overflow: hidden;
    }

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

    .overlay-close {
      position: absolute;
      top: 1.5rem;
      right: 1.5rem;
      background: none;
      border: none;
      color: #fff;
      font-size: 1.8rem;
      cursor: pointer;
      opacity: 0.7;
      transition: opacity .2s;
    }

    .overlay-close:hover {
      opacity: 1;
    }

    .overlay-cta {
      padding: 2.5rem 2rem;
      text-align: center;
    }

    .overlay-cta .btn {
      font-size: 1rem;
      padding: 1rem 2rem;
    }

    /* ===================== ARTICLE CONTENT ===================== */
    .case-articles {
      display: none;
    }

    .case-article {
      margin-top: 4rem;
      padding-top: 2rem;
      border-top: 1px solid var(--line);
    }

    /* stats row */
    .stats-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 2rem;
      margin-top: 3rem;
    }

    .stat {
      text-align: left;
      cursor: pointer;
    }

    .stat b {
      display: block;
      font-family: 'Fraunces';
      font-size: clamp(2.4rem, 4vw, 3.4rem);
      color: var(--teal);
      line-height: 1;
      font-weight: 400;
    }

    body[data-theme="dark"] .stat b {
      color: var(--teal-light);
    }

    .stat span {
      display: block;
      margin-top: 0.5rem;
      color: var(--text-soft);
      font-size: 0.9rem;
      font-weight: 500;
    }

    /* financial impact */
    .fin-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 1.5rem;
      margin-top: 3rem;
    }

    .fin-card {
      padding: 1.8rem;
      border-radius: 6px;
      border: 1px solid var(--bg-card-border);
      background: var(--bg-card);
      cursor: pointer;
    }

    .fin-card .fin-val {
      font-family: 'Fraunces';
      font-size: 1.9rem;
      color: var(--teal);
      margin-bottom: 0.3rem;
      font-weight: 400;
    }

    body[data-theme="dark"] .fin-card .fin-val {
      color: var(--teal-light);
    }

    .fin-card .fin-lbl {
      font-size: 0.8rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--amber);
      font-weight: 700;
      margin-bottom: 0.6rem;
    }

    .fin-card p {
      font-size: 0.86rem;
      color: var(--text-soft);
      line-height: 1.5;
    }

    /* leadership */
    .team-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 1.4rem;
      margin-top: 3rem;
    }

    .team-card {
      background: var(--bg-card);
      border: 1px solid var(--bg-card-border);
      padding: 1.6rem;
      border-radius: 6px;
      transition: border-color .3s;
    }

    .team-card:hover {
      border-color: var(--teal);
    }

    .team-card .t-name {
      font-weight: 800;
      font-size: 1.05rem;
      letter-spacing: -0.01em;
    }

    .team-card .t-role {
      color: var(--teal);
      font-size: 0.84rem;
      font-weight: 600;
      margin: 0.3rem 0 0.6rem;
    }

    body[data-theme="dark"] .team-card .t-role {
      color: var(--teal-light);
    }

    .team-card .t-desc {
      color: var(--text-soft);
      font-size: 0.84rem;
      line-height: 1.5;
    }

    /* testimonial */
    .testimonial {
      margin-top: 3rem;
      max-width: 760px;
      padding: 2.4rem;
      border-left: 3px solid var(--teal);
      background: var(--bg-card);
      border-radius: 0 6px 6px 0;
    }

    .testimonial p {
      font-family: 'Fraunces';
      font-size: clamp(1.2rem, 2.2vw, 1.6rem);
      line-height: 1.4;
      font-weight: 400;
      font-style: italic;
    }

    .testimonial cite {
      display: block;
      margin-top: 1.2rem;
      font-style: normal;
      color: var(--teal);
      font-size: 0.88rem;
      font-weight: 600;
      letter-spacing: 0.02em;
    }

    body[data-theme="dark"] .testimonial cite {
      color: var(--teal-light);
    }

    /* differentiation */
    .diff-list {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 1.2rem;
      margin-top: 2.5rem;
    }

    .diff-item {
      display: flex;
      gap: 0.9rem;
      align-items: flex-start;
      cursor: pointer;
    }

    .diff-item .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--teal);
      margin-top: 0.5rem;
      flex-shrink: 0;
    }

    .diff-item p {
      color: var(--text-soft);
      font-size: 0.95rem;
      line-height: 1.5;
    }

    .diff-item b {
      color: var(--text);
      font-weight: 700;
    }

    /* contact */
    .contact-wrap {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4rem;
      margin-top: 3rem;
      align-items: start;
    }

    @media(max-width:820px) {
      .contact-wrap {
        grid-template-columns: 1fr;
        gap: 2.5rem;
      }
    }

    .contact-form {
      display: grid;
      gap: 0.9rem;
    }

    .contact-form .row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.9rem;
    }

    @media(max-width:560px) {
      .contact-form .row {
        grid-template-columns: 1fr;
      }
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
      background: var(--bg);
      border: 1px solid var(--bg-card-border);
      color: var(--text);
      padding: 0.85rem 1rem;
      border-radius: 4px;
      font-family: 'Archivo';
      font-size: 0.92rem;
      width: 100%;
      transition: border-color .2s;
    }

    .contact-form input:focus,
    .contact-form select:focus,
    .contact-form textarea:focus {
      outline: none;
      border-color: var(--teal);
    }

    .contact-form label {
      font-size: 0.72rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-faint);
      font-weight: 700;
      margin-bottom: -0.3rem;
    }

    /* Form submission feedback */
    .contact-form.submitting button {
      opacity: 0.6;
      pointer-events: none;
    }

    .form-message {
      padding: 1rem;
      border-radius: 6px;
      margin-top: 1rem;
      font-size: 0.9rem;
      display: none;
    }

    .form-message.show {
      display: block;
    }

    .form-message.success {
      background: rgba(63, 157, 111, 0.1);
      border: 1px solid var(--teal);
      color: var(--teal);
    }

    .form-message.error {
      background: rgba(255, 86, 86, 0.1);
      border: 1px solid #ff5656;
      color: #ff5656;
    }

    .contact-info .ci-block {
      margin-bottom: 1.6rem;
    }

    .contact-info .ci-label {
      font-size: 0.72rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--teal);
      font-weight: 700;
      margin-bottom: 0.4rem;
    }

    body[data-theme="dark"] .contact-info .ci-label {
      color: var(--teal-light);
    }

    .contact-info .ci-val {
      font-size: 1.02rem;
      color: var(--text);
      font-weight: 500;
      line-height: 1.5;
    }

    .contact-info .ci-val a {
      color: var(--text);
      text-decoration: none;
      border-bottom: 1px solid var(--teal);
    }



    /* homepage SEO preview sections */
    .software-grid,
    .faq-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 1.2rem;
      margin-top: 2.5rem;
    }

    .software-item,
    .faq-item {
      background: var(--bg-card);
      border: 1px solid var(--bg-card-border);
      border-radius: 6px;
      padding: 1.45rem;
      transition: border-color .3s, background .3s;
      cursor: pointer;
    }

    .software-item:hover,
    .faq-item:hover {
      border-color: var(--teal);
      background: var(--bg-card-hover);
    }

    .software-item h3,
    .faq-item h3 {
      font-size: 1rem;
      font-weight: 800;
      margin-bottom: 0.55rem;
      letter-spacing: -0.01em;
    }

    .software-item p,
    .faq-item p {
      color: var(--text-soft);
      font-size: 0.9rem;
      line-height: 1.6;
    }

    .cta-band {
      margin-top: 3rem;
      padding: 2rem;
      border-radius: 6px;
      background: linear-gradient(100deg, var(--teal-dark), var(--teal));
      color: #f4f1ea;
      display: flex;
      justify-content: space-between;
      gap: 1.5rem;
      align-items: center;
      flex-wrap: wrap;
    }

    .cta-band h3 {
      font-family: 'Fraunces';
      font-size: clamp(1.25rem, 2.2vw, 1.75rem);
      font-weight: 400;
      line-height: 1.15;
    }

    .cta-band p {
      color: rgba(244, 241, 234, 0.78);
      line-height: 1.6;
      max-width: 620px;
      margin-top: 0.5rem;
    }

    .cta-band .btn {
      background: #f4f1ea;
      color: var(--teal-dark);
    }

    .cta-band .btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.5);
    }

    /* ===================== AI CHATBOT ===================== */
    .ai-chat-section {
      padding: 5rem 6vw;
      background: var(--bg);
      border-top: 1px solid var(--line);
      transition: background .5s, border-color .5s;
    }

    .ai-chat-shell {
      display: grid;
      grid-template-columns: 0.9fr 1.35fr;
      gap: 2.5rem;
      align-items: start;
    }

    .ai-chat-copy h2 {
      font-family: 'Fraunces', serif;
      font-weight: 400;
      font-size: clamp(1.7rem, 3vw, 2.55rem);
      line-height: 1.08;
      letter-spacing: -0.01em;
      margin-bottom: 1rem;
    }

    .ai-chat-copy p {
      color: var(--text-soft);
      line-height: 1.7;
      max-width: 520px;
      font-size: 1rem;
    }

    .ai-chat-prompts {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-top: 1.6rem;
    }

    .ai-chat-prompts button {
      font-family: 'Archivo';
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--teal);
      background: var(--bg-card);
      border: 1px solid var(--bg-card-border);
      border-radius: 100px;
      padding: 0.48rem 0.8rem;
      cursor: pointer;
      transition: color .2s, border-color .2s, background .2s;
    }

    .ai-chat-prompts button:hover {
      border-color: var(--teal);
      background: var(--bg-card-hover);
    }

    .ai-chatbot {
      background: var(--bg-card);
      border: 1px solid var(--bg-card-border);
      border-radius: 6px;
      overflow: hidden;
      box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.55);
    }

    .ai-chat-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: 1rem 1.2rem;
      border-bottom: 1px solid var(--bg-card-border);
      background: var(--bg-soft);
    }

    .ai-chat-title {
      display: flex;
      align-items: center;
      gap: 0.7rem;
      font-weight: 800;
      color: var(--text);
    }

    .ai-chat-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--teal);
      box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.12);
    }

    .ai-chat-status {
      font-size: 0.72rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--amber);
      font-weight: 800;
    }

    .ai-chat-log {
      height: 330px;
      overflow: auto;
      padding: 1.1rem;
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
      scroll-behavior: smooth;
    }

    .ai-msg {
      max-width: 86%;
      padding: 0.85rem 0.95rem;
      border-radius: 6px;
      line-height: 1.55;
      font-size: 0.91rem;
    }

    .ai-msg.bot {
      align-self: flex-start;
      background: var(--bg-soft);
      border: 1px solid var(--bg-card-border);
      color: var(--text-soft);
    }

    .ai-msg.user {
      align-self: flex-end;
      background: var(--teal);
      color: #fff;
    }

    .ai-msg b {
      color: var(--text);
      font-weight: 800;
    }

    .ai-msg.user b {
      color: #fff;
    }

    .ai-chat-form {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 0.7rem;
      padding: 1rem;
      border-top: 1px solid var(--bg-card-border);
      background: var(--bg);
    }

    .ai-chat-form input {
      background: var(--bg-soft);
      border: 1px solid var(--bg-card-border);
      color: var(--text);
      padding: 0.85rem 1rem;
      border-radius: 4px;
      font-family: 'Archivo';
      font-size: 0.92rem;
      min-width: 0;
    }

    .ai-chat-form input:focus {
      outline: none;
      border-color: var(--teal);
    }

    .ai-chat-form button {
      font-family: 'Archivo';
      font-weight: 800;
      font-size: 0.86rem;
      background: var(--teal);
      color: #fff;
      border: none;
      border-radius: 4px;
      padding: 0.85rem 1.2rem;
      cursor: pointer;
      transition: background .2s, transform .2s;
    }

    .ai-chat-form button:hover {
      background: var(--teal-light);
      transform: translateY(-1px);
    }

    @media(max-width:900px) {
      .ai-chat-shell {
        grid-template-columns: 1fr;
      }

      .ai-chat-log {
        height: 300px;
      }
    }

    @media(max-width:560px) {
      .ai-chat-section {
        padding: 4rem 6vw;
      }

      .ai-chat-form {
        grid-template-columns: 1fr;
      }

      .ai-msg {
        max-width: 100%;
      }
    }

    footer {
      padding: 4rem 6vw 5.5rem;
      border-top: 1px solid var(--line);
      background: var(--bg-soft);
      color: var(--text-soft);
      font-size: 0.9rem;
      transition: background .5s, border-color .5s;
    }

    .footer-shell {
      display: grid;
      grid-template-columns: 1.15fr 2fr;
      gap: 3rem;
      align-items: start;
    }

    .footer-brand .logo {
      font-size: 1.05rem;
      margin-bottom: 1rem;
    }

    .footer-brand p {
      max-width: 360px;
      line-height: 1.7;
      color: var(--text-soft);
    }

    .footer-kicker {
      font-size: 0.68rem;
      letter-spacing: 0.24em;
      text-transform: uppercase;
      color: var(--teal);
      font-weight: 800;
      margin-bottom: 0.8rem;
    }

    body[data-theme="dark"] .footer-kicker {
      color: var(--teal-light);
    }

    .footer-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(150px, 1fr));
      gap: 1rem;
      justify-content: end;
      width: max-content;
      margin-left: auto;
    }

    .footer-card {
      background: var(--bg-card);
      border: 1px solid var(--bg-card-border);
      border-radius: 6px;
      padding: 1.35rem;
      min-height: 100%;
    }

    .footer-card h3 {
      font-size: 0.74rem;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--amber);
      font-weight: 800;
      margin-bottom: 0.85rem;
    }

    .footer-card a,
    .footer-card span {
      display: block;
      color: var(--text-soft);
      text-decoration: none;
      line-height: 1.7;
      font-size: 0.88rem;
    }

    .footer-card a {
      cursor: pointer;
      transition: color .2s;
    }

    .footer-card a:hover {
      color: var(--teal);
    }

    .footer-card strong {
      display: block;
      font-family: 'Fraunces';
      font-size: 1.55rem;
      font-weight: 400;
      line-height: 1;
      color: var(--teal);
      margin-bottom: 0.25rem;
    }

    body[data-theme="dark"] .footer-card strong {
      color: var(--teal-light);
    }

    .footer-bottom {
      margin-top: 2rem;
      padding-top: 1.4rem;
      border-top: 1px solid var(--line);
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
      color: var(--text-faint);
      font-size: 0.8rem;
    }

    .footer-bottom b {
      color: var(--text);
      font-weight: 700;
    }

    @media(max-width:900px) {
      .footer-shell {
        grid-template-columns: 1fr;
        gap: 2rem;
      }

      .footer-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
      }
    }

    @media(max-width:560px) {
      footer {
        padding: 3.2rem 6vw 5rem;
      }

      .footer-grid {
        grid-template-columns: 1fr;
      }

      .footer-bottom {
        flex-direction: column;
      }
    }


    /* extra top breathing room below fixed navigation */
    .page-section:not([data-pageid="home"])>section:first-child {
      padding-top: 8rem;
    }

    @media(max-width:560px) {
      .page-section:not([data-pageid="home"])>section:first-child {
        padding-top: 7rem;
      }
    }

    .page-section {
      display: none;
    }

    .page-section.active {
      display: block;
      animation: fadeIn .5s;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

      to {
        opacity: 1;
        transform: none;
      }
    }

    /* ===================== CONTROL PANEL ===================== */
    .control-panel {
      position: fixed;
      bottom: 1.2rem;
      left: 50%;
      transform: translateX(-50%);
      z-index: 60;
      display: flex;
      gap: 0.5rem;
      align-items: center;
      flex-wrap: wrap;
      justify-content: center;
      background: rgba(12, 20, 20, 0.88);
      backdrop-filter: blur(16px);
      border: 1px solid rgba(244, 241, 234, 0.14);
      padding: 0.5rem 0.6rem;
      border-radius: 14px;
      box-shadow: 0 20px 60px -16px rgba(0, 0, 0, 0.75);
      max-width: 94vw;
    }

    .cp-group {
      display: flex;
      gap: 0.25rem;
      align-items: center;
    }

    .cp-label {
      font-size: 0.6rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(244, 241, 234, 0.45);
      font-weight: 700;
      margin: 0 0.4rem 0 0.5rem;
    }

    .cp-divider {
      width: 1px;
      height: 22px;
      background: rgba(244, 241, 234, 0.14);
      margin: 0 0.3rem;
    }

    .control-panel button {
      font-family: 'Archivo';
      font-size: 0.72rem;
      font-weight: 600;
      color: rgba(244, 241, 234, 0.6);
      background: transparent;
      border: none;
      padding: 0.5rem 0.8rem;
      border-radius: 9px;
      cursor: pointer;
      transition: color .2s, background .2s;
      white-space: nowrap;
    }

    .control-panel button.active {
      background: var(--accent);
      color: #fff;
    }

    .control-panel button:hover:not(.active) {
      color: #fff;
    }

    .pal-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
    }

    .pal-btn i {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      display: inline-block;
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
    }

    .cp-toggle-note {
      position: fixed;
      bottom: 5rem;
      left: 50%;
      transform: translateX(-50%);
      z-index: 59;
      font-size: 0.68rem;
      color: rgba(244, 241, 234, 0.5);
      background: rgba(12, 20, 20, 0.7);
      padding: 0.35rem 0.9rem;
      border-radius: 100px;
      pointer-events: none;
      opacity: 0;
      transition: opacity .3s;
    }

    @media(max-width:680px) {
      .cp-label {
        display: none;
      }

      .control-panel {
        gap: 0.3rem;
      }
    }

    /* hide control panel for finalized site (keeps DOM & handlers intact but invisible) */
    .control-panel,
    .cp-toggle-note {
      display: none !important;
    }

    /* ===================== MOBILE OPTIMIZATION (Phase 1.5) ===================== */
    /* Global safety: keep media and the page from overflowing horizontally. */
    html { overflow-x: hidden; }

    img {
      max-width: 100%;
      height: auto;
    }

    /* Logo scales down so it never exceeds the viewport on small screens. */
    @media (max-width: 880px) {
      .logo .mark-wrap { width: 210px; height: 53px; }
      .logo .logo-aura { width: 230px; height: 90px; }
    }

    @media (max-width: 480px) {
      nav { padding: 0.85rem 5vw; }
      .logo .mark-wrap { width: 168px; height: 42px; }
      .logo .logo-aura { width: 185px; height: 72px; }
    }

    /* Footer columns stretch full width on tablet/mobile (no right-aligned max-content). */
    @media (max-width: 900px) {
      .footer-grid {
        width: auto;
        margin-left: 0;
      }
    }

    /* Prevent iOS Safari from auto-zooming when a form field gains focus
       (any input below 16px triggers the zoom). */
    @media (max-width: 640px) {
      .contact-form input,
      .contact-form select,
      .contact-form textarea,
      .ai-chat-form input {
        font-size: 16px;
      }
    }

