/* ============================================================
   AI Tried It — main stylesheet
   Dark minimalist theme. Vanilla CSS. Mobile-first.
   System font stack. No frameworks, no external requests.
   ============================================================ */

:root {
  --bg: #0a0d12;
  --bg-soft: #10151d;
  --bg-raised: #161d28;
  --ink: #eaeff6;
  --muted: #a3b1c6;
  --faint: #6e7d94;
  --line: rgba(235, 242, 252, 0.09);
  --accent: #6aa6ff;
  --accent-ink: #06121f;
  --accent-soft: rgba(106, 166, 255, 0.1);
  --amber: #e8b34b;
  --amber-soft: rgba(232, 179, 75, 0.1);
  --radius: 14px;
  --maxw: 1120px;
  --pad: 1.25rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--accent-ink); }

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #9cc2ff; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 750; }
h1 { font-size: 2.1rem; margin: 0 0 1rem; }
h2 { font-size: 1.55rem; margin: 2.75rem 0 0.75rem; }
h3 { font-size: 1.18rem; margin: 1.75rem 0 0.5rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.prose { max-width: 44rem; }
main { display: block; padding: 2.5rem 0 3.5rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.6rem 1rem; z-index: 100; font-weight: 700;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(10, 13, 18, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 0.85rem; padding-bottom: 0.85rem;
}
.logo {
  font-weight: 800; font-size: 1.2rem; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.6rem;
  white-space: nowrap; letter-spacing: -0.01em;
}
.logo:hover { color: #fff; }
.logo-mark {
  width: 1.75rem; height: 1.75rem; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--accent) 0%, #3b6fd4 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-ink); font-size: 1rem; font-weight: 800;
}
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; font-size: 1.35rem;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); cursor: pointer;
}
#primary-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: none; /* shown when .nav-open on mobile */
}
body.nav-open #primary-nav ul {
  display: flex; flex-direction: column; gap: 0;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-soft); border-bottom: 1px solid var(--line);
  padding: 0.5rem var(--pad) 1rem;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}
body.nav-open #primary-nav a {
  display: block; padding: 0.7rem 0.25rem; text-decoration: none;
  color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line);
}
body.nav-open #primary-nav a:hover { color: var(--accent); }

/* ---------- Ad slots (placeholders — paste AdSense code after approval) ---------- */
.ad-slot {
  border: 1px dashed rgba(235, 242, 252, 0.16);
  background: transparent;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  min-height: 90px;
  margin: 1.5rem auto;
  max-width: var(--maxw);
  padding: 0 var(--pad);
}
.ad-label {
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint);
}
.ad-leaderboard { min-height: 100px; }
.ad-inarticle { min-height: 250px; max-width: 44rem; }
.ad-sidebar { min-height: 600px; margin: 0; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(720px 340px at 50% -60px, rgba(106, 166, 255, 0.13), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 4.5rem 0 4rem;
  text-align: left;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.3rem);
  max-width: 20ch;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
.hero .lede { font-size: 1.12rem; color: var(--muted); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.8rem 1.5rem; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 750; text-decoration: none;
  border: none; cursor: pointer; font-size: 1rem; line-height: 1.4;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover {
  background: #8ab8ff; color: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(106, 166, 255, 0.28);
}
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--bg-raised); color: #fff;
  border-color: rgba(106, 166, 255, 0.45);
  box-shadow: none; transform: translateY(-1px);
}

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1.25rem; margin: 1.75rem 0; }
.card {
  border: 1px solid var(--line); border-radius: 16px;
  padding: 1.6rem; background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(106, 166, 255, 0.35);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}
