/*
Theme Name: TopoSEO
Theme URI: https://toposeo.com
Author: TopoSEO
Description: Lightweight classic theme for TopoSEO, a specialist technical SEO audit practice. Supplies the brand foundation (fonts, colors, full-width canvas) and custom on-brand WPBakery Page Builder elements. Page layout is left to the builder.
Version: 1.2.4
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toposeo
Tags: one-column, custom-logo, custom-menu, editor-style, full-width-template
*/

/* Base ------------------------------------------------------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: "Bricolage Grotesque", Inter, sans-serif;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: pretty;
}
h1 { font-size: clamp(34px, 5vw, 52px); }
h2 { font-size: clamp(26px, 3.6vw, 36px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
a { color: var(--amber-deep); }
a:hover { color: var(--brand-rust); }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; clip: auto; width: auto; height: auto; background: var(--paper-raised); color: var(--ink); padding: 10px 16px; border-radius: 8px; }

.ts-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.ts-content { padding-top: 56px; padding-bottom: 56px; }
.ts-content:has(> .ts-archive-title) { padding-bottom: 28px; }
.ts-fullwidth { padding: 0; }

/* Wordmark --------------------------------------------------- */
.ts-wordmark { font-family: "Bricolage Grotesque", Inter, sans-serif; font-weight: 800; font-size: 26px; letter-spacing: -0.01em; text-decoration: none; }
.ts-wordmark .ts-wm-topo { color: var(--forest); }
.ts-wordmark .ts-wm-seo { color: var(--brand-rust); }
.ts-wordmark-rev .ts-wm-topo, .ts-wordmark-rev .ts-wm-seo { color: var(--on-forest); }
.ts-tagline { font: 500 13px/1.4 Inter, sans-serif; letter-spacing: 1.5px; color: var(--brand-rust); }
.ts-footer .ts-tagline { color: var(--muted-on-forest); }
.ts-footer-logo { display: inline-flex; }

/* Buttons ---------------------------------------------------- */
.ts-btn { display: inline-block; font: 600 15px/1 Inter, sans-serif; letter-spacing: 0.02em; padding: 14px 24px; border-radius: 10px; text-decoration: none; border: 1px solid transparent; }
.ts-btn-primary { background: var(--amber); color: var(--forest-deep); }
.ts-btn-primary:hover { background: var(--amber-deep); color: var(--forest-deep); }
.ts-btn-outline { background: transparent; color: var(--on-forest); border-color: var(--muted-on-forest); }
.ts-btn-outline:hover { border-color: var(--on-forest); color: var(--on-forest); }

/* Header ------------------------------------------------------ */
.ts-header { position: sticky; top: 0; z-index: 100; background: var(--paper); box-shadow: 0 2px 10px rgba(33,50,38,0.12); }
.ts-header-inner { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ts-logo { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.ts-logo .ts-wordmark { font-size: 22px; line-height: 1; }
.ts-logo-tagline { font-size: 10px; }
.ts-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 26px; margin: 0; padding: 0; }
.ts-nav a { color: var(--forest); text-decoration: none; font: 500 15px Inter, sans-serif; }
.ts-nav a:hover, .ts-nav a:focus { text-decoration: underline; text-underline-offset: 4px; color: var(--forest); }

/* Mobile nav --------------------------------------------------- */
.ts-nav-toggle { display: none; background: none; border: 0; padding: 8px 4px; cursor: pointer; }
.ts-nav-toggle-bar { display: block; width: 24px; height: 2px; background: var(--forest); margin: 5px 0; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.ts-nav-toggle.is-open .ts-nav-toggle-bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.ts-nav-toggle.is-open .ts-nav-toggle-bar:nth-child(3) { opacity: 0; }
.ts-nav-toggle.is-open .ts-nav-toggle-bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 720px) {
  .ts-nav-toggle { display: block; }
  .ts-nav { display: none; width: 100%; }
  .ts-nav.is-open { display: block; }
  .ts-nav ul { flex-direction: column; gap: 0; padding: 4px 0 12px; }
  .ts-nav a { display: block; padding: 12px 0; font-size: 16px; border-top: 1px solid var(--border); }
}

/* Footer ------------------------------------------------------ */
.ts-footer { background: var(--forest); color: var(--muted-on-forest); margin-top: 72px; position: relative; overflow: hidden; }
.ts-footer-contours { position: absolute; right: -80px; top: 50%; transform: translateY(-50%); width: 520px; height: 520px; color: var(--on-forest); opacity: 0.07; pointer-events: none; }
.ts-footer-logo { display: inline-flex; }
.ts-footer-logo img { width: 140px; max-width: 140px; height: auto; display: block; }
.ts-footer-inner { max-width: 1200px; margin: 0 auto; padding: 56px 24px 28px; position: relative; }
.ts-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ts-footer-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ts-footer-brand img { width: 140px; height: auto; display: block; }
.ts-footer-menu ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 10px 48px; }
.ts-footer-menu a { color: var(--on-forest); text-decoration: none; font: 500 14px Inter, sans-serif; }
.ts-footer-menu a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ts-footer-legal { border-top: 1px solid rgba(243, 235, 219, 0.15); margin-top: 36px; padding-top: 20px; text-align: center; font-size: 13px; }
@media (max-width: 640px) { .ts-footer-row { flex-direction: column; align-items: flex-start; } }
.ts-footer a { color: var(--on-forest); }
.ts-footer-contact { font-size: 15px; margin: 12px 0 0; }

