/*
Theme Name: Utility Factory
Theme URI: https://utility-factory.com/
Author: Utility Factory
Description: Utility Factory 公式サイト用カスタムテーマ
Version: 1.0
Text Domain: utility-factory
*/

:root {
  --navy: #10243e;
  --accent: #3fa9f5;
  --accent2: #7ee0c3;
  --text: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

html, body {
  height: 100%;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  padding: 56px 24px;
  background: linear-gradient(120deg, #0c1b30, #10243e, #0c2b3f, #133149);
  background-size: 300% 300%;
  animation: gradientShift 16s ease infinite;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card {
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 48px 40px;
  backdrop-filter: blur(6px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  animation: fadeUp 0.9s ease both;
}

.seminar-card,
.quiz-card,
.alert-card,
.page-card {
  padding: 32px;
  text-align: left;
}

.page-card {
  background: #ffffff;
  border-color: rgba(16, 36, 62, 0.08);
  color: #1c2b3a;
}

.page-card h1 {
  color: #10243e;
}

.page-card .badge {
  color: #0b6bcb;
  border-color: rgba(63, 169, 245, 0.35);
  background: rgba(63, 169, 245, 0.08);
}

.page-card .alert-date {
  color: rgba(28, 43, 58, 0.5);
}

.page-card .page-content p {
  color: #141e29;
}

.page-card .page-content h2,
.page-card .page-content h3 {
  color: #0b6bcb;
}

.page-card .page-content ul,
.page-card .page-content ol {
  color: #141e29;
}

.page-card .page-content strong {
  color: #0a1620;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(16, 36, 62, 0.1);
  font-size: 0.85rem;
}

.post-nav a {
  color: #0b6bcb;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.5;
}

.post-nav a:hover {
  text-decoration: underline;
}

.post-nav-next {
  text-align: right;
  margin-left: auto;
}

.page-card .page-content a {
  color: #0b6bcb;
}

.news-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 16px;
}

.news-card .badge {
  color: var(--accent);
  border-color: rgba(63, 169, 245, 0.4);
  background: rgba(63, 169, 245, 0.08);
  margin: 0 0 18px;
}

.news-list {
  list-style: none;
  margin: 0 0 20px;
}

.news-item + .news-item {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.news-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  text-decoration: none;
  color: var(--text);
}

.news-thumb {
  flex: none;
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.news-thumb-placeholder {
  display: block;
}

.news-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.news-date {
  font-size: 0.72rem;
  color: rgba(234, 242, 251, 0.5);
}

.news-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.news-item a:hover .news-title {
  color: var(--accent2);
}

.alert-card {
  border-color: rgba(255, 107, 87, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 107, 87, 0.15) inset;
}

.alert-card .badge {
  color: #ff9a8a;
  border-color: rgba(255, 107, 87, 0.5);
  background: rgba(255, 107, 87, 0.1);
  animation: alertPulse 1.8s ease-in-out infinite;
}

@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 87, 0.3); }
  50%      { box-shadow: 0 0 0 8px rgba(255, 107, 87, 0); }
}

.alert-card h2 {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.6;
  color: #ff9a8a;
  margin-bottom: 6px;
}

.alert-date {
  font-size: 0.75rem;
  color: rgba(234, 242, 251, 0.5);
  margin-bottom: 18px;
}

.alert-card p,
.page-content p {
  font-size: 0.92rem;
  line-height: 1.85;
  color: rgba(234, 242, 251, 0.85);
  margin-bottom: 16px;
}

.alert-card h3,
.page-content h2,
.page-content h3 {
  font-size: 0.95rem;
  color: var(--accent2);
  margin-bottom: 8px;
}

.alert-card ul,
.alert-card ol,
.page-content ul,
.page-content ol {
  margin: 0 0 18px 1.2em;
  font-size: 0.9rem;
  line-height: 1.9;
  color: rgba(234, 242, 251, 0.85);
}

.alert-note {
  font-size: 0.85rem;
  line-height: 1.8;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(126, 224, 195, 0.08);
  border: 1px solid rgba(126, 224, 195, 0.3);
  color: rgba(234, 242, 251, 0.85);
  margin-bottom: 18px;
}

.alert-sources {
  font-size: 0.75rem;
  color: rgba(234, 242, 251, 0.45);
  margin: 0 0 0 1.2em;
  line-height: 1.8;
}

.alert-sources a,
.page-content a {
  color: rgba(234, 242, 251, 0.6);
}

.seminar-card .badge,
.quiz-card .badge {
  color: var(--accent);
  border-color: rgba(63, 169, 245, 0.4);
  background: rgba(63, 169, 245, 0.08);
  margin: 0 0 18px;
}

.seminar-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 16px;
}

.quiz-card .itquiz {
  margin: 0;
  text-align: left;
  background: transparent;
  color: var(--text);
  border: none;
  padding: 0;
  font-size: 0.95rem;
}

