@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');
/* SigmaTool main stylesheet (loaded by functions.php) */

/* ==========================================================
   1. DESIGN TOKENS
   ========================================================== */
:root {
  --bg: #f7f3ec;
  --bg-alt: #efe9dd;
  --surface: #ffffff;
  --surface-2: #f3ede2;
  --border: #e2d9c8;
  --text: #1f1b16;
  --text-muted: #5b544a;
  --text-dim: #766d60;
  --primary: #1e5a45;
  --primary-strong: #164636;
  --accent: #c4572b;
  --success: #2f8f5b;
  --star: #d99a1e;
  --grad: #1e5a45;
  --grad-text: #1e5a45;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --header-h: 72px;
  --container: 1200px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================
   2. RESET & BASE
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(30,90,69,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,90,69,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
a:hover { color: #143d2f; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}
h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 .6em;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -.02em;
}
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link:focus {
  clip: auto;
  width: auto; height: auto;
  left: 12px; top: 12px;
  z-index: 100000;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
}
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ==========================================================
   3. BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
  font-family: inherit;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 24px rgba(30,90,69,.35);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(30,90,69,.5);
}
.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(30,90,69,.08);
}

/* ==========================================================
   4. HEADER (STICKY)
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247,243,236,.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled {
  background: rgba(247,243,236,1);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  min-height: var(--header-h);
}
.header-inner .main-nav {
  margin-left: auto;
}
.header-inner .header-search {
  flex: 0 1 260px;
  max-width: 280px;
  margin: 0;
  order: 0;
}
.header-inner .nav-toggle {
  margin-left: auto;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  flex-shrink: 0;
}
.site-branding:hover { color: var(--text); }
.site-branding img,
.custom-logo {
  height: 44px;
  width: auto;
  border-radius: 10px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.site-branding:hover img {
  transform: scale(1.06);
  box-shadow: 0 0 16px rgba(30,90,69,.4);
}
.site-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}
.site-title span { color: var(--primary); }

/* Header search bar */
.header-search {
  flex: 1;
  max-width: 320px;
  margin: 0 12px;
}
.header-search form {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.header-search form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,90,69,.2);
}
.header-search input[type="search"] {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 16px;
  font-size: .92rem;
  min-width: 0;
  width: 100%;
}
.header-search input[type="search"]::placeholder { color: var(--text-dim); }
.header-search input[type="search"]:focus { outline: none; box-shadow: none; }
.header-search button {
  background: transparent;
  border: 0;
  color: var(--primary);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 1rem;
  transition: color .2s, transform .2s;
}
.header-search button:hover {
  color: #143d2f;
  transform: scale(1.1);
}


.main-nav {
  display: block;
}
@media (min-width: 981px) {
  .main-nav {
    display: block !important;
  }
  .nav-toggle {
    display: none !important;
  }
  .header-inner .header-search {
    order: 0;
  }
}

.main-nav .menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.main-nav a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-muted);
  transition: color .2s, background .2s, transform .2s;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  color: var(--primary);
  background: rgba(30,90,69,.12);
  transform: translateY(-1px);
}
.main-nav .menu-cta > a,
.header-cta {
  background: var(--grad);
  color: #fff;
  border-radius: 999px;
  padding: 10px 20px;
  margin-left: 8px;
  transition: transform .25s, box-shadow .25s;
}
.main-nav .menu-cta > a:hover,
.header-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30,90,69,.4);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.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);
}

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .header-inner .main-nav {
    margin-left: 0;
    order: 4;
    width: 100%;
  }
  .header-inner .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
    margin: 0;
  }
  .header-inner .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .main-nav {
    position: static;
    width: 100%;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: none;
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: block; }
  .main-nav .menu {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .main-nav a {
    padding: 14px 16px;
    font-size: 1.02rem;
  }
  .main-nav .menu-cta > a {
    margin: 10px 0 0;
    text-align: center;
  }
}
@media (max-width: 600px) {
  .site-title { font-size: 1.15rem; }
}

