/* ============================================
   GenbaScan Corporate Site — shadcn/ui style
   ============================================ */

/* --- Design Tokens --- */
:root {
  --bg:            #ffffff;
  --fg:            #0a0a0a;
  --muted:         #f4f4f5;
  --muted-fg:      #71717a;
  --border:        #e4e4e7;
  --input:         #e4e4e7;
  --ring:          #0059b3;
  --primary:       #0059b3;
  --primary-fg:    #ffffff;
  --primary-hover: #004a99;
  --accent:        #f4f4f5;
  --accent-fg:     #18181b;
  --destructive:   #dc2626;
  --destructive-light: #fef2f2;
  --card:          #ffffff;
  --card-fg:       #0a0a0a;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-full:   9999px;
  --shadow-sm:     0 1px 3px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow:        0 4px 16px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .04);
  --shadow-md:     0 8px 30px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-lg:     0 12px 40px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .05);
  --font-sans:     "Inter", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
                   "Hiragino Sans", Meiryo, sans-serif;
  --leading:       1.75;
  --leading-tight: 1.35;
  --tracking:      -0.01em;
  --tracking-wide: 0.08em;
  --transition:    150ms cubic-bezier(.4, 0, .2, 1);
  --header-h:      64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: var(--leading);
  letter-spacing: var(--tracking);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Shared Components --- */

/* Button: primary */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Button: outline */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: transparent;
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.btn-outline:hover {
  background: var(--accent);
  border-color: var(--muted-fg);
}
.btn-outline:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}
.badge-primary {
  background: var(--primary);
  color: var(--primary-fg);
}
.badge-muted {
  background: var(--muted);
  color: var(--muted-fg);
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

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

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.site-logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
}
.site-logo span {
  color: var(--primary);
}

.header-nav ul {
  display: flex;
  gap: 8px;
}

.header-nav a {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-fg);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.header-nav a:hover {
  color: var(--fg);
  background: var(--muted);
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--fg);
  border-radius: 1px;
  position: absolute;
  left: 0;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

/* --- Section Common --- */
section {
  padding: 96px 0;
}

.section-muted {
  background: var(--muted);
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-lead {
  font-size: 1rem;
  color: var(--muted-fg);
  line-height: var(--leading);
  margin-bottom: 48px;
  max-width: 600px;
}

/* --- Hero --- */
.hero {
  padding: 160px 0 112px;
  text-align: center;
}

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

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.0625rem;
  color: var(--muted-fg);
  line-height: var(--leading);
  max-width: 540px;
  margin: 0 auto 40px;
}

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

/* --- Problem --- */
.problem-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.problem-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
}

.problem-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--destructive);
  background: var(--destructive-light);
  border-radius: var(--radius-sm);
}

.problem-body h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.problem-body p {
  font-size: 0.875rem;
  color: var(--muted-fg);
  line-height: var(--leading);
}

/* --- Solution --- */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.solution-card {
  padding: 32px 24px;
  text-align: center;
}
.solution-card:hover {
  box-shadow: var(--shadow-md);
}

.solution-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.solution-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.solution-card p {
  font-size: 0.875rem;
  color: var(--muted-fg);
  line-height: var(--leading);
}

/* --- Free App --- */
.app-card {
  text-align: center;
  padding: 56px 40px;
  box-shadow: var(--shadow);
}

.app-card .badge {
  margin-bottom: 20px;
}

.app-card h3 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.app-card > p {
  font-size: 0.9375rem;
  color: var(--muted-fg);
  line-height: var(--leading);
  max-width: 460px;
  margin: 0 auto 32px;
}

.app-features {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.app-features li {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg);
  padding: 6px 16px;
  background: var(--muted);
  border-radius: var(--radius-full);
}

.app-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Custom --- */
.custom-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.custom-text p {
  font-size: 0.9375rem;
  color: var(--muted-fg);
  line-height: var(--leading);
  margin-bottom: 16px;
}

.custom-examples {
  padding: 28px;
}

.custom-examples h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.custom-examples li {
  font-size: 0.875rem;
  color: var(--card-fg);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  padding-left: 20px;
  position: relative;
  line-height: var(--leading);
}

.custom-examples li:last-child {
  border-bottom: none;
}

.custom-examples li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* --- Flow --- */
.flow-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.flow-card {
  padding: 28px;
}

.flow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.flow-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.flow-card p {
  font-size: 0.875rem;
  color: var(--muted-fg);
  line-height: var(--leading);
}

/* --- Contact --- */
.contact-inner {
  text-align: center;
}

.contact-inner .section-lead {
  margin-left: auto;
  margin-right: auto;
}

.contact-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.contact-card {
  padding: 36px 40px;
  min-width: 280px;
  text-align: center;
}

.contact-card h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-fg);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.contact-card .contact-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-card .contact-value a {
  transition: color var(--transition);
}
.contact-card .contact-value a:hover {
  color: var(--primary);
}

.contact-card .contact-note {
  font-size: 0.8125rem;
  color: var(--muted-fg);
}

.contact-cta {
  margin-top: 8px;
}

/* --- Footer --- */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  font-size: 0.8125rem;
  color: var(--muted-fg);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .header-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    transform: translateY(-120%);
    transition: transform 0.3s;
    z-index: 99;
  }

  .header-nav.is-open {
    transform: translateY(0);
  }

  .header-nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .header-nav a {
    font-size: 0.9375rem;
    display: block;
    padding: 10px 12px;
  }

  .menu-toggle {
    display: block;
  }

  /* Hero */
  .hero {
    padding: 136px 0 80px;
  }

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

  .hero-sub {
    font-size: 0.9375rem;
  }

  /* Sections */
  section {
    padding: 72px 0;
  }

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

  /* Solution */
  .solution-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Custom */
  .custom-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Flow */
  .flow-steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* App */
  .app-card {
    padding: 40px 24px;
  }

  .app-features {
    gap: 8px;
  }

  /* Contact */
  .contact-grid {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .contact-card {
    min-width: auto;
    width: 100%;
    max-width: 360px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 120px 0 64px;
  }

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

  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: 100%;
  }

  .problem-item {
    padding: 20px;
    gap: 16px;
  }

  .solution-card {
    padding: 24px 20px;
  }

  .app-card {
    padding: 32px 20px;
  }

  .app-actions {
    flex-direction: column;
  }
  .app-actions .btn-primary,
  .app-actions .btn-outline {
    width: 100%;
  }

  .flow-card {
    padding: 24px 20px;
  }

  .contact-card {
    padding: 28px 24px;
  }
}
