/* ==========================================================================
   Хеликон Club — landing (club-app.helikon.bg)
   Mobile-first. Breakpoints: 576px (sm), 992px (lg / split layout), 1200px (xl)
   ========================================================================== */

/* ---------- Fonts (self-hosted Raleway variable, 500–900) ---------- */
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("../fonts/raleway-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("../fonts/raleway-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched fallback to minimise layout shift while Raleway loads */
@font-face {
  font-family: "Raleway Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 106%;
  ascent-override: 88%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* ---------- Design tokens ---------- */
:root {
  --blue: #193997;
  --blue-500: #2550C8;
  --blue-900: #0F2462;
  --orange: #EB6A00;
  --orange-text: #B04E00;   /* AA-contrast orange for small text */
  --peach: #FFB36B;
  --pink: #D9356B;
  --cream: #F4F7FD;
  --white: #FFFFFF;
  --ink: #26335C;
  --muted: #4B5679;
  --muted-2: #5D6686;
  --label: #8A93AD;
  --phone: #141B2E;
  --phone-edge: #2E3854;
  --soft-blue: #C8D5FF;

  --font: "Raleway", "Raleway Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: 24px;
  --content: 640px;
  --badge-h: 46px;
  --radius-lg: 22px;
  --shadow-soft: 0 6px 16px rgb(25 57 151 / 0.10);
  --shadow-phone: 0 40px 80px rgb(5 15 50 / 0.45);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--cream);
  color: var(--blue);
  font-family: var(--font);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.45;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.accent { color: var(--orange); }

/* Icons from sprite (stroke icons) */
.feature-icon svg,
.notif__icon svg,
.coupon__icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Layout (mobile first)
   ========================================================================== */
.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.main { flex: 1 0 auto; display: flex; flex-direction: column; }

.site-header,
.intro,
.download,
.features,
.cta,
.site-footer {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header { padding-top: max(28px, env(safe-area-inset-top)); }
.brand { display: inline-block; border-radius: 4px; }
.brand img { width: 168px; }

/* ---------- Intro ---------- */
.intro { margin-top: 2.5rem; }
.hero-title {
  font-size: clamp(2.875rem, 1.9rem + 4vw, 3.75rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.026em;
  color: var(--blue);
  text-wrap: balance;
}
.lead {
  margin-top: 1rem;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.3125rem);
  line-height: 1.45;
  font-weight: 500;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- Store badges (official artwork) ---------- */
.download { margin-top: 3rem; display: flex; align-items: center; }
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--badge-h) * .22);
}
.store-badges--sm { --badge-h: 42px; }
.store-badge {
  display: block;
  border-radius: calc(var(--badge-h) * .2);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.store-badge img { height: var(--badge-h); width: auto; }
@media (hover: hover) {
  .store-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgb(11 11 14 / 0.22);
  }
}
.store-badge:active { transform: translateY(0); }

/* QR — only useful on desktop */
.qr { display: none; }

/* ---------- Showcase (phones) ---------- */
.showcase {
  position: relative;
  margin-top: 2rem;
  overflow: hidden;
  background: radial-gradient(90% 70% at 50% 45%, var(--blue-500) 0%, var(--blue) 50%, var(--blue-900) 100%);
}
.showcase__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.showcase__mark {
  position: absolute;
  right: -20%;
  bottom: -30px;
  width: 108%;
  max-width: none;
  fill: var(--white);
  opacity: .06;
}

/* The scene is a fixed design canvas (390×560 on mobile, 620×900 on desktop)
   scaled fluidly with container query units. --u = one design pixel. */
.scene {
  --u: calc(100cqi / 390);
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 390 / 560;
  margin-inline: auto;
  container-type: inline-size;
}
.scene > * { position: absolute; }

.phone {
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  aspect-ratio: 250 / 524;
  padding: calc(var(--w) * .0332 * var(--u));
  border-radius: calc(var(--w) * .168 * var(--u));
  background: var(--phone);
  box-shadow: var(--shadow-phone), inset 0 0 0 2px var(--phone-edge);
  transform: rotate(var(--r, 0deg));
}
.phone__screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--w) * .132 * var(--u));
  background: var(--white);
}
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.phone--left   { --x: 14;  --y: 96; --w: 190; --r: -8deg; }
.phone--right  { --x: 190; --y: 90; --w: 190; --r: 8deg; }
.phone--center { --x: 85;  --y: 46; --w: 220; }

