/* ==========================================================================
   ACT.7 Base Styles / Reset
   ========================================================================== */

/* ========================================
   CSS RESET
   ======================================== */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-blue);
  background: var(--bg-gradient);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TIPOGRĀFIJA
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-blue);
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

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

p {
  margin-bottom: var(--space-4);
}

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

a:hover {
  color: var(--text-blue-light);
}

strong, b {
  font-weight: var(--font-semibold);
}

/* ========================================
   SARAKSTI
   ======================================== */

ul, ol {
  list-style: none;
}

/* ========================================
   ATTĒLI UN MEDIA
   ======================================== */

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

img {
  border-radius: var(--radius-md);
}

/* ========================================
   FORMAS ELEMENTI
   ======================================== */

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  background: var(--card-white-solid);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  transition: all var(--transition-fast);
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 4px rgba(255, 241, 118, 0.3);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-blue-light);
  opacity: 0.7;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========================================
   TABULAS
   ======================================== */

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

/* ========================================
   CITI ELEMENTI
   ======================================== */

hr {
  border: none;
  border-top: 2px solid var(--border-light);
  margin: var(--space-8) 0;
}

::selection {
  background: var(--accent-yellow);
  color: var(--text-blue);
}

/* ========================================
   UTILITY KLASES
   ======================================== */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.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;
}

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

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

/* Flexbox utilities */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }

  h3 {
    font-size: var(--text-2xl);
  }

  .container {
    padding: 0 var(--space-4);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--text-3xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }
}
