/* ============================================
   MMRI - Mirai Marketing Research Institute
   Academic/Think Tank Style CSS
   ============================================ */

/* ===== CSS Variables ===== */
:root {
  /* Primary Colors - Based on MIRAI MARKETING Logo */
  --midnight-blue: #1a1a1a;
  --deep-navy: #0a0a0a;
  --navy-800: #2a2a2a;
  --navy-600: #3a3a3a;

  /* Logo Gradient Colors */
  --logo-light: #c8c8c8;
  --logo-mid: #808080;
  --logo-dark: #1a1a1a;

  /* Accent Colors */
  --silver: #b0b0b0;
  --silver-light: #e0e0e0;
  --accent-blue: #3a6b8c;
  --accent-gold: #a08c5e;

  /* Neutral Colors */
  --white: #ffffff;
  --off-white: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #adb5bd;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;

  /* Typography */
  --font-serif: "Noto Serif JP", "Yu Mincho", "游明朝", serif;
  --font-sans: "Noto Sans JP", "Hiragino Sans", sans-serif;
  --font-english: "Cormorant Garamond", "Times New Roman", serif;

  /* Spacing */
  --section-padding: 100px;
  --container-max: 1200px;

  /* Transitions */
  --transition-smooth: all 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 {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.4;
  color: var(--midnight-blue);
}

h1 { font-size: 2.5rem; letter-spacing: 0.05em; }
h2 { font-size: 2rem; letter-spacing: 0.04em; }
h3 { font-size: 1.5rem; letter-spacing: 0.03em; }
h4 { font-size: 1.25rem; }

p {
  font-size: 1rem;
  color: var(--gray-700);
}

.english-title {
  font-family: var(--font-english);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-label {
  font-family: var(--font-english);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
  display: block;
}

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

/* ===== Header / Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.logo-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 36px;
}

.logo-bar {
  height: 5px;
}

.logo-bar-1 {
  background: var(--logo-light);
  width: 65%;
}
.logo-bar-2 {
  background: var(--logo-mid);
  width: 85%;
}
.logo-bar-3 {
  background: var(--logo-dark);
  width: 100%;
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-main {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--logo-dark);
  letter-spacing: 0.25em;
  text-decoration: none;
}

.logo-divider {
  width: 1px;
  height: 16px;
  background: var(--logo-dark);
}

.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--logo-dark);
  letter-spacing: 0.15em;
}

.nav {
  display: flex;
  gap: 2.5rem;
}

.nav a {
  font-family: var(--font-english);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  text-decoration: none;
  position: relative;
  transition: var(--transition-smooth);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--logo-dark);
  transition: var(--transition-smooth);
}

.nav a:hover {
  color: var(--logo-dark);
}

.nav a:hover::after {
  width: 100%;
}

.nav a.active {
  color: var(--logo-dark);
}

.nav a.active::after {
  width: 100%;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--logo-dark);
  margin: 5px 0;
  transition: var(--transition-smooth);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--deep-navy) 0%, var(--midnight-blue) 50%, var(--navy-600) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(74, 144, 164, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(184, 163, 105, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Geometric Pattern */
.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.05;
  background-image:
    linear-gradient(30deg, var(--white) 12%, transparent 12.5%, transparent 87%, var(--white) 87.5%, var(--white)),
    linear-gradient(150deg, var(--white) 12%, transparent 12.5%, transparent 87%, var(--white) 87.5%, var(--white)),
    linear-gradient(30deg, var(--white) 12%, transparent 12.5%, transparent 87%, var(--white) 87.5%, var(--white)),
    linear-gradient(150deg, var(--white) 12%, transparent 12.5%, transparent 87%, var(--white) 87.5%, var(--white)),
    linear-gradient(60deg, rgba(255,255,255,0.5) 25%, transparent 25.5%, transparent 75%, rgba(255,255,255,0.5) 75%, rgba(255,255,255,0.5)),
    linear-gradient(60deg, rgba(255,255,255,0.5) 25%, transparent 25.5%, transparent 75%, rgba(255,255,255,0.5) 75%, rgba(255,255,255,0.5));
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

.hero-tagline {
  font-family: var(--font-english);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 2rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  color: var(--white);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
}

.hero-title .emphasis {
  display: block;
  font-size: 3.2rem;
  margin: 0.5rem 0;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--silver);
  line-height: 2;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  border: 1px solid var(--silver);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-english);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

.hero-cta:hover {
  background: var(--white);
  color: var(--midnight-blue);
  border-color: var(--white);
}

/* ===== Section Styles ===== */
.section {
  padding: var(--section-padding) 0;
}

.section-dark {
  background: var(--midnight-blue);
  color: #ffffff;
}

/* Dark hero sections in department pages */
.dept-hero p {
  color: rgba(255,255,255,0.9) !important;
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: #ffffff !important;
}

.section-dark p,
.section-dark li {
  color: #cccccc !important;
}

.section-dark a {
  color: #ffffff;
}

.section-gray {
  background: var(--gray-100);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header .lead {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 2.5rem;
  transition: var(--transition-smooth);
}

.card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  color: var(--accent-blue);
}

.card-label {
  font-family: var(--font-english);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
}

.card h3 {
  margin-bottom: 1rem;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.9;
}

/* Department Cards */
.dept-card {
  position: relative;
  padding: 3rem;
  background: var(--white);
  border-left: 4px solid var(--accent-blue);
}

.dept-card::before {
  content: attr(data-number);
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-family: var(--font-english);
  font-size: 4rem;
  font-weight: 300;
  color: var(--gray-200);
  line-height: 1;
}

.dept-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.dept-card .english-name {
  font-family: var(--font-english);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.dept-card .theory-name {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--gray-100);
  font-size: 0.85rem;
  color: var(--midnight-blue);
  margin-bottom: 1.5rem;
}

.cert-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.cert-badge-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-badge-text {
  font-size: 0.85rem;
}

.cert-badge-text strong {
  display: block;
  color: var(--midnight-blue);
}

.cert-badge-text span {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* ===== Fellow Cards ===== */
.fellow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.fellow-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 2rem;
  text-align: center;
  transition: var(--transition-smooth);
}

.fellow-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.fellow-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--gray-200);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gray-500);
}

