/* Font Generator Tools — shared stylesheet
   Mobile-first, light theme, no dependencies. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f3ff;
  --text: #1f2937;
  --muted: #64748b;
  --accent: #7c3aed;
  --accent-dark: #6d28d9;
  --accent-soft: #ede9fe;
  --border: #e2e8f0;
  --card: #ffffff;
  --error: #dc2626;
  --error-soft: #fef2f2;
  --radius: 12px;
  --max-width: 920px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent-dark);
  text-decoration: none;
}

.nav-toggle {
  display: inline-block;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--text);
}

.site-nav { display: none; }
.site-nav.open { display: block; }

.site-nav a {
  display: block;
  padding: 0.6rem 0.25rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-top: 1px solid var(--border);
}

.site-nav a:hover { color: var(--accent-dark); }

@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; gap: 1.25rem; }
  .site-nav a { border-top: none; padding: 0.25rem 0; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--accent-soft), var(--bg));
  padding: 2.5rem 0 2rem;
  text-align: center;
}

.hero h1 { margin: 0 0 0.5rem; font-size: 1.9rem; line-height: 1.25; }
.hero p { margin: 0 auto; max-width: 640px; color: var(--muted); font-size: 1.05rem; }

/* ---------- Cards grid ---------- */
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0 2.5rem;
}

@media (min-width: 600px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h2, .card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; color: var(--accent-dark); }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Article / content ---------- */
.article { padding: 1.5rem 0 2rem; }
.article h1 { font-size: 1.7rem; line-height: 1.3; margin: 0 0 0.75rem; }
.article h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; color: var(--accent-dark); }
.article h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.lead { font-size: 1.05rem; color: var(--muted); }

/* ---------- Tool panel ---------- */
.tool {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.tool-row { margin-bottom: 1rem; }
.tool-row:last-child { margin-bottom: 0; }

label { display: block; font-weight: 600; margin-bottom: 0.35rem; }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem; /* 16px+ prevents iOS auto-zoom */
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

input:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

textarea { resize: vertical; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover { background: var(--accent-dark); }

.error {
  display: none;
  background: var(--error-soft);
  color: var(--error);
  border: 1px solid var(--error);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.75rem;
  font-weight: 600;
}
.error.show { display: block; }

.hint { font-size: 0.9rem; color: var(--muted); margin-top: 0.25rem; }

/* ---------- Generator style rows ---------- */
.style-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }

.style-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}

.style-label {
  flex: 0 0 8.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.style-note {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.78rem;
  margin-top: 0.2rem;
  color: var(--error);
}

.style-output {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.15rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.btn-copy {
  flex: 0 0 auto;
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
}

.btn-copy.copied { background: #15803d; }

.copy-status { min-height: 1.4em; font-size: 0.9rem; color: var(--accent-dark); font-weight: 600; margin: 0.75rem 0 0; }

@media (max-width: 560px) {
  .style-row { flex-wrap: wrap; }
  .style-label { flex: 1 1 100%; }
  .style-output { flex: 1 1 auto; }
}

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  background: #fff;
}

.faq summary { padding: 0.8rem 1rem; font-weight: 700; cursor: pointer; }
.faq summary:hover { color: var(--accent-dark); }
.faq details > div { padding: 0 1rem 1rem; }
.faq p { margin: 0.25rem 0; }

/* ---------- Ad slots ---------- */
.ad-slot {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  background: #fafafa;
}

.ad-slot span {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 2rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }

.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: #d1d5db; text-decoration: none; font-size: 0.95rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-sisters { margin-top: 1.5rem; font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid #374151;
  margin-top: 1.5rem;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* ---------- Misc ---------- */
ol.steps, ul.tips { padding-left: 1.25rem; }
ol.steps li, ul.tips li { margin-bottom: 0.5rem; }

.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.5rem; }
.breadcrumb a { color: var(--accent-dark); }

.warning-box {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
