/* ============================================
   株式会社Legal Consulting - Corporate Site
   Design inspired by Legal Flow (flow.legal-consulting.jp)
   ============================================ */

/* --- Design Tokens --- */
:root {
  --color-bg: #fdfbf7;
  --color-bg-alt: #f5f0e8;
  --color-surface: #ffffff;
  --color-primary: #0050b3;
  --color-primary-dark: #003d8a;
  --color-primary-light: #e8f0fe;
  --color-accent-gradient: linear-gradient(135deg, #0050b3 0%, #7c3aed 100%);
  --color-text: #1a1a2e;
  --color-text-secondary: #64648c;
  --color-text-light: #ffffff;
  --color-border: #e8e4dc;
  --color-border-light: #f0ece4;

  --font-sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Inter', 'Noto Sans JP', sans-serif;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --max-width: 1200px;
  --section-padding: 120px;
}

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

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

body {
  font-family: var(--font-sans);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

a:hover {
  color: var(--color-primary-dark);
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

.gradient-text {
  background: var(--color-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

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

.section-header h2 {
  margin-bottom: 16px;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--color-accent-gradient);
  border-radius: 2px;
  margin: 24px auto 0;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Header / Navbar --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-base);
  background-color: transparent;
}

.site-header.scrolled {
  background-color: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--color-border);
  padding: 12px 0;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--color-primary);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-base);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent-gradient);
  border-radius: 1px;
  transition: width var(--transition-base);
}

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

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

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  margin: 5px 0;
  transition: all var(--transition-base);
  border-radius: 1px;
}

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

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

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

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  background: linear-gradient(180deg, var(--color-bg) 0%, #f0eee8 50%, rgba(0, 80, 179, 0.03) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(0, 80, 179, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

.hero-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--color-text);
}

.hero-description {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  box-shadow: 0 4px 14px rgba(0, 80, 179, 0.25);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-text-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 80, 179, 0.35);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-arrow::after {
  content: '→';
  transition: transform var(--transition-base);
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* --- About Section --- */
.about-section {
  background-color: var(--color-bg);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text h2 {
  text-align: left;
  margin-bottom: 24px;
}

.about-text p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--color-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* --- Services Section --- */
.services-section {
  background-color: var(--color-bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
}

.service-card h3 {
  margin-bottom: 16px;
  color: var(--color-text);
}

.service-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.service-features {
  list-style: none;
  margin-top: 20px;
}

.service-features li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.service-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* --- Legal Flow Section --- */
.legalflow-section {
  background: linear-gradient(135deg, #0050b3 0%, #003d8a 40%, #1a0040 100%);
  color: var(--color-text-light);
  position: relative;
  overflow: hidden;
}

.legalflow-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.legalflow-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.legalflow-text .section-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.legalflow-text h2 {
  color: var(--color-text-light);
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.legalflow-text .highlight {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legalflow-text p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 32px;
}

.legalflow-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.lf-feature {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition-base);
}

.lf-feature:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.lf-feature-icon {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.lf-feature h4 {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.lf-feature p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  margin-bottom: 0;
  line-height: 1.5;
}

.btn-legalflow {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-legalflow:hover {
  background: rgba(255, 255, 255, 0.25);
  color: var(--color-text-light);
  transform: translateY(-2px);
}

.legalflow-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lf-mockup {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  width: 100%;
  max-width: 440px;
  backdrop-filter: blur(10px);
}

.lf-mockup-logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lf-mockup-tagline {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  margin-bottom: 32px;
  line-height: 1.6;
}

.lf-mockup-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.lf-stat {
  text-align: center;
}

.lf-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-light);
}

.lf-stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
}

/* --- Company Section --- */
.company-section {
  background-color: var(--color-bg);
}

.company-table-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.company-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-bottom: 1px solid var(--color-border-light);
}

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

.company-row dt {
  background: var(--color-bg-alt);
  padding: 20px 28px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
}

.company-row dd {
  padding: 20px 28px;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  line-height: 1.6;
}

/* --- Contact Section --- */
.contact-section {
  background-color: var(--color-bg-alt);
}

.contact-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.form-group label .required {
  color: #e74c3c;
  margin-left: 4px;
  font-size: 0.85rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  transition: all var(--transition-base);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 80, 179, 0.1);
  background: var(--color-surface);
}

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

.submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
}

.form-message {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  display: none;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--color-text);
  color: rgba(255, 255, 255, 0.5);
  padding: 40px 0;
}

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

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  transition: color var(--transition-base);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   Responsive Design
   ============================================ */

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

  h2 {
    font-size: 2rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .about-content {
    gap: 48px;
  }

  .legalflow-content {
    gap: 48px;
  }
}

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

  /* Header */
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-bg);
    padding: 80px 32px 32px;
    transition: right var(--transition-base);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav li {
    border-bottom: 1px solid var(--color-border-light);
  }

  .main-nav a {
    display: block;
    padding: 16px 0;
    font-size: 1rem;
  }

  .main-nav a::after {
    display: none;
  }

  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
  }

  .mobile-overlay.active {
    display: block;
  }

  /* Hero */
  .hero {
    padding: 100px 20px 60px;
    min-height: 80vh;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  /* About */
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-text h2 {
    text-align: center;
  }

  .about-text p {
    text-align: center;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Legal Flow */
  .legalflow-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .legalflow-visual {
    order: -1;
  }

  .legalflow-features {
    grid-template-columns: 1fr;
  }

  .legalflow-text h2 {
    font-size: 2rem;
  }

  /* Company */
  .company-row {
    grid-template-columns: 1fr;
  }

  .company-row dt {
    padding: 14px 20px;
    font-size: 0.85rem;
  }

  .company-row dd {
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border-light);
  }

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

  /* Contact */
  .contact-form {
    padding: 32px 24px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

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

  h2 {
    font-size: 1.6rem;
  }

  .service-card {
    padding: 28px;
  }

  .lf-mockup {
    padding: 32px;
  }

  .lf-mockup-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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