/* ==========================================================================
   TideRank SEO — tiderankseo.com
   Dark technical theme · Space Grotesk / IBM Plex Sans / IBM Plex Mono
   ========================================================================== */

:root {
  --bg: #0D1117;
  --bg-raised: #161B22;
  --bg-inset: #0A0E13;
  --border: #21262D;
  --border-bright: #30363D;
  --cyan: #22D3EE;
  --cyan-dim: rgba(34, 211, 238, 0.12);
  --lime: #A3E635;
  --lime-dim: rgba(163, 230, 53, 0.12);
  --text: #D1D5DB;
  --text-bright: #F3F4F6;
  --text-dim: #8B949E;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius: 8px;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-bright);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 0.85rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

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

ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

strong { color: var(--text-bright); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.kicker { display: block; margin-bottom: 0.75rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-bright);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .tick { color: var(--lime); }
.brand em { color: var(--cyan); font-style: normal; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 10px 9px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cyan);
  transition: transform 0.2s, opacity 0.2s;
}
.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); }

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 0.5rem 1.25rem 1rem;
}
.site-nav.open { display: flex; }
.site-nav a {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.6rem 0.25rem;
  border-bottom: 1px solid var(--border);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--cyan); text-decoration: none; }
.site-nav a.nav-cta { color: var(--lime); border-bottom: none; }

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.15rem;
    background: none;
    border: none;
    padding: 0;
  }
  .site-nav a { padding: 0; border-bottom: none; font-size: 0.8rem; }
}

/* ---------- Hero ---------- */

.hero { padding: 4rem 0 3.5rem; }

.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.2fr 1fr; } }

.hero .lead {
  font-size: 1.1rem;
  color: var(--text);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero h1 em { font-style: normal; color: var(--cyan); }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--cyan);
  transition: background 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--cyan); color: #06181D; font-weight: 600; }
.btn-primary:hover { background: #67E3F5; border-color: #67E3F5; }
.btn-ghost { color: var(--cyan); background: transparent; }
.btn-ghost:hover { background: var(--cyan-dim); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Terminal card ---------- */

.terminal {
  background: var(--bg-inset);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.9;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}
.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}
.terminal-bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-bright);
}
.terminal-bar i:first-child { background: var(--cyan); opacity: 0.7; }
.terminal-body { padding: 1rem 1.1rem; overflow-x: auto; }
.terminal-body .prompt { color: var(--cyan); }
.terminal-body .ok { color: var(--lime); }
.terminal-body .dim { color: var(--text-dim); }

/* ---------- Metric cards ---------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
@media (min-width: 680px) { .metrics { grid-template-columns: repeat(4, 1fr); } }

.metric-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
}
.metric-card .value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--lime);
  display: block;
}
.metric-card .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- Sections & cards ---------- */

section { padding: 3rem 0; }
section.alt { background: rgba(22, 27, 34, 0.55); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 44rem; margin-bottom: 2rem; }

.card-grid { display: grid; gap: 1.25rem; }
@media (min-width: 680px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--cyan); }
.card .card-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--lime);
  display: block;
  margin-bottom: 0.6rem;
}
.card p { color: var(--text-dim); font-size: 0.95rem; }
.card p a { color: var(--cyan); }

/* ---------- Prose / article ---------- */

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.75rem; color: var(--cyan); }

.page-hero { padding: 3.5rem 0 1rem; }
.page-hero .lead { font-size: 1.08rem; max-width: 44rem; color: var(--text); }

/* ---------- Checklist ---------- */

.checklist { list-style: none; padding-left: 0; }
.checklist li {
  padding-left: 1.7rem;
  position: relative;
  margin-bottom: 0.55rem;
}
.checklist li::before {
  content: "\25B8";
  position: absolute;
  left: 0.25rem;
  color: var(--lime);
  font-family: var(--font-mono);
}

/* ---------- Bar chart (decorative) ---------- */

.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 1rem;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.bars i {
  flex: 1;
  background: linear-gradient(to top, var(--cyan-dim), var(--cyan));
  border-radius: 3px 3px 0 0;
  min-width: 8px;
}
.bars i.hot { background: linear-gradient(to top, var(--lime-dim), var(--lime)); }

/* ---------- FAQ ---------- */

.faq details {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text-bright);
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 1.1rem;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 1.25rem 1.1rem; color: var(--text-dim); }

/* ---------- Comparison table ---------- */

.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.92rem; }
.compare th, .compare td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  vertical-align: top;
}
.compare th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--bg-raised);
}
.compare td { color: var(--text-dim); }
.compare td:first-child { color: var(--text); }

/* ---------- CTA band ---------- */

.cta-band {
  border: 1px solid var(--border-bright);
  border-left: 3px solid var(--lime);
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  margin: 3rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 { margin-bottom: 0.35rem; }
.cta-band p { color: var(--text-dim); margin-bottom: 0; }

/* ---------- Forms ---------- */

.contact-form {
  max-width: 36rem;
  background: var(--bg-raised);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.08), 0 0 42px rgba(34, 211, 238, 0.10);
}
.form-field { margin-bottom: 1.15rem; }
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: #F3F4F6;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #0D1117;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: #4B5563; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.hidden { display: none; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-inset);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 680px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--cyan); }
.footer-tagline { color: var(--text-dim); max-width: 22rem; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ---------- Page meta ---------- */

.page-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-bottom: 0.9rem;
}
.page-meta a { color: var(--text-dim); }
.
/* mobile fixes */
img, svg { max-width: 100%; }
.hero-grid > *, .card-grid > *, .footer-grid > *, .metrics > * { min-width: 0; }
.site-footer, .footer-bottom, .prose, .card { overflow-wrap: break-word; }
@media (max-width: 879px) {
  .form-field input,
  .form-field select,
  .form-field textarea { font-size: 1rem; } /* >=16px prevents iOS focus zoom */
  .nav-toggle { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .site-nav.open { max-height: calc(100vh - 64px); overflow-y: auto; }
  .site-nav a { min-height: 44px; display: flex; align-items: center; }
  .btn { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 679px) {
  .site-footer li { margin-bottom: 0; }
  .site-footer ul a { display: inline-block; padding: 0.45rem 0; }
}
