/* ==========================================================================
   GLOBAL.CSS — Design Tokens, Reset, Typography, Utilities
   RE | Design Marketing
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Google Fonts Import
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   2. Design Tokens — CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {

  /* Brand Colours */
  --color-primary:        #2d3494;   /* Deep indigo — main brand */
  --color-primary-light:  #4c53a3;   /* Mid indigo */
  --color-primary-dark:   #1a1f6e;   /* Dark indigo */
  --color-accent:         #9b7fc7;   /* Lavender purple */
  --color-accent-pink:    #d48eb0;   /* Soft rose */
  --color-accent-mint:    #8ecfc9;   /* Watercolour teal */

  /* Neutrals */
  --color-white:          #ffffff;
  --color-off-white:      #f8f8fb;
  --color-surface:        #f2f3fa;
  --color-border:         #e0e2ef;
  --color-text:           #1c1e35;
  --color-text-muted:     #6b6f8a;
  --color-text-light:     #9396ae;

  /* Gradients */
  --gradient-brand:       linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-light) 50%, var(--color-accent) 100%);
  --gradient-soft:        linear-gradient(135deg, #eef0fb 0%, #f5f0ff 50%, #fdf0f6 100%);
  --gradient-cta:         linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 40%, var(--color-accent) 100%);

  /* Typography */
  --font-display:         'Cormorant Garamond', Georgia, serif;
  --font-body:            'Montserrat', sans-serif;

  --text-xs:    0.75rem;    /*  12px */
  --text-sm:    0.875rem;   /*  14px */
  --text-base:  1rem;       /*  16px */
  --text-md:    1.125rem;   /*  18px */
  --text-lg:    1.25rem;    /*  20px */
  --text-xl:    1.5rem;     /*  24px */
  --text-2xl:   2rem;       /*  32px */
  --text-3xl:   2.75rem;    /*  44px */
  --text-4xl:   3.5rem;     /*  56px */
  --text-5xl:   4.5rem;     /*  72px */

  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     800;

  --leading-tight:   1.15;
  --leading-snug:    1.35;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  --tracking-wide:   0.06em;
  --tracking-wider:  0.12em;
  --tracking-widest: 0.2em;

  /* Spacing Scale */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-pill: 5px;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(45, 52, 148, 0.06);
  --shadow-sm:  0 4px 12px rgba(45, 52, 148, 0.08);
  --shadow-md:  0 8px 28px rgba(45, 52, 148, 0.12);
  --shadow-lg:  20px 20px 50px rgba(45, 52, 148, 0.16);
  --shadow-xl:  0 32px 80px rgba(45, 52, 148, 0.22);

  /* Transitions */
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:    cubic-bezier(0.64, 0, 0.78, 0);
  --transition-fast:   0.18s var(--ease-out);
  --transition-base:   0.3s  var(--ease-out);
  --transition-slow:   0.5s  var(--ease-out);

  /* Layout */
  --container-max:  1240px;
  --container-pad:  clamp(1.25rem, 5vw, 5rem);

  /* Z-index stack */
  --z-below:   -1;
  --z-base:     0;
  --z-raised:  10;
  --z-nav:    100;
  --z-modal:  200;
}

/* --------------------------------------------------------------------------
   3. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-tight);
  font-weight: var(--weight-semibold);
}

/* --------------------------------------------------------------------------
   4. Typography Classes
   -------------------------------------------------------------------------- */

/* Display — large headlines using serif font */
.display-xl {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--weight-light);
  letter-spacing: -0.01em;
  line-height: var(--leading-tight);
}

.display-lg {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
}

.display-md {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-snug);
}

/* Headings — using Montserrat */
.heading-xl  { font-size: var(--text-2xl); font-weight: var(--weight-bold); }
.heading-lg  { font-size: var(--text-xl);  font-weight: var(--weight-semibold); }
.heading-md  { font-size: var(--text-lg);  font-weight: var(--weight-semibold); }
.heading-sm  { font-size: var(--text-base); font-weight: var(--weight-semibold); }

/* Body */
.body-lg     { font-size: var(--text-md);  line-height: var(--leading-relaxed); }
.body-base   { font-size: var(--text-base); line-height: var(--leading-normal); }
.body-sm     { font-size: var(--text-sm);   line-height: var(--leading-normal); }

/* Label / Tag */
.label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

/* Muted text */
.text-muted  { color: var(--color-text-muted); }
.text-light  { color: var(--color-text-light); }

/* --------------------------------------------------------------------------
   5. Layout Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section-pad {
  padding-block: clamp(var(--space-12), 8vw, var(--space-32));
}

.section-pad-sm {
  padding-block: clamp(var(--space-8), 5vw, var(--space-20));
}

/* Flex helpers */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

/* --------------------------------------------------------------------------
   6. Shared UI Components
   -------------------------------------------------------------------------- */

/* Pill tag / section label */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(45, 52, 148, 0.05);
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-8);
}

/* Visually hidden (accessibility) */
.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;
}
