/* === Reset & Base === */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2e7d32;
  --primary-dark: #1b5e20;
  --accent: #f9a825;
  --bg: #ffffff;
  --bg-alt: #f7f9fa;
  --text: #222;
  --text-light: #666;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* === Typography === */
h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.7rem; margin-bottom: 1rem; color: var(--text); }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Layout === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }

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

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}

.nav-links a:hover { background: var(--bg-alt); text-decoration: none; }
.nav-links a.active { background: var(--primary); color: white; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-nav { display: block; }

.mobile-menu {
  display: none;
  list-style: none;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 0.5rem 1.5rem;
}

/* With JS, the menu is controlled by the toggle button and starts closed.
   Without JS, the menu is a plain list of links and is always visible, so
   a mobile visitor with scripting disabled still has navigation. */
.js .mobile-menu { display: none; }
.js .mobile-menu.show { display: block; }
.no-js .mobile-menu { display: block; }
.no-js .mobile-menu-btn { display: none !important; }
.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a.active { color: var(--primary); font-weight: 600; }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 5rem 0;
  text-align: center;
}

.hero-content { max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 3rem; margin-bottom: 0.5rem; color: white; }
.tagline {
  font-size: 1.4rem;
  font-weight: 300;
  opacity: 0.95;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 2rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #1a1a1a;
}
.btn-primary:hover {
  background: #b8921f;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

/* === Cards === */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.about-card {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
}

.card-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.about-card h3 { color: var(--primary); }
.about-card p { margin: 0; color: var(--text-light); font-size: 0.95rem; }

.services-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.service-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.service-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.service-item h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.service-item p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

.cta-center { text-align: center; margin-top: 2rem; }

/* === Services Page === */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
}
.page-header h1 { color: white; margin-bottom: 0.5rem; }
.page-subtitle { font-size: 1.1rem; opacity: 0.85; }

.section-intro { font-size: 1.1rem; color: var(--text-light); max-width: 700px; margin-bottom: 2rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.service-card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.service-card h3 { color: var(--primary); margin-bottom: 0.75rem; }
.service-card ul {
  list-style: none;
  font-size: 0.95rem;
  color: var(--text-light);
}
.service-card li { padding: 0.25rem 0; border-bottom: 1px solid var(--border); }
.service-card li:last-child { border-bottom: none; }

/* === Notary Types === */
.notary-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.notary-type {
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}
.notary-type h3 { color: var(--primary); margin-bottom: 0.5rem; }
.notary-type p { margin: 0; font-size: 0.95rem; color: var(--text-light); }

/* === Resume === */
.resume-header {
  border-bottom: 2px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}
.resume-header h2 { margin-bottom: 0.5rem; }
.resume-contact a { color: var(--primary); }

.resume-section { margin-bottom: 2.5rem; }
.resume-section h3 { color: var(--primary); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }

/* NOTE: the credential-card / credential-icon / credential-detail /
   credential-meta / edu-block / membership-list / resume-note rules that
   used to live here had no matching markup in any page. They were removed
   on 2026-11-21. If the credential cards come back, use var(--text-light)
   (#666, 5.45:1 on white) rather than #888, which failed WCAG AA at 3.54:1. */

.exp-block { margin-bottom: 1.5rem; }
.exp-block h4 { margin-bottom: 0.25rem; }
.exp-date, .exp-block + p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.5rem; }
.exp-block ul { margin-left: 1.5rem; font-size: 0.95rem; }
.exp-block li { margin-bottom: 0.25rem; }

