/* base.css — დიზაინ-სისტემა: ცვლადები, ტიპოგრაფია, ბადე, კომპონენტები.
   ⚠️ ფერი პირდაპირ კომპონენტში არასდროს — მხოლოდ var(--). */

:root {
    /* ფერები */
    --ink:    #0B1220;   /* მუქი navy — ჰერო, სქემა, ფუტერი */
    --paper:  #FAFBFC;   /* ღია ფონი */
    --white:  #FFFFFF;   /* ბარათები */
    --brand:  #00A879;   /* SAIS ტეალი — ღილაკები, აქცენტი */
    --brand-d:#008762;   /* hover */
    --amber:  #E0A028;   /* მხოლოდ სტატუს-ბეჯზე */
    --text:   #18202C;
    --muted:  #4E5768;   /* დამუქდა (იყო #6A7484) — კითხვადობა პატარა შრიფტზეც */
    --line:   rgba(24, 32, 44, .12);

    /* მუქ ფონზე */
    --on-ink:       #EEF2F7;
    --on-ink-muted: #B9C3D1;   /* ოდნავ გაანათდა — კონტრასტი მუქ ფონზე */
    --on-ink-err:   #FF9B93;   /* შეცდომა/სავალდებულო ნიშანი მუქ სექციაში */
    --on-ink-line:  rgba(255, 255, 255, .16);

    /* spacing (4/8 ბიჯი) */
    --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
    --s5: 48px; --s6: 64px; --s7: 96px;

    /* რადიუსი */
    --r-btn:  8px;
    --r-card: 16px;

    /* კონტეინერი */
    --container: 1200px;
    --pad: 24px;

    --shadow-sm: 0 1px 2px rgba(11, 18, 32, .06);
    --shadow:    0 4px 20px rgba(11, 18, 32, .07);
    --shadow-lg: 0 12px 40px rgba(11, 18, 32, .12);
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body {
    margin: 0;
    font-family: 'Noto Sans Georgian', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-d); text-decoration: underline; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 var(--s2); }
h1, h2, h3, h4 {
    font-family: 'Noto Serif Georgian', Georgia, serif;
    font-weight: 700;
    line-height: 1.18;
    margin: 0 0 var(--s2);
    color: var(--text);
}
h1 { font-size: clamp(30px, 5.2vw, 52px); line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: clamp(25px, 3.6vw, 36px); }
h3 { font-size: 19px; line-height: 1.3; }
button { font: inherit; color: inherit; }

/* ── ხილული focus (კლავიატურა) ── */
:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}
.section-dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--on-ink); }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--white); color: var(--text);
    padding: 12px 20px; border-radius: var(--r-btn); box-shadow: var(--shadow);
}
.skip-link:focus { left: var(--s2); top: var(--s2); }

/* ── ლეიაუტი ── */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }
.container-narrow { max-width: 880px; }

/* სექციების რიტმი: თეთრი → ოდნავ შეფერილი → თეთრი → მუქი.
   ადრე .section-alt თეთრი იყო body-ის #FAFBFC-ზე — სხვაობა თვალით არ ჩანდა. */
.section { padding: var(--s6) 0; background: var(--white); }
.section-alt  { background: #EFF3F7; border-block: 1px solid var(--line); }
@supports (background: color-mix(in srgb, red 5%, blue)) {
    .section-alt { background: color-mix(in srgb, var(--brand) 5%, #EDF1F5); }
}
.section-dark { background: var(--ink); color: var(--on-ink); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--on-ink); }
.section-dark .section-lead, .section-dark .card-t { color: var(--on-ink-muted); }
.section-dark a { color: var(--white); }

.eyebrow {
    font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: var(--brand); margin: 0 0 var(--s1);
}
.section-h { margin-bottom: var(--s2); }
.section-lead { font-size: 17px; color: var(--muted); max-width: 62ch; margin-bottom: var(--s5); }
.sub-h { font-size: 22px; margin: var(--s6) 0 var(--s3); }

/* ── ბადე ── */
.grid { display: grid; gap: var(--s3); grid-template-columns: 1fr; }
@media (min-width: 640px)  { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ── ღილაკები ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 11px 22px;
    border: 1px solid transparent; border-radius: var(--r-btn);
    font-weight: 600; font-size: 15px; line-height: 1.2;
    cursor: pointer; text-decoration: none;
    transition: background-color .18s, border-color .18s, color .18s, transform .18s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-d); color: var(--white); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.section-dark .btn-ghost { color: var(--on-ink); border-color: var(--on-ink-line); }
.section-dark .btn-ghost:hover { border-color: var(--on-ink); color: var(--white); }

/* ── ბარათი ── */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: var(--s3);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card-sm { padding: 20px; }
.card-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-bottom: var(--s2);
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    color: var(--brand);
}
.card-h { font-size: 17px; line-height: 1.3; margin-bottom: 8px; }
.card-t { color: var(--muted); font-size: 14.5px; margin: 0; }
.section-dark .card { background: rgba(255, 255, 255, .05); border-color: var(--on-ink-line); box-shadow: none; }

/* ── ბეჯი ── */
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 15px; border-radius: 999px;
    font-size: 13.5px; font-weight: 600; line-height: 1.4;
    border: 1px solid var(--line); background: var(--white); color: var(--text);
}
.badge-amber {
    border-color: color-mix(in srgb, var(--amber) 45%, transparent);
    background: color-mix(in srgb, var(--amber) 12%, transparent);
    color: #6B4A05;
}
.badge-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--amber); flex-shrink: 0;
}

