/* ============================================================
   Addis Tags — modern mobile-first theme
   Layered on top of Bootstrap 5; loaded after bootstrap.min.css
   ============================================================ */

:root {
  --at-bg: #fafaf7;
  --at-surface: #ffffff;
  --at-surface-2: #f3f4f1;
  --at-ink: #0f0f10;
  --at-ink-soft: #2a2a2e;
  --at-muted: #6b6b70;
  --at-line: #e6e6e2;
  --at-accent: #111827;
  --at-accent-soft: #f3f4f6;
  --at-danger: #c0392b;
  --at-success: #1f7a4d;
  --at-warning: #c8881a;

  --at-radius-sm: 10px;
  --at-radius: 14px;
  --at-radius-lg: 20px;

  --at-shadow-sm: 0 1px 2px rgba(15, 15, 16, .05);
  --at-shadow: 0 1px 2px rgba(15, 15, 16, .04), 0 8px 24px rgba(15, 15, 16, .06);
  --at-shadow-lg: 0 2px 4px rgba(15, 15, 16, .04), 0 18px 40px rgba(15, 15, 16, .10);

  --at-font-display: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --at-font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --at-font-mono: 'Courier Prime', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html, body {
  background: var(--at-bg);
  color: var(--at-ink);
  font-family: var(--at-font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Push footer to bottom */
body > nav.navbar { flex: 0 0 auto; }
body > main, body > .at-main, body > div:not(.at-stage-banner):not(.modal):not(footer):not(nav) { flex: 1 0 auto; }
body > footer { flex: 0 0 auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--at-font-display);
  color: var(--at-ink);
  letter-spacing: -0.01em;
  font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 4vw + 1rem, 3rem); line-height: 1.1; }
h2 { font-size: clamp(1.4rem, 2vw + 1rem, 2.25rem); line-height: 1.15; }
h3 { font-size: clamp(1.15rem, 1vw + 1rem, 1.5rem); line-height: 1.25; }

p { color: var(--at-ink-soft); }
.text-muted, .text-secondary { color: var(--at-muted) !important; }

a { color: var(--at-ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--at-accent); }

.at-mono, code, kbd, samp { font-family: var(--at-font-mono); }

/* ---- Stage banner -------------------------------------- */
.at-stage-banner {
  background: #fff7d6;
  color: #5a4500;
  border-bottom: 1px solid #f0e1a3;
  padding: .5rem 1rem;
  text-align: center;
  font-size: .875rem;
}
.at-stage-banner a { color: inherit; font-weight: 600; }

/* ---- Navbar -------------------------------------------- */
.navbar {
  background: var(--at-surface);
  border-bottom: 1px solid var(--at-line);
  padding-top: .5rem;
  padding-bottom: .5rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar .navbar-brand {
  font-family: var(--at-font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.navbar .navbar-brand .fs-3 { font-size: 1.25rem !important; }
.navbar .nav-link {
  color: var(--at-ink-soft);
  font-weight: 500;
  text-decoration: none;
}
.navbar .nav-link:hover { color: var(--at-accent); }
.navbar .btn { white-space: nowrap; }

/* ---- Buttons ------------------------------------------- */
.btn {
  font-family: var(--at-font-display);
  font-weight: 600;
  border-radius: 999px;
  padding: .65rem 1.25rem;
  min-height: 44px;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--at-accent) 35%, transparent);
  outline-offset: 2px;
}
.btn-lg { padding: .85rem 1.5rem; min-height: 52px; font-size: 1rem; }

.btn-dark, .btn-primary {
  background: var(--at-accent);
  border-color: var(--at-accent);
  color: #fff;
}
.btn-dark:hover, .btn-primary:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.btn-outline-dark {
  background: var(--at-surface);
  color: var(--at-ink);
  border: 1px solid var(--at-line);
}
.btn-outline-dark:hover {
  background: var(--at-accent-soft);
  color: var(--at-ink);
  border-color: var(--at-line);
}
.btn-outline-secondary {
  border-color: var(--at-line);
  color: var(--at-ink-soft);
}

.btn-outline-danger { border-color: var(--at-line); color: var(--at-danger); }
.btn-outline-danger:hover { background: var(--at-danger); border-color: var(--at-danger); color: #fff; }

.btn-success { background: var(--at-success); border-color: var(--at-success); }
.btn-danger { background: var(--at-danger); border-color: var(--at-danger); }

/* ---- Forms --------------------------------------------- */
.form-control, .form-select {
  border-radius: var(--at-radius-sm);
  border: 1px solid var(--at-line);
  background: var(--at-surface);
  min-height: 48px;
  font-size: 1rem;
  padding: .65rem .85rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--at-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--at-accent) 15%, transparent);
}
.form-control-lg, .form-select-lg {
  font-size: 1.05rem;
  min-height: 56px;
  padding: .85rem 1rem;
}
.form-label {
  font-family: var(--at-font-display);
  font-weight: 600;
  color: var(--at-ink);
  margin-bottom: .35rem;
}

/* ---- Cards / surfaces --------------------------------- */
.at-card,
#cardEntrada-2 {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-lg);
  box-shadow: var(--at-shadow);
  padding: clamp(1rem, 2vw + .5rem, 1.75rem);
}

