/*
Theme Name: GeoTools
Theme URI: https://geotools.n.7aweb.com
Author: GeoTools
Description: Lightweight custom theme for the GeoTools GEO/AI-search tools site. Zero dependencies, system font stack, card-based design.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: geotools
*/

/* ============ Design tokens ============ */
:root {
  --gt-bg: #f6f7fb;
  --gt-surface: #ffffff;
  --gt-ink: #0f172a;
  --gt-ink-2: #334155;
  --gt-muted: #5b6b81;
  --gt-faint: #94a3b8;
  --gt-accent: #4f46e5;
  --gt-accent-2: #6366f1;
  --gt-accent-ink: #4338ca;
  --gt-accent-soft: #eef2ff;
  --gt-line: #e2e8f0;
  --gt-radius: 16px;
  --gt-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --gt-shadow-md: 0 6px 24px rgba(15, 23, 42, .08);
  --gt-shadow-lg: 0 16px 40px rgba(79, 70, 229, .16);
  --gt-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gt-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--gt-font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--gt-ink);
  background: var(--gt-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--gt-accent); text-decoration: none; }
a:hover { color: var(--gt-accent-ink); }
:focus-visible { outline: 2px solid var(--gt-accent); outline-offset: 2px; border-radius: 4px; }
.gt-container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: var(--gt-surface); padding: 8px 14px; border-radius: 8px; box-shadow: var(--gt-shadow-md); }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--gt-line);
}
.admin-bar .site-header { top: 32px; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.site-logo {
  font-size: 1.18rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--gt-ink);
}
.site-logo:hover { color: var(--gt-ink); }
.logo-dot { color: var(--gt-accent); }
.site-nav .nav-list { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav .nav-list a { font-size: .95rem; font-weight: 550; color: var(--gt-muted); transition: color .15s ease; }
.site-nav .nav-list a:hover { color: var(--gt-ink); }
.site-nav .nav-list a.active { color: var(--gt-ink); }
@media (min-width: 721px) {
  .site-nav .nav-list a.active { box-shadow: inset 0 -2px 0 var(--gt-accent); padding-bottom: 2px; }
}
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; width: 100%; height: 2px; border-radius: 2px; background: var(--gt-ink); transition: transform .2s ease, opacity .2s ease; }

