/* ==========================================================================
   AISTARS Premium Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens & Variables
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colors */
  --color-primary: #0565B3;
  --color-primary-light: #5296D5;
  --color-deep: #08287A;
  --color-deep-dark: #021B59;
  --color-accent: #089EE1;
  --color-gold: #D1A217;
  --color-gold-light: #f6cd4c;

  /* Neutral Colors */
  --color-text: #1a1a1a;
  --color-text-light: #555555;
  --color-text-lighter: #888888;
  --color-white: #ffffff;
  --color-bg-body: #f7f9fc;
  --color-bg-surface: #ffffff;
  --color-warm-bg: #F0DFB8;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-deep) 100%);
  --gradient-gold: linear-gradient(135deg, var(--color-gold) 0%, #b8920f 100%);
  --gradient-gold-btn: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  --gradient-hero: linear-gradient(135deg, var(--color-deep-dark) 0%, var(--color-primary) 50%, var(--color-accent) 100%);
  --gradient-glow: radial-gradient(circle at 50% 50%, rgba(8, 158, 225, 0.15), transparent 70%);
  --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(5, 101, 179, 0.08);
  --shadow-lg: 0 16px 40px rgba(5, 101, 179, 0.12);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

  /* Typography */
  --font-family-base: "Noto Sans JP", sans-serif;
  --font-family-heading: "Montserrat", "Noto Sans JP", sans-serif;

  --font-size-base: 16px;
  --font-size-h1: clamp(2.5rem, 5vw, 4.5rem);
  --font-size-h2: clamp(2rem, 4vw, 3rem);
  --font-size-h3: clamp(1.25rem, 2vw, 1.5rem);

  /* Layout */
  --header-height: 70px;
  --container-width: 1100px;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-full: 9999px;

  /* Spacing */
  --spacing-xs: 0.5rem;
  /* 8px */
  --spacing-sm: 1rem;
  /* 16px */
  --spacing-md: 2rem;
  /* 32px */
  --spacing-lg: 4rem;
  /* 64px */
  --spacing-xl: 8rem;
  /* 128px */
}

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

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-family-base);
  color: var(--color-text);
  background-color: var(--color-bg-body);
  line-height: 1.8;
  padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

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

section {
  padding: var(--spacing-lg) 0;
  position: relative;
  overflow: hidden;
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

/* Background Variations */
.bg-light {
  background-color: var(--color-gray-light);
}

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

.bg-gradient {
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-family-heading);
  color: var(--color-deep);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--font-size-h1);
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, var(--color-deep) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--gradient-gold);
  margin: var(--spacing-sm) auto 0;
  border-radius: var(--border-radius-full);
}

h3 {
  font-size: var(--font-size-h3);
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

p {
  margin-bottom: var(--spacing-sm);
}

/* --------------------------------------------------------------------------
   Components: Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--color-white);
  padding: 16px 40px;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-deep) 0%, var(--color-primary) 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--color-white);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-large {
  padding: 18px 48px;
  font-size: 1.25rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  /* Glass effect */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: all 0.3s ease;
}

#header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

#header nav {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-links a {
  color: var(--color-deep);
  font-weight: 500;
  font-size: 0.95rem;
}

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

.btn-nav {
  background: var(--color-primary);
  color: var(--color-white) !important;
  padding: 10px 24px;
  border-radius: var(--border-radius-full);
  font-size: 0.9rem !important;
  font-weight: 600;
}

.btn-nav:hover {
  background: var(--color-deep);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
#hero {
  padding: calc(var(--header-height) + var(--spacing-lg)) 0 var(--spacing-xl);
  text-align: center;
  background: var(--gradient-hero);
  position: relative;
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(209, 162, 23, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

#hero h1 {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--color-white);
  background-clip: unset;
  color: var(--color-white);
}

#hero .tagline {
  color: var(--color-gold-light);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
  display: block;
}

#hero .description {
  max-width: 700px;
  margin: 0 auto var(--spacing-lg);
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
}

#hero .btn-primary {
  background: var(--gradient-gold-btn);
  color: var(--color-deep-dark);
  font-weight: 700;
}

#hero .btn-primary:hover {
  background: linear-gradient(135deg, var(--color-gold) 0%, #9a7a0d 100%);
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Glass Cards (Shared)
   -------------------------------------------------------------------------- */
.glass-card {
  background: var(--gradient-glass);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-glass);
  transition: all 0.4s ease;
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.9);
}

