/* ==========================================================================
   🌿 NIERenew — 차세대 인터랙티브 디자인 시스템
   Natural Canopy, River, Soil palette + Modern Glassmorphism & Micro-animations
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;1,400;1,600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Color Palette */
  --forest-950: #0a1710;
  --forest-900: #0f241a;
  --forest-800: #173829;
  --forest-700: #22523c;
  --forest-600: #317254;
  --forest-500: #429871;
  --sage-300: #b5cca8;
  --sage-200: #dce8d5;
  --sage-100: #f0f5ed;
  
  --paper: #f4f6f0;
  --paper-dim: #e9eee4;
  --paper-pure: #ffffff;
  
  --ink: #121c16;
  --ink-soft: #435449;
  --ink-light: #708477;
  
  --amber: #e2a84b;
  --amber-deep: #b8812c;
  --amber-light: #fff8eb;
  --water: #2c7a8b;
  --water-light: #e8f5f8;
  
  --line: rgba(18, 28, 22, 0.1);
  --line-strong: rgba(18, 28, 22, 0.2);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-bg: rgba(255, 255, 255, 0.75);
  
  --font-display: 'Pretendard', -apple-system, sans-serif;
  --font-body: 'Pretendard', -apple-system, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --container: 1240px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(10, 23, 16, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(10, 23, 16, 0.1);
  --shadow-lg: 0 20px 40px -10px rgba(10, 23, 16, 0.18);
  --shadow-glow: 0 0 30px rgba(226, 168, 75, 0.35);
}

*{ box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  word-break: keep-all;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}
@media(max-width: 720px) { .wrap { padding: 0 20px; } }

/* -------------------- Interactive Spotlight Cursor Tracking Layer -------------------- */
#spotlight-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 400px; height: 400px;
  margin-top: -200px; margin-left: -200px;
  background: radial-gradient(circle, rgba(49, 114, 84, 0.08) 0%, rgba(226, 168, 75, 0.03) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  transition: transform 0.15s ease-out, opacity 0.3s ease;
  opacity: 0;
}
body:hover #spotlight-cursor { opacity: 1; }

/* -------------------- Accessibility Skip Link & Focus -------------------- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--forest-900); color: #fff;
  padding: 12px 20px; z-index: 999; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2.5px solid var(--amber); outline-offset: 3px;
}

/* -------------------- Header / Navigation -------------------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(244, 246, 240, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px;
}
.brand {
  display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.02em;
}
.brand img { height: 34px; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06)); }

.main-nav { display: flex; gap: 36px; }
.main-nav a {
  font-size: 15.5px; font-weight: 600; color: var(--ink-soft); position: relative; padding: 8px 0;
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--forest-800); }
.main-nav a[aria-current="page"] { color: var(--forest-800); font-weight: 700; }
.main-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
  background: var(--forest-600); border-radius: 999px;
}

.header-tools { display: flex; align-items: center; gap: 14px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-full);
  padding: 8px 16px; background: #fff; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-box:focus-within {
  border-color: var(--forest-600); box-shadow: 0 0 0 3px rgba(49, 114, 84, 0.15);
}
.search-box input {
  border: 0; outline: 0; font-size: 13.5px; width: 160px; background: transparent; color: var(--ink);
  font-family: var(--font-body);
}
.search-box svg { flex: none; opacity: 0.65; color: var(--forest-800); }
.search-box, .big-search { position: relative; }

/* -------------------- Search Autocomplete Dropdown -------------------- */
.search-dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 300;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); overflow: hidden; max-height: 340px; overflow-y: auto;
}
.search-dropdown-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px; font-size: 14px;
  border-bottom: 1px solid var(--line); color: var(--ink); transition: background 0.15s ease;
}
.search-dropdown-item:last-child { border-bottom: 0; }
.search-dropdown-item:hover { background: var(--sage-100); }
.search-dropdown-item .sd-type {
  flex: none; font-size: 10.5px; font-weight: 700; color: var(--forest-800); background: var(--sage-200);
  padding: 3px 9px; border-radius: var(--radius-full);
}
.search-dropdown-item .sd-title { font-weight: 700; }
.search-dropdown-item .sd-sub { margin-left: auto; color: var(--ink-soft); font-size: 12px; font-family: var(--font-serif); font-style: italic; }
.search-dropdown-empty { padding: 18px; font-size: 13.5px; color: var(--ink-soft); text-align: center; }

