/* === BASE STYLES ===
   기본적인 HTML 요소들의 스타일과 전역 설정을 정의합니다. */

/* 기존 스타일과 충돌 방지를 위해 기본 리셋 제거 */

/* 기존 HTML & body 스타일과 충돌 방지를 위해 제거 */

/* === 접근성 === */

/* 스킵 링크 */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--text-light);
  padding: 0.8rem 1.2rem;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 3px solid var(--revealed);
  outline-offset: 2px;
}

/* 키보드 사용자를 위한 포커스 링 */
.btn:focus-visible,
.tab:focus-visible,
input:focus-visible,
.slot-machine .reel:focus-visible,
.competency-tab:focus-visible {
  outline: 3px solid var(--revealed);
  outline-offset: 2px;
}

/* 스크린 리더 전용 텍스트 */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* === 모션 감소 지원 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto;
  }
}

/* === 기본 타이포그래피 === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

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

/* === 링크 === */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

/* === 폼 요소 === */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

input[type="text"], 
input[type="email"], 
input[type="password"],
textarea {
  border: 3px solid #000000; /* 검은색 외곽선 */
  border-radius: 0; /* 평면 형태 */
  padding: var(--space-sm) var(--space-md);
  background: rgba(10, 18, 42, 0.7); /* 네이비 배경 */
  color: var(--text-light); /* 크림색 텍스트 */
  transition: border-color 0.2s ease;
  box-shadow: none; /* 그림자 제거 */
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus,
textarea:focus {
  border-color: #000000; /* 포커스 시에도 검은색 */
  border-width: 4px; /* 포커스 시 두꺼운 테두리 */
  outline: none;
}

/* 하위 층위 구분: '단계 활동' 및 '세부사항' 입력 들여쓰기 */
input[placeholder="단계 활동"],
input[placeholder="세부사항"] {
  margin-left: var(--space-md);
  width: calc(100% - var(--space-md));
  box-sizing: border-box;
}

/* === 유틸리티 클래스 === */
.hidden {
  display: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* === 플렉스 유틸리티 === */
.flex {
  display: flex;
}

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

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

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

/* === 그리드 유틸리티 === */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}

/* === 아이콘 === */
.icon {
  width: 2.4rem;
  height: 2.4rem;
  fill: currentColor;
}
