/*
Theme Name: Eight Door
Theme URI: https://eightdoor.co.jp/
Author: 株式会社エイトドア
Author URI: https://eightdoor.co.jp/
Description: 株式会社エイトドア公式WordPressテーマ。QAコンサルティング企業向けの高級感あるダークデザイン。ディープパープル・シャンパンゴールド・グラファイトカラーパレット。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
License URI: https://eightdoor.co.jp/
Text Domain: eightdoor
Tags: dark, luxury, corporate, qa, consulting
*/

/* ============================================================
   DESIGN TOKENS — Dark Prism Design System
   Colors: Deep Purple / Champagne Gold / Graphite
   Fonts: Cormorant Garamond (display) + Noto Sans JP (body)
   ============================================================ */

:root {
  /* Core palette */
  --color-bg:           #0d0d1a;
  --color-bg-secondary: #12121f;
  --color-bg-card:      #1a1a2e;
  --color-bg-elevated:  #1e1e35;
  --color-border:       rgba(201, 168, 76, 0.15);
  --color-border-hover: rgba(201, 168, 76, 0.4);

  /* Gold */
  --color-gold:         #c9a84c;
  --color-gold-light:   #e2c97e;
  --color-gold-dim:     rgba(201, 168, 76, 0.6);

  /* Text */
  --color-text-primary:   #f0ece4;
  --color-text-secondary: #a89f94;
  --color-text-muted:     #6b6560;

  /* Accent purple */
  --color-purple:       #6b4fbb;
  --color-purple-light: #8b6fd4;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Noto Serif JP', Georgia, serif;
  --font-body:    'Noto Sans JP', 'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --section-padding: 6rem 0;
  --container-max:   1200px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-gold-light);
}

ul, ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

p:last-child { margin-bottom: 0; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
}

.section {
  padding: var(--section-padding);
}

.section--alt {
  background-color: var(--color-bg-secondary);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1.25rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--color-gold);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-gold);
  color: #0d0d1a;
}

.btn-primary:hover {
  background: var(--color-gold-light);
  color: #0d0d1a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid rgba(240, 236, 228, 0.3);
}

.btn-outline:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: rgba(201, 168, 76, 0.05);
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   GOLD DIVIDER
   ============================================================ */

.gold-divider {
  width: 3rem;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
  margin: 1.5rem 0;
}

/* ============================================================
   BADGE
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: 100px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--color-gold);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

/* ============================================================
   FORMS (Contact Form 7 override)
   ============================================================ */

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.wpcf7 input[type="submit"] {
  background: var(--color-gold);
  color: #0d0d1a;
  border: none;
  padding: 0.875rem 2.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.wpcf7 input[type="submit"]:hover {
  background: var(--color-gold-light);
  transform: translateY(-1px);
}

.wpcf7 label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.wpcf7 .wpcf7-form-control-wrap {
  display: block;
  margin-bottom: 1.5rem;
}

.wpcf7 .wpcf7-not-valid-tip {
  color: #e05c5c;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.wpcf7 .wpcf7-response-output {
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
  color: var(--color-gold);
  font-size: 0.9rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: all var(--transition);
}

.pagination a:hover,
.pagination .current {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: rgba(201, 168, 76, 0.08);
}

/* ============================================================
   ENTRY CONTENT (記事本文)
   ============================================================ */

.entry-content {
  color: var(--color-text-secondary);
  line-height: 1.9;
  font-size: 1rem;
}

.entry-content h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.entry-content h3 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  color: var(--color-gold);
}

.entry-content p { margin-bottom: 1.5rem; }

.entry-content ul,
.entry-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.entry-content ol { list-style: decimal; }

.entry-content li {
  margin-bottom: 0.5rem;
  color: var(--color-text-secondary);
}

