/* ==========================================================================
   Ribadeneyra Procurement Suite — shared brand tokens
   Imported by the landing page, the suite hub and every module shell.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Inter, self-hosted. Served from this origin rather than fonts.gstatic.com so
   that no visitor IP is handed to a third party on page load — one less thing
   to declare under Art. 6 GDPR, and one less render-blocking origin.
   Variable font: a single file covers weights 100–900.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-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;
}

:root {
  /* --- navy (primary) --- */
  --rb-navy-950: #0B1424;
  --rb-navy-900: #0F1B2E;
  --rb-navy-800: #16243D;
  --rb-navy-700: #1B2E4F;
  --rb-navy-600: #24406B;
  --rb-navy-500: #33558A;
  --rb-navy-300: #7D95BA;
  --rb-navy-100: #DCE4F0;
  --rb-navy-50:  #F1F5FA;

  /* Navy as a surface (buttons, bands, badges). Unlike --rb-navy-*, which the
     dark theme turns into warm text colours, these stay navy in both themes. */
  --rb-fill-800: #16243D;
  --rb-fill-700: #1B2E4F;
  --rb-fill-600: #24406B;
  --rb-btn-bg: var(--rb-fill-700);
  --rb-btn-bg-hover: var(--rb-fill-600);
  --rb-btn-fg: #fff;

  /* --- gold (accent) --- */
  --rb-gold-700: #8A6F3B;
  --rb-gold-600: #9C7F45;
  --rb-gold-500: #BE9E5E;
  --rb-gold-400: #D8BE86;
  --rb-gold-200: #EEE2C6;
  --rb-gold-50:  #FBF7EE;

  /* --- neutrals --- */
  --rb-page:     #FBFBFA;
  --rb-surface:  #FFFFFF;
  --rb-surface-2:#F5F6F8;
  --rb-line:     #E3E6EC;
  --rb-line-2:   #CFD5DF;
  --rb-ink:      #14161A;
  --rb-ink-2:    #4A5160;
  --rb-ink-3:    #798093;

  /* --- status --- */
  --rb-good:  #17805A;  --rb-good-bg:  #E7F4EF;
  --rb-warn:  #A9741A;  --rb-warn-bg:  #FBF1DE;
  --rb-crit:  #B23A3A;  --rb-crit-bg:  #FAEAEA;
  --rb-info:  #24406B;  --rb-info-bg:  #E9EFF7;

  /* --- categorical series (validated all-pairs on light surfaces) --- */
  --rb-s1: #24406B;
  --rb-s2: #BE9E5E;
  --rb-s3: #2E8B78;
  --rb-s4: #96593E;
  --rb-s5: #5B5E8C;

  /* --- type --- */
  --rb-serif: Georgia, "Times New Roman", serif;
  --rb-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  --rb-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* --- geometry --- */
  --rb-r-sm: 6px;
  --rb-r:    10px;
  --rb-r-lg: 16px;
  --rb-shadow-1: 0 1px 2px rgba(15,27,46,.06), 0 1px 3px rgba(15,27,46,.08);
  --rb-shadow-2: 0 4px 12px rgba(15,27,46,.08), 0 2px 4px rgba(15,27,46,.06);
  --rb-shadow-3: 0 18px 48px rgba(15,27,46,.14);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rb-page:     #0B1424;
    --rb-surface:  #101C30;
    --rb-surface-2:#152238;
    --rb-line:     #25385A;
    --rb-line-2:   #34496E;
    /* Text is warmed and brightened: blue-grey on navy was hard to read. */
    --rb-ink:      #F1ECE3;
    --rb-ink-2:    #CFC8BC;
    --rb-ink-3:    #A69F93;
    --rb-navy-50:  #142138;
    --rb-navy-100: #1B2C48;
    /* Headings, links, figures and the wordmark use navy as a text colour in
       the light theme; on a navy page they become light yellow and orange. */
    --rb-navy-300: #E9CFA0;
    --rb-navy-500: #F0A860;
    --rb-navy-600: #F5AE66;
    --rb-navy-700: #F4C584;
    --rb-navy-800: #F8DCA6;
    --rb-gold-600: #EBC27B;
    --rb-gold-700: #EFC985;
    --rb-btn-bg:       #F2B35E;
    --rb-btn-bg-hover: #F7C680;
    --rb-btn-fg:       #1B1206;
    --rb-good-bg:  #12291F; --rb-good: #5FD0A7;
    --rb-warn-bg:  #2A2213; --rb-warn: #F2BE62;
    --rb-crit-bg:  #2B1717; --rb-crit: #EE9090;
    --rb-info-bg:  #16233A; --rb-info: #F2B66B;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --rb-page:     #0B1424;
  --rb-surface:  #101C30;
  --rb-surface-2:#152238;
  --rb-line:     #25385A;
  --rb-line-2:   #34496E;
  /* Text is warmed and brightened: blue-grey on navy was hard to read. */
  --rb-ink:      #F1ECE3;
  --rb-ink-2:    #CFC8BC;
  --rb-ink-3:    #A69F93;
  --rb-navy-50:  #142138;
  --rb-navy-100: #1B2C48;
  /* Headings, links, figures and the wordmark use navy as a text colour in
     the light theme; on a navy page they become light yellow and orange. */
  --rb-navy-300: #E9CFA0;
  --rb-navy-500: #F0A860;
  --rb-navy-600: #F5AE66;
  --rb-navy-700: #F4C584;
  --rb-navy-800: #F8DCA6;
  --rb-gold-600: #EBC27B;
  --rb-gold-700: #EFC985;
  --rb-btn-bg:       #F2B35E;
  --rb-btn-bg-hover: #F7C680;
  --rb-btn-fg:       #1B1206;
  --rb-good-bg:  #12291F; --rb-good: #5FD0A7;
  --rb-warn-bg:  #2A2213; --rb-warn: #F2BE62;
  --rb-crit-bg:  #2B1717; --rb-crit: #EE9090;
  --rb-info-bg:  #16233A; --rb-info: #F2B66B;
  color-scheme: dark;
}

