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

:root {
  --font-noto: 'Noto Sans KR';
  --font-gowun: 'Gowun Dodum';
}

:root {
  --ivory: #f7f4ee;
  --ivory-deep: #efe9dd;
  --paper: #fffdf8;
  --ink: #33291f;
  --ink-soft: #6b5e50;
  --muted: #9b8e7d;
  --line: #ddd9c9; /* soft muted sage line */
  --sage: #b7bda6;
  --clay: #c0673f; /* warm terracotta accent */
  --clay-deep: #9d4f2c;
  --clay-soft: #f4e3d8;
  --pin: #c0673f;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-card: 0 12px 26px rgba(51, 41, 31, 0.1);
  --shadow-soft: 0 6px 16px rgba(51, 41, 31, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 92% -6%, rgba(192, 103, 63, 0.08), transparent 26rem),
    repeating-linear-gradient(
      135deg,
      transparent 0 22px,
      rgba(51, 41, 31, 0.014) 22px 23px
    ),
    var(--ivory);
  color: var(--ink);
  font-family: var(--font-noto), ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: -0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  background: var(--ink);
  color: var(--paper);
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-noto), system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.34;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.kicker,
.lane-kicker {
  font-family: var(--font-gowun), var(--font-noto), system-ui, sans-serif;
  color: var(--clay-deep);
  letter-spacing: 0.01em;
}

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

/* ---------- Masthead: noticeboard with pinned-tab row ---------- */
.masthead {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.85), rgba(247, 244, 238, 0.4));
  border-bottom: 1px solid var(--line);
}

.masthead-row {
  width: min(1060px, calc(100% - 44px));
  margin: 0 auto;
  padding: 20px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.wordmark-house {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--clay-soft);
  color: var(--clay-deep);
  border: 1px solid #ecd6c6;
  transform: rotate(-3deg);
}

.wordmark-text strong {
  display: block;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.wordmark-text small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.76rem;
}

.masthead-tagline {
  margin: 0;
  font-family: var(--font-gowun), var(--font-noto), system-ui, sans-serif;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

/* pinned tabs: little paper tabs held by a pin dot */
.pin-tabs {
  width: min(1060px, calc(100% - 44px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0 16px;
}

.pin-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px 7px 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px 4px 9px 9px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.pin-tab:nth-child(odd) {
  transform: rotate(-1.4deg);
}

.pin-tab:nth-child(even) {
  transform: rotate(1.2deg);
}

.pin-tab:hover {
  transform: translateY(-2px) rotate(0deg);
  color: var(--clay-deep);
  border-color: #e6cdbb;
}

.pin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pin);
  box-shadow: 0 0 0 3px rgba(192, 103, 63, 0.16);
}

main {
  width: min(1060px, calc(100% - 44px));
  margin: 0 auto;
}

/* ---------- Lead strip (horizontal: copy + warm photo) ---------- */
.lead-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 34px;
  align-items: center;
  padding: 56px 0 30px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 0.92rem;
}

.lead-copy h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.85rem);
  line-height: 1.3;
}

.lead-lede {
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.82;
  max-width: 30em;
}

.lead-pins {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.lead-pins span {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px dashed var(--sage);
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 600;
}

.lead-photo {
  position: relative;
  min-height: clamp(240px, 32vw, 360px);
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(51, 41, 31, 0.03), rgba(51, 41, 31, 0.16)),
    url("/images/ivoryvillage-lead.jpg") center / cover no-repeat,
    linear-gradient(150deg, #f3e7da 0%, #e9d3c2 48%, #d8b9a2 100%);
  box-shadow: var(--shadow-card);
  transform: rotate(1deg);
}

/* a small pinned-photo accent so the lead reads as a board photo */
.lead-photo::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pin);
  box-shadow: 0 0 0 4px rgba(192, 103, 63, 0.18), var(--shadow-soft);
}

/* ---------- Horizontal lanes (동네별 / 주제별) ---------- */
.lanes {
  padding: 24px 0 8px;
  display: grid;
  gap: 16px;
}

.lane {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.lane-head .lane-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lane-head p {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.4;
}

.lane-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.lane-chip {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ivory-deep);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.lane-chip:hover {
  background: var(--clay-soft);
  border-color: #e6cdbb;
  color: var(--clay-deep);
}

/* ---------- Noticeboard grid (signature pinned-note cards) ---------- */
.noticeboard,
.recent,
.editorial {
  padding: 46px 0;
}

.board-head {
  margin-bottom: 24px;
}

.board-head h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.board-head p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

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

.note-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* slight tilt per card so the board feels hand-pinned */
.note-card.tilt-0 { transform: rotate(-1.1deg); }
.note-card.tilt-1 { transform: rotate(0.9deg); }
.note-card.tilt-2 { transform: rotate(1.3deg); }
.note-card.tilt-3 { transform: rotate(-0.7deg); }

.note-card:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: 0 20px 40px rgba(51, 41, 31, 0.14);
}

/* the pin holding the note */
.note-pin {
  position: absolute;
  top: -8px;
  left: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d98a64, var(--clay-deep));
  box-shadow: 0 3px 6px rgba(51, 41, 31, 0.28);
}

.note-tag {
  display: inline-block;
  font-family: var(--font-gowun), var(--font-noto), system-ui, sans-serif;
  color: var(--clay-deep);
  background: var(--clay-soft);
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.note-card h3 {
  margin: 13px 0 8px;
  font-size: 1.22rem;
}

.note-card > p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.66;
}

.note-points {
  list-style: none;
  margin: 15px 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.note-points li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  line-height: 1.58;
  font-size: 0.96rem;
}

