/* ========== Reset & Base ========== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #212121;
  background: #ffffff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

/* ========== Container ========== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Header ========== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: box-shadow 0.2s ease;
}

.header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo a {
  display: flex;
  align-items: center;
}

.header-logo span {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d47a1;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ========== Navigation ========== */

.nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav a {
  display: inline-flex;
  align-items: center;
  height: 70px;
  padding: 0 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333333;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover {
  color: #0d47a1;
}

.nav a.active {
  color: #0d47a1;
  border-bottom-color: #0d47a1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #333333;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ========== Language Switch ========== */

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.lang-switch a,
.lang-switch button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: #666666;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.lang-switch a:hover,
.lang-switch button:hover {
  color: #0d47a1;
}

.lang-switch a.active,
.lang-switch button.active {
  color: #0d47a1;
  font-weight: 700;
}

.lang-switch .divider {
  color: #e0e0e0;
  font-size: 0.85rem;
  user-select: none;
}

/* ========== Hero ========== */

.hero {
  width: 100%;
  height: 500px;
  background: #0d47a1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 70px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero .btn-hero {
  display: inline-block;
  padding: 12px 36px;
  background: #ffffff;
  color: #0d47a1;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.hero .btn-hero:hover {
  background: #f0f4f8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ========== Section Common ========== */

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #212121;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: #0d47a1;
  margin: 12px auto 0;
  border-radius: 1px;
}

.section-title p {
  font-size: 0.95rem;
  color: #666666;
  margin-top: 8px;
}

/* ========== Services ========== */

.services {
  padding: 80px 0;
  background: #ffffff;
}

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

.service-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 30px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.service-card .icon {
  width: 48px;
  height: 48px;
  color: #0d47a1;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.service-card .icon img,
.service-card .icon svg {
  width: 48px;
  height: 48px;
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #212121;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.7;
}

/* ========== RouterOS ========== */

.routeros {
  padding: 80px 0;
  background: #0d47a1;
  color: #ffffff;
}

.routeros .section-title h2 {
  color: #ffffff;
}

.routeros .section-title h2::after {
  background: #ffffff;
}

.routeros .section-title p {
  color: rgba(255, 255, 255, 0.8);
}

.routeros-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.ros-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  padding: 24px;
  transition: background 0.2s ease;
}

.ros-card:hover {
  background: rgba(255, 255, 255, 0.14);
}

.ros-icon {
  font-size: 1.5rem;
  color: #90caf9;
  margin-bottom: 14px;
}

.ros-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}

.ros-card p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .routeros-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .routeros-grid {
    grid-template-columns: 1fr;
  }
  .routeros {
    padding: 60px 0;
  }
}

/* ========== Products ========== */

.products {
  padding: 80px 0;
  background: #f8f9fa;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: #ffffff;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.product-card .product-image {
  width: 100%;
  height: 200px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-card .product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card .product-info {
  padding: 20px 24px 24px;
}

.product-card .product-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #212121;
  margin-bottom: 8px;
}

.product-card .product-info p {
  font-size: 0.88rem;
  color: #666666;
  line-height: 1.7;
}

/* ========== About ========== */

.about {
  padding: 80px 0;
  background: #ffffff;
}

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

.about-text h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #212121;
  margin-bottom: 16px;
}

.about-text p {
  font-size: 0.95rem;
  color: #666666;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 24px 16px;
  background: #f8f9fa;
  border-radius: 3px;
}

.stat-item .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #0d47a1;
  line-height: 1.2;
  margin-bottom: 6px;
}

.stat-item .stat-label {
  font-size: 0.85rem;
  color: #666666;
}

/* ========== Contact ========== */

.contact {
  padding: 80px 0;
  background: #f0f4f8;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #212121;
  margin-bottom: 20px;
}

.contact-info p {
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.8;
  margin-bottom: 12px;
}

.contact-info .info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.contact-info .info-item .label {
  font-weight: 600;
  color: #212121;
  white-space: nowrap;
  min-width: 80px;
}

