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

:root {
  --ink: #17201d;
  --muted: #6f7773;
  --line: #dfe3df;
  --paper: #fbfaf6;
  --warm: #f1eee6;
  --forest: #173f35;
  --forest-light: #286754;
  --accent: #bd6d43;
  --white: #fff;
  --shadow: 0 18px 50px rgba(24, 40, 34, .09);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(860px, calc(100% - 40px)); }

.utility { color: #d7e3df; background: #102e27; font-size: 12px; }
.utility-inner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; }
.utility nav { display: flex; gap: 14px; align-items: center; }
.utility form { margin: 0; }
.link-button { padding: 0; border: 0; color: inherit; background: none; cursor: pointer; }
.site-header { position: relative; z-index: 20; background: rgba(251, 250, 246, .97); border-bottom: 1px solid var(--line); }
.masthead { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: flex; gap: 14px; align-items: center; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--forest); font: 700 24px "Noto Serif KR", serif; }
.brand strong { display: block; font: 700 21px "Noto Serif KR", serif; letter-spacing: -.04em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.primary-nav { display: flex; gap: clamp(24px, 4vw, 54px); font-weight: 600; }
.primary-nav a { position: relative; padding: 34px 0; }
.primary-nav a::after { content: ""; position: absolute; right: 0; bottom: 24px; left: 0; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .2s; }
.primary-nav a:hover::after, .primary-nav a:focus-visible::after { transform: scaleX(1); }
.menu-toggle { display: none; border: 1px solid var(--line); background: transparent; padding: 8px 12px; }

.hero { position: relative; height: clamp(480px, 64vw, 690px); overflow: hidden; color: white; background: var(--forest); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(8, 29, 23, .6), transparent 65%); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transform: scale(1.03); transition: opacity .8s, transform 1.2s; background:
  linear-gradient(105deg, rgba(16, 56, 46, .94) 0%, rgba(23, 63, 53, .58) 54%, rgba(23, 63, 53, .15) 100%),
  url("https://images.unsplash.com/photo-1455390582262-044cdead277a?auto=format&fit=crop&w=1800&q=85") center/cover;
}
.hero-slide.secondary { background:
  linear-gradient(105deg, rgba(57, 42, 32, .92), rgba(95, 61, 39, .42)),
  url("https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&w=1800&q=85") center/cover;
}
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero-copy { position: relative; z-index: 2; padding-top: clamp(110px, 17vw, 185px); }
.hero-copy h1 { max-width: 800px; margin: 10px 0 20px; font: 700 clamp(42px, 6.4vw, 78px)/1.18 "Noto Serif KR", serif; letter-spacing: -.055em; }
.hero-copy > p:not(.eyebrow) { max-width: 560px; margin-bottom: 35px; font-size: clamp(16px, 2vw, 20px); color: #e6eeeb; }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .22em; color: #d5ab8e; }
.eyebrow.ink { color: var(--accent); }
.hero-controls { position: absolute; z-index: 3; right: max(20px, calc((100% - 1180px) / 2)); bottom: 38px; display: flex; align-items: center; gap: 16px; }
.hero-controls button { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.45); color: white; background: rgba(0,0,0,.12); cursor: pointer; }
.hero-controls span { min-width: 44px; text-align: center; font-size: 13px; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid var(--forest); border-radius: 2px; color: white; background: var(--forest); font-weight: 600; cursor: pointer; }
.button:hover { background: var(--forest-light); }
.button.light { color: var(--forest); border-color: white; background: white; }
.button.outline { color: var(--forest); background: transparent; }
.button.wide { width: 100%; }
.text-link { color: var(--forest); font-weight: 600; }
.section { padding: clamp(65px, 8vw, 110px) 0; }
.section.warm { background: var(--warm); }
.split-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 34px; }
.split-heading h2 { margin: 0; font: 700 clamp(30px, 4vw, 44px) "Noto Serif KR", serif; }
.news-layout { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 2px solid var(--ink); }
.news-row { display: grid; grid-template-columns: 82px 1fr; gap: 20px; padding: 26px 18px; border-bottom: 1px solid var(--line); }
.news-row:nth-child(odd) { border-right: 1px solid var(--line); }
.news-row time { display: flex; flex-direction: column; color: var(--muted); font-size: 12px; }
.news-row time strong { color: var(--accent); font: 700 34px "Noto Serif KR", serif; line-height: 1; }
.news-row h3 { margin: 0 0 9px; font-size: 17px; }
.news-row h3 a:hover { color: var(--accent); }
.news-row p { margin: 0; color: var(--muted); font-size: 13px; }
.card-grid, .gallery-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery-card { overflow: hidden; background: white; box-shadow: 0 0 0 1px rgba(23,32,29,.08); transition: transform .25s, box-shadow .25s; }
.gallery-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.gallery-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #dfe3df; }
.gallery-card div { padding: 22px; }
.gallery-card p { margin: 0 0 7px; color: var(--accent); font-size: 12px; font-weight: 700; }
.gallery-card h2, .gallery-card h3 { margin: 0 0 10px; font: 600 18px/1.45 "Noto Serif KR", serif; }
.gallery-card span { color: var(--muted); font-size: 12px; }
.community-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.community-grid article { position: relative; min-height: 210px; padding: 40px; background: var(--paper); }
.community-grid span { color: var(--accent); font-weight: 700; }
.community-grid h3 { font: 700 24px "Noto Serif KR", serif; }
.community-grid p { color: var(--muted); }