/* Notification card (design size 290px wide, scaled by --s) */
.notif {
  --s: .72;
  --c: calc(var(--u) * var(--s));
  left: calc(150 * var(--u));
  top: calc(26 * var(--u));
  width: calc(290 * var(--c));
  display: flex;
  align-items: center;
  gap: calc(12 * var(--c));
  padding: calc(14 * var(--c));
  border-radius: calc(22 * var(--c));
  background: rgb(255 255 255 / .97);
  box-shadow: 0 22px 44px rgb(5 15 50 / .35);
  transform: rotate(4deg);
  transform-origin: 0 0;
}
.notif__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(46 * var(--c));
  height: calc(46 * var(--c));
  border-radius: calc(12 * var(--c));
  background: var(--orange);
  color: var(--white);
}
.notif__icon svg { width: calc(26 * var(--c)); height: calc(26 * var(--c)); }
.notif__body { display: flex; flex-direction: column; gap: calc(3 * var(--c)); }
.notif__title { font-size: calc(15 * var(--c)); line-height: 1.2; font-weight: 800; color: var(--phone); }
.notif__text { font-size: calc(13.5 * var(--c)); line-height: 1.25; font-weight: 600; color: var(--muted); }

/* Birthday coupon (design size 236×112, scaled by --s) */
.coupon {
  --s: .82;
  --c: calc(var(--u) * var(--s));
  left: calc(10 * var(--u));
  top: calc(416 * var(--u));
  width: calc(236 * var(--c));
  height: calc(112 * var(--c));
  transform: rotate(-6deg);
  transform-origin: 0 0;
  filter: drop-shadow(0 22px 30px rgb(5 15 50 / .35));
}
.coupon__shape { position: absolute; inset: 0; width: 100%; height: 100%; }
.coupon__icon {
  position: absolute;
  left: calc(13 * var(--c));
  top: calc(30 * var(--c));
  display: grid;
  place-items: center;
  width: calc(52 * var(--c));
  height: calc(52 * var(--c));
  border-radius: calc(14 * var(--c));
  background: var(--pink);
  color: var(--white);
}
.coupon__icon svg { width: calc(30 * var(--c)); height: calc(30 * var(--c)); }
.coupon__body {
  position: absolute;
  left: calc(96 * var(--c));
  top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(4 * var(--c));
}
.coupon__label {
  font-size: calc(9.5 * var(--c));
  line-height: 1;
  font-weight: 800;
  letter-spacing: .147em;
  text-transform: uppercase;
  color: var(--label);
}
.coupon__value {
  font-size: calc(56 * var(--c));
  line-height: .95;
  font-weight: 900;
  letter-spacing: -.036em;
  color: var(--blue);
}
.coupon__value small { font-size: .536em; letter-spacing: 0; }
.coupon__count {
  position: absolute;
  right: calc(-10 * var(--c));
  top: calc(-12 * var(--c));
  display: grid;
  place-items: center;
  width: calc(30 * var(--c));
  height: calc(30 * var(--c));
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 calc(4 * var(--c)) var(--white);
  font-size: calc(15 * var(--c));
  font-weight: 900;
  line-height: 1;
  color: var(--white);
}

/* Gentle float for the floating cards */
@media (prefers-reduced-motion: no-preference) {
  .notif  { animation: float 6s ease-in-out infinite; }
  .coupon { animation: float 7s ease-in-out -2.5s infinite; }
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -6px; }
}

/* ---------- Features ---------- */
.features { margin-top: 2.5rem; }
.features__title {
  font-size: clamp(1.625rem, 1.4rem + 1vw, 2rem);
  line-height: 1.15;
  font-weight: 900;
  color: var(--blue);
  text-wrap: balance;
}
.features__list {
  margin-top: 1.375rem;
  display: grid;
  gap: 14px 28px;
}
.features__list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .9375rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}
.feature-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  color: var(--orange);
}
.feature-icon svg { width: 22px; height: 22px; }

/* ---------- CTA card (mobile/tablet) ---------- */
.cta {
  margin-top: 3.5rem;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--blue);
  color: var(--white);
}
.cta__title { font-size: 1.375rem; line-height: 1.2; font-weight: 900; }
.cta__accent { color: var(--peach); }
.cta__text { margin-top: 6px; font-size: .875rem; line-height: 1.4; font-weight: 500; color: var(--soft-blue); }
.cta .store-badges { margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 3rem;
  padding-bottom: max(30px, env(safe-area-inset-bottom));
}
.legal-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .8125rem;
  line-height: 1.2;
  font-weight: 600;
  color: var(--muted-2);
}
.legal-links a {
  display: inline-block;
  padding-block: 4px;       /* ≥ 24px touch target */
  text-decoration: none;
  border-radius: 4px;
}
.legal-links a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   ≥ 576px — small tablets
   ========================================================================== */
@media (min-width: 576px) {
  .features__list { grid-template-columns: 1fr 1fr; }
  .legal-links { flex-direction: row; flex-wrap: wrap; column-gap: 18px; }
  .cta { padding: 28px; }
  .store-badges--sm { --badge-h: 46px; }
}

/* ==========================================================================
   ≥ 992px — split layout (content left, phones right)
   ========================================================================== */
