/* =========================================================
   GLOBAL.CSS
   Base / Tokens / Accessibility / Gutenberg / Utilities
   ========================================================= */

/* -------------------------
   Fonts
-------------------------- */
@font-face {
  font-family: 'Source Sans Pro';
  src: url('../fonts/SourceSans/SourceSans3-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Sans Pro';
  src: url('../fonts/SourceSans/SourceSans3-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('../fonts/Figtree/Figtree-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('../fonts/Figtree/Figtree-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* -------------------------
   Design tokens
-------------------------- */
:root {
  /* Fonts (no extra fallback added: relies on site defaults after the first available font) */
  --font-body: 'Source Sans Pro';
  --font-title: 'Figtree';

  /* Palette */
  --color-red-01: #D00000;
  --color-red-02: #E94C3D;
  --color-red-03: #E31E24;

  --color-beige-01: #E8DACA;
  --color-beige-02: #F5EFE8;

  --color-navy-01: #0D1039;
  --color-navy-02: #1A1E50;
  --color-navy-03: #EAEAEA;

  --color-framboise-01: #B10027;
  --color-framboise-02: #D34659;
  --color-framboise-03: #F3E8EA;

  --color-white: #FFFFFF;
  --color-white-02: #F5F5F5;

  --color-black-01: #000000;
  --color-black-02: #1D1D1D;
  --color-black-03: #2C2C2C;
  --color-black-04: #3A3A3A;

  --color-grey-01: #D4D4D4;
  --color-grey-02: #E0E0E0;
  --color-grey-03: #CCCCCC;
  --color-grey-04: #999999;
  --color-grey-05: #666666;
  --color-grey-06: #333333;

  /* A11y helpers (use where contrast is critical) */
  --color-accessible-red: #7B0000;
  --color-accessible-blue: #004080;

  /* Semantic */
  --color-primary: var(--color-red-01);
  --color-secondary: var(--color-navy-01);
  --color-accent: var(--color-grey-01);
  --color-background: var(--color-white);
  --color-text: var(--color-black-01);

  /* UI colors */
  --color-border: var(--color-grey-03);
  --color-border-soft: rgba(0, 0, 0, 0.06);
  --color-shadow-soft: rgba(0, 0, 0, 0.04);
  --color-shadow: rgba(0, 0, 0, 0.12);
  --color-surface-01: #F8F9FA;
  --color-text-muted: #686868;
  --color-text-subtle: var(--color-grey-05);
  --color-chip-border: var(--color-grey-03);
  --color-overlay-10: rgba(255, 255, 255, 0.1);
  --color-overlay-05-primary: rgba(227, 30, 36, 0.05);
  --color-overlay-10-primary: rgba(227, 30, 36, 0.1);
  --color-overlay-30-primary: rgba(227, 30, 36, 0.3);
  --color-overlay-45-black: rgba(0, 0, 0, 0.45);
  --color-overlay-20-black: rgba(0, 0, 0, 0.2);
  --color-overlay-15-black: rgba(0, 0, 0, 0.15);
  --color-overlay-10-black: rgba(0, 0, 0, 0.1);
  --color-overlay-02-black: rgba(0, 0, 0, 0.02);

  /* Spacing scale */
  --spacing-xs: 0.5rem;
  --spacing-s: 1rem;
  --spacing-m: 2rem;
  --spacing-l: 3rem;
  --spacing-xl: 5rem;

  /* Cards */
  --card-radius: 0;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --card-border: 1px solid rgba(0, 0, 0, 0.06);
  --card-padding: 1rem;
  --card-gap: 2rem;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sbw: 0px;

  /* Base font sizing (kept as-is) */
  font-size: 18px !important;
}

@supports (width: 100dvw) {
  :root { --sbw: calc(100dvw - 100vw); }
}

/* -------------------------
   Base
-------------------------- */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.2;
}

figure { margin: 0; }

img,
.wp-block-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* -------------------------
   Links / Focus (RGAA)
-------------------------- */
a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-skip-ink: auto;
  transition: all 0.3s ease-in-out;
}

a:hover,
a:focus-visible {
  color: var(--color-secondary);
  text-decoration-thickness: 2px;
  /*outline: none;*/
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.burger:focus-visible,
.menu a:focus-visible,
.footer-links a:focus-visible,
.footer-menu a:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible {
  outline: 2px dashed var(--color-primary);
  outline-offset: 3px;
}

section { border: 1px solid transparent; }
/* section:focus-within { border: 1px dashed var(--color-primary); } */


.skip-link{
  position:absolute;
  top:0;
  left:0;
  transform: translateY(-200%);
  padding: 0.75rem 1rem;
  background:#fff;
  color:#000;
  z-index:10000;
}

.skip-link:focus,
.skip-link:focus-visible{
  transform: translateY(0);
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* -------------------------
   Buttons (base)
-------------------------- */
button,
.wp-block-button__link {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 0.75em 1.5em;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s ease-in-out;
}

button:hover,
.wp-block-button__link:hover {
  background-color: var(--color-secondary);
}

/* -------------------------
   Text elements
-------------------------- */
.wp-block-quote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1em;
  font-style: italic;
  color: var(--color-text);
}

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.5rem; border: 1px solid var(--color-border); }
th { background: var(--color-accent); text-align: left; }

/* -------------------------
   Layout helpers
-------------------------- */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Gutenberg alignments */
.alignwide {
  margin-left: calc(-1 * (100vw - 100%) / 2);
  margin-right: calc(-1 * (100vw - 100%) / 2);
}

.alignfull {
  width: calc(100vw + var(--sbw));
  max-width: calc(100vw + var(--sbw));
  margin-left: calc(50% - 50vw - (var(--sbw) / 2));
  margin-right: calc(50% - 50vw - (var(--sbw) / 2));
}

/* -------------------------
   Motion (GSAP hooks)
-------------------------- */
.reveal-up {
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }
}
