/* M&i Group - Plain HTML/CSS - converted from React/Tailwind */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&display=swap');

:root {
  --background: 210 20% 98%;
  --foreground: 220 25% 10%;
  --card: 0 0% 100%;
  --card-foreground: 220 25% 10%;
  --primary: 215 80% 48%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 30% 94%;
  --muted: 210 20% 96%;
  --muted-foreground: 215 15% 50%;
  --accent: 200 70% 50%;
  --accent-foreground: 0 0% 100%;
  --border: 214 25% 90%;
  --ring: 215 80% 48%;
  --radius: 0.5rem;
  --hero-overlay: 220 30% 15%;
  --section-overlay: 215 40% 20%;
  --footer-bg: 220 25% 12%;
  --footer-foreground: 210 20% 85%;
}

* {
  box-sizing: border-box;
  border-color: hsl(var(--border));
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
}

/* Layout */
.page {
  min-height: 100vh;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .container { padding-left: 2rem; padding-right: 2rem; }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, border 0.3s;
}

.header.scrolled {
  background: hsl(var(--card) / 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  border-bottom: 1px solid hsl(var(--border));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

@media (min-width: 768px) {
  .header-inner { height: 5rem; }
}

.header-logo {
  height: 2.5rem;
  display: block;
}

@media (min-width: 768px) {
  .header-logo { height: 3rem; }
}

.nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.nav-desktop button {
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s;
  font-family: inherit;
  color: inherit;
}

.header:not(.scrolled) .nav-desktop button {
  color: rgba(255, 255, 255, 0.9);
}

.header:not(.scrolled) .nav-desktop button:hover {
  color: #fff;
}

.header.scrolled .nav-desktop button {
  color: hsl(var(--foreground));
}

.nav-desktop button:hover {
  color: hsl(var(--primary));
}

.menu-toggle {
  display: flex;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

@media (min-width: 768px) {
  .menu-toggle { display: none; }
}

.header:not(.scrolled) .menu-toggle {
  color: #fff;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.mobile-menu {
  display: none;
  background: hsl(var(--card) / 0.98);
  backdrop-filter: blur(16px);
  border-top: 1px solid hsl(var(--border));
  animation: fadeIn 0.3s ease-out;
}

@media (min-width: 768px) {
  .mobile-menu { display: none !important; }
}

.mobile-menu.open {
  display: block;
}

.mobile-menu nav {
  padding: 1rem;
}

.mobile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background 0.2s;
}

.mobile-menu button:hover {
  background: hsl(var(--primary) / 0.05);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
  position: relative;
  
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  
  object-fit: contain;
  
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../images/hero.jpg') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    hsl(var(--hero-overlay) / 0.6),
    hsl(var(--hero-overlay) / 0.4),
    hsl(var(--hero-overlay) / 0.7)
  );
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  margin: 0 auto;
  
  margin-top: 35px;
  
  padding: 1rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
  margin: 0;
  transition: opacity 1s, transform 1s;
}

.hero h1.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero h1:not(.visible) {
  opacity: 0;
  transform: translateY(2rem);
}

@media (min-width: 640px) { .hero h1 { font-size: 2.25rem; } }
@media (min-width: 768px) { .hero h1 { font-size: 3rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 3.75rem; } }

.hero h1 .accent {
  color: hsl(var(--accent));
}

.hero-desc {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  transition: opacity 1s 0.3s, transform 1s 0.3s;
}

@media (min-width: 768px) { .hero-desc { margin-top: 2rem; font-size: 1.25rem; } }

.hero-desc.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-desc:not(.visible) {
  opacity: 0;
  transform: translateY(2rem);
}

.br-sm {
  display: none;
}

@media (min-width: 640px) {
  .br-sm {
    display: inline;
  }
}

.hero-cta-wrap {
  margin-top: 2rem;
  transition: opacity 1s 0.5s, transform 1s 0.5s;
}

@media (min-width: 768px) { .hero-cta-wrap { margin-top: 2.5rem; } }

.hero-cta-wrap.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-cta-wrap:not(.visible) {
  opacity: 0;
  transform: translateY(2rem);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 500;
  font-size: 0.875rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.hero-cta:hover {
  background: hsl(var(--primary) / 0.9);
}

@media (min-width: 768px) { .hero-cta { font-size: 1rem; } }

.hero-cta svg {
  animation: bounce 1s infinite;
}

@keyframes bounce {
  50% { transform: translateY(4px); }
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8rem;
  background: linear-gradient(to top, hsl(var(--background)), transparent);
}

/* Sections common */
.section {
  position: relative;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 3rem;
  transition: opacity 0.7s, transform 0.7s;
}

@media (min-width: 768px) { .section-title-wrap { margin-bottom: 4rem; } }

.section-title-wrap.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title-wrap:not(.visible) {
  opacity: 0;
  transform: translateY(2.5rem);
}

.section-label {
  color: hsl(var(--primary));
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

@media (min-width: 640px) { .section h2 { font-size: 1.875rem; } }
@media (min-width: 768px) { .section h2 { font-size: 2.25rem; } }

.section-title-line {
  margin-top: 1rem;
  width: 4rem;
  height: 4px;
  background: hsl(var(--primary));
  border-radius: 9999px;
  margin-left: auto;
  margin-right: auto;
}

.section-desc {
  margin-top: 1.5rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

@media (min-width: 768px) { .section-desc { font-size: 1rem; } }

/* Overview */
.overview {
  padding: 5rem 0;
  overflow: hidden;
}

@media (min-width: 768px) { .overview { padding: 8rem 0; } }

.overview-bg {
  position: absolute;
  inset: 0;
  background: url('../images/about.jpg') center/cover fixed;
}

.overview-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom right,
    hsl(var(--background) / 0.9),
    hsl(var(--background) / 0.5),
    hsl(var(--primary) / 0.1)
  );
}

.overview-inner {
  position: relative;
  z-index: 10;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) { .overview-inner { padding: 0 1.5rem; } }

.overview .section-desc {
  color: hsl(var(--foreground));
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

.stat-card {
  background: hsl(var(--card) / 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid hsl(var(--border));
  border-radius: 2px;
  padding: 1.5rem 2rem;
  text-align: center;
  transition: opacity 0.5s, transform 0.5s, box-shadow 0.5s;
}

.stat-card:hover {
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  transform: translateY(-4px);
}

.stat-card:not(.visible) {
  opacity: 0;
  transform: translateY(2.5rem);
}

.stat-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: hsl(var(--primary) / 0.1);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.stat-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: hsl(var(--primary));
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

@media (min-width: 768px) { .stat-value { font-size: 2.25rem; } }

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-top: 0.5rem;
}

.stat-desc {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

/* Business */
.business {
  padding: 5rem 0;
  overflow: hidden;
}

@media (min-width: 768px) { .business { padding: 8rem 0; } }

.business-bg {
  position: absolute;
  inset: 0;
  background: url('../images/synergy.jpg') center/cover fixed;
}

.business-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom right,
    hsl(var(--section-overlay) / 0.85),
    hsl(var(--section-overlay) / 0.75),
    hsl(var(--primary) / 0.2)
  );
}

@media (max-width: 767px) {
  .overview-bg-overlay {
    background: linear-gradient(
      to bottom right,
      hsl(var(--background) / 0.35),
      hsl(var(--background) / 0.2),
      hsl(var(--primary) / 0.05)
    );
  }
  .business-bg-overlay {
    background: linear-gradient(
      to bottom right,
      hsl(var(--section-overlay) / 0.4),
      hsl(var(--section-overlay) / 0.35),
      hsl(var(--primary) / 0.08)
    );
  }
  .section h2 {
    color: #fff;
  }
  .overview .section-label,
  .overview .section h2,
  .overview .section-desc,
  .business .section-label,
  .business .section h2,
  .business .section-desc {
    color: #fff;
  }
  .overview .section-title-line,
  .business .section-title-line {
    background: #fff;
  }
  .news h2 {
    color: hsl(var(--foreground));
  }
  .synergy-card {
    background: rgba(0, 0, 0, 0.5);
  }
  .synergy-card h3 {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  }
  .synergy-card p {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  }
}

.business-inner {
  position: relative;
  z-index: 10;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) { .business-inner { padding: 0 1.5rem; } }

.business .section-label {
  color: hsl(var(--accent));
}

.business .section h2 {
  color: #fff;
}

.business .section-title-line {
  background: hsl(var(--accent));
}

.business .section-desc {
  color: rgba(255, 255, 255, 0.75);
}

.synergy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .synergy-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

.synergy-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  padding: 1.5rem 2rem;
  transition: opacity 0.5s, transform 0.5s, background 0.3s;
}

.synergy-card:hover {
  background: rgba(255, 255, 255, 0.15);
}

.synergy-card:not(.visible) {
  opacity: 0;
  transform: translateY(2.5rem);
}

.synergy-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: hsl(var(--accent) / 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: background 0.3s;
}

.synergy-card:hover .synergy-icon {
  background: hsl(var(--accent) / 0.3);
}

.synergy-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: hsl(var(--accent));
}

