/* ============================================================
   RevOps Masters - Global Stylesheet
   Light theme, inspired by instantly.ai - clean, modern SaaS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root{
  color-scheme: light only;
  /* Light foundation */
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-hero: #F1F5F9;

  /* Text */
  --text: #0F172A;
  --text-secondary: #334155;
  --muted: #64748B;
  --muted-light: #94A3B8;

  /* Accent palette */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-border: #BFDBFE;

  --accent: #F97316;
  --accent-light: #FFF7ED;
  --accent-border: #FED7AA;

  --cyan: #0891B2;
  --cyan-light: #ECFEFF;
  --purple: #7C3AED;
  --purple-light: #F5F3FF;

  /* Borders & surfaces */
  --line: #E2E8F0;
  --line-hover: #CBD5E1;
  --panel: #FFFFFF;
  --panel-hover: #F8FAFC;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 12px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.05);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  --max: 1200px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

*{ box-sizing: border-box; }
html{ height:100%; scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.container{
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* ── Top nav ───────────────────────────────── */
header{
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.85);
  border-bottom: 1px solid var(--line);
}
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}
.brand img{
  width: 177px;
  height: 45px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.brand .name{
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand .name strong{
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.2px;
  color: var(--text);
}
.brand .name span{
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.navlinks{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  transition: all .15s ease;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.pill:hover{
  background: var(--bg-alt);
  color: var(--primary);
}

/* ── Hero ──────────────────────────────────── */
.hero{
  padding: 72px 0 32px;
  position: relative;
  background: linear-gradient(180deg, var(--bg-hero) 0%, var(--bg) 100%);
}
.heroGrid{
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 980px){
  .heroGrid{ grid-template-columns: 1fr; }
}

.card{
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.heroMain{
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
  background: var(--panel);
}
.heroMain:before{
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 400px; height: 400px;
  background:
    radial-gradient(300px 200px at 80% 20%, rgba(37,99,235,.06), transparent 70%),
    radial-gradient(250px 180px at 60% 60%, rgba(249,115,22,.04), transparent 70%);
  pointer-events: none;
}
.heroMain > *{ position: relative; }

.kicker{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--primary-border);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}
.dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

h1{
  margin: 20px 0 14px;
  font-size: clamp(32px, 3.8vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.8px;
  font-weight: 800;
  color: var(--text);
}
.gradientText{
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 60%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub{
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 60ch;
}

.ctaRow{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.btn{
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-secondary);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .15s ease;
  cursor: pointer;
}
.btn:hover{
  border-color: var(--line-hover);
  background: var(--bg-alt);
  box-shadow: var(--shadow-sm);
}
.btnPrimary{
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #FFFFFF;
}
.btnPrimary:hover{
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(37,99,235,.25);
}

/* ── Download CTA box ─────────────────────── */
.download-box{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  margin: 32px 0;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
}
.download-box-content{
  display: flex;
  align-items: center;
  gap: 14px;
}
.download-box-icon{
  color: var(--primary);
  flex-shrink: 0;
}
.download-box-title{
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.download-box-file{
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
@media(max-width:600px){
  .download-box{
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Sidebar cards ─────────────────────────── */
.side{
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.side h2{
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.1px;
  color: var(--text);
}
.meta{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}
.chip b{ color: var(--text); font-weight: 600; }

.search{
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.search input{
  flex: 1;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color .15s ease;
}
.search input::placeholder{
  color: var(--muted-light);
}
.search input:focus{
  border-color: var(--primary);
  background: var(--panel);
}

/* ── Section header ────────────────────────── */
.section{
  padding: 32px 0 64px;
}
.sectionHead{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 20px;
}
.sectionHead h3{
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
}
.sectionHead p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 60ch;
}

/* ── Category / post grid ──────────────────── */
.grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1080px){
  .grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 780px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .grid{ grid-template-columns: 1fr; }
}

.cat{
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
  position: relative;
  min-height: 128px;
  overflow: hidden;
  word-break: break-word;
}
.cat:before{
  display: none;
}
.cat:hover{
  transform: translateY(-3px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.catTitle{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.catTitle strong{
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.1px;
  color: var(--text);
}
.badge{
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--primary-border);
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
}
.cat p{
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ── FAQ for AEO ───────────────────────────── */
.faq{
  padding: 24px 24px 18px;
}
details{
  border: 1px solid var(--line);
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 10px 0;
  transition: border-color .15s ease;
}
details[open]{
  border-color: var(--primary-border);
}
summary{
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  line-height: 1.4;
}
summary:hover{
  color: var(--primary);
}
details p{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ── Footer ────────────────────────────────── */
footer{
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  color: var(--muted);
  background: var(--bg-alt);
}
.foot{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot strong{
  color: var(--text);
}
.foot small{
  display: block;
  line-height: 1.7;
  font-size: 13px;
}

/* ── Arrow icon ────────────────────────────── */
.arrow{
  width: 14px; height: 14px;
  display: inline-block;
  background: var(--primary);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M7 17V7h10v10h-2V10.41l-7.29 7.3L7 17Z"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M7 17V7h10v10h-2V10.41l-7.29 7.3L7 17Z"/></svg>') center / contain no-repeat;
}
.btnPrimary .arrow{
  background: #FFFFFF;
}

/* ── Masthead image ────────────────────────── */
.masthead-image{
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.masthead-image img{
  display: block;
  width: 100%;
  height: auto;
}

/* ── Author row on post page ──────────────── */
.post-author-row{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.author-avatar{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  flex-shrink: 0;
}
.post-author-info{
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.author-name{
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.author-meta{
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   Article body typography
   ============================================================ */
.article-body h2{
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 14px;
  letter-spacing: -.3px;
  color: var(--text);
}
.article-body h3{
  font-size: 19px;
  font-weight: 700;
  margin: 32px 0 10px;
  color: var(--text);
}
.article-body h4{
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--text);
}
.article-body p{
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.8;
  margin: 0 0 18px;
}
.article-body ul, .article-body ol{
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.8;
  padding-left: 24px;
  margin: 0 0 18px;
}
.article-body li{
  margin-bottom: 8px;
}
.article-body blockquote{
  border-left: 3px solid var(--primary);
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-size: 15px;
}
.article-body blockquote p{
  margin: 0;
  color: var(--text-secondary);
}
.article-body code{
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--accent);
}
.article-body pre{
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  margin: 0 0 18px;
}
.article-body pre code{
  background: none;
  border: none;
  padding: 0;
  color: #E2E8F0;
}
.article-body a{
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--primary-border);
}
.article-body a:hover{
  color: var(--primary-hover);
  text-decoration-color: var(--primary);
}
.article-body .download-box a{
  color: #FFFFFF;
  text-decoration: none;
}
.article-body .download-box a:hover{
  color: #FFFFFF;
}
.article-body img{
  max-width: 100%;
  border-radius: var(--radius);
  margin: 20px 0;
  box-shadow: var(--shadow);
}
.article-body table{
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.article-body th, .article-body td{
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}
.article-body th{
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text);
}
.article-body td{
  color: var(--text-secondary);
}
.article-body hr{
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ── TOC sidebar ───────────────────────────── */
.toc ul{
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.toc ul ul{
  padding-left: 16px;
}
.toc li{
  margin: 8px 0;
}
.toc a{
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: color .15s ease;
}
.toc a:hover{
  color: var(--primary);
}
.toc-link{
  color: var(--muted-light);
  font-size: 12px;
  margin-left: 6px;
  opacity: 0;
  transition: opacity .15s ease;
}
*:hover > .toc-link{
  opacity: .6;
}

/* ── Breadcrumb ────────────────────────────── */
.breadcrumb{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.breadcrumb .sep{
  color: var(--muted-light);
  font-size: 13px;
}

/* ── Search results ────────────────────────── */
#search-results a.chip{
  display: block;
  margin: 6px 0;
  padding: 10px 14px;
  transition: all .15s ease;
}
#search-results a.chip:hover{
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

/* ── Empty state ───────────────────────────── */
.empty-state{
  text-align: center;
  padding: 56px 24px;
}
.empty-state p{
  color: var(--muted);
  font-size: 16px;
}

/* ── Alternating section backgrounds ───────── */
.section:nth-child(even){
  background: var(--bg-alt);
}

/* ── Responsive tweaks ─────────────────────── */
@media (max-width: 768px){
  .nav{ padding: 12px 0; flex-wrap: wrap; }
  .brand{ min-width: 0; }
  .brand img{ width: 140px; height: 35px; }
  .brand .name{ display: none; }
  .hero{ padding: 48px 0 24px; }
  .heroMain{ padding: 28px 24px; }
  .side{ padding: 20px; }
  .sectionHead{ flex-direction: column; align-items: flex-start; }
}
