/* ============================================================
   Invoice Reminder Generator — styles.css
   Your Biz Tools · blue & white professional theme
   Standalone. No external libraries or fonts.
   ============================================================ */

:root {
  --navy: #0f2a5c;
  --navy-2: #1e3a8a;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eaf1ff;
  --blue-panel: #eef4ff;
  --blue-panel-2: #dbe7ff;
  --text: #1f2937;
  --text-muted: #55617a;
  --white: #ffffff;
  --bg: #f5f8ff;
  --border: #d8e0f0;
  --border-strong: #c3d0ea;
  --success: #067647;
  --shadow-sm: 0 1px 2px rgba(15, 42, 92, 0.06), 0 1px 3px rgba(15, 42, 92, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 42, 92, 0.08), 0 2px 6px rgba(15, 42, 92, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 42, 92, 0.12);
  --radius: 14px;
  --radius-sm: 9px;
  --container: 1140px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--blue-dark); }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }

/* Skip link */
.skip-link {
  position: absolute; left: 8px; top: -60px; background: var(--navy); color: #fff;
  padding: 10px 16px; border-radius: 8px; z-index: 200; transition: top 0.15s ease; text-decoration: none;
}
.skip-link:focus { top: 8px; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, .faq-q:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 20px; border-radius: 10px; font-size: 1rem; font-weight: 600;
  font-family: inherit; border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-lg { padding: 15px 30px; font-size: 1.075rem; }
.btn-outline { background: #fff; color: var(--blue-dark); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--blue-light); border-color: var(--blue); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.15rem; }
.brand-logo { width: 34px; height: 34px; border-radius: 8px; display: block; }
.brand-accent { color: var(--blue); }
.header-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 10px;
  background: #fff; color: var(--blue-dark); border: 2px solid var(--border-strong); font-weight: 600; text-decoration: none;
}
.header-cta:hover { background: var(--blue-light); border-color: var(--blue); }

/* Sections */
.section { padding: 52px 0; scroll-margin-top: 84px; }
.calculator-section { padding-bottom: 38px; }
.calculator-section + .section { padding-top: 38px; }
.alt-section { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: clamp(1.5rem, 3.5vw, 2rem); text-align: center; margin-bottom: 10px; }
.section-lead { text-align: center; color: var(--text-muted); max-width: 640px; margin: 0 auto 30px; }

/* Hero */
.hero {
  background: linear-gradient(180deg, #eef4ff 0%, #f5f8ff 100%);
  padding: 58px 0 46px; text-align: center; border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 780px; margin: 0 auto; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin-bottom: 16px; }
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--text-muted); margin-bottom: 24px; }
.hero-cta { margin-bottom: 14px; }
.trust-line { color: var(--text-muted); font-weight: 600; font-size: 0.95rem; margin: 0; }

/* Card */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 26px;
}

/* Generator layout */
.gen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }

/* Form fields */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 600; color: var(--navy); font-size: 0.95rem; margin-bottom: 6px; }
.field-help { margin: 6px 0 0; font-size: 0.84rem; color: var(--text-muted); }
.control {
  width: 100%; min-height: 44px; padding: 10px 12px; font-size: 1rem; font-family: inherit;
  color: var(--text); background: #fff; border: 1.5px solid var(--border-strong); border-radius: 9px;
}
.control:hover { border-color: var(--blue); }
textarea.control { min-height: 84px; resize: vertical; line-height: 1.5; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.amount-wrap { display: flex; gap: 8px; }
.amount-wrap select { flex: 0 0 92px; }
.amount-wrap input { flex: 1 1 auto; }

/* Actions */
.gen-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border);
}
.gen-actions .btn { flex: 1 1 auto; }
.copy-status { margin: 12px 0 0; min-height: 1.2em; font-weight: 600; color: var(--success); font-size: 0.92rem; }

