/*
Theme Name: Balpoom Grid
Theme URI: https://balpoom.zip
Author: Balpoomzip
Description: A clean editorial grid theme for the Balpoomzip magazine.
Version: 1.1.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: balpoom-grid
*/

:root {
  --bp-bg: #f7f6f2;
  --bp-text: #111111;
  --bp-accent: #2454ff;
  --bp-line: #1a1a1a;
  --bp-muted: #696969;
  --bp-max: 1540px;
  --bp-side: clamp(20px, 4vw, 64px);
  --bp-title-font: "Arial", "Pretendard", sans-serif;
  --bp-body-font: "Pretendard", "Noto Sans KR", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bp-bg);
  color: var(--bp-text);
  font-family: var(--bp-body-font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.site-shell { width: min(100%, var(--bp-max)); margin: 0 auto; padding-inline: var(--bp-side); }

.site-header {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 28px;
}
.site-brand { font-weight: 750; letter-spacing: -.03em; font-size: 18px; }
.site-brand img { max-height: 34px; width: auto; }
.primary-nav ul { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 3vw, 46px); list-style: none; padding: 0; margin: 0; }
.primary-nav a { font-size: 13px; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { opacity: .5; }
.header-cta {
  justify-self: end;
  border: 1px solid var(--bp-text);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  transition: .2s ease;
}
.header-cta:hover { background: var(--bp-text); color: var(--bp-bg); }
.menu-toggle { display: none; border: 0; background: transparent; font: inherit; padding: 8px 0; }

.hero { padding: clamp(42px, 6vw, 96px) 0 clamp(60px, 7vw, 110px); text-align: center; }
.hero-kicker { margin: 0 0 18px; color: var(--bp-muted); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.hero-title {
  max-width: 1300px;
  margin: 0 auto;
  font-family: var(--bp-title-font);
  font-size: clamp(64px, 10vw, 168px);
  font-weight: 400;
  line-height: .84;
  letter-spacing: -.065em;
  text-transform: uppercase;
}
.hero-title span { display: block; }
.hero-description { max-width: 620px; margin: 32px auto 0; color: var(--bp-muted); font-size: 14px; }

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(44px, 6vw, 88px) 0 22px;
}
.filter-label { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.category-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter-button {
  border: 1px solid var(--bp-line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  padding: 7px 12px 6px;
  font: 700 10px/1 var(--bp-body-font);
  text-transform: uppercase;
  cursor: pointer;
  transition: .18s ease;
}
.filter-button:hover, .filter-button.is-active { background: var(--bp-text); color: var(--bp-bg); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--bp-line);
  border-left: 1px solid var(--bp-line);
}
.post-card {
  min-width: 0;
  border-right: 1px solid var(--bp-line);
  border-bottom: 1px solid var(--bp-line);
  padding: clamp(22px, 2.6vw, 44px);
  display: flex;
  flex-direction: column;
  min-height: 610px;
  transition: opacity .2s ease;
}
.post-card[hidden] { display: none; }
.post-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; font-size: 10px; color: var(--bp-muted); }
.post-card-category { border: 1px solid var(--bp-line); border-radius: 999px; padding: 5px 9px 4px; color: var(--bp-text); font-weight: 700; text-transform: uppercase; }
.post-card-thumb { aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 24px; background: #e6e3db; }
.post-card-thumb img { height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.post-card:hover .post-card-thumb img { transform: scale(1.025); }
.post-card-title { margin: 0 0 13px; font-size: clamp(20px, 1.65vw, 28px); line-height: 1.13; letter-spacing: -.035em; font-weight: 560; }
.post-card-excerpt { margin: 0 0 26px; color: var(--bp-muted); font-size: 13px; }
.read-more { margin-top: auto; width: max-content; font-size: 10px; font-weight: 700; text-transform: uppercase; border-bottom: 1px solid currentColor; }
.empty-state { grid-column: 1/-1; border-right: 1px solid var(--bp-line); border-bottom: 1px solid var(--bp-line); padding: 80px 30px; text-align: center; }
.pagination { padding: 36px 0; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; }
.pagination a, .pagination span { min-width: 38px; min-height: 38px; display: grid; place-items: center; border: 1px solid var(--bp-line); border-radius: 50%; font-size: 12px; }
.pagination .current { background: var(--bp-text); color: var(--bp-bg); }

.site-footer { border-top: 1px solid var(--bp-line); margin-top: clamp(64px, 8vw, 130px); }
.footer-main { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; }
.footer-cell { min-height: 220px; padding: 34px 28px; border-right: 1px solid var(--bp-line); font-size: 12px; }
.footer-cell:first-child { padding-left: 0; }
.footer-cell:last-child { border-right: 0; }
.footer-title { margin: 0 0 20px; font-size: 12px; }
.footer-cell p, .footer-cell ul { margin: 0; padding: 0; list-style: none; color: var(--bp-muted); }
.footer-cell li + li { margin-top: 6px; }
.footer-bottom { border-top: 1px solid var(--bp-line); min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 9px; text-transform: uppercase; }

.content-wrap { max-width: 920px; margin: 40px auto 100px; }
.entry-header { margin-bottom: 50px; }
.entry-title { font-size: clamp(42px, 7vw, 92px); line-height: .98; letter-spacing: -.055em; margin: 20px 0; }
.entry-meta { color: var(--bp-muted); font-size: 12px; }
.entry-content { font-size: 18px; line-height: 1.8; }
.entry-content > * { max-width: 760px; margin-inline: auto; }
.entry-content > .alignwide { max-width: 1160px; margin-left: 50%; transform: translateX(-50%); width: calc(100vw - 2 * var(--bp-side)); }
.entry-content blockquote { border-left: 3px solid var(--bp-accent); padding-left: 24px; font-size: 1.25em; }
.entry-content a { color: var(--bp-accent); text-decoration: underline; text-underline-offset: 3px; }

.contact-page, .contents-page { padding-bottom: 100px; }
.contact-header, .archive-heading { max-width: 920px; margin: 0 auto; padding: clamp(56px, 7vw, 110px) 0 46px; }
.contact-header .hero-kicker, .archive-heading .hero-kicker { margin-bottom: 14px; }
.contact-title, .archive-title { margin: 0 0 20px; font-size: clamp(54px, 8vw, 112px); line-height: .9; letter-spacing: -.065em; font-weight: 500; }
.contact-header > p:last-child, .archive-heading > p:last-child { color: var(--bp-muted); margin: 0; }
.collaboration-form { max-width: 920px; margin: 0 auto; border-top: 1px solid var(--bp-line); }
.form-field { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--bp-line); }
.form-field > span { padding-top: 12px; font-size: 12px; font-weight: 700; }
.form-field input[type="email"], .form-field input[type="text"], .form-field input[type="file"] {
  width: 100%; min-height: 46px; border: 1px solid #aaa; border-radius: 0; background: transparent; color: inherit; padding: 10px 12px; font: inherit;
}
.form-field input:focus { outline: 2px solid var(--bp-accent); outline-offset: 2px; }
.form-field input:disabled { color: var(--bp-muted); background: rgba(0,0,0,.035); }
.form-field small { grid-column: 2; color: var(--bp-muted); margin-top: -16px; font-size: 11px; }
.form-field .wp-editor-wrap { min-width: 0; }
.form-field .wp-editor-container { border-color: #aaa; }
.form-field .mce-toolbar .mce-btn button { min-height: auto; }
.privacy-check { display: flex; align-items: flex-start; gap: 9px; margin: 24px 0; font-size: 12px; color: var(--bp-muted); }
.privacy-check input { margin-top: 3px; }
.form-submit { border: 1px solid var(--bp-text); background: var(--bp-text); color: var(--bp-bg); min-height: 52px; padding: 0 28px; font: 700 13px var(--bp-body-font); cursor: pointer; }
.form-submit:hover { background: transparent; color: var(--bp-text); }
.form-notice { max-width: 920px; margin: 0 auto 24px; padding: 16px 18px; border: 1px solid var(--bp-line); font-size: 13px; }
.form-notice--success { border-color: #217a45; color: #217a45; }
.form-notice--error { border-color: #b42318; color: #b42318; }
.form-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.post-card-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.post-card-bottom .read-more { margin-top: 0; }
.view-count { color: var(--bp-muted); font-size: 10px; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; min-height: 76px; }
  .menu-toggle { display: block; grid-column: 2; grid-row: 1; }
  .primary-nav { display: none; grid-column: 1/-1; padding: 12px 0 24px; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: flex-start; flex-direction: column; gap: 14px; }
  .header-cta { display: none; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-card { min-height: 540px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-cell:nth-child(2) { border-right: 0; }
  .footer-cell { border-bottom: 1px solid var(--bp-line); }
}

@media (max-width: 620px) {
  .hero { padding-top: 48px; }
  .hero-title { font-size: clamp(56px, 19vw, 86px); line-height: .9; }
  .filter-bar { align-items: flex-start; flex-direction: column; }
  .category-filters { justify-content: flex-start; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card { min-height: auto; }
  .post-card-excerpt { margin-bottom: 36px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-cell { min-height: auto; padding: 28px 0; border-right: 0; }
  .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 20px; }
  .form-field { grid-template-columns: 1fr; gap: 10px; }
  .form-field > span { padding-top: 0; }
  .form-field small { grid-column: 1; margin-top: 0; }
  .contact-title, .archive-title { font-size: clamp(52px, 16vw, 76px); }
}
