/* eKlinika site: shared base styles.
   Loaded BEFORE the prebuilt Tailwind stylesheet (assets/css/tailwind.css).
   Tailwind utilities do the heavy lifting in the HTML; this file holds the
   design tokens, accessibility helpers and the few components utilities can't.

   Teal is the app's primary, oklch(0.55 0.15 180), gamut-clipped to sRGB.
   Keep these values in sync with tailwind.config.js. */

:root {
  --teal: #008C75;        /* oklch(0.55 0.15 180) */
  --teal-deep: #00735E;   /* oklch(0.47 0.15 180), hover and pressed */
  --teal-darker: #00584A; /* oklch(0.40 0.10 180), text on tint */
  --teal-50: #E8FAF5;     /* oklch(0.97 0.02 180), tinted backgrounds */
  --teal-100: #DAF6EF;    /* oklch(0.95 0.03 180) */
  --ink: #1a1a1f;
  --paper: #fbfbfc;
  --muted: #6b7280;
  --line: #e5e7eb;
  --font-sans: "Geist", "Geist Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

/* Base canvas. Tailwind's preflight loads after and wins where both set a value. */
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

/* Screen-reader-only utility + skip-link reveal on focus. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.focus\:not-sr-only:focus {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 100;
  width: auto; height: auto;
  margin: 0; padding: 0.625rem 1rem;
  clip: auto; white-space: normal;
  background: var(--teal-deep);
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

/* Visible, consistent focus ring for keyboard users. */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: rgba(0, 140, 117, 0.18); }

/* Honeypot field on the demo form: off-screen for people, present for bots.
   A class, not an inline style, because the CSP blocks inline styles. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Screenshot frame: a quiet border and shadow, no fake browser chrome. */
.shot {
  margin: 0;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 26, 31, 0.04), 0 12px 32px -12px rgba(26, 26, 31, 0.18);
}
.shot figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Small monochrome icons from the inline sprite (templates/partials/icons.php). */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Numbered sections and lists ("01", "02" ...) used by long pages. */
.numbered { counter-reset: step; }
.numbered > li { counter-increment: step; }
.numbered > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--teal-deep);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* === pages: security/pricing/legal (agent B) === */

/* Legal documents (privacy, terms): prose from translation keys. */
.b-legal section + section { margin-top: 2.5rem; }
.b-legal h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.b-legal p,
.b-legal ul { margin: 0.875rem 0 0; color: #3f3f46; line-height: 1.7; }
.b-legal ul { padding-left: 1.25rem; list-style: disc; }
.b-legal li + li { margin-top: 0.375rem; }
.b-legal li::marker { color: var(--teal); }

/* FAQ disclosures: hide the native marker, turn the arrow when open. */
.b-faq summary { list-style: none; }
.b-faq summary::-webkit-details-marker { display: none; }
.b-faq .b-faq-chevron { transform: rotate(90deg); transition: transform 0.15s ease; }
.b-faq details[open] .b-faq-chevron { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) {
  .b-faq .b-faq-chevron { transition: none; }
}

/* Wide data tables scroll inside their wrapper on phones; the wrapper is
   focusable so keyboard users can scroll it too. */
.b-table-scroll { -webkit-overflow-scrolling: touch; }
.b-table-scroll:focus-visible { outline-offset: 0; border-radius: 0.75rem; }
