/*
Theme Name: OMST
Theme URI: https://omst-web.vercel.app
Author: OMST
Author URI: https://omst-web.vercel.app
Description: OMST 본연의 디자인 톤을 그대로 옮긴 블로그 테마. 동양 철학과 현대 심리학이 만나는 자리.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: omst
*/

/* ===========================================================
   OMST Design Tokens
   - Navy        #002D62
   - Blue        #3498DB
   - Orange      #E67E22
   - Green       #27ae60
   - Pink        #e84393
   - BG          #f8f9fa
   - Border      #eee
   =========================================================== */

:root {
  --omst-navy:   #002D62;
  --omst-blue:   #3498DB;
  --omst-orange: #E67E22;
  --omst-green:  #27ae60;
  --omst-pink:   #e84393;
  --omst-bg:     #f8f9fa;
  --omst-border: #eee;
  --omst-text:   #555;
  --omst-muted:  #999;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--omst-bg);
  color: var(--omst-text);
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo",
               "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.serif {
  font-family: "Noto Serif KR", serif;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============ Layout ============ */
.omst-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.omst-wrap--wide {
  max-width: 1200px;
}

/* ============ Hero ============ */
.omst-hero {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.omst-hero__logo {
  display: block;
  margin: 0 auto 2rem;
  max-width: 420px;
  width: 100%;
  height: auto;
}

.omst-hero__slogan {
  font-family: "Noto Serif KR", serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: #5a6a7e;
  margin: 0;
}

.omst-hero__lead {
  margin: 1.5rem auto 0;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.9;
  color: #666;
}

@media (min-width: 768px) {
  .omst-hero {
    padding: 7rem 1.5rem 5rem;
  }
  .omst-hero__slogan {
    font-size: 1rem;
  }
}

/* ============ Blog Section ============ */
.omst-blog {
  background: #fff;
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--omst-border);
}

.omst-section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.omst-section-head__eyebrow {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: #ced4da;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.omst-section-head__title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--omst-navy);
  margin: 0;
}

.omst-section-head__sub {
  margin: 1rem auto 0;
  max-width: 32rem;
  font-size: 0.9rem;
  line-height: 1.9;
  color: #666;
}

@media (min-width: 768px) {
  .omst-blog { padding: 6rem 1.5rem; }
  .omst-section-head__title { font-size: 2.25rem; }
  .omst-section-head__sub { font-size: 1rem; }
}

/* ============ Post Grid ============ */
.omst-post-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .omst-post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .omst-post-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

/* ============ Post Card ============ */
.omst-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--omst-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
  transition: transform .3s ease, box-shadow .3s ease;
}

.omst-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0, 45, 98, 0.08);
}

.omst-card__thumb {
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8f0f8 50%, #dbe7f3 100%);
  position: relative;
  overflow: hidden;
}

.omst-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.omst-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Noto Serif KR", serif;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(0, 45, 98, 0.15);
}

.omst-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}

.omst-card__meta {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--omst-blue);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.omst-card__title {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--omst-navy);
  margin: 0 0 0.75rem;
}

.omst-card__title a:hover {
  color: var(--omst-blue);
}

.omst-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.75;
  color: #666;
  margin: 0 0 1.25rem;
  flex: 1;
}

.omst-card__more {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--omst-blue);
  letter-spacing: 0.05em;
  margin-top: auto;
}

/* ============ Pagination ============ */
.omst-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.omst-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid var(--omst-border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--omst-text);
  background: #fff;
  transition: all .2s ease;
}

.omst-pagination .page-numbers.current {
  background: var(--omst-navy);
  border-color: var(--omst-navy);
  color: #fff;
}

.omst-pagination .page-numbers:hover:not(.current) {
  border-color: var(--omst-navy);
  color: var(--omst-navy);
}

/* ============ Single Post ============ */
.omst-single {
  background: #fff;
  padding: 4rem 1.5rem;
}

.omst-single__inner {
  max-width: 720px;
  margin: 0 auto;
}

.omst-single__meta {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--omst-blue);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.omst-single__title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--omst-navy);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.omst-single__date {
  font-size: 0.85rem;
  color: var(--omst-muted);
  margin: 0 0 3rem;
}

.omst-single__content {
  font-size: 1rem;
  line-height: 1.95;
  color: #333;
}

.omst-single__content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--omst-navy);
  margin: 3rem 0 1rem;
}

.omst-single__content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--omst-navy);
  margin: 2.5rem 0 0.75rem;
}

.omst-single__content p {
  margin: 0 0 1.5rem;
}

.omst-single__content a {
  color: var(--omst-blue);
  border-bottom: 1px solid var(--omst-blue);
}

.omst-single__content strong {
  color: var(--omst-navy);
  font-weight: 700;
}

.omst-single__content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--omst-blue);
  background: var(--omst-bg);
  border-radius: 0 12px 12px 0;
  color: #444;
  font-style: italic;
}

.omst-single__content img {
  border-radius: 16px;
  margin: 2rem 0;
}

.omst-single__content ul,
.omst-single__content ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

.omst-single__content li {
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .omst-single { padding: 6rem 1.5rem; }
  .omst-single__title { font-size: 2.5rem; }
}