/* ==========================================================
   5. HERO
   ========================================================== */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 100px 0 90px;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(30,90,69,.18), transparent 55%),
    radial-gradient(ellipse at 80% 60%, rgba(196,87,43,.15), transparent 50%),
    var(--bg);
  background-size: cover;
  background-position: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8,13,22,.45) 0%, rgba(247,243,236,.96) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 18px;
}
.hero-content h1 span {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-content > p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 520px;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.hero-stats strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}
.hero-stats span {
  font-size: .88rem;
  color: var(--text-dim);
}
.hero-visual {
  display: flex;
  justify-content: center;
}
.hero-card {
  width: 280px;
  height: 280px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-card img {
  width: 70%;
  height: auto;
  border-radius: 16px;
}
.eyebrow {
  display: inline-block;
  padding: 5px 14px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(196,87,43,.15);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .hero { padding: 70px 0 60px; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content > p { margin-inline: auto; }
  .hero-actions,
  .hero-stats { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-card {
    width: 200px;
    height: 200px;
  }
}
@media (max-width: 520px) {
  .hero-actions .btn { width: 100%; }
}

/* ==========================================================
   6. SECTIONS
   ========================================================== */
.section { padding: 88px 0; }
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 52px;
}
.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-header { margin-bottom: 36px; }
}

/* ==========================================================
   7. GRID + CARDS
   ========================================================== */
.grid {
  display: grid;
  gap: 26px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s ease, box-shadow .35s ease, background .3s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-10px);
  border-color: rgba(30,90,69,.65);
  box-shadow: 0 20px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(30,90,69,.25), 0 0 32px rgba(30,90,69,.12);
  background: var(--surface-2);
}
/* Entire card clickable — stretched link covers full card */
.card.is-clickable {
  cursor: pointer;
}
.card.is-clickable .stretched-link {
  position: static;
  /* keep pointer events so ::after can receive clicks */
}
.card.is-clickable .stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  cursor: pointer;
}
.card.is-clickable .card-body h3,
.card.is-clickable .card-body p,
.card.is-clickable .tool-meta .rating,
.card.is-clickable .tool-top {
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
}
.card:hover .card-media img { transform: scale(1.1); }
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,13,22,.65), transparent 55%);
  pointer-events: none;
  transition: opacity .3s;
}
.card:hover .card-media::after { opacity: .9; }
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 26px;
}
.card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  transition: color .25s;
}
.card:hover .card-body h3,
.card:hover .card-body h3 a { color: var(--primary); }
.card-body h3 a {
  color: var(--text);
  transition: color .2s;
}
.card-body h3 a:hover { color: var(--primary); }
.card-body p {
  color: var(--text-muted);
  font-size: .96rem;
  flex: 1;
}
.card-link {
  font-weight: 700;
  font-size: .95rem;
  margin-top: 4px;
  transition: letter-spacing .2s, color .2s, transform .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card:hover .card-link {
  letter-spacing: .03em;
  color: #143d2f;
  transform: translateX(4px);
}
.card-link:hover {
  letter-spacing: .02em;
  color: #143d2f;
}

/* Why-us / Features */
.feature {
  text-align: center;
  padding: 30px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .3s, border-color .3s;
}
.feature:hover {
  transform: translateY(-5px);
  border-color: rgba(30,90,69,.4);
}
.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: var(--grad);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(30,90,69,.3);
}
.feature h3 { font-size: 1.12rem; }
.feature p {
  color: var(--text-muted);
  font-size: .94rem;
  margin: 0;
}

/* Tool cards */
.tool-top {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-alt));
}
.tool-top span:first-child { font-size: 3.2rem; }
.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(196,87,43,.18);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tool-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.rating {
  color: var(--star);
  font-weight: 700;
  font-size: .95rem;
}

/* CTA */
.cta-box {
  text-align: center;
  padding: 56px 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30,90,69,.12), rgba(196,87,43,.12));
  border: 1px solid var(--border);
}
.cta-box h2 { margin-bottom: 12px; }
.cta-box p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 24px;
}

/* ==========================================================
   8. POSTS / PAGES
   ========================================================== */
