/* Shared components used across multiple pages: header, footer, buttons,
   chips, cards, badges, toast. Page-specific CSS files build on top of
   these rather than redefining them. */

/* ---- Site header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
}

.site-logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.site-logo__mark {
  color: var(--brand);
}

.site-nav__spacer {
  flex: 1;
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---- Language switch ---- */

.lang-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.lang-switch__btn {
  border: 0;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  font: 600 13px/1 var(--font-text);
  background: transparent;
  color: var(--muted);
  transition: background 0.25s, color 0.25s;
}

.lang-switch__btn--mono {
  font-family: var(--font-mono);
}

.lang-switch__btn[aria-pressed='true'] {
  background: var(--brand);
  color: var(--brand-ink);
}

/* ---- Theme toggle ---- */

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.4s;
}

.theme-toggle:hover {
  transform: rotate(180deg);
}

.theme-toggle__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
}

.btn-primary:hover {
  color: var(--brand-ink);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 16px;
  padding: 18px 26px;
  font-size: 17px;
}

.btn-accent:hover {
  color: var(--accent-ink);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ghost);
}

.btn-large {
  border-radius: 14px;
  padding: 14px 20px;
  font: 700 16px/1 var(--font-text);
}

/* ---- Chips ---- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font: 600 12px/1 var(--font-mono);
}

.chip-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ghost);
  font-size: 13px;
  color: var(--muted);
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--save);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--save) 22%, transparent);
}

.flag {
  display: flex;
  flex-direction: column;
  width: 6px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
}

.flag i {
  flex: 1;
}

/* ---- Cards ---- */

.card {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.card-sunk {
  border-radius: 32px;
  background: var(--sunk);
}

/* ---- Badges ---- */

.badge {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-save {
  background: color-mix(in srgb, var(--save) 14%, transparent);
  color: var(--save);
}

.badge-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}

/* ---- Eyebrow / section label ---- */

.eyebrow {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Real navigational trail above a page hero, in place of a decorative label
   repeated over every headline. */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font: 500 13px/1 var(--font-mono);
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--ink); }

.breadcrumb__sep { opacity: 0.45; }

.breadcrumb [aria-current] { color: var(--ink); }

/* ---- Toast ---- */

.toast {
  position: fixed;
  left: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.45);
  max-width: min(380px, calc(100vw - 24px));
  font-size: 14px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.5s, transform 0.5s;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast__icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font: 700 15px var(--font-mono);
}

/* ---- Site footer ---- */

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  padding: 32px clamp(16px, 4vw, 48px) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer__copy {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---- Page hero band (v2): the dark band with a lime glow that opens every inner page.
   Fixed dark in both themes, like the landing and compare heroes. ---- */

.phero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0B1A16;
  color: #F3F0E8;
}

.phero::before,
.phero::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.phero::before {
  width: 480px;
  height: 480px;
  right: -80px;
  top: -220px;
  background: #C8F169;
  opacity: 0.34;
  animation: phero-drift 15s ease-in-out infinite alternate;
}

.phero::after {
  width: 420px;
  height: 420px;
  left: -140px;
  bottom: -220px;
  background: #0E5A4C;
  opacity: 0.7;
  animation: phero-drift 19s ease-in-out infinite alternate-reverse;
}

@keyframes phero-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-40px, 30px, 0) scale(1.12); }
}

.phero__inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: clamp(36px, 6vw, 76px);
  padding-bottom: clamp(36px, 6vw, 68px);
}