/* Posts / pages ----------------------------------------------- */
.entry-title { margin-bottom: 0.4em; }
.entry-meta { font: 500 13px Inter, sans-serif; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 24px; }
.entry-content > * { max-width: 760px; }
.entry-content .alignwide { max-width: 1100px; }
.entry-content .alignfull { max-width: none; }

/* ============================================================ */
/* TopoSEO WPBakery elements                                     */
/* ============================================================ */

/* Hero */
.ts-hero { position: relative; overflow: hidden; background: var(--forest); color: var(--on-forest); padding: clamp(64px, 9vw, 120px) clamp(24px, 6vw, 72px); }
.ts-hero-contours { position: absolute; top: 50%; right: -120px; transform: translateY(-50%); width: 620px; height: 620px; color: var(--on-forest); opacity: 0.08; pointer-events: none; }
.ts-hero-inner { position: relative; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 60% 40%; align-items: center; }
.ts-hero-logo { width: min(440px, 90%); height: auto; display: block; justify-self: center; }
@media (max-width: 720px) { .ts-hero-inner { grid-template-columns: 1fr; } .ts-hero-logo { display: none; } }
.ts-eyebrow { display: block; font: 600 13px Inter, sans-serif; letter-spacing: 1.8px; color: var(--amber); margin-bottom: 18px; }
.ts-hero h1, .ts-hero h2 { color: var(--on-forest); max-width: 22ch; margin-bottom: 0.45em; }
.ts-hero-sub { color: var(--muted-on-forest); font-size: 19px; max-width: 54ch; margin: 0; }
.ts-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.ts-hero-art { width: clamp(180px, 24vw, 300px); height: auto; flex: none; justify-self: center; }
@media (max-width: 767px) { .ts-hero-art { display: none; } }

/* Product card */
.ts-card { background: var(--paper-raised); border: 1px solid var(--border); border-radius: 14px; padding: 28px; height: 100%; }
.ts-card h3 { margin-bottom: 10px; }
.ts-card p { margin: 0; }
.ts-tag { display: inline-block; font: 600 11px Inter, sans-serif; letter-spacing: 1.5px; color: var(--muted); background: var(--paper); border: 1px solid var(--border); padding: 5px 11px; border-radius: 999px; margin-bottom: 16px; }

.ts-card-link { display: inline-block; margin-top: 16px; font: 600 14px Inter, sans-serif; color: var(--amber-deep); text-decoration: none; }
.ts-card-link:hover { color: var(--brand-rust); text-decoration: underline; text-underline-offset: 4px; }

/* CTA block */
.ts-cta { text-align: center; padding: 16px 0; }
.ts-cta h2 { margin-bottom: 12px; }
.ts-cta p { max-width: 56ch; margin: 0 auto 24px; }