.nav-toggle { display: none; background: none; border: 0; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

@media(max-width: 900px) {
  .main-nav {
    position: fixed; inset: 80px 0 0 0; background: var(--paper); flex-direction: column;
    padding: 32px 24px; gap: 8px; transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: .25s ease;
  }
  .main-nav a { font-size: 20px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  body.nav-open .main-nav { opacity: 1; transform: none; pointer-events: auto; }
  .nav-toggle { display: block; }
  .search-box { display: none; }
}

/* -------------------- Modern Buttons -------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap; box-shadow: var(--shadow-sm); cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--forest-800); color: #fff; }
.btn-primary:hover { background: var(--forest-900); }
.btn-amber { background: var(--amber); color: #241a08; }
.btn-amber:hover { background: var(--amber-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--forest-800); border-color: var(--line-strong); box-shadow: none; }
.btn-ghost:hover { border-color: var(--forest-600); background: rgba(49, 114, 84, 0.08); }
.btn-outline-invert { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.4); backdrop-filter: blur(8px); }
.btn-outline-invert:hover { background: rgba(255, 255, 255, 0.25); border-color: #fff; }

/* -------------------- Eyebrow & Section Heads -------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--forest-600); font-weight: 600;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--forest-600); border-radius: 999px; }
.section-head { margin-bottom: 44px; max-width: 680px; }
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.025em; margin-top: 12px; color: var(--forest-950);
  line-height: 1.25;
}
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 16.5px; line-height: 1.65; }
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-alt { background: var(--paper-dim); }
.section-dark { background: var(--forest-950); color: var(--sage-200); position: relative; }
.section-dark .section-head h2 { color: #fff; }
.section-dark .section-head p { color: var(--sage-300); }

.sci { font-family: var(--font-serif); font-style: italic; color: var(--ink-soft); font-weight: 400; }

/* -------------------- Footer -------------------- */
.site-footer { background: var(--forest-950); color: var(--sage-300); padding: 64px 0 28px; position: relative; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 30px; filter: brightness(0) invert(1); opacity: .9; }
.footer-links { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--sage-300); opacity: .85; transition: color .2s; }
.footer-links a:hover { opacity: 1; color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; padding-top: 24px; font-size: 13.5px; color: rgba(220, 232, 213, 0.65); }
.footer-bottom address { font-style: normal; line-height: 1.8; }
.wa-mark { height: 36px; width: auto; opacity: .9; border-radius: 4px; }

/* -------------------- Reveal-on-scroll -------------------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* -------------------- Utility Grid Cards & 3D Tilt -------------------- */
.card {
  background: var(--paper-pure); border: 1px solid var(--line); border-radius: var(--radius-md);
  overflow: hidden; transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  position: relative; display: flex; flex-direction: column;
}
.card:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--line-strong);
}
.tilt-glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease; mix-blend-mode: overlay;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255,255,255,0.4) 0%, transparent 60%);
}
[data-tilt] { perspective: 800px; }
.card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--sage-200); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-media img { transform: scale(1.06); }
.card-tag {
  position: absolute; top: 14px; left: 14px; background: rgba(10, 23, 16, 0.82); color: #fff;
  font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: var(--radius-full); letter-spacing: .02em;
  backdrop-filter: blur(4px);
}
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--forest-950); }
.card-body p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.card-link { margin-top: auto; padding-top: 16px; font-size: 14px; font-weight: 700; color: var(--forest-600); display: inline-flex; gap: 6px; align-items: center; }

/* -------------------- Secondary Page Hero -------------------- */
.page-hero {
  position: relative; min-height: 360px; display: flex; align-items: flex-end;
  background: var(--forest-950); color: #fff; overflow: hidden;
}
.page-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; filter: contrast(1.05); }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,23,16,0.2) 0%, rgba(10,23,16,0.92) 100%); }
.page-hero .wrap { position: relative; z-index: 2; padding-bottom: 56px; padding-top: 124px; }
.page-hero .eyebrow { color: var(--sage-300); }
.page-hero .eyebrow::before { background: var(--sage-300); }
.page-hero h1 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; margin-top: 14px; letter-spacing: -0.025em; line-height: 1.2; }
.page-hero p { margin-top: 14px; max-width: 600px; color: var(--sage-200); font-size: 16px; line-height: 1.6; }
