/* ============================================================
   Nesma & Partners — portal landing page
   ============================================================ */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:var(--font);color:var(--ink-900);overflow-x:hidden;
  background:
    radial-gradient(1100px 620px at 78% -10%, rgba(245,129,30,.07), transparent 60%),
    radial-gradient(900px 560px at 8% 110%, rgba(88,88,90,.08), transparent 60%),
    linear-gradient(180deg,#FBFCFD 0%,#F2F4F7 100%);
  display:flex;flex-direction:column;min-height:100%}
#field{position:fixed;inset:0;z-index:0}

/* ---------- header / footer ---------- */
.top{position:relative;z-index:2;display:flex;justify-content:space-between;align-items:center;
     padding:20px 34px 0}
.crumb{font-size:11.5px;font-weight:600;letter-spacing:1.6px;text-transform:uppercase;color:var(--ink-400)}
.crumb.r{color:var(--brand-600)}
.btm{position:relative;z-index:2;text-align:center;padding:22px 30px 26px;font-size:11.5px;
     color:var(--ink-400);line-height:1.6}
.btm b{color:var(--ink-500)}

/* ---------- hero ---------- */
.stage{position:relative;z-index:2;flex:1;display:flex;flex-direction:column;align-items:center;
       justify-content:center;padding:30px 24px 10px}
.hero{text-align:center;animation:rise .9s cubic-bezier(.22,1,.36,1) both}
.logowrap{display:inline-flex;padding:26px 44px;border-radius:26px;
  background:rgba(255,255,255,.72);backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 24px 60px rgba(28,32,38,.10), 0 2px 8px rgba(28,32,38,.05),
             inset 0 1px 0 rgba(255,255,255,.9);
  animation:float 7s ease-in-out infinite}
.logowrap img{height:74px;width:auto;display:block}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
.hero h1{margin-top:30px;font-size:44px;font-weight:800;letter-spacing:-1.4px;color:var(--ink-900)}
.hero h1 span{color:var(--brand);font-weight:700}
.rule{display:flex;align-items:center;justify-content:center;gap:10px;margin:16px auto 0;width:280px}
.rule i{flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--line-2))}
.rule i:last-child{background:linear-gradient(90deg,var(--line-2),transparent)}
.rule b{width:9px;height:9px;background:var(--brand);border-radius:2px;transform:rotate(45deg);
        box-shadow:0 0 0 4px var(--brand-050)}
.sub{margin-top:15px;font-size:13.5px;letter-spacing:2.6px;text-transform:uppercase;
     color:var(--ink-500);font-weight:600}
@keyframes rise{from{opacity:0;transform:translateY(26px)}to{opacity:1;transform:none}}

/* ---------- cards ---------- */
.cards{display:grid;grid-template-columns:repeat(3,minmax(250px,320px));gap:22px;
       margin:52px 0 34px;width:100%;max-width:1060px;justify-content:center}
@media(max-width:960px){.cards{grid-template-columns:minmax(250px,420px)}}
.card{position:relative;display:block;text-decoration:none;color:inherit;cursor:pointer;
  background:rgba(255,255,255,.78);backdrop-filter:blur(16px);
  border:1px solid rgba(255,255,255,.95);border-radius:20px;padding:30px 28px 22px;
  box-shadow:0 10px 34px rgba(28,32,38,.08), 0 2px 6px rgba(28,32,38,.04);
  transition:transform .32s cubic-bezier(.22,1,.36,1),box-shadow .32s,border-color .32s;
  overflow:hidden;animation:rise .9s cubic-bezier(.22,1,.36,1) both}
.card:nth-child(1){animation-delay:.10s}
.card:nth-child(2){animation-delay:.20s}
.card:nth-child(3){animation-delay:.30s}
.card:hover,.card:focus-visible{transform:translateY(-7px);
  box-shadow:0 26px 60px rgba(28,32,38,.14), 0 6px 16px rgba(245,129,30,.10);
  border-color:var(--brand-100);outline:none}