.page-hero {
  padding: 72px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0;
}
.page-hero .meta {
  color: var(--text-dim);
  margin-top: 10px;
  font-size: .92rem;
}
.content-wrap { padding: 56px 0 80px; }
.entry {
  max-width: 780px;
  margin-inline: auto;
}
.entry-content {
  color: var(--text-muted);
  font-size: 1.05rem;
}
.entry-content h2 {
  font-size: 1.7rem;
  margin-top: 1.8em;
}
.entry-content h3 {
  font-size: 1.3rem;
  margin-top: 1.5em;
}
.entry-content p,
.entry-content li { color: var(--text-muted); }
.entry-content li { margin-bottom: .4em; }
.entry-content ul,
.entry-content ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
}
.entry-content img {
  border-radius: var(--radius-sm);
  margin-block: 1.4em;
}
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 12px 22px;
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: .95rem;
  display: block;
  overflow-x: auto;
}
.entry-content th,
.entry-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.entry-content th {
  background: var(--surface-2);
  color: var(--text);
}
.entry-content pre,
.entry-content code {
  background: var(--surface);
  border-radius: 6px;
  font-size: .92em;
}
.entry-content code { padding: 2px 6px; }
.entry-content pre {
  padding: 16px;
  overflow-x: auto;
}
.post-thumb {
  margin: 0 auto 32px;
  max-width: 780px;
  border-radius: var(--radius);
  overflow: hidden;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 600;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.error-404 {
  text-align: center;
  padding: 110px 0;
}
.error-404 .big {
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

/* ==========================================================
   9. FORMS
   ========================================================== */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
textarea {
  width: 100%;
  padding: 12px 16px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
}
input::placeholder,
textarea::placeholder { color: var(--text-dim); }
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,90,69,.2);
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.contact-form p { margin-bottom: 18px; }
.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}
.newsletter-form input {
  min-width: 0;
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.newsletter-form button {
  white-space: nowrap;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.newsletter-form button:hover { filter: brightness(1.1); }

/* ==========================================================
   10. FOOTER
   ========================================================== */
.site-footer {
  background: #efe9dd;
  border-top: 1px solid var(--border);
  padding-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
  gap: 36px;
  padding-bottom: 48px;
}
.footer-brand p {
  color: var(--text-dim);
  font-size: .94rem;
  max-width: 300px;
  margin: 16px 0 20px;
}
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 18px;
  padding-bottom: 10px;
  position: relative;
}
.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--grad);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--text-dim);
  font-size: .93rem;
}
.footer-col a:hover { color: var(--primary); }
.footer-col p {
  color: var(--text-dim);
  font-size: .92rem;
}
.social {
  display: flex;
  gap: 10px;
}
.social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30,90,69,.1);
  border: 1px solid rgba(30,90,69,.25);
  border-radius: 12px;
  font-weight: 700;
  color: var(--primary);
}
.social a:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  color: #fff;
  transform: translateY(-3px);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  margin: 0;
  color: var(--text-dim);
  font-size: .88rem;
}
.footer-bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
}
.footer-bottom a {
  color: var(--text-dim);
  font-size: .88rem;
}
.footer-bottom a:hover { color: var(--primary); }

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .footer-newsletter { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom ul { justify-content: center; }
}

/* ==========================================================
   11. EXTRA: Tool cards, About, Contact, Animations
   ========================================================== */
.tool-card .tool-top {
  transition: background .35s, transform .35s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
  font-size: 1.6rem;
}
.tool-card:hover .tool-top {
  background: linear-gradient(135deg, rgba(30,90,69,.28), rgba(196,87,43,.22));
}
.badge {
  transition: transform .25s, background .25s, box-shadow .25s;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(30,90,69,.15);
  color: var(--primary);
}
.card:hover .badge {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(30,90,69,.35);
  background: rgba(30,90,69,.28);
}
.tool-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.tool-meta .rating {
  color: var(--star);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
}