/* Scoring areas */
.ts-scoring { background: var(--paper-raised); border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.ts-score-row { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.ts-score-row:last-of-type { border-bottom: 0; }
.ts-score-name { font: 500 15px Inter, sans-serif; color: var(--ink); }
.ts-score-weight { font: 600 15px Inter, sans-serif; color: var(--ink); text-align: right; }
.ts-bar { height: 8px; border-radius: 999px; background: var(--paper-sunk); overflow: hidden; }
.ts-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--sage-bright), var(--amber)); }
.ts-score-caption { font-size: 13.5px; color: var(--muted); margin: 16px 0 0; }
@media (max-width: 767px) {
  .ts-scoring { padding: 18px; }
  .ts-score-row { grid-template-columns: 1fr; gap: 8px; }
  .ts-score-name { font-size: 14px; }
}

/* Stacked builder columns need breathing room on mobile. */
@media (max-width: 767px) {
  .ts-fullwidth .vc_column_container { margin-bottom: 16px; }
  .ts-fullwidth .vc_column_container:last-child { margin-bottom: 0; }
}

/* Step */
.ts-step { background: var(--forest); border-radius: 14px; padding: 26px; height: 100%; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.ts-step-contours { position: absolute; right: -110px; bottom: -150px; width: 380px; height: 380px; color: var(--on-forest); opacity: 0.07; pointer-events: none; }
.ts-step-head, .ts-step h3, .ts-step p { position: relative; }
.ts-step-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.ts-step-num { font-family: "Bricolage Grotesque", Inter, sans-serif; font-weight: 800; font-size: 34px; color: var(--amber); line-height: 1; }
.ts-step-rule { flex: 1; border-top: 1px dashed rgba(243, 235, 219, 0.25); transform: translateY(-8px); }
.ts-step h3 { font-size: 19px; margin: 0 0 8px; color: var(--on-forest); }
.ts-step p { margin: 0; font-size: 15px; color: var(--muted-on-forest); }

/* Flag */
.ts-flag { display: flex; align-items: flex-start; gap: 14px; background: var(--paper-raised); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin: 0 0 10px; }
.ts-flag-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 7px; }
.ts-flag-body { flex: 1; color: var(--body); font-size: 15.5px; line-height: 1.5; }
.ts-flag-tag { flex: none; font: 600 11px Inter, sans-serif; letter-spacing: 1.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--paper); }
.ts-flag-high .ts-flag-dot { background: var(--sev-high); } .ts-flag-high .ts-flag-tag { color: var(--sev-high); }
.ts-flag-medium .ts-flag-dot { background: var(--sev-medium); } .ts-flag-medium .ts-flag-tag { color: var(--sev-medium); }
.ts-flag-low .ts-flag-dot { background: var(--sev-low); } .ts-flag-low .ts-flag-tag { color: var(--sev-low); }
.ts-flag-strength .ts-flag-dot { background: var(--strength); } .ts-flag-strength .ts-flag-tag { color: var(--strength); }
.ts-flag-note .ts-flag-dot { background: var(--note); } .ts-flag-note .ts-flag-tag { color: var(--note); }

