/* BSCleartech Tools: home page (sign-in and welcome). Colours match the proposal tool. */
:root{
  --brand:#0c3f2f; --brand-ink:#ffffff; --brand-soft:#e3efe8;
  --sun:#e8a317; --sun-deep:#c9860a; --sun-soft:#fdf2d8;
  --bg:#f2f4f2; --surface:#ffffff; --tile:#f6f8f7; --line:#dfe5e1;
  --fg:#14201b; --muted:#5d6e66; --label:#5b7083;
  --good:#1d7a4c; --bad:#b4372b;
  --f-display:"Archivo","Helvetica Neue",Arial,sans-serif;
  --f-body:"Source Sans 3","Segoe UI",system-ui,sans-serif;
  --f-num:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --brand:#0c3f2f; --brand-ink:#f2fbf6; --brand-soft:#173a2e;
  --sun:#f0b432; --sun-deep:#f0b432; --sun-soft:#3a2f14;
  --bg:#0f1513; --surface:#161e1b; --tile:#1c2622; --line:#2a3631;
  --fg:#e7eeea; --muted:#9db0a7; --label:#9fb3c4;
  --good:#5cc68f; --bad:#ee7b6f; color-scheme:dark;
}}
:root[data-theme="dark"]{
  --brand:#0c3f2f; --brand-ink:#f2fbf6; --brand-soft:#173a2e;
  --sun:#f0b432; --sun-deep:#f0b432; --sun-soft:#3a2f14;
  --bg:#0f1513; --surface:#161e1b; --tile:#1c2622; --line:#2a3631;
  --fg:#e7eeea; --muted:#9db0a7; --label:#9fb3c4;
  --good:#5cc68f; --bad:#ee7b6f; color-scheme:dark;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0}
body{background:var(--bg);color:var(--fg);font-family:var(--f-body);font-size:16px;line-height:1.5;min-height:100vh;display:flex;flex-direction:column}
body.is-in{background:radial-gradient(1200px 520px at 50% -140px, var(--sun-soft), transparent 70%), var(--bg)}
h1,h2{font-family:var(--f-display);margin:0;text-wrap:balance}
button{font:inherit;cursor:pointer}
a{color:inherit}
:focus-visible{outline:3px solid var(--sun);outline-offset:3px}
.label{font-family:var(--f-display);font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--label)}
.muted{color:var(--muted);margin:0}

/* ---------- Sign in ---------- */
.signin{flex:1;display:flex;align-items:flex-start;justify-content:center;padding:8vh 16px 40px}
.card-login{width:100%;max-width:440px;background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden;box-shadow:0 12px 34px rgba(12,63,47,.14)}
.band{background:var(--brand);color:var(--brand-ink);padding:28px;display:flex;align-items:center;gap:16px}
.band .logo{width:64px;height:64px;border-radius:10px;background:#fff;flex:none}
.brandname{font-family:var(--f-display);font-weight:800;font-size:26px;letter-spacing:.01em}
.sub{font-size:14px;letter-spacing:.08em;text-transform:uppercase;opacity:.85;margin-top:2px}
.login-body{padding:28px;display:flex;flex-direction:column;gap:16px}
.login-body h1{font-size:21px}
.field{display:flex;flex-direction:column;gap:6px}
.field input{font:inherit;font-size:17px;padding:11px 12px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--fg);width:100%}
.field input:focus{border-color:var(--brand);outline:none;box-shadow:0 0 0 3px var(--brand-soft)}
.otp{font-family:var(--f-num);letter-spacing:.5em;text-align:center;font-size:22px!important}
.btn{background:var(--brand);color:#fff;border:0;border-radius:6px;padding:12px 16px;font-weight:600;font-size:16px}
.btn:hover{filter:brightness(1.15)}
.btn:disabled,.linkbtn:disabled{opacity:.55;cursor:wait}
.linkbtn{background:none;border:0;color:var(--good);padding:0;font-size:14px;text-decoration:underline;align-self:flex-start}
.err{color:var(--bad);font-size:14px;min-height:1.2em}
.err.info{color:var(--muted)}
.hint-line{margin:0;font-size:13px;color:var(--muted);font-family:var(--f-num)}
.secure-line{margin:0;font-size:13px;color:var(--muted);border-top:1px solid var(--line);padding-top:14px}
.demo-note{background:var(--sun-soft);border:1px dashed var(--sun);border-radius:6px;padding:10px 12px;font-size:14px}
.demo-note b{font-family:var(--f-num);letter-spacing:.15em}

/* ---------- Welcome ---------- */
.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;
  padding:14px max(16px, env(safe-area-inset-left, 0px));max-width:1120px;width:100%;margin:0 auto}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-family:var(--f-display);font-weight:800;letter-spacing:.02em;color:var(--brand)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .brand{color:var(--fg)}}
