:root {
  --bg: #f5f5f2;
  --surface: rgba(255, 255, 255, 0.82);
  --line: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --muted: #526071;
  --soft: #6b7280;
  --accent: #111111;
  --success: #1f6f52;
  --danger: #b42318;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: min(1180px, calc(100vw - 40px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 23, 42, 0.05), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.06), transparent 24%),
    linear-gradient(180deg, #fcfcfb 0%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-shell {
  position: relative;
  overflow: hidden;
}

.site-shell::before,
.site-shell::after {
  content: "";
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  filter: blur(16px);
}

.site-shell::before {
  top: -12rem;
  right: -9rem;
  background: rgba(15, 23, 42, 0.06);
}

.site-shell::after {
  bottom: -14rem;
  left: -10rem;
  background: rgba(17, 17, 17, 0.04);
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  padding: 84px 0;
}

.section-tight {
  padding: 48px 0;
}

.eyebrow,
.brand-logo {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: -0.02em;
}

.brand-logo {
  font-weight: 600;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(15, 23, 42, 0.25);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(252, 252, 251, 0.78);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.topbar,
.nav-links,
.button-row,
.meta-row,
.footer-links,
.stats-row,
.contact-strip,
.footer-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar,
.contact-strip,
.footer-bar {
  justify-content: space-between;
}

.topbar {
  min-height: 76px;
}

.nav-links a,
.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--text);
}

.hero-grid,
.two-column,
.services-grid,
.projects-grid,
.stats-grid,
.contact-grid,
.support-grid,
.admin-grid,
.field-grid {
  display: grid;
  gap: 24px;
}

.hero-grid,
.two-column,
.contact-grid,
.support-grid,
.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.services-grid,
.projects-grid,
.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.hero-grid {
  align-items: end;
  min-height: calc(100vh - 76px);
  padding: 52px 0 72px;
}

.hero-copy {
  max-width: 44rem;
}

.hero-title,
.section-title,
.metric-value,
.page-title {
  letter-spacing: -0.04em;
}

.hero-title {
  margin: 18px 0 20px;
  max-width: 11ch;
  font-size: clamp(2.8rem, 5.4vw, 4.9rem);
  line-height: 1.03;
  font-weight: 800;
  text-wrap: balance;
}

.hero-subtitle,
.section-copy,
.card-copy,
.project-copy,
.contact-copy,
.muted,
.page-intro {
  color: var(--muted);
  line-height: 1.7;
}

.hero-subtitle {
  font-size: 1.12rem;
  max-width: 610px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-title {
  margin: 14px 0 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  font-weight: 750;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 48px 0;
}

.page-card {
  width: min(720px, 100%);
  margin: 0 auto;
}

.page-header {
  margin-bottom: 28px;
  text-align: center;
}

.page-title {
  margin: 14px 0 10px;
  font-size: clamp(2rem, 5vw, 3rem);
}

.panel,
.card-modern,
.surface,
.hero-panel,
.metric-card,
.table-shell,
.form-shell {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel,
.surface,
.form-shell,
.table-shell,
.card-modern {
  padding: 28px;
}

.hero-panel {
  padding: 32px;
}

.hero-aside,
.stack {
  display: grid;
  gap: 18px;
}

.hero-diagram {
  position: relative;
  padding: 28px;
  min-height: 420px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 244, 241, 0.85)),
    linear-gradient(135deg, rgba(15, 23, 42, 0.02), transparent);
}

.hero-diagram::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
}

.diagram-node,
.card,
.project-card,
.detail-card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.82);
}

.diagram-node {
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.diagram-stack {
  position: absolute;
  right: 32px;
  bottom: 32px;
  width: min(100%, 320px);
  display: grid;
  gap: 14px;
}

.diagram-stack .diagram-node:first-child {
  margin-right: 36px;
}

.diagram-stack .diagram-node:nth-child(2) {
  margin-left: 16px;
}

.diagram-stack .diagram-node:nth-child(3) {
  margin-right: 8px;
}

.diagram-node strong,
.card-title,
.project-title,
.contact-title {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.metric-card {
  padding: 22px;
}

.metric-label {
  color: var(--soft);
  font-size: 0.92rem;
}

.metric-value {
  display: block;
  margin-top: 12px;
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 760;
}

.metric-detail {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.96rem;
}

.project-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.list-clean {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

.list-clean li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
}

.list-clean li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 18px 30px rgba(17, 17, 17, 0.12);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.btn-ghost {
  color: var(--muted);
}

.btn-inline {
  font-weight: 600;
  color: var(--text);
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
  font-size: 0.9rem;
}

.status-pill.inactive {
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
}

.status-pill.active {
  color: var(--success);
  background: rgba(31, 111, 82, 0.1);
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  font-size: 0.94rem;
  color: var(--muted);
}

.input-modern,
.textarea-modern,
.select-modern {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.textarea-modern {
  min-height: 160px;
  resize: vertical;
}

.input-modern::placeholder,
.textarea-modern::placeholder {
  color: #8b97a7;
}

.input-modern:focus,
.textarea-modern:focus,
.select-modern:focus {
  outline: none;
  border-color: rgba(15, 23, 42, 0.24);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.06);
}

.feedback {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
}

.feedback-error {
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.14);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  vertical-align: top;
}

th {
  font-size: 0.82rem;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.footer {
  padding: 28px 0 54px;
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.w-full {
  width: 100%;
}

@media (max-width: 980px) {
  .hero-grid,
  .two-column,
  .services-grid,
  .projects-grid,
  .stats-grid,
  .contact-grid,
  .support-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
    padding: 42px 0 56px;
  }

  .topbar,
  .contact-strip,
  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 68px 0;
  }

  .panel,
  .surface,
  .form-shell,
  .table-shell,
  .card-modern,
  .hero-panel {
    padding: 22px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}
