/*
Theme Name: The Story Lab Portal
Description: The Story Lab의 AI Business Intelligence & ERP System용 터널 로그인 테마입니다.
Version: 1.6.0
Requires at least: 6.4
Requires PHP: 8.0
Author: keunryu
Text Domain: the-story-lab-portal
Update URI: false
License: GNU General Public License v2.0 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --site-bg: oklch(18.8% 0.008 285);
  --site-surface: oklch(25% 0.006 285);
  --site-fg: oklch(91.3% 0.042 79);
  --site-muted: oklch(70.5% 0.02 75);
  --site-border: oklch(38% 0.01 80);
  --site-accent: oklch(72.8% 0.09 76);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-block-size: 100%;
  background: var(--site-bg);
}

body {
  min-block-size: 100%;
  margin: 0;
  color: var(--site-fg);
  background: var(--site-bg);
  font-family: Poppins, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--site-accent);
}

.screen-reader-text {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 100000;
  inline-size: auto;
  block-size: auto;
  padding: 10px 14px;
  clip: auto;
  color: var(--site-bg);
  background: var(--site-accent);
}

.site-header,
.site-main,
.site-footer {
  inline-size: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
  border-block-end: 1px solid var(--site-border);
}

.site-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-title a {
  color: var(--site-fg);
  text-decoration: none;
}

.site-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-logout {
  padding: 7px 16px;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  color: var(--site-fg);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.site-logout:hover,
.site-logout:focus {
  border-color: var(--site-accent);
  color: var(--site-accent);
}

.site-main {
  padding-block: 64px;
}

/* 본문 폭 제한(72ch)은 두지 않는다 — 컨테이너(1120px)를 그대로 쓴다.
   타이포그래피 관례보다 넓은 화면 활용을 우선하고, 제목이 한 줄에 들어가야 한다는
   사용자 결정 (2026-09-01, AX 설문 안내 글에서 어색함 확인). */

.entry-title {
  margin: 0 0 24px;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.site-footer {
  padding-block: 24px;
  border-block-start: 1px solid var(--site-border);
  color: var(--site-muted);
  font-size: 13px;
}

/* 첫 화면(front-page.php) — 사내 설문 목록 */

.portal-greeting {
  margin: -8px 0 40px;
  color: var(--site-muted);
}

.portal-surveys h2 {
  margin: 0 0 20px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.portal-survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.portal-survey-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: 14px;
}

.portal-survey-no {
  margin: 0;
  color: var(--site-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.portal-survey-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.portal-survey-meta {
  margin: 0;
  color: var(--site-muted);
  font-size: 14px;
}

.portal-survey-open {
  color: var(--site-accent);
  font-weight: 600;
}

.portal-survey-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 0 0;
}

.portal-survey-go {
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--site-accent);
  color: var(--site-bg);
  font-weight: 600;
  text-decoration: none;
}

.portal-survey-go:hover,
.portal-survey-go:focus {
  filter: brightness(1.1);
}

.portal-survey-results {
  font-size: 14px;
}

/* 글·페이지 — 메타·링크 복사(공유 링크 = 글 URL, 계획서 9.35) */

.entry-meta {
  margin: -12px 0 16px;
  color: var(--site-muted);
  font-size: 14px;
}

.entry-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 32px;
}

.entry-share-button {
  padding: 8px 18px;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  background: transparent;
  color: var(--site-fg);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.entry-share-button:hover,
.entry-share-button:focus-visible {
  border-color: var(--site-accent);
  color: var(--site-accent);
}

.entry-share-hint,
.entry-share-status {
  color: var(--site-muted);
  font-size: 13px;
}

.entry-share-status {
  color: var(--site-accent);
}

.entry-share-fallback {
  flex-basis: 100%;
  padding: 8px 12px;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  background: var(--site-surface);
  color: var(--site-fg);
  font: inherit;
  font-size: 13px;
}

.entry-content img,
.entry-content video {
  max-width: 100%;
  height: auto;
}

/* 첫 화면 — 사내 아티클 카드 (WP 글, 계획서 9.35) */

.portal-articles {
  margin: 0 0 44px;
}

.portal-articles h2 {
  margin: 0 0 20px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.portal-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.portal-article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.portal-article-card:hover,
.portal-article-card:focus-visible {
  border-color: var(--site-accent);
}

.portal-article-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #fff;
}

.portal-article-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 24px 22px;
}

.portal-article-title {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.portal-article-meta {
  color: var(--site-muted);
  font-size: 14px;
}

.portal-article-video {
  color: var(--site-accent);
  font-weight: 600;
}

.portal-article-excerpt {
  margin-top: 4px;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* 첫 화면 — 사내 영상 카드 (Portal Video 플러그인, 계획서 9.34) */

.portal-videos {
  margin: 0 0 44px;
}

.portal-videos h2 {
  margin: 0 0 20px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.portal-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.portal-video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.portal-video-card:hover,
.portal-video-card:focus-visible {
  border-color: var(--site-accent);
}

.portal-video-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #fff;
}

.portal-video-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 24px 22px;
}

.portal-video-title {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.portal-video-meta {
  color: var(--site-muted);
  font-size: 14px;
}

.portal-video-go {
  align-self: flex-start;
  margin-top: 10px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--site-accent);
  color: var(--site-bg);
  font-weight: 600;
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-main {
    padding-block: 48px;
  }
}
