/* ===== Variables ===== */
:root {
  --navy: #0f1b2d;
  --navy-light: #162238;
  --slate: #1e3050;
  --gray-100: #f4f6f8;
  --gray-200: #e2e6ec;
  --gray-400: #94a3b8;
  --gray-600: #64748b;
  --white: #ffffff;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
  --radius: 8px;
}

/* ===== Light Theme ===== */
[data-theme="light"] {
  --navy: #ffffff;
  --navy-light: #f4f6f8;
  --slate: #e2e6ec;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-400: #475569;
  --gray-600: #64748b;
  --white: #0f172a;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .card {
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .card:hover {
  border-color: var(--accent);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
  background: var(--navy);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--white);
}

[data-theme="light"] .footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nav a {
  color: var(--gray-400);
}

[data-theme="light"] .nav a:hover {
  color: var(--white);
}

[data-theme="light"] .btn {
  color: #ffffff;
}

[data-theme="light"] .btn:hover {
  color: #ffffff;
}

[data-theme="light"] .menu-toggle span {
  background: var(--gray-400);
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(0, 0, 0, 0.12);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  color: var(--gray-100);
  background: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 27, 45, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  color: var(--gray-400);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--white);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-400);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn:hover {
  background: var(--accent-hover);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
}

/* ===== Hero ===== */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  max-width: 800px;
  margin: 0 auto 24px;
  letter-spacing: -0.5px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--gray-400);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ===== Sections (shared) ===== */
section {
  padding: 100px 0;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.section-sub {
  color: var(--gray-400);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ===== Services Cards ===== */
.services {
  background: var(--navy-light);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--slate);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card-icon {
  color: var(--accent);
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
}

.card p {
  color: var(--gray-400);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ===== How We Work ===== */
.how {
  background: var(--navy);
}

.how-block {
  margin-bottom: 48px;
}

.how-block:last-child {
  margin-bottom: 0;
}

.how-block h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

.how-block > p {
  color: var(--gray-400);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.how-block ul {
  list-style: none;
  display: grid;
  gap: 16px;
}

.how-block li {
  color: var(--gray-400);
  font-size: 0.95rem;
  line-height: 1.65;
  padding-left: 20px;
  position: relative;
}

.how-block li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.how-block li strong {
  color: var(--white);
}

/* ===== Why / Differentiators ===== */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.diff-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
}

.diff-item h3::before {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 16px;
}

.diff-item p {
  color: var(--gray-400);
  font-size: 0.93rem;
  line-height: 1.65;
}

.why {
  background: var(--navy-light);
}

/* ===== About ===== */
.about {
  background: var(--navy);
}

/* ===== Contact ===== */
.contact {
  background: var(--navy-light);
}

.about-text {
  max-width: 680px;
}

.about-text p {
  color: var(--gray-400);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-text strong {
  color: var(--white);
}

/* ===== Contact ===== */
.contact .container {
  text-align: center;
}

.contact h2,
.contact .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto 32px;
  text-align: left;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--navy-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
}

.contact-alt {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.contact-location {
  color: var(--gray-600);
  font-size: 0.85rem;
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  color: var(--gray-600);
  font-size: 0.85rem;
}

.footer-link a {
  color: var(--gray-600);
}

.footer-link a:hover {
  color: var(--accent);
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 24px;
    gap: 20px;
  }

  .nav.open {
    display: flex;
  }

  .hero {
    padding: 130px 0 72px;
  }

  section {
    padding: 72px 0;
  }

  .card-grid,
  .diff-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

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