/* ===== AHL Tech Inc. — site styles =====
   Change the brand colours here once the logo/colours are decided. */
:root {
  --ink: #0b1220;        /* dark background */
  --ink-2: #111a2e;
  --line: #1f2a44;
  --text: #e6ecf5;
  --muted: #9aa8bf;
  --bg: #0b1220;          /* page background (dark navy) */
  --bg-alt: #0f182b;      /* alternate section background */
  --surface: #142038;     /* cards, form, panels */
  --border: #22304d;
  --accent: #22d3a6;     /* main brand colour */
  --accent-dark: #0e9f7a;
  --radius: 14px;
  --shadow: 0 14px 34px rgba(0, 0, 0, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ----- buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 10px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--ink); font-weight: 700; font-size: 15px;
  cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(34, 211, 166, .3); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { border-color: #fff; box-shadow: none; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ----- nav ----- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 18, 32, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 800; color: #fff; letter-spacing: -.02em; font-size: 20px; }
.brand-mark { background: var(--accent); color: var(--ink); padding: 2px 8px; border-radius: 6px; }
.brand-name { color: #fff; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: #c7d0e0; font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn):hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; transition: .2s; }

/* ----- hero ----- */
.hero {
  background:
    radial-gradient(800px 400px at 85% 20%, rgba(34, 211, 166, .14), transparent 60%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--ink);
  color: #fff; padding: 96px 0 104px;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; color: #9fb0c8; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; margin-bottom: 24px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(34,211,166,.2); }
h1 { font-size: clamp(38px, 5.5vw, 62px); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; }
.accent { color: var(--accent); }
.lead { margin-top: 22px; font-size: 18px; color: #b6c1d4; max-width: 34em; }
.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

.term { background: #0a0f1b; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 30px 60px rgba(0,0,0,.4); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: var(--ink-2); border-bottom: 1px solid var(--line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3654; }
.term-bar span { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: #6f7f9a; }
.term-body { padding: 22px; font-family: var(--mono); font-size: 14px; line-height: 1.9; color: #c7d0e0; white-space: pre; overflow-x: auto; }
.term-body .c { color: #6f7f9a; }
.term-body .ok { color: var(--accent); }
.term-body .busy { color: #e8b04b; }
.term-body .val.checking { color: #6f7f9a; }
.term-body .val.just-in { animation: just-in .5s ease-out; }
@keyframes just-in { from { color: #fff; } }
.cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ----- sections ----- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -.025em; font-weight: 800; max-width: 22em; }
.section-lead { margin-top: 14px; color: var(--muted); font-size: 17px; max-width: 38em; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; }

/* services */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.card p { color: var(--muted); font-size: 15px; }
.card-wide { grid-column: 1 / -1; display: flex; gap: 20px; align-items: flex-start; background: radial-gradient(600px 200px at 100% 0%, rgba(34, 211, 166, .12), transparent 70%), var(--ink); border-color: rgba(34, 211, 166, .35); color: #fff; }
.card-wide p { color: #b6c1d4; }
.card-wide .icon { flex: none; margin: 0; }
.icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(34, 211, 166, .12); display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-wide .icon svg { stroke: var(--accent); }


/* why */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.why-list { list-style: none; display: grid; gap: 14px; }
.why-list li { display: grid; gap: 2px; padding: 18px 20px 18px 50px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); position: relative; }
.why-list li::before { content: ""; position: absolute; left: 20px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b1220' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.why-list span { color: var(--muted); font-size: 15px; }

/* contact */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.contact-points { list-style: none; margin-top: 26px; display: grid; gap: 10px; }
.contact-points li { padding-left: 22px; position: relative; color: var(--text); font-weight: 500; }
.contact-points li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.opt { color: var(--muted); font-weight: 400; }
.form input, .form select, .form textarea {
  font: inherit; font-size: 15px; font-weight: 400; color: var(--text);
  padding: 11px 13px; border: 1px solid #2a3a5c; border-radius: 9px; background: var(--ink); width: 100%;
}
.form textarea { resize: vertical; min-height: 120px; }
.form .invalid { border-color: #ff6b7f; background: #2a1420; }
.form ::placeholder { color: #6f7f9a; }
.hp { position: absolute; left: -9999px; }
.form-status { font-size: 14px; min-height: 1.4em; }
.form-status.ok { color: var(--accent); font-weight: 600; }
.form-status.err { color: #ff6b7f; }

/* footer */
.footer { background: var(--ink); border-top: 1px solid var(--border); color: #8f9db5; font-size: 14px; padding: 30px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .brand { font-size: 16px; }
.footer a:hover { color: #fff; }

/* ===== client portal (client.html) — light theme ===== */
[hidden] { display: none !important; }
.nav-links a.active { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
body.portal {
  color-scheme: light;
  --text: #0f172a; --muted: #5b6577; --surface: #ffffff; --border: #dfe5ee;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  color: var(--text);
  background:
    linear-gradient(rgba(15, 23, 42, .045) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(15, 23, 42, .045) 1px, transparent 1px) 0 0 / 40px 40px,
    #eef3f9;
}
.portal .kicker { color: var(--accent-dark); }
.portal .form input, .portal .form select, .portal .form textarea { background: #fff; border-color: #d5dbe5; }
.portal .form .invalid { border-color: #e0475b; background: #fff7f8; }
.portal .form ::placeholder { color: #98a2b3; }
.portal .form-status.ok { color: var(--accent-dark); }
.portal .form-status.err { color: #c62f43; }
.portal-main { padding: 40px 0 96px; min-height: calc(100vh - 64px - 90px); }
.demo-note { font-size: 13px; color: #8a5a00; background: #fff6e0; border: 1px solid #f3dfae; border-radius: 10px; padding: 9px 14px; margin-bottom: 28px; }

.btn-outline { background: #fff; color: var(--text); border-color: #cfd7e3; }
.btn-outline:hover { border-color: var(--text); box-shadow: none; }
.btn-outline-danger { background: #fff; color: #c62f43; border-color: #f1c4cb; }
.btn-outline-danger:hover { border-color: #c62f43; box-shadow: none; }
.btn-danger { background: #d93a50; border-color: #d93a50; color: #fff; }
.btn-danger:hover { box-shadow: 0 8px 20px rgba(217, 58, 80, .25); }

/* login */
.auth { display: grid; place-items: center; padding-top: 24px; }
.auth-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px; }
.auth-title, .dash-title { font-size: 30px; letter-spacing: -.025em; line-height: 1.15; font-weight: 800; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #eef3f9; border-radius: 10px; padding: 4px; margin: 22px 0 20px; }
.auth-tab { font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); background: none; border: 0; border-radius: 8px; padding: 9px; cursor: pointer; }
.auth-tab.is-on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.auth-form { background: none; border: 0; box-shadow: none; padding: 0; }
.auth-link { font-size: 14px; color: var(--accent-dark); font-weight: 600; justify-self: center; }
#auth-status { margin-top: 12px; text-align: center; }

/* dashboard */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.demo-switch { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.demo-switch select { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid #d5dbe5; border-radius: 8px; background: #fff; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; min-height: 160px; }
.panel-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; max-width: none; }
.panel-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.panel-form { background: none; border: 0; box-shadow: none; padding: 0; margin-top: 16px; }
.panel-form .btn { justify-self: start; }
.list { list-style: none; margin-top: 14px; display: grid; gap: 10px; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: #f6f9fc; border: 1px solid #e6ebf2; border-radius: 10px; }
.item-main { display: grid; gap: 2px; min-width: 0; }
.item-main strong { font-size: 15px; }
.item-sub { color: var(--muted); font-size: 13.5px; }
.item .btn { flex: none; }
.pill { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: #ddf7ef; color: #0b7a5e; }
.pill-wait { background: #fff1d6; color: #8a5a00; }
.balance { display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px; padding: 16px; border-radius: 10px; background: var(--ink); color: #fff; }
.balance-label { color: #b6c1d4; font-size: 14px; }
.balance-amt { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }

.dialog { border: 0; border-radius: var(--radius); padding: 26px; width: min(420px, calc(100% - 40px)); box-shadow: 0 30px 60px rgba(15, 23, 42, .25); color: var(--text); }
.dialog::backdrop { background: rgba(11, 18, 32, .55); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* ----- responsive ----- */
@media (max-width: 900px) {
  .hero-inner, .why, .contact { grid-template-columns: 1fr; gap: 40px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 72px 0 80px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); border-bottom: 1px solid var(--line); padding: 8px 20px 20px; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 14px; }
  .grid, .row { grid-template-columns: 1fr; }
  .card-wide { flex-direction: column; }
  .section { padding: 72px 0; }
  .term-body { font-size: 12.5px; }
  .dash-grid { grid-template-columns: 1fr; }
  .item { flex-wrap: wrap; }
  .auth-card { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
