/* ========================================
   NarcoticTrack Inventory System Styles
   ======================================== */

/* ========================================
   Base & Reset
   ======================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

html, body {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #fff;
}

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

a {
  text-decoration: none;
  color: inherit;
}

section {
  scroll-margin-top: 80px;
}

/* ========================================
   Layout & Container
   ======================================== */

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.section.alt {
  background: #f9f9f9;
}

/* ========================================
   Typography
   ======================================== */

h1 {
  font-size: clamp(1.8rem, 1.1rem + 2.5vw, 2.4rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.lead {
  font-size: 1.15rem;
  color: #444;
  margin-bottom: 1rem;
}

.muted {
  color: #666;
}

.small {
  font-size: 0.92rem;
  color: #555;
}

.kicker {
  text-transform: uppercase;
  font-weight: 700;
  color: #c8102e;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* ========================================
   Lists
   ======================================== */

.list {
  list-style: disc outside;
  padding-left: 1.1rem;
  margin: 0.5rem 0;
}

.list li {
  margin-bottom: 0.5rem;
}

/* ========================================
   Grid Layouts
   ======================================== */

.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.split {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
  
  .split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

/* Ensure no inner scrollbars */
main, section, .container, .grid, .split {
  overflow: visible;
  height: auto;
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: #000;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.8;
}

.logo img {
  height: 50px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav a {
  font-weight: 600;
  color: #222;
  transition: color 0.2s;
}

.nav a:hover {
  color: #c8102e;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 25px;
  height: 2px;
  background: #222;
  position: relative;
  transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  display: block;
  width: 25px;
  height: 2px;
  background: #222;
  position: absolute;
  transition: transform 0.3s;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

/* Mobile menu open state */
.mobile-menu-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

@media (max-width: 640px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  
  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav a {
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
  }
  
  .nav a:hover {
    background: #f9f9f9;
  }
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
  padding: 4.5rem 0 3rem;
}

.hero-image {
  max-width: 560px;
  width: 100%;
  height: auto;
  margin: auto;
}

.testimonial {
  font-style: italic;
  color: #666;
  margin: 1.5rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid #c8102e;
}

.testimonial cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-style: normal;
  color: #888;
}

/* ========================================
   Buttons
   ======================================== */

.button {
  background: #c8102e;
  color: #fff !important;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  border: 2px solid #c8102e;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  display: inline-block;
  cursor: pointer;
  text-align: center;
}

.button:hover {
  background: transparent;
  color: #c8102e !important;
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button.ghost {
  background: transparent;
  color: #c8102e !important;
  border: 2px solid #c8102e;
}

.button.ghost:hover {
  background: #c8102e;
  color: #fff !important;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1rem 0;
}

/* ========================================
   Features Section
   ======================================== */

.features-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
}

.features-img {
  max-width: 400px;
  width: 100%;
  height: auto;
  margin: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  min-width: 280px;
}

.features-list li {
  margin-bottom: 0.8rem;
  line-height: 1.5;
  position: relative;
  padding-left: 1.5rem;
}

.features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #c8102e;
  font-weight: bold;
}

/* ========================================
   Client Logos
   ======================================== */

.clients {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.clients img {
  max-height: 56px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.2s, opacity 0.2s;
}

.clients img:hover {
  filter: grayscale(0);
  opacity: 1;
}

/* ========================================
   Records Section
   ======================================== */

.privacy-note {
  margin-top: 1.5rem;
  font-style: italic;
}

/* ========================================
   Pricing Section
   ======================================== */

.intro-text {
  margin-bottom: 2rem;
  max-width: 900px;
}

.pricing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .pricing {
    grid-template-columns: repeat(4, 1fr);
  }
}

.price-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.price-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.badge {
  display: inline-block;
  background: #c8102e;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.price {
  font-size: 1.8rem;
  font-weight: 800;
  color: #c8102e;
  margin: 0.25rem 0;
}

.price-card .small {
  margin-bottom: 0.75rem;
}

.price-card .list {
  margin-top: 0.5rem;
}

.price-card .list li {
  margin-bottom: 0.5rem;
}

.section-title {
  margin-top: 1.25rem;
}

.cta-button {
  display: inline-block;
  margin-top: 0.75rem;
}

/* ========================================
   About Section
   ======================================== */

#about h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#about p {
  margin-bottom: 1rem;
}

.portrait-container {
  text-align: center;
}

.portrait-frame {
  display: inline-block;
  border: 4px solid #c8102e;
  padding: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.portrait-frame img {
  width: 280px;
  height: 420px;
  object-fit: cover;
}

/* ========================================
   Contact Form
   ======================================== */

.contact-form {
  max-width: 800px;
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #c8102e;
}

.contact-form textarea {
  grid-column: 1 / -1;
  resize: vertical;
}

.contact-form button {
  grid-column: 1 / -1;
}

/* ========================================
   Custom Callout Section
   ======================================== */

.custom-callout {
  text-align: center;
}

.custom-callout .lead {
  max-width: 700px;
  margin: 1rem auto 1.5rem;
}

.custom-callout .button {
  margin-top: 0.5rem;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background: #222;
  color: #aaa;
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.9rem;
}

.footer p {
  margin: 0;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 640px) {
  .section {
    padding: 3rem 0;
  }
  
  .hero {
    padding: 3rem 0 2rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  .portrait-frame img {
    width: 240px;
    height: 360px;
  }
  
  .features-container {
    flex-direction: column;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .button-group .button {
    width: 100%;
  }
}

/* ========================================
   Accessibility Enhancements
   ======================================== */

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid #c8102e;
  outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@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;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .header,
  .footer,
  .nav,
  .button {
    display: none;
  }
  
  .section {
    page-break-inside: avoid;
  }
}
