:root {
  /* Colors - Premium Tech */
  --c-black: #111111;
  --c-white: #ffffff;
  --c-gray-50: #f9fafe;
  --c-gray-100: #f2f4f8;
  --c-gray-300: #e2e6eb;
  --c-gray-500: #88909c;
  --c-accent: #8b1c1c;
  /* Deep Wine Red */
  --c-accent-light: #b92b2b;
  --c-accent-dark: #5e1212;
  --c-blue-dark: #1a2a4a;

  /* Gradients */
  --g-accent: linear-gradient(135deg, #8b1c1c 0%, #b92b2b 100%);
  --g-text-dark: linear-gradient(to right, #111 0%, #444 100%);

  /* Typography */
  --font-main: "Roboto", "Noto Sans JP", sans-serif;

  /* Layout */
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;

  /* Shadows */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--c-black);
  background-color: var(--c-white);
  line-height: 1.8;
  font-feature-settings: "palt";
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.4;
  color: var(--c-black);
}

.t-hero {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #000 0%, #555 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.t-tag {
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-accent);
  display: inline-block;
  margin-bottom: 20px;
  position: relative;
  padding-left: 0;
}

.t-tag::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--c-accent);
  vertical-align: middle;
  margin-right: 12px;
  margin-bottom: 2px;
}

.t-section {
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: 32px;
  font-weight: 800;
}

.t-lead {
  font-size: 16px;
  color: #555;
  margin-bottom: 40px;
  font-weight: 500;
  line-height: 2;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 120px 0;
  position: relative;
}

.text-center {
  text-align: center;
}

.bg-dark {
  background-color: #0b0f19;
  color: var(--c-white);
  position: relative;
  overflow: hidden;
}

/* Subtle grid overlay for dark sections */
.bg-dark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.bg-gray {
  background-color: var(--c-gray-50);
}

/* Components - Buttons */
.btn {
  font-family: "Roboto", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  background: var(--g-accent);
  color: var(--c-white);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  border-radius: 99px;
  transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 8px 20px rgba(139, 28, 28, 0.3);
  border: none;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-100%);
  transition: 0.4s;
  z-index: -1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(139, 28, 28, 0.4);
}

.btn:hover::after {
  transform: translateX(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 39px;
  /* Subtract border */
  background: transparent;
  color: var(--c-black);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 99px;
  transition: 0.3s;
}

.btn-outline:hover {
  border-color: var(--c-black);
  background: var(--c-black);
  color: var(--c-white);
}

.btn-sm {
  font-size: 12px;
  padding: 10px 24px;
}

.btn-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  /* Glass */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: 0.3s;
}

.logo {
  font-family: "Roboto", sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #000;
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-desktop a {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #444;
  position: relative;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-accent);
  transition: 0.3s;
}

.nav-desktop a:not(.btn-contact):not(.btn-doc):hover::after {
  width: 100%;
}

.header .btn-contact {
  padding: 10px 24px;
  font-size: 12px;
  background: var(--c-accent);
  color: #fff;
  border-radius: 99px;
  font-weight: 700;
  transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 10px rgba(139, 28, 28, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.header .btn-contact::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-100%);
  transition: 0.4s;
  z-index: -1;
}

.header .btn-contact:hover {
  background: var(--c-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(139, 28, 28, 0.4);
}

.header .btn-contact:hover::after {
  transform: translateX(0);
}

.header .btn-doc {
  padding: 10px 20px;
  font-size: 12px;
  background: transparent;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 99px;
  font-weight: 700;
  transition: 0.3s;
  margin-right: 8px;
  position: relative;
  overflow: hidden;
}

/* Header Doc Button Shake/Shine - White Shine on Black is visible */
.header .btn-doc::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-100%);
  transition: 0.4s;
  z-index: 0;
}

.header .btn-doc:hover {
  border-color: var(--c-black);
  color: var(--c-white);
  background: var(--c-black);
}

.header .btn-doc:hover::after {
  transform: translateX(0);
}

/* Inverse Button (for Dark Backgrounds) */
.btn-white {
  background: #fff !important;
  color: var(--c-accent) !important;
  border: 1px solid #fff;
  /* Reset gradient if inherited */
  background-image: none !important;
}

.btn-white:hover {
  background: var(--c-accent) !important;
  color: #fff !important;
  border-color: var(--c-accent);
  box-shadow: 0 12px 24px rgba(139, 28, 28, 0.4);
}

.btn-white-outline {
  background: transparent !important;
  color: #fff !important;
  border: 1px solid #fff !important;
  position: relative;
  overflow: hidden;
}

/* Shine for footer outline button (white background on hover, so needs dark shine) */
.btn-white-outline::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Dark shine for visibility on white background */
  background: rgba(139, 28, 28, 0.1);
  transform: translateX(-100%);
  transition: 0.4s;
  z-index: 0;
}

.btn-white-outline:hover {
  background: #fff !important;
  color: var(--c-accent) !important;
}