/* Anything the page already puts in its hero is recoloured for the dark ground. */
.phero .eyebrow { color: #C8F169; letter-spacing: 0.08em; }
.phero :is(h1, h2) { color: #F3F0E8; }
.phero :is(p, .shops-hero__lead, .legal-lead, .contact-intro__text) { color: color-mix(in srgb, #F3F0E8 76%, transparent); }
.phero a:not(.btn) { color: #C8F169; }
.phero .btn-primary { background: #C8F169; color: #0D1F1B; }
.phero .btn-primary:hover { color: #0D1F1B; }
.phero .btn-outline { color: #F3F0E8; border-color: color-mix(in srgb, #F3F0E8 32%, transparent); }
.phero .btn-outline:hover { background: color-mix(in srgb, #F3F0E8 12%, transparent); color: #F3F0E8; }
.phero .font-mono { color: inherit; }

.phero mark {
  display: inline-block;
  padding: 0 0.22em 0.06em;
  border-radius: 0.24em;
  background: #C8F169;
  color: #0D1F1B;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* A hover lift shared by the cards on the inner pages. */
.lift {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s, border-color 0.3s;
}

.lift:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: 0 28px 50px -30px rgba(0, 0, 0, 0.55);
}

html.is-reduced-motion .phero::before,
html.is-reduced-motion .phero::after { animation: none; }
html.is-reduced-motion .lift:hover { transform: none; }

/* ---- Page-transition curtain: a lime sheet that wipes across between pages ---- */

.curtain {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #C8F169;
  color: #0D1F1B;
  pointer-events: none;
  transform: translateX(-101%);
}

.curtain__logo {
  font: 800 clamp(48px, 9vw, 96px)/1 var(--font-text);
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
}

.curtain__logo b { color: #0E5A4C; }

.curtain.is-entering {
  pointer-events: all;
  transform: translateX(0);
  transition: transform 0.26s cubic-bezier(0.7, 0, 0.2, 1);
}

.curtain.is-entering .curtain__logo {
  opacity: 1;
  transform: none;
  transition: opacity 0.15s 0.05s, transform 0.2s 0.05s cubic-bezier(0.16, 1, 0.3, 1);
}

.curtain.is-covering {
  transform: translateX(0);
  transition: none;
}

.curtain.is-covering .curtain__logo { opacity: 1; transform: none; }

.curtain.is-leaving {
  transform: translateX(101%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.curtain.is-leaving .curtain__logo { opacity: 0; transition: opacity 0.25s; }

html.is-reduced-motion .curtain { display: none; }

/* ---- Theme swap: a circle of the new theme grows out of the toggle ---- */

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---- Burst: rings and sparks that fly out of a savings figure ---- */

.fx-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  z-index: 5;
  pointer-events: none;
}

.fx-burst__ring {
  position: absolute;
  left: -30px;
  top: -30px;
  width: 60px;
  height: 60px;
  border: 3px solid #C8F169;
  border-radius: 50%;
  opacity: 0;
  animation: fx-ring 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--d, 0s);
}

.fx-burst__spark {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #C8F169;
  opacity: 0;
  animation: fx-spark 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fx-burst__spark:nth-child(even) { background: var(--brand); }

@keyframes fx-ring {
  from { opacity: 0.9; transform: scale(0.4); }
  to { opacity: 0; transform: scale(5); }
}

@keyframes fx-spark {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--r, 90px)) scale(0.3); }
}

html.is-reduced-motion .fx-burst { display: none; }

/* ---- Coin loader: a lari coin tossed in the air that flips to “?” and back ---- */

.coin {
  position: relative;
  width: 96px;
  height: 150px;
  perspective: 600px;
}

.coin__shadow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 70px;
  height: 12px;
  margin-left: -35px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.2;
  animation: coin-shadow 2.4s ease-in-out infinite;
}

.coin__body {
  position: absolute;
  left: 0;
  bottom: 16px;
  width: 96px;
  height: 96px;
  transform-style: preserve-3d;
  animation: coin-toss 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.coin__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 3px solid #0D1F1B;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E4FB9E, #C8F169 60%, #A9D74B);
  color: #0D1F1B;
  font: 800 44px/1 var(--font-text);
  backface-visibility: hidden;
  box-shadow: inset 0 0 0 7px color-mix(in srgb, #0D1F1B 12%, transparent);
}

.coin__face--back { transform: rotateY(180deg); }

/* Two tosses per loop: ₾ → ? on the first, ? → ₾ on the second. Each rises on an arc, spins half a turn,
   lands with a squash and a small bounce. */
@keyframes coin-toss {
  0% { transform: translateY(0) rotateY(0) scale(1, 1); }
  20% { transform: translateY(-62px) rotateY(90deg) scale(1, 1); }
  40% { transform: translateY(0) rotateY(180deg) scale(1, 1); }
  43% { transform: translateY(0) rotateY(180deg) scale(1.18, 0.82); }
  47% { transform: translateY(-8px) rotateY(180deg) scale(0.97, 1.04); }
  50% { transform: translateY(0) rotateY(180deg) scale(1, 1); }
  70% { transform: translateY(-62px) rotateY(270deg) scale(1, 1); }
  90% { transform: translateY(0) rotateY(360deg) scale(1, 1); }
  93% { transform: translateY(0) rotateY(360deg) scale(1.18, 0.82); }
  97% { transform: translateY(-8px) rotateY(360deg) scale(0.97, 1.04); }
  100% { transform: translateY(0) rotateY(360deg) scale(1, 1); }
}

@keyframes coin-shadow {
  0%, 40%, 50%, 90%, 100% { transform: scale(1); opacity: 0.22; }
  20%, 70% { transform: scale(0.55); opacity: 0.08; }
}

html.is-reduced-motion .coin__body,
html.is-reduced-motion .coin__shadow { animation: none; }

/* Cards that lift also catch a diagonal shine as the pointer arrives. */
.lift { position: relative; overflow: hidden; }

.lift::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, #fff 38%, transparent), transparent);
  transform: skewX(-14deg);
  opacity: 0;
  pointer-events: none;
}

.lift:hover::after { animation: lift-shine 0.9s ease-out 1; }

@keyframes lift-shine {
  0% { left: -60%; opacity: 0; }
  20% { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}

html.is-reduced-motion .lift:hover::after { animation: none; }

/* ---- Header on phones: one tidy row — logo, then language, theme and the main button ---- */
@media (max-width: 600px) {
  .site-nav { gap: 10px; padding: 10px 16px; }
  .site-nav__links { display: none; }
  .site-nav__actions { flex-wrap: nowrap; gap: 6px; }
  .site-nav__actions .btn { padding: 9px 14px; font-size: 13px; }
  .site-logo { font-size: 22px; }
  .lang-switch__btn { padding: 6px 9px; }
  .theme-toggle { width: 36px; height: 36px; }
}
