/*
Theme Name: Cube-154 あとかぶ (Elite Think-Tank Edition)
Theme URI: http://cube-154.com/
Author: Cube-154 総合研究所
Description: 人間の業（ダメ人間、お祈り投資など）を大真面目に扱うための、過剰なまでに知的でプロフェッショナルなエリート研究機関風デザイン。
Version: 6.0.0
License: GNU General Public License v2 or later
Text Domain: cube154-atokabu
*/

:root {
  --primary: #0b1e36;       /* Trust Navy */
  --primary-hover: #153254; 
  --secondary: #b59654;     /* Antique Gold */
  --secondary-hover: #9c7e43;
  --bg-body: #fdfdfd;       /* Crisp strict white */
  --bg-card: #ffffff;
  --bg-light: #f5f6f8;
  --text-main: #222222;
  --text-muted: #555555;
  --border: #dfdfdf;
  --radius: 0px;            /* Sharp, formal edges */
  --font-serif: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', 'MS PMincho', serif;
  --font-sans: 'Inter', 'Helvetica Neue', Arial, 'Hiragino Sans', 'Meiryo', sans-serif;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(11, 30, 54, 0.08); /* Deep formal shadow */
  --shadow-hover: 0 15px 40px rgba(11, 30, 54, 0.15);
}

html { scroll-behavior: smooth; }

body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
a { color: var(--secondary); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--primary); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); }

/* Global Utilities */
.container { max-width: 1100px; margin: 0 auto; padding: 0 5%; }
.container-medium { max-width: 900px; }
.container-narrow { max-width: 760px; }
.text-center { text-align: center; }

/* Scroll Animations (Refined, slow fade) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.delay-100 { transition-delay: 150ms; }
.delay-200 { transition-delay: 300ms; }

/* Formal Header */
.site-header {
  background: var(--bg-card);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 9999;
  border-bottom: 3px solid var(--primary); /* Thick authoritative border */
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 5%;
  display: flex; justify-content: space-between; align-items: center;
}

.site-title {
  margin: 0; font-size: 1.6rem; font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.global-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2.5rem; }
.global-nav a {
  color: var(--primary); font-weight: 500; font-size: 0.9rem;
  letter-spacing: 0.1em;
  padding: 0.5rem 0; position: relative;
}
.global-nav a::after {
  content: ''; position: absolute; width: 0; height: 1px;
  bottom: 0; left: 0; background-color: var(--secondary);
  transition: width 0.3s ease;
}
.global-nav a:hover::after { width: 100%; }

.menu-toggle { display: none; background: transparent; border: none; cursor: pointer; color: var(--primary); }

/* Hero Section with Parallax Image */
.hero-section {
  position: relative;
  background-image: linear-gradient(rgba(11, 30, 54, 0.7), rgba(11, 30, 54, 0.85)), url('assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
  padding: 12rem 5% 10rem;
  text-align: center;
  border-bottom: 5px solid var(--secondary); /* Gold trim */
}

.hero-title {
  font-size: 3.5rem; margin: 0 0 1.5rem; font-weight: 600;
  letter-spacing: 0.1em;
  text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.3rem; opacity: 0.9; max-width: 700px;
  margin: 0 auto; line-height: 2; font-weight: 400;
  letter-spacing: 0.05em;
}

/* Sections */
.section-block { padding: 7rem 0; }
.bg-light { background-color: var(--bg-light); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bg-white { background-color: var(--bg-card); }

.section-header { margin-bottom: 4rem; position: relative; }
.section-header::after {
  content: ''; display: block; width: 50px; height: 2px;
  background-color: var(--secondary); margin: 1.5rem auto 0;
}
.section-header.left-aligned::after { margin-left: 0; }

.section-title {
  font-size: 2.2rem; color: var(--primary); margin: 0 0 0.5rem 0;
  font-weight: 600; letter-spacing: 0.05em;
}
.section-subtitle {
  font-family: var(--font-sans); font-size: 0.85rem; color: var(--secondary); text-transform: uppercase;
  letter-spacing: 0.2em; font-weight: 600; margin: 0;
}
.section-desc { font-size: 1.05rem; color: var(--text-muted); margin-top: 1rem; }

/* News Section */
.news-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--primary); }
.news-item {
  display: flex; align-items: flex-start; padding: 1.5rem 0;
  border-bottom: 1px solid var(--border); transition: background-color 0.3s;
}
.news-item:hover { background-color: rgba(181, 150, 84, 0.03); }
.news-date { font-family: var(--font-sans); color: var(--text-main); font-size: 0.95rem; width: 120px; font-weight: 600; margin-top: 0.2rem;}
.news-badge {
  font-size: 0.75rem; padding: 0.3rem 0.8rem; border: 1px solid;
  font-weight: 600; margin-right: 1.5rem; letter-spacing: 0.05em; line-height: 1; margin-top: 0.2rem;
}
.bg-gold { color: var(--secondary); border-color: var(--secondary); background: transparent; }
.bg-navy { color: var(--primary); border-color: var(--primary); background: transparent; }
.news-title { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 500; color: var(--text-main); line-height: 1.6; flex: 1; }