/* ── სტატისტიკა ── */
.stat { padding: var(--s3) 0; }
.stat-value {
    font-family: 'Noto Serif Georgian', Georgia, serif;
    font-size: clamp(22px, 3vw, 28px); font-weight: 700;
    color: var(--brand); line-height: 1.2; margin-bottom: 6px;
}
.stat-label { font-size: 14px; color: var(--muted); }

/* ── სიები ── */
.list-check li {
    display: flex; gap: 10px; align-items: flex-start;
    margin-bottom: 10px; font-size: 14.5px; color: var(--muted);
}
.list-check li .ic { flex-shrink: 0; margin-top: 3px; color: var(--brand); }
.list-num { counter-reset: n; }
.list-num li {
    counter-increment: n; position: relative;
    padding-left: 34px; margin-bottom: 12px;
    font-size: 14.5px; color: var(--muted);
}
.list-num li::before {
    content: counter(n, decimal-leading-zero);
    position: absolute; left: 0; top: 0;
    font-weight: 700; font-size: 12.5px; color: var(--brand);
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    width: 24px; height: 24px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ── შეტყობინებები ── */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 14px 18px; border-radius: var(--r-btn);
    margin-bottom: var(--s3); font-size: 14.5px;
    border: 1px solid;
}
.alert .ic { flex-shrink: 0; margin-top: 2px; }
.alert-ok  { background: color-mix(in srgb, var(--brand) 14%, transparent); border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--on-ink); }
.alert-err { background: rgba(214, 69, 69, .14); border-color: rgba(214, 69, 69, .45); color: #FFD9D9; }

/* ── ჰედერი ── */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark { color: var(--brand); display: inline-flex; }
.brand-text { font-family: 'Noto Serif Georgian', Georgia, serif; font-size: 18px; letter-spacing: -.01em; }

.nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line);
    background: var(--white); border-radius: var(--r-btn); cursor: pointer;
}
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline-flex; }

.nav-menu {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: var(--s2) var(--pad) var(--s3);
    box-shadow: var(--shadow);
}
.nav-menu.is-open { display: block; }
.nav-list { display: flex; flex-direction: column; }
.nav-list a {
    display: block; padding: 12px 4px; min-height: 44px;
    color: var(--text); font-weight: 600; font-size: 15px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;   /* პუნქტი ორ ხაზად აღარ იშლება */
}
.nav-list a:hover { color: var(--brand); text-decoration: none; }
.nav-cta { margin-top: var(--s2); width: 100%; }

@media (min-width: 1024px) {
    .nav-toggle { display: none; }
    .nav-menu {
        display: flex !important; align-items: center; gap: var(--s2);
        position: static; background: none; border: 0; padding: 0; box-shadow: none;
    }
    .nav-list { flex-direction: row; gap: 2px; }
    .nav-list a { border: 0; padding: 8px 9px; font-size: 14px; border-radius: 6px; }
    .nav-list a:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
    .nav-cta { margin: 0; width: auto; }
}
/* 1024–1200: ვიწრო დიაპაზონი — რიგი რომ არ გადაიტვირთოს */
@media (min-width: 1024px) and (max-width: 1200px) {
    .nav-list a { padding: 8px 7px; font-size: 13.5px; }
    .nav-menu { gap: var(--s1); }
    .brand-text { font-size: 16px; }
}

/* ── ფუტერი ── */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding-top: var(--s6); }
.site-footer .brand-text, .footer-h { color: var(--on-ink); }
.footer-inner { display: grid; gap: var(--s4); grid-template-columns: 1fr; padding-bottom: var(--s5); }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 1.6fr 1fr 1.2fr; gap: var(--s5); } }
.footer-h { font-family: 'Noto Sans Georgian', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--s2); }
.footer-note { font-size: 14px; max-width: 40ch; margin-top: var(--s2); }
.footer-list li { margin-bottom: 9px; font-size: 14px; }
.footer-list a { color: var(--on-ink-muted); }
.footer-list a:hover { color: var(--white); }
.footer-req li { line-height: 1.55; }
.footer-bottom { border-top: 1px solid var(--on-ink-line); padding-block: var(--s3); }
.footer-bottom p { margin: 0; font-size: 13.5px; }

/* ── scroll reveal (მხოლოდ JS-ის დროს) ── */
.js [data-reveal] { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1 !important; transform: none !important; } }
