/* ============================================================
   haribo.agency — mobile candy landing, COLD "snow" theme.
   Mobile-only: content column ≤ 460px, centered (same on desktop).
   Look: frosted glass on an icy gradient, bold cold-navy type,
   blue Telegram CTA. HARIBO red is reserved for the brand logo.
   Compressed to ~1–1.5 screens: hero → 2×2 grid → CTA → footer.
   ============================================================ */

:root {
  --red: #e1001a;            /* HARIBO brand — logo only */
  --blue: #2f8fe6;           /* cold accent / interactive */
  --blue-d: #1f6fc0;
  --tg: #229ED9;
  --tg-d: #1c8bc0;
  --ink: #0e2740;            /* deep cold navy */
  --ink-2: #4f6a84;          /* muted cold gray-blue (WCAG AA on ice bg) */
  --ice: #eaf3fc;            /* page base */
  --ice-deep: #d3e6f8;
  --card: rgba(255, 255, 255, .74);
  --card-solid: #ffffff;
  --line: rgba(20, 50, 90, .10);
  --shadow: 0 18px 38px -20px rgba(20, 60, 110, .42);
  --maxw: 460px;
  --r: 22px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(130% 70% at 50% -8%, #ffffff 0%, var(--ice) 42%, var(--ice-deep) 100%) no-repeat,
    var(--ice);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- snow backdrop (subtle, behind content) ---------- */
.snow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.snow span {
  position: absolute; top: -8%; color: #bcd9f5; opacity: .8;
  font-size: 14px; animation: fall linear infinite;
  text-shadow: 0 1px 3px rgba(120, 170, 220, .4);
}
.snow span:nth-child(1) { left: 8%;  font-size: 13px; animation-duration: 13s; animation-delay: 0s;  }
.snow span:nth-child(2) { left: 26%; font-size: 18px; animation-duration: 17s; animation-delay: -4s; opacity: .6; }
.snow span:nth-child(3) { left: 47%; font-size: 11px; animation-duration: 11s; animation-delay: -2s; }
.snow span:nth-child(4) { left: 66%; font-size: 20px; animation-duration: 19s; animation-delay: -7s; opacity: .55; }
.snow span:nth-child(5) { left: 81%; font-size: 13px; animation-duration: 14s; animation-delay: -1s; }
.snow span:nth-child(6) { left: 92%; font-size: 16px; animation-duration: 16s; animation-delay: -9s; opacity: .65; }
@keyframes fall {
  0%   { transform: translateY(-10vh) translateX(0) rotate(0deg); }
  100% { transform: translateY(112vh) translateX(14px) rotate(360deg); }
}

/* ---------- header (top 80px = triple-tap zone) ---------- */
.hd {
  position: sticky; top: 0; z-index: 30;
  background: rgba(234, 243, 252, .72);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.hd-in {
  max-width: var(--maxw); margin: 0 auto;
  height: 56px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.hd-logo {
  font-weight: 900; font-size: 21px; letter-spacing: .5px; color: var(--red);
  user-select: none;
}
.hd-cart { font-size: 17px; opacity: .5; filter: grayscale(.2); }

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 20px 28px; }

/* ---------- hero (compact) ---------- */
.hero { position: relative; padding: 22px 0 4px; text-align: center; }
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: -10px; left: 50%; transform: translateX(-50%);
  width: 320px; height: 230px;
  background: radial-gradient(60% 60% at 50% 40%, rgba(86, 168, 240, .28), rgba(86, 168, 240, 0) 70%);
  pointer-events: none;
}
.hero-kick {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-d);
  background: rgba(47, 143, 230, .12); padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(47, 143, 230, .16);
}
.hero-h {
  margin: 14px 0 2px;
  font-size: clamp(46px, 16vw, 70px); font-weight: 900; line-height: .9;
  letter-spacing: -.04em;
  background: linear-gradient(180deg, #6fb6f4 0%, #2f8fe6 38%, #14538f 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #1b5fa3;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .8)) drop-shadow(0 6px 14px rgba(31, 111, 192, .28));
}
.hero-slogan {
  margin: 0 0 12px; font-size: 17px; font-weight: 800; color: var(--blue-d);
}
.hero-slogan span { color: var(--ink); }
.hero-sub {
  margin: 0 auto; max-width: 320px;
  font-size: 14px; line-height: 1.5; color: var(--ink-2);
}

/* trust chips */
.trust {
  display: flex; gap: 7px; justify-content: center; flex-wrap: wrap;
  margin-top: 16px;
}
.trust-i {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .9);
  padding: 8px 12px; border-radius: 999px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px -12px rgba(20, 60, 110, .5);
}
.trust-ic { font-size: 13px; }

/* ---------- catalog ---------- */
.cat { margin-top: 24px; }
.cat-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.cat-hd h2 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.cat-hd-note { font-size: 11.5px; color: var(--ink-2); }

.grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 13px;
}
.card {
  position: relative; cursor: pointer;
  background: var(--card); border: 1px solid rgba(255, 255, 255, .85);
  border-radius: var(--r); overflow: hidden;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:active { transform: scale(.975); }
.card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.card-tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: #fff; background: linear-gradient(135deg, #46a0ef, var(--blue-d));
  padding: 4px 9px; border-radius: 999px;
  box-shadow: 0 6px 14px -6px rgba(31, 111, 192, .65);
}
.card-img {
  padding: 8px 6px 0; display: flex; justify-content: center;
  background: linear-gradient(180deg, #ffffff 0%, #e7f1fb 100%);
}
.card-img .bag { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 12px rgba(20, 60, 110, .16)); }
.card-body { padding: 11px 13px 13px; }
.card-name { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.card-sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.card-cta {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 9px; font-size: 13px; font-weight: 800; color: var(--blue-d);
}
.card-cta span { transition: transform .16s ease; }
.card:active .card-cta span { transform: translateX(3px); }

/* ---------- CTA (slim) ---------- */
.cta-sec { margin-top: 22px; }
.tg-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 17px 18px; border: none; cursor: pointer;
  font-size: 16px; font-weight: 800; letter-spacing: .02em; color: #fff;
  text-decoration: none; border-radius: 16px;
  background: linear-gradient(135deg, #2bb2ec 0%, var(--tg) 55%, var(--tg-d) 100%);
  box-shadow: 0 16px 34px -12px rgba(34, 158, 217, .8);
  transition: transform .14s ease, box-shadow .14s ease;
}
.tg-btn:active { transform: translateY(2px) scale(.99); box-shadow: 0 8px 20px -12px rgba(34, 158, 217, .8); }
.tg-ic { display: inline-flex; }
.cta-note { text-align: center; font-size: 11.5px; color: var(--ink-2); margin-top: 12px; line-height: 1.45; }

/* ---------- footer ---------- */
.ft {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto; padding: 18px 20px 30px; text-align: center;
  border-top: 1px solid var(--line);
}
.ft-logo { font-size: 18px; font-weight: 900; color: var(--red); }
.ft-sub { font-size: 11px; color: var(--ink-2); margin-top: 5px; line-height: 1.4; }

/* ---------- order modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; }
.modal.open { display: block; }
.modal-bg { position: absolute; inset: 0; background: rgba(8, 24, 44, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-card {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: var(--maxw); margin: 0 auto;
  background: var(--card-solid); border-radius: 24px 24px 0 0;
  padding: 22px 22px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 50px -20px rgba(8, 30, 60, .5);
  animation: sheet .26s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-x {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border: none; border-radius: 50%; background: rgba(20, 50, 90, .07);
  color: var(--ink-2); font-size: 15px; cursor: pointer;
}
.modal-kick { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-d); }
.modal-title { font-size: 22px; font-weight: 900; margin: 6px 0 2px; letter-spacing: -.01em; }
.modal-prod { font-size: 13.5px; color: var(--ink-2); margin-bottom: 16px; min-height: 18px; }
.modal-prod b { color: var(--ink); }

.fld {
  width: 100%; padding: 14px 15px; margin-bottom: 11px;
  font-size: 15px; font-family: inherit; color: var(--ink);
  background: #eef4fb; border: 1.5px solid transparent; border-radius: 13px;
  outline: none; transition: border-color .15s, background .15s;
}
.fld::placeholder { color: #7a90a8; }
.fld:focus { background: #fff; border-color: var(--blue); }
.fld.err { border-color: var(--red); background: #fff3f3; }
textarea.fld { resize: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.modal-err { font-size: 12.5px; color: var(--red); min-height: 17px; margin-bottom: 4px; }
.modal-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px; border: none; cursor: pointer;
  font-size: 16px; font-weight: 800; color: #fff; border-radius: 14px;
  background: linear-gradient(135deg, #2bb2ec 0%, var(--tg) 60%, var(--tg-d) 100%);
  box-shadow: 0 14px 30px -12px rgba(34, 158, 217, .7);
  transition: transform .14s, opacity .14s;
}
.modal-submit:active { transform: translateY(2px); }
.modal-submit:disabled { opacity: .6; cursor: default; }
.modal-fine { font-size: 11px; color: var(--ink-2); text-align: center; margin-top: 12px; line-height: 1.4; }

@media (min-width: 520px) {
  .modal-card { top: 50%; bottom: auto; left: 50%; right: auto; border-radius: 24px; width: calc(var(--maxw) - 24px); transform: translate(-50%, -50%); animation: pop .24s ease; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .snow { display: none; }
}