/* Corporate Message */
.message-box {
  background: var(--bg-card);
  padding: 5rem 4rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}
.message-title { font-size: 2rem; margin-bottom: 2.5rem; font-weight: 600; color: var(--primary); line-height: 1.4; }
.message-text { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text-main); line-height: 2.2; text-align: left; margin-bottom: 3rem; }
.message-sign { text-align: right; margin-top: 2rem; }
.message-sign span { display: block; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.message-sign strong { font-family: var(--font-serif); font-size: 1.4rem; color: var(--primary); font-weight: 600; margin-top: 0.5rem; display: block; }

/* Grid / Layout */
.site-content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 4rem; }

/* Academic Cards */
.link-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2.5rem; }
.link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s ease;
  display: flex; flex-direction: column;
  position: relative;
}
.link-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--border); transition: 0.4s ease; z-index: 10;
}
.link-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: transparent; }
.link-card:hover::before { background: var(--secondary); }
.link-card-img-wrap { width: 100%; height: 180px; overflow: hidden; position: relative; border-bottom: 1px solid var(--border); }
.link-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(40%) contrast(1.1); transition: 0.6s ease; }
.link-card:hover .link-card-img-wrap img { filter: grayscale(0%); transform: scale(1.05); }

.link-card-body { padding: 2rem; display: flex; flex-direction: column; flex-grow: 1; }
.link-card-title { font-family: var(--font-serif); font-size: 1.25rem; margin: 0 0 0.5rem; color: var(--primary); font-weight: 600; }
.link-card-url { font-size: 0.75rem; font-family: monospace; color: var(--text-muted); word-break: break-all; margin-bottom: 1rem; }
.link-card-desc { font-size: 0.95rem; color: var(--text-main); margin-bottom: 2rem; line-height: 1.7; }
.link-card-btn {
  margin-top: auto; display: inline-block; background: transparent; color: var(--primary); padding: 0.6rem 0;
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.05em; border-bottom: 1px solid var(--primary);
  align-self: flex-start;
}
.link-card:hover .link-card-btn { color: var(--secondary); border-bottom-color: var(--secondary); }

/* Sidebar */
.widget {
  background: var(--bg-card); padding: 2rem; margin-bottom: 2rem; border: 1px solid var(--border);
}
.widget-title { margin-top: 0; font-size: 1.15rem; padding-bottom: 1rem; border-bottom: 1px solid var(--primary); margin-bottom: 1.5rem; color: var(--primary); font-family: var(--font-serif); font-weight: 600; }

/* Organization Profile Table */
.profile-table {
  width: 100%; border-collapse: collapse; background: var(--bg-card);
  border-top: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
}
.profile-table th, .profile-table td { padding: 1.5rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.profile-table th { width: 25%; color: var(--primary); font-weight: 600; font-family: var(--font-serif); }
.profile-table td { color: var(--text-main); line-height: 1.8; }
.profile-table tr:last-child th, .profile-table tr:last-child td { border-bottom: none; }

/* Strict Footer */
.site-footer { background: var(--primary); color: #fff; padding: 4rem 5%; margin-top: 6rem; border-top: 3px solid var(--secondary); }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.footer-logo { font-size: 1.8rem; font-weight: 600; font-family: var(--font-serif); margin-bottom: 1.5rem; color: #fff; }
.site-footer p { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,0.6); letter-spacing: 0.05em; }

/* Responsive */
@media screen and (max-width: 900px) { .site-content-grid { grid-template-columns: 1fr; gap: 3rem; } }
@media screen and (max-width: 768px) {
  .menu-toggle { display: block; }
  .global-nav { display: none; width: 100%; padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 1rem; }
  .global-nav.is-open { display: block; }
  .global-nav ul { flex-direction: column; gap: 0; }
  .global-nav a { display: block; padding: 1rem 0; font-size: 1rem; }
  .hero-section { padding: 8rem 5% 6rem; }
  .hero-title { font-size: 2.2rem; }
  .message-box { padding: 2.5rem 1.5rem; border-left: none; border-top: 4px solid var(--primary); }
  .profile-table th, .profile-table td { display: block; width: 100%; }
  .profile-table th { border-bottom: none; padding-bottom: 0.5rem; }
  .profile-table td { padding-top: 0; }
}
