/* Topologic Solutions — static site styles */
:root {
  --accent: #64748b;
  --text: #1e293b;
  --muted: #64748b;
  --surface: #ffffff;
  --bg: #f8fafc;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(16, 24, 40, 0.08), 0 2px 8px rgba(16, 24, 40, 0.06);
  --topo-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cdefs%3E%3Cpattern id='p' patternUnits='userSpaceOnUse' width='200' height='200'%3E%3Cpath d='M-50 50 C -25 0, 25 0, 50 50 S 125 100, 150 50 S 225 0, 250 50' fill='none' stroke='%23e6ecf2' stroke-width='1'/%3E%3Cpath d='M-50 100 C -25 50, 25 50, 50 100 S 125 150, 150 100 S 225 50, 250 100' fill='none' stroke='%23dde6ee' stroke-width='1'/%3E%3Cpath d='M-50 150 C -25 100, 25 100, 50 150 S 125 200, 150 150 S 225 100, 250 150' fill='none' stroke='%23e6ecf2' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23p)'/%3E%3C/svg%3E");
  --topo-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cdefs%3E%3Cpattern id='p' patternUnits='userSpaceOnUse' width='200' height='200'%3E%3Cpath d='M-50 50 C -25 0, 25 0, 50 50 S 125 100, 150 50 S 225 0, 250 50' fill='none' stroke='%23222222' stroke-width='1'/%3E%3Cpath d='M-50 100 C -25 50, 25 50, 50 100 S 125 150, 150 100 S 225 50, 250 100' fill='none' stroke='%23333333' stroke-width='1'/%3E%3Cpath d='M-50 150 C -25 100, 25 100, 50 150 S 125 200, 150 150 S 225 100, 250 150' fill='none' stroke='%23222222' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23p)'/%3E%3C/svg%3E");
}

[data-theme="dark"] {
  --accent: #334155;
  --text: #cbd5e1;
  --muted: #64748b;
  --surface: #0f172a; /* dark slate to keep cards visible */
  --bg: #000000;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] body {
  background-image: var(--topo-dark);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  line-height: 1.6;
  background-color: var(--bg);
  background-image: var(--topo-light);
  background-attachment: fixed;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

.nav {
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .nav {
  background: rgba(26, 26, 26, 0.9);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: saturate(120%) blur(6px);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.nav a {
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  white-space: nowrap;
}
.nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

/* Containers */
.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 768px) {
  .container {
    margin: 1rem;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    margin: 0.5rem;
    padding: 1rem;
  }
}

[data-theme="dark"] .container {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
}

.hero {
  text-align: center;
}
.hero h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0 0 0.5rem; }
.tagline { color: var(--muted); font-size: 1.1rem; margin: 0 0 1rem; }
.intro { max-width: 70ch; margin: 0 auto 1.25rem; color: var(--text); }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.5rem; }
  .tagline { font-size: 1rem; }
  .intro { max-width: 100%; }
  .nav-inner {
    justify-content: center;
    text-align: center;
  }
  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 0.75rem;
  }
}

/* Buttons */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03), 0 6px 16px rgba(0,119,204,0.18);
  transition: transform 0.06s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.button:hover { text-decoration: none; background: #475569; box-shadow: 0 1px 0 rgba(0,0,0,0.03), 0 10px 22px rgba(100,116,139,0.24); transform: translateY(-1px); }
.button:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.button-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.button-outline:hover { background: rgba(100,116,139,0.08); }

/* Feature grid */
.features .feature-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .features .feature-grid {
    grid-template-columns: 1fr;
  }
}

.features .feature {
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 1rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .features .feature {
  border-color: rgba(255,255,255,0.1);
}

/* Tile grid for Interact */
.tile-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

.tile {
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .tile {
  border-color: rgba(255,255,255,0.1);
}

.tile img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #eef3f8; }

[data-theme="dark"] .tile img {
  background: #2a2a2a;
  opacity: 0.9;
}

.tile-body { padding: 1rem; display: grid; gap: 0.5rem; }
.tile h3 { margin: 0; }

/* Contact */
.contact-card {
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 1rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .contact-card {
  border-color: rgba(255,255,255,0.1);
}

@media (max-width: 480px) {
  .theme-toggle {
    width: 36px;
    height: 36px;
    bottom: 16px;
    right: 16px;
    font-size: 18px;
  }
}

/* Lists */
.capabilities { columns: 2; gap: 2rem; padding-left: 1rem; }
.capabilities li { margin: 0.25rem 0; }
@media (max-width: 640px) { .capabilities { columns: 1; } }

/* Footer */
.footer { margin: 2rem 0; color: var(--muted); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 1rem; text-align: center; }

/* Accessibility */
:focus-visible { outline: 3px solid rgba(100,116,139,0.35); outline-offset: 2px; border-radius: 6px; }

/* Theme toggle button - inconspicuous */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  z-index: 100;
  opacity: 0.7;
}

.theme-toggle:hover {
  opacity: 1;
  transform: scale(1.1);
}

[data-theme="dark"] .theme-toggle {
  border: 1px solid rgba(255,255,255,0.2);
}
