:root {
  --navy: #0f2340;
  --navy-deep: #0a1a31;
  --blue: #3b82c4;          /* brand accent: borders, rules, icons */
  --blue-btn: #28659b;      /* AA-contrast blue for text-bearing controls */
  --blue-btn-hover: #205580;
  --blue-light: #8fc1ec;
  --ink: #1b2a3d;
  --muted: #56667a;
  --bg: #f4f7fb;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
  font-size: 18px;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Accessibility helpers */
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid #f5b83d; outline-offset: 3px; border-radius: 3px; }
main:focus { outline: none; }

/* Header */
header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #e3e9f1;
  box-shadow: 0 2px 10px rgba(15,35,64,.08);
}
@supports (backdrop-filter: blur(6px)) { header { background: rgba(255,255,255,.93); backdrop-filter: blur(6px); } }
section[id] { scroll-margin-top: 84px; }
header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; gap: 12px 16px; flex-wrap: wrap; }
header .brand img { display: block; width: 237px; height: 46px; }
header nav { display: flex; gap: 4px 22px; flex-wrap: wrap; }
header nav a { text-decoration: none; font-weight: 600; color: var(--navy); font-size: 16px; padding: 6px 0; }
header nav a:hover, header nav a[aria-current="page"] { color: var(--blue-btn); }
header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 20%, #1d3a63 0%, var(--navy) 45%, var(--navy-deep) 100%);
  color: #fff;
  padding: 96px 0 104px;
}
.hero.compact { padding: 72px 0 76px; }
.hero svg.net { position: absolute; right: -120px; top: -80px; width: 560px; opacity: .55; pointer-events: none; }
.hero .wrap { position: relative; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.05; font-weight: 700; margin-bottom: 22px; }
.hero.compact h1 { font-size: clamp(34px, 5vw, 54px); }
.rule { width: 72px; height: 4px; background: var(--blue); border-radius: 2px; margin-bottom: 24px; }
.hero p.lead { font-size: 21px; max-width: 640px; color: #d6e3f2; margin-bottom: 36px; }
.hero.compact p.lead { margin-bottom: 0; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 14px 26px; border-radius: 6px; margin: 0 12px 12px 0; font-size: 17px;
}
.btn-primary { background: var(--blue-btn); color: #fff; }
.btn-primary:hover { background: var(--blue-btn-hover); }
.btn-ghost { border: 2px solid rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.contact .btn-primary { background: var(--blue-btn); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }

/* Sections */
section { padding: 84px 0; }
.section-title { font-size: 34px; color: var(--navy); font-weight: 700; margin-bottom: 10px; line-height: 1.2; }
.section-sub { color: var(--muted); margin-bottom: 44px; max-width: 660px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.grid.wide { grid-template-columns: repeat(2, 1fr); }
.card.span-all { grid-column: 1 / -1; }
.card.span-all p { max-width: 820px; }
@media (max-width: 680px) { .grid.wide { grid-template-columns: 1fr; } }
.card {
  background: var(--bg); border-radius: 10px; padding: 28px 24px;
  border-top: 4px solid var(--blue);
  display: flex; flex-direction: column;
}
.card svg { width: 38px; height: 38px; stroke: var(--blue); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.card h3 { color: var(--navy); font-size: 20px; margin-bottom: 8px; line-height: 1.25; }
.card p { color: var(--muted); font-size: 16.5px; }
.card p + p { margin-top: 10px; }
.card strong { color: var(--navy); font-weight: 600; }
.card .more { margin-top: auto; padding-top: 14px; font-weight: 600; color: var(--blue-btn); font-size: 16px; }
.card .more a:hover { color: var(--blue-btn-hover); }
.after-grid { margin-top: 32px; }
.text-link { font-weight: 600; color: var(--blue-btn); }
.text-link:hover { color: var(--blue-btn-hover); }

/* Status badges */
.badge {
  align-self: flex-start; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.badge.live { background: #dcf1e3; color: #1d6b3a; }
.badge.dev { background: #e2ecf8; color: #1f4f7d; }
.badge.soon { background: #fdf0d7; color: #7a4b00; }
.badge.design { background: #ece6f7; color: #4d3584; }

.alt { background: var(--bg); }

/* Contact */
.contact { background: var(--navy); color: #fff; text-align: center; }
.contact .section-title { color: #fff; }
.contact .section-sub { color: #c4d4e8; margin: 0 auto 36px; text-wrap: balance; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 22px; }
.contact-actions .btn { margin: 0; }
.btn-lg { font-size: 19px; padding: 16px 28px; }
.contact-meta { color: #c4d4e8; font-size: 16px; }
.contact-meta a { color: #fff; text-underline-offset: 3px; }
.contact-meta a:hover { color: var(--blue-light); }
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: #fff; }

/* Why Menalogic */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 64px; margin-top: 36px; }
.why-item h3 { color: var(--navy); font-size: 21px; line-height: 1.3; margin-bottom: 8px; }
.why-item p { color: #3b4b5f; max-width: 46ch; }
.note { margin-top: 56px; padding-top: 36px; border-top: 1px solid #dde5ef; max-width: 780px; }
.note blockquote p { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.45; font-weight: 600; color: var(--navy); text-wrap: balance; }
.note figcaption { margin-top: 14px; color: var(--muted); font-weight: 500; }

/* Show/hide by viewport */
.show-sm { display: none; }

footer { background: var(--navy-deep); color: #9fb2c9; font-size: 14px; padding: 22px 0; border-top: 6px solid var(--blue); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
footer .fine { flex-basis: 100%; color: #8197b1; font-size: 13px; }

@media (max-width: 760px) {
  header .wrap { padding-top: 10px; padding-bottom: 6px; gap: 4px 16px; }
  header .brand img { width: 186px; height: 36px; }
  header nav a { font-size: 15px; }
  section[id] { scroll-margin-top: 108px; }
  header nav { width: 100%; gap: 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  header nav::-webkit-scrollbar { display: none; }
  header nav a { white-space: nowrap; }
  header nav a { padding: 8px 0; }
  .hero { padding: 64px 0 72px; }
  .hide-sm { display: none; }
  .show-sm { display: inline-block; }
  .why-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-actions .btn { width: 100%; text-align: center; }
  .hero.compact { padding: 52px 0 56px; }
  .hero svg.net { width: 380px; right: -160px; opacity: .35; }
    section { padding: 64px 0; }
}