.page-hero { padding: 76px 0; color: white; background: linear-gradient(120deg, #173f35, #2a5c4e); }
.page-hero.compact { padding: 45px 0; }
.page-hero h1 { margin: 8px 0; font: 700 clamp(36px, 5vw, 54px) "Noto Serif KR", serif; }
.page-hero p:last-child { margin: 0; color: #dce8e4; }
.search-bar { max-width: 720px; margin: 0 auto 48px; display: grid; grid-template-columns: 150px 1fr auto; box-shadow: var(--shadow); }
.search-bar select, .search-bar input { min-height: 50px; padding: 0 16px; border: 1px solid var(--line); background: white; }
.search-bar .button { min-height: 50px; }
.board-meta { padding-bottom: 12px; color: var(--muted); }
.board-meta strong { color: var(--accent); }
.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
.board-table { width: 100%; border-collapse: collapse; background: white; text-align: center; }
.board-table th { padding: 15px 12px; background: #f4f4f0; font-size: 13px; }
.board-table td { padding: 18px 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.board-table .title { min-width: 320px; text-align: left; color: var(--ink); }
.board-table .title a:hover { color: var(--accent); }
.pagination { display: flex; justify-content: center; gap: 7px; margin-top: 38px; }
.pagination a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: white; }
.pagination a[aria-current="page"] { color: white; border-color: var(--forest); background: var(--forest); }
.article-detail header { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.article-detail header h1 { margin: 0 0 20px; font: 700 clamp(27px, 4vw, 40px)/1.4 "Noto Serif KR", serif; }
.post-meta { display: flex; gap: 22px; color: var(--muted); font-size: 13px; }
.post-content { min-height: 210px; padding: 45px 0; white-space: pre-line; line-height: 1.9; }
.post-navigation { margin: 15px 0 35px; border-block: 1px solid var(--line); }
.post-navigation a { display: grid; grid-template-columns: 100px 1fr; padding: 15px; border-bottom: 1px solid var(--line); }
.post-navigation a:last-child { border: 0; }
.post-navigation small { color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 40px 0 10px; }
.photo-grid figure { margin: 0; background: white; box-shadow: 0 0 0 1px var(--line); }
.photo-grid img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.photo-grid figcaption { padding: 12px 15px; color: var(--muted); font-size: 13px; }
.empty { padding: 50px 20px !important; color: var(--muted); text-align: center; }

.auth-section { min-height: 650px; display: grid; place-items: center; padding: 70px 20px; background: linear-gradient(145deg, var(--warm), #e5ebe7); }
.auth-card { width: min(460px, 100%); padding: clamp(30px, 5vw, 52px); background: white; box-shadow: var(--shadow); }
.register-card { width: min(720px, 100%); }
.auth-card h1 { margin: 3px 0 8px; font: 700 36px "Noto Serif KR", serif; }
.subtle { margin: 0 0 30px; color: var(--muted); }
.stack-form { display: grid; gap: 18px; }
.stack-form label:not(.check) { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.stack-form input:not([type="checkbox"]) { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #cdd2ce; background: white; }
.stack-form input:focus { outline: 2px solid rgba(40,103,84,.2); border-color: var(--forest-light); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1/-1; }
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.form-error, .flash { padding: 13px 16px; margin-bottom: 20px; border-left: 3px solid #b73f35; color: #8d2e27; background: #fff1ef; }
.flash { position: fixed; z-index: 50; top: 120px; left: 50%; transform: translateX(-50%); min-width: 280px; box-shadow: var(--shadow); }
.flash.success { border-color: var(--forest-light); color: var(--forest); background: #edf7f2; }
.auth-links { margin: 24px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.auth-links a { color: var(--forest); font-weight: 700; }
.error-card { text-align: center; }

.site-footer { padding: 54px 0 24px; color: #c5d3ce; background: #102e27; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.site-footer strong { color: white; font: 600 21px "Noto Serif KR", serif; }
.site-footer p { margin: 7px 0; font-size: 13px; }
.copyright { margin-top: 35px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 11px; }

@media (max-width: 800px) {
  .container { width: min(100% - 28px, 1180px); }
  .utility > .container > span { display: none; }
  .utility-inner { justify-content: flex-end; }
  .masthead { min-height: 74px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand strong { font-size: 18px; }
  .brand small { display: none; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 108px; right: 0; left: 0; padding: 12px 20px 22px; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .primary-nav a::after { display: none; }
  .hero { height: 530px; }
  .hero-copy { padding-top: 105px; }
  .hero-copy h1 { font-size: 43px; }
  .news-layout, .card-grid, .gallery-list, .community-grid, .footer-grid { grid-template-columns: 1fr; }
  .news-row:nth-child(odd) { border-right: 0; }
  .gallery-list { gap: 18px; }
  .search-bar { grid-template-columns: 110px 1fr; }
  .search-bar .button { grid-column: 1/-1; }
  .board-table th:first-child, .board-table td:first-child,
  .board-table th:last-child, .board-table td:last-child { display: none; }
  .photo-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .post-meta { flex-wrap: wrap; gap: 8px 16px; }
  .post-navigation a { grid-template-columns: 76px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
