/* მელისთან — პალიტრა 1 „მიწის სითბო" (stage4_final §7.1)
   mobile-first. ჩარჩო არ გამოიყენება. */

:root {
  --primary: #8B5E3C;
  --secondary: #F5EBDD;
  --accent: #D9A441;
  --bg: #FBF7F0;
  --text: #3E2A1E;

  --text-muted: #6B5546;
  --line: #E4D6C4;
  --white: #FFFFFF;

  --wrap: 68rem;
  --narrow: 44rem;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(62, 42, 30, .10);

  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  /* ქვედა ზონის რეზერვი — sticky CTA-სა და consent-ს ერთი და იგივე ადგილი
     უჭირავს, ამიტომ layout არ ხტება (§12.9, CLS <0.1) */
  --bottom-reserve: 0px;
}


*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* anchor-ი sticky header-ის ქვეშ არ უნდა შეიმალოს (§12.6) */
:target { scroll-margin-top: 5.5rem; }

body {
  margin: 0;
  padding-bottom: var(--bottom-reserve);
  font-family: 'FiraGO', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-2); font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 var(--space-2); }
ul, ol { margin: 0 0 var(--space-2); padding-left: 1.2rem; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--text); }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.section__narrow { width: min(100%, var(--narrow)); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--text-muted); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: var(--white); padding: .75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; gap: var(--space-2); }

.wordmark { font-weight: 700; font-size: 1.25rem; color: var(--primary); text-decoration: none; letter-spacing: -.01em; }
.wordmark--footer { margin: 0 0 var(--space-1); }

.nav-toggle { display: flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: .6rem; cursor: pointer; }
.nav-toggle__bar { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

.site-nav { display: none; }
.site-nav[data-open="true"] {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--space-2) 1rem var(--space-3);
}
.site-nav ul { list-style: none; margin: 0 0 var(--space-2); padding: 0; }
.site-nav li + li { margin-top: .25rem; }
.site-nav a { display: block; padding: .6rem 0; text-decoration: none; font-weight: 500; }

@media (min-width: 46rem) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: var(--space-3); }
  .site-nav ul { display: flex; gap: var(--space-3); margin: 0; }
  .site-nav a { padding: 0; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .8rem 1.3rem;
  font: inherit; font-weight: 500; line-height: 1.2;
  border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--accent { background: var(--accent); color: var(--text); }
.btn--accent:hover { background: #c9942f; color: var(--text); }
.btn--outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: var(--white); }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.btn--ghost:hover { background: var(--secondary); }
.btn--lg { padding: 1rem 1.6rem; font-size: 1.05rem; }
.btn--sm { padding: .45rem .9rem; font-size: .9rem; }
.btn--block { width: 100%; }

/* ---------- hero ---------- */

.hero { padding: var(--space-4) 0 var(--space-4); background: linear-gradient(180deg, var(--secondary), var(--bg)); }
.hero__inner { display: grid; gap: var(--space-3); }
.hero__subtitle { font-size: 1.1rem; color: var(--text-muted); }
.hero__where { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--space-3); }

.pill { display: inline-block; padding: .3rem .8rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .9rem; }
.pill--alt { background: var(--accent); border-color: var(--accent); }

.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero__photo { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.hero__photo--placeholder,
.about__photo--placeholder {
  display: grid; place-items: center; aspect-ratio: 4 / 5;
  background: var(--secondary); border: 2px dashed var(--line);
  color: var(--primary); font-size: 1.5rem; font-weight: 700;
}

@media (min-width: 52rem) {
  .hero { padding: var(--space-5) 0; }
  .hero__inner { grid-template-columns: 1.15fr .85fr; align-items: center; gap: var(--space-4); }
  h1 { font-size: 2.6rem; }
}

/* ---------- sections ---------- */

.section { padding: var(--space-4) 0; }
.section--intro, .section--progress, .section--quote { background: var(--secondary); }
.section--closing { background: var(--primary); color: var(--secondary); }
.section--closing h2 { color: var(--white); }
.section--closing .section__lead { color: var(--secondary); }
.section__lead { font-size: 1.05rem; color: var(--text-muted); margin-bottom: var(--space-3); }
.section--page-head { padding-top: var(--space-4); padding-bottom: var(--space-2); }

.link-arrow { font-weight: 500; text-decoration: none; border-bottom: 2px solid var(--accent); }
.link-arrow::after { content: ' →'; }

.badge {
  display: inline-block; padding: .35rem .9rem; border-radius: 999px;
  background: var(--accent); font-size: .9rem; font-weight: 500;
}

/* ---------- cards ---------- */

.cards { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: var(--space-2); }
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--space-2);
}
.card__link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card__title { margin-bottom: .5rem; font-size: 1.1rem; }
.card__text { color: var(--text-muted); margin-bottom: .5rem; }
.card__more { font-weight: 500; color: var(--primary); }
.card__more::after { content: ' →'; }
.card__note { font-size: .9rem; color: var(--text-muted); margin: 0; }

.card--price { text-align: left; }
.price { margin: 0; font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1.1; }
.price__amount { font-size: 2.4rem; }
.price__unit { font-size: .9rem; color: var(--text-muted); margin-bottom: .75rem; }

/* ---------- lists ---------- */

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.8rem; margin-bottom: .6rem; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding-left: 2.6rem; margin-bottom: .9rem; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -.1rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--accent); color: var(--text);
  display: grid; place-items: center; font-weight: 700;
}

/* ---------- progress demo ---------- */