.synergy-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem;
}

.synergy-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

/* News */
.news {
  padding: 5rem 0;
  background: hsl(var(--background));
}

@media (min-width: 768px) { .news { padding: 7rem 0; } }

.news-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) { .news-inner { padding: 0 1.5rem; } }

.news-list {
  margin-top: 2rem;
}

.news-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1rem;
  margin: 0 -1rem;
  border-bottom: 1px solid hsl(var(--border));
  transition: opacity 0.5s, transform 0.5s, background 0.2s;
  cursor: pointer;
  border-radius: 0.5rem;
}

@media (min-width: 640px) {
  .news-item {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }
}

.news-item:hover {
  background: hsl(var(--muted) / 0.5);
}

.news-item:not(.visible) {
  opacity: 0;
  transform: translateY(1.5rem);
}

.news-item time {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  white-space: nowrap;
}

.news-item p {
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  margin: 0;
  transition: color 0.2s;
}

@media (min-width: 768px) { .news-item p { font-size: 1rem; } }

.news-item:hover p {
  color: hsl(var(--primary));
}

/* Footer */
.footer {
  background: hsl(var(--footer-bg));
  padding: 3rem 0;
}

@media (min-width: 768px) { .footer { padding: 4rem 0; } }

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

@media (min-width: 640px) { .footer-inner { padding: 0 1.5rem; } }

.footer-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.footer-logo {
  height: 2.5rem;
}

@media (min-width: 768px) { .footer-logo { height: 3rem; } }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: hsl(var(--footer-foreground) / 0.7);
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.75rem;
  color: hsl(var(--footer-foreground) / 0.5);
  margin: 0;
}

/* 404 */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--muted));
}

.page-404-inner {
  text-align: center;
}

.page-404 h1 {
  margin-bottom: 1rem;
  font-size: 2.25rem;
  font-weight: 700;
}

.page-404 p {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: hsl(var(--muted-foreground));
}

.page-404 a {
  color: hsl(var(--primary));
  text-decoration: underline;
}

.page-404 a:hover {
  color: hsl(var(--primary) / 0.9);
}
