@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:            #060b18;
  --bg-elevated:   #0c1428;
  --bg-glass:      rgba(12, 20, 44, 0.65);
  --accent:        #6366f1;
  --accent-light:  #818cf8;
  --accent-strong: #4f46e5;
  --accent-glow:   rgba(99, 102, 241, 0.3);
  --grad-text:     linear-gradient(130deg, #e2e8f0 10%, #a5b4fc 55%, #38bdf8 100%);
  --grad-accent:   linear-gradient(135deg, #6366f1, #8b5cf6);
  --text:          #e8edf8;
  --text-muted:    #8892a4;
  --text-subtle:   #4e5a70;
  --border:        rgba(99, 102, 241, 0.18);
  --border-subtle: rgba(148, 163, 184, 0.1);
  --shadow:        0 20px 60px rgba(0, 0, 0, 0.65);
  --radius-xl:     20px;
  --radius:        14px;
  --radius-sm:     10px;
  --radius-xs:     7px;
  --transition:    0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width:     1120px;
  --font:          'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

img { max-width: 100%; height: auto; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background gradient orbs */
body::before {
  content: '';
  position: fixed;
  top: -240px;
  left: -180px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.13) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  right: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.09) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Layout ===== */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(6, 11, 24, 0.88);
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 0 22px rgba(99, 102, 241, 0.55), inset 0 1px 0 rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.logo > div:last-child { line-height: 1.3; }

.logo span {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.86rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.38rem 0.72rem;
  border-radius: var(--radius-xs);
  transition: color var(--transition), background var(--transition);
  font-weight: 450;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.nav-links a.active {
  color: var(--accent-light);
  background: rgba(99, 102, 241, 0.13);
}

/* ===== Main ===== */
.main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 1.5rem 4.5rem;
}

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 2rem 0 1.5rem;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 3.6vw, 3.3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 1.2rem;
}

.hero-text h1 span {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 38rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.badge {
  font-size: 0.74rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-muted);
  font-weight: 450;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.58rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: -0.01em;
  font-family: var(--font);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.38), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 38px rgba(99, 102, 241, 0.55), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.18);
}
.btn-ghost:hover {
  background: rgba(99, 102, 241, 0.07);
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--accent-light);
}

/* ===== Hero Card ===== */
.hero-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(99, 102, 241, 0.22);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.04);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--transition), border-color var(--transition);
}
.hero-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-card-title {
  font-size: 0.84rem;
  font-weight: 500;
}

.hero-card-tag {
  font-size: 0.7rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.28);
  font-weight: 500;
}

.hero-card-body {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-card-image {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: var(--bg-elevated);
}
.hero-card-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.hero-card-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.71rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

/* ===== Sections ===== */
.section { margin-top: 4rem; }

.section-header { margin-bottom: 1.6rem; }

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, var(--text) 30%, rgba(165, 180, 252, 0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Grid ===== */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  padding: 1.5rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.32);
  box-shadow: 0 10px 36px rgba(0,0,0,0.5);
}

.card-soft {
  border-color: var(--border-subtle);
  background: rgba(12, 20, 44, 0.45);
}
.card-soft:hover {
  border-color: rgba(148, 163, 184, 0.18);
}

.card h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.card p:last-child { margin-bottom: 0; }

.card ul {
  padding-left: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.card li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.card li strong { color: var(--text); }

code {
  font-size: 0.84em;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.18);
  padding: 0.08em 0.42em;
  border-radius: 5px;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  color: var(--accent-light);
}

/* ===== Badge pill ===== */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* ===== Forms ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
label {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
}
input[type="text"],
input[type="email"],
select,
textarea {
  background: rgba(6, 11, 24, 0.75);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
textarea {
  border-radius: var(--radius-sm);
  min-height: 130px;
  resize: vertical;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ===== About page – profile card ===== */
.profile-photo {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 28px rgba(99, 102, 241, 0.3);
  margin-bottom: 1.1rem;
  display: block;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 11, 24, 0.92);
  padding: 1.2rem 1.5rem;
  font-size: 0.79rem;
  color: var(--text-muted);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== Commands table ===== */
.commands-card { margin-top: 1.5rem; }

.commands-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}
.commands-table thead {
  background: rgba(99, 102, 241, 0.1);
}
.commands-table th,
.commands-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
}
.commands-table th {
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.commands-table tbody tr {
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  transition: background var(--transition);
}
.commands-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.07);
}
.commands-table td {
  color: var(--text-muted);
}

/* ===== Manual figures ===== */
.manual-figure { margin: 1rem 0; }
.manual-figure-placeholder {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: var(--bg-elevated);
  /* remove the old flex/centering that broke image layout */
}
.manual-figure-placeholder img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.manual-figure figcaption {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== FAQ ===== */
.faq-list { padding: 0.25rem 0.25rem; }

.faq-list details {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.55rem;
  background: transparent;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
}
.faq-list details[open] {
  border-color: rgba(99, 102, 241, 0.32);
  background: rgba(99, 102, 241, 0.04);
}

.faq-list summary {
  list-style: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition);
  user-select: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--accent-light);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform var(--transition);
}
.faq-list details[open] summary::after {
  content: '−';
}
.faq-list summary:hover { color: var(--accent-light); }

.faq-list details p,
.faq-list details ul {
  padding: 0 1.1rem 0.9rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.faq-list details ul {
  padding-left: 2.4rem;
  padding-bottom: 0.9rem;
}
.faq-list details p + p { padding-top: 0; }

/* ===== Hamburger button (hidden on desktop) ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.45rem;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  transition: background var(--transition);
}
.nav-toggle:hover { background: rgba(148,163,184,0.1); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--accent-light); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--accent-light); }

/* ===== Table scroll wrapper ===== */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}

/* ===== Fade-in on load ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-text  { animation: fadeUp 0.55s cubic-bezier(0.4,0,0.2,1) both; }
.hero-card  { animation: fadeUp 0.55s 0.12s cubic-bezier(0.4,0,0.2,1) both; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 1.5rem;
  }
  .hero-card { max-width: 500px; }
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  /* Nav: show hamburger, hide links by default */
  .nav-inner {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    gap: 0;
  }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.15rem;
    padding: 0.6rem 0 0.25rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 0.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 0.65rem 0.8rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    width: 100%;
  }

  /* Layout */
  .main { padding: 1.25rem 1rem 3rem; }
  .section { margin-top: 2.5rem; }
  .hero-text h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 0.94rem; }
  .section-title { font-size: 1.2rem; }
  .card { padding: 1.1rem; }

  /* Buttons full-width on small phones */
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }

  /* Report iframe */
  .report-iframe { height: 680px !important; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 0.35rem; }
}

@media (max-width: 420px) {
  .hero-text h1 { font-size: 1.75rem; }
  .badge { font-size: 0.7rem; padding: 0.22rem 0.6rem; }
  .commands-table { font-size: 0.8rem; }
  .commands-table th, .commands-table td { padding: 0.5rem 0.55rem; }
}
