/* ============================================================
   Devlib — style.css
   Modern, lightweight, responsive shareware/tool site stylesheet
   ============================================================ */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #444444;
  --muted: #526176;
  --faint: #7a8699;
  --border: #e5eaf1;
  --primary: #0066CC;
  --primary-strong: #0059b3;
  --primary-deep: #004d99;
  --primary-soft: #e6f0fa;
  --success: #16a34a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 20px rgba(15, 23, 42, .07);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, .12);
  --maxw: 1120px;
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

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

.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;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #eef1f6;
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 32px; color: #0066CC; flex-shrink: 0; }
.brand, .brand:hover, .brand:focus, .brand:focus-visible { text-decoration: none; color: #0066CC; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__name { -webkit-text-stroke: 1px #ffffff; text-shadow: 3px 3px 5px rgba(120, 120, 120, .55); }
.brand__name .lib { color: #666666; }

.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.main-nav a {
  display: block; padding: 8px 13px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 600; font-size: .95rem; text-decoration: none;
}
.main-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.main-nav a[aria-current="page"] { color: var(--primary); }

/* dropdown */
.has-sub { position: relative; }
.has-sub > a::after { content: " ▾"; font-size: .7em; }
.subnav {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 6px; list-style: none; margin: 6px 0 0;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .15s ease;
}
.has-sub:hover .subnav, .has-sub:focus-within .subnav { opacity: 1; visibility: visible; transform: none; }
.subnav a { padding: 9px 12px; }

.nav-toggle {
  display: none; margin-left: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); width: 42px; height: 40px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #0f1c3f 0%, #12285c 100%); color: #eaf0fb; padding: 64px 0 72px; }
.hero .container { max-width: var(--maxw); }
.hero h1 { color: #fff; margin-bottom: .5em; }
.hero p.lead { font-size: 1.2rem; color: #c7d4f0; max-width: 720px; margin-bottom: 1.4em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { margin-top: 26px; display: flex; gap: 20px; flex-wrap: wrap; color: #a9bae0; font-size: .9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-sm); font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: .15s; text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-light { background: #fff; color: var(--primary-deep); }
.btn-light:hover { background: #e6f0fa; color: var(--primary-deep); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head .eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--primary);
}
.section-head p { color: var(--muted); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: .15s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card .icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 1.4rem; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }

/* ---------- Product feature ---------- */
.product-card { display: flex; flex-direction: column; }
.product-card .thumb { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 16px; }
.product-card .thumb img { margin: 0 auto; max-height: 150px; object-fit: contain; }
.shot { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.shot img { margin: 0 auto; display: block; }
.product-card .tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); }
.product-card p { flex: 1; }
.product-card__cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; justify-content: space-between; }

/* ---------- Feature list ---------- */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--muted); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 700;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .88rem; color: var(--faint); padding: 18px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--faint); }
.breadcrumbs a { color: var(--muted); }

/* ---------- Page layout ---------- */
.page { padding: 28px 0 56px; }
.page-intro { max-width: 760px; margin-bottom: 28px; }
.page-intro p { color: var(--muted); font-size: 1.05rem; }

.lead-badge {
  display: inline-block; background: var(--primary-soft); color: var(--primary-deep);
  font-weight: 700; font-size: .82rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* ---------- Pricing accordion ---------- */
.price-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h) + 20px); }
.price-block summary { display: flex; align-items: center; gap: 16px; padding: 16px 18px; cursor: pointer; list-style: none; }
.price-block summary::-webkit-details-marker { display: none; }
.price-block__name { flex: 1; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.price-block summary::after { content: "▾"; color: var(--primary); font-size: 1.1rem; transition: transform .2s; }
.price-block[open] summary::after { transform: rotate(180deg); }
.price-block .price-rows { border-top: 1px solid var(--border); }
.price-row { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.price-row:last-child { border-bottom: 0; }
.price-row__name { flex: 1; font-weight: 600; color: var(--muted); }
.price-row__price { font-weight: 800; font-size: 1.05rem; color: var(--text); white-space: nowrap; }
@media (max-width: 560px) {
  .price-row { flex-wrap: wrap; gap: 8px 16px; }
  .price-row__name { flex: 1 1 100%; }
}

/* ---------- FAQ (details) ---------- */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); font-weight: 400; transition: .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--muted); }
.faq-item .faq-body pre { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; font-family: var(--mono); font-size: .85rem; }

/* ---------- Note / disclaimer ---------- */
.note {
  background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm); padding: 14px 18px; color: #78350f; font-size: .94rem; margin: 18px 0;
}
.note strong { color: #78350f; }

/* ---------- Call to action ---------- */
.cta { background: var(--primary-soft); border: 1px solid #c9e0f5; border-radius: var(--radius); padding: 28px; text-align: center; margin-top: 8px; }
.cta h2 { margin-bottom: .3em; }
.cta p { color: var(--muted); }
.cta .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.actions--spread { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: #0f1c3f; color: #c7d4f0; padding: 48px 0 32px; font-size: .92rem; }
.site-footer a { color: #c7d4f0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: #fff; font-size: .95rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .05em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-brand p { max-width: 340px; }
.site-footer__brand { font-size: 1.2rem; font-weight: 800; color: #ffffff; margin-bottom: .6rem; }
.site-footer__brand .lib { color: #c7d4f0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: #8fa2c9; }

/* ---------- Misc ---------- */
.logo-strip { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.logo-strip img { max-height: 42px; width: auto; opacity: .75; filter: grayscale(100%); transition: .2s; }
.logo-strip img:hover { opacity: 1; filter: none; }

.divider { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

.back-top { display: inline-block; margin-top: 28px; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .main-nav.open { max-height: 480px; }
  .main-nav > ul { flex-direction: column; align-items: stretch; padding: 12px 16px 16px; gap: 2px; }
  .subnav { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; margin: 0; padding: 2px 0 2px 12px; }
  .hero { padding: 44px 0 52px; }
  .section { padding: 40px 0; }
}