/* About page */
.about-hero-content {
  max-width: 720px;
  margin: 0 auto;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: transform .35s, border-color .3s, box-shadow .35s;
}
.about-card:hover {
  transform: translateY(-6px);
  border-color: rgba(30,90,69,.45);
  box-shadow: var(--shadow);
}
.about-card .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: var(--grad);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(30,90,69,.3);
  transition: transform .3s;
}
.about-card:hover .icon { transform: scale(1.08) rotate(3deg); }
.about-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.about-card p { color: var(--text-muted); font-size: .95rem; margin: 0; }
.founder-box {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-top: 48px;
}
.founder-box .avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 12px 30px rgba(30,90,69,.35);
}
.founder-box h3 { margin-bottom: 6px; }
.founder-box .role { color: var(--primary); font-weight: 600; margin-bottom: 12px; }
.founder-box p { color: var(--text-muted); margin: 0; }
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .founder-box { flex-direction: column; text-align: center; }
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.contact-info h3 { margin-bottom: 12px; }
.contact-info p { color: var(--text-muted); }
.contact-info .info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
/* neutralized - use .info-icon instead */
.contact-form-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Subtle entrance animation for cards */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.grid > .card,
.about-card,
.feature {
  animation: fadeUp .5s ease both;
}
.grid > .card:nth-child(2) { animation-delay: .06s; }
.grid > .card:nth-child(3) { animation-delay: .12s; }
.grid > .card:nth-child(4) { animation-delay: .18s; }
.grid > .card:nth-child(5) { animation-delay: .24s; }
.grid > .card:nth-child(6) { animation-delay: .3s; }
.grid > .card:nth-child(7) { animation-delay: .36s; }
.grid > .card:nth-child(8) { animation-delay: .42s; }

/* ==========================================================
   12. REDUCED MOTION
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


/* Blog post content */
.post-content h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}
.post-content ul, .post-content ol {
  padding-left: 1.25rem;
  color: var(--text-muted);
}
.post-content li { margin-bottom: 0.4rem; }
.post-content a { font-weight: 600; }
.form-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 20px;
  color: var(--text);
}
.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,90,69,.2);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form p { margin: 0 0 16px; }


/* ==========================================================
   PREMIUM POLISH – professional tech aesthetic
   ========================================================== */
:root {
  --bg: #f7f3ec;
  --bg-alt: #efe9dd;
  --surface: #ffffff;
  --surface-2: #f3ede2;
  --border: #e2d9c8;
  --text: #1f1b16;
  --text-muted: #5b544a;
  --text-dim: #766d60;
  --primary: #1e5a45;
  --primary-strong: #164636;
  --accent: #c4572b;
  --success: #2f8f5b;
  --star: #d99a1e;
  --grad: #1e5a45;
  --grad-soft: rgba(30,90,69,.08);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --header-h: 76px;
  --container: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}


body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(30,90,69,.12), transparent),
    linear-gradient(rgba(30,90,69,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,90,69,.03) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
}

.site-header {
  border-bottom: 1px solid rgba(226,217,200,.8);
  background: rgba(247,243,236,.96);
}

.btn-primary {
  background: var(--grad);
  border: 0;
  box-shadow: 0 8px 24px rgba(30,90,69,.35);
  font-weight: 700;
  letter-spacing: .01em;
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(30,90,69,.45);
}
.btn-outline {
  border: 1px solid rgba(30,90,69,.45);
  background: transparent;
}
.btn-outline:hover {
  background: rgba(30,90,69,.1);
  border-color: var(--primary);
}

.page-hero {
  position: relative;
  padding: 72px 0 48px;
  text-align: center;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(30,90,69,.14), transparent 70%);
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  background: linear-gradient(135deg, #1f1b16 30%, #143d2f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero h1 span {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.card {
  background: linear-gradient(165deg, var(--surface) 0%, rgba(255,255,255,1) 100%);
  border: 1px solid rgba(226,217,200,.9);
}
.card:hover {
  border-color: rgba(30,90,69,.55);
}

.eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(30,90,69,.1);
  border: 1px solid rgba(30,90,69,.2);
}

/* Contact page premium */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.contact-info h2 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}
.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 28px;
}
.info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.info-item:last-child { border-bottom: 0; }
.info-item .info-icon {
  font-size: 1.35rem;
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(30,90,69,.18), rgba(196,87,43,.14));
  border-radius: 14px;
  flex-shrink: 0;
  line-height: 1;
}
.info-item .info-text {
  flex: 1;
  min-width: 0;
}
.info-item .info-text strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}
.info-item .info-text p,
.info-item .info-text span {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}
.contact-form-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.contact-form-box h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}
.contact-form-box .form-intro {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: .95rem;
}

/* Breadcrumb for SEO + UX */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: .85rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  justify-content: center;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span[aria-hidden] { opacity: .5; }

/* Skip + focus */
.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100001;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
}