.card h3 { margin: 0; font-size: 1.22rem; }
.card p { color: var(--muted); margin: 0; flex: 1; }
.card .card-link { font-weight: 700; margin-top: 0.4rem; }
.eyebrow {
  display: inline-block; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.card-coming { border-style: dashed; }
.card-coming:hover { transform: none; box-shadow: none; }
.badge-soon {
  align-self: flex-start; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--amber-soft); color: var(--amber);
  border: 1px solid rgba(232, 179, 75, 0.35); border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

/* ---------- Two-column: content + sidebar (desktop) ---------- */
.layout-sidebar { display: grid; gap: 2rem; }
.sidebar .side-box {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; background: var(--bg-soft); margin-bottom: 1.5rem;
}
.sidebar .side-box h3 { margin-top: 0; font-size: 1.05rem; }

/* ---------- How we test steps ---------- */
.steps { list-style: none; padding: 0; margin: 1.75rem 0; counter-reset: step; display: grid; gap: 1rem; }
.steps li {
  counter-increment: step; position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.25rem 1.15rem 3.6rem; background: var(--bg-soft);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 1.1rem; top: 1.1rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.steps li strong { display: block; margin-bottom: 0.25rem; }
.steps li p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ---------- Author byline ---------- */
.byline {
  display: flex; gap: 0.9rem; align-items: flex-start;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 2.5rem 0;
  max-width: 44rem;
}
.byline-avatar {
  flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #3b6fd4);
  color: var(--accent-ink); font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem; letter-spacing: 0.02em;
}
.byline p { margin: 0; font-size: 0.94rem; color: var(--muted); }
.byline .byline-name { font-weight: 700; color: var(--ink); }
.updated { font-size: 0.85rem; color: var(--faint); }

/* ---------- Email signup ---------- */
.signup {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 18px; padding: 2rem; margin: 2.75rem 0 0;
}
.signup h2 { margin-top: 0; font-size: 1.35rem; }
.signup p { color: var(--muted); }
.signup-form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; }
.signup-form input[type="email"] {
  padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px;
  font-size: 1rem; font-family: inherit; width: 100%;
  background: var(--bg); color: var(--ink);
}
.signup-form input[type="email"]::placeholder { color: var(--faint); }
.signup-form input[type="email"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106, 166, 255, 0.22);
}
.notice {
  font-size: 0.85rem; color: var(--amber);
  background: var(--amber-soft); border: 1px solid rgba(232, 179, 75, 0.3);
  border-radius: 10px; padding: 0.65rem 0.95rem; margin-top: 0.9rem;
}

/* ---------- Forms ---------- */
form.contact-form { max-width: 44rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.8rem 1rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink);
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106, 166, 255, 0.22);
}
.form-status { font-weight: 700; margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: #070a0f; color: var(--muted); margin-top: 3.5rem;
  padding: 2.75rem 0 1.5rem; font-size: 0.94rem;
  border-top: 1px solid var(--line);
}
.site-footer a { color: #cfdaea; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 1.75rem; margin-bottom: 1.75rem; }
.footer-brand p { color: var(--faint); max-width: 38ch; }
.footer-brand .logo { color: #fff; }
.footer-brand .logo:hover { color: #fff; }
.footer-nav h3 { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 0.7rem; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 0.45rem; }
.affiliate-note {
  border-top: 1px solid var(--line); padding-top: 1.25rem; margin-bottom: 1.25rem;
  color: var(--faint); font-size: 0.88rem; max-width: 70ch;
}
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  color: var(--faint); font-size: 0.85rem;
}

/* ---------- Misc ---------- */
.callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0; max-width: 44rem;
}
.callout p { margin: 0; }
table.plain { border-collapse: collapse; width: 100%; max-width: 44rem; margin: 1.25rem 0; font-size: 0.95rem; }
table.plain th, table.plain td { border: 1px solid var(--line); padding: 0.65rem 0.85rem; text-align: left; }
table.plain th { background: var(--bg-soft); }
code {
  background: var(--bg-raised); color: #c9d6ea;
  padding: 0.15rem 0.45rem; border-radius: 6px; font-size: 0.88em;
}

/* ---------- Breakpoints ---------- */
@media (min-width: 700px) {
  h1 { font-size: 2.5rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .signup-form { flex-direction: row; }
  .signup-form input[type="email"] { flex: 1; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  #primary-nav ul { display: flex; gap: 0.25rem; align-items: center; }
  #primary-nav a {
    display: block; padding: 0.55rem 0.85rem; border-radius: 10px;
    text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.97rem;
    transition: background 0.15s ease, color 0.15s ease;
  }
  #primary-nav a:hover { background: var(--bg-raised); color: #fff; }
  #primary-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
}

@media (min-width: 1024px) {
  .layout-sidebar { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .ad-leaderboard { min-height: 110px; }
}

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