/* ========================================
   1. CSS Custom Properties
   ======================================== */
:root {
  --primary: #0A2463;
  --primary-light: #1B3A7B;
  --primary-pale: #E8EDF5;
  --accent: #1B3A7B;
  --accent-hover: #0A2463;
  --text: #222;
  --text-muted: #555;
  --text-on-dark: #fff;
  --bg-white: #fff;
  --bg-gray: #F5F7FA;
  --border: #D8DDE5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
  --max-width: 1200px;
  --header-height: 64px;
}

/* ========================================
   2. Reset & Base
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg-white);
}

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

ul, ol {
  list-style: none;
}

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

/* ========================================
   3. Layout Utilities
   ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 72px 0;
}

.section--white {
  background: var(--bg-white);
}

.section--gray {
  background: var(--bg-gray);
}

.section--dark {
  background: var(--primary);
  color: var(--text-on-dark);
}

.flash-banner {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.flash-banner p {
  font-size: 0.9375rem;
  font-weight: 600;
}

.flash-banner--success {
  background: #edf7ef;
  color: #1f6f3d;
}

.flash-banner--error {
  background: #fff2f1;
  color: #a61d24;
}

/* ========================================
   4. Typography
   ======================================== */
h1, h2, h3, h4 {
  line-height: 1.35;
  font-weight: 700;
}

h2 {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 12px;
}

h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.section-header {
  margin-bottom: 36px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 640px;
}

.section-header--light h2 {
  color: var(--text-on-dark);
}

.section-header--light p {
  color: rgba(255,255,255,0.75);
}

/* ========================================
   5. Buttons
   ======================================== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-join {
  background: var(--accent);
  color: #fff;
  padding: 8px 20px;
  font-size: 0.875rem;
}

.btn-join:hover {
  background: var(--accent-hover);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8125rem;
}

/* ========================================
   6. Header & Navigation
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  transition: box-shadow 0.2s;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-height);
  max-width: 1400px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  border-radius: 4px;
}

.logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text strong {
  font-size: 0.8125rem;
}

.logo-text small {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.main-nav a {
  padding: 6px 7px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--primary);
  background: var(--primary-pale);
}

.header-inner .btn-join {
  flex-shrink: 0;
  margin-left: 8px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 36px;
  padding: 0 12px;
  margin-left: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--bg-white);
}

.lang-switch:hover {
  background: var(--primary-pale);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ========================================
   7. Hero
   ======================================== */
.hero {
  background: var(--primary);
  color: var(--text-on-dark);
  padding: 64px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: center;
}

.hero-tagline {
  font-size: 0.9375rem;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.35;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.75;
  opacity: 0.85;
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-card {
  background: var(--bg-white);
  color: var(--text);
  padding: 32px 28px;
  border-radius: 4px;
  box-shadow: var(--shadow-md);
}

.hero-card h3 {
  font-size: 1.125rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.hero-card ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 24px;
}

.hero-card ul li {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 6px;
}

/* ========================================
   8. Cards (shared)
   ======================================== */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card--dark {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: var(--text-on-dark);
}

.card--dark h3 {
  color: var(--text-on-dark);
}

.card--dark p {
  color: rgba(255,255,255,0.75);
}

/* ========================================
   9. Section: About
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.greeting-card {
  background: var(--primary-pale);
  border-color: transparent;
}

.greeting-card h3 {
  color: var(--primary);
}

.signature {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--primary);
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.greeting-content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.chairman-photo {
  flex-shrink: 0;
  width: 160px;
}

.chairman-photo img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.greeting-text {
  flex: 1;
}

.news-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.btn-filter {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--bg-gray);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-filter:hover {
  background: var(--primary-pale);
}

.post-header {
  margin-bottom: 24px;
}

.post-header h2 {
  margin-top: 8px;
}

.post-date {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.post-content {
  min-height: 200px;
  line-height: 1.8;
}

.post-content img {
  max-width: 100%;
  height: auto;
}

.doc-list {
  border-top: 2px solid var(--primary);
}

/* ========================================
   10. Section: Join
   ======================================== */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

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

.benefit-num {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.process-card {
  max-width: 480px;
}

.join-apply-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 20px;
  align-items: start;
}

.process-card ol {
  list-style: decimal;
  padding-left: 20px;
  margin: 16px 0 20px;
}

.process-card ol li {
  margin-bottom: 8px;
  color: var(--text-muted);
}

.process-card .btn {
  margin-bottom: 12px;
}

.join-action-card p {
  color: var(--text-muted);
}

.join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 18px;
}