:root[data-theme="dark"] .brand{color:var(--fg)}
.brand img{border-radius:8px;background:#fff}
.who{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--muted);min-width:0}
.who-mail{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:46vw}
.dot{width:8px;height:8px;border-radius:50%;background:var(--good);flex:none}
.btn-ghost{background:var(--surface);color:var(--fg);border:1px solid var(--line);border-radius:6px;padding:7px 12px;font-size:14px}
.btn-ghost:hover{border-color:var(--brand)}

.welcome{flex:1;width:100%;max-width:1120px;margin:0 auto;padding:8px 16px 48px}
.hero{text-align:center;padding:12px 0 36px;animation:rise .6s ease-out both}
.sun{width:132px;height:132px;margin:0 auto 6px}
.sun svg{width:100%;height:100%;overflow:visible}
.sun .rays{fill:var(--sun);transform-origin:80px 80px;animation:spin 28s linear infinite}
.sun .disc{fill:var(--sun);stroke:var(--sun-deep);stroke-width:3}
.sun .face{stroke:#5a3b00}
.sun .cheek{fill:#f28c5b;opacity:.55}
.sun svg{animation:bob 4s ease-in-out infinite}
.greet{margin:0 0 6px;font-family:var(--f-display);font-weight:700;font-size:18px;color:var(--good)}
.hero h1{font-size:clamp(30px, 5.2vw, 50px);line-height:1.08;font-weight:800}
.wordmark{color:var(--brand);white-space:nowrap}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .wordmark{color:var(--sun)}}
:root[data-theme="dark"] .wordmark{color:var(--sun)}
.lead{max-width:560px;margin:14px auto 0;color:var(--muted);font-size:18px}

.choices{display:grid;grid-template-columns:1fr 1fr;gap:24px;animation:rise .6s .12s ease-out both}
.choice{display:flex;align-items:center;gap:20px;text-align:left;text-decoration:none;color:var(--fg);
  background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:28px 26px;min-height:150px;
  box-shadow:0 6px 18px rgba(12,63,47,.07);transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;position:relative;overflow:hidden}
.choice::before{content:"";position:absolute;inset:0 auto 0 0;width:6px;background:var(--accent)}
.choice:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(12,63,47,.14);border-color:var(--accent)}
.choice[aria-expanded="true"]{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.choice-electrical{--accent:var(--sun);--accent-soft:var(--sun-soft)}
.choice-civil{--accent:var(--good);--accent-soft:var(--brand-soft)}
.choice-icon{flex:none;width:76px;height:76px;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent)}
.choice-electrical .choice-icon{color:var(--sun-deep)}
.choice-icon svg{width:40px;height:40px}
.choice-text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.choice-label{font-family:var(--f-display);font-weight:800;font-size:28px;line-height:1.1}
.choice-tag{color:var(--muted);font-size:15px}
.choice-meta{margin-top:6px;font-size:13px;font-weight:600;color:var(--good)}
.choice-go{font-size:26px;color:var(--accent);transition:transform .18s ease}
.choice:hover .choice-go{transform:translateX(4px)}

.toollist{margin-top:28px;animation:rise .35s ease-out both}
.toollist h2{font-size:18px;margin-bottom:12px}
.tools{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.tool{display:flex;flex-direction:column;gap:6px;text-decoration:none;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:18px 20px}
a.tool:hover{border-color:var(--brand)}
.tool-name{font-family:var(--f-display);font-weight:700;font-size:17px}
.tool-desc{color:var(--muted);font-size:14px;flex:1}
.tool-open{font-size:14px;font-weight:600;color:var(--good)}
.tool.is-off{opacity:.65}
.tool.is-off .tool-open{color:var(--muted)}

.foot{text-align:center;font-size:13px;color:var(--muted);padding:20px 16px 28px}

@keyframes spin{to{transform:rotate(360deg)}}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}}

@media (max-width:720px){
  .choices{grid-template-columns:1fr;gap:16px}
  .choice{min-height:0;padding:22px 20px}
  .choice-icon{width:62px;height:62px}
  .choice-label{font-size:24px}
  .lead{font-size:16px}
  .who-mail{max-width:38vw}
}
@media (max-width:420px){
  .band{padding:22px}
  .login-body{padding:22px}
  .who .dot{display:none}
}