@media (min-width: 992px) {
  :root {
    --stage-w: clamp(420px, 43vw, 960px);
    --pad-l: clamp(40px, 6.67vw, 120px);
    --badge-h: 58px;
  }

  .page { padding: 0 calc(var(--stage-w) + clamp(20px, 2.4vw, 48px)) 0 var(--pad-l); }

  .site-header,
  .intro,
  .download,
  .features,
  .cta,
  .site-footer { width: auto; margin-inline: 0; }

  .site-header { padding-top: clamp(28px, 6.2vh, 56px); }
  .brand img { width: 236px; }

  .main { justify-content: center; }

  /* Visual order on desktop: intro → features → badges */
  .intro    { order: 1; margin-top: clamp(28px, 7vh, 80px); max-width: 640px; }
  .features { order: 2; margin-top: clamp(28px, 5.8vh, 52px); max-width: 680px; }
  .download { order: 3; margin-top: clamp(28px, 4.4vh, 40px); }
  .cta      { display: none; }

  .hero-title { font-size: max(3rem, min(.5rem + 5vw, 8.9vh, 5.5rem)); letter-spacing: -.025em; }
  .lead { margin-top: 1.5rem; max-width: 540px; }

  /* The h2 is only shown on mobile in the design; keep it for SEO/a11y */
  .features__title {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .features__list { margin-top: 0; gap: clamp(10px, 1.8vh, 16px) clamp(18px, 1.95vw, 28px); grid-template-columns: repeat(2, minmax(0, max-content)); }
  .store-badges { flex: none; flex-wrap: nowrap; }
  .features__list li { font-size: 1rem; }
  .feature-icon { width: 42px; height: 42px; }
  .feature-icon svg { width: 23px; height: 23px; }

  .site-footer { margin-top: clamp(28px, 5vh, 52px); padding-bottom: clamp(20px, 3.3vh, 30px); margin-right: -32px; }
  .legal-links { font-size: .78125rem; line-height: 1; column-gap: 18px; row-gap: 2px; }
  .legal-links a { padding-block: 4px; }

  /* Stage */
  .showcase {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--stage-w);
    margin: 0;
    overflow: visible;           /* lets the coupon overlap the cream side */
    display: grid;
    place-items: center;
    container-type: size;
    background: radial-gradient(90% 80% at 60% 45%, var(--blue-500) 0%, var(--blue) 45%, var(--blue-900) 100%);
  }
  .showcase__mark { right: -120px; bottom: -60px; width: 760px; max-width: 122%; }

  .scene {
    --u: calc(100cqi / 620);
    width: min(100cqw, 100cqh * 620 / 900);
    aspect-ratio: 620 / 900;
  }
  .phone--left   { --x: 32;  --y: 214; --w: 250; opacity: .96; }
  .phone--right  { --x: 352; --y: 200; --w: 250; opacity: .96; }
  .phone--center { --x: 170; --y: 130; --w: 300; }
  .notif  { --s: .92; left: calc(330 * var(--u)); top: calc(96 * var(--u)); }
  .coupon { --s: 1;   left: calc(8 * var(--u)); top: calc(600 * var(--u)); }
}

/* Wide screens: the coupon overlaps the cream column, as in the design */
@media (min-width: 1400px) {
  .coupon { left: calc(-30 * var(--u)); }
}
@media (min-width: 1600px) {
  .coupon { left: calc(-60 * var(--u)); }
}
/* Not enough room for the QR caption next to the badges */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .qr__label { display: none; }
}

/* ≥ 1200px — show the QR code next to the badges */
@media (min-width: 1200px) {
  /* QR is bottom-aligned with the badges and rises into the empty
     6th cell of the 2-column feature grid (as in the design) */
  .download { align-items: flex-end; gap: clamp(32px, 4.8vw, 72px); }
  .qr { display: flex; align-items: center; gap: 14px; margin-top: calc(var(--badge-h) - 112px); }
  .qr__code {
    width: 112px;
    height: 112px;
    padding: 8px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 10px 24px rgb(25 57 151 / .14);
  }
  .qr__code img { width: 100%; height: 100%; image-rendering: pixelated; }
  .qr__label {
    font-size: .8125rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: .077em;
    text-transform: uppercase;
    color: var(--orange-text);
  }
}

/* Short desktop screens: tighten the vertical rhythm */
@media (min-width: 992px) and (max-height: 820px) {
  .hero-title { font-size: max(3rem, min(.5rem + 5vw, 7.8vh)); }
  .intro { margin-top: 4.5vh; }
  .lead { font-size: 1.125rem; margin-top: 1rem; }
  .site-footer { margin-top: 3.5vh; }
  .features__list li { font-size: .9375rem; }
}

/* ---------- Print ---------- */
@media print {
  .showcase, .qr { display: none !important; }
  .page { padding: 0 !important; }
}