/* ============ Hero ============ */
.hero {
  padding: 76px 0 44px;
  background:
    radial-gradient(600px 300px at 12% -10%, rgba(99, 102, 241, .12), transparent 60%),
    radial-gradient(500px 280px at 92% 0%, rgba(79, 70, 229, .09), transparent 55%);
}
.hero-badge {
  display: inline-block;
  font-size: .8rem; font-weight: 650; letter-spacing: .02em;
  color: var(--gt-accent-ink); background: var(--gt-accent-soft);
  border: 1px solid #dfe3ff;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.12;
  max-width: 760px;
}
.hero h1 .accent { color: var(--gt-accent); }
.hero .lead {
  margin: 0; max-width: 640px;
  font-size: 1.08rem; line-height: 1.75; color: var(--gt-ink-2);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.gt-btn-ghost {
  display: inline-block;
  font-size: .95rem; font-weight: 700;
  color: var(--gt-ink); background: var(--gt-surface);
  border: 1px solid var(--gt-line);
  padding: 12px 26px; border-radius: 12px;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.gt-btn-ghost:hover { color: var(--gt-accent-ink); border-color: var(--gt-accent-2); transform: translateY(-2px); }

/* ============ Sections & cards ============ */
.gt-section { padding: 44px 0; }
.gt-sec-title {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 24px;
  font-size: 1.35rem; font-weight: 750; letter-spacing: -.01em;
}
.gt-sec-title::before {
  content: ""; width: 22px; height: 5px; border-radius: 4px;
  background: linear-gradient(90deg, var(--gt-accent), var(--gt-accent-2));
}
.gt-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.gt-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--gt-surface);
  border: 1px solid var(--gt-line);
  border-radius: var(--gt-radius);
  padding: 24px;
  box-shadow: var(--gt-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.gt-card:hover { transform: translateY(-3px); box-shadow: var(--gt-shadow-md); border-color: #c7d2fe; }
.gt-card-date { font-size: .8rem; font-weight: 600; color: var(--gt-faint); text-transform: uppercase; letter-spacing: .05em; }
.gt-card-title { margin: 0; font-size: 1.06rem; font-weight: 700; line-height: 1.4; }
.gt-card-title a { color: var(--gt-ink); }
.gt-card-title a:hover { color: var(--gt-accent-ink); }
.gt-card-excerpt { margin: 0; font-size: .93rem; line-height: 1.6; color: var(--gt-muted); flex: 1; }
.gt-card-more { font-size: .86rem; font-weight: 700; color: var(--gt-accent-ink); }
.gt-card-more:hover { color: var(--gt-accent); }
.gt-all-guides { margin-top: 28px; text-align: center; }
.gt-btn {
  display: inline-block;
  font-size: .95rem; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, var(--gt-accent), var(--gt-accent-2));
  padding: 12px 28px; border-radius: 12px;
  box-shadow: 0 8px 20px rgba(79, 70, 229, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.gt-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(79, 70, 229, .35); }

/* ---- Tool grid overrides (plugin cards restyled) ---- */
.gt-section-tools .gt-tools-grid { gap: 20px; }
.gt-section-tools .gt-tool-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--gt-surface);
  border: 1px solid var(--gt-line);
  border-radius: var(--gt-radius);
  padding: 26px 24px;
  min-height: 160px;
  box-shadow: var(--gt-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.gt-section-tools .gt-tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--gt-accent-2);
  box-shadow: var(--gt-shadow-lg);
}
.gt-section-tools .gt-tool-card-title { font-size: 1.04rem; font-weight: 700; color: var(--gt-ink); }
.gt-section-tools .gt-tool-card-desc { font-size: .9rem; line-height: 1.6; color: var(--gt-muted); flex: 1; }
.gt-section-tools .gt-tool-card-cta { font-size: .84rem; font-weight: 700; color: var(--gt-accent-ink); letter-spacing: .01em; margin-top: auto; padding-top: 6px; }

/* ============ Page (tools & static) ============ */
.gt-page-head { padding: 48px 0 6px; }
.gt-page-title {
  margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
}
.gt-prose-page { padding-bottom: 64px; }

/* ============ Article ============ */
.gt-article { max-width: 800px; padding-top: 48px; padding-bottom: 72px; }
.gt-entry-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: .85rem; color: var(--gt-faint); font-weight: 550;
  margin-bottom: 14px;
}
.gt-entry-meta a { color: var(--gt-accent-ink); }
.gt-meta-sep { color: var(--gt-line); }
.gt-entry-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.18;
}

/* ---- Shared prose typography ---- */
.gt-prose { font-size: 1.02rem; }
.gt-prose p { color: var(--gt-ink-2); line-height: 1.78; margin: 1.15em 0; }
.gt-prose h2 { font-size: 1.42rem; font-weight: 750; letter-spacing: -.015em; margin: 2.1em 0 .7em; line-height: 1.3; }
.gt-prose h3 { font-size: 1.16rem; font-weight: 700; margin: 1.7em 0 .55em; line-height: 1.35; }
.gt-prose h2:first-child, .gt-prose h3:first-child { margin-top: .4em; }
.gt-prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: #c7d2fe; }
.gt-prose a:hover { text-decoration-color: var(--gt-accent); }
.gt-prose ul, .gt-prose ol { padding-left: 1.35em; margin: 1.1em 0; }
.gt-prose li { color: var(--gt-ink-2); line-height: 1.75; margin: .45em 0; }
.gt-prose ul li::marker { color: var(--gt-accent); }
.gt-prose ol li::marker { color: var(--gt-accent); font-weight: 700; }
.gt-prose code {
  font-family: var(--gt-mono); font-size: .87em;
  background: #f1f5f9; border: 1px solid var(--gt-line);
  border-radius: 6px; padding: .12em .45em; color: #4338ca;
  word-break: break-word;
}
.gt-prose pre {
  background: #0f172a; color: #e2e8f0;
  border-radius: 14px; padding: 20px 22px;
  overflow-x: auto; line-height: 1.7; font-size: .87rem;
  margin: 1.5em 0;
}
.gt-prose pre code { background: transparent; border: 0; padding: 0; color: inherit; font-size: 1em; }
.gt-prose blockquote {
  margin: 1.5em 0; padding: 14px 22px;
  border-left: 3px solid var(--gt-accent);
  background: var(--gt-accent-soft);
  border-radius: 0 12px 12px 0;
  color: #3730a3;
}
.gt-prose blockquote p { margin: .4em 0; color: inherit; }
.gt-prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.gt-prose th { text-align: left; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gt-muted); padding: 10px 12px; border-bottom: 2px solid var(--gt-line); }
.gt-prose td { padding: 10px 12px; border-bottom: 1px solid var(--gt-line); color: var(--gt-ink-2); }
.gt-prose hr { border: 0; height: 1px; background: var(--gt-line); margin: 2.6em 0; }
.gt-prose img { border-radius: 12px; }