.entry-content a {
  color: var(--color-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content blockquote {
  border-left: 3px solid var(--color-gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(201, 168, 76, 0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.entry-content img {
  border-radius: var(--radius-md);
  margin: 2rem 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.entry-content th {
  background: var(--color-bg-card);
  color: var(--color-gold);
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */

@media (max-width: 1024px) {
  :root { --section-padding: 4rem 0; }
}

@media (max-width: 768px) {
  :root { --section-padding: 3rem 0; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
}

/* ============================================================
   WORDPRESS CORE CLASSES
   ============================================================ */

.alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1.5rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--color-text-muted); text-align: center; margin-top: 0.5rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
}
.hero-slide.active {
  opacity: 1;
  position: relative;
}
.hero-slide-label {
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: var(--color-gold);
  margin-bottom: 1rem;
  font-family: var(--font-body);
}
.hero-slider-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--color-gold);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s;
}
.hero-dot.active {
  background: var(--color-gold);
}

/* ============================================================
   POINT SECTION
   ============================================================ */
.point-section {
  background: var(--color-bg-secondary);
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.point-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.point-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-right: 1px solid var(--color-border);
}
.point-item:last-child {
  border-right: none;
}
.point-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-gold-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  color: var(--color-gold);
  font-weight: 700;
  line-height: 1.2;
}
.point-badge span {
  font-size: 1.1rem;
  line-height: 1;
}
.point-item p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
  padding-top: 0.3rem;
}

/* ============================================================
   SECTION TITLE SIMPLE
   ============================================================ */
.section-title-simple {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  letter-spacing: 0.05em;
}

/* ============================================================
   SERVICES SIMPLE GRID（3カラム）
   ============================================================ */
.services-simple-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.service-simple-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
}
.service-simple-card:hover {
  border-color: var(--color-gold-dim);
  transform: translateY(-3px);
}
.service-simple-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-gold);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
.service-simple-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.service-link {
  font-size: 0.8rem;
  color: var(--color-gold);
  text-decoration: none;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--color-gold-dim);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.service-link:hover {
  color: var(--color-gold-light);
}

/* ============================================================
   CTA BANNER（btn-cta追加）
   ============================================================ */
.btn-cta {
  display: inline-block;
  background: #e8a020;
  color: #fff;
  font-weight: 700;
  padding: 0.9rem 2.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: background 0.3s, transform 0.2s;
  white-space: nowrap;
}
.btn-cta:hover {
  background: #d4901a;
  transform: translateY(-2px);
}

/* ============================================================
   NAVIGATION CARDS（4カラム）
   ============================================================ */
.nav-cards-section {
  background: var(--color-bg-secondary);
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
}
.nav-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.nav-card {
  display: block;
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--color-border);
  text-decoration: none;
  transition: background 0.3s;
}
.nav-card:last-child {
  border-right: none;
}
.nav-card:hover {
  background: var(--color-bg-elevated);
}
.nav-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.nav-card p {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   NEWS SECTION
   ============================================================ */
.news-section {
  background: var(--color-bg);
}
.news-list {
  margin-bottom: 2rem;
}
.news-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}
.news-item:first-child {
  border-top: 1px solid var(--color-border);
}
.news-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  white-space: nowrap;
  letter-spacing: 0.05em;
}
.news-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  border: 1px solid var(--color-gold-dim);
  padding: 2px 8px;
  white-space: nowrap;
}
.news-title {
  font-size: 0.9rem;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1.5;
}
.news-title:hover {
  color: var(--color-gold);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .point-grid {
    grid-template-columns: 1fr;
  }
  .point-item {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  .point-item:last-child {
    border-bottom: none;
  }
  .services-simple-grid {
    grid-template-columns: 1fr;
  }
  .nav-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-card {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-card:nth-child(odd) {
    border-right: 1px solid var(--color-border);
  }
  .news-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}


/* ============================================================
   ロゴ・ヘッダー最適化
   ============================================================ */

/* カスタムロゴのサイズ調整 */
.custom-logo-link {
  display: flex;
  align-items: center;
}

.custom-logo {
  height: 40px !important;
  width: auto !important;
  max-width: 200px !important;
  object-fit: contain;
  /* 白背景ロゴを暗いヘッダーに合わせて反転 */
  filter: invert(1) brightness(1.2);
}

/* ヘッダーのロゴエリア */
.site-logo {
  flex-shrink: 0;
}

/* ヘッダーナビゲーションのメニュー幅最適化 */
.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* ナビメニューのフォントサイズ調整 */
.main-nav ul li a {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ヘッダーの高さ調整 */
.site-header {
  padding: 0.8rem 0;
}

/* スライダーの修正 - 縦積みを防ぐ */
.hero-slider {
  position: relative;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  position: relative;
}

.hero-slide:first-child {
  position: relative;
}