.quiz-card .itquiz-title { color: var(--accent2); }
.quiz-card .itquiz-streak { color: #ffc56b; }
.quiz-card .itquiz-best { color: rgba(255, 197, 107, 0.75); }
.quiz-card .itquiz-champion {
  background: rgba(255, 197, 107, 0.1);
  border: 1px solid rgba(255, 197, 107, 0.35);
  color: #ffd78a;
}
.quiz-card .itquiz-sub {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.quiz-card .itquiz-code { color: var(--accent2); }
.quiz-card .itquiz-choice {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.quiz-card .itquiz-choice:hover { background: rgba(255, 255, 255, 0.1); }
.quiz-card .itquiz-choice.is-correct {
  border-color: var(--accent2);
  background: rgba(126, 224, 195, 0.15);
}
.quiz-card .itquiz-choice.is-wrong {
  border-color: #ff8080;
  background: rgba(255, 107, 107, 0.15);
}
.quiz-card .itquiz-note { color: rgba(234, 242, 251, 0.6); }
.quiz-card .itquiz-btn {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #0c1b30;
}
.quiz-card .itquiz-btn:disabled {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(234, 242, 251, 0.4);
}
.quiz-card .itquiz-result .ok { color: var(--accent2); }
.quiz-card .itquiz-result .ng { color: #ff8080; }
.quiz-card .itquiz-expl { color: rgba(234, 242, 251, 0.78); }
.quiz-card .itquiz-swatch { border-color: rgba(255, 255, 255, 0.4); }
.quiz-card .itquiz-next {
  background: transparent;
  border: 1px solid rgba(126, 224, 195, 0.5);
  color: var(--accent2);
}
.quiz-card .itquiz-next:hover { background: rgba(126, 224, 195, 0.1); }

.quiz-card h2 {
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 20px;
}

.flyer-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 20px;
}

.flyer-link img {
  display: block;
  width: 100%;
  height: auto;
}

.flyer-note {
  font-size: 0.78rem;
  color: rgba(234, 242, 251, 0.55);
  margin-bottom: 20px;
}

.cta-button {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #0c1b30;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.cta-button:hover { opacity: 0.9; }

.cta-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
}

.cta-button-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.badge {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent2);
  border: 1px solid rgba(126, 224, 195, 0.4);
  background: rgba(126, 224, 195, 0.08);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(126, 224, 195, 0.25); }
  50%      { box-shadow: 0 0 0 8px rgba(126, 224, 195, 0); }
}

h1, .page-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 12px;
}

.site-header {
  width: 100%;
  max-width: 560px;
  text-align: center;
  margin-bottom: -4px;
}

.site-header-logo {
  height: 84px;
  width: auto;
}

.site-header-catch {
  font-family: "M PLUS Rounded 1c", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: #ffe8f2;
  margin-top: 12px;
}

.site-header-tagline {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-top: 10px;
}

.site-nav {
  margin-top: 20px;
}

.site-nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.site-nav-list a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav-list a:hover {
  color: var(--accent2);
}

.site-footer {
  width: 100%;
  max-width: 560px;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.site-footer-brand {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(234, 242, 251, 0.6);
  margin-bottom: 8px;
}

.site-footer-info {
  font-size: 0.75rem;
  color: rgba(234, 242, 251, 0.4);
  margin-bottom: 10px;
}

.site-footer-copy {
  font-size: 0.68rem;
  color: rgba(234, 242, 251, 0.3);
  letter-spacing: 0.04em;
}

.page-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.stickman {
  position: fixed;
  left: 0;
  top: 0;
  width: 12px;
  height: 20px;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}

.stickman-figure {
  position: relative;
  width: 100%;
  height: 100%;
}

.sm-head, .sm-body, .sm-arm, .sm-leg {
  position: absolute;
  left: 50%;
  background: rgba(234, 242, 251, 0.85);
}

.sm-head {
  top: 0;
  width: 3.5px;
  height: 3.5px;
  margin-left: -1.75px;
  border-radius: 50%;
}

.sm-body {
  top: 3px;
  width: 1.5px;
  height: 7px;
  margin-left: -0.75px;
}

.sm-arm {
  top: 4px;
  width: 1.5px;
  height: 5px;
  margin-left: -0.75px;
  transform-origin: top center;
}

.sm-leg {
  top: 10px;
  width: 1.5px;
  height: 7px;
  margin-left: -0.75px;
  transform-origin: top center;
}

.sm-arm-l { animation: smArmL 1s linear infinite; }
.sm-arm-r { animation: smArmR 1s linear infinite; }
.sm-leg-l { animation: smLegL 1s linear infinite; }
.sm-leg-r { animation: smLegR 1s linear infinite; }

@keyframes smLegL { 0%, 100% { transform: rotate(25deg); } 50% { transform: rotate(-25deg); } }
@keyframes smLegR { 0%, 100% { transform: rotate(-25deg); } 50% { transform: rotate(25deg); } }
@keyframes smArmL { 0%, 100% { transform: rotate(-20deg); } 50% { transform: rotate(20deg); } }
@keyframes smArmR { 0%, 100% { transform: rotate(20deg); } 50% { transform: rotate(-20deg); } }