.card .glow{position:absolute;inset:0;opacity:0;transition:opacity .4s;pointer-events:none;
  background:radial-gradient(420px circle at var(--mx,50%) var(--my,20%),rgba(245,129,30,.12),transparent 65%)}
.card:hover .glow{opacity:1}
.card::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;
  background:linear-gradient(90deg,var(--brand),var(--brand-600));opacity:0;transition:opacity .3s}
.card:hover::before{opacity:1}
.icon{width:64px;height:64px;border-radius:17px;display:flex;align-items:center;justify-content:center;
  color:var(--ink-700);background:linear-gradient(160deg,#fff, #F3F5F8);
  border:1px solid var(--line);box-shadow:var(--e1);margin-bottom:19px;
  transition:transform .32s cubic-bezier(.22,1,.36,1),color .3s,box-shadow .3s}
.icon svg{width:36px;height:36px}
.card:hover .icon{transform:scale(1.07) rotate(-3deg);color:var(--ink-900);box-shadow:var(--e-brand)}
.card h2{font-size:19.5px;font-weight:800;letter-spacing:-.3px}
.card p{font-size:13px;color:var(--ink-500);line-height:1.6;margin-top:8px;min-height:63px}
.card .foot{display:flex;align-items:center;justify-content:space-between;margin-top:16px;
  padding-top:14px;border-top:1px solid var(--line)}
.status{display:inline-flex;align-items:center;gap:7px;font-size:11.5px;font-weight:600;color:var(--ink-400)}
.dot{width:7px;height:7px;border-radius:50%;background:var(--ink-300)}
.dot.on{background:#2E7D5B;box-shadow:0 0 0 0 rgba(46,125,91,.5);animation:pulse 2.4s infinite}
.dot.err{background:var(--sev-urg)}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(46,125,91,.45)}70%{box-shadow:0 0 0 6px rgba(46,125,91,0)}100%{box-shadow:0 0 0 0 rgba(46,125,91,0)}}
.go{font-size:12.5px;font-weight:700;color:var(--brand-600)}
.go b{display:inline-block;transition:transform .28s}
.card:hover .go b{transform:translateX(4px)}
.go.dim{color:var(--ink-300)}

/* under construction card */
.card.off{cursor:default}
.card.off .icon{color:var(--ink-400)}
.card.off h2,.card.off p{opacity:.62}
.card.off:hover{transform:translateY(-3px)}
.card.off.nudge{animation:nudge .5s ease}
@keyframes nudge{0%,100%{transform:translateX(0)}25%{transform:translateX(-7px)}
  55%{transform:translateX(6px)}80%{transform:translateX(-3px)}}

/* ---------- toast ---------- */
#toast{position:fixed;right:22px;bottom:22px;z-index:300;display:flex;flex-direction:column;gap:9px}
.tst{background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--brand);
     border-radius:var(--r);box-shadow:var(--e3);padding:12px 16px;min-width:260px;max-width:380px;
     animation:slideIn .34s cubic-bezier(.22,1,.36,1) both;font-size:13px}
.tst b{display:block;margin-bottom:2px}
.tst .s{color:var(--ink-500);font-size:12px}
@keyframes slideIn{from{opacity:0;transform:translateX(22px)}to{opacity:1;transform:none}}

@media(max-width:640px){
  .hero h1{font-size:32px}
  .logowrap img{height:54px}
  .top{padding:16px 18px 0}
  .crumb{letter-spacing:.8px}
}
@media (prefers-reduced-motion: reduce){
  *{animation:none !important;transition:none !important}
}

/* ---------- TW Inspection Portal — four cards ---------- */
.cards.four{grid-template-columns:repeat(4,minmax(210px,1fr));max-width:1240px}
.cards.four .card:nth-child(4){animation-delay:.40s}
@media(max-width:1180px){.cards.four{grid-template-columns:repeat(2,minmax(240px,340px))}}
@media(max-width:640px){.cards.four{grid-template-columns:minmax(240px,420px)}}
.card:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
