/*
 * Design tokens — the single source of truth for colour, type, shape and layout.
 *
 * Every stylesheet is wrapped in a cascade layer. The order below is declared
 * once, here, so the cascade is explicit: a rule in a later layer always wins
 * over an earlier one, regardless of selector specificity.
 *
 * Breakpoint: 900px (custom properties cannot be used inside @media).
 */
@layer tokens, base, layout, components, sections, pages;

@layer tokens {
  :root {
    color-scheme: light;

    /* Ink & surfaces */
    --color-ink: #1C1A3A;
    --color-ink-deep: #3E3A60;
    --color-ink-soft: #4A4766;
    --color-ink-muted: #5C5878;
    --color-cream: #FAF7F0;
    --color-cream-soft: #FCFAF5;
    --color-white: #FFFFFF;
    --color-sand: #F1EFE9;
    --color-line: #E9E3D6;
    --color-line-soft: #F1EDE3;
    --color-night: #2A2752;
    --color-night-line: #34315F;

    /* Brand violet */
    --color-violet: #5A3FE6;
    --color-violet-strong: #4A2FD0;
    --color-violet-deep: #3A2A9E;
    --color-violet-soft: #C9BEFF;
    --color-violet-tint: #E9E4FF;
    --color-violet-wash: #F1EDFF;
    --color-violet-haze: #E4DEFF;
    --color-violet-mist: #C9C4E6;
    --color-violet-line: #D9D1F2;
    --color-violet-fade: #D3CCE6;

    /* Feedback */
    --color-green: #1E6B45;
    --color-green-strong: #17583A;
    --color-green-bright: #1E8A55;
    --color-green-tint: #DDF3E6;
    --color-whatsapp: #25D366;
    --color-whatsapp-chat: #EFEAE2;  /* chat wallpaper */
    --color-whatsapp-out: #D9FDD3;   /* sent bubble */
    --color-whatsapp-ink: #111B21;
    --color-whatsapp-meta: #5B6B75;  /* message time; darker than WhatsApp's for AA contrast */
    --color-whatsapp-tick: #53BDEB;  /* "read" ticks */

    /* Typography */
    --font-body: 'Assistant', system-ui, sans-serif;
    --font-display: 'Fredoka', 'Assistant', sans-serif;

    /* Shape & depth */
    --radius-pill: 999px;
    --shadow-card: 0 30px 60px rgba(28, 26, 58, 0.08);
    --shadow-soft: 0 30px 60px rgba(28, 26, 58, 0.06);
    --shadow-float: 0 14px 30px rgba(28, 26, 58, 0.22);

    /* Layout */
    --container-width: 1240px;
    --gutter: 32px;
    --float-offset: 24px; /* distance of floating buttons from the screen edges */
  }

  @media (max-width: 900px) {
    :root {
      --gutter: 20px;
      --float-offset: 16px;
    }
  }
}
