:root {
  --navy: #0D1B2A;
  --navy-mid: #1A2E45;
  --blue: #0F4CDB;
  --blue-light: #4A8AFF;
  --blue-glow: rgba(15, 76, 219, 0.35);
  --soft: #C8D8F0;
  --muted: #8AAACE;
  --white: #F0F6FF;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--navy);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
}

/* ─── CANVAS BACKGROUND ─── */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1.1rem 0;
  background: rgba(13, 27, 42, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(74, 138, 255, 0.12);
  transition: background 0.3s;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
}

.brand-text {
  font-family: 'DM Serif Display', serif;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--white);
}

.brand-text .M,
.brand-text .D {
  color: var(--blue-light);
  font-weight: 700;
}

.brand-text .a {
  color: var(--soft);
  font-style: italic;
}

.hero-logo-wrap {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.3s;
  margin-bottom: 2rem;
}

.hero-logo-wrap svg {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 28px rgba(15, 76, 219, 0.35));
}

.nav-link {
  color: var(--muted) !important;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 0.4rem 1rem !important;
}

.nav-link:hover {
  color: var(--blue-light) !important;
}

.btn-nav {
  background: var(--blue);
  color: #fff !important;
  border-radius: 6px;
  padding: 0.4rem 1.2rem !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-nav:hover {
  background: var(--blue-light);
  box-shadow: 0 0 20px var(--blue-glow);
  color: #fff !important;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--blue-light);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.2s;
}

.hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.4s;
}

.hero-title .highlight {
  color: var(--blue-light);
  font-style: italic;
}

.hero-sub {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.6s;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.8s;
}

.btn-primary-mad {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, box-shadow 0.25s, transform 0.2s;
  cursor: pointer;
}

.btn-primary-mad:hover {
  background: var(--blue-light);
  box-shadow: 0 0 32px var(--blue-glow);
  transform: translateY(-2px);
  color: #fff;
}

.btn-primary-mad:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost-mad {
  background: transparent;
  color: var(--soft);
  border: 1.5px solid rgba(74, 138, 255, 0.35);
  border-radius: 8px;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn-ghost-mad:hover {
  border-color: var(--blue-light);
  color: var(--blue-light);
  transform: translateY(-2px);
}

/* Code badge floating right in hero */
.hero-badge {
  background: rgba(15, 76, 219, 0.1);
  border: 1px solid rgba(74, 138, 255, 0.2);
  border-radius: 14px;
  padding: 2rem 2rem;
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 1s;
}

.code-line {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  line-height: 2;
  color: var(--muted);
}

.code-line .kw { color: #7FAAFF; }
.code-line .fn { color: #4A8AFF; }
.code-line .str { color: #88D8A0; }
.code-line .cm { color: #4a6070; }
.code-line .num { color: #FFB347; }

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--blue-light);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

/* ─── SERVICES ─── */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--blue-light);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 1rem;
}

.section-sub {
  color: var(--muted);
  font-weight: 300;
  font-size: 1rem;
  max-width: 500px;
  line-height: 1.75;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(74, 138, 255, 0.12);
  border-radius: 14px;
  padding: 2rem;
  height: 100%;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.service-card:hover {
  border-color: rgba(74, 138, 255, 0.45);
  background: rgba(15, 76, 219, 0.07);
  transform: translateY(-4px);
}

.service-icon {
  width: 50px;
  height: 50px;
  background: rgba(15, 76, 219, 0.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--blue-light);
  margin-bottom: 1.2rem;
}

.service-card h5 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 0.65rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  font-weight: 300;
}

/* ─── DIVIDER ─── */
.glow-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0.3;
  margin: 0;
}

/* ─── FEATURED PROJECT ─── */
.project-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(74, 138, 255, 0.15);
  border-radius: 18px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
  background: var(--blue);
  opacity: 0.06;
  border-radius: 50%;
  pointer-events: none;
}

.project-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--blue-light);
  background: rgba(15, 76, 219, 0.15);
  border: 1px solid rgba(74, 138, 255, 0.25);
  border-radius: 100px;
  padding: 0.25rem 0.85rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.project-title {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.project-title span {
  color: var(--blue-light);
  font-style: italic;
}

.project-desc {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(74, 138, 255, 0.15);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  color: var(--soft);
  margin: 0.2rem;
}

/* ─── CTA STRIP ─── */
.cta-strip {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
  text-align: center;
}

.cta-strip h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-strip p {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

.cta-strip .form-control {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(74,138,255,0.2);
  color: var(--white);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.cta-strip .form-control::placeholder { color: var(--muted); opacity: .7; }
.cta-strip .form-control:focus {
  background: rgba(255,255,255,0.07);
  border-color: var(--blue-light);
  color: var(--white);
  box-shadow: 0 0 0 3px rgba(74,138,255,0.15);
}
.cta-strip textarea.form-control { resize: none; }

/* Form feedback */
.form-feedback {
  font-family: 'DM Mono', monospace;
  font-size: .85rem;
  padding: .85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: none;
}
.form-feedback.show { display: block; }
.form-feedback.success {
  background: rgba(74, 216, 145, 0.1);
  border: 1px solid rgba(74, 216, 145, 0.35);
  color: #88D8A0;
}
.form-feedback.error {
  background: rgba(255, 90, 90, 0.1);
  border: 1px solid rgba(255, 90, 90, 0.35);
  color: #FF8A8A;
}

/* ─── FOOTER ─── */
footer {
  position: relative;
  z-index: 1;
  padding: 2.5rem 0;
  border-top: 1px solid rgba(74, 138, 255, 0.1);
}

footer p {
  color: var(--muted);
  font-size: 0.82rem;
  font-family: 'DM Mono', monospace;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─── RESPONSIVE TWEAKS ─── */
@media (max-width: 768px) {
  .hero-badge { display: none; }
  .project-card { padding: 2rem 1.5rem; }
}

.plans-teaser-card {
  background: rgba(15, 76, 219, 0.06);
  border: 1px solid rgba(74, 138, 255, 0.18);
  border-radius: 18px;
  padding: 3rem;
}

@media (max-width: 768px) {
  .plans-teaser-card { padding: 2rem 1.5rem; text-align: center; }
  .plans-teaser-card .text-lg-end { text-align: center !important; margin-top: 1rem; }
}

/* Subtle admin login link in footer */
.footer-admin-link {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.35;
  text-decoration: none;
  transition: opacity 0.2s;
}
.footer-admin-link:hover { opacity: 0.85; }

/* Spinner animation for form submit buttons */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
