/* ==========================================================================
   DajTermin · Google Maps Business Auditor
   Shared design tokens and primitives. Mobile-first, no external assets.
   ========================================================================== */

:root {
  color-scheme: light;

  /* brand */
  --brand: #005ae6;
  --brand-dark: #0b3fa0;
  --brand-soft: #e8f0fe;

  /* ink scale */
  --ink: #0b1220;
  --ink-2: #26334a;
  --muted: #5a6b80;
  --muted-2: #8795a8;

  /* surfaces */
  --bg: #f4f7fb;
  --surface: #ffffff;
  --line: #dde5f0;
  --line-2: #c8d4e3;

  /* semantic */
  --good: #12b76a;
  --good-soft: #e6f8ef;
  --warn: #f79009;
  --warn-soft: #fff4e5;
  --bad: #f04438;
  --bad-soft: #fdeceb;

  /* geometry */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(11, 18, 32, 0.05);
  --shadow-sm: 0 1px 3px rgba(11, 18, 32, 0.06), 0 12px 26px -22px rgba(11, 18, 32, 0.45);
  --shadow-md: 0 24px 60px -40px rgba(11, 18, 32, 0.45);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --pad-x: 16px;
  --wrap: 1040px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(1200px 480px at 50% -180px, #e6eefc 0%, rgba(244, 247, 251, 0) 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(0, 90, 230, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Accessibility helpers
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  transition: top 0.18s var(--ease);
}

.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 247, 251, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(221, 229, 240, 0.9);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px var(--pad-x);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 14px -8px rgba(0, 90, 230, 0.9);
}

.brand__name {
  font-size: 17px;
}

.topbar__aside {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Primitives
   -------------------------------------------------------------------------- */

.kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.link {
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: progress;
  opacity: 0.8;
  transform: none;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 26px -16px rgba(0, 90, 230, 0.85);
}

.btn--primary:hover {
  background: var(--brand-dark);
}

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
}

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

.btn--block {
  width: 100%;
}

.btn--loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.chip--neutral {
  background: #eef2f8;
  color: var(--ink-2);
}

/* grade chips, one modifier per Grade value */
.grade--excellent {
  background: var(--good-soft);
  color: #067647;
}

.grade--good {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.grade--average {
  background: var(--warn-soft);
  color: #b54708;
}

.grade--critical {
  background: var(--bad-soft);
  color: #b42318;
}

/* --------------------------------------------------------------------------
   Loading skeleton
   -------------------------------------------------------------------------- */

.skeleton {
  background: linear-gradient(90deg, #e8eef7 20%, #f2f7fd 40%, #e8eef7 60%);
  background-size: 300% 100%;
  border-radius: var(--r-xs);
  animation: shimmer 1.5s linear infinite;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -20% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 640px) {
  :root {
    --pad-x: 24px;
  }
}

@media (min-width: 900px) {
  :root {
    --pad-x: 32px;
  }
}

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