/* =========================================================
   ChasingBugsBlog.online — styles.css (BASE)
   Palette:
   --primary: #2613CD
   --bg:      #CFE5E6
   --ink:     #060719
   --mint:    #7FD1B9
   --gray:    #5A6668
   ========================================================= */

/* ---------- TOKENS ---------- */
:root{
  --primary:#2613CD;
  --bg:#CFE5E6;
  --ink:#060719;
  --mint:#7FD1B9;
  --gray:#5A6668;

  --card:#ffffff;
  --line: rgba(6,7,25,.12);
  --shadow: 0 18px 44px rgba(6,7,25,.12);

  --radius:18px;
  --radius-lg:24px;

  --font:'Heebo', system-ui, -apple-system, Segoe UI, Arial, sans-serif;

  /* Readability for 40+ */
  --text-size:18px;
  --text-size-sm:16px;
  --text-size-lg:20px;

  --container: 1040px;

  --focus: 0 0 0 4px rgba(127,209,185,.55);
}

*{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family:var(--font);
  font-size:var(--text-size);
  line-height:1.75;
  background:var(--bg);
  color:var(--ink);
  direction: rtl;
}

/* ---------- LAYOUT ---------- */
.container{
  width:min(var(--container), 92%);
  margin-inline:auto;
}

.section{
  padding: 56px 0;
}

.section-alt{
  background: rgba(255,255,255,.55);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.section-head{
  margin-bottom:18px;
}

.section-head.split{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
}

@media (max-width:820px){
  .section{ padding: 42px 0; }
  .section-head.split{ flex-direction:column; align-items:flex-start; }
}

/* ---------- TYPOGRAPHY ---------- */
h1,h2,h3{
  margin:0 0 10px;
  letter-spacing:-.02em;
}

h1{ font-size: clamp(34px, 3.6vw, 52px); line-height:1.1; }
h2{ font-size: clamp(26px, 2.6vw, 34px); line-height:1.2; }
h3{ font-size: 20px; line-height:1.3; }

p{ margin: 0 0 14px; }

.lead{
  font-size: var(--text-size-lg);
  color: rgba(6,7,25,.86);
  max-width: 62ch;
}

.muted{ color: rgba(6,7,25,.70); }

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

.text-link{
  color: var(--primary);
  font-weight:700;
  text-decoration:none;
}
.text-link:hover{ text-decoration: underline; }

/* ---------- ACCESSIBILITY ---------- */
.skip-link{
  position:absolute;
  top:-60px;
  right:12px;
  background: var(--card);
  color: var(--ink);
  padding:10px 14px;
  border-radius: 12px;
  border:1px solid var(--line);
  box-shadow: var(--shadow);
  z-index:9999;
}
.skip-link:focus{ top:12px; outline:none; box-shadow: var(--focus); }

:focus-visible{
  outline:none;
  box-shadow: var(--focus);
  border-radius: 12px;
}

/* ---------- HEADER / NAV ---------- */
.site-header{
  position: sticky;
  top:0;
  z-index: 1000;
  background: rgba(207,229,230,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 220px;
}

.brand-mark{
  width:40px;
  height:40px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: var(--primary);
  color:#fff;
  font-weight:800;
  box-shadow: 0 12px 28px rgba(38,19,205,.22);
}

.brand-text{ display:flex; flex-direction:column; line-height:1.1; }
.brand-title{ font-weight:800; letter-spacing:-.02em; }
.brand-sub{ font-size: 14px; color: rgba(6,7,25,.70); margin-top:4px; }

.nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.nav-link{
  padding: 9px 12px;
  border-radius: 14px;
  font-weight:700;
  color: rgba(6,7,25,.82);
  text-decoration:none;
}
.nav-link:hover{
  background: rgba(127,209,185,.28);
  text-decoration:none;
}
.nav-link.is-active{
  background: rgba(38,19,205,.10);
  color: var(--primary);
}

.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

@media (max-width:980px){
  .nav-wrap{ flex-wrap:wrap; }
  .brand{ min-width:auto; }
}

/* ---------- BUTTONS ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 16px;
  font-weight:800;
  border: 1px solid transparent;
  cursor:pointer;
  text-decoration:none;
  transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
  user-select:none;
  white-space:nowrap;
}

.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: var(--primary);
  color:#fff;
  box-shadow: 0 14px 34px rgba(38,19,205,.22);
}
.btn-primary:hover{
  text-decoration:none;
  background: #1f10b8; /* slightly darker */
}

.btn-ghost{
  background: transparent;
  border-color: rgba(6,7,25,.18);
  color: var(--ink);
}
.btn-ghost:hover{
  background: rgba(255,255,255,.55);
  text-decoration:none;
}

/* ---------- HERO ---------- */
.hero{
  padding: 54px 0 24px;
}

.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: stretch;
}

