/*  =============================================
    POLZA.COM - Brand Design Tokens
    Single source of truth for every landing page.
    Include with: <link href="/tmpl/brand.css" rel="stylesheet">
    =============================================  */

/* -- 1. Font Face ---------------------------------------------- */

@font-face {
  font-family: 'Gilroy';
  src: url('/resources/fonts/Gilroy-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('/resources/fonts/Gilroy-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('/resources/fonts/Gilroy-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('/resources/fonts/Gilroy-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* -- 2. CSS Custom Properties (Design Tokens) ------------------ */

:root {
  /* -- Colors: Primary ------------------------------------------- */
  --color-primary:        #00BFA5;   /* teal - CTA, accents, badges */
  --color-primary-hover:  #00a890;   /* teal hover */
  --color-primary-dark:   #00a08b;   /* teal pressed/active */
  --color-primary-glow:   rgba(0, 191, 165, 0.3);  /* pulse/shadow */

  /* -- Colors: Dark CTA ------------------------------------------ */
  --color-dark:           #263238;   /* Telegram CTA, primary dark btn */
  --color-dark-hover:     #32424a;

  /* -- Colors: Text ---------------------------------------------- */
  --color-text:           #212121;   /* body copy */
  --color-text-secondary: #666;      /* secondary copy */
  --color-text-muted:     #888;      /* captions, inactive */
  --color-text-hint:      #999;      /* placeholder */
  --color-text-disabled:  #aaa;

  /* -- Colors: Background ---------------------------------------- */
  --color-bg:             #f6f6f6;   /* page */
  --color-bg-card:        #ffffff;   /* cards */
  --color-bg-muted:       #f0f0f0;   /* inactive elements */
  --color-bg-mint:        #f0f7f6;   /* mint accent */

  /* -- Colors: Borders ------------------------------------------- */
  --color-border:         #e0e0e0;
  --color-border-light:   #eee;
  --color-border-card:    #e8e8e8;

  /* -- Colors: Semantic ------------------------------------------ */
  --color-error:          #f44336;
  --color-warning-bg:     #fffbe6;
  --color-warning-text:   #6b5c00;
  --color-warning-border: #facc15;

  /* -- Colors: Accent -------------------------------------------- */
  --color-orange:         #E7712E;   /* orange - media products (lectures) */

  /* -- Colors: Polza Coin (coin mark - resources/img/polza-coin.svg) --- */
  --color-coin-body:      #F2C14F;   /* coin body */
  --color-coin-rim:       #D28E1F;   /* rim, rings, milling */
  --color-coin-mark:      #8F5C13;   /* the 'a' mark (bronze); the only one of the three safe for TEXT - 5.66:1 on white, body and rim fall below 3:1 */

  /* -- Colors: Gradient ------------------------------------------ */
  --gradient-brand:       linear-gradient(180deg, #0CBD66 0%, #049DCB 100%);

  /* -- Typography ------------------------------------------------ */
  --font-family:          'Gilroy', sans-serif;
  --font-weight-regular:  400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  /* Font sizes */
  --text-xs:    11px;
  --text-sm:    13px;
  --text-base:  15px;
  --text-md:    16px;
  --text-lg:    18px;
  --text-xl:    24px;
  --text-2xl:   28px;
  --text-3xl:   38px;
  --text-4xl:   40px;

  /* Line heights */
  --leading-tight:   1.2;
  --leading-normal:  1.5;    /* 150% - body default */
  --leading-relaxed: 1.65;

  /* -- Spacing --------------------------------------------------- */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-15:  60px;
  --space-20:  80px;
  --space-25:  100px;

  /* -- Border Radius --------------------------------------------- */
  --radius-sm:    8px;
  --radius-md:    12px;  /* buttons, inputs */
  --radius-lg:    16px;  /* cards */
  --radius-xl:    20px;  /* sections */
  --radius-2xl:   24px;  /* large blocks */
  --radius-full:  50%;   /* circles, avatars */

  /* -- Shadows --------------------------------------------------- */
  --shadow-card:    0px 0px 1px rgba(12, 26, 75, 0.24),
                    0px 3px 8px -1px rgba(50, 50, 71, 0.05);
  --shadow-hover:   0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-button:  0px 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-modal:   0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-toast:   0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-banner:  0 12px 40px rgba(33, 33, 33, 0.15);

  /* -- Layout ---------------------------------------------------- */
  --container-max:     1280px;
  --container-padding: 80px;
  --container-tablet:  743.98px;
  --container-mobile:  374.98px;

  /* -- Breakpoints (for reference, use in @media) ---------------- */
  /* Desktop: > 1279.98px  */
  /* Tablet:  744px – 1279.98px */
  /* Mobile:  < 743.98px */

  /* -- Transitions ----------------------------------------------- */
  --transition-fast:   0.15s ease;
  --transition-base:   0.2s ease;
  --transition-smooth: 0.3s ease;
  --transition-slow:   0.5s ease;
}

/* -- 3. Base Reset & Typography -------------------------------- */

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

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* No container, card or input component lives here on purpose.
   Containers: .wrapper (header.css) wraps whole pages, [class*=__container]
   (course.css) wraps landing sections - both already ship the same 1280/80 box.
   Cards: the real recipe is bg-card + 1px border-card + shadow-card with the
   radius picked by role (lg items, xl containers, 2xl feature blocks); it is
   documented in brand-guide.html rather than frozen into one class.
   Inputs: every form styles its own - there is no shared input yet. */

/* -- 4. Buttons ------------------------------------------------ */

.polza-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 16px 32px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-md);
  line-height: 19px;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-base), transform var(--transition-fast);
}

.polza-btn:active {
  transform: scale(0.98);
}

/* Primary - teal */
.polza-btn--primary {
  background: var(--color-primary);
  box-shadow: 0px 4px 15px var(--color-primary-glow);
}
.polza-btn--primary:hover {
  background: var(--color-primary-hover);
}

/* Dark - Telegram / main CTA */
.polza-btn--dark {
  background: var(--color-dark);
  box-shadow: var(--shadow-button);
}
.polza-btn--dark:hover {
  background: var(--color-dark-hover);
}

/* Disabled */
.polza-btn:disabled,
.polza-btn--disabled {
  background: #90a4ae;
  cursor: not-allowed;
  box-shadow: none;
}

/* -- 5. Animations --------------------------------------------- */

@keyframes polza-fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes polza-pulse {
  0%, 100% { transform: scale(1); box-shadow: none; }
  50%      { transform: scale(1.06); box-shadow: 0 0 20px 8px var(--color-primary-glow); }
}

@keyframes polza-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* WebP <picture> wrappers must be layout-neutral (img keeps its box) */
picture { display: contents; }
