/* Design tokens — Barefoot (Figma) */

:root {
  /* Colours — Light */
  --primary: #534646;
  --background: #fdf8ef;
  --html: #ffbf00;
  --button-primary: #ffd24b;
  --desktop-active: #ffffff;
  --desktop-hover: #ffffff;
  --mobile-active: #ffffff99;
  --mobile-hover: #ffffff4d;
  --outline: #e1ddd8;
  --button-blue: #b7e7ef;
  --button-green: #d2f7d0;
  --button-violet: #dfd0f7;
  --button-gray: #e1ddd8;

  /* Dimensions — Desktop */
  --page-title-font-size: 2.5rem;
  --page-subtitle-font-size: 1.5rem;
  --paragraph-min-width: 360px;
  --body-max-width: 1000px;
  --html-h-padding: 128px;
  --body-h-padding: 128px;
  --thumbnail-width: 256px;
  --article-spacing: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Colours — Dark */
    --primary: #f9f0f0;
    --background: #515050;
    --html: #ffbf00;
    --button-primary: #d9a200;
    --desktop-active: #353535;
    --desktop-hover: #5e5e5e;
    --mobile-active: #515050;
    --mobile-hover: #7777774d;
    --outline: #e1ddd8;
    --button-blue: #519eaa;
    --button-green: #70a76d;
    --button-violet: #a387d2;
    --button-gray: #9a8a76;
  }
}

@media (max-width: 744px) {
  :root {
    /* Dimensions — Tablet */
    --page-title-font-size: 2rem;
    --page-subtitle-font-size: 1.5rem;
    --paragraph-min-width: 360px;
    --body-max-width: 1000px;
    --html-h-padding: 24px;
    --body-h-padding: 64px;
    --thumbnail-width: 128px;
    --article-spacing: 12px;
  }
}

@media (max-width: 480px) {
  :root {
    /* Dimensions — Mobile */
    --page-title-font-size: 2rem;
    --page-subtitle-font-size: 1.5rem;
    --paragraph-min-width: 200px;
    --body-max-width: 1000px;
    --html-h-padding: 0px;
    --body-h-padding: 32px;
    --thumbnail-width: 128px;
    --article-spacing: 12px;
  }
}

/* =========================================
   Global Reset & Baseline
   ========================================= */

/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
    box-sizing: border-box;
  }
  
  /* 2. Remove default margins and padding */
  * {
    margin: 0;
    padding: 0;
  }
  
  /* 3. Baseline typography and theme application */
  body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-color: var(--background);
    color: var(--primary);
    /* Replace 'system-ui' with your Figma font family later if needed */
    font-family: system-ui, -apple-system, sans-serif; 
  }
  
  /* 4. Improve media defaults */
  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
  }
  
  /* 5. Inherit fonts for form controls */
  input, button, textarea, select {
    font: inherit;
  }
  
  /* 6. Avoid text overflows */
  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }