/* ============================================
   FretLogic — Clean Minimal Light Theme
   Inspired by modern SaaS landing pages
   ============================================ */

:root {
  --bg: #ffffff;
  --bg-subtle: #f8f9fb;
  --card: #ffffff;
  --card-hover: #f8f9fb;
  --text: #111111;
  --text-secondary: #555555;
  --text-muted: #999999;
  --border: #e8e8e8;
  --border-hover: #d0d0d0;
  --blue: #2563eb;
  --green: #059669;
  --purple: #7c3aed;
  --orange: #d97706;
  --max-width: 1080px;
  --header-height: 60px;
  --radius: 12px;
  --radius-lg: 16px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* --- Header: minimal, clean line --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-group { display: flex; align-items: center; gap: 10px; }

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-link:hover { text-decoration: none; }

.logo-icon {
  width: 30px;
  height: 30px;
  background: var(--text);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.tagline {
  font-size: 13px;
  color: var(--text-muted);
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  padding: 20px 0 8px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-secondary); text-decoration: underline; }
.breadcrumb .separator { margin: 0 6px; opacity: 0.4; }
.breadcrumb .current { color: var(--text-secondary); }

/* --- Hero Section (homepage): big, bold, tons of whitespace --- */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 100px 24px 40px;
  text-align: center;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
}

.hero .tagline {
  display: block;
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
}

/* --- Intro paragraph --- */
.intro {
  max-width: 640px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 15px;
}

/* --- Tool Grid: spacious, clean --- */
.tool-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Category headers */
.category-header {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 48px 0 12px;
  border: none;
  color: var(--text-muted);
}
.category-header:first-child { padding-top: 0; }

.category-header.cat-blue { color: var(--blue); }
.category-header.cat-green { color: var(--green); }
.category-header.cat-purple { color: var(--purple); }
.category-header.cat-orange { color: var(--orange); }

/* --- Tool Cards: clean, borderless, hover lift --- */
.tool-card {
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: all 0.2s ease;
  border-left: none;
}

.tool-card:hover {
  background: var(--card);
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.tool-card .card-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.tool-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.tool-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Category accent — subtle left border */
.tool-card.cat-blue { border-left: 3px solid var(--blue); }
.tool-card.cat-green { border-left: 3px solid var(--green); }
.tool-card.cat-purple { border-left: 3px solid var(--purple); }
.tool-card.cat-orange { border-left: 3px solid var(--orange); }

/* --- Tool Page --- */
.tool-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 40px;
  width: 100%;
  flex-grow: 1;
}

/* --- Tool Hero --- */
.tool-hero {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.tool-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  line-height: 1.2;
  color: var(--text);
}

.tool-hero p {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 580px;
  line-height: 1.6;
}

/* --- Tool Box --- */
.tool-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
}

/* --- Ad Slots --- */
.ad-slot {
  margin: 28px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--rectangle { min-height: 250px; }

/* --- SEO Content --- */
.seo-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
}

.seo-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  margin-top: 40px;
  color: var(--text);
}
.seo-content h2:first-child { margin-top: 0; }

.seo-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 15px;
}

.seo-content .faq-item { margin-bottom: 24px; }
.seo-content .faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.seo-content .faq-item p { margin-bottom: 0; }

.seo-content .related-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.seo-content .related-tools a {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.seo-content .related-tools a:hover {
  border-color: var(--blue);
  color: var(--blue);
  text-decoration: none;
}

/* --- Back Link --- */
.back-link {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 40px;
}
.back-link a { color: var(--text-muted); font-size: 13px; }
.back-link a:hover { color: var(--blue); text-decoration: underline; }

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}
.footer-links a,
.site-footer nav a { color: var(--text-muted); font-size: 13px; }
.footer-links a:hover,
.site-footer nav a:hover { color: var(--text-secondary); text-decoration: none; }

.site-footer .copyright,
.site-footer p {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  min-height: 44px;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1;
}

.btn-primary { background: var(--text); color: #fff; border-radius: 100px; }
.btn-primary:hover { background: #333; }

.btn-secondary {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 100px;
}
.btn-secondary:hover { background: var(--border); color: var(--text); }

/* --- Featured Card (larger, prominent) --- */
.tool-card.featured-card {
  grid-column: 1 / -1;
  padding: 36px;
  background: linear-gradient(135deg, #f5f0ff 0%, var(--bg-subtle) 100%);
  border-left: 4px solid var(--purple);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.tool-card.featured-card .card-icon { font-size: 2.4rem; margin-bottom: 16px; }
.tool-card.featured-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.tool-card.featured-card p { font-size: 15px; max-width: 480px; margin: 0 auto; }

/* --- Blog Preview Section --- */
.blog-preview {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
}
.blog-preview .category-header {
  padding-top: 24px;
  padding-bottom: 16px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.blog-card {
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: all 0.2s ease;
}
.blog-card:hover {
  background: var(--card);
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}
.blog-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
  color: var(--text);
}
.blog-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Accessibility --- */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Mobile --- */
@media (max-width: 639px) {
  .hero { padding: 60px 20px 24px; }
  .hero h1 { font-size: 2rem; }
  .tool-hero h1 { font-size: 1.5rem; }
  .tool-page { padding: 16px 16px 32px; }
  .tool-box { padding: 18px; border-radius: var(--radius); }
  .tool-grid { grid-template-columns: 1fr; padding: 0 16px 40px; gap: 12px; }
  .tool-card { padding: 22px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
  .header-inner { padding: 0 16px; }
  .seo-content { padding: 32px 16px; }
  .footer-links { gap: 16px; }
  .category-header { padding: 32px 0 10px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-preview { padding: 0 16px 40px; }
  .tool-card.featured-card { max-width: 100%; padding: 28px; }
}

/* --- Desktop --- */
@media (min-width: 1025px) {
  .header-inner .tagline { display: inline; }
  .tool-hero h1 { font-size: 2.4rem; }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 3.8rem; }
}
