/* =========================================================
   BASE - Variables - Reset - Typography - Layout Utilities
   ========================================================= */

/* ----------------------------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------------------------- */
:root {
  /* Colors */
  --clr-charcoal:   #0D1B2A;
  --clr-charcoal-2: #112233;
  --clr-teal:       #00C48C;
  --clr-teal-dark:  #009e71;
  --clr-amber:      #F5A623;
  --clr-white:      #FFFFFF;
  --clr-stone:      #F4F5F6;
  --clr-grey-mid:   #8A9AB0;
  --clr-grey-dark:  #4A5568;
  --clr-border:     #E2E8F0;

  /* Typography */
  --font-head:   'Barlow', 'Inter', sans-serif;
  --font-body:   'Inter', sans-serif;

  /* Font sizes */
  --fs-h1:   clamp(2.4rem, 5vw, 4rem);
  --fs-h2:   clamp(1.75rem, 3.5vw, 2.625rem);
  --fs-h3:   clamp(1.2rem, 2vw, 1.625rem);
  --fs-body: 1.0625rem;
  --fs-sm:   0.875rem;
  --fs-xs:   0.75rem;

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

  /* Layout */
  --max-w:        1280px;
  --max-w-narrow: 780px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.18);

  /* Transitions */
  --t-fast: 160ms ease;
  --t-mid:  280ms ease;

  /* Nav height */
  --nav-h: 72px;
}

/* ----------------------------------------------------------
   2. RESET
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--clr-charcoal);
  background: var(--clr-white);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font: inherit;
}

/* ----------------------------------------------------------
   3. TYPOGRAPHY
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); font-weight: 600; }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p {
  max-width: 68ch;
  color: var(--clr-grey-dark);
}

.label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-teal);
}

/* ----------------------------------------------------------
   4. LAYOUT UTILITIES
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.container--narrow {
  max-width: var(--max-w-narrow);
}

.section {
  padding-block: var(--sp-24);
}

.section--dark {
  background: var(--clr-charcoal);
  color: var(--clr-white);
}

.section--dark p {
  color: rgba(255,255,255,.75);
}

.section--stone {
  background: var(--clr-stone);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-center { text-align: center; }
.text-white  { color: var(--clr-white); }

/* ----------------------------------------------------------
   5. BUTTONS
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--r-sm);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--clr-teal);
  color: var(--clr-white);
}
.btn--primary:hover {
  background: var(--clr-teal-dark);
  box-shadow: 0 4px 20px rgba(0,196,140,.35);
}

.btn--outline {
  background: transparent;
  color: var(--clr-white);
  border: 2px solid rgba(255,255,255,.45);
}
.btn--outline:hover {
  border-color: var(--clr-white);
  background: rgba(255,255,255,.08);
}

.btn--outline-dark {
  background: transparent;
  color: var(--clr-charcoal);
  border: 2px solid var(--clr-charcoal);
}
.btn--outline-dark:hover {
  background: var(--clr-charcoal);
  color: var(--clr-white);
}

.btn--amber {
  background: var(--clr-amber);
  color: var(--clr-charcoal);
}
.btn--amber:hover {
  background: #e09418;
  box-shadow: 0 4px 20px rgba(245,166,35,.35);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

/* ----------------------------------------------------------
   6. SECTION HEADERS (reusable centred header block)
   ---------------------------------------------------------- */
.section-header {
  margin-bottom: var(--sp-12);
}

.section-header.center {
  text-align: center;
}

.section-header.center p {
  margin-inline: auto;
}

.section-header p {
  margin-top: var(--sp-4);
  font-size: 1.0625rem;
}

/* ----------------------------------------------------------
   7. CARDS
   ---------------------------------------------------------- */
.card {
  background: var(--clr-white);
  border-radius: var(--r-md);
  border: 1px solid var(--clr-border);
  padding: var(--sp-8);
  transition: box-shadow var(--t-mid), transform var(--t-mid);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* ----------------------------------------------------------
   8. BADGES / PILLS
   ---------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--teal {
  background: rgba(0,196,140,.12);
  color: var(--clr-teal-dark);
}

.badge--amber {
  background: rgba(245,166,35,.12);
  color: #b87a10;
}

/* ----------------------------------------------------------
   9. SCROLLBAR
   ---------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--clr-stone); }
::-webkit-scrollbar-thumb { background: var(--clr-grey-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--clr-charcoal); }

/* ----------------------------------------------------------
   10. RESPONSIVE BREAKPOINTS
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section { padding-block: var(--sp-16); }

  .container { padding-inline: var(--sp-4); }

  p { max-width: 100%; }
}