/* ============ Listing pages ============ */
.gt-listing-head { padding: 52px 0 8px; }
.gt-listing-title { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.gt-listing-sub { margin: 8px 0 0; color: var(--gt-muted); font-size: .98rem; }
.gt-listing { padding: 24px 0 72px; }
.nav-links { display: flex; justify-content: center; gap: 10px; margin-top: 36px; }
.nav-links .page-numbers {
  display: inline-block; min-width: 40px; text-align: center;
  padding: 9px 14px; border-radius: 10px;
  background: var(--gt-surface); border: 1px solid var(--gt-line);
  color: var(--gt-ink-2); font-weight: 600; font-size: .92rem;
}
.nav-links .page-numbers.current { background: var(--gt-accent); border-color: var(--gt-accent); color: #fff; }
.nav-links a.page-numbers:hover { border-color: var(--gt-accent-2); color: var(--gt-accent-ink); }

/* ============ Search form ============ */
.search-form { display: flex; gap: 10px; max-width: 480px; }
.search-form .search-field {
  flex: 1; padding: 12px 16px; font-size: .96rem; font-family: inherit;
  border: 1px solid var(--gt-line); border-radius: 12px; background: var(--gt-surface);
  color: var(--gt-ink);
}
.search-form .search-field:focus { outline: 2px solid var(--gt-accent); outline-offset: 1px; }
.search-form .search-submit {
  padding: 12px 20px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--gt-accent); color: #fff; font-weight: 700; font-size: .92rem; font-family: inherit;
}
.search-form .search-submit:hover { background: var(--gt-accent-ink); }

/* ============ 404 ============ */
.gt-404 { text-align: center; padding: 96px 24px 120px; }
.gt-404 .code { font-size: 6rem; font-weight: 800; letter-spacing: -.04em; color: #e0e7ff; line-height: 1; }
.gt-404 h1 { margin: 12px 0 8px; font-size: 1.4rem; font-weight: 750; }
.gt-404 p { color: var(--gt-muted); margin: 0 0 26px; }

/* ============ Footer ============ */
.site-footer { background: #0b1220; color: #94a3b8; margin-top: 24px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 44px;
  padding: 56px 0 44px;
}
.site-logo-footer { color: #f8fafc; font-size: 1.1rem; }
.site-logo-footer:hover { color: #fff; }
.footer-brand p { margin: 14px 0 0; font-size: .9rem; line-height: 1.7; color: #7c8aa5; max-width: 300px; }
.footer-col h4 {
  margin: 4px 0 16px; font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; color: #cbd5e1;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 9px 0; }
.footer-links a { color: #94a3b8; font-size: .92rem; transition: color .15s ease; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 20px 0; font-size: .82rem; color: #64748b;
}
.footer-tag { color: #818cf8; font-weight: 600; }

/* ============ Responsive ============ */
@media (max-width: 920px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .hero { padding: 52px 0 32px; }
  .gt-section { padding: 32px 0; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--gt-surface);
    border-bottom: 1px solid var(--gt-line);
    box-shadow: var(--gt-shadow-md);
    display: none; padding: 12px 24px 20px;
  }
  .site-nav.nav-open { display: block; }
  .site-nav .nav-list { flex-direction: column; align-items: flex-start; gap: 4px; }
  .site-nav .nav-list li { width: 100%; }
  .site-nav .nav-list a { display: block; padding: 10px 0; font-size: 1.02rem; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .footer-grid { grid-template-columns: 1fr; padding: 44px 0 32px; }
  .gt-article { padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
