@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* ==========================================================================
   1. Design Tokens & CSS Variables
   ========================================================================== */
:root {
  /* Colors - OKLCH (Fallback Variables for Older Browsers) */
  --primary-oklch: 28% 0.05 145; /* Rich Forest Green */
  --accent-oklch: 76% 0.11 82;   /* Warm Gold/Sand */
  --bg-light-oklch: 98% 0.005 85; /* Off-white */
  --bg-dark-oklch: 16% 0.015 60;  /* Charcoal */
  --text-dark-oklch: 20% 0.01 60; /* Slate Gray */
  --text-light-oklch: 95% 0.005 85;

  /* Hex Colors (Direct Fallbacks) */
  --primary: #112e1b;
  --primary-hover: #1b432a;
  --accent: #c5a880;
  --accent-hover: #b3946a;
  --bg-light: #f9f9f8;
  --bg-dark: #1b1a19;
  --text-dark: #2c2b2a;
  --text-light: #f3f3f2;
  --border: #e4e3df;
  --shadow: rgba(0, 0, 0, 0.08);

  /* Fonts */
  --font-display: 'Outfit', 'Noto Sans KR', sans-serif;
  --font-body: 'Inter', 'Noto Sans KR', sans-serif;

  /* Layout */
  --container-max: 1200px;
  --header-height: 88px;
  --header-height-scrolled: 64px;

  /* Animation space support */
  --in-oklab: ;
}

@supports (linear-gradient(in oklab, white, black)) {
  :root {
    --in-oklab: in oklab;
  }
}

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

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

ul, ol {
  list-style: none;
}

/* Focus styles for keyboard navigations */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ==========================================================================
   3. Common Layout & Grid Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section-padding {
  padding-top: 100px;
  padding-bottom: 100px;
}

@media (max-width: 768px) {
  .section-padding {
    padding-top: 60px;
    padding-bottom: 60px;
  }
}

.section-title-area {
  margin-bottom: 50px;
  max-width: 600px;
}

.section-subtitle {
  font-family: var(--font-display);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.85rem;
  }
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

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

.btn-accent:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--primary);
  background-color: transparent;
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--text-light);
  transform: translateY(-2px);
}

.btn-outline-white {
  border-color: var(--text-light);
  background-color: transparent;
  color: var(--text-light);
}

.btn-outline-white:hover {
  background-color: var(--text-light);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   4. Header & Navigation (Sticky & Shrinking)
   ========================================================================== */
.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
}

/* Header states */
.header-wrapper.scrolled,
body:not(.home-page) .header-wrapper {
  height: var(--header-height-scrolled);
  background-color: var(--primary);
  box-shadow: 0 4px 20px var(--shadow);
}

/* Transparent Header in homepage top */
body.home-page .header-wrapper {
  background-color: rgba(17, 46, 27, 0.15);
  backdrop-filter: blur(8px);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.logo a:hover {
  opacity: 0.9;
}

.logo-symbol {
  height: 32px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.logo span {
  color: var(--accent);
}

/* Desktop Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(243, 243, 242, 0.8);
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-light);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-cta .btn {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* Hamburger menu button */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 1010;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-light);
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.hamburger-line:nth-child(1) { top: 0; }
.hamburger-line:nth-child(2) { top: 9px; }
.hamburger-line:nth-child(3) { top: 18px; }

/* Hamburger open state animation */
.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg);
  top: 9px;
}
.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg);
  top: 9px;
}

/* Mobile Menu Navigation */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
  }
  
  .header-cta {
    display: none;
  }
  
  .hamburger-btn {
    display: block;
  }
}

.mobile-menu-wrapper {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--primary);
  z-index: 999;
  padding: 120px 40px 40px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-wrapper.active {
  right: 0;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-light);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--accent);
}

.mobile-menu-footer {
  margin-top: auto;
}

.mobile-menu-footer .btn {
  width: 100%;
  margin-top: 24px;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   5. Footer
   ========================================================================== */
.footer {
  background-color: var(--bg-dark);
  color: rgba(243, 243, 242, 0.7);
  padding-top: 80px;
  padding-bottom: 40px;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 48px;
  margin-bottom: 60px;
}

@media (max-width: 992px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 576px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand .logo-footer {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-light);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.footer-brand .logo-footer .logo-symbol {
  height: 32px;
  width: auto;
  display: block;
}

.footer-brand .logo-footer span {
  color: var(--accent);
}

.footer-brand p {
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 24px;
  position: relative;
}

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

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

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

.footer-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-info-item svg {
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--accent);
}

.footer-info-item span {
  line-height: 1.5;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 576px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   6. Common Inner Header (Breadcrumb / Page Banner)
   ========================================================================== */
.inner-hero {
  background-color: var(--primary);
  background-image: linear-gradient(rgba(17, 46, 27, 0.85), rgba(17, 46, 27, 0.95)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0 80 Q 25 50, 50 70 T 100 40 L 100 100 L 0 100 Z" fill="%231b432a" fill-opacity="0.15"/></svg>');
  background-repeat: repeat-x;
  background-position: bottom;
  color: var(--text-light);
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 60px;
  text-align: center;
}

.inner-hero-title {
  font-size: 2.75rem;
  color: var(--text-light);
  font-weight: 800;
  margin-bottom: 12px;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: rgba(243, 243, 242, 0.7);
}

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

.breadcrumb-separator {
  opacity: 0.5;
}

.breadcrumb-current {
  color: var(--accent);
  font-weight: 500;
}

@media (max-width: 768px) {
  .inner-hero {
    padding-top: calc(var(--header-height-scrolled) + 40px);
    padding-bottom: 40px;
  }
  .inner-hero-title {
    font-size: 2rem;
  }
}

/* ==========================================================================
   7. Dialog Modal (상담하기 모달)
   ========================================================================== */
.dialog-modal {
  border: none;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  background-color: var(--bg-light);
  margin: auto;
  width: 90%;
  max-width: 580px;
  overflow: hidden;
  
  /* 3. Base state and discrete transitions */
  opacity: 0;
  transform: scale(0.95);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.35s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

/* 1. Visible (open) state */
.dialog-modal[open] {
  opacity: 1;
  transform: scale(1);

  /* 2. Starting style for entering animation */
  @starting-style {
    opacity: 0;
    transform: scale(0.95);
  }
}

.dialog-modal::backdrop {
  background-color: rgba(17, 46, 27, 0);
  backdrop-filter: blur(0px);
  transition: 
    display 0.35s allow-discrete,
    overlay 0.35s allow-discrete,
    background-color 0.35s ease-out,
    backdrop-filter 0.35s ease-out;
}

.dialog-modal[open]::backdrop {
  background-color: rgba(17, 46, 27, 0.55);
  backdrop-filter: blur(6px);

  @starting-style {
    background-color: rgba(17, 46, 27, 0);
    backdrop-filter: blur(0px);
  }
}

/* Dialog content styles */
.dialog-header {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-title {
  color: var(--text-light);
  font-size: 1.35rem;
  font-weight: 700;
}

.dialog-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-close-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.dialog-body {
  padding: 32px;
}

.dialog-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-dark);
}

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

.form-checkbox a {
  text-decoration: underline;
  color: var(--primary);
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dialog-modal {
    transform: none;
    transition-duration: 0.1s;
  }

  @starting-style {
    .dialog-modal[open] {
      transform: none;
    }
  }
  
  .dialog-modal::backdrop {
    transition-duration: 0.1s;
  }
}

/* Custom Alert Notification Popups */
.custom-alert {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--primary);
  color: var(--text-light);
  padding: 16px 24px;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.custom-alert.active {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   8. Standard Sub-page CSS Layout Elements
   ========================================================================== */

/* Split Visual Layout (e.g. Vision section, About section) */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

@media (max-width: 992px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.split-image-container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px var(--shadow);
}

.split-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.split-image-container:hover img {
  transform: scale(1.03);
}

/* Stats Layout Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.stat-item {
  background-color: #fff;
  padding: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.stat-number span {
  color: var(--accent);
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 500;
}

/* ==========================================================================
   9. Asymmetric Wide Cards Responsive Grid
   ========================================================================== */
.featured-highlight {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
}

.featured-highlight .highlight-img-box {
  height: 100%;
  min-height: 350px;
}

.featured-highlight .highlight-img-box img {
  height: 100%;
}

.featured-highlight .highlight-card-body {
  padding: 40px;
  justify-content: center;
}

.featured-archive {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
}

.featured-archive .archive-img-box {
  height: 100%;
  min-height: 220px;
}

.featured-archive .archive-img-box img {
  height: 100%;
}

.featured-archive .archive-body {
  justify-content: center;
}

@media (max-width: 992px) {
  .featured-highlight {
    grid-template-columns: 1fr;
  }
  
  .featured-highlight .highlight-img-box {
    height: 300px;
    min-height: auto;
  }
  
  .featured-highlight .highlight-card-body {
    padding: 30px;
  }

  .featured-archive {
    grid-template-columns: 1fr;
  }
  
  .featured-archive .archive-img-box {
    height: 240px;
    min-height: auto;
  }
  
  .featured-archive .archive-body {
    padding: 30px;
  }
}

@media (max-width: 576px) {
  .featured-highlight .highlight-img-box {
    height: 220px;
  }
  
  .featured-highlight .highlight-card-body {
    padding: 24px;
  }

  .featured-archive .archive-img-box {
    height: 180px;
  }
  
  .featured-archive .archive-body {
    padding: 20px;
  }
}

/* ==========================================================================
   10. Responsive Typography & Container Spacing Fine-Tuning
   ========================================================================== */
@media (max-width: 1024px) {
  html {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.4rem; }
  h4 { font-size: 1.15rem; }
}

@media (max-width: 480px) {
  html {
    font-size: 13.5px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  h3 { font-size: 1.25rem; }
}


