/* thesoftwaretimes.com — base stylesheet */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #5a6573;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --surface: #f8fafc;
  --max-width: 1100px;
  --header-height: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

img, picture, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  background: var(--text);
  color: white;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
  text-decoration: none;
  color: white;
}

/* Header / Nav */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.site-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  padding: 6px 0;
}
.site-logo:hover { text-decoration: none; }
.site-logo span { color: var(--accent); }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 20px;
}
.site-nav a {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 2px;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
}
.container--narrow { max-width: 760px; }

/* Typography */
h1 {
  font-size: 38px;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 26px;
  line-height: 1.3;
  margin: 36px 0 14px;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 20px;
  margin: 28px 0 10px;
  line-height: 1.35;
}
p { margin: 0 0 16px; }
ul, ol { padding-left: 22px; margin: 0 0 16px; }
li { margin-bottom: 6px; }

.lede {
  font-size: 19px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* Hero (homepage) */
.hero {
  padding: 60px 24px 40px;
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: 44px;
  max-width: 800px;
  margin: 0 auto 16px;
}
.hero p {
  font-size: 19px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

/* Article cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  background: var(--bg);
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 10px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

/* Categories */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.category {
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  background: var(--surface);
}
.category strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
  color: var(--text);
}
.category span {
  font-size: 14px;
  color: var(--muted);
}

/* Contact form */
.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.contact-form label {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  min-height: 44px;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.contact-form button {
  padding: 12px 24px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  justify-self: start;
}
.contact-form button:hover { background: var(--accent-hover); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 60px;
  padding: 30px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 12px;
}
.site-footer .footer-links a {
  padding: 6px 4px;
}

/* Updated marker */
.updated {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* Tablet */
@media (max-width: 768px) {
  body { font-size: 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 22px; margin: 30px 0 12px; }
  h3 { font-size: 18px; margin: 24px 0 8px; }
  .lede { font-size: 17px; }
  .hero { padding: 48px 20px 32px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 17px; }
  .container { padding: 32px 20px; }
  .site-footer { margin-top: 48px; padding: 26px 20px; }
}

/* Mobile */
@media (max-width: 480px) {
  h1 { font-size: 28px; line-height: 1.25; }
  h2 { font-size: 20px; }
  .hero { padding: 36px 16px 28px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .lede { font-size: 16px; margin-bottom: 22px; }
  .container { padding: 24px 16px; }
  .site-header .wrap { padding: 12px 16px; gap: 8px 14px; }
  .site-logo { font-size: 19px; }
  .site-nav { gap: 0 14px; }
  .site-nav a { font-size: 14px; }
  .cards { gap: 14px; margin-top: 18px; }
  .card { padding: 18px; border-radius: 8px; }
  .card h3 { font-size: 17px; }
  .categories { gap: 12px; margin-top: 18px; }
  .category { padding: 18px 14px; }
  .contact-form button { width: 100%; justify-self: stretch; }
  .site-footer { padding: 22px 16px; margin-top: 36px; }
  .site-footer .footer-links { gap: 4px 14px; }
}

/* ── Article pages ─────────────────────────────── */

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 5px; }

.article-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 14px;
}
.article-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.article-header h1 { margin-bottom: 14px; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 14px;
  color: var(--muted);
}

/* Article images */
.article-figure {
  margin: 28px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.article-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.article-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th {
  background: var(--surface);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--surface); }

/* Verdict / callout box */
.verdict-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 28px 0;
}
.verdict-box strong { display: block; font-size: 15px; margin-bottom: 6px; color: var(--accent); }

/* Winner badge */
.winner {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

/* AI output examples */
.output-block {
  margin: 14px 0 20px;
}
.output-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
}
.output-example {
  background: var(--surface);
  border-left: 3px solid var(--border);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  font-size: 15px;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
}
.output-example.jasper { border-left-color: #7c3aed; }
.output-example.copyai { border-left-color: #0891b2; }

/* Pros / cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.pros-cons-col { border: 1px solid var(--border); border-radius: 8px; padding: 18px; }
.pros-cons-col h4 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.pros-cons-col.pros h4 { color: #15803d; }
.pros-cons-col.cons h4 { color: #dc2626; }
.pros-cons-col ul { margin: 0; padding-left: 18px; }
.pros-cons-col li { font-size: 14px; margin-bottom: 5px; }

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item details summary {
  padding: 16px 18px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item details summary::-webkit-details-marker { display: none; }
.faq-item details summary::after { content: "+"; font-size: 20px; font-weight: 400; color: var(--muted); flex-shrink: 0; }
.faq-item details[open] summary::after { content: "−"; }
.faq-item details[open] summary { border-bottom: 1px solid var(--border); }
.faq-answer { padding: 16px 18px; font-size: 15px; color: var(--muted); line-height: 1.6; }

/* CTA box */
.article-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 30px 26px;
  margin: 40px 0 20px;
  text-align: center;
}
.article-cta h3 { margin: 0 0 8px; }
.article-cta p { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.btn {
  display: inline-block;
  padding: 11px 22px;
  background: var(--accent);
  color: white !important;
  font-weight: 600;
  border-radius: 6px;
  font-size: 15px;
  margin: 5px 6px;
  min-height: 44px;
  line-height: 1.4;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--accent) !important;
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: white !important; }

/* Mobile article tweaks */
@media (max-width: 768px) {
  .pros-cons { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 480px) {
  .article-header { padding-bottom: 22px; margin-bottom: 24px; }
  .verdict-box { padding: 16px 16px; }
  .faq-item details summary { padding: 14px 16px; font-size: 15px; }
  .faq-answer { padding: 14px 16px; }
  .article-cta { padding: 22px 18px; }
  th, td { padding: 10px 12px; font-size: 14px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover { transform: none; }
}
