/* =============================================================================
   BASE STYLES - Reset & Typography
   Version: 1.0.0
   ============================================================================= */

/* =========================================================================
   CSS RESET (Modern Minimal)
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================================
   TYPOGRAPHY - HEADINGS
   ========================================================================= */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  color: var(--color-text-dark);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

h1, .h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2, .h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3, .h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4, .h4 {
  font-size: 1.25rem;
}

h5, .h5 {
  font-size: 1rem;
}

h6, .h6 {
  font-size: 0.875rem;
}

/* =========================================================================
   TYPOGRAPHY - BODY TEXT
   ========================================================================= */

p {
  margin: 0 0 var(--spacing-sm);
}

.lead {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-lg);
}

.text-small {
  font-size: var(--font-size-sm);
}

.text-large {
  font-size: var(--font-size-lg);
}

.text-muted {
  color: var(--color-text-muted);
}

/* =========================================================================
   LINKS
   ========================================================================= */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

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

/* =========================================================================
   LISTS
   ========================================================================= */

ul, ol {
  padding-left: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

ul ul, ol ol, ul ol, ol ul {
  margin-bottom: 0;
}

li {
  margin-bottom: var(--spacing-xs);
}

/* =========================================================================
   IMAGES & MEDIA
   ========================================================================= */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  border: 0;
}

figure {
  margin: 0;
}

figcaption {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--spacing-xs);
}

/* =========================================================================
   FORMS
   ========================================================================= */

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: var(--line-height-base);
  margin: 0;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

textarea {
  overflow: auto;
  resize: vertical;
}

/* =========================================================================
   TABLES
   ========================================================================= */

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

th, td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

th {
  font-weight: var(--font-weight-bold);
}

/* =========================================================================
   HORIZONTAL RULE
   ========================================================================= */

hr {
  margin: var(--spacing-lg) 0;
  border: 0;
  border-top: 1px solid var(--color-border-light);
}

/* =========================================================================
   BLOCKQUOTE
   ========================================================================= */

blockquote {
  padding: var(--spacing-sm) var(--spacing-lg);
  margin: 0 0 var(--spacing-lg);
  font-size: var(--font-size-base);
  border-left: 5px solid var(--color-primary);
}

blockquote footer,
blockquote cite {
  display: block;
  font-size: 80%;
  color: var(--color-text-muted);
}

blockquote footer::before,
blockquote cite::before {
  content: '\2014 \00A0';
}

/* =========================================================================
   CODE
   ========================================================================= */

code,
kbd,
pre,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}

code {
  padding: 2px 6px;
  background-color: var(--color-bg-light);
  border-radius: var(--radius-sm);
}

pre {
  overflow: auto;
  padding: var(--spacing-md);
  background-color: var(--color-bg-light);
  border-radius: var(--radius-md);
}

pre code {
  padding: 0;
  background: none;
}

/* =========================================================================
   UTILITY CLASSES
   ========================================================================= */

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Transform */
.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

/* Font Weight */
.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-extrabold { font-weight: var(--font-weight-extrabold); }
.font-black { font-weight: var(--font-weight-black); }

/* Display */
.hidden { display: none !important; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* Visibility */
.invisible { visibility: hidden; }
.visible { visibility: visible; }

/* Screen Reader Only */
.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;
}

/* Clearfix */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}