.btn-light {
  background: var(--bg-gray);
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-light:hover {
  background: var(--primary-pale);
}

.join-action-list {
  list-style: disc;
  padding-left: 20px;
}

.join-action-list li {
  margin-bottom: 6px;
  color: var(--text-muted);
}

.note {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.join-form-section {
  margin-top: 40px;
}

.join-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.join-form-card,
.join-form-info {
  background: var(--bg-white);
}

.join-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row--full {
  grid-column: 1 / -1;
}

.form-row label {
  font-size: 0.875rem;
  font-weight: 600;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
}

.signature-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.signature-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.signature-section__header p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.signature-pad-shell {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background:
    linear-gradient(to bottom, rgba(10, 36, 99, 0.02), rgba(10, 36, 99, 0.02)),
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 35px,
      rgba(216, 221, 229, 0.7) 35px,
      rgba(216, 221, 229, 0.7) 36px
    ),
    #fff;
}

.signature-pad {
  display: block;
  width: 100%;
  height: 220px;
  touch-action: none;
  cursor: crosshair;
}

.signature-upload {
  margin-top: 14px;
}

.signature-upload label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
}

.signature-upload input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.signature-error {
  margin-top: 10px;
  color: #c62828;
  font-size: 0.875rem;
  font-weight: 600;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.checkbox-row input {
  margin-top: 4px;
}

.join-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.join-form-note {
  margin-top: 14px;
}

.join-form-info ol {
  list-style: decimal;
  padding-left: 20px;
  margin: 12px 0 16px;
}

.join-form-info li {
  margin-bottom: 8px;
  color: var(--text-muted);
}

/* ========================================
   11. Section: News
   ======================================== */
.news-list {
  border-top: 2px solid var(--primary);
}

.news-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.news-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 2px;
  text-align: center;
  white-space: nowrap;
}

.tag-notice { background: var(--primary); color: #fff; }
.tag-bargain { background: #2E6B4F; color: #fff; }
.tag-press { background: #555; color: #fff; }
.tag-activity { background: #6B5B2E; color: #fff; }

.news-title {
  font-size: 0.9375rem;
  font-weight: 500;
}

.news-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.news-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-more {
  margin-top: 16px;
  text-align: right;
}

.news-more a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

.news-more a:hover {
  text-decoration: underline;
}

/* ========================================
   12. Section: Bargaining
   ======================================== */
.bargaining-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 16px;
}

.timeline-step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-step:last-child {
  border-bottom: none;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.timeline-step strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-step p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.doc-card h3 {
  color: var(--primary);
}

/* ========================================
   13. Section: Resources
   ======================================== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.resource-card h3 {
  color: var(--primary);
}

/* ========================================
   14. Section: Transparency
   ======================================== */
.transparency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ========================================
   15. Section: Support
   ======================================== */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 36px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 2px;
}

.faq-section {
  margin-top: 8px;
}

.faq-section h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

details {
  border-bottom: 1px solid var(--border);
}

summary {
  padding: 16px 0;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-left: 16px;
}

details[open] summary::after {
  content: "\2212";
}

details p {
  padding: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ========================================
   16. Section: Community
   ======================================== */
.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ========================================
   17. Section: Contact
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ========================================
   18. Footer
   ======================================== */
.site-footer {
  background: #0D1B3E;
  color: rgba(255,255,255,0.8);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 20px;
}

.footer-brand strong {
  display: block;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
  color: #fff;
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  font-size: 0.8125rem;
  opacity: 0.75;
  transition: opacity 0.15s;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-contact p {
  font-size: 0.8125rem;
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
}

.footer-bottom p {
  font-size: 0.75rem;
  opacity: 0.5;
  text-align: center;
}

/* ========================================
   19. Scroll Reveal
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   20. Responsive: Tablet (max 1024px)
   ======================================== */
@media (max-width: 1024px) {
  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
    gap: 0;
    border-top: 1px solid var(--border);
    overflow-y: auto;
    z-index: 99;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .header-inner .btn-join {
    display: none;
  }

  .lang-switch {
    margin-left: auto;
    margin-right: 8px;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.is-active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-card {
    max-width: 420px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .benefit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .join-apply-grid {
    grid-template-columns: 1fr;
  }

  .doc-grid {
    grid-template-columns: 1fr 1fr;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .join-form-layout {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* ========================================
   21. Responsive: Mobile (max 768px)
   ======================================== */
@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero {
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 1.625rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    text-align: center;
  }

  .benefit-grid,
  .doc-grid,
  .resource-grid,
  .transparency-grid,
  .community-grid,
  .contact-grid,
  .join-form-grid {
    grid-template-columns: 1fr;
  }

  .news-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 0;
  }

  .news-tag {
    justify-self: start;
  }

  .news-date {
    font-size: 0.75rem;
  }

  .signature-section__header {
    flex-direction: column;
  }

  .signature-pad {
    height: 180px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 20px;
  }
}
