:root {
  --bg: #f7f8fa;
  --card-bg: #ffffff;
  --ink: #14202b;
  --ink-soft: #3a4a5a;
  --muted: #6a7886;
  --accent: #00558c;
  --accent-dark: #003e66;
  --accent-light: #e7f1f9;
  --border: #d8dee5;
  --shadow: 0 1px 3px rgba(20, 32, 43, 0.06), 0 4px 14px rgba(20, 32, 43, 0.05);
  --shadow-hover: 0 6px 20px rgba(0, 85, 140, 0.18);
  --shadow-modal: 0 20px 60px rgba(20, 32, 43, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: #fff;
  color: var(--accent-dark);
  border-color: #fff;
}
.btn-primary:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: #fff;
}
/* Override for modal context where the button sits on white */
.modal-card .btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.modal-card .btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

/* ---------- Site header ---------- */
.site-header {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(255,255,255,0.18), transparent 60%),
    linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
  color: #fff;
  padding: 5rem 1.5rem 6rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
}
.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}
.site-header h1 {
  margin: 0 0 1.3rem;
  font-size: 2.7rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  max-width: 780px;
}
.lede {
  margin: 0 0 1.8rem;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 700px;
}
.header-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Main ---------- */
main {
  max-width: 960px;
  margin: -3.5rem auto 0;
  padding: 0 1.5rem 4rem;
  position: relative;
  z-index: 1;
}
.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 3rem 0 1.2rem;
  font-weight: 700;
}
section:first-of-type .section-title { margin-top: 0; }

/* ---------- Tool cards ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem 1.5rem 1.5rem;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.tool-card:not(.placeholder):hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
  text-decoration: none;
}
.tool-icon {
  color: var(--accent);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--accent-light);
  border-radius: 12px;
}
.tool-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.3;
}
.tool-desc {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  flex: 1;
}
.tool-meta {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}
.tool-meta a { color: var(--accent); }
.tool-launch {
  display: inline-block;
  margin-top: auto;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}
.tool-card:hover .tool-launch { color: var(--accent-dark); }

.tool-card.placeholder {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
  color: var(--muted);
  cursor: default;
}
.tool-card.placeholder .tool-icon {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--border);
}
.tool-card.placeholder h3 { color: var(--ink-soft); }

/* ---------- About / bio ---------- */
.about {
  margin-top: 1rem;
}
.bio {
  display: flex;
  gap: 1.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  align-items: flex-start;
}
.bio-avatar {
  flex: 0 0 auto;
  line-height: 0;
}
.bio-avatar svg {
  border-radius: 50%;
}
.bio-body { flex: 1; min-width: 0; }
.bio-name {
  margin: 0;
  font-size: 1.35rem;
  color: var(--ink);
}
.bio-title {
  margin: 0.1rem 0 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bio-body p {
  margin: 0.6rem 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.bio-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  font-weight: 600;
}
.about-note {
  margin: 1.2rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 720px;
  font-style: italic;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #1a2733;
  color: #cbd6e0;
  padding: 2.2rem 1.5rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  justify-content: space-between;
}
.site-footer p { margin: 0.4rem 0; font-size: 0.9rem; }
.site-footer a { color: #8fc4e8; }
.site-footer a:hover { color: #fff; }
.footer-meta { margin: 0 !important; font-weight: 600; }
.social-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  text-decoration: none;
}
.social-links a:hover { text-decoration: underline; }
.social-links svg { display: block; }
.disclaimer {
  color: #8a98a6;
  font-size: 0.82rem !important;
  margin-top: 1rem !important;
  max-width: 720px;
  line-height: 1.5;
}

/* ---------- Modal (email capture) ---------- */
body.modal-open { overflow: hidden; }
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modal-fade-in 0.2s ease-out;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 26, 0.55);
  backdrop-filter: blur(2px);
}
.modal-card {
  position: relative;
  background: var(--card-bg);
  border-radius: 14px;
  padding: 2.2rem 2rem 1.6rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-modal);
  text-align: center;
  animation: modal-pop-in 0.22s ease-out;
}
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  background: transparent;
  border: 0;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}
.modal-close:hover { background: var(--accent-light); color: var(--accent-dark); }
.modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
}
.modal-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  color: var(--ink);
  line-height: 1.25;
}
.modal-lede {
  margin: 0 0 1.3rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
}
.form-row {
  display: flex;
  gap: 0.5rem;
}
.form-row input[type="email"] {
  flex: 1;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
.form-row input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 85, 140, 0.18);
}
.form-note {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.modal-success, .modal-error {
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
}
.modal-success {
  background: #e6f4ea;
  color: #1e6b3a;
  border: 1px solid #b9dec6;
}
.modal-error {
  background: #fdecea;
  color: #8a1f15;
  border: 1px solid #f3c2bb;
}
.modal-dismiss {
  display: block;
  margin: 1rem auto 0;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
}
.modal-dismiss:hover { color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .site-header { padding: 3.5rem 1.2rem 4.5rem; }
  .site-header h1 { font-size: 2rem; }
  .lede { font-size: 1rem; }
  main { padding: 0 1.2rem 3rem; }
  .tool-grid { grid-template-columns: 1fr; }
  .bio { flex-direction: column; align-items: center; text-align: center; padding: 1.5rem 1.2rem; }
  .bio-links { justify-content: center; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .modal-card { padding: 1.8rem 1.3rem 1.3rem; }
  .form-row { flex-direction: column; }
  .form-row .btn { width: 100%; }
}
