/* ═══════════════════════════════════════════════════════
   Kärcher Georgia — საახალწლო ვაუჩერი
   ბრენდის ფერები: Yellow #FFDE00 (RAL 1018) · Black #000
   ფონტი: FF Clan Pro (სათაურები) + FiraGO (ქართული)
   ═══════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Clan';
  src: url('/static/fonts/ClanPro-NarrBlack.otf') format('opentype');
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: 'Clan';
  src: url('/static/fonts/ClanPro-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Clan';
  src: url('/static/fonts/ClanPro-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Clan';
  src: url('/static/fonts/ClanPro-Book.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
/* ქართული — FiraGO (Clan-ს ქართული გლიფები არ აქვს) */
@font-face {
  font-family: 'FiraGO';
  src: url('/static/fonts/FiraGO-Book.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'FiraGO';
  src: url('/static/fonts/FiraGO-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --y:        #FFDE00;
  --y-deep:   #F5D000;
  --ink:      #0A0A0A;
  --ink-2:    #1A1A1A;
  --grey:     #6B6B6B;
  --grey-lt:  #9A9A9A;
  --line:     #E4E4E4;
  --paper:    #FFFFFF;
  --bg:       #FAFAFA;
  --radius:   20px;
  --ease:     cubic-bezier(.22, .8, .28, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'FiraGO', 'Clan', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══ თოვლი ═══ */
#snow {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: .85;
}

/* ═══ ჰედერი ═══ */
.hd {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(18px, 5vw, 48px);
}
.logo { display: block; width: clamp(96px, 22vw, 135px); height: auto; }
.hd-badge {
  font-family: 'FiraGO', sans-serif;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  padding: 6px 0 5px;
  border-bottom: 2.5px solid var(--y);
  white-space: nowrap;
}

/* ═══ კონტეინერი ═══ */
.wrap {
  position: relative; z-index: 2;
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(8px, 2vh, 24px) clamp(18px, 5vw, 40px) 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══ ეკრანები ═══ */
.screen {
  display: none;
  width: 100%;
  text-align: center;
  animation: scrIn .5s var(--ease) both;
}
.screen.show { display: block; }

@keyframes scrIn {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* ═══ სათაურები ═══ */
.title {
  /* ⚠️ Clan-ს ქართული გლიფები არ აქვს → FiraGO Bold ცალკე */
  font-family: 'FiraGO', sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 10.5vw, 70px);
  line-height: .98;
  letter-spacing: -.028em;
  margin-bottom: 18px;
}
.title .t-l1,
.title .t-l2 { display: block; }
.title .t-l2 {
  color: var(--ink);
  position: relative;
  display: inline-block;
}
/* ყვითელი მარკერის ეფექტი მეორე სიტყვაზე */
.title .t-l2::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%;
  bottom: .07em;
  height: .34em;
  background: var(--y);
  z-index: -1;
  border-radius: 2px;
  transform-origin: left;
  animation: hlIn .7s .25s var(--ease) both;
}
@keyframes hlIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.h2 {
  font-family: 'FiraGO', sans-serif;
  font-size: clamp(26px, 7vw, 38px);
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.lead {
  font-size: clamp(14.5px, 3.5vw, 17px);
  color: var(--ink-2);
  line-height: 1.62;
  max-width: 38ch;          /* ვიწრო ზომა — ბალანსირებული ხაზები */
  margin: 0 auto 28px;
  text-wrap: balance;       /* orphan-ის აღკვეთა */
}
.lead b { font-weight: 700; }

.sub {
  font-size: clamp(13.5px, 3.3vw, 15.5px);
  color: var(--grey);
  margin-bottom: 26px;
}
.sub b { color: var(--ink); font-weight: 700; }

.step {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em;
  color: var(--grey-lt);
  margin-bottom: 14px;
  text-transform: uppercase;
}

/* ═══ ღილაკები ═══ */
.btn {
  --bg: var(--ink);
  --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: clamp(15px, 3.5vw, 16.5px);
  font-weight: 700;
  padding: 16px 30px;
  border: none;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
  box-shadow: 0 6px 20px rgba(0,0,0,.14);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.2); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-primary { --bg: var(--ink); --fg: var(--y); }
.btn-ghost {
  --bg: transparent; --fg: var(--grey);
  box-shadow: none;
  padding: 14px 22px;
  font-weight: 500;
}
.btn-ghost:hover { --fg: var(--ink); background: rgba(0,0,0,.045); box-shadow: none; }

.btn[disabled] { opacity: .45; pointer-events: none; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }
.row-center { justify-content: center; }

/* ═══ ფორმა ═══ */
.form { max-width: 420px; margin: 0 auto; text-align: left; }

.fld { display: block; margin-bottom: 14px; }
.fld-lbl {
  display: block;
  font-size: 12px; font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 7px;
}
.fld input {
  width: 100%;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 15px 17px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none;
}
.fld input::placeholder { color: #B8B8B8; font-weight: 400; }
.fld input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(255,222,0,.42);
}
.fld input.bad {
  border-color: #D92D20;
  box-shadow: 0 0 0 4px rgba(217,45,32,.12);
}

.err {
  font-size: 13px; font-weight: 600;
  color: #D92D20;
  margin: -4px 0 12px;
  padding-left: 2px;
}

/* ═══ ბარათები ═══ */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 2.4vw, 16px);
  margin-bottom: 6px;
}

.card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  font-family: inherit;
  text-align: center;
  padding: 22px 16px 20px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
  box-shadow: 0 3px 14px rgba(0,0,0,.05);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: 0 14px 34px rgba(0,0,0,.13);
}
.card.sel {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--y), 0 14px 34px rgba(0,0,0,.16);
  transform: translateY(-4px);
}
.card.dim { opacity: .42; filter: grayscale(.5); }

