/* ================================================
   RELLA Common Styles
   공통 스타일 (랜딩, 회사소개, SPA 공통 사용)
   ================================================ */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Fonts */
@font-face {
  font-family: 'HakgyoansimDunggeunmiso';
  src: url('/fonts/Hakgyoansim Dunggeunmiso TTF R.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'HakgyoansimDunggeunmiso';
  src: url('/fonts/Hakgyoansim Dunggeunmiso TTF B.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aridadaburi';
  src: url('/fonts/AritaBuriKR-Medium.ttf') format('truetype');
  font-display: swap;
}

/* CSS Variables - Design System */
:root {
  /* Gradients */
  --main-bg-gradient: linear-gradient(135deg, #FFF8DC 0%, #FFED9F 50%, #FFE88A 100%);
  --card-bg-gradient: linear-gradient(257deg, #fffae6 0%, #FFF4E6 100%);
  --purple-gradient: linear-gradient(223deg, #c799f7 0%, #c18cf3 100%);
  --button-gradient: linear-gradient(224deg, #c799f7 0%, #b574f3 100%);
  --text-gradient: linear-gradient(260deg, #ba76ff 0%, #b478f1 100%);

  /* Colors */
  --white: #ffffff;
  --dark-purple: #3b2141;
  --brown: #9f7737;
  --purple: #b97ef5;
  --purple-dark: #b87af3;
  --light-yellow: #f6e8b19c;
  --shadow-yellow: #e9e3ad8f;
  --shadow-gold: #FFD87A;

  /* Text Colors */
  --text-primary: #2d2d2d;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  /* Border & Divider */
  --border-light: #e5e7eb;

  /* Status Colors */
  --success-green: #10b981;
  --warning-orange: #f59e0b;
  --error-red: #ef4444;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 20px;
  --spacing-lg: 30px;
  --spacing-xl: 50px;

  /* Border Radius */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-xl: 50px;

  /* Shadows */
  --shadow-card: 4px 4px 80px var(--shadow-yellow), inset -4px 5px 15px rgba(255, 255, 255, 0.5);
  --shadow-button: 0px 4px 15px rgba(185, 126, 245, 0.3);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-modal: 1000;
  --z-nav: 100;
  --z-dropdown: 50;
}

/* Typography */
body {
  font-family: 'HakgyoansimDunggeunmiso', "Inter", -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  min-height: 100vh;
  background: var(--main-bg-gradient);
  overflow-x: hidden;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: 48px;
}

h2 {
  font-size: 36px;
}

h3 {
  font-size: 24px;
}

h4 {
  font-size: 20px;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 20px;
  }

  h4 {
    font-size: 18px;
  }
}

/* Links */
a {
  color: var(--purple);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

/* Buttons - Base Styles */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-normal);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================================================
   NAVIGATION - 공통 네비게이션
   ================================================ */

.main-nav {
  width: 100%;
  padding: 20px 40px;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  transition: var(--transition-smooth);
}

.main-nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
}

/* Logo */
.nav-logo {
  font-family: "Itim", "Comic Sans MS", cursive, sans-serif;
  font-size: 36px;
  font-weight: 400;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(185, 126, 245, 0.3);
}

/* Nav Center Group (Links only) */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  list-style: none;
}

.nav-links a {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--purple);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--button-gradient);
  transition: width var(--transition-fast);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Nav Right Group (Language + Auth + CTA) */
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-left: auto;
}

/* Language Switcher */
.nav-language-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-lang-btn {
  background: none;
  border: none;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-lang-btn.active {
  color: var(--purple);
}

.nav-lang-btn:hover {
  color: var(--purple);
}

.nav-lang-divider {
  color: var(--text-muted);
  font-size: 14px;
}

/* Auth Links (Login/Logout) */
#navAuthItem a {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-fast);
  white-space: nowrap;
}

#navAuthItem a:hover {
  color: var(--purple);
}

/* CTA Button in Nav */
.nav-cta {
  padding: 12px 24px;
  background: var(--button-gradient);
  color: var(--white);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-button);
  transition: var(--transition-normal);
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0px 6px 20px rgba(185, 126, 245, 0.4);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .main-nav {
    padding: 15px 20px;
  }

  .nav-logo {
    font-size: 28px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-center {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 30px 30px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right var(--transition-smooth);
    transform: none;
    left: auto;
  }

  .nav-center.active {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: var(--spacing-md);
  }

  .nav-links a {
    font-size: 18px;
    width: 100%;
    padding: 12px 0;
  }

  .nav-right {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 180px 30px 30px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right var(--transition-smooth);
    margin-left: 0;
    gap: var(--spacing-lg);
  }

  .nav-center.active ~ .nav-right {
    right: 0;
  }

  .nav-language-switcher {
    width: 100%;
  }

  #navAuthItem {
    width: 100%;
  }

  #navAuthItem a {
    font-size: 18px;
    display: block;
    padding: 12px 0;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
  }
}

/* ================================================
   FOOTER - 공통 푸터
   ================================================ */

.main-footer {
  width: 100%;
  padding: 50px 40px 30px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  margin-top: auto;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
}

/* Footer Brand */
.footer-brand {
  flex: 1;
}

.footer-logo {
  font-family: "Itim", "Comic Sans MS", cursive, sans-serif;
  font-size: 32px;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--spacing-sm);
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* Footer Links */
.footer-links {
  display: flex;
  gap: 50px;
}

.footer-column h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.footer-column a {
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-column a:hover {
  color: var(--purple);
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
}

.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 50%;
  color: var(--purple);
  font-size: 18px;
  transition: var(--transition-normal);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(185, 126, 245, 0.3);
}

/* Mobile Footer */
@media (max-width: 768px) {
  .main-footer {
    padding: 30px 20px 20px;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ================================================
   UTILITY CLASSES
   ================================================ */

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

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

.hidden {
  display: none !important;
}

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

.text-gradient {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