.note-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--clay);
  transform: rotate(45deg);
}

.note-count {
  display: inline-block;
  font-family: var(--font-gowun), var(--font-noto), system-ui, sans-serif;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Recent guides (list rows, distinct from cards) ---------- */
.recent-list {
  display: grid;
  gap: 12px;
}

.recent-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--clay);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.recent-row:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-card);
}

.recent-tag {
  font-family: var(--font-gowun), var(--font-noto), system-ui, sans-serif;
  color: var(--clay-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.recent-text strong {
  display: block;
  font-size: 1.12rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.recent-text p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.94rem;
}

.recent-row small {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ---------- Editorial note ---------- */
.editorial {
  background: var(--clay-soft);
  border: 1px solid #ecd6c6;
  border-radius: 18px;
  padding: 38px clamp(24px, 5vw, 44px);
  margin: 8px 0;
}

.editorial h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  margin-bottom: 14px;
}

.editorial p {
  margin: 0 0 12px;
  max-width: 60em;
  color: #5a4434;
  line-height: 1.84;
}

.editorial p:last-child {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  width: min(1060px, calc(100% - 44px));
  margin: 36px auto 0;
  padding: 30px 0 56px;
  border-top: 2px dashed var(--line);
  color: var(--muted);
}

.footer-mark {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.footer-mark strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.footer-mark span {
  font-family: var(--font-gowun), var(--font-noto), system-ui, sans-serif;
  font-size: 0.86rem;
  color: var(--muted);
}

.footer-desc {
  margin: 10px 0 16px;
  max-width: 480px;
  line-height: 1.6;
  font-size: 0.92rem;
}

.footer-disclosure {
  display: inline-block;
  margin: 0;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---------- Article (single column, top callout, no rail) ---------- */
.article-shell {
  max-width: 760px;
  padding: 32px 0 80px;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

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

.article-body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(26px, 5vw, 50px);
  box-shadow: var(--shadow-soft);
}

.article-tag {
  display: inline-block;
  font-family: var(--font-gowun), var(--font-noto), system-ui, sans-serif;
  color: var(--clay-deep);
  background: var(--clay-soft);
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.article-head h1 {
  margin: 15px 0 0;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  line-height: 1.32;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* small local-context callout near the top (not a sticky rail) */
.local-callout {
  position: relative;
  margin: 26px 0 4px;
  padding: 18px 22px 18px 24px;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage);
  border-radius: var(--radius-sm);
}

.local-callout-pin {
  position: absolute;
  top: -7px;
  left: 18px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 2px 5px rgba(51, 41, 31, 0.22);
}

.local-callout p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.7;
}

.article-lead {
  margin: 22px 0 6px;
  color: var(--ink);
  font-family: var(--font-gowun), var(--font-noto), system-ui, sans-serif;
  font-size: 1.12rem;
  line-height: 1.8;
  padding-left: 16px;
  border-left: 3px solid var(--clay);
}

.article-content {
  margin-top: 28px;
  color: #3b3025;
  font-size: 1.05rem;
  line-height: 1.88;
}

.article-content h2 {
  margin: 40px 0 14px;
  font-size: clamp(1.32rem, 2.4vw, 1.66rem);
  padding-left: 14px;
  border-left: 5px solid var(--clay);
}

.article-content h3 {
  margin: 28px 0 10px;
  font-size: 1.2rem;
}

.article-content p {
  margin: 0 0 18px;
}

.article-content a {
  color: var(--clay-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: var(--ink);
}

/* themed list: clay diamond markers */
.article-content ul,
.article-content ol {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.article-content ul li,
.article-content ol li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.article-content ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--clay);
  transform: rotate(45deg);
}

.article-content ol {
  counter-reset: step;
}

.article-content ol li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--clay-soft);
  color: var(--clay-deep);
  font-size: 0.72rem;
  font-weight: 800;
}

.article-content blockquote {
  margin: 26px 0;
  padding: 20px 24px;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-left: 4px solid var(--clay);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--clay-deep);
  font-family: var(--font-gowun), var(--font-noto), serif;
  font-size: 1.16rem;
  line-height: 1.72;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.96rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.article-content th,
.article-content td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
}

.article-content th:last-child,
.article-content td:last-child {
  border-right: 0;
}

.article-content tbody tr:last-child td {
  border-bottom: 0;
}

.article-content tbody tr:nth-child(even) {
  background: rgba(247, 244, 238, 0.6);
}

.article-content th {
  background: var(--clay-soft);
  color: var(--clay-deep);
  font-weight: 800;
}

/* ---------- FAQ + source ---------- */
.faq-section,
.source-note {
  margin-top: 38px;
}

.faq-section h2,
.source-note h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
  margin-bottom: 8px;
}

.faq-section details {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}

.faq-section summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  display: flex;
  gap: 8px;
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary::before {
  content: "Q";
  display: inline-grid;
  place-items: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: var(--clay-soft);
  color: var(--clay-deep);
  font-size: 0.78rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.faq-section details p {
  margin: 10px 0 0 1.9em;
  color: var(--ink-soft);
  line-height: 1.74;
}

.source-note {
  padding: 22px 24px;
  background: var(--ivory);
  border: 1px dashed var(--sage);
  border-radius: var(--radius);
}

.source-note p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.74;
}

.article-foot {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--clay-deep);
  font-weight: 800;
}

.back-link::before {
  content: "←";
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .lead-strip {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .lead-photo {
    transform: none;
    min-height: 220px;
  }

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

  .lane {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .recent-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .masthead-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .lead-strip {
    padding: 40px 0 24px;
  }

  .article-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
