/*
Theme Name: Demo Portal
Theme URI: https://demo.eguchi.net/
Author: eguchi.net
Author URI: https://eguchi.net/
Description: demo.eguchi.net 専用のオリジナルポータルテーマ。デモサイト、デモスライド、デモゲームの3大ナビゲーションを美しく大判表示します。
Version: 1.0.1
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: demo-portal
*/

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

:root {
  --ink: #111827;
  --ink-secondary: #4b5563;
  --muted: #6b7280;
  --border: #e5e7eb;
  --border-hover: #cbd5e1;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  
  --c-site: #2563eb;
  --c-site-light: #eff6ff;
  --c-site-border: #bfdbfe;
  
  --c-slide: #b45309;
  --c-slide-light: #fffbeb;
  --c-slide-border: #fde68a;
  
  --c-game: #059669;
  --c-game-light: #ecfdf5;
  --c-game-border: #a7f3d0;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 25px 35px -5px rgba(15, 23, 42, 0.14), 0 12px 16px -6px rgba(15, 23, 42, 0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background-color: var(--bg);
  font-family: 'Plus Jakarta Sans', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 20px clamp(20px, 5vw, 48px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.3px;
  color: var(--ink);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  transition: all 0.2s ease;
}

.header-link:hover {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

/* Main Container */
.main-container {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 48px) clamp(48px, 8vw, 80px);
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin: 0 0 16px;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: var(--ink-secondary);
  line-height: 1.65;
  margin: 0;
}

/* Portal Grid */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
}

/* Portal Card */
.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 40px) clamp(24px, 3.5vw, 32px) clamp(24px, 3.5vw, 32px);
  box-shadow: var(--shadow-md);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.28s ease;
  cursor: pointer;
  overflow: hidden;
}

.portal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  transition: height 0.25s ease;
}

.portal-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.portal-card:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
  transform: translateY(-4px);
}

/* Site Card Theme */
.card-site::before {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
}
.card-site:hover {
  border-color: var(--c-site-border);
}
.card-site:hover .card-icon-wrap {
  background: #2563eb;
  color: #ffffff;
}
.card-site:hover .btn-action {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* Slide Card Theme */
.card-slide::before {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}
.card-slide:hover {
  border-color: var(--c-slide-border);
}
.card-slide:hover .card-icon-wrap {
  background: #d97706;
  color: #ffffff;
}
.card-slide:hover .btn-action {
  background: #d97706;
  color: #ffffff;
  border-color: #d97706;
}

/* Game Card Theme */
.card-game::before {
  background: linear-gradient(90deg, #059669, #10b981);
}
.card-game:hover {
  border-color: var(--c-game-border);
}
.card-game:hover .card-icon-wrap {
  background: #059669;
  color: #ffffff;
}
.card-game:hover .btn-action {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

/* Card Top Elements */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.card-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.card-site .card-icon-wrap {
  background: var(--c-site-light);
  color: var(--c-site);
  border: 1px solid var(--c-site-border);
}

.card-slide .card-icon-wrap {
  background: var(--c-slide-light);
  color: var(--c-slide);
  border: 1px solid var(--c-slide-border);
}

.card-game .card-icon-wrap {
  background: var(--c-game-light);
  color: var(--c-game);
  border: 1px solid var(--c-game-border);
}

.card-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.card-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

.card-site .card-tag {
  background: var(--c-site-light);
  color: var(--c-site);
}

.card-slide .card-tag {
  background: var(--c-slide-light);
  color: var(--c-slide);
}

.card-game .card-tag {
  background: var(--c-game-light);
  color: var(--c-game);
}

/* Card Body */
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title-en {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.card-title {
  font-size: clamp(1.6rem, 2.8vw, 2rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.4px;
  margin: 0 0 14px;
}

.card-description {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.65;
  margin: 0 0 24px;
  flex: 1;
}

/* Features List */
.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Card Footer & Action Button */
.card-footer {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--ink);
  transition: all 0.22s ease;
}

.btn-action svg {
  width: 18px;
  height: 18px;
  transition: transform 0.22s ease;
}

.portal-card:hover .btn-action svg {
  transform: translateX(4px);
}

/* Footer */
.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 28px clamp(20px, 5vw, 48px);
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Responsive Design */
@media (max-width: 960px) {
  .portal-grid {
    grid-template-columns: 1fr;
    max-width: 580px;
    margin: 0 auto;
    gap: 24px;
  }

  .portal-card {
    padding: 32px 28px 28px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    flex-direction: row;
  }
  
  .brand-sub {
    display: none;
  }

  .portal-card {
    padding: 24px 20px 20px;
  }

  .card-title {
    font-size: 1.6rem;
  }
}
