/* ============================================================
   MAYNOT — Scientific IoT Laboratory
   Dark lab theme: deep space navy + cyan signal accents
   ============================================================ */

:root {
  --bg: #0a0f1e;
  --bg-alt: #0e1528;
  --surface: #121a30;
  --surface-2: #182238;
  --border: #233150;
  --text: #dbe4f3;
  --text-dim: #8b99b8;
  --accent: #22d3ee;
  --accent-2: #0ea5b7;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --danger: #f87171;
  --radius: 10px;
  --font-main: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Circuit-grid backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

main { flex: 1; position: relative; z-index: 1; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 30, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.5px;
}
.logo:hover { text-decoration: none; }
.logo .logo-mark { width: 32px; height: 32px; flex: none; }
.logo .logo-sub {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  display: block;
  line-height: 1.1;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.main-nav a {
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.main-nav a.active { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 20px;
  padding: 4px 10px;
  cursor: pointer;
}

/* Language dropdown */
.lang-dropdown { position: relative; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.lang-toggle:hover { border-color: var(--accent); }
.lang-toggle .caret { font-size: 10px; color: var(--text-dim); }

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.lang-dropdown.open .lang-menu { display: block; }

.lang-menu a {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  color: var(--text-dim);
  font-size: 14px;
}
.lang-menu a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.lang-menu a.current { color: var(--accent); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
}
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */

.hero { padding: 90px 0 70px; position: relative; }

.hero .tagline {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  font-weight: 800;
  max-width: 720px;
  margin-bottom: 20px;
}

.hero h1 .accent { color: var(--accent); }

.hero p.lead {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 620px;
  margin-bottom: 34px;
}

.hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */

.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 12px;
}
.section-sub { color: var(--text-dim); margin: 14px 0 36px; max-width: 640px; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color 0.2s, transform 0.15s;
}
.card:hover { border-color: var(--accent-2); transform: translateY(-3px); }

.card .card-icon {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 22px;
  margin-bottom: 14px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-dim); }

/* ---------- Requisites ---------- */

.requisites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.req-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.req-card h3 {
  font-size: 16px;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.req-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(35, 49, 80, 0.7);
  font-size: 14px;
}
.req-row:last-child { border-bottom: none; }
.req-row .req-label { color: var(--text-dim); flex: none; }
.req-row .req-value { font-family: var(--font-mono); text-align: right; word-break: break-word; }

/* ---------- Page header (inner pages) ---------- */

.page-header {
  padding: 56px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.page-header .breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-header h1 { font-size: 34px; font-weight: 800; }

/* ---------- Contacts ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.contact-card .contact-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.contact-card .contact-value { font-size: 17px; line-height: 1.5; }

/* ---------- Login ---------- */

.login-wrap {
  max-width: 420px;
  margin: 60px auto 80px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 38px 34px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.login-card .login-head { text-align: center; margin-bottom: 28px; }
.login-card .login-head .login-icon { margin-bottom: 12px; }
.login-card .login-head .login-icon svg { width: 44px; height: 44px; }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .login-sub { font-size: 13px; color: var(--text-dim); }

.login-card .btn { width: 100%; margin-top: 6px; }

.login-note {
  display: none;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
  color: var(--danger);
  font-size: 14px;
  text-align: center;
}
.login-note.visible { display: block; }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 34px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
}
.footer-inner .footer-brand { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.footer-inner a { color: var(--text-dim); }
.footer-inner a:hover { color: var(--accent); }
.footer-inner ul { list-style: none; }
.footer-inner li { margin-bottom: 6px; }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .nav-toggle { display: block; margin-left: auto; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
    gap: 2px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; }
  .hero { padding: 56px 0 46px; }
}