/* --------------------------------------------------------------------------
   Value Proposition
   -------------------------------------------------------------------------- */
#value {
  background: var(--color-white);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.value-item {
  text-align: center;
  position: relative;
  z-index: 1;
  background: var(--color-white);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(5, 101, 179, 0.1);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.value-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(5, 101, 179, 0.2);
}

.value-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-md);
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  color: var(--color-white);
  position: relative;
}

.value-icon svg {
  width: 36px;
  height: 36px;
  stroke-width: 2;
}

.value-icon::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.15;
  z-index: -1;
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
#services {
  background-color: var(--color-warm-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.service-card {
  background: var(--color-white);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-gold) 100%);
  border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
}

.service-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(5, 101, 179, 0.1) 0%, rgba(209, 162, 23, 0.1) 100%);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.service-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.service-content {
  flex: 1;
}

.service-content h3 {
  margin-bottom: 4px;
}

.service-content p {
  margin-bottom: 0;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(5, 101, 179, 0.1);
}

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

/* --------------------------------------------------------------------------
   Strengths
   -------------------------------------------------------------------------- */
#strengths {
  background: var(--color-bg-body);
}

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  max-width: 900px;
  margin: 0 auto;
}

.strength-card {
  background: linear-gradient(135deg, var(--color-deep) 0%, var(--color-primary) 100%);
  color: var(--color-white);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.strength-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.strength-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(5, 101, 179, 0.3);
}

.strength-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  color: var(--color-gold-light);
}

.strength-icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}

.strength-card h3 {
  color: var(--color-white);
  margin-bottom: var(--spacing-sm);
  font-size: 1.3rem;
}

.strength-card p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Process
   -------------------------------------------------------------------------- */
#process {
  background: var(--color-white);
}

.process-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
}

.process-step {
  flex: 1;
  text-align: center;
  padding: var(--spacing-md);
  background: var(--color-bg-body);
  border-radius: var(--border-radius-md);
  transition: all 0.3s ease;
  max-width: 180px;
}

.process-step:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  font-family: var(--font-family-heading);
  margin: 0 auto var(--spacing-sm);
  box-shadow: 0 4px 10px rgba(5, 101, 179, 0.3);
}

.process-step h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.process-step p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 0;
  line-height: 1.5;
}

.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: var(--color-primary-light);
  margin-top: 48px;
}

.step-arrow svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* Final step - gold styling */
.process-step-final .step-number {
  background: var(--gradient-gold-btn);
  color: var(--color-deep-dark);
  box-shadow: 0 4px 10px rgba(209, 162, 23, 0.4);
}

.process-step-final h3 {
  color: var(--color-gold);
}

/* --------------------------------------------------------------------------
   Company & Contact
   -------------------------------------------------------------------------- */
#company {
  background-color: var(--color-bg-body);
}

.company-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--spacing-sm) var(--spacing-md);
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-white);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-glass);
}

.company-info dt {
  font-weight: bold;
  text-align: right;
  color: var(--color-primary);
}

#contact {
  text-align: center;
  padding: var(--spacing-xl) 0;
  background: var(--gradient-hero);
  color: var(--color-white);
  position: relative;
}

#contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

#contact h2 {
  color: var(--color-white);
}

#contact h2::after {
  background: var(--gradient-gold);
}

#contact p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  margin-bottom: var(--spacing-md);
}

#contact .btn-primary {
  background: var(--gradient-gold-btn);
  color: var(--color-deep-dark);
  font-weight: 700;
}

#contact .btn-primary:hover {
  background: linear-gradient(135deg, var(--color-gold) 0%, #9a7a0d 100%);
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.fade-up {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --spacing-lg: 3rem;
  }

  .value-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

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

  /* Process steps - vertical on mobile */
  .process-steps {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .process-step {
    max-width: 100%;
    width: 100%;
  }

  .step-arrow {
    margin-top: 0;
    transform: rotate(90deg);
    padding: var(--spacing-xs) 0;
  }

  .company-info {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .company-info dt {
    text-align: center;
    margin-top: var(--spacing-sm);
  }

  /* Hamburger Menu */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    z-index: 1001;
    cursor: pointer;
  }

  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-deep);
    transition: all 0.3s ease;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    padding: 80px 24px;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
  }

  .nav-links.active {
    right: 0;
  }
}