/* ============================================
   MAGLUCK.NET - Corporate Site Design System
   ============================================ */

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

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1424;
  --bg-card: #141929;
  --bg-card-hover: #1a2035;
  --text-primary: #e8ecf4;
  --text-secondary: #8892a8;
  --text-muted: #5a6478;
  --accent: #c8a44e;
  --accent-light: #ddb962;
  --accent-dark: #a88836;
  --line-color: #2a3148;
  --line-accent: #c8a44e;
  --border-subtle: rgba(200, 164, 78, 0.12);

  /* Typography */
  --font-en: 'Inter', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;

  /* Spacing */
  --section-padding: 120px;
  --container-width: 1100px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-jp);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* --- Container --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 40px;
  transition: all 0.5s var(--ease-out);
}

.nav.scrolled {
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-logo {
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-logo .dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}

.nav-links a:hover {
  color: var(--text-primary);
}

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

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 164, 78, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-label {
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.3s forwards;
}

.hero-title {
  font-family: var(--font-en);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}

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

.hero-subtitle {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.7s forwards;
}

.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1.2s forwards;
}

.hero-scroll span {
  font-family: var(--font-en);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: var(--line-color);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { top: -100%; }
  50% { top: 100%; }
  50.01% { top: -100%; }
  100% { top: 100%; }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SECTION DIVIDER LINES
   ============================================ */
.section-divider {
  position: relative;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.divider-line {
  position: relative;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: width 1.4s var(--ease-out);
}

.divider-line.visible {
  width: 80%;
}

.divider-diamond {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  width: 8px;
  height: 8px;
  border: 1px solid var(--accent);
  transition: transform 0.6s var(--ease-out) 0.6s;
}

.divider-line.visible + .divider-diamond,
.divider-line.visible ~ .divider-diamond {
  transform: translate(-50%, -50%) rotate(45deg) scale(1);
}

/* Vertical connector lines between sections */
.vertical-line-container {
  position: relative;
  display: flex;
  justify-content: center;
  height: 80px;
}

.vertical-line {
  width: 1px;
  height: 0;
  background: linear-gradient(180deg, var(--accent), var(--line-color));
  transition: height 1s var(--ease-out);
}

.vertical-line.visible {
  height: 100%;
}

/* ============================================
   SECTION SHARED STYLES
   ============================================ */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-label {
  font-family: var(--font-en);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.section-title {
  font-family: var(--font-jp);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* --- Fade In Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0.1s; }
.stagger > *:nth-child(2) { transition-delay: 0.2s; }
.stagger > *:nth-child(3) { transition-delay: 0.3s; }
.stagger > *:nth-child(4) { transition-delay: 0.4s; }

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s var(--ease-out);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(200, 164, 78, 0.25);
  transform: translateY(-4px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-number {
  font-family: var(--font-en);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 24px;
  display: block;
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
}

.service-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.service-desc {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.9;
}

/* ============================================
   COMPANY SECTION
   ============================================ */
.company-table {
  max-width: 700px;
  margin: 0 auto;
}

.company-row {
  display: flex;
  border-bottom: 1px solid var(--line-color);
  padding: 24px 0;
  transition: border-color 0.3s ease;
}

.company-row:hover {
  border-color: var(--accent);
}

.company-row:last-child {
  border-bottom: none;
}

.company-label {
  font-family: var(--font-jp);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  width: 160px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.company-value {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-area {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-text {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 40px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-primary);
  padding: 20px 48px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  letter-spacing: 0.06em;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transition: left 0.5s var(--ease-out);
  z-index: 0;
}

.contact-link:hover {
  color: var(--bg-primary);
}

.contact-link:hover::before {
  left: 0;
}

.contact-link span {
  position: relative;
  z-index: 1;
}

.contact-link svg {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--line-color);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-copy {
  font-family: var(--font-en);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
  }

  .container {
    padding: 0 24px;
  }

  .nav {
    padding: 0 24px;
  }

  .nav-inner {
    height: 64px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 999;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .service-card {
    padding: 36px 28px;
  }

  .company-row {
    flex-direction: column;
    gap: 6px;
    padding: 18px 0;
  }

  .company-label {
    width: auto;
  }

  .contact-link {
    padding: 16px 36px;
    font-size: 0.95rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .section-divider {
    height: 80px;
  }
}

@media (max-width: 480px) {
  .hero-subtitle {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.3rem;
  }
}
