/*
 * ARA design system.
 * Compiles to public/css/main.css, loaded AFTER Bootstrap 5.3 to retheme
 * it (Bootstrap itself is self-hosted separately from /node_modules, see
 * views/partials/head.ejs -- do NOT @import the Bootstrap framework here,
 * it would duplicate the ~228KB already shipped via that <link>).
 */
@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.text-shimmer {
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(-30deg, #000 40%, #666 50%, #000 40%);
  background-size: 800%;
  animation: shimmer 3s infinite linear;
}

.text-shimmer-info {
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(-30deg, #0c6e4f, #2db87a, #0c6e4f);
  background-size: 700%;
  animation: shimmer 5s infinite linear;
}

.text-shimmer-danger {
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(-30deg, #864141, #d78989, #864141);
  background-size: 700%;
  animation: shimmer 2s infinite linear;
}

.text-shimmer-success {
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(-30deg, #64a164, #aceeb0, #64a164);
  background-size: 700%;
  animation: shimmer 3s infinite linear;
}

.text-shimmer-dark {
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(-30deg, #000000, #666666, #000000);
  background-size: 700%;
  animation: shimmer 1s infinite linear;
}

.background-shimmer-rainbow {
  background-image: linear-gradient(-30deg, #0c6e4f, #2db87a, #0c6e4f);
  background-size: 700%;
  animation: shimmer 2s infinite linear;
}

.hidden {
  display: none;
}

/* ----- Design tokens ----- */
:root {
  --brand: #0c6e4f;
  --brand-rgb: 12, 110, 79;
  --brand-hover: #0a5e43;
  --brand-active: #084f38;
  --brand-light: #2db87a;
  --brand-light-rgb: 45, 184, 122;
  --radius: 0.625rem;
  --radius-sm: 0.4rem;
  --radius-pill: 50rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
  --nav-height: 60px;
  --hero-bg: #0a2e1f;
  --hero-text: #c8eadb;
}

/* Map Bootstrap's primary + links to the brand for BOTH themes. */
:root,
[data-bs-theme=light],
[data-bs-theme=dark] {
  --bs-primary: var(--brand);
  --bs-primary-rgb: var(--brand-rgb);
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: var(--brand-rgb);
  --bs-link-hover-color: var(--brand-hover);
  --bs-border-radius: var(--radius);
  --bs-border-radius-sm: var(--radius-sm);
  --bs-border-radius-lg: var(--radius);
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Subtle background separation per theme. */
[data-bs-theme=light] {
  --bs-body-bg: #f3f7f5;
  --surface: #ffffff;
}

[data-bs-theme=dark] {
  --surface: #1a1d21;
}

/* ----- Base ----- */
body {
  min-height: 100vh;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ----- Buttons ----- */
.btn {
  --bs-btn-border-radius: var(--radius-sm);
  font-weight: 500;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-hover);
  --bs-btn-hover-border-color: var(--brand-hover);
  --bs-btn-active-bg: var(--brand-active);
  --bs-btn-active-border-color: var(--brand-active);
  --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand-active);
}

/* ----- Cards / surfaces ----- */
.card {
  --bs-card-border-radius: var(--radius);
  --bs-card-bg: var(--surface);
  border-color: var(--bs-border-color-translucent);
  box-shadow: var(--shadow-sm);
}

/* ----- Navbar ----- */
.navbar {
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 600;
}

/* ----- Forms ----- */
.form-control,
.form-select {
  border-radius: var(--radius-sm);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(var(--brand-rgb), 0.2);
}

/* ----- Reusable layout components ----- */
.page {
  max-width: 1100px;
  margin-inline: auto;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.page-header h1,
.page-header h2 {
  margin: 0;
  font-weight: 600;
  font-size: 1.5rem;
}

.page-header .subtitle {
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
}

/* Empty / placeholder state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--bs-secondary-color);
}

.empty-state i {
  font-size: 2.5rem;
  opacity: 0.5;
  display: block;
  margin-bottom: 0.5rem;
}

/* Utility */
.text-brand {
  color: var(--brand) !important;
}

.bg-brand {
  background-color: var(--brand) !important;
  color: #fff !important;
}

.shadow-card {
  box-shadow: var(--shadow) !important;
}

/* Toast container baseline (modal.js injects #toastcontainer) */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1090;
}

/* Docs (markdown-rendered) content */
.docs-content h1,
.docs-content h2,
.docs-content h3 {
  margin-top: 1.5rem;
}
.docs-content h1:first-child,
.docs-content h2:first-child,
.docs-content h3:first-child {
  margin-top: 0;
}
.docs-content code {
  background-color: var(--bs-secondary-bg);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}
.docs-content pre {
  background-color: var(--bs-secondary-bg);
  padding: 1rem;
  border-radius: var(--radius, 0.5rem);
  overflow-x: auto;
}
.docs-content pre code {
  background-color: transparent;
  padding: 0;
}
.docs-content blockquote {
  border-left: 3px solid var(--brand, #6c757d);
  padding-left: 1rem;
  color: var(--bs-secondary-color);
}
.docs-content table {
  width: 100%;
}

.tour-highlight {
  position: relative;
  z-index: 1056;
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: outline-color 0.2s ease;
}

.tour-panel {
  position: fixed;
  z-index: 1057;
  max-width: 320px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
}

/* ----- Marketing / onboarding page components ----- */
.ara-hero {
  background: var(--hero-bg);
  padding: 5rem 1.5rem;
  color: #fff;
}

.ara-hero-inner {
  max-width: 1100px;
  margin: auto;
  display: flex;
  gap: 3rem;
  align-items: center;
  flex-wrap: wrap;
}

.ara-hero-text {
  flex: 1 1 340px;
}

.ara-hero-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: #fff;
}

.ara-hero-text p {
  font-size: 1.1rem;
  color: var(--hero-text);
  margin-bottom: 1.75rem;
  max-width: 480px;
}

.ara-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-light);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.ara-hero-accent {
  color: var(--brand-light);
}

.ara-hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ara-hero-media {
  flex: 1 1 340px;
  text-align: center;
}

.ara-hero-media img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.ara-media-placeholder {
  background: rgba(255, 255, 255, 0.07);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.875rem;
  text-align: center;
}

.ara-props {
  background: #f3f7f5;
  padding: 4rem 1.5rem;
}

.ara-props-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: auto;
}

.ara-prop-card {
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--brand-light);
}

.ara-prop-card i {
  font-size: 1.75rem;
  color: var(--brand);
  display: block;
  margin-bottom: 0.75rem;
}

.ara-prop-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.ara-prop-card p {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
}

.ara-section {
  padding: 4rem 1.5rem;
}

.ara-section-inner {
  max-width: 1100px;
  margin: auto;
}

.ara-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.ara-section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
}

.ara-section-header p {
  color: #555;
  max-width: 520px;
  margin: 0.5rem auto 0;
}

.ara-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: auto;
}

.ara-step {
  text-align: center;
  padding: 1.5rem 1rem;
}

.ara-step-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-light);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.ara-step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.ara-step p {
  font-size: 0.875rem;
  color: #555;
  margin: 0;
}

