/* =========================================================
   DABBIES — GLOBAL DESIGN SYSTEM
   ========================================================= */


/* ---------------------------------------------------------
   RESET
   --------------------------------------------------------- */

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  padding: 0;
  min-width: 320px;

  background: #151515;
  color: #f1f0ec;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  font-size: 16px;
  line-height: 1.6;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  overflow-x: hidden;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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


/* ---------------------------------------------------------
   DESIGN TOKENS
   --------------------------------------------------------- */

:root {

  /* Backgrounds */
  --color-background: #151515;
  --color-background-soft: #191919;
  --color-surface: #1d1d1d;
  --color-surface-raised: #222222;

  /* Text */
  --color-text: #f1f0ec;
  --color-text-soft: #c8c7c2;
  --color-text-muted: #8f8e89;
  --color-text-faint: #686762;

  /* Borders */
  --color-border: rgba(241, 240, 236, 0.10);
  --color-border-strong: rgba(241, 240, 236, 0.18);

  /* Accent */
  --color-accent: #f1f0ec;
  --color-accent-text: #151515;

  /* Status */
  --color-success: #8fd3a8;
  --color-warning: #dfbd77;
  --color-danger: #dc8989;

  /* Layout */
  --container-width: 1240px;
  --container-padding: 24px;

  /* Radius */
  --radius-small: 6px;
  --radius-medium: 10px;
  --radius-large: 16px;

  /* Motion */
  --transition-fast: 160ms ease;
  --transition-normal: 240ms ease;
  --transition-slow: 420ms ease;

}


/* ---------------------------------------------------------
   CONTAINER
   --------------------------------------------------------- */

.container {
  width: min(
    calc(100% - (var(--container-padding) * 2)),
    var(--container-width)
  );

  margin-inline: auto;
}


/* ---------------------------------------------------------
   TYPOGRAPHY
   --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: -0.035em;
}

p {
  color: var(--color-text-soft);
}

::selection {
  background: #f1f0ec;
  color: #151515;
}


/* ---------------------------------------------------------
   LINKS
   --------------------------------------------------------- */

a {
  transition:
    color var(--transition-fast),
    opacity var(--transition-fast);
}

a:hover {
  opacity: 0.72;
}


/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 44px;
  padding: 0 18px;

  border: 1px solid transparent;
  border-radius: var(--radius-small);

  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;

  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

.button:hover {
  opacity: 1;
}

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

.button--primary {
  background: var(--color-accent);
  color: var(--color-accent-text);
}

.button--primary:hover {
  background: #ffffff;
}

.button--secondary {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.button--secondary:hover {
  background: var(--color-surface);
  border-color: rgba(241, 240, 236, 0.28);
}

.button--text {
  min-height: auto;
  padding: 8px 0;

  background: transparent;
  color: var(--color-text-soft);
}

.button--text:hover {
  color: var(--color-text);
}

.button--large {
  min-height: 52px;
  padding-inline: 24px;
}


/* ---------------------------------------------------------
   FOCUS
   --------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}


/* ---------------------------------------------------------
   FORM ELEMENTS
   --------------------------------------------------------- */

input,
textarea,
select {
  width: 100%;

  color: var(--color-text);
  background: var(--color-surface);

  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-small);

  outline: none;

  transition:
    border-color var(--transition-fast),
    background var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(241, 240, 236, 0.45);
  background: var(--color-surface-raised);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-faint);
}


/* ---------------------------------------------------------
   SCROLLBAR
   --------------------------------------------------------- */

html {
  scrollbar-width: thin;
  scrollbar-color: #4b4b4b #151515;
}

::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: #151515;
}

::-webkit-scrollbar-thumb {
  background: #4b4b4b;
  border-radius: 999px;
  border: 2px solid #151515;
}

::-webkit-scrollbar-thumb:hover {
  background: #666666;
}


/* ---------------------------------------------------------
   REDUCED MOTION
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}


/* ---------------------------------------------------------
   MOBILE FOUNDATION
   --------------------------------------------------------- */

@media (max-width: 700px) {

  :root {
    --container-padding: 18px;
  }

  body {
    font-size: 15px;
  }

  .button {
    min-height: 46px;
  }

}