:root {
  --primary: #00B900;
  --primary-dark: #009900;
  --secondary: #1E88E5;
  --accent: #FF6B35;
  --bg: #F8F9FA;
  --white: #FFFFFF;
  --text: #212529;
  --text-light: #6C757D;
  --border: #DEE2E6;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);
}

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

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
}

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

a:hover {
  opacity: 0.8;
}

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

.container {
  width: min(1200px, 94%);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 8px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

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

.global-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

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

.nav-cta {
  background: var(--primary);
  color: var(--white);
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--primary-dark);
  opacity: 1;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0B152B 0%, #1A2F4F 100%);
  color: var(--white);
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.hero-lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0.95;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

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

.button-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 185, 0, 0.3);
  opacity: 1;
}

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

.button-secondary:hover {
  background: #F0F0F0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
  opacity: 1;
}

.button-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.button-outline:hover {
  background: var(--white);
  color: var(--text);
  opacity: 1;
}

/* Section */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Card */
.card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-lg);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.card-text {
  color: var(--text-light);
  line-height: 1.8;
}

/* Feature List */
.feature-list {
  list-style: none;
}

.feature-list li {
  padding: 0.8rem 0;
  padding-left: 2rem;
  position: relative;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Process Steps */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-number {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.process-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.process-text {
  color: var(--text-light);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* Footer */
.site-footer {
  background: #1A1A1A;
  color: #CCCCCC;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #CCCCCC;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--white);
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  font-size: 0.85rem;
  color: #999;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #0B152B 0%, #1A2F4F 100%);
  color: var(--white);
  padding: 4rem 0 3rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: #F8F9FA;
  font-weight: 700;
  color: var(--text);
}

tr:last-child td {
  border-bottom: none;
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
}

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

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.form-checkbox input {
  margin-top: 0.3rem;
}

/* FAQ */
.faq-item {
  background: var(--white);
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
}

.faq-question {
  padding: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

.faq-question:hover {
  background: #F8F9FA;
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-light);
  line-height: 1.8;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-toggle {
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
  transform: rotate(180deg);
}

/* Image Styles */
.hero-image,
.section-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem 0;
  object-fit: cover;
}

.hero-image {
  max-height: 400px;
}

.section-image {
  max-height: 300px;
}

.icon-image {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  display: block;
}

/* Enhanced Button for Download */
.button-download {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 185, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.button-download::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.button-download:hover::before {
  left: 100%;
}

.button-download:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 185, 0, 0.5);
  opacity: 1;
}

/* TimeRex Button */
.button-timerex {
  background: #FF6B35;
  color: var(--white);
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
}

.button-timerex:hover {
  background: #E55A2B;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .global-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 12px var(--shadow);
    gap: 1rem;
  }

  .global-nav.active {
    display: flex;
  }

  .global-nav li {
    width: 100%;
  }

  .global-nav a {
    display: block;
    padding: 0.8rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-cta {
    width: 100%;
    text-align: center;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

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

  .hero-lead {
    font-size: 1rem;
    line-height: 1.6;
  }

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

  .button {
    width: 100%;
    padding: 1rem 1.5rem;
  }

  .button-download,
  .button-timerex {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1rem;
  }

  .section {
    padding: 3rem 0;
  }

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

  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .header-inner {
    padding: 0.8rem 0;
  }

  .logo {
    font-size: 1.2rem;
  }

  .page-header {
    padding: 3rem 0 2rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

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

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

  .card-title {
    font-size: 1.1rem;
  }

  .flow-diagram {
    padding: 1rem;
  }

  .flow-box {
    padding: 0.8rem;
    font-size: 0.9rem;
  }

  .before-box,
  .after-box {
    padding: 1rem;
  }

  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    font-size: 0.9rem;
  }

  th, td {
    padding: 0.8rem 0.5rem;
  }
}
