/* 
  Space Activation Inc. - Custom Design System 
  Professional, Clean, Trustworthy
*/

:root {
  /* Colors */
  --color-primary: #0F3460;
  --color-primary-dark: #0a2342;
  --color-secondary: #2A9D8F;
  --color-secondary-dark: #21867a;
  --color-accent: #E76F51;

  --color-text-main: #1A202C;
  --color-text-muted: #4A5568;
  --color-text-light: #718096;
  --color-text-white: #ffffff;

  --color-bg-body: #FFFFFF;
  --color-bg-light: #F7FAFC;
  --color-bg-dark: #1A202C;

  --color-border: #E2E8F0;

  /* Typography */
  --font-family-base: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-family-heading: 'Noto Sans JP', sans-serif;
  --line-height-base: 1.8;
  --line-height-heading: 1.4;
  --letter-spacing-heading: 0.02em;
  --letter-spacing-tight: -0.01em;

  /* Spacing Scale (8px base) */
  --space-1: 0.25rem;
  /* 4px */
  --space-2: 0.5rem;
  /* 8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-5: 1.25rem;
  /* 20px */
  --space-6: 1.5rem;
  /* 24px */
  --space-8: 2rem;
  /* 32px */
  --space-10: 2.5rem;
  /* 40px */
  --space-12: 3rem;
  /* 48px */
  --space-16: 4rem;
  /* 64px */
  --space-20: 5rem;
  /* 80px */
  --space-24: 6rem;
  /* 96px */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* Max Widths */
  --container-width: 1200px;
}

/* Reset / Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--color-bg-body);
  color: var(--color-text-main);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
}

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

ul,
ol {
  list-style: none;
}

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

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: var(--line-height-heading);
  margin-bottom: var(--space-4);
  color: var(--color-primary);
  letter-spacing: var(--letter-spacing-heading);
}

h1 {
  letter-spacing: 0.03em;
}

h2 {
  letter-spacing: 0.025em;
}

p {
  letter-spacing: 0.01em;
}

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

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.text-primary {
  color: var(--color-primary);
}

.text-secondary {
  color: var(--color-secondary);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-white {
  color: var(--color-text-white);
}

.text-accent {
  color: var(--color-accent);
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.font-normal {
  font-weight: 400;
}

.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-base {
  font-size: 1rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.text-4xl {
  font-size: 2.25rem;
}

.text-5xl {
  font-size: 3rem;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

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

/* Section Dividers */
.section-divider {
  position: relative;
  margin-top: -1px;
}

.section-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}

.section-divider-wave {
  fill: var(--color-bg-light);
}

.section-divider-wave-reverse {
  fill: var(--color-bg-body);
}

/* Subtle texture overlay */
.section-textured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.align-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

.gap-12 {
  gap: var(--space-12);
}

.gap-14 {
  gap: 3.5rem;
}

.gap-16 {
  gap: var(--space-16);
}

.d-grid {
  display: grid;
}

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

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

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

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

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .md\:order-1 {
    order: 1;
  }

  .md\:order-2 {
    order: 2;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Spacing Utilities */
.m-0 {
  margin: 0;
}

.mt-2 {
  margin-top: var(--space-2);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mt-12 {
  margin-top: var(--space-12);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.mb-12 {
  margin-bottom: var(--space-12);
}

.p-4 {
  padding: var(--space-4);
}

.p-6 {
  padding: var(--space-6);
}

.p-8 {
  padding: var(--space-8);
}

.py-4 {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.px-4 {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* Components */

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-weight: 600;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  border: 2px solid transparent;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-white);
  box-shadow: 0 4px 15px rgba(15, 52, 96, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(15, 52, 96, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
  color: var(--color-text-white);
  box-shadow: 0 4px 15px rgba(42, 157, 143, 0.2);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary) 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(42, 157, 143, 0.3);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-text-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 52, 96, 0.2);
}

.btn-white {
  background-color: var(--color-bg-body);
  color: var(--color-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.btn-white:hover {
  background-color: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}


/* Cards */
.card {
  display: block;
  background: var(--color-bg-body);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.card-related {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.card-related .p-6 {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-related:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.card-body {
  padding: var(--space-6);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    gap: var(--space-6);
  }
}

.nav-link {
  font-weight: 500;
  color: var(--color-text-main);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-secondary);
  transition: width 0.3s ease;
}

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

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: block;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary);
}

/* Service Page Navigation */
.service-nav {
  position: sticky;
  top: 60px;
  /* Header height */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 90;
  padding: var(--space-4) 0;
  overflow-x: auto;
  white-space: nowrap;
}

.service-nav-link {
  color: var(--color-text-muted);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
  font-size: 0.9rem;
  margin-right: var(--space-2);
}

.service-nav-link:hover,
.service-nav-link:focus {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
}

/* Tool Badges */
.tool-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  background-color: var(--color-bg-light);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* Case Study Tags */
.case-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 4px;
  margin-bottom: var(--space-4);
}

.case-card-icon {
  font-size: 2rem;
  margin-bottom: var(--space-4);
}

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

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  height: calc(100vh - 80px);
  background-color: var(--color-bg-body);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  gap: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.mobile-nav.open {
  transform: translateX(0);
}


/* Footer */
.site-footer {
  background-color: var(--color-primary);
  color: var(--color-text-white);
  padding-top: var(--space-12);
  padding-bottom: var(--space-8);
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-2);
  display: block;
}

.footer-link:hover {
  color: var(--color-text-white);
  text-decoration: underline;
}

/* Hero Section */
.hero {
  padding: var(--space-24) 0;
  background: linear-gradient(135deg, var(--color-bg-light) 0%, #e6f0fa 100%);
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero::before {
  /* Subtle pattern */
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(42, 157, 143, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(15, 52, 96, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  z-index: 0;
}

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

/* Animation utilities */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Custom Features */
.feature-list-item {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-3);
}

.feature-icon {
  color: var(--color-secondary);
  font-weight: bold;
  margin-right: var(--space-3);
  font-size: 1.25rem;
}

/* Steps */
.step-item {
  background: var(--color-bg-body);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  margin-bottom: var(--space-2);
}

/* Form */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

/* Image Utilities */
.w-full {
  width: 100%;
}

.h-auto {
  height: auto;
}

.object-cover {
  object-fit: cover;
}

.overflow-hidden {
  overflow: hidden;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.1);
}

.form-checkbox-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

/* Header Scrolled State */
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.site-header.scrolled .header-inner {
  height: 60px;
  transition: height 0.3s ease;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  z-index: 999;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-3px);
}

.grecaptcha-badge {
  visibility: hidden;
}

.recaptcha-notice {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.recaptcha-notice a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

/* Form Validation States */
.form-input.is-valid,
.form-textarea.is-valid,
.form-select.is-valid {
  border-color: var(--color-secondary);
}

.form-input.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
  border-color: var(--color-accent);
  background-color: rgba(231, 111, 81, 0.05);
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .text-4xl {
    font-size: 1.75rem;
  }

  .text-3xl {
    font-size: 1.5rem;
  }

  .hero {
    min-height: 60vh;
    padding: var(--space-16) 0;
  }

  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

/* Hidden utility */
.hidden {
  display: none !important;
}

@media (min-width: 768px) {
  .md\:block {
    display: block !important;
  }
}
