/* ============================================
   7A Security Deposit Demand Letter Generator
   Trust-building, mobile-first design
   Forked from OnPdf Auto, accent = urgency red
   ============================================ */

:root {
  --navy: #1a2332;
  --navy-light: #243044;
  --blue: #2c5fa1;
  --blue-hover: #1e4a80;
  --accent: #c0392b;
  --accent-hover: #a93226;
  --accent-light: #e74c3c;
  --green: #2e7d32;
  --green-light: #4caf50;
  --red: #c62828;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

/* ---- HEADER ---- */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
  text-decoration: none;
}
.logo span { color: var(--accent-light); }
.header-tagline {
  font-size: 0.85rem;
  color: var(--gray-400);
  display: none;
}
@media (min-width: 600px) {
  .header-tagline { display: block; }
}

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 60px 24px;
  text-align: center;
}
.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero p {
  font-size: 1.15rem;
  color: var(--gray-300);
  max-width: 550px;
  margin: 0 auto 32px;
  line-height: 1.5;
}
.hero-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ---- TRUST BAR ---- */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 24px;
}
.trust-bar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--gray-700);
  font-weight: 500;
}
.trust-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ---- MAIN CONTENT ---- */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--navy);
}
.section-subtitle {
  text-align: center;
  color: var(--gray-600);
  margin-bottom: 40px;
  font-size: 1rem;
}

/* ---- DOC GRID / CARDS ---- */
.doc-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 60px;
}
.doc-grid .doc-card {
  flex: 0 1 calc(50% - 10px);
  min-width: 280px;
  max-width: 500px;
}
.doc-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.doc-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.doc-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}
.doc-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ---- HOW IT WORKS ---- */
.how-it-works { margin-bottom: 60px; }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}
.step { text-align: center; padding: 24px; }
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 0.9rem; color: var(--gray-600); }

/* ---- FORM PAGE ---- */
.form-page-header { text-align: center; margin-bottom: 32px; }
.form-page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.form-page-header .statute-ref {
  font-size: 0.9rem;
  color: var(--blue);
  font-weight: 500;
  margin-bottom: 8px;
}
.form-page-header .form-desc {
  font-size: 0.95rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* ---- STATE SELECT ---- */
.state-select-section {
  max-width: 500px;
  margin: 0 auto 40px;
  text-align: center;
}
.state-select-section select {
  width: 100%;
  max-width: 360px;
  padding: 14px 18px;
  font-size: 1.05rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  cursor: pointer;
  margin-bottom: 16px;
}
.state-select-section select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

/* ---- LEGAL NOTICES ---- */
.legal-notices {
  background: #fef9e7;
  border: 1px solid #f9e79f;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 32px;
}
.legal-notices h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.legal-notices ul { list-style: none; padding: 0; }
.legal-notices li {
  font-size: 0.85rem;
  color: var(--gray-700);
  padding: 4px 0 4px 20px;
  position: relative;
  line-height: 1.5;
}
.legal-notices li::before {
  content: "\2022";
  color: var(--accent);
  font-weight: bold;
  position: absolute;
  left: 4px;
}

/* ---- DEADLINE ALERT ---- */
.deadline-alert {
  background: #fdedec;
  border: 1px solid #f5b7b1;
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 24px;
  text-align: center;
}
.deadline-alert.past-due {
  background: #fdedec;
  border-color: var(--accent);
}
.deadline-alert.active {
  background: #eafaf1;
  border-color: var(--green);
}
.deadline-alert .deadline-status {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.deadline-alert.active .deadline-status {
  color: var(--green);
}
.deadline-alert .deadline-detail {
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-top: 4px;
}

/* ---- FORM ---- */
.form-container { max-width: 700px; margin: 0 auto; }
.form-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}
.form-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-100);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-row.full-width { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; }
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 95, 161, 0.12);
}
.form-group input.invalid,
.form-group textarea.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}
.form-group .field-error {
  font-size: 0.78rem;
  color: var(--red);
  margin-top: 4px;
  display: none;
}
.form-group .field-error.visible { display: block; }

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---- BUTTONS ---- */
.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.btn {
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-preview { background: var(--navy); color: var(--white); }
.btn-preview:hover { background: var(--navy-light); }
.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-800);
  border: 1px solid var(--gray-300);
}
.btn-secondary:hover { background: var(--gray-200); }

/* ---- PRICE TAG ---- */
.price-tag {
  text-align: center;
  margin-top: 20px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
}
.price-tag .price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
}
.price-tag .price-note {
  font-size: 0.82rem;
  color: var(--gray-600);
  margin-top: 4px;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy);
  color: var(--gray-400);
  padding: 40px 24px;
  text-align: center;
}
.footer-inner { max-width: 800px; margin: 0 auto; }
.footer-disclaimer {
  font-size: 0.78rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--gray-400);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 0.78rem; color: var(--gray-600); }

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
  .hero { padding: 40px 20px; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 1rem; }
  .trust-bar-inner { gap: 16px; }
  .trust-item { font-size: 0.82rem; }
  .form-section { padding: 20px; }
  .btn-row { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