/* Explore CTA after search */
.header-cta.btn-explore,
a.btn-explore {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff !important;
  background: #1e5a45;
  box-shadow: 0 6px 20px rgba(30,90,69,.35);
  transition: transform .2s, box-shadow .2s, filter .2s;
  white-space: nowrap;
  text-decoration: none;
}
.header-cta.btn-explore:hover,
a.btn-explore:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 10px 28px rgba(30,90,69,.45);
  color: #fff !important;
}
@media (max-width: 980px) {
  .header-cta.btn-explore {
    display: none;
  }
}

.contact-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font: inherit;
}
.contact-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,90,69,.2);
}
.newsletter-form input[type="email"] {
  min-width: 0;
}
.join-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,90,69,.2);
}

/* Home logo: fit fully and display clearly */
.hero-card { padding: 14px; background: #fff; }
.hero-card img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; image-rendering: auto; }
.site-branding img, .custom-logo { height: 48px; width: auto; max-width: none; object-fit: contain; background: #fff; padding: 2px; }


/* ==========================================================
   WARM EDITORIAL OVERRIDES – light, paper-like, hand-crafted feel
   (removes glow / grid / gradient-text / neon effects)
   ========================================================== */
:root {
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(70, 52, 28, .10);
}

body {
  background-color: var(--bg);
  background-image: none;
  color: var(--text);
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -.01em;
}
h4 { letter-spacing: 0; }

a:hover { color: #143d2f; }
.page-hero h1, .hero h1, .hero-content h1 {
  font-family: var(--font-head);
}

/* Header: plain paper bar, no blur */
.site-header,
.site-header.is-scrolled {
  background: rgba(247, 243, 236, .97);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(70, 52, 28, .08); }

/* Buttons: solid, calm, slightly squared */
.btn { border-radius: 10px; }
.btn-primary,
.header-cta,
a.btn-explore,
.header-cta.btn-explore,
.newsletter-form button {
  background: #1e5a45;
  color: #fff !important;
  border: 0;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .12);
  border-radius: 10px;
}
.btn-primary:hover,
.header-cta:hover,
a.btn-explore:hover,
.header-cta.btn-explore:hover,
.newsletter-form button:hover {
  background: #164636;
  color: #fff !important;
  filter: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30, 90, 69, .25);
}
.btn-outline {
  border: 1.5px solid #1e5a45;
  color: #1e5a45;
  background: transparent;
}
.btn-outline:hover {
  background: #1e5a45;
  color: #fff;
  border-color: #1e5a45;
}

/* Hero: flat, no glow, no dark overlay */
.hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.hero::before { display: none; }
.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.page-hero::before { display: none; }

/* Gradient text -> solid colour */
.page-hero h1,
.hero h1 span,
.hero-content h1 span {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: var(--text);
}
.hero h1 span,
.hero-content h1 span { color: #c4572b; font-style: italic; }

/* Cards: white paper cards, soft warm shadow */
.card, .tool-card, .about-card, .contact-info, .contact-form-box {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(70, 52, 28, .05);
}
.card:hover, .tool-card:hover {
  border-color: #1e5a45;
  box-shadow: 0 14px 34px rgba(70, 52, 28, .14);
  transform: translateY(-3px);
}
.card-media::after { background: linear-gradient(to top, rgba(31, 27, 22, .18), transparent 50%); }
.tool-top { background: var(--bg-alt); }
.tool-card:hover .tool-top { background: #e9e1d2; }
.hero-card { box-shadow: 0 18px 40px rgba(70, 52, 28, .16); border: 1px solid var(--border); }

/* Badges, eyebrows, icons */
.eyebrow {
  color: #1e5a45;
  background: rgba(30, 90, 69, .08);
  border: 1px solid rgba(30, 90, 69, .22);
}
.feature-icon, .about-card .icon, .founder-box .avatar {
  background: #1e5a45;
  color: #fff;
}
.info-item .info-icon { background: rgba(30, 90, 69, .10); }
.cta-box {
  background: #e9f0ea;
  border: 1px solid #cfdcd2;
}

/* Footer: light, matches page */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.footer-col h4::after { background: #c4572b; }
.social a:hover { background: #1e5a45; color: #fff; border-color: #1e5a45; }

/* Forms on light bg */
input, textarea, select {
  background: #fff;
}
.contact-form select, .join-form input:focus,
.contact-form select:focus {
  background: #fff;
}
::selection { background: #c4572b; color: #fff; }

/* ==========================================================
   PAGE LOADER + STARTER ENTRANCE EFFECTS
   Lightweight, GPU-friendly, fully responsive
   ========================================================== */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f7f3ec);
  transition: opacity .45s ease, visibility .45s ease;
}
#page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.loader-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(70, 52, 28, .12);
  animation: loader-pulse 1.4s ease-in-out infinite;
}
.loader-bar {
  width: 120px;
  height: 3px;
  background: rgba(30, 90, 69, .15);
  border-radius: 99px;
  overflow: hidden;
}
.loader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #1e5a45, #c4572b);
  border-radius: 99px;
  animation: loader-slide 1.1s ease-in-out infinite;
}
@keyframes loader-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: .92; }
}
@keyframes loader-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(280%); }
}

