/* ----------------------------------------------------------
   1. DESIGN TOKENS
---------------------------------------------------------- */
:root {
  --bg: #f7f8fa;
  --bg-hero: #f2f3f5;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --white: #ffffff;
  --border: #e5e7eb;
  --accent: #6366f1;
  --success: #10b981;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 6px 18px rgba(0, 0, 0, 0.08);

  --max-width: 1080px;
}

/* ----------------------------------------------------------
   2. GLOBAL RESET
---------------------------------------------------------- */
* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

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

/* ----------------------------------------------------------
   3. LAYOUT
---------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ----------------------------------------------------------
   4. HEADER + NAVIGATION
---------------------------------------------------------- */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  font-weight: 700;
  font-size: 18px;
}

.brand span {
  color: var(--accent);
}

.nav-links {
  display: none;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

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

/* Premium underline system */
.nav-links a {
  position: relative;
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: none;
}

.menu-btn {
  border: 1px solid var(--border);
  background: var(--white);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding-bottom: 12px;
  gap: 10px;
  font-size: 14px;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

/* ----------------------------------------------------------
   5. BUTTONS
---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-ghost {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ----------------------------------------------------------
   6. HERO SECTION
---------------------------------------------------------- */
.hero-section {
  background: var(--bg-hero);
  padding: 50px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.hero-left h1 {
  font-size: 30px;
  margin: 0 0 12px;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.store-badges {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.store-badge {
  height: 32px;
}

.store-links-inline {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.store-links-inline a {
  color: var(--accent);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
}

.store-links-inline .dot {
  font-size: 10px;
  color: var(--text-muted);
  margin: 0 4px;
  line-height: 1;
  display: inline-block;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.pill {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

/* Right-side card */
.hero-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.hero-card-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.mini-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.mini-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.mini-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chip {
  border: 1px dashed var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}

.chip .num {
  color: var(--success);
  font-weight: 600;
}

/* ----------------------------------------------------------
   7. SECTIONS
---------------------------------------------------------- */
.section {
  padding: 40px 0;
}

.section-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.section-header p {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ----------------------------------------------------------
   8. CARDS & GRIDS
---------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

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

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.label-primary {
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  display: inline-block;
  margin-bottom: 8px;
}

.label-secondary {
  background: #eef2ff;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  display: inline-block;
  margin-bottom: 8px;
}

/* ----------------------------------------------------------
   9. FLOW SECTION
---------------------------------------------------------- */
.flow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.flow-step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.flow-icon {
  margin-bottom: 10px;
}

.flow-step h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.flow-step p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ----------------------------------------------------------
   10. CTA SECTION
---------------------------------------------------------- */
.cta-section {
  padding: 50px 0;
}

.cta-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.cta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

/* ----------------------------------------------------------
   11. FOOTER
---------------------------------------------------------- */
.footer {
  padding: 50px 0;
  background: #f8f8f8;
  color: #333;
  font-size: 0.95rem;
  border-top: 1px solid #e5e5e5;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  margin-left: 20px;
  color: #333;
}

.footer-links a:hover {
  color: var(--accent);
}

.back-to-top {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--accent);
  font-weight: 500;
}

.footer-address {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

.footer-address p {
  margin: 2px 0;
}

/* ----------------------------------------------------------
   12. APPS GRID
---------------------------------------------------------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.app-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.app-card span {
  font-size: 13px;
  color: var(--text-muted);
}

.apps-viewall {
  text-align: center;
  margin-top: 20px;
}

/* ----------------------------------------------------------
   13. PORTFOLIO GRID
---------------------------------------------------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.portfolio-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.portfolio-card h3 {
  margin: 10px 0 6px;
  font-size: 18px;
}

.portfolio-card p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.portfolio-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 13px;
}

.portfolio-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

/* ----------------------------------------------------------
   14. RESPONSIVE
---------------------------------------------------------- */
@media (min-width: 720px) {

  .nav-cta .btn-primary,
  .menu-btn {
    padding: 4px 10px;
    /* smaller height */
    font-size: 12px;
    /* smaller text */
    border-radius: 999px;
    /* keep pill shape */
  }

  .nav-links {
    display: flex;
  }

  .nav-cta {
    display: inline-flex;
    transform: scale(0.85); /* clean shrink */ 
    transform-origin: right center;
  }

  .menu-btn {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
  }

  .hero-left h1 {
    font-size: 36px;
  }

  .hero-mini-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .flow-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .apps-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ----------------------------------------------------------
   15. MOBILE SPACING TWEAKS
---------------------------------------------------------- */
@media (max-width: 720px) {

  .card,
  .mini-card,
  .flow-step,
  .hero-card,
  .cta-card {
    padding: 20px !important;
  }

  .container {
    padding: 0 20px;
  }

  .hero-section {
    padding: 32px 0;
  }

  .section-header h2 {
    margin-top: 16px;
  }

  /* Make nav-cta small on mobile */
  .nav-cta {
    display: inline-flex;
    padding: 6px 10px;
    font-size: 11px;
    transform: scale(0.75);
    transform-origin: right center;
  }
}

/* ----------------------------------------------------------
   16. MODAL (QUOTE FORM)
---------------------------------------------------------- */

/* OVERLAY */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow-y: hidden;
}

/* MODAL BOX */
.modal-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 24px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: fadeIn 0.25s ease-out;
  border-top: 6px solid #007bff;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .modal-overlay {
    overflow-y: auto;
    /* allow page scroll when modal taller than viewport */
    align-items: flex-start;
    /* pin modal near top so scrolling feels natural */
    padding-top: 20px;
  }

  .modal-box {
    /* make modal fit and scroll on small screens */
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* TITLE */
.modal-box h2 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 24px;
  font-weight: 700;
}

.modal-box p {
  margin-top: 0;
  margin-bottom: 20px;
  color: #555;
}

/* CLOSE BUTTON */
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  cursor: pointer;
  color: #666;
}

.modal-close:hover {
  color: #000;
}

/* FORM FIELDS */
.modal-form .form-group {
  margin-bottom: 12px;
}

/* Two-column row for compact fields inside modal forms */
.modal-form .form-row {
  display: flex;
  gap: 12px;
}

.modal-form .form-row .form-group {
  flex: 1 1 0;
  margin-bottom: 12px;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  font-size: 15px;
  background: #f7f7f7;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  border-color: #007bff;
  background: #fff;
  outline: none;
}

/* SUBMIT BUTTON */
.modal-form button {
  width: auto;
  padding: 12px 24px;
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s ease;
  display: inline-block;
}

.modal-form button:hover {
  background: #005fcc;
}

/* Mobile-specific modal tweaks */
@media (max-width: 480px) {
  .modal-box {
    padding: 18px 14px;
  }

  .modal-box h2 {
    margin-bottom: 6px;
  }

  .modal-box p {
    margin-bottom: 14px;
  }

  .modal-form .form-group {
    margin-bottom: 12px;
  }

  .modal-form input,
  .modal-form select,
  .modal-form textarea {
    padding: 10px;
    font-size: 14px;
  }

  .modal-form button {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
  }
}


/* ----------------------------------------------------------
   17. PRICING GRID + AMC
---------------------------------------------------------- */

/* PRICING GRID */
.pricing-tiers {
  padding: 60px 0;
  padding-top: 20px;
  /* reduce from 60px */
}

.pricing-hero {
  padding-bottom: 20px;
  /* was too large */
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.tier-card {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  text-align: left;
}

.tier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.tier-card h2 {
  margin-bottom: 5px;
}

.tier-subtitle {
  color: #666;
  margin-bottom: 15px;
  font-size: 15px;
}

.tier-card ul {
  margin: 0 0 20px 0;
  padding-left: 18px;
}

.tester-hours {
  margin-top: auto;
  margin-bottom: 20px;
  font-size: 14px;
  color: #444;
}

/* BUTTON */
.tier-button {
  align-self: center;
  display: inline-block;
  padding: 12px 24px;
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
  margin-top: 10px;
}

.tier-button:hover {
  background: #005fcc;
}

/* AMC SECTION */
.amc-section {
  padding-top: 25px;
  padding-bottom: 80px;
  /* adds breathing room before footer */
  display: flex;
  justify-content: center;
}

/* AMC CARD */
.amc-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 30px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 550px;
  /* matches tier card width */
  text-align: left;
  line-height: 1.45;
  /* tighter, cleaner text */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.amc-card h2 {
  margin-bottom: 10px;
}

.amc-card ul {
  margin: 15px 0 25px 18px;
  padding: 0;
}

.amc-card .tier-button {
  align-self: center;
}

.amc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .tier-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .tier-grid {
    grid-template-columns: 1fr;
  }
}