/* override the inline `border-style: solid` on existing cards */
#cardEntrada-2 {
  border-style: solid !important;
  border-color: var(--at-line);
  border-width: 1px;
}

/* ---- Hero (home page) --------------------------------- */
.at-hero {
  padding: clamp(2rem, 4vw + 1rem, 4rem) 0 clamp(2.5rem, 5vw + 1rem, 5rem);
}
.at-hero h1 {
  text-transform: none;
  font-weight: 800;
  margin-bottom: 1rem;
}
.at-hero .at-hero-lede {
  font-size: clamp(1rem, .5vw + .9rem, 1.2rem);
  color: var(--at-ink-soft);
  max-width: 38ch;
  margin-bottom: 1.5rem;
}
.at-hero-search {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  padding: 1rem;
  box-shadow: var(--at-shadow);
}
.at-hero-search label {
  font-family: var(--at-font-display);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--at-muted);
  display: block;
  margin-bottom: .5rem;
}
.at-hero-search-row {
  display: flex;
  gap: .5rem;
  flex-direction: column;
}
@media (min-width: 480px) {
  .at-hero-search-row { flex-direction: row; }
  .at-hero-search-row .form-control { flex: 1 1 auto; }
}

/* ---- "How it works" steps ----------------------------- */
.at-steps { display: grid; gap: 1rem; }
@media (min-width: 576px) { .at-steps { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }
@media (min-width: 992px) { .at-steps { grid-template-columns: repeat(4, 1fr); } }

.at-step {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  position: relative;
}
.at-step-num {
  font-family: var(--at-font-display);
  font-weight: 700;
  font-size: .8rem;
  color: var(--at-muted);
  letter-spacing: .12em;
}
.at-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--at-accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--at-ink);
}
.at-step h3 { font-size: 1.1rem; margin: 0; }
.at-step p { font-family: var(--at-font-body); font-size: .95rem; margin: 0; color: var(--at-ink-soft); }

/* override existing inline icon style on home page */
#howitworks .bs-icon { background: transparent !important; }

/* ---- Section helpers ---------------------------------- */
.at-section { padding: clamp(2rem, 4vw + 1rem, 4rem) 0; }
.at-section-title {
  text-align: center;
  margin-bottom: 1.5rem;
}
.at-eyebrow {
  display: inline-block;
  font-family: var(--at-font-display);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--at-muted);
  margin-bottom: .5rem;
}

/* ---- Status badges ------------------------------------ */
.badge.bg-danger { background: var(--at-danger) !important; }
.badge.bg-success { background: var(--at-success) !important; }
.badge {
  border-radius: 999px;
  font-family: var(--at-font-display);
  font-weight: 600;
  letter-spacing: .02em;
}

/* ---- Tables (admin) ----------------------------------- */
.table {
  --bs-table-bg: var(--at-surface);
  border-collapse: separate;
  border-spacing: 0;
}
.table thead th {
  font-family: var(--at-font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--at-muted);
  border-bottom: 1px solid var(--at-line);
  padding: .85rem 1rem;
  background: var(--at-surface-2);
}
.table tbody td, .table tbody th {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--at-line);
  vertical-align: middle;
}
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: var(--at-surface-2); }

/* Mobile: turn admin table into stacked cards */
@media (max-width: 767.98px) {
  .at-table-stack thead { display: none; }
  .at-table-stack, .at-table-stack tbody, .at-table-stack tr, .at-table-stack td, .at-table-stack th { display: block; width: 100%; }
  .at-table-stack tr {
    background: var(--at-surface);
    border: 1px solid var(--at-line);
    border-radius: var(--at-radius);
    margin-bottom: .75rem;
    padding: .75rem 1rem;
  }
  .at-table-stack td, .at-table-stack th {
    border: 0;
    padding: .35rem 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
  }
  .at-table-stack td::before, .at-table-stack th::before {
    content: attr(data-label);
    font-family: var(--at-font-display);
    font-weight: 600;
    text-transform: uppercase;
    font-size: .68rem;
    letter-spacing: .08em;
    color: var(--at-muted);
    flex: 0 0 35%;
  }
}