.card-glow {
  position: absolute; inset: -40% -40% auto -40%;
  height: 70%;
  background: radial-gradient(circle, rgba(255,222,0,.5), transparent 68%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.card:hover .card-glow, .card.sel .card-glow { opacity: 1; }

.card-logo { height: 30px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.card-logo img { width: 104px; height: auto; display: block; }

.card-logo-uni { gap: 1px; }
.uni-mark, .uni-mark2 {
  font-size: 25px; font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
}
.uni-mark  { color: #F5A623; }
.uni-mark2 { color: #E4002B; }

.card-val {
  font-family: 'Clan', 'FiraGO', sans-serif;
  font-size: clamp(30px, 8.5vw, 40px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: 3px;
}
.card-name {
  font-size: clamp(13px, 3.3vw, 14.5px);
  font-weight: 700;
  margin-bottom: 8px;
}
.card-desc {
  font-size: clamp(11px, 2.7vw, 12.5px);
  line-height: 1.45;
  color: var(--grey);
}

.card-tick {
  position: absolute;
  top: 11px; right: 11px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--ink);
  display: none;
  align-items: center; justify-content: center;
}
.card.sel .card-tick { display: flex; animation: tickIn .3s var(--ease) both; }
.card-tick svg { width: 13px; height: 13px; fill: none; stroke: var(--y); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@keyframes tickIn { from { transform: scale(0); } to { transform: scale(1); } }

/* ═══ დასრულება ═══ */
.done-ico {
  width: 74px; height: 74px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--y);
  display: flex; align-items: center; justify-content: center;
  animation: popIn .5s var(--ease) both;
  box-shadow: 0 10px 30px rgba(255,222,0,.5);
}
.done-ico svg { width: 34px; height: 34px; fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes popIn {
  0%   { transform: scale(.4); opacity: 0; }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.receipt {
  max-width: 400px;
  margin: 26px auto 20px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 4px 20px;
  text-align: left;
  box-shadow: 0 4px 18px rgba(0,0,0,.05);
}
.rc-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.rc-row:last-child { border-bottom: none; }
.rc-row span { color: var(--grey); }
.rc-row b { font-weight: 700; text-align: right; }
.rc-total b { font-size: 19px; color: var(--ink); }

.fine {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--grey-lt);
}

/* ═══ ფუტერი ═══ */
.ft {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 18px 20px 24px;
  font-size: 11.5px;
  color: var(--grey);
}
.ft-dot { opacity: .5; }

/* ═══ დეკორი ═══ */
.deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bauble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.9), var(--y) 42%, var(--y-deep) 100%);
  box-shadow: 0 6px 22px rgba(245,208,0,.4);
  opacity: .5;
  animation: float 9s ease-in-out infinite;
}
.b1 { width: 34px; height: 34px; top: 16%; left: 6%;  animation-delay: 0s; }
.b2 { width: 22px; height: 22px; top: 62%; left: 10%; animation-delay: 1.6s; }
.b3 { width: 46px; height: 46px; top: 30%; right: 7%; animation-delay: 3.1s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-16px) rotate(9deg); }
}

/* ═══ მობილური ═══ */
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .card { flex-direction: row; flex-wrap: wrap; text-align: left; padding: 16px 18px; gap: 2px 14px; align-items: center; }
  .card-logo { height: auto; margin-bottom: 0; flex: 0 0 auto; }
  .card-logo img { width: 84px; }
  .uni-mark, .uni-mark2 { font-size: 21px; }
  .card-val { font-size: 26px; margin: 0 0 0 auto; }
  .card-name { flex: 1 1 100%; margin-bottom: 3px; font-size: 13.5px; }
  .card-desc { flex: 1 1 100%; }
  .card-glow { display: none; }
  .row { flex-direction: column-reverse; }
  .row .btn { width: 100%; }
  .b3 { right: 3%; }
}

/* ═══ reduced motion ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  #snow { display: none; }
  .bauble { display: none; }
}

/* ═══ toast ═══ */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translate(-50%, 20px);
  max-width: min(92vw, 420px);
  padding: 13px 20px;
  background: #1A1A1A;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 13px;
  box-shadow: 0 12px 34px rgba(0,0,0,.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s var(--ease), transform .26s var(--ease);
  z-index: 90;
  text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
