/* ==========================================================================
   RedPandas Digital — Brand CSS (2026, Brand Guidelines v1.0)
   Drop-in design tokens + base components for RP-BRANDED web/app UI.
   Use for internal RedPandas apps/sites. NOT for client deliverables
   (those use the client's own brand).

   Usage:
     1. Copy this file + the assets/fonts/ folder into your app.
     2. Fix the @font-face url()s to point at where you serve the fonts.
     3. <link> this stylesheet, then use the .rp-* classes and var(--rp-*) tokens.
   ========================================================================== */

/* ----- Fonts -------------------------------------------------------------
   These are custom licensed typefaces (bundled in assets/fonts/). They are
   NOT installed on servers, so they MUST be served via @font-face for web.
   Recoleta = headings (Bold only). Glacial Indifference = body + subheads.
   ------------------------------------------------------------------------ */
@font-face {
  font-family: "Recoleta";
  src: url("fonts/Recoleta-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Glacial Indifference";
  src: url("fonts/GlacialIndifference-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Glacial Indifference";
  src: url("fonts/GlacialIndifference-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ----- Brand colours ------------------------------------------------- */
  /* Logo + buttons ONLY */
  --rp-red:            #E1241B;  /* RP Red — primary buttons & logo only */
  --rp-black:          #010101;  /* RP Black — logo only */

  /* Primary palette (foreground + background safe) */
  --rp-bg-red:         #E5453C;  /* BG Red — the general brand red */
  --rp-charcoal:       #222222;  /* text + background */
  --rp-white:          #FFFFFF;
  /* Accents / highlights ONLY */
  --rp-beige:          #FCE9E8;
  --rp-pale-cyan:      #B6FCFF;

  /* RP Red shades — extra design-element colours */
  --rp-red-light:      #FF5B5B;
  --rp-red-deep:       #9E1A13;
  --rp-red-darkest:    #71130E;

  /* Greyscale — borders, disabled states, low-priority copy */
  --rp-grey-100:       #E9E9E9;
  --rp-grey-300:       #C8C8C8;
  --rp-grey-500:       #919191;
  --rp-grey-700:       #595959;

  /* Semantic — status indicators ONLY */
  --rp-success:        #65BF22;
  --rp-warning:        #FDB900;
  --rp-danger:         #EF3B5F;
  --rp-info:           #1D6EF3;

  /* ----- Typography ---------------------------------------------------- */
  --rp-font-heading:   "Recoleta", Georgia, "Times New Roman", serif;
  --rp-font-body:      "Glacial Indifference", Arial, Helvetica, sans-serif;
  --rp-line-body:      1.3;    /* minimum body line-height */
  --rp-tracking-body:  0;
  --rp-tracking-eyebrow: 0.25em; /* subheadings / eyebrows / meta / 2ndary btn */
  --rp-tracking-cta:   0.5em;    /* uppercase PRIMARY button text */

  /* ----- Shape --------------------------------------------------------- */
  --rp-radius-container: 0;      /* ALL containers are sharp-cornered */
  --rp-radius-button:    100px;  /* ONLY buttons are rounded (pill) */
  --rp-border:           1px solid var(--rp-grey-300);
  /* Hard brand shadow: Beige, 4pt offset, 0 blur */
  --rp-shadow-hard:      4px 4px 0 0 var(--rp-beige);

  --rp-space:            1rem;
}

/* ----- Base ------------------------------------------------------------- */
body.rp,
.rp-root {
  font-family: var(--rp-font-body);
  font-weight: 400;
  line-height: var(--rp-line-body);
  letter-spacing: var(--rp-tracking-body);
  color: var(--rp-charcoal);
  background: var(--rp-white);
}

/* ----- Headings (Recoleta Bold) ---------------------------------------- */
.rp-root h1, .rp-root h2, .rp-root h3, .rp-root h4,
.rp-h1, .rp-h2, .rp-h3 {
  font-family: var(--rp-font-heading);
  font-weight: 700;
  color: var(--rp-charcoal);
  letter-spacing: 0;
  /* Bigger heading => tighter line-height (0.8–1.1). */
}
.rp-h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 0.95; }
.rp-h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.05; }
.rp-h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); line-height: 1.1; }

/* Eyebrow / meta label — uppercase, tracked, BG Red */
.rp-eyebrow {
  font-family: var(--rp-font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--rp-tracking-eyebrow);
  color: var(--rp-bg-red);
  font-size: 0.75rem;
}

/* ----- Buttons (the ONLY rounded element; RP Red for primary) ---------- */
.rp-btn {
  display: inline-block;
  font-family: var(--rp-font-body);
  font-weight: 700;
  border-radius: var(--rp-radius-button);
  padding: 0.75em 1.75em;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.rp-btn--primary {
  background: var(--rp-red);            /* RP Red — buttons only */
  color: var(--rp-white);
  text-transform: uppercase;
  letter-spacing: var(--rp-tracking-cta);
}
.rp-btn--primary:hover  { background: var(--rp-red-deep); }
.rp-btn--primary:disabled,
.rp-btn--primary.is-inactive { background: var(--rp-grey-300); color: var(--rp-white); cursor: not-allowed; }

.rp-btn--secondary {
  background: transparent;
  color: var(--rp-charcoal);
  border-color: var(--rp-charcoal);
}
.rp-btn--secondary:hover { background: var(--rp-charcoal); color: var(--rp-white); }
/* Secondary on a coloured/dark background */
.rp-btn--secondary-inverse {
  background: transparent;
  color: var(--rp-white);
  border-color: var(--rp-white);
}

/* ----- Containers / cards (SHARP corners, optional hard shadow) --------- */
.rp-card {
  background: var(--rp-white);
  border-radius: var(--rp-radius-container);   /* 0 — sharp */
  border: var(--rp-border);
  padding: calc(var(--rp-space) * 1.5);
}
.rp-card--shadow { border: none; box-shadow: var(--rp-shadow-hard); }

/* ----- Background utilities (only brand-safe grounds) ------------------- */
.rp-bg-white    { background: var(--rp-white);   color: var(--rp-charcoal); }
.rp-bg-beige    { background: var(--rp-beige);   color: var(--rp-charcoal); }
.rp-bg-red      { background: var(--rp-bg-red);  color: var(--rp-white); }
.rp-bg-charcoal { background: var(--rp-charcoal); color: var(--rp-white); }

/* ----- Links ------------------------------------------------------------ */
.rp-root a { color: var(--rp-bg-red); text-decoration: underline; }
.rp-root a:hover { color: var(--rp-red-deep); }

/* ----- Inputs (sharp corners, grey border) ----------------------------- */
.rp-input {
  font-family: var(--rp-font-body);
  border: var(--rp-border);
  border-radius: var(--rp-radius-container);   /* sharp */
  padding: 0.6em 0.8em;
  background: var(--rp-white);
  color: var(--rp-charcoal);
}
.rp-input:focus { outline: 2px solid var(--rp-bg-red); outline-offset: 1px; }

/* ----- Tables (BG Red header, white text) ------------------------------ */
.rp-table { width: 100%; border-collapse: collapse; }
.rp-table thead th {
  background: var(--rp-bg-red);
  color: var(--rp-white);
  font-weight: 700;
  text-align: left;
  padding: 0.6em 0.8em;
}
.rp-table td { padding: 0.6em 0.8em; border-bottom: 1px solid var(--rp-grey-300); }
.rp-table tbody tr:nth-child(even) { background: var(--rp-beige); }
