:root{
    --graphite:#111315;
    --off-white:#F5F4F0;
    --steel:#72777D;
    --border:#D8D6D1;
    --copper:#9A6846;

    --graphite-92: rgba(17,19,21,0.92);
    --graphite-06: rgba(17,19,21,0.06);
    --graphite-10: rgba(17,19,21,0.10);
    --off-white-08: rgba(245,244,240,0.08);
    --off-white-14: rgba(245,244,240,0.14);
    --off-white-60: rgba(245,244,240,0.60);

    --max: 1200px;
    --gutter: clamp(20px, 5vw, 64px);
    --radius: 6px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;
  }

  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;}
  body{
    margin:0;
    background:var(--off-white);
    color:var(--graphite);
    font-family:var(--font-sans);
    -webkit-font-smoothing:antialiased;
    line-height:1.5;
  }
  img,svg{display:block; max-width:100%;}
  a{color:inherit; text-decoration:none;}
  ul{margin:0; padding:0; list-style:none;}
  h1,h2,h3,p{margin:0;}
  .wrap{
    max-width:var(--max);
    margin:0 auto;
    padding-left:var(--gutter);
    padding-right:var(--gutter);
  }
  .eyebrow{
    font-family:var(--font-mono);
    font-size:12px;
    letter-spacing:0.11em;
    text-transform:uppercase;
    color:var(--copper);
    display:flex;
    align-items:center;
    gap:10px;
  }
  .eyebrow::before{
    content:"";
    width:16px; height:1px;
    background:var(--copper);
    display:inline-block;
  }
  .eyebrow.on-dark{ color:#C79A78; }

  :focus-visible{
    outline:2px solid var(--copper);
    outline-offset:3px;
  }

  /* ===== Header ===== */
  header{
    position:sticky; top:0; z-index:100;
    background:rgba(245,244,240,0.82);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    border-bottom:1px solid transparent;
    transition:border-color .25s ease, background .25s ease;
  }
  header.scrolled{
    border-bottom-color:var(--border);
    background:rgba(245,244,240,0.94);
  }
  .nav{
    display:flex; align-items:center; justify-content:space-between;
    padding-top:20px; padding-bottom:20px;
  }
  .wordmark{
    font-weight:700; font-size:17px; letter-spacing:0.02em; white-space:nowrap;
  }
  .wordmark span{ color:var(--copper); }
  .nav-links{
    display:flex; align-items:center; gap:28px; flex-shrink:0;
  }
  .nav-links a{
    font-size:14px; color:var(--graphite); opacity:0.72;
    transition:opacity .15s ease;
    position:relative; white-space:nowrap;
  }
  .nav-links a:hover{ opacity:1; }
  .nav-cta{
    display:inline-flex; align-items:center; white-space:nowrap; flex-shrink:0;
    font-size:13px; font-weight:600;
    padding:11px 20px;
    background:var(--graphite); color:var(--off-white);
    border-radius:4px;
    border:1px solid var(--graphite);
    transition:background .15s ease, border-color .15s ease, color .15s ease;
  }
  .nav-cta:hover{ background:#26292c; border-color:#26292c; }
  .menu-btn{ display:none; }

  .lang-switch{
    display:flex; align-items:center; gap:6px; flex-shrink:0; white-space:nowrap;
    font-family:var(--font-mono); font-size:12px; letter-spacing:.02em;
    margin-right:20px;
  }
  .lang-switch .lang-sep{ color:var(--border); }
  .lang-switch .lang-link{
    color:var(--steel); opacity:.85; transition:opacity .15s ease, color .15s ease;
    padding:2px 1px;
  }
  .lang-switch .lang-link:hover{ opacity:1; color:var(--graphite); }
  .lang-switch .lang-link.active{ color:var(--copper); opacity:1; font-weight:600; }

  /* ===== Buttons ===== */
  .btn{
    display:inline-flex; align-items:center; gap:8px;
    font-size:14px; font-weight:600;
    padding:14px 24px;
    border-radius:4px;
    border:1px solid transparent;
    transition:all .15s ease;
    cursor:pointer;
  }
  .btn-primary{
    background:var(--graphite); color:var(--off-white); border-color:var(--graphite);
  }
  .btn-primary:hover{ background:#26292c; border-color:#26292c; }
  .btn-ghost{
    background:transparent; color:var(--graphite); border-color:var(--border);
  }
  .btn-ghost:hover{ border-color:var(--graphite); }
  .btn-on-dark{
    background:var(--off-white); color:var(--graphite); border-color:var(--off-white);
  }
  .btn-on-dark:hover{ background:#e4e2db; border-color:#e4e2db; }
  .btn-ghost-dark{
    background:transparent; color:var(--off-white); border-color:var(--off-white-14);
  }
  .btn-ghost-dark:hover{ border-color:var(--off-white-60); }
  .cta-email-link{
    display:inline-flex; align-items:center;
    font-size:14px; color:var(--off-white-60);
    text-decoration:underline; text-underline-offset:3px;
    transition:color .15s ease;
  }
  .cta-email-link:hover{ color:var(--off-white); }
  .btn .arrow{ transition:transform .15s ease; }
  .btn:hover .arrow{ transform:translateX(3px); }

  /* ===== Hero ===== */
  .hero{
    padding-top:clamp(56px, 9vw, 108px);
    padding-bottom:clamp(56px, 9vw, 108px);
  }
  .hero-grid{
    display:grid;
    grid-template-columns:1.35fr 1fr;
    gap:clamp(32px, 6vw, 72px);
    align-items:center;
  }
  .hero h1{
    margin-top:22px;
    font-size:clamp(34px, 4.4vw, 54px);
    line-height:1.08;
    letter-spacing:-0.02em;
    font-weight:700;
    max-width:15ch;
  }
  .hero h1 em{
    font-style:normal;
    color:var(--copper);
  }
  .hero p.lede{
    margin-top:22px;
    font-size:17px;
    color:#3c3f42;
    max-width:46ch;
    line-height:1.65;
  }
  .hero-ctas{
    margin-top:34px;
    display:flex; gap:14px; flex-wrap:wrap;
  }
  .hero-meta{
    margin-top:44px;
    display:flex; gap:32px; flex-wrap:wrap;
    padding-top:24px;
    border-top:1px solid var(--border);
  }
  .hero-meta div{ font-size:13px; color:var(--steel); }
  .hero-meta strong{
    display:block; color:var(--graphite); font-size:20px; font-weight:700; margin-bottom:2px;
  }

  .hero-visual{ position:relative; }
  .hero-visual svg{ width:100%; height:auto; }

  .node{ fill:var(--off-white); stroke:var(--graphite); stroke-width:1.2; }
  .node-copper{ stroke:var(--copper); }
  .link{ stroke:var(--border); stroke-width:1.2; fill:none; }
  .link-active{ stroke:var(--steel); stroke-width:1.2; fill:none; stroke-dasharray:4 4; }
  .pulse{ fill:var(--copper); }
  .node-label{ font-family:var(--font-mono); font-size:8.5px; fill:var(--steel); letter-spacing:.02em; }

  @media (prefers-reduced-motion: no-preference){
    .link-active{ animation:dash 22s linear infinite; }
    @keyframes dash{ to{ stroke-dashoffset:-200; } }
    .pulse{ animation:pulse 3.2s ease-in-out infinite; }
    @keyframes pulse{ 0%,100%{ opacity:.35; } 50%{ opacity:1; } }
  }

  /* ===== Section shell ===== */
  section{ padding-top:clamp(64px,9vw,112px); padding-bottom:clamp(64px,9vw,112px); }
  .section-head{
    display:flex; justify-content:space-between; align-items:flex-end; gap:32px;
    margin-bottom:clamp(40px,5vw,64px);
    flex-wrap:wrap;
  }
  .section-head h2{
    margin-top:16px;
    font-size:clamp(26px,3vw,38px);
    letter-spacing:-0.01em;
    font-weight:700;
    max-width:18ch;
  }
  .section-head p{
    max-width:38ch; color:var(--steel); font-size:15px; line-height:1.6; padding-bottom:4px;
  }
  section.dark .section-head p{ color:var(--off-white-60); }
  section.dark .section-head h2{ color:var(--off-white); }

  /* ===== Services ===== */
  .service-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:1px;
    background:var(--border);
    border:1px solid var(--border);
  }
  .service-card{
    background:var(--off-white);
    padding:32px 28px;
    transition:background .18s ease;
    position:relative;
  }
  .service-card:hover{ background:#efeee9; }
  .service-num{
    font-family:var(--font-mono); font-size:12px; color:var(--copper); letter-spacing:.05em;
  }
  .service-card h3{
    margin-top:18px; font-size:18px; font-weight:700; letter-spacing:-0.01em;
  }
  .service-card p{
    margin-top:10px; font-size:14px; color:var(--steel); line-height:1.6;
  }
  .service-tags{
    margin-top:18px; display:flex; flex-wrap:wrap; gap:8px;
  }
  .service-tags span{
    font-family:var(--font-mono); font-size:10.5px; color:var(--steel);
    border:1px solid var(--border); border-radius:3px; padding:4px 8px;
  }
  .service-card::after{
    content:""; position:absolute; left:0; bottom:0; height:2px; width:0;
    background:var(--copper); transition:width .2s ease;
  }
  .service-card:hover::after{ width:100%; }

  /* ===== Approach (dark) ===== */
  section.dark{ background:var(--graphite); color:var(--off-white); }
  .timeline{
    display:grid;
    grid-template-columns:repeat(5, 1fr);
    gap:0;
    position:relative;
    margin-top:8px;
  }
  .timeline::before{
    content:"";
    position:absolute; top:11px; left:0; right:0; height:1px;
    background:var(--off-white-14);
  }
  .step{
    position:relative; padding-right:20px;
  }
  .step-dot{
    width:23px; height:23px; border-radius:50%;
    background:var(--graphite); border:1px solid var(--off-white-14);
    display:flex; align-items:center; justify-content:center;
    font-family:var(--font-mono); font-size:10px; color:var(--copper);
    position:relative; z-index:1;
  }
  .step h3{
    margin-top:22px; font-size:16px; font-weight:600;
  }
  .step p{
    margin-top:8px; font-size:13.5px; color:var(--off-white-60); line-height:1.6; max-width:26ch;
  }

  /* ===== Integration ===== */
  .integration{
    display:grid; grid-template-columns:1fr 1fr; gap:clamp(32px,6vw,72px); align-items:center;
  }
  .integration-copy p{
    color:var(--steel); font-size:15.5px; line-height:1.7; max-width:44ch;
  }
  .integration-list{ margin-top:28px; display:grid; gap:0; }
  .integration-list li{
    display:flex; align-items:center; gap:14px;
    padding:14px 0; border-bottom:1px solid var(--border);
    font-size:14.5px;
  }
  .integration-list li:first-child{ border-top:1px solid var(--border); }
  .integration-list .tag{
    font-family:var(--font-mono); font-size:10.5px; color:var(--copper);
  }

  .arch-svg .mod{ fill:var(--off-white); stroke:var(--border); stroke-width:1.2; }
  .arch-svg .mod-strong{ stroke:var(--graphite); }
  .arch-svg .mod-copper{ stroke:var(--copper); }
  .arch-svg .conn{ stroke:var(--border); stroke-width:1.2; fill:none; }
  .arch-svg text{ font-family:var(--font-mono); font-size:9px; fill:var(--steel); }

  /* ===== Products ===== */
  .product-grid{
    display:grid; grid-template-columns:repeat(3, 1fr); gap:1px;
    background:var(--border); border:1px solid var(--border);
  }
  .product-card{
    background:var(--off-white); padding:30px 24px; min-height:200px;
    display:flex; flex-direction:column; justify-content:space-between;
    transition:background .18s ease;
  }
  .product-card:hover{ background:#efeee9; }
  .product-card .tag{
    font-family:var(--font-mono); font-size:10px; color:var(--copper); letter-spacing:.04em;
  }
  .product-card h3{
    margin-top:14px; font-size:17px; font-weight:700;
  }
  .product-card p{
    margin-top:10px; font-size:13.5px; color:var(--steel); line-height:1.6;
  }
  .product-card .arrow-link{
    margin-top:18px; font-size:12.5px; font-weight:600; display:inline-flex; align-items:center; gap:6px;
  }

  /* ===== Final CTA (dark) ===== */
  .final-cta{ text-align:left; }
  .final-cta-inner{
    display:flex; justify-content:space-between; align-items:flex-end; gap:32px; flex-wrap:wrap;
  }
  .final-cta h2{
    font-size:clamp(28px,4vw,44px); font-weight:700; letter-spacing:-0.02em; max-width:16ch; line-height:1.12;
  }
  .final-cta p{ margin-top:16px; color:var(--off-white-60); font-size:15.5px; max-width:42ch; }
  .final-cta .ctas{ display:flex; gap:14px; flex-wrap:wrap; }

  /* ===== Footer ===== */
  footer{ background:var(--graphite); color:var(--off-white); border-top:1px solid var(--off-white-08); }
  .footer-grid{
    display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:40px;
    padding-top:56px; padding-bottom:32px;
  }
  footer .wordmark{ color:var(--off-white); }
  footer .foot-tagline{ margin-top:10px; font-size:13.5px; color:var(--off-white-60); max-width:32ch; line-height:1.6; }
  footer h4{
    font-family:var(--font-mono); font-size:11px; color:var(--off-white-60); letter-spacing:.08em; text-transform:uppercase; font-weight:400;
  }
  footer ul{ margin-top:18px; display:grid; gap:12px; }
  footer ul a{ font-size:14px; color:var(--off-white-60); transition:color .15s ease; }
  footer ul a:hover{ color:var(--off-white); }
  .footer-bottom{
    border-top:1px solid var(--off-white-08);
    padding-top:20px; padding-bottom:28px;
    display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px;
    font-size:12.5px; color:var(--off-white-60);
  }

  /* ===== Mobile ===== */
  @media (max-width: 900px){
    .hero-grid{ grid-template-columns:1fr; }
    .hero-visual{ order:-1; max-width:340px; margin:0 auto 8px; }
    .service-grid{ grid-template-columns:1fr; }
    .integration{ grid-template-columns:1fr; }
    .integration-visual{ order:-1; max-width:360px; margin:0 auto; }
    .product-grid{ grid-template-columns:1fr 1fr; }
    .timeline{ grid-template-columns:1fr; gap:28px; }
    .timeline::before{ display:none; }
    .step{ padding-right:0; padding-left:20px; border-left:1px solid var(--off-white-14); }
    .step-dot{ position:absolute; left:-11.5px; top:0; }
    .footer-grid{ grid-template-columns:1fr; gap:32px; }
  }
  @media (max-width: 720px){
    .nav{ position:relative; }
    .nav-links{
      display:none;
      position:absolute; top:100%; left:0; right:0;
      flex-direction:column; align-items:stretch; gap:0;
      background:var(--off-white); border-top:1px solid var(--border); border-bottom:1px solid var(--border);
      padding:4px var(--gutter) 24px;
      max-height:calc(100vh - 100%); overflow-y:auto;
    }
    header.menu-open .nav-links{ display:flex; }
    .nav-links > a{ padding:15px 0; border-bottom:1px solid var(--border); opacity:1; font-size:15px; }
    .nav-solutions{ border-bottom:1px solid var(--border); }
    .nav-solutions summary{ padding:15px 0; font-size:15px; opacity:1; }
    .nav-solutions .dropdown{
      position:static; border:none; padding:0 0 10px 14px; min-width:0; background:none;
    }
    .nav-links > a.nav-cta-mobile{
      display:inline-flex; align-items:center; justify-content:center; gap:8px;
      margin-top:16px; font-size:14px; font-weight:600; padding:13px 20px;
      background:var(--graphite); color:var(--off-white); border-radius:4px;
      opacity:1; border-bottom:none;
    }
    .menu-btn{
      display:flex; align-items:center; justify-content:center;
      width:38px; height:38px; border:1px solid var(--border); border-radius:4px; background:none;
      cursor:pointer; flex-shrink:0;
    }
    .nav-cta{ display:none; }
    .lang-switch{ margin-right:10px; font-size:11px; gap:4px; }
    .product-grid{ grid-template-columns:1fr; }
    .section-head{ flex-direction:column; align-items:flex-start; }
    .final-cta-inner{ flex-direction:column; align-items:flex-start; }
  }
  @media (min-width: 721px){
    .nav-cta-mobile{ display:none; }
  }

  /* ===== Solutions dropdown (nav) ===== */
  .nav-solutions{ position:relative; }
  .nav-solutions summary{
    cursor:pointer; list-style:none; display:flex; align-items:center; gap:5px;
    font-size:14px; color:var(--graphite); opacity:.72;
    transition:opacity .15s ease;
  }
  .nav-solutions summary::-webkit-details-marker{ display:none; }
  .nav-solutions summary::marker{ content:""; }
  .nav-solutions summary:hover{ opacity:1; }
  .nav-solutions[open] summary{ opacity:1; }
  .nav-solutions summary .caret{
    width:7px; height:7px; border-right:1.3px solid currentColor; border-bottom:1.3px solid currentColor;
    transform:rotate(45deg) translateY(-1px); transition:transform .15s ease;
  }
  .nav-solutions[open] summary .caret{ transform:rotate(-135deg) translateY(1px); }
  .nav-solutions .dropdown{
    position:absolute; top:calc(100% + 16px); left:0;
    background:var(--off-white); border:1px solid var(--border); border-radius:4px;
    padding:8px; min-width:230px; z-index:80;
  }
  .nav-solutions .dropdown a{
    display:block; padding:9px 10px; font-size:13px; color:var(--graphite); opacity:.82;
    border-radius:3px; transition:background .15s ease, opacity .15s ease;
  }
  .nav-solutions .dropdown a:hover{ background:var(--graphite-06); opacity:1; }
  .nav-solutions .dropdown-sep{ height:1px; background:var(--border); margin:6px 4px; }

  /* ===== Footer secondary list ===== */
  .footer-col-gap{ margin-top:28px; }

  /* ===== Landing page components ===== */
  .service-grid.cols-2{ grid-template-columns:repeat(2, 1fr); }
  .breadcrumb{
    font-family:var(--font-mono); font-size:11.5px; color:var(--steel);
    padding-top:18px; padding-bottom:0;
  }
  .breadcrumb a{ color:var(--steel); opacity:.85; }
  .breadcrumb a:hover{ opacity:1; color:var(--graphite); }
  .breadcrumb .sep{ margin:0 6px; color:var(--border); }
  .related-links{ margin-top:28px; display:flex; gap:14px; flex-wrap:wrap; }
  .related-links a{
    font-size:13.5px; font-weight:600; color:var(--graphite);
    border:1px solid var(--border); border-radius:4px; padding:10px 16px;
    display:inline-flex; align-items:center; gap:6px; transition:border-color .15s ease;
  }
  .related-links a:hover{ border-color:var(--copper); color:var(--copper); }

  /* ===== Engineering page components ===== */
  .term-pills{ display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }
  .term-pills span{
    font-family:var(--font-mono); font-size:12.5px; color:var(--steel);
    border:1px solid var(--border); border-radius:4px; padding:8px 14px;
  }

  .product-grid.cols-3{ grid-template-columns:repeat(3, 1fr); }

  /* Dark-section proof cards (Moseisley engineering breakdown) */
  .proof-grid{
    display:grid; grid-template-columns:repeat(2, 1fr); gap:1px;
    background:var(--off-white-08); border:1px solid var(--off-white-14);
    margin-top:40px;
  }
  .proof-card{
    background:var(--graphite); padding:28px 26px;
    transition:background .18s ease;
  }
  .proof-card:hover{ background:#1a1c1f; }
  .proof-num{ font-family:var(--font-mono); font-size:12px; color:var(--copper); letter-spacing:.05em; }
  .proof-card h4{ margin-top:14px; font-size:15.5px; font-weight:700; color:var(--off-white); }
  .proof-card p{ margin-top:8px; font-size:13.5px; color:var(--off-white-60); line-height:1.6; }

  /* Moseisley execution loop */
  .loop-flow{
    display:flex; flex-wrap:wrap; align-items:center; gap:10px;
    margin-top:28px; padding:24px; border:1px solid var(--off-white-14); border-radius:6px;
  }
  .loop-flow .node{
    font-family:var(--font-mono); font-size:12px; color:var(--off-white);
    border:1px solid var(--off-white-14); border-radius:4px; padding:8px 14px;
    background:var(--off-white-08);
  }
  .loop-flow .arrow{ color:var(--copper); font-size:14px; }

  /* Pull-quote / emphasis line (Security & Control closing) */
  .pull-quote{
    margin-top:24px; padding-left:20px; border-left:2px solid var(--copper);
    font-size:16px; color:var(--graphite); line-height:1.6; max-width:52ch;
  }
  section.dark .pull-quote{ color:var(--off-white); border-left-color:var(--copper); }

  /* Stack grid (Engineering stack section) */
  .stack-grid{
    display:grid; grid-template-columns:repeat(3, 1fr); gap:40px 32px;
    margin-top:40px;
  }
  .stack-group .eyebrow{ margin-bottom:0; }
  .stack-group .term-pills{ margin-top:16px; }

  @media (max-width: 900px){
    .proof-grid{ grid-template-columns:1fr; }
    .stack-grid{ grid-template-columns:1fr 1fr; }
    .product-grid.cols-3{ grid-template-columns:1fr 1fr; }
  }
  @media (max-width: 640px){
    .stack-grid{ grid-template-columns:1fr; }
    .product-grid.cols-3{ grid-template-columns:1fr; }
  }

  .nav-links a.active-nav{ color:var(--graphite); opacity:1; font-weight:600; }

  /* ===== Demo page components ===== */
  .live-badge{
    display:inline-flex; align-items:center; gap:6px;
    font-family:var(--font-mono); font-size:11px; letter-spacing:.06em;
    color:var(--copper); margin-bottom:18px;
  }
  .live-badge .dot{
    width:6px; height:6px; border-radius:50%; background:var(--copper);
  }
  @media (prefers-reduced-motion: no-preference){
    .live-badge .dot{ animation:live-pulse 1.8s ease-in-out infinite; }
    @keyframes live-pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.35; } }
  }
  .demo-block{ max-width:640px; }
  .demo-block .demo-num{
    font-family:var(--font-mono); font-size:13px; color:var(--copper); letter-spacing:.04em;
  }
  .demo-block h2{ margin-top:14px; }
  .demo-block .lede{ margin-top:16px; }
  .demo-ctas{ margin-top:28px; display:flex; flex-direction:column; align-items:flex-start; gap:14px; }
  .demo-ctas .demo-note{ font-size:13.5px; color:var(--steel); max-width:52ch; }
  section.dark .demo-ctas .demo-note{ color:var(--off-white-60); }

  /* WhatsApp CTA — brand color exception for this specific external link only */
  .btn-whatsapp{
    background:#25D366; color:#0b1a10; border-color:#25D366;
  }
  .btn-whatsapp:hover{ background:#1fbd5a; border-color:#1fbd5a; }
