/**
 * DEHN Design System - Base Styles
 *
 * This file contains the base styles from the DEHN design system component library.
 * These styles define the foundational colors, typography, and element styling.
 *
 * For more information, see the design system Storybook:
 * https://storybook.mercury.dev.aws.dds-cloud.net/
 */

/* ========================================
   FONTS
   ======================================== */

@font-face {
  font-display: swap;
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400;
  src: url('https://cdn.dehn.cloud/shared/fonts/noto-sans/v36/noto-sans-latin-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 400;
  src: url('https://cdn.dehn.cloud/shared/fonts/noto-sans/v36/noto-sans-latin-italic.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 700;
  src: url('https://cdn.dehn.cloud/shared/fonts/noto-sans/v36/noto-sans-latin-700.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 700;
  src: url('https://cdn.dehn.cloud/shared/fonts/noto-sans/v36/noto-sans-latin-700italic.woff2') format('woff2');
}

/* ========================================
   COLOR VARIABLES
   ======================================== */

:root {
  /* Primary colors */
  --dehn-red: #e30002;
  --dehn-realwhite: #ffffff;

  /* Secondary colors */
  --dehn-offwhite: #f9f8f6;
  --dehn-textgrey: #5b5b5d;
  --dehn-realblack: #000000;
  --dehn-eerieblack: #1f1f1e;
  --dehn-heatwave: #fb7d0e;
  --dehn-selectyellow: #febc39;
  --dehn-eagle: #015b6b;
  --dehn-gainsboro: #dee3e3;
  --dehn-anthrazit: #30414f;

  /* Semantic colors */
  --dehn-successgreen: #006f2c;
  --dehn-dangerred: #a4130e;
  --dehn-infoblue: #02c3e5;

  /* Process colors */
  --dehn-red-75: #e53942;
  --dehn-red-50: #f2797f;
  --dehn-red-25: #f2b5b8;
  --dehn-red-10: #ffe5e7;
  --dehn-black-75: #40403e;
  --dehn-black-50: #80807b;
  --dehn-black-25: #bfbfb9;
  --dehn-black-10: #e5e5de;

  /* Font stack */
  --dehn-fontstack: 'Noto Sans', 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   BASE TYPOGRAPHY
   ======================================== */

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

body {
  font-family: var(--dehn-fontstack);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5rem;
  color: var(--dehn-textgrey);
  background-color: var(--dehn-realwhite);
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

small,
.small {
  font-size: 0.75em;
}

p {
  margin-top: 1.5rem;
}

p:first-child {
  margin-top: 0;
}

/* Lead paragraph style */
.lead {
  font-size: 1.25rem;
  line-height: 1.875rem;
}

/* ========================================
   HEADINGS
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  margin-top: 1.5rem;
  color: var(--dehn-eerieblack);
}

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

h1 {
  font-size: 3.5rem;
  line-height: 4rem;
  letter-spacing: -0.02ch;
}

h2 {
  font-size: 3rem;
  line-height: 3.5rem;
  letter-spacing: -0.02ch;
}

h3 {
  font-size: 2.5rem;
  line-height: 3rem;
  letter-spacing: -0.01ch;
}

h4 {
  font-size: 2rem;
  line-height: 2.5rem;
  letter-spacing: -0.01ch;
}

h5 {
  font-size: 1.5rem;
  line-height: 2rem;
}

h6 {
  font-size: 1.25rem;
  line-height: 1.5rem;
}

/* Responsive typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
    line-height: 3rem;
  }

  h2 {
    font-size: 2rem;
    line-height: 2.5rem;
  }

  h3 {
    font-size: 1.75rem;
    line-height: 2.25rem;
  }

  h4 {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

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

a {
  color: var(--dehn-red);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--dehn-red-75);
  text-decoration: underline;
}

/* ========================================
   BUTTONS
   ======================================== */

button,
.button {
  font-family: var(--dehn-fontstack);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.button-primary {
  background-color: var(--dehn-red);
  color: var(--dehn-realwhite);
}

.button-primary:hover {
  background-color: var(--dehn-red-75);
}

.button-secondary {
  background-color: var(--dehn-gainsboro);
  color: var(--dehn-eerieblack);
}

.button-secondary:hover {
  background-color: var(--dehn-black-25);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--dehn-gainsboro);
}

th {
  font-weight: 600;
  color: var(--dehn-eerieblack);
  background-color: var(--dehn-offwhite);
}

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

/* Background colors */
.bg-red { background-color: var(--dehn-red); }
.bg-offwhite { background-color: var(--dehn-offwhite); }
.bg-eagle { background-color: var(--dehn-eagle); }
.bg-gainsboro { background-color: var(--dehn-gainsboro); }

/* Text colors */
.text-red { color: var(--dehn-red); }
.text-white { color: var(--dehn-realwhite); }
.text-grey { color: var(--dehn-textgrey); }
.text-black { color: var(--dehn-eerieblack); }

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