.ara-split {
  display: flex;
  gap: 3rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: auto;
}

.ara-split-text {
  flex: 1 1 300px;
}

.ara-split-media {
  flex: 1 1 300px;
  text-align: center;
}

.ara-split-media img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ara-cta-banner {
  background: var(--hero-bg);
  padding: 3.5rem 1.5rem;
  text-align: center;
  color: #fff;
}

.ara-cta-banner h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.ara-cta-banner p {
  color: var(--hero-text);
  margin-bottom: 1.5rem;
}

.ara-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.ara-feature-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(var(--brand-rgb), 0.1);
}

.ara-feature-card i {
  font-size: 1.5rem;
  color: var(--brand);
  display: block;
  margin-bottom: 0.6rem;
}

.ara-feature-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.ara-feature-card p {
  font-size: 0.875rem;
  color: #555;
  margin: 0;
}

.ara-page-hero {
  background: var(--hero-bg);
  padding: 3.5rem 1.5rem;
  text-align: center;
  color: #fff;
}

.ara-page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.ara-page-hero p {
  color: var(--hero-text);
  max-width: 560px;
  margin: 0 auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(var(--brand-rgb), 0.15);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.pricing-card.featured {
  border-top: 4px solid var(--brand-light);
  box-shadow: var(--shadow);
}

.pricing-card .pricing-tier {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.pricing-card .pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: #111;
}

.pricing-card .pricing-price sup {
  font-size: 1rem;
  vertical-align: super;
  font-weight: 500;
}

.pricing-card .pricing-price sub {
  font-size: 0.875rem;
  font-weight: 400;
  color: #666;
}

.pricing-card .pricing-desc {
  font-size: 0.875rem;
  color: #666;
  margin: 0.5rem 0 1.25rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;
}

.pricing-features li {
  font-size: 0.9rem;
  padding: 0.4rem 0;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li i {
  color: var(--brand-light);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.pricing-note {
  background: rgba(var(--brand-rgb), 0.06);
  border: 1px solid rgba(var(--brand-rgb), 0.15);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  max-width: 800px;
  margin: 1.5rem auto 0;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #f3f7f5;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  margin: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--surface);
}

.auth-logo-band {
  background: var(--hero-bg);
  padding: 1.5rem;
  text-align: center;
}

.auth-logo-band .auth-logo-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-light);
  letter-spacing: 0.04em;
  display: block;
}

.auth-logo-band .auth-logo-sub {
  font-size: 0.8rem;
  color: var(--hero-text);
  margin-top: 0.15rem;
}

.auth-body {
  padding: 1.75rem;
}

.auth-body h1 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* ----- CSS dashboard mockup widget ----- */
.ara-mockup {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  background: #1a1d21;
  font-size: 0.8rem;
  max-width: 520px;
  width: 100%;
}

.ara-mockup-chrome {
  background: #111;
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ara-mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.ara-mockup-bar {
  flex: 1;
  background: #2a2a2a;
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  color: #666;
  font-size: 0.7rem;
  margin-left: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ara-mockup-body {
  padding: 0.75rem;
}

.ara-mockup-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  color: #e0e0e0;
  font-weight: 600;
  font-size: 0.85rem;
}

.ara-mockup-pill {
  background: rgba(45, 184, 122, 0.15);
  color: #2db87a;
  border-radius: 50rem;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.ara-mockup-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr 0.75fr auto;
  gap: 0.4rem;
  align-items: center;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  color: #ccc;
}

.ara-mockup-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.04);
}

.ara-mockup-name {
  font-weight: 500;
  color: #e8e8e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ara-mockup-source {
  color: #888;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ara-mockup-time {
  color: #666;
  font-size: 0.72rem;
  text-align: right;
}

.ara-mockup-status {
  border-radius: 50rem;
  padding: 0.12rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.ara-mockup-status.new {
  background: rgba(45, 184, 122, 0.15);
  color: #2db87a;
}

.ara-mockup-status.contacted {
  background: rgba(251, 191, 36, 0.15);
  color: #f59e0b;
}

.ara-mockup-status.scheduled {
  background: rgba(156, 163, 175, 0.12);
  color: #9ca3af;
}

.ara-mockup-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0.5rem 0;
}
