/* vidkov: the shared visual language.
 *
 * Deliberately not the default "AI landing page" look. The things that read as machine-made are a
 * violet-to-cyan gradient on everything, glass panels, 24px corner radii, one enormous centred
 * column, and a shadow under every card. This uses instead: a single ink-and-green palette taken
 * from the product's own OLX context, corners that stay small, hairline borders doing the work that
 * shadows usually do, a real typographic scale rather than three sizes, and left-aligned text at a
 * measure people can actually read.
 *
 * Everything is self-hosted. No webfont, no icon CDN, no analytics script.
 */

:root {
  /* Ink: a warm near-black, never pure #000, which looks harsh on white and cheap on screens. */
  --ink-900: #10231f;
  --ink-800: #1c332e;
  --ink-700: #33514a;
  --ink-600: #4d6a63;
  --ink-500: #6b8580;
  --ink-400: #93a8a3;
  --ink-300: #c2d0cc;
  --ink-200: #e0e8e6;
  --ink-100: #eff4f2;
  --ink-50:  #f7faf9;

  /* One accent, from the existing product colour. Used for action, never for decoration. */
  --green-700: #0a6b5c;
  --green-600: #0d8271;
  --green-500: #109383;
  --green-100: #d9f0ec;
  --green-50:  #eefaf7;

  --amber-600: #a16207;
  --amber-100: #fef3c7;
  --red-600:   #b4232a;
  --red-100:   #fdeaea;

  --page: #ffffff;
  --surface: #ffffff;
  --surface-sunken: var(--ink-50);
  --line: var(--ink-200);
  --line-strong: var(--ink-300);

  /* A real scale (1.25 minor third), so headings relate to each other instead of being picked. */
  --step--1: clamp(0.82rem, 0.80rem + 0.10vw, 0.88rem);
  --step-0:  clamp(1.00rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1:  clamp(1.20rem, 1.14rem + 0.30vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.34rem + 0.55vw, 1.80rem);
  --step-3:  clamp(1.80rem, 1.58rem + 1.10vw, 2.60rem);
  --step-4:  clamp(2.20rem, 1.80rem + 2.00vw, 3.60rem);

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;

  /* Small radii read as considered; large ones read as a template. */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
          'Liberation Sans', sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --measure: 62ch;
  --shell: 1080px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-800);
  background: var(--page);
  /* Kerning and ligatures on: the cheapest thing that separates typeset from typed. */
  font-feature-settings: 'kern' 1, 'liga' 1;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink-900);
  line-height: 1.15;
  letter-spacing: -0.018em;
  font-weight: 640;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.028em; }
h2 { font-size: var(--step-3); letter-spacing: -0.022em; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.35em; max-width: var(--measure); }
li { margin-bottom: 0.35em; }
li::marker { color: var(--ink-400); }

a { color: var(--green-700); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--green-600); }

small, .small { font-size: var(--step--1); color: var(--ink-600); }
strong { font-weight: 620; color: var(--ink-900); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-7) 0; }

img, svg, video { max-width: 100%; height: auto; }

/* Focus is visible everywhere. A keyboard user must never have to guess where they are. */
:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--green-100); color: var(--ink-900); }

/* ---------------------------------------------------------------- layout */

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--space-5); }
.shell-narrow { max-width: 720px; }

.section { padding: var(--space-8) 0; }
.section-sunken { background: var(--surface-sunken); border-block: 1px solid var(--line); }

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

.row { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: var(--space-4); align-items: center; justify-content: space-between; flex-wrap: wrap; }

.grid { display: grid; gap: var(--space-5); }
@media (min-width: 700px)  { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 700px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------------- eyebrow + lede */

.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: var(--space-3);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-700);
  max-width: 54ch;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--green-600);
  --btn-fg: #fff;
  --btn-border: var(--green-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 46px;
  padding: 0 var(--space-5);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 560;
  font-size: var(--step-0);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
/* Two things have to be true at once here, and each one breaks the other if done alone.

   `a:hover` on line 101 is specificity (0,1,1) and beats `.btn`'s own `color: var(--btn-fg)` at
   (0,1,0). So a hovered button MUST restate `color` at (0,2,0) or every button turns link-green.
   But restating it as a literal (`color:#fff`, as it was) also beats the `--btn-fg` that the quiet
   and secondary variants set for themselves, so those went white on pale grey and vanished.

   Restating it as `var(--btn-fg)` satisfies both: high enough to outrank `a:hover`, while the value
   still comes from whichever variant rule set it last. */
.btn:hover { --btn-bg: var(--green-700); --btn-border: var(--green-700); --btn-fg: #fff; color: var(--btn-fg); }
.btn:active { transform: translateY(0.5px); }

.btn-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--ink-800);
  --btn-border: var(--line-strong);
}
.btn-secondary:hover { --btn-bg: var(--ink-100); --btn-border: var(--ink-400); --btn-fg: var(--ink-900); }