/* Prevent scroll while loading */
body.is-loading {
  overflow: hidden;
}

/* Starter entrance – content fades & rises in */
body.is-loading .site-header,
body.is-loading .site-main,
body.is-loading .site-footer {
  opacity: 0;
  transform: translateY(18px);
}
.site-header,
.site-main,
.site-footer {
  transition: opacity .55s cubic-bezier(.22, 1, .36, 1), transform .55s cubic-bezier(.22, 1, .36, 1);
}
body.page-ready .site-header,
body.page-ready .site-main,
body.page-ready .site-footer {
  opacity: 1;
  transform: translateY(0);
}
/* Slight stagger so header appears first */
body.page-ready .site-header { transition-delay: 0s; }
body.page-ready .site-main { transition-delay: .08s; }
body.page-ready .site-footer { transition-delay: .16s; }

/* Subtle reveal for hero & cards (extra polish, still fast) */
.hero-content > *,
.hero-visual,
.section-header,
.card,
.tool-card,
.about-card {
  transition: opacity .5s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1);
}
body.is-loading .hero-content > *,
body.is-loading .hero-visual,
body.is-loading .section-header,
body.is-loading .card,
body.is-loading .tool-card,
body.is-loading .about-card {
  opacity: 0;
  transform: translateY(14px);
}
body.page-ready .hero-content > *:nth-child(1) { transition-delay: .12s; }
body.page-ready .hero-content > *:nth-child(2) { transition-delay: .18s; }
body.page-ready .hero-content > *:nth-child(3) { transition-delay: .24s; }
body.page-ready .hero-content > *:nth-child(4) { transition-delay: .30s; }
body.page-ready .hero-content > *:nth-child(5) { transition-delay: .36s; }
body.page-ready .hero-visual { transition-delay: .22s; }
body.page-ready .section-header,
body.page-ready .card,
body.page-ready .tool-card,
body.page-ready .about-card {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .15s;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #page-loader,
  .loader-logo,
  .loader-bar span,
  .site-header,
  .site-main,
  .site-footer,
  .hero-content > *,
  .hero-visual,
  .section-header,
  .card,
  .tool-card,
  .about-card {
    animation: none !important;
    transition: none !important;
  }
  body.is-loading .site-header,
  body.is-loading .site-main,
  body.is-loading .site-footer,
  body.is-loading .hero-content > *,
  body.is-loading .hero-visual {
    opacity: 1;
    transform: none;
  }
}


/* ==========================================================
   FULL RESPONSIVE LAYER (v2.3.1)
   Mobile-first hardening: overflow, touch, typography, grids
   ========================================================== */

/* Prevent horizontal scroll on all devices */
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Fluid images & media */
img, video, iframe, embed, object, svg {
  max-width: 100%;
  height: auto;
}
.card-media,
.card-media img,
.tool-card img,
.hero-card img,
.post-featured img,
.entry-thumb img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Containers stay within viewport */
.container,
.header-inner,
.hero-inner,
.footer-inner {
  width: 100%;
  max-width: var(--container, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 24px);
  padding-right: clamp(16px, 4vw, 24px);
  box-sizing: border-box;
}