.badge{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(127,209,185,.35);
  border: 1px solid rgba(6,7,25,.10);
  font-weight:800;
  font-size: 14px;
  margin-bottom: 14px;
}

.hero-title{ margin-bottom: 10px; }

.hero-lead{
  font-size: 20px;
  color: rgba(6,7,25,.86);
  max-width: 62ch;
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin: 18px 0 14px;
}

.hero-points{
  margin: 0;
  padding: 0 18px 0 0;
  color: rgba(6,7,25,.78);
}
.hero-points li{ margin: 8px 0; }

.hero-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero-card-title{
  font-weight:900;
  font-size: 18px;
}

.hero-card-sub{
  color: rgba(6,7,25,.60);
  font-size: 14px;
  margin-top: 4px;
}

.codebox{
  margin-top: 12px;
  background: rgba(6,7,25,.06);
  border: 1px solid rgba(6,7,25,.10);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(6,7,25,.92);
}

@media (max-width:980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero{ padding-top: 34px; }
}

/* ---------- CARDS ---------- */
.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.card{
  display:block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(6,7,25,.08);
  text-decoration:none;
  transition: transform .10s ease, box-shadow .12s ease;
}

.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(6,7,25,.12);
  text-decoration:none;
}

.card-title{
  font-weight:900;
  margin-bottom: 6px;
}

.card-desc{
  color: rgba(6,7,25,.74);
  margin-bottom: 10px;
}

.card-meta{
  display:inline-block;
  font-size: 13px;
  font-weight:800;
  color: rgba(6,7,25,.70);
  background: rgba(127,209,185,.25);
  border: 1px solid rgba(6,7,25,.10);
  padding: 6px 10px;
  border-radius: 999px;
}

@media (max-width:980px){
  .cards{ grid-template-columns: 1fr; }
}

/* ---------- POSTS GRID ---------- */
.posts-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.post-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: 0 10px 24px rgba(6,7,25,.08);
}

.post-card-link{ display:block; text-decoration:none; }

.post-thumb{
  height: 140px;
  background: linear-gradient(135deg, rgba(38,19,205,.22), rgba(127,209,185,.35));
}

.post-body{ padding: 16px 18px; }

.post-title{
  font-size: 19px;
  margin: 0 0 8px;
  font-weight: 900;
}

.post-excerpt{
  margin: 0 0 10px;
  color: rgba(6,7,25,.74);
}

.post-meta{
  font-size: 13px;
  font-weight: 800;
  color: rgba(6,7,25,.64);
}

@media (max-width:980px){
  .posts-grid{ grid-template-columns: 1fr; }
  .post-thumb{ height: 120px; }
}

/* ---------- CTA ---------- */
.cta{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.cta-form{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

input[type="email"], input[type="text"]{
  font: inherit;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(6,7,25,.18);
  background: rgba(255,255,255,.86);
  min-width: 260px;
}

input[type="email"]:focus, input[type="text"]:focus{
  outline:none;
  box-shadow: var(--focus);
  border-color: rgba(127,209,185,.9);
}

@media (max-width:980px){
  .cta{ flex-direction:column; align-items:flex-start; }
  input[type="email"], input[type="text"]{ min-width: 100%; width:100%; }
  .cta-form{ width:100%; }
  .cta-form .btn{ width:100%; }
  
}

.tool-logo{
  width:72px;
  height:72px;
  object-fit:contain;
  margin-bottom:12px;
  display:block;
}

/* ---------- FOOTER ---------- */
.site-footer{
  margin-top: 30px;
  background: rgba(6,7,25,.96);
  color: rgba(207,229,230,.92);
  padding: 44px 0 0;
}

.footer-grid{
  display:grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
}

.footer-title{
  font-size: 16px;
  margin: 0 0 10px;
  font-weight: 900;
  color: #fff;
}

.footer-text{
  margin: 0;
  color: rgba(207,229,230,.80);
  max-width: 52ch;
}

.footer-links{
  list-style:none;
  padding:0;
  margin:0;
}

.footer-links li{ margin: 10px 0; }
.footer-links a{
  color: rgba(207,229,230,.88);
  text-decoration:none;
}
.footer-links a:hover{ text-decoration: underline; }

.footer-bottom{
  margin-top: 24px;
  border-top: 1px solid rgba(207,229,230,.10);
  padding: 14px 0;
}

.footer-bottom-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  flex-wrap:wrap;
}

.footer-legal{
  display:flex;
  gap: 12px;
}

.footer-legal a{
  color: rgba(207,229,230,.78);
  text-decoration:none;
}
.footer-legal a:hover{ text-decoration: underline; }

/* Utility */
.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;
}