.skills-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.skill-tag {
  background: var(--primary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* === Contact Cards === */
.contact-intro { margin-bottom: 1.5rem; }
.contact-cards { display: flex; gap: 1.5rem; }
.contact-card {
  flex: 1;
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  text-align: center;
}
.contact-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.contact-card h3 { margin-bottom: 0.25rem; color: var(--primary); }
.contact-card p { margin: 0; }

/* === Footer === */
footer {
  background: #1a1a1a;
  color: #aaa;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
}
footer p { margin: 0.25rem 0; }

/* === Notary Log === */
/* Restored from the inline <style> block that lived in log.html until
   ed55dd8 ("fix(log): extract broken inline script into log.js") removed it
   without moving the rules into this file. Do not re-add an inline <style>
   to log.html — the log page's styles belong here. */

.log-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #e8f5e9;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.log-info-icon { font-size: 1.5rem; }
.log-info p { margin: 0; font-size: 0.9rem; color: #2e7d32; }

.log-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.search-box { flex: 1; min-width: 200px; }
.search-box input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.log-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.log-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.stat-box { flex: 1 1 140px; min-width: 0; }
.stat-box {
  background: #f5f5f5;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  text-align: center;
}
.stat-number { font-size: 2rem; font-weight: bold; color: #333; }
.stat-label { display: block; font-size: 0.85rem; color: #666; }

.log-table-container { overflow-x: auto; }
.log-table { width: 100%; border-collapse: collapse; }
.log-table th, .log-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.log-table th { background: #f9f9f9; font-weight: 600; }
.log-table tr:hover { background: #f5f5f5; }

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.btn-small {
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.btn-small:hover { background: #f0f0f0; }
.btn-small.btn-danger { color: #c62828; border-color: #ef9a9a; }
.btn-small.btn-danger:hover { background: #ffebee; }

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  /* The overlay scrolls when the dialog is taller than the viewport. The
     inner content is capped below so short dialogs stay centred. */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
  box-sizing: border-box;
}
.modal.show { display: flex; }
.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  /* dvh tracks the mobile browser chrome as it collapses; vh is the
     fallback for browsers without dvh. */
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.form-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.5rem; flex-wrap: wrap; }

/* Keep the page behind the modal from scrolling while the dialog is open.
   The lock has to be on <html> as well: overflow:hidden on <body> alone
   does not stop the document scrolling when <html> is the scrolling
   element, so the fixed dialog and the page drift apart. */
body.modal-open { overflow: hidden; }
html.modal-open { overflow: hidden; }

/* The UA stylesheet's [hidden] { display: none } has very low specificity,
   so any class that sets a display property (e.g. .image-preview) beats it
   and the element stays visible while the code thinks it is hidden. This
   rule restores the intended behaviour for every hidden element. */
[hidden] { display: none !important; }

/* Skip link. Hidden until it takes focus, then pinned to the top-left so a
   keyboard user can jump straight past the navigation. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0.5rem;
  z-index: 2000;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
}

/* Visually hidden, still announced by screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* === Accessibility === */

/* The stylesheet had no :focus rules at all, so focus indication was
   whatever the UA default happened to be. Several controls set
   border:none / background:none, which left them with almost nothing. */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* One combined live region instead of two competing stat boxes. */

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

/* === Notary Log components === */

.corrupt-banner {
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: #fff3e0;
  border: 1px solid #ffb74d;
  border-left: 4px solid #ef6c00;
  border-radius: var(--radius);
}
.corrupt-banner strong { color: #8c3d00; }
.corrupt-banner p { margin: 0.25rem 0 0; font-size: 0.9rem; color: #6b3200; }

.form-error {
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  background: #ffebee;
  border: 1px solid #ef9a9a;
  border-radius: 6px;
  color: #b71c1c;
  font-size: 0.9rem;
}

.btn-danger-text { color: #c62828; }
.btn-danger-text:hover {
  background: #ffebee;
  border-color: #c62828;
  color: #8e0000;
}

/* === PIN gate === */

.pin-form {
  max-width: 26rem;
  padding: 1.5rem;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: var(--radius, 8px);
}

.pin-form .form-group { margin-bottom: 1rem; }
.pin-form .form-group label { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.pin-form input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 1.25rem;
  letter-spacing: 0.2em;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
}
.pin-form .form-actions { margin-bottom: 0; }

/* === Image attachment === */

.form-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #666;
}

input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  background: #fafafa;
  border: 1px dashed var(--border-color, #e0e0e0);
  border-radius: 6px;
}

.image-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.6rem;
  background: #fafafa;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
}
.image-preview img {
  max-width: 140px;
  max-height: 90px;
  object-fit: contain;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  /* An image with no source renders as alt text inside a box this size,
     which wraps into an unreadable block. Collapse it instead. */
  min-width: 140px;
  min-height: 90px;
  color: transparent;
  font-size: 0;
}
.image-preview span { font-size: 0.85rem; color: #444; }

/* === Print === */
/* Printing the log is a plausible notarial workflow — strip the chrome
   so what comes out of the printer is the table, not the website. */
@media print {
  header,
  footer,
  .page-header,
  .log-controls,
  .log-info,
  .corrupt-banner,
  .form-actions,
  #entryModal,
  .search-box,
  .modal {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .section { padding: 0; }
  .container { max-width: none; padding: 0; }
  .log-table-container { overflow-x: visible; }
  .log-table th, .log-table td { padding: 0.25rem 0.4rem; }
  .log-table tr { page-break-inside: avoid; }
  .stat-box { border: 1px solid #999; }

  /* Keep the action column from printing as an empty column. */
  .log-table th:last-child,
  .log-table td:last-child { display: none; }

  a[href]::after { content: ""; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }

  /* Without JS there is no toggle button, so the link list must show. */
  .no-js .mobile-menu-btn { display: none; }
  .no-js .mobile-menu { display: block; }

  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 3rem 0; }

  .about-grid { grid-template-columns: 1fr; }
  .services-preview { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .notary-types { grid-template-columns: 1fr; }
  .contact-cards { flex-direction: column; }
}

@media (max-width: 480px) {
  .services-preview { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .tagline { font-size: 1.1rem; }
}