/* Full-width builder pages: rhythm and containment ------------- */
body { overflow-x: hidden; }
.ts-fullwidth .vc_row.wpb_row,
.ts-fullwidth .wpb_row {
  max-width: 1248px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px;
  padding-right: 24px;
  margin-bottom: 64px;
}
/* The hero escapes its contained row back to full bleed. */
.ts-fullwidth .ts-hero { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
/* Section-heading rows sit close to the content they introduce. */
.ts-fullwidth .wpb_row:has(.wpb_text_column:only-child) { margin-bottom: 24px; }
.ts-fullwidth .wpb_text_column h2 { margin: 0 0 16px; }
/* Fallback shortcode rendering without WPBakery row markup. */
.ts-fullwidth > .ts-scoring, .ts-fullwidth > .ts-card, .ts-fullwidth > .ts-flag, .ts-fullwidth > .ts-step { max-width: 1200px; margin-left: auto; margin-right: auto; }

/* Blog --------------------------------------------------------- */
.ts-blog-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; padding-bottom: 56px; }
.ts-container.ts-content .ts-archive-title + * { margin-top: 0; }
/* Widget styling inside sidebar boxes */
.ts-sidebar-box .widget-title, .ts-sidebar-box .wp-block-heading { font-family: "Bricolage Grotesque", Inter, sans-serif; font-weight: 800; font-size: 17px; color: var(--ink); margin: 0 0 14px; }
.ts-sidebar-box ul { list-style: none; margin: 0; padding: 0; }
.ts-sidebar-box ul li { border-top: 1px solid var(--border); }
.ts-sidebar-box ul li:first-child { border-top: 0; }
.ts-sidebar-box ul li a { display: block; padding: 9px 0; color: var(--body); text-decoration: none; font-size: 15px; }
.ts-sidebar-box ul li a:hover { color: var(--amber-deep); }
.ts-archive-title { font-size: clamp(30px, 4vw, 42px); margin: 0; }
.ts-post-meta { display: flex; flex-wrap: wrap; gap: 14px; font: 600 12px Inter, sans-serif; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.ts-post-cat a { color: var(--amber-deep); text-decoration: none; }
.ts-post-cat a:hover { color: var(--brand-rust); }
.ts-post-title { margin: 0 0 10px; }
.ts-post-title a { color: var(--ink); text-decoration: none; }
.ts-post-title a:hover { color: var(--amber-deep); }
.ts-post-excerpt p { margin: 0 0 14px; font-size: 15.5px; }
.ts-more { display: inline-block; font: 600 12px Inter, sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--amber-deep); text-decoration: none; border-bottom: 1px solid var(--border); padding-bottom: 3px; }
.ts-more:hover { color: var(--brand-rust); }
.ts-post-feat { padding-bottom: 36px; }
.ts-post-feat-title { font-size: clamp(28px, 4vw, 40px); }
.ts-post-feat-img img, .ts-post-hero { width: 100%; height: auto; border-radius: 14px; margin: 18px 0; display: block; }
.ts-post-row { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--border); }
.ts-post-row .ts-post-title { font-size: 22px; }
.ts-post-thumb img, .ts-thumb-empty { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; display: block; background: var(--paper-sunk); }
/* Two-column text rows (contact): gutter between columns */
@media (min-width: 768px) {
  .ts-fullwidth .wpb_row .vc_col-sm-6:first-child .vc_column-inner { padding-right: 48px; }
}

/* Latest posts (home) */
.ts-latest-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.ts-latest-card { background: var(--paper-raised); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.ts-latest-thumb img, .ts-latest-card .ts-thumb-empty { width: 100%; height: 200px; object-fit: cover; display: block; background: var(--paper-sunk); border-radius: 0; }
.ts-latest-body { padding: 22px 24px 24px; }
.ts-latest-body .ts-post-title { font-size: 21px; }
.ts-latest-excerpt { margin: 0 0 14px; font-size: 15px; }

/* Sidebar */
.ts-sidebar { display: flex; flex-direction: column; gap: 20px; }
.ts-sidebar-box { background: var(--paper-raised); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.ts-sidebar-title { font-size: 17px; margin-bottom: 14px; }
.ts-sidebar-list { list-style: none; margin: 0; padding: 0; }
.ts-sidebar-list li { border-top: 1px solid var(--border); }
.ts-sidebar-list li:first-child { border-top: 0; }
.ts-sidebar-list a { display: block; padding: 9px 0; color: var(--body); text-decoration: none; font-size: 15px; }
.ts-sidebar-list a:hover { color: var(--amber-deep); }
.ts-mini-post { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; text-decoration: none; padding: 8px 0; border-top: 1px solid var(--border); }
.ts-mini-post:first-of-type { border-top: 0; }
.ts-mini-thumb img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; display: block; background: var(--paper-sunk); }
.ts-mini-title { display: block; font: 600 14px/1.35 Inter, sans-serif; color: var(--ink); }
.ts-mini-date { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.ts-sidebar-about { margin: 0; font-size: 14.5px; }
/* Post nav + pagination */
.ts-post-nav { display: flex; justify-content: space-between; gap: 24px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--ink); font: 500 14px Inter, sans-serif; }
.pagination .page-numbers.current { background: var(--forest); color: var(--on-forest); border-color: var(--forest); }
@media (max-width: 960px) {
  .ts-blog-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ts-post-row { grid-template-columns: 1fr; gap: 14px; }
}