/* ============ Footer ============ */
.omst-footer {
  background: #fff;
  border-top: 1px solid var(--omst-border);
  padding: 3rem 1.5rem;
}

.omst-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.omst-footer__brand {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--omst-navy);
  text-transform: uppercase;
  margin: 0;
}

.omst-footer__sub {
  font-size: 0.75rem;
  color: var(--omst-muted);
  margin: 0.25rem 0 0;
}

.omst-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--omst-navy);
}

.omst-footer__nav a {
  position: relative;
  padding: 0.35rem 0;
  transition: color .25s ease;
}

/* 호버 시 OMST 블루로 + 아래 밑줄 등장 */
.omst-footer__nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--omst-blue);
  transform: translateX(-50%);
  transition: width .3s ease;
}

.omst-footer__nav a:hover {
  color: var(--omst-blue);
}

.omst-footer__nav a:hover::after {
  width: 100%;
}

@media (min-width: 768px) {
  .omst-footer__nav {
    font-size: 1.4rem;
    gap: 3rem;
  }
}

.omst-footer__copy {
  font-size: 0.75rem;
  color: var(--omst-muted);
}

@media (min-width: 768px) {
  .omst-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ============ WP Block & Comments ============ */
.alignwide { max-width: 1100px; }
.alignfull { max-width: 100%; }

.omst-comments {
  max-width: 720px;
  margin: 4rem auto 0;
  padding: 0 1.5rem;
}

.omst-comments h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--omst-navy);
  margin: 0 0 1.5rem;
}

/* ===========================================================
   .omst-longread — longblack 톤의 매거진 본문
   sans-serif, 넉넉한 행간, 호흡 있는 단락
   =========================================================== */

.omst-longread {
  font-size: 17px;
  line-height: 1.95;
  color: #2a2a2a;
  letter-spacing: -0.005em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .omst-longread {
    font-size: 18px;
    line-height: 2;
  }
}

.omst-longread > * + * {
  margin-top: 1.75em;
}

.omst-longread p {
  margin: 0;
}

.omst-longread h2 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--omst-navy);
  letter-spacing: -0.01em;
  margin: 3.5em 0 0.2em;
  word-break: keep-all;
}

.omst-longread h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
  color: #1a1a1a;
  margin: 2.5em 0 0.2em;
  word-break: keep-all;
}

.omst-longread h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2em 0 0.2em;
}

@media (min-width: 768px) {
  .omst-longread h2 { font-size: 1.875rem; }
  .omst-longread h3 { font-size: 1.375rem; }
}

.omst-longread a {
  color: var(--omst-navy);
  border-bottom: 1px solid currentColor;
  transition: color .2s ease;
}

.omst-longread a:hover {
  color: var(--omst-blue);
}

.omst-longread strong,
.omst-longread b {
  font-weight: 700;
  color: #1a1a1a;
  background: linear-gradient(to top, rgba(52, 152, 219, 0.18) 0%, rgba(52, 152, 219, 0.18) 35%, transparent 35%);
  padding: 0 2px;
}

.omst-longread em,
.omst-longread i {
  font-style: italic;
  color: #444;
}

.omst-longread blockquote {
  margin: 2.5em 0;
  padding: 0;
  border: 0;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.7;
  font-weight: 600;
  color: var(--omst-navy);
  letter-spacing: -0.01em;
  position: relative;
  word-break: keep-all;
}

.omst-longread blockquote::before,
.omst-longread blockquote::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--omst-navy);
  margin: 0 auto 1.5em;
}

.omst-longread blockquote::after {
  margin: 1.5em auto 0;
}

.omst-longread blockquote p {
  margin: 0;
}

@media (min-width: 768px) {
  .omst-longread blockquote {
    font-size: 1.5rem;
    margin: 3.5em 0;
  }
}

.omst-longread ul,
.omst-longread ol {
  padding-left: 1.5em;
  margin: 0;
}

.omst-longread li {
  margin-bottom: 0.5em;
  line-height: 1.85;
}

.omst-longread li::marker {
  color: var(--omst-blue);
}

.omst-longread figure,
.omst-longread img {
  margin: 2.5em 0;
}

.omst-longread img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

.omst-longread figure {
  margin: 3em 0;
}

.omst-longread figcaption {
  margin-top: 1em;
  font-size: 0.85rem;
  color: #888;
  text-align: center;
  letter-spacing: 0.02em;
}

.omst-longread hr {
  border: 0;
  height: 1px;
  background: #e8e8e8;
  margin: 3.5em auto;
  max-width: 80px;
}

.omst-longread code {
  background: #f5f5f5;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: #1a1a1a;
}

.omst-longread pre {
  background: #1a1a1a;
  color: #f5f5f5;
  padding: 1.25em 1.5em;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 2em 0;
}

.omst-longread pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* ============ longblack 톤에서는 alignwide / alignfull 활용 ============ */
.omst-longread .alignwide,
.omst-longread .alignfull {
  margin-left: calc(50% - 50vw + 0.5rem);
  margin-right: calc(50% - 50vw + 0.5rem);
  max-width: 100vw;
}

@media (min-width: 1024px) {
  .omst-longread .alignwide {
    margin-left: -120px;
    margin-right: -120px;
  }
  .omst-longread .alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}