/* --- primitives shared by shells ------------------------------------- */

.rb-wordmark {
  font-family: var(--rb-serif);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--rb-navy-700);
}

.rb-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rb-gold-600);
}

.rb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--rb-r-sm);
  font: 600 14px/1 var(--rb-sans);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.rb-btn:active { transform: translateY(1px); }
.rb-btn-primary { background: var(--rb-btn-bg); color: var(--rb-btn-fg); }
.rb-btn-primary:hover { background: var(--rb-btn-bg-hover); }
.rb-btn-gold { background: var(--rb-gold-500); color: var(--rb-navy-900); }
.rb-btn-gold:hover { background: var(--rb-gold-400); }
.rb-btn-ghost {
  background: transparent; color: var(--rb-ink);
  border-color: var(--rb-line-2);
}
.rb-btn-ghost:hover { border-color: var(--rb-navy-500); color: var(--rb-navy-600); }

.rb-card {
  background: var(--rb-surface);
  border: 1px solid var(--rb-line);
  border-radius: var(--rb-r-lg);
  box-shadow: var(--rb-shadow-1);
}

.rb-focus:focus-visible,
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rb-gold-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- language switcher on the corporate pages (assets/i18n.js) --- */
.rb-lang {
  height: 36px; padding: 0 28px 0 10px; border-radius: var(--rb-r-sm);
  border: 1px solid var(--rb-line-2); background: var(--rb-surface); color: var(--rb-navy-700);
  font: 600 12.5px/1 var(--rb-sans); letter-spacing: .06em; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239C7F45' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 13px;
}
.rb-lang:hover { border-color: var(--rb-gold-500); }
.rb-lang:focus-visible { outline: 2px solid var(--rb-gold-500); outline-offset: 2px; }