.contact-form {
  background: #ffffff;
  padding: 32px;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: #212121;
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #212121;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

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

/* ========== Buttons ========== */

.btn-primary {
  display: inline-block;
  padding: 10px 28px;
  background: #0d47a1;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background: #1565c0;
  box-shadow: 0 2px 8px rgba(13, 71, 161, 0.25);
}

.btn-outline {
  display: inline-block;
  padding: 10px 28px;
  background: transparent;
  color: #0d47a1;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #0d47a1;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
  background: #0d47a1;
  color: #ffffff;
}

/* ========== Footer ========== */

.footer {
  background: #1a1a2e;
  padding: 40px 0;
  color: #cccccc;
  font-size: 0.88rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand strong {
  font-size: 1.1rem;
  color: #ffffff;
}

.footer-brand p {
  color: #999999;
  line-height: 1.7;
  margin-top: 8px;
}

.footer-brand a {
  color: #999999;
}

.footer-brand a:hover {
  color: #ffffff;
}

.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  color: #999999;
  font-size: 0.85rem;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #666666;
  font-size: 0.8rem;
}

/* ========== Animations ========== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ========== Responsive: 1024px ========== */

@media (max-width: 1024px) {
  .nav a {
    padding: 0 12px;
    font-size: 0.85rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* ========== Responsive: 768px ========== */

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    flex-direction: column;
    padding: 8px 0;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    height: auto;
    padding: 12px 20px;
    border-bottom: none;
    width: 100%;
  }

  .nav a.active {
    background: #f8f9fa;
    border-bottom: none;
    color: #0d47a1;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    height: 400px;
  }

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

  .hero .subtitle {
    font-size: 1.05rem;
  }

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

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

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

/* ========== Responsive: 480px ========== */

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

  .hero {
    height: 350px;
  }

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

  .hero .subtitle {
    font-size: 0.95rem;
  }

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

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

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .services,
  .products,
  .about,
  .contact {
    padding: 60px 0;
  }

  .section-title {
    margin-bottom: 36px;
  }

  .section-title h2 {
    font-size: 1.35rem;
  }

  .service-card {
    padding: 24px;
  }

  .contact-form {
    padding: 24px;
  }

  .hero .btn-hero {
    padding: 10px 28px;
    font-size: 0.9rem;
  }

  .lang-switch {
    display: none;
  }
}

/* ========== About Table ========== */

.about-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.about-table th,
.about-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  vertical-align: top;
}

.about-table th {
  width: 120px;
  font-weight: 600;
  color: #212121;
  background: #f8f9fa;
  white-space: nowrap;
}

.about-table td {
  color: #666666;
}

.about-table td a {
  color: #0d47a1;
}

.about-table td a:hover {
  text-decoration: underline;
}

/* ========== Contact Info Items ========== */

.contact-info .info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.contact-info .info-item i {
  font-size: 1.1rem;
  color: #0d47a1;
  margin-top: 4px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.contact-info .info-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #212121;
  margin-bottom: 4px;
}

.contact-info .info-item p {
  font-size: 0.88rem;
  color: #666666;
  line-height: 1.6;
  margin: 0;
}

.contact-info .info-item a {
  color: #0d47a1;
}

.contact-info .info-item a:hover {
  text-decoration: underline;
}

/* ========== Form Messages ========== */

.form-message {
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  border-radius: 2px;
}

.form-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.form-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* ========== Form Modal ========== */

.form-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-modal-overlay.visible {
  opacity: 1;
}

.form-modal {
  background: #ffffff;
  border-radius: 4px;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.form-modal-overlay.visible .form-modal {
  transform: translateY(0);
}

.form-modal-icon {
  font-size: 3rem;
  color: #16a34a;
  margin-bottom: 16px;
}

.form-modal h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #212121;
  margin-bottom: 12px;
}

.form-modal p {
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.7;
  margin-bottom: 24px;
}

.form-modal .btn-primary {
  min-width: 120px;
}