.btn-quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink-700);
  --btn-border: transparent;
  padding: 0 var(--space-3);
}
.btn-quiet:hover { --btn-bg: var(--ink-100); --btn-fg: var(--ink-900); }

.btn-lg { min-height: 54px; padding: 0 var(--space-6); font-size: var(--step-1); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------------------------------------------------------------- surfaces */

/* A hairline, not a shadow. Shadows on every card is the single clearest tell of a template. */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.card-flush { padding: 0; overflow: hidden; }
.card-accent { border-color: var(--green-500); }

.note {
  border-left: 3px solid var(--green-500);
  background: var(--green-50);
  padding: var(--space-4) var(--space-5);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.note-warn { border-left-color: var(--amber-600); background: var(--amber-100); }
.note-bad  { border-left-color: var(--red-600);   background: var(--red-100); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 560;
  background: var(--ink-100);
  color: var(--ink-700);
  border: 1px solid var(--line);
}
.pill-good { background: var(--green-50); color: var(--green-700); border-color: var(--green-100); }
.pill-warn { background: var(--amber-100); color: var(--amber-600); border-color: #fde68a; }
.pill-bad  { background: var(--red-100);   color: var(--red-600);   border-color: #f8caca; }

/* ---------------------------------------------------------------- forms */

.field { display: block; margin-bottom: var(--space-4); }
.field > label,
.label {
  display: block;
  font-size: var(--step--1);
  font-weight: 580;
  color: var(--ink-800);
  margin-bottom: 6px;
}
.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px var(--space-4);
  font: inherit;
  font-size: var(--step-0);
  color: var(--ink-900);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px var(--green-100);
}
.input[aria-invalid="true"] { border-color: var(--red-600); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--red-100); }
.textarea { min-height: 120px; resize: vertical; }

.hint { font-size: var(--step--1); color: var(--ink-600); margin-top: 6px; }
.error-text { font-size: var(--step--1); color: var(--red-600); margin-top: 6px; font-weight: 540; }

/* ---------------------------------------------------------------- header + footer */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .shell { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 62px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 680;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  text-decoration: none;
}
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--green-600);
  color: #fff;
  font-size: 14px;
}

.site-nav { display: flex; align-items: center; gap: var(--space-1); }
.site-nav a { color: var(--ink-700); text-decoration: none; font-size: var(--step--1); font-weight: 520; padding: 8px 10px; border-radius: var(--radius-sm); }
.site-nav a:hover { color: var(--ink-900); background: var(--ink-100); }
.site-nav a[aria-current="page"] { color: var(--green-700); }
@media (max-width: 760px) { .site-nav .nav-hide-sm { display: none; } }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-sunken);
  padding: var(--space-7) 0 var(--space-6);
  font-size: var(--step--1);
  color: var(--ink-600);
}
.site-footer a { color: var(--ink-700); text-decoration: none; }
.site-footer a:hover { color: var(--green-700); text-decoration: underline; }
.footer-cols { display: grid; gap: var(--space-5); }
@media (min-width: 760px) { .footer-cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-cols h4 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-500); margin-bottom: var(--space-3); font-weight: 600; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 6px; }

/* ---------------------------------------------------------------- legal + long-form pages */

.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin-top: var(--space-7); margin-bottom: var(--space-3); }
.prose h3 { font-size: var(--step-1); margin-top: var(--space-5); margin-bottom: var(--space-2); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-700); }

.toc { position: sticky; top: 84px; align-self: start; font-size: var(--step--1); }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 8px; }
.toc a { color: var(--ink-600); text-decoration: none; }
.toc a:hover { color: var(--green-700); }
@media (min-width: 900px) {
  .with-toc { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-8); }
}
@media (max-width: 899px) { .toc { display: none; } }

.doc-meta { font-size: var(--step--1); color: var(--ink-500); margin-bottom: var(--space-6); }

/* ---------------------------------------------------------------- utility */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink-900); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

.text-muted { color: var(--ink-600); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

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