/* Mercury Optimization Solutions — site styles */
:root {
  --navy: #0c304f;
  --navy-deep: #082339;
  --navy-line: #1d4466;
  --orange: #fc6704;
  --orange-soft: #ff8a3d;
  --white: #ffffff;
  --text: #e8eef4;
  --muted: #a9bccd;
  --paper: #f6f8fa;
  --ink: #142433;
  --radius: 14px;
  --max: 1180px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-underline-offset: 3px; }
a:hover { color: var(--orange-soft); }
h1, h2, h3, h4 { color: var(--white); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); color: var(--navy); padding: 8px 12px; z-index: 10; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--navy-line); position: sticky; top: 0; background: rgba(12, 48, 79, .96); backdrop-filter: blur(6px); z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 100px; }
.brand img { width: 230px; }
.nav { display: flex; align-items: center; gap: 4px 22px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-size: 1rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--orange); border-bottom-color: var(--orange); }
.btn {
  display: inline-block; background: var(--orange); color: var(--white) !important; text-decoration: none;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  border: 2px solid var(--orange); transition: background .15s, color .15s;
}
.btn:hover { background: transparent; color: var(--orange) !important; }
.btn.ghost { background: transparent; color: var(--orange) !important; }
.btn.ghost:hover { background: var(--orange); color: var(--white) !important; }
.btn.small { padding: 8px 16px; font-size: .9rem; }
.btn[aria-disabled="true"] { background: transparent; border-color: var(--navy-line); color: var(--muted) !important; pointer-events: none; }

.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; color: var(--white); font-weight: 600; padding: 8px 14px; border: 1px solid var(--navy-line); border-radius: 999px; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy-deep); padding: 16px; display: grid; gap: 6px; border-bottom: 1px solid var(--navy-line); }
.menu nav a { color: var(--text); text-decoration: none; padding: 8px 4px; font-size: 1.05rem; }
.menu nav .btn { justify-self: start; margin-top: 8px; }

@media (max-width: 960px) {
  .site-header .nav, .site-header .header-cta { display: none; }
  .menu { display: block; }
  .brand img { width: 150px; }
}

/* ---------- sections ---------- */
section { padding: clamp(48px, 8vw, 96px) 0; }
.section-light { background: var(--paper); color: var(--ink); }
.section-light h1, .section-light h2, .section-light h3 { color: var(--navy); }
.section-light a:not(.btn) { color: #c24f00; }
.eyebrow { color: var(--orange); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; margin-bottom: 12px; }
.lead { font-size: 1.2rem; color: var(--text); }
.section-light .lead { color: #3b4c5c; }

/* home hero */
.hero .wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.hero-words h2 { color: var(--orange); font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: .35em; font-weight: 500; }
.hero-copy p { color: var(--orange-soft); font-size: 1.15rem; }
.hero-copy p:first-child { font-size: 1.3rem; }
@media (max-width: 800px) { .hero .wrap { grid-template-columns: 1fr; gap: 24px; } }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.card { display: flex; flex-direction: column; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: var(--radius); margin-bottom: 18px; background: var(--white); }
.card img.contain { object-fit: contain; padding: 18px; }
.card h3 { font-size: 1.5rem; }
.card .btn { align-self: flex-start; margin-top: auto; }
.section-light .card p { color: #3b4c5c; }

/* call to action band */
.cta-band { background: var(--navy-deep); text-align: center; position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; left: -5%; right: -5%; bottom: -60px; height: 120px;
  border-top: 4px solid var(--orange); border-radius: 50% 50% 0 0 / 100% 100% 0 0; opacity: .8;
}
.cta-band h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }

/* split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split + .split { margin-top: 72px; }
.split img { border-radius: var(--radius); width: 100%; }
.split.flip > :first-child { order: 2; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 24px; } .split.flip > :first-child { order: 0; } }
ul.ticks { padding-left: 0; list-style: none; }
ul.ticks li { padding-left: 28px; position: relative; margin-bottom: 8px; }
ul.ticks li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }

/* page title */
.page-title { padding-bottom: 24px; }
.page-title p { color: var(--muted); max-width: 720px; }

/* downloads */
.dl-group { margin-bottom: 56px; }
.dl-group > h2 { border-bottom: 1px solid var(--navy-line); padding-bottom: 12px; }
.dl-list { display: grid; gap: 14px; }
.dl-item {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center;
  background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: var(--radius); padding: 20px 24px;
}
.dl-item h3 { margin: 0; font-size: 1.2rem; }
.dl-item .meta { color: var(--muted); font-size: .95rem; margin: 2px 0 0; }
.dl-item .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .dl-item { grid-template-columns: 1fr; } .dl-item .actions { justify-content: flex-start; } }

/* product */
.product { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.product .shot { background: var(--white); border-radius: var(--radius); padding: 24px; }
.free-badge { display: inline-block; background: rgba(252, 103, 4, .15); color: var(--orange); border: 1px solid var(--orange); border-radius: 999px; padding: 2px 12px; font-size: .85rem; font-weight: 600; margin-bottom: 14px; }
.link-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 10px; }
.link-list li { display: flex; gap: 10px; align-items: baseline; }
.link-list .label { color: var(--muted); min-width: 120px; }
@media (max-width: 800px) { .product { grid-template-columns: 1fr; gap: 28px; } }

/* blog */
.post-list { display: grid; gap: 40px; }
.post-card { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: center; text-decoration: none; color: inherit; }
.post-card img { border-radius: var(--radius); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: var(--white); }
.post-card h2 { font-size: 1.6rem; margin-bottom: .3em; }
.post-card:hover h2 { color: var(--orange); }
.post-card p { color: var(--muted); }
.date { color: var(--orange); font-size: .9rem; font-weight: 600; letter-spacing: .04em; }
@media (max-width: 760px) { .post-card { grid-template-columns: 1fr; gap: 16px; } }

.article { max-width: 760px; margin-inline: auto; }
.article .cover { border-radius: var(--radius); margin: 24px 0 40px; background: var(--white); }
.article h2 { font-size: 1.6rem; margin-top: 1.6em; }
.article li { margin-bottom: 6px; }
.article li > p { margin: 0; }
.article pre {
  background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: 10px;
  padding: 18px 20px; overflow-x: auto; font-size: .85rem; line-height: 1.5; margin: 0 0 1.4em;
}
.article code { font-family: var(--mono); }
.article :not(pre) > code { background: var(--navy-deep); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.back { display: inline-block; margin-bottom: 20px; text-decoration: none; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.contact-grid img { border-radius: var(--radius); }
.contact-card { background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: var(--radius); padding: 28px; margin: 28px 0; }
.contact-card .row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--navy-line); flex-wrap: wrap; }
.contact-card .row:last-child { border-bottom: 0; }
.contact-card .label { color: var(--muted); }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

/* legal */
.legal { max-width: 780px; }
.legal h2 { font-size: 1.4rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.1rem; margin-top: 1.2em; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); border-top: 4px solid var(--orange); padding: 48px 0 32px; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-size: 1.3rem; }
.site-footer h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
.site-footer .fine { grid-column: 1 / -1; color: var(--muted); border-top: 1px solid var(--navy-line); padding-top: 20px; margin-top: 8px; font-size: .85rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }
