/* Base Styles - unlujenerator.com
 * Reset, tipografi ve temel stiller.
 */

@layer base {
  /* CSS Reset (modern sade) */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  * {
    margin: 0;
  }

  html:focus-within {
    scroll-behavior: smooth;
  }

  body {
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    line-height: var(--lh);
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
  }

  img,
  svg,
  video,
  canvas {
    max-width: 100%;
    display: block;
    height: auto;
  }

  a {
    color: inherit;
    text-decoration-color: var(--color-secondary);
  }

  a:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
    border-radius: 2px;
  }

  button,
  input,
  select,
  textarea {
    font: inherit;
  }

  :focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
  }

  /* Başlıklar */
  h1 {
    font-size: var(--fs-h1);
  }

  h2 {
    font-size: var(--fs-h2);
  }

  h3 {
    font-size: var(--fs-h3);
  }

  h4 {
    font-size: var(--fs-h4);
  }

  h5 {
    font-size: var(--fs-h5);
  }

  h6 {
    font-size: var(--fs-h6);
  }

  p {
    margin-block: 0 var(--space-4);
  }
}

/* Yardımcılar */
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-small {
  font-size: var(--fs-small);
}

.flow > * + * {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.py-6 {
  padding-block: var(--space-6);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

.visually-hidden:focus {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  padding: 8px;
  background: #fff;
  border: 2px solid var(--color-secondary);
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
  clip: auto;
  height: auto;
  width: auto;
}