/* ---- Filter pills ------------------------------------- */
.at-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .35rem;
  background: var(--at-surface-2);
  border-radius: 999px;
}
.at-pills a {
  display: inline-block;
  padding: .45rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--at-font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--at-ink-soft);
}
.at-pills a:hover { color: var(--at-ink); }
.at-pills a.active {
  background: var(--at-surface);
  color: var(--at-ink);
  box-shadow: var(--at-shadow-sm);
}

/* ---- KPI cards (admin stats) -------------------------- */
.at-kpis {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .at-kpis { grid-template-columns: repeat(4, 1fr); } }
.at-kpi {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  padding: 1.1rem 1.25rem;
}
.at-kpi-label {
  font-family: var(--at-font-display);
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--at-muted);
}
.at-kpi-value {
  font-family: var(--at-font-display);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.1;
  margin-top: .25rem;
}

/* ---- Footer ------------------------------------------- */
.at-footer {
  background: var(--at-surface);
  border-top: 1px solid var(--at-line);
  padding: 2rem 0 1.5rem;
  margin-top: 3rem;
}
.at-footer .at-footer-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .at-footer .at-footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
  }
}
.at-footer h5 {
  font-family: var(--at-font-display);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--at-muted);
  margin-bottom: .75rem;
}
.at-footer ul { list-style: none; padding: 0; margin: 0; }
.at-footer ul li { margin-bottom: .35rem; }
.at-footer a {
  color: var(--at-ink-soft);
  text-decoration: none;
}
.at-footer a:hover { color: var(--at-ink); text-decoration: underline; }
.at-footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--at-line);
  color: var(--at-muted);
  font-size: .85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
}

/* ---- Modal polish ------------------------------------- */
.modal-content {
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  box-shadow: var(--at-shadow-lg);
}
.modal-header, .modal-footer { border-color: var(--at-line); }

/* ---- Tag detail page ---------------------------------- */
.at-detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .at-detail-grid { grid-template-columns: 2fr 1fr; }
}

.at-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.at-meta-list li {
  display: flex;
  flex-direction: column;
  padding: .65rem 0;
  border-bottom: 1px dashed var(--at-line);
}
.at-meta-list li:last-child { border-bottom: 0; }
.at-meta-list .at-meta-key {
  font-family: var(--at-font-display);
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--at-muted);
}
.at-meta-list .at-meta-val { font-size: 1rem; word-break: break-word; }

/* ---- Map iframe --------------------------------------- */
.embed-responsive {
  border-radius: var(--at-radius);
  overflow: hidden;
  border: 1px solid var(--at-line);
  aspect-ratio: 16 / 9;
}
.embed-responsive iframe { width: 100%; height: 100%; border: 0; }

/* ---- Reduce motion ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---- Containers -------------------------------------- */
.container { max-width: 1100px; }

/* ---- Util --------------------------------------------- */
.at-divider { height: 1px; background: var(--at-line); margin: 2rem 0; }
.at-tag-code {
  font-family: var(--at-font-mono);
  font-weight: 700;
  letter-spacing: .04em;
  background: var(--at-surface-2);
  padding: .15rem .5rem;
  border-radius: 6px;
  border: 1px solid var(--at-line);
  display: inline-block;
}

/* Drop the legacy 24px Courier Prime look on body text */
.fs-5 { font-family: var(--at-font-body); }

/* ---- Our story page ------------------------------------ */
.at-timeline {
  border-left: 2px solid var(--at-ink);
  padding-left: 1rem;
  margin: 1.5rem 0;
}
.at-timeline-item { margin-bottom: .875rem; }
.at-timeline-item:last-child { margin-bottom: 0; }
.at-timeline-item h3 { font-size: 1rem; margin-bottom: .125rem; }
.at-timeline-item p { font-size: .9375rem; color: var(--at-muted); margin-bottom: 0; }

.at-shop-note {
  border: 1px dashed var(--at-muted);
  border-radius: var(--at-radius);
  padding: .875rem 1rem;
  text-align: center;
  color: var(--at-muted);
  font-weight: 600;
  margin-top: .75rem;
}

/* ---- Facts strip (home) -------------------------------- */
.at-facts {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
  display: flex;
  border-top: 1px solid var(--at-line);
  border-bottom: 1px solid var(--at-line);
  text-align: center;
}
.at-facts li { flex: 1; }
.at-facts li + li { border-left: 1px solid var(--at-line); }
.at-facts strong {
  display: block;
  font-family: var(--at-font-display);
  font-weight: 800;
  font-size: 1.375rem;
  color: var(--at-ink);
}
.at-facts span { font-size: .8125rem; color: var(--at-muted); }
.at-facts-link { text-align: center; padding: .75rem 0 0; margin: 0 0 .5rem; }
.at-facts-link a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .5rem; }
