/* CSS Reset - Similar to Tailwind's preflight */
*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: currentColor;
}

::before,
::after {
  --tw-content: '';
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  margin: 0;
  line-height: inherit;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

abbr:where([title]) {
  text-decoration: underline dotted;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

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

b, strong {
  font-weight: bolder;
}

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, "Consolas", "Liberation Mono", "Menlo", monospace;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button, select {
  text-transform: none;
}

button, [type='button'], [type='reset'], [type='submit'] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

:-moz-focusring {
  outline: auto;
}

:-moz-ui-invalid {
  box-shadow: none;
}

progress {
  vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

[type='search'] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

summary {
  display: list-item;
}

blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol, ul, menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

dialog {
  padding: 0;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  color: #9ca3af;
}

button, [role="button"] {
  cursor: pointer;
}

:disabled {
  cursor: default;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}

img, video {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none;
}

/* Design System Variables */
:root {
  /* Colors - Converting HSB to HSL for CSS */
  --color-brand: hsl(230, 67%, 58%); /* HSB 230, 65, 86 */
  --color-text-strong: hsl(230, 40%, 17%); /* HSB 230, 57, 24 */
  --color-text-weak: hsl(230, 16%, 42%); /* HSB 230, 27, 48 */
  --color-stroke-strong: hsl(230, 18%, 58%); /* HSB 230, 23, 65 */
  --color-stroke-weak: hsl(230, 28%, 92%); /* HSB 230, 5, 94 */
  --color-fill: hsl(230, 33%, 97%); /* HSB 230, 2, 98 */
  --color-background: hsl(0, 0%, 100%); /* HSB 0, 0, 100 */
  --color-green: hsl(162, 90%, 25%); /* HSB 162, 95, 48 */
  --color-amber: hsl(42, 85%, 30%); /* HSB 42, 82, 56 */
  --color-red:  hsl(0, 56%, 50%); /* HSB 0, 71, 78 */
  
  /* Font Family */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Spacing */
  --space-xs: 8px;
  --space-s: 16px;
  --space-m: 24px;
  --space-l: 32px;
  --space-xl: 48px;
  --space-xxl: 80px;
}

/* Base Styles */
body {
  font-family: var(--font-family);
  color: var(--color-text-strong);
  background-color: var(--color-background);
  font-size: 16px;
  line-height: 24px;
}

/* Typography Classes */
.heading1 {
  font-size: 40px;
  line-height: 48px;
  font-weight: 700;
}

.heading2 {
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
}

.heading3 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
}

.heading4 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}

.text-base {
  font-size: 16px;
  line-height: 24px;
}

.text-small {
  font-size: 14px;
  line-height: 20px;
}



/* Button Classes */
.btn-primary {
  background-color: var(--color-brand);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  min-height: 48px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  &:hover {
    background-color: hsl(230, 65%, 45%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  &:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }
  
  &:disabled {
    background-color: var(--color-stroke-weak);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-brand);
  border: 1px solid var(--color-brand);
  padding: 11px 23px; /* 1px less to account for border */
  border-radius: 6px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  min-height: 48px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  &:hover {
    background-color: var(--color-brand);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  &:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }
  
  &:disabled {
    border-color: var(--color-stroke-weak);
    color: var(--color-stroke-weak);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    
    &:hover {
      background-color: transparent;
      color: var(--color-stroke-weak);
    }
  }
}

.btn-link {
  background-color: transparent;
  color: var(--color-brand);
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  min-height: 48px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  &:hover {
    color: hsl(230, 65%, 45%);
    text-decoration-thickness: 2px;
  }
  
  &:active {
    color: hsl(230, 65%, 35%);
  }
  
  &:disabled {
    color: var(--color-stroke-weak);
    cursor: not-allowed;
    text-decoration: none;
  }
}

/* Spacing Utility Classes */
.space-xs { margin: var(--space-xs); }
.space-s { margin: var(--space-s); }
.space-m { margin: var(--space-m); }
.space-l { margin: var(--space-l); }
.space-xl { margin: var(--space-xl); }
.space-xxl { margin: var(--space-xxl); }

/* Spacing Variations */
.space-xs-t { margin-top: var(--space-xs); }
.space-xs-r { margin-right: var(--space-xs); }
.space-xs-b { margin-bottom: var(--space-xs); }
.space-xs-l { margin-left: var(--space-xs); }
.space-xs-x { margin-left: var(--space-xs); margin-right: var(--space-xs); }
.space-xs-y { margin-top: var(--space-xs); margin-bottom: var(--space-xs); }

.space-s-t { margin-top: var(--space-s); }
.space-s-r { margin-right: var(--space-s); }
.space-s-b { margin-bottom: var(--space-s); }
.space-s-l { margin-left: var(--space-s); }
.space-s-x { margin-left: var(--space-s); margin-right: var(--space-s); }
.space-s-y { margin-top: var(--space-s); margin-bottom: var(--space-s); }

.space-m-t { margin-top: var(--space-m); }
.space-m-r { margin-right: var(--space-m); }
.space-m-b { margin-bottom: var(--space-m); }
.space-m-l { margin-left: var(--space-m); }
.space-m-x { margin-left: var(--space-m); margin-right: var(--space-m); }
.space-m-y { margin-top: var(--space-m); margin-bottom: var(--space-m); }

.space-l-t { margin-top: var(--space-l); }
.space-l-r { margin-right: var(--space-l); }
.space-l-b { margin-bottom: var(--space-l); }
.space-l-l { margin-left: var(--space-l); }
.space-l-x { margin-left: var(--space-l); margin-right: var(--space-l); }
.space-l-y { margin-top: var(--space-l); margin-bottom: var(--space-l); }

.space-xl-t { margin-top: var(--space-xl); }
.space-xl-r { margin-right: var(--space-xl); }
.space-xl-b { margin-bottom: var(--space-xl); }
.space-xl-l { margin-left: var(--space-xl); }
.space-xl-x { margin-left: var(--space-xl); margin-right: var(--space-xl); }
.space-xl-y { margin-top: var(--space-xl); margin-bottom: var(--space-xl); }

.space-xxl-t { margin-top: var(--space-xxl); }
.space-xxl-r { margin-right: var(--space-xxl); }
.space-xxl-b { margin-bottom: var(--space-xxl); }
.space-xxl-l { margin-left: var(--space-xxl); }
.space-xxl-x { margin-left: var(--space-xxl); margin-right: var(--space-xxl); }
.space-xxl-y { margin-top: var(--space-xxl); margin-bottom: var(--space-xxl); }


/* Padding Utility Classes */
.pad-xs { padding: var(--space-xs); }
.pad-s { padding: var(--space-s); }
.pad-m { padding: var(--space-m); }
.pad-l { padding: var(--space-l); }
.pad-xl { padding: var(--space-xl); }
.pad-xxl { padding: var(--space-xxl); }

/* Padding Variations */
.pad-xs-t { padding-top: var(--space-xs); }
.pad-xs-r { padding-right: var(--space-xs); }
.pad-xs-b { padding-bottom: var(--space-xs); }
.pad-xs-l { padding-left: var(--space-xs); }
.pad-xs-x { padding-left: var(--space-xs); padding-right: var(--space-xs); }
.pad-xs-y { padding-top: var(--space-xs); padding-bottom: var(--space-xs); }

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


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


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

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

.text-weak {
    color: #6c757d;
}