.btn-white-outline:hover::after {
  transform: translateX(0);
}


/* Hero */
.hero-wrapper {
  position: relative;
  min-height: 85vh;
  /* Taller */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Bg color removed to show image */
}

/* Dynamic background element - Behind Image */
.hero-wrapper::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 60%;
  height: 120%;
  background: linear-gradient(120deg, var(--c-gray-50) 0%, rgba(255, 255, 255, 0.5) 100%);
  transform: skewX(-12deg);
  z-index: 0;
  border-left: 1px solid var(--c-gray-100);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  /* Above ::before */
  opacity: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gradient Overlay - Above Image */
.hero-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #fff 35%, rgba(255, 255, 255, 0.85) 60%, rgba(255, 255, 255, 0.1) 100%);
  z-index: 2;
  /* Above image */
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  /* Top */
  width: 100%;
  max-width: var(--container-width);
  padding: 0 32px;
}

/* Icons */
.icon-box svg {
  width: 40px;
  /* Reduced Size */
  height: 40px;
  fill: var(--c-accent);
  margin-bottom: 24px;
}

/* Cards & Layouts */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.tech-card {
  background: var(--c-white);
  padding: 48px 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-gray-100);
  box-shadow: var(--shadow-sm);
  transition: 0.4s;
}

.tech-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-gray-300);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  /* Very subtle */
  box-shadow: var(--shadow-sm);
  transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-img-area {
  width: 100%;
  height: 220px;
  background: var(--c-gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-img-area::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 80%, rgba(0, 0, 0, 0.05) 100%);
}

.product-img-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-card:hover .product-img-area img {
  transform: scale(1.08);
}

.product-text-area {
  padding: 32px 32px 40px;
  flex-grow: 1;
}

.product-card h3 {
  font-size: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-card .p-num {
  font-family: "Roboto", sans-serif;
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 900;
  background: rgba(139, 28, 28, 0.08);
  /* Light bg for num */
  padding: 4px 10px;
  border-radius: 99px;
  border: none;
}

/* Marquee */
.marquee-container {
  overflow: hidden;
  background: var(--c-white);
  padding: 20px 0;
  margin: 0;
  border-top: 1px solid var(--c-gray-100);
  border-bottom: 1px solid var(--c-gray-100);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}

.marquee-item {
  font-family: "Roboto", sans-serif;
  font-size: 80px;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  line-height: 1;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Animations using Observation */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Steps */
.tech-step {
  display: flex;
  border-top: 1px solid var(--c-gray-300);
  transition: 0.3s;
}

.tech-step:last-child {
  border-bottom: 1px solid var(--c-gray-300);
}

.tech-step:hover {
  background: var(--c-gray-50);
}

.step-num {
  font-family: "Roboto", sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: var(--c-gray-500);
  padding: 32px;
  min-width: 120px;
}

.step-content {
  padding: 32px 40px 32px 0;
}

.step-content h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .hero-wrapper {
    min-height: auto;
    padding: 120px 0 80px 0;
  }

  .hero-wrapper::before {
    display: none;
  }

  .hero-wrapper::after {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
  }

  .t-hero {
    font-size: 32px;
    margin-bottom: 24px;
  }

  .t-section {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .t-lead {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .header {
    padding: 16px 20px;
  }

  .nav-desktop {
    display: none;
  }

  .btn-group {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .btn-group .btn,
  .btn-group .btn-outline {
    width: 100%;
    padding: 16px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
  }

  .tech-step {
    flex-direction: column;
  }

  .step-num {
    padding: 20px 0 0 0;
    font-size: 32px;
    min-width: auto;
    padding-left: 24px;
    color: var(--c-accent);
    opacity: 0.5;
  }

  .step-content {
    padding: 8px 24px 32px 24px;
  }
}

/* ============================ */
/* Contact Form Styles */
/* ============================ */

/* Tabs */
.form-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.form-tab {
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 99px;
  padding: 12px 32px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: 0.3s;
}

.form-tab.active {
  background: var(--c-black);
  color: var(--c-white);
  border-color: var(--c-black);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-tab:hover:not(.active) {
  border-color: #888;
  color: #333;
}

/* Form Container */
.form-container {
  position: relative;
  overflow: hidden;
  /* For loading overlay */
}

/* Form Elements */
.custom-form {
  padding: 0 20px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: #111;
}

.badge-required {
  display: inline-block;
  background: var(--c-accent);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.custom-form input[type="text"],
.custom-form input[type="email"],
.custom-form textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 16px;
  transition: 0.3s;
  background: #fdfdfd;
}

.custom-form input:focus,
.custom-form textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(139, 28, 28, 0.1);
}

.input-note {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
}

.form-description {
  background: var(--c-gray-50);
  border-left: 4px solid var(--c-accent);
  padding: 16px;
  margin-bottom: 32px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  color: #444;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--c-gray-100);
  border-top: 4px solid var(--c-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}