.report { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-2); }
.report__caption { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }
.report__list { list-style: none; margin: 0; padding: 0; }
.report__row { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.report__row:last-child { border-bottom: 0; }
.report__topic { flex: 1; }
.report__state { font-size: .85rem; color: var(--text-muted); white-space: nowrap; }
.dot { width: .8rem; height: .8rem; border-radius: 50%; flex: none; }
.dot--green { background: #4C9A5A; }
.dot--yellow { background: var(--accent); }
.dot--red { background: #C1502E; }

/* ---------- methods page ---------- */

.method--alt { background: var(--secondary); }
.method__index { font-size: .9rem; color: var(--accent); font-weight: 700; margin-bottom: .25rem; }
.method__name { margin-bottom: .5rem; }
.method__summary { font-size: 1.1rem; color: var(--text-muted); margin-bottom: var(--space-2); }
.method__h { margin-top: var(--space-2); font-size: 1rem; color: var(--primary); }
.method__grades { font-size: .9rem; color: var(--text-muted); border-left: 3px solid var(--accent); padding-left: .8rem; }

/* ---------- about ---------- */

.about { display: grid; gap: var(--space-3); }
@media (min-width: 52rem) { .about { grid-template-columns: .8fr 1.2fr; align-items: start; } }
.about__photo { border-radius: var(--radius); box-shadow: var(--shadow); }
.quote { margin: 0; font-size: 1.4rem; font-weight: 500; line-height: 1.45; color: var(--primary); }

/* ---------- contact ---------- */

.channels { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: var(--space-2); }
.channel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-2); }
.channel__link { display: inline-block; font-size: 1.1rem; font-weight: 500; margin-bottom: .4rem; }
.channel__hint { background: var(--secondary); border-radius: 8px; padding: .6rem .8rem; font-size: .95rem; margin-bottom: .5rem; }

.info-block { margin-bottom: var(--space-3); }
.info-block h2 { font-size: 1.1rem; }

/* ---------- faq ---------- */

.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { padding: .9rem 0; cursor: pointer; font-weight: 500; list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::before { content: '+ '; color: var(--primary); font-weight: 700; }
.faq__item[open] .faq__q::before { content: '– '; }
.faq__a { padding-bottom: .75rem; color: var(--text-muted); }

/* ---------- prose / legal ---------- */

.prose p { max-width: 62ch; }

/* ---------- 404 ---------- */

.notfound__code { font-size: 4rem; font-weight: 700; color: var(--accent); line-height: 1; margin: 0; }

/* ---------- footer ---------- */

.site-footer { background: var(--text); color: var(--secondary); padding: var(--space-4) 0 var(--space-2); margin-top: var(--space-4); }
.site-footer a { color: var(--secondary); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer__inner { display: grid; gap: var(--space-3); }
@media (min-width: 46rem) { .site-footer__inner { grid-template-columns: repeat(4, 1fr); } }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer__muted { color: #C9B49E; font-size: .9rem; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: var(--space-3); padding-top: var(--space-2); font-size: .85rem; color: #C9B49E; }

/* ---------- bottom sheet (§12.2) ---------- */

.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(62,42,30,.55); }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg); border-radius: 20px 20px 0 0;
  padding: var(--space-3) 1rem calc(var(--space-3) + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(62,42,30,.3);
}
@media (min-width: 40rem) {
  .sheet__panel { left: 50%; transform: translateX(-50%); width: min(30rem, 100%); border-radius: 20px; bottom: 5vh; }
}
.sheet__grabber { display: block; width: 3rem; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto var(--space-2); }
.sheet__close { position: absolute; top: .6rem; right: .8rem; background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--text-muted); cursor: pointer; padding: .2rem .5rem; }
.sheet__title { font-size: 1.25rem; margin-bottom: .35rem; }
.sheet__lead { color: var(--text-muted); margin-bottom: var(--space-2); }
.sheet__option {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .9rem 1rem; margin-bottom: .6rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit;
}
.sheet__option--primary { background: var(--accent); border-color: var(--accent); }
.sheet__option-name { font-weight: 700; }
.sheet__option-note { font-size: .9rem; color: var(--text-muted); }
.sheet__option--primary .sheet__option-note { color: var(--text); }
.sheet__hint { background: var(--secondary); border-radius: var(--radius); padding: .8rem; margin-bottom: .8rem; }
.sheet__hint-label { font-size: .85rem; color: var(--text-muted); margin-bottom: .3rem; }
.sheet__hint-text { margin-bottom: .5rem; }

/* ---------- sticky CTA + consent (§12.9) ---------- */

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}
.sticky-cta[hidden] { display: none; }
@media (min-width: 46rem) { .sticky-cta { display: none !important; } }

.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: var(--white); border-top: 2px solid var(--primary);
  padding: var(--space-2) 0 calc(var(--space-2) + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(62,42,30,.18);
}
.consent[hidden] { display: none; }
.consent__title { font-size: 1.05rem; margin-bottom: .25rem; }
.consent__text { font-size: .95rem; color: var(--text-muted); margin-bottom: var(--space-2); }
.consent__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.consent__settings { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--line); }
.consent__settings[hidden] { display: none; }
.consent__row { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
@media (min-width: 46rem) {
  .consent__inner { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); align-items: center; }
  .consent__settings { grid-column: 1 / -1; }
}

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  z-index: 70; background: var(--text); color: var(--white);
  padding: .6rem 1.1rem; border-radius: 999px; font-size: .9rem; margin: 0;
}
.toast[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