.fellow-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--midnight-blue);
  margin-bottom: 0.25rem;
}

.fellow-location {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

.fellow-badges {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  border-radius: 2px;
}

.badge-thought {
  background: #e8f4f8;
  color: #2d6a7a;
}

.badge-marketing {
  background: #f8f3e8;
  color: #7a6a2d;
}

.badge-values {
  background: #f0e8f8;
  color: #5a2d7a;
}

.fellow-specialty {
  font-size: 0.85rem;
  color: var(--gray-700);
}

/* ===== Insight Cards ===== */
.insight-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.insight-card {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: var(--transition-smooth);
}

.insight-card:hover {
  border-color: var(--accent-blue);
}

.insight-date {
  flex-shrink: 0;
  text-align: center;
  padding-right: 2rem;
  border-right: 1px solid var(--gray-200);
}

.insight-date .month {
  font-family: var(--font-english);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.insight-date .day {
  font-family: var(--font-english);
  font-size: 2rem;
  font-weight: 300;
  color: var(--midnight-blue);
  line-height: 1;
}

.insight-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.insight-content p {
  font-size: 0.9rem;
}

.insight-tag {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.25rem 0.75rem;
  background: var(--gray-100);
  font-size: 0.7rem;
  color: var(--gray-700);
  letter-spacing: 0.05em;
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem;
}

.stat-number {
  font-family: var(--font-english);
  font-size: 3rem;
  font-weight: 300;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--silver);
}

/* ===== Form ===== */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--gray-300);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--midnight-blue);
  color: var(--white);
  border: none;
  font-family: var(--font-english);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn:hover {
  background: var(--navy-600);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--midnight-blue);
  color: var(--midnight-blue);
}

.btn-outline:hover {
  background: var(--midnight-blue);
  color: var(--white);
}

/* ===== Footer ===== */
.footer {
  background: var(--deep-navy);
  color: var(--silver);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand .logo-main {
  font-size: 0.9rem;
}

.footer .logo-bar-1 { background: var(--logo-light); }
.footer .logo-bar-2 { background: var(--logo-mid); }
.footer .logo-bar-3 { background: var(--white); }

.footer-brand p {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 1rem;
  line-height: 1.8;
}

.footer-nav h4 {
  font-family: var(--font-english);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.75rem;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--gray-500);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ===== Page Headers ===== */
.page-header {
  padding: 180px 0 100px;
  background: linear-gradient(135deg, var(--deep-navy) 0%, var(--midnight-blue) 100%);
  text-align: center;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header h1 {
  color: #ffffff !important;
  margin-bottom: 0.5rem;
  position: relative;
}

.page-header h2,
.page-header h3 {
  color: #ffffff !important;
}

.page-header p {
  color: #cccccc !important;
}

.page-header .english-title {
  font-size: 0.85rem;
  color: #b0b0b0 !important;
  position: relative;
}

.page-header .lead {
  color: #cccccc !important;
  max-width: 600px;
  margin: 1.5rem auto 0;
  position: relative;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.8rem;
}

.breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-blue);
}

.breadcrumb span {
  color: var(--gray-700);
}

/* ===== Quote Block ===== */
.quote-block {
  padding: 3rem;
  background: var(--gray-100);
  border-left: 4px solid var(--accent-gold);
  margin: 2rem 0;
}

.quote-block p {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--midnight-blue);
  line-height: 1.8;
}

.quote-block cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--gray-500);
  font-style: normal;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-300);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  background: var(--accent-blue);
  border-radius: 50%;
  transform: translateX(-4px);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
  }

  .header-inner {
    padding: 1rem;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--midnight-blue);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }

  .nav.active {
    display: flex;
    background: var(--white);
  }

  .menu-toggle {
    display: block;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-title .emphasis {
    font-size: 2.2rem;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .insight-card {
    flex-direction: column;
    gap: 1rem;
  }

  .insight-date {
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    padding-right: 0;
    padding-bottom: 1rem;
    text-align: left;
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ===== Print Styles ===== */
@media print {
  .header,
  .footer {
    display: none;
  }

  .page-header {
    padding: 2rem 0;
    background: none;
    color: var(--gray-900);
  }

  .page-header h1,
  .page-header .english-title {
    color: var(--gray-900);
  }
}