/* Output */
.output-card { background: var(--blue-panel); border-color: var(--border-strong); }
.output-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.output-head h2 { margin: 0; font-size: 1.25rem; }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 700;
  padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--border);
  color: var(--navy);
}
.status-chip.is-due { color: var(--navy-2); background: var(--blue-light); border-color: var(--blue-panel-2); }
.status-chip.is-overdue { color: #b42318; background: #fff5f4; border-color: #f4c7c2; }
.status-chip.is-upcoming { color: var(--success); background: #eafaf2; border-color: #bfe6d1; }

.output-block { margin-bottom: 16px; }
.output-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.output-subject {
  background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px;
  font-weight: 600; color: var(--navy);
}
.output-body {
  background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 16px;
  white-space: pre-wrap; word-wrap: break-word; font-family: var(--font); font-size: 0.97rem; color: var(--text);
  min-height: 220px; line-height: 1.6;
}
.output-note { margin: 14px 0 0; font-size: 0.82rem; color: var(--text-muted); }

/* Prose (SEO content) */
.prose { color: var(--text); font-size: 1.02rem; }
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--navy); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; padding-top: 30px; }
.step-num {
  position: absolute; top: -22px; left: 24px; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 1.15rem; border-radius: 50%; box-shadow: var(--shadow-sm);
}
.step-title { font-size: 1.1rem; }
.step p { margin: 0; color: var(--text-muted); }

/* Privacy list */
.privacy-card { max-width: 720px; margin: 0 auto; }
.privacy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.privacy-list li { position: relative; padding-left: 34px; font-weight: 600; color: var(--text); }
.privacy-list li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue-light); border: 2px solid var(--blue);
}
.privacy-list li::after {
  content: ""; position: absolute; left: 7px; top: 7px; width: 6px; height: 11px;
  border: solid var(--blue-dark); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.privacy-caveat { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.86rem; color: var(--text-muted); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-q-heading { margin: 0; font-size: 1rem; }
.faq-q {
  width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 1.02rem; font-weight: 700; color: var(--navy); text-align: left;
}
.faq-q:hover { background: var(--blue-light); }
.faq-icon { flex: 0 0 auto; position: relative; width: 18px; height: 18px; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: var(--blue); border-radius: 2px; }
.faq-icon::before { top: 8px; left: 0; width: 18px; height: 2.5px; }
.faq-icon::after { left: 8px; top: 0; width: 2.5px; height: 18px; transition: transform 0.2s ease; }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: scaleY(0); }
.faq-a { padding: 0 18px 18px; }
.faq-a p { margin: 0; color: var(--text-muted); }

/* Bottom CTA */
.bottom-cta { text-align: center; background: linear-gradient(180deg, #f5f8ff 0%, #eaf1ff 100%); }
.bottom-cta .section-title { margin-bottom: 22px; }

/* Footer */
.site-footer { background: var(--navy); color: #cdd9f0; padding: 34px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; font-size: 1.1rem; }
.footer-brand svg { width: 26px; height: 26px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.footer-nav a {
  color: #cdd9f0; text-decoration: none; padding: 8px 14px; border-radius: 8px; min-height: 44px;
  display: inline-flex; align-items: center; font-weight: 600;
}
.footer-nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.footer-copy { margin: 0; font-size: 0.9rem; color: #9fb2d6; }

/* Legal pages */
.legal-main { padding: 48px 0 72px; }
.legal-content { max-width: 780px; margin: 0 auto; }
.legal-content h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 8px; }
.legal-updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }
.legal-content h2 { font-size: 1.25rem; margin-top: 32px; }
.legal-content ul { padding-left: 20px; }
.legal-content li { margin-bottom: 8px; }
.legal-back { margin-top: 40px; }

/* 404 */
.error-main { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.error-code { font-size: clamp(4rem, 14vw, 7rem); font-weight: 900; color: var(--blue); line-height: 1; margin: 0; }

/* Responsive */
@media (max-width: 900px) {
  .gen-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .step { padding-top: 34px; }
}
@media (max-width: 560px) {
  .card { padding: 18px; }
  .field-row { grid-template-columns: 1fr; }
  .gen-actions .btn { flex: 1 1 100%; }
  .section { padding: 42px 0; }
  .hero { padding: 44px 0 36px; }
  .header-cta { display: none; }
}
@media (max-width: 360px) { .container { padding: 0 14px; } }

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

/* Print */
@media print {
  :root { --shadow-sm: none; --shadow-md: none; --shadow-lg: none; }
  body { background: #fff; color: #000; }
  .site-header, .hero, .gen-actions, .copy-status, #how-it-works, #about-tool,
  .privacy-section, #faq, .bottom-cta, .site-footer, .skip-link, .field-help,
  .form-card { display: none !important; }
  .section { padding: 8px 0; }
  .gen-grid { display: block; }
  .card { box-shadow: none; border: 1px solid #999; }
  .output-card { background: #fff !important; }
  .output-subject, .output-body { border: 1px solid #999; }
}
