/* ==================================================================
   Instant.Pub marketing site
   Layout and flow follow the "SaaS template" Larry chose (ipub-sa);
   colours are Instant.Pub's own blue. No framework, no CDN.
   After editing, bump ASSET_VERSION in inc/config.php.
   ================================================================== */

@font-face { font-family: "Nunito"; src: url("../fonts/nunito-latin.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito-latin-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --brand:       #3753c1;   /* Instant.Pub blue (logo, buttons, links) */
  --brand-dark:  #2a419e;
  --brand-soft:  #5b7be0;   /* blue bands (blog strip, call to action) */
  --brand-tint:  #eef2fd;
  --ink:         #27313f;   /* body text */
  --muted:       #5f6b7a;
  --slate:       #2e3a4a;   /* dark bands and footer */
  --slate-2:     #3a4859;
  --line:        #e3e7ee;
  --bg-alt:      #f5f7fa;
  --white:       #fff;
  --ok:          #1f9d55;
  --no:          #c0392b;
  --radius:      6px;
  --shadow:      0 10px 30px rgba(30, 45, 80, .12);
  --wrap:        1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--slate); }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 300; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 300; }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; font-weight: 300; color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--white); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn { display: inline-block; padding: .6em 1.4em; border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; text-align: center;
  transition: background .15s, color .15s, border-color .15s; }
.btn-lg { font-size: 1.05rem; padding: .75em 1.7em; }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); color: var(--white); }
.btn-light { background: var(--white); color: var(--muted); border-color: var(--line); }
.btn-light:hover { color: var(--brand); border-color: var(--brand); }
.btn-white { background: var(--white); color: var(--brand); }
.btn-white:hover { background: var(--brand-tint); color: var(--brand-dark); }
.btn-outline-white { color: var(--white); border-color: rgba(255,255,255,.8); }
.btn-outline-white:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-ghost { color: var(--brand); border-color: var(--brand); background: transparent; }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }

/* ---------- header ---------- */
.site-header { background: var(--bg-alt); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.brand img { width: 150px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav > a:not(.btn) { color: var(--muted); text-decoration: none; padding: .5em .9em; font-weight: 600; font-size: .95rem; }
.site-nav > a:not(.btn):hover, .site-nav > a[aria-current="page"] { color: var(--brand); }
.site-nav .btn { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--slate); }
.nav-toggle svg { width: 28px; height: 28px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 24px 20px; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav > a:not(.btn) { padding: .8em 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin: 12px 0 0; }
}

/* ---------- sections and bands ---------- */
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.band { padding: 64px 0; }
.band-alt { background: var(--bg-alt); }
.band-dark { background: var(--slate); color: #dfe5ee; }
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--white); }
.band-dark .lead { color: #c9d2de; }
.band-brand { background: var(--brand-soft); color: var(--white); }
.band-brand h1, .band-brand h2, .band-brand h3 { color: var(--white); }
.band-brand a:not(.btn) { color: var(--white); }
.band-brand .lead { color: #eef2fd; }
.page-hero { padding: 72px 0 64px; text-align: center; }
.page-hero .lead { max-width: 720px; margin: 0 auto; }
.page-hero .btn-row { justify-content: center; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: .8em; }
.band-dark .eyebrow, .band-brand .eyebrow { color: #b9c8f5; }

/* ---------- hero (product hook) ---------- */
.hero { padding: 80px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: .4em; }
.hero .note { font-size: .9rem; color: var(--muted); margin-top: 1.2em; }

/* product screenshot in a simple browser frame */
.screen { background: var(--white); border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.screen::before { content: ""; display: block; height: 26px; background:
  radial-gradient(circle at 14px 13px, #f26b5b 5px, transparent 6px),
  radial-gradient(circle at 32px 13px, #f5c04a 5px, transparent 6px),
  radial-gradient(circle at 50px 13px, #5cc66b 5px, transparent 6px), #eef1f5; border-bottom: 1px solid var(--line); }
.screen img { width: 100%; }
.screen-stack { position: relative; padding-bottom: 18%; }
.screen-stack .screen + .screen { position: absolute; width: 62%; right: -4%; bottom: 0; }

/* ---------- lead magnet ---------- */
.lead-grid { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; }
.lead-art { background: var(--white); border-radius: 50%; width: 220px; height: 220px; display: grid; place-items: center; overflow: hidden; }
.lead-art img { width: 82%; }
.lead-copy h2 { margin-bottom: .3em; }
.widget-card { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 4px 18px 16px; max-width: 440px; margin-top: 18px; }
.widget-card button { font: inherit; font-weight: 600; background: var(--brand); color: var(--white); border: 0;
  border-radius: var(--radius); padding: .55em 1.3em; cursor: pointer; }
.widget-card button:hover { background: var(--brand-dark); }

/* ---------- audience strip ("customers who use us") ---------- */
.audience { text-align: center; }
.audience h2 { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; margin-bottom: 1.4em; }
.audience-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; list-style: none; padding: 0; margin: 0; }
.audience-list li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .8em 1.4em;
  font-weight: 700; color: var(--slate-2); font-size: .95rem; display: flex; gap: .6em; align-items: center; }
.audience-list svg { width: 20px; height: 20px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- benefit / feature rows ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 72px 0; }
.feature-row + .feature-row { border-top: 1px solid var(--line); }
.feature-row.flip .feature-media { order: -1; }
.feature-row h2, .feature-row h3.title { color: var(--brand); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.feature-row .step-no { font-size: .85rem; font-weight: 800; color: var(--brand-soft); letter-spacing: .1em; }
.ticks { list-style: none; padding: 0; margin: 1em 0 0; }
.ticks li { position: relative; padding-left: 1.8em; margin-bottom: .55em; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.05em; height: 1.05em; border-radius: 50%;
  background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%233753c1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat; }
.band-brand .ticks li::before { background-color: rgba(255,255,255,.9); }

/* "In practice" call-out: stands where the template has a testimonial.
   Replace with real customer quotes when we have permission to use them. */
.callout { display: flex; gap: 16px; margin-top: 1.6em; padding: 18px 20px; border-left: 4px solid var(--brand-soft);
  background: var(--bg-alt); border-radius: 0 var(--radius) var(--radius) 0; }
.callout svg { flex: 0 0 34px; width: 34px; height: 34px; stroke: var(--brand); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.callout p { margin: 0; color: var(--slate-2); font-style: italic; }
.callout strong { display: block; font-style: normal; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin-bottom: .2em; }

/* ---------- icon benefit grid (features page, blue band) ---------- */
.icon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 56px; }
.icon-item { display: grid; grid-template-columns: 56px 1fr; gap: 20px; }
.icon-item svg { width: 52px; height: 52px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-item h3 { font-weight: 600; margin-bottom: .3em; }
.icon-item p { margin: 0; opacity: .92; }

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { color: var(--brand); }
.card p:last-child { margin-bottom: 0; }

/* ---------- comparison table ---------- */
.table-wrap { overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; background: var(--white); font-size: .98rem; }
.compare th, .compare td { padding: .85em 1em; border-bottom: 1px solid var(--line); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th { background: var(--slate); color: var(--white); font-weight: 600; }
.compare thead th.us { background: var(--brand); }
.compare td.us { background: var(--brand-tint); }
.compare tr.group td { background: var(--bg-alt); font-weight: 700; color: var(--slate); text-align: left; }
.yes, .no { display: inline-block; width: 1.4em; height: 1.4em; border-radius: 50%; vertical-align: middle; }
.yes { background: #dff3e6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231f9d55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/75% no-repeat; }
.no  { background: #f8e1de url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 5l6 6M11 5l-6 6' fill='none' stroke='%23c0392b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/70% no-repeat; }
.dash { color: #a7b0bc; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- pricing ---------- */
.pricing-hero { padding-bottom: 150px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: -130px; align-items: start; }
.plan { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; padding: 36px 28px 32px; position: relative; }
.plan.popular { border-top: 0; padding-top: 64px; }
.plan .badge { position: absolute; top: 0; left: 0; right: 0; background: var(--brand-soft); color: var(--white); font-weight: 800;
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; padding: .7em; border-radius: var(--radius) var(--radius) 0 0; }
.plan h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); margin-bottom: .9em; }
.plan .price { font-size: 2.8rem; font-weight: 800; color: var(--slate); line-height: 1; }
.plan .price small { font-size: 1rem; font-weight: 400; color: var(--muted); }
.plan .annual { color: var(--muted); font-size: .92rem; margin: .5em 0 1.4em; }
.plan .ticks { text-align: left; border-top: 1px solid var(--line); padding-top: 1.2em; margin-bottom: 1.6em; font-size: .97rem; }
.plan .btn { width: 100%; }
.beta-note { display: inline-block; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  padding: .45em 1.2em; margin-top: 1.4em; font-size: .95rem; color: var(--white); }
details.full-compare { margin-top: 48px; }
details.full-compare summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: 1.05rem; padding: .6em 0; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 56px; }
.faq-grid h3 { color: var(--brand); font-size: 1.12rem; }
.faq-grid p { margin: 0; color: var(--muted); }

/* ---------- blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.post-card-img img { border-radius: var(--radius); box-shadow: 0 8px 22px rgba(0,0,0,.18); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-card h3 { font-size: 1.05rem; font-weight: 700; margin: 1em 0 .5em; }
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card .read-more { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.band-brand .post-card h3 a:hover { text-decoration: underline; }

.blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 56px; }
.blog-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 40px 0 24px; }
.blog-head h1 { margin: 0; }
.post-list article { padding: 40px 0; border-bottom: 1px solid var(--line); }
.post-list article:first-child { padding-top: 8px; }
.post-list img { border-radius: var(--radius); aspect-ratio: 16 / 7; object-fit: cover; width: 100%; }
.post-list h2 { font-size: 1.6rem; font-weight: 400; margin: .9em 0 .3em; }
.post-list h2 a { text-decoration: none; }
.meta { color: var(--muted); font-size: .9rem; margin-bottom: .8em; }
.sidebar > div { margin-bottom: 28px; }
.sidebar h2 { font-size: 1.05rem; font-weight: 800; }
.sidebar .recent a { display: block; text-decoration: none; color: var(--muted); padding: .35em 0; font-size: .95rem; }
.sidebar .recent a:hover { color: var(--brand); }
.side-card { padding: 28px 24px; border-radius: var(--radius); text-align: center; }
.side-card h2 { margin-bottom: .2em; }
.side-card .tag { font-size: .85rem; opacity: .8; margin-bottom: 1em; }
.side-card.light { background: var(--bg-alt); }
.side-card.brand { background: var(--brand-soft); color: var(--white); }
.side-card.brand h2 { color: var(--white); }
.side-card.dark { background: var(--slate); color: #dfe5ee; }
.side-card.dark h2 { color: var(--white); }

.article { padding: 56px 0 72px; }
.article header { margin-bottom: 32px; }
.article h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.article .cover { border-radius: var(--radius); margin: 28px 0 8px; aspect-ratio: 16 / 7; object-fit: cover; width: 100%; }
.prose { font-size: 1.08rem; }
.prose h2 { font-size: 1.55rem; font-weight: 600; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--brand-soft); color: var(--slate-2); font-style: italic; }
.article-cta { margin-top: 40px; padding: 28px; background: var(--brand-tint); border-radius: var(--radius); }
.article-cta h2 { margin-top: 0; font-size: 1.35rem; }

/* ---------- contact / about ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.contact-grid.two { grid-template-columns: repeat(2, 1fr); }
.contact-grid .card .btn { margin-top: .6em; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: .5em 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; }
.info-list li:last-child { border-bottom: 0; }
.info-list b { color: var(--slate); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

/* ---------- legal pages ---------- */
.legal { padding: 56px 0 80px; }
.legal h2 { font-size: 1.45rem; font-weight: 600; margin-top: 1.8em; }
.legal h3 { font-size: 1.1rem; }

/* ---------- closing call to action ---------- */
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta-row h2 { margin-bottom: .2em; }
.cta-row p { margin: 0; opacity: .92; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; flex: 0 0 auto; }

/* ---------- footer ---------- */
.site-footer { background: var(--slate); color: #c3ccd8; padding: 56px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-brand img { width: 150px; background: var(--white); border-radius: var(--radius); padding: 8px 12px; box-sizing: content-box; margin-bottom: 14px; }
.site-footer h2 { color: var(--white); font-size: .95rem; font-weight: 800; margin-bottom: .9em; }
.site-footer a { color: #c3ccd8; text-decoration: none; display: block; padding: .2em 0; }
.site-footer a:hover { color: var(--white); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--slate-2);
  margin-top: 40px; padding-top: 22px; font-size: .85rem; color: #93a0b2; }
.footer-legal a { display: inline; margin-left: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .feature-row, .two-col { grid-template-columns: 1fr; gap: 36px; }
  .feature-row.flip .feature-media { order: 0; }
  .card-grid, .post-grid, .plans, .contact-grid, .contact-grid.two { grid-template-columns: 1fr; }
  .plans { margin-top: -110px; gap: 36px; }
  .blog-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }
  .feature-row { padding: 52px 0; }
  .lead-grid { grid-template-columns: 1fr; gap: 24px; }
  .lead-art { width: 160px; height: 160px; }
  .icon-grid, .faq-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-legal a { margin: 0 18px 0 0; }
  .screen-stack { padding-bottom: 0; }
  .screen-stack .screen + .screen { position: static; width: 100%; margin-top: 16px; }
}