/* Touch-friendly targets (min ~44px) */
.main-nav a,
.nav-toggle,
.btn,
.header-cta,
.card-link,
.social a,
.footer-bottom a {
  min-height: 44px;
  min-width: 44px;
}
.nav-toggle {
  width: 48px;
  height: 48px;
  padding: 12px;
  align-items: center;
  justify-content: center;
}

/* Tables scroll on small screens */
table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Forms full width on mobile */
input, textarea, select, button {
  max-width: 100%;
  box-sizing: border-box;
}

/* ---- Tablet (≤980px) ---- */
@media (max-width: 980px) {
  .hero {
    padding: 72px 0 56px;
  }
  .hero-inner {
    gap: 32px;
  }
  .hero h1,
  .hero-content h1 {
    font-size: clamp(1.75rem, 5vw, 2.4rem);
    line-height: 1.2;
  }
  .page-hero {
    padding: 48px 0 32px;
  }
  .page-hero h1 {
    font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  }
  .section {
    padding: 48px 0;
  }
  .section-head {
    margin-bottom: 28px;
  }
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }
}

/* ---- Mobile (≤768px) ---- */
@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }
  .hero {
    padding: 56px 0 40px;
  }
  .hero-inner {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }
  .hero-actions,
  .hero-cta,
  .btn-row {
    justify-content: center;
  }
  .hero-visual {
    max-width: 280px;
    margin: 0 auto;
  }
  .hero h1,
  .hero-content h1 {
    font-size: clamp(1.55rem, 6.5vw, 2rem);
  }
  .hero p,
  .hero-content p {
    font-size: 0.98rem;
  }
  .grid-2,
  .grid-3,
  .grid-4,
  .tools-grid,
  .posts-grid,
  .categories-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .site-title {
    font-size: 1.05rem;
  }
  .site-branding img,
  .custom-logo {
    height: 40px;
  }
  .section-title,
  .section-head h2 {
    font-size: clamp(1.35rem, 5vw, 1.7rem);
  }
  .card,
  .tool-card {
    border-radius: 12px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .post-content,
  .entry-content {
    font-size: 1rem;
    line-height: 1.65;
  }
  .post-content img,
  .entry-content img {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---- Small phones (≤520px) ---- */
@media (max-width: 520px) {
  .container,
  .header-inner,
  .hero-inner,
  .footer-inner {
    padding-left: 14px;
    padding-right: 14px;
  }
  .hero {
    padding: 44px 0 32px;
  }
  .hero-actions .btn,
  .btn-row .btn {
    width: 100%;
    justify-content: center;
  }
  .hero-actions,
  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
  .header-search input[type="search"] {
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  input[type="text"],
  input[type="email"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .site-branding .site-title {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .card-body,
  .tool-body {
    padding: 14px;
  }
  .section {
    padding: 36px 0;
  }
}

/* ---- Very small (≤380px) ---- */
@media (max-width: 380px) {
  .site-title {
    font-size: 0.95rem;
  }
  .hero h1,
  .hero-content h1 {
    font-size: 1.4rem;
  }
  .btn {
    padding: 12px 16px;
    font-size: 0.92rem;
  }
}

/* Landscape phones */
@media (max-height: 480px) and (orientation: landscape) {
  .hero {
    padding: 32px 0;
  }
  #page-loader .loader-logo {
    width: 48px;
    height: 48px;
  }
}

/* High-DPI / retina logo clarity */
.site-branding img,
.loader-logo,
.hero-card img {
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
}

/* Safe area insets (notched phones) */
@supports (padding: max(0px)) {
  .site-header .header-inner,
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .site-footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* ==========================================================
   SigmaTool logo
   ========================================================== */
.site-branding img.brand-logo,
.site-branding:hover img.brand-logo {
  height: 58px;
  width: auto;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}
.site-footer .site-branding img.brand-logo { height: 64px; }
.loader-logo { object-fit: contain; background: transparent; box-shadow: none; border-radius: 0; }

/* Hero side picture: SigmaTool banner */
.hero-card {
  width: 100%;
  max-width: 440px;
  height: auto;
  aspect-ratio: 640 / 350;
  padding: 0;
  background: #050E26;
  border: 1px solid rgba(59,130,246,.35);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(5,14,38,.35);
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
@media (max-width: 900px) {
  .hero-card { width: 100%; max-width: 340px; height: auto; }
}
