/* ============================================
   Quantech Corporate Site - style.css
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-bg: #f8f9fc;
  --color-bg-alt: #ffffff;
  --color-bg-dark: #0a0e1a;
  --color-text: #1a1e2e;
  --color-text-light: #5a6178;
  --color-text-muted: #8b91a8;
  --color-primary: #3a7bd5;
  --color-primary-light: #6fa0e8;
  --color-primary-dark: #1e4f96;
  --color-accent: #7c5cbf;
  --color-accent-light: #a78bda;
  --color-gradient-start: #3a7bd5;
  --color-gradient-end: #7c5cbf;
  --color-border: #e2e6f0;
  --color-border-light: #eef1f8;
  --color-card-bg: #ffffff;
  --color-card-shadow: rgba(58, 123, 213, 0.06);
  --color-hero-overlay: rgba(10, 14, 26, 0.55);

  --font-heading: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  --font-en: "Outfit", "Helvetica Neue", Arial, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --max-width: 1120px;
  --header-height: 72px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.8;
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent);
}

ul {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.en-text {
  font-family: var(--font-en);
  letter-spacing: 0.04em;
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-label {
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-xs);
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--color-primary);
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: var(--space-sm);
  position: relative;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-light);
  max-width: 560px;
  line-height: 1.9;
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(248, 249, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base),
              background var(--transition-base);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border-light);
  background: rgba(248, 249, 252, 0.95);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-logo img {
  height: 36px;
  width: 36px;
  object-fit: contain;
}

.header-logo-text {
  font-family: var(--font-en);
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 2px;
}

.header-nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--color-gradient-start), var(--color-gradient-end));
  transition: width var(--transition-base);
}

.header-nav a:hover {
  color: var(--color-text);
}

.header-nav a:hover::after {
  width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--color-text);
  position: absolute;
  left: 6px;
  transition: all var(--transition-base);
}

.menu-toggle span:nth-child(1) { top: 10px; }
.menu-toggle span:nth-child(2) { top: 15px; }
.menu-toggle span:nth-child(3) { top: 20px; }

.menu-toggle.is-active span:nth-child(1) {
  top: 15px;
  transform: rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  top: 15px;
  transform: rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image: url("../img/hero-bg.svg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #030b1a;
}

/* Dark indigo overlay for text readability */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 18, 42, 0.68);
  z-index: 1;
}

/* Canvas for particle network animation */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Hero content: tagline only, centered */
.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md);
  width: 100%;
  max-width: 900px;
}

.hero-tagline {
  font-size: clamp(1.3rem, 3.2vw, 2.4rem);
  color: rgba(255, 255, 255, 0.92);
  line-height: 2;
  letter-spacing: 0.14em;
  font-weight: 400;
  opacity: 0;
  transform: translateY(30px);
  animation: heroTaglineFadeIn 1.4s 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

@keyframes heroTaglineFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  60% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 3;
  opacity: 0;
  animation: heroFadeUp 0.8s 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-scroll-hint span {
  font-family: var(--font-en);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.scroll-line {
  width: 1px;
  height: 40px;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--color-primary));
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -100%; }
  100% { top: 100%; }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
  padding: var(--space-2xl) 0;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-text p {
  color: var(--color-text-light);
  font-size: 0.92rem;
  line-height: 2;
  margin-bottom: var(--space-sm);
}

.about-info {
  padding-top: var(--space-sm);
}

.about-info-table {
  width: 100%;
  border-collapse: collapse;
}

.about-info-table tr {
  border-bottom: 1px solid var(--color-border-light);
}

.about-info-table th,
.about-info-table td {
  padding: 1rem 0;
  font-size: 0.88rem;
  text-align: left;
  vertical-align: top;
}

.about-info-table th {
  width: 110px;
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
  padding-right: var(--space-sm);
}

.about-info-table td {
  color: var(--color-text);
  line-height: 1.8;
}

/* ============================================
   SERVICE SECTION
   ============================================ */
.service {
  padding: var(--space-2xl) 0;
  background: var(--color-bg-alt);
  position: relative;
}

.service::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.service-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.service-header .section-label {
  justify-content: center;
}

.service-header .section-label::before {
  display: none;
}

.service-header .section-subtitle {
  margin: 0 auto;
}

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

.service-card {
  display: block;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-md) calc(var(--space-md) + 0.5rem);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition-base),
              box-shadow var(--transition-base),
              border-color var(--transition-base);
}

.service-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gradient-start), var(--color-gradient-end));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--color-card-shadow);
  border-color: rgba(58, 123, 213, 0.12);
  color: inherit;
  text-decoration: none;
}

.service-card:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--color-card-shadow);
  border-color: rgba(58, 123, 213, 0.12);
  color: inherit;
  text-decoration: none;
}

.service-card:focus:not(:focus-visible) {
  outline: none;
}

.service-card:hover::after,
.service-card:focus::after {
  opacity: 1;
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  position: relative;
}

.service-icon svg {
  width: 26px;
  height: 26px;
  position: relative;
  z-index: 1;
}

.service-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  opacity: 0.08;
}

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

.service-card-text {
  font-size: 0.82rem;
  color: var(--color-text-light);
  line-height: 1.9;
}

.service-card-link {
  display: block;
  margin-top: var(--space-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-primary);
  letter-spacing: 0.03em;
}

/* ============================================
   SERVICE DETAIL PAGES
   ============================================ */

/* Hero */
.sp-hero {
  position: relative;
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-xl);
  background-image: url("../img/hero-bg.svg");
  background-size: cover;
  background-position: center;
  background-color: #030b1a;
  overflow: hidden;
}

.sp-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 18, 42, 0.78);
  z-index: 1;
}

.sp-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.sp-breadcrumb {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sp-breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-base);
}

.sp-breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.sp-breadcrumb span {
  color: rgba(255, 255, 255, 0.35);
}

.sp-hero-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: #fff;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.04em;
}

.sp-hero-lead {
  font-size: clamp(0.88rem, 1.8vw, 1.05rem);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.9;
  letter-spacing: 0.04em;
  font-weight: 300;
}

/* Main content */
.sp-main {
  padding-bottom: var(--space-lg);
}

.sp-section {
  padding: var(--space-xl) 0;
}

.sp-section-alt {
  background: var(--color-bg-alt);
}

.sp-text {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 2;
  max-width: 720px;
}

/* Visual SVG block */
.sp-visual {
  padding: var(--space-lg) 0 0;
}

.sp-visual-svg {
  max-width: 240px;
  margin: 0 auto;
  opacity: 0.7;
}

.sp-visual-svg svg {
  width: 100%;
  height: auto;
}

/* Feature grid */
.sp-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.sp-feature-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.sp-feature-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--color-primary);
}

.sp-feature-item p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.9;
}

/* Back link */
.sp-back-link {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-primary);
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: background var(--transition-base), color var(--transition-base);
}

.sp-back-link:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.sp-cta {
  padding-bottom: var(--space-2xl);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  position: relative;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.5);
  padding: var(--space-lg) 0 var(--space-md);
  background-image: url("../img/hero-bg.svg");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-color: #030b1a;
}

.footer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 18, 42, 0.82);
  z-index: 1;
}

.footer-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.footer-container {
  position: relative;
  z-index: 3;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-sm);
}

.footer-brand img {
  height: 28px;
  width: 28px;
  object-fit: contain;
  opacity: 0.85;
}

.footer-brand-text {
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.footer-company-name {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
}

.footer-address {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.7;
}

.footer-nav {
  display: flex;
  gap: var(--space-md);
}

.footer-nav a {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition-base);
}

.footer-nav a:hover {
  color: rgba(255, 255, 255, 0.95);
}

.footer-bottom {
  padding-top: var(--space-md);
  text-align: center;
}

.footer-copyright {
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   PRIVACY POLICY PAGE
   ============================================ */
.page-header {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-lg);
  text-align: center;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border-light);
}

.page-header h1 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.page-content {
  padding: var(--space-xl) 0 var(--space-2xl);
}

.page-content .container {
  max-width: 760px;
}

.page-content h2 {
  font-size: 1.1rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 2;
  margin-bottom: var(--space-sm);
}

.page-content ul {
  margin-bottom: var(--space-sm);
  padding-left: 1.2rem;
}

.page-content ul li {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 2;
  position: relative;
  padding-left: 0.8rem;
}

.page-content ul li::before {
  content: "・";
  position: absolute;
  left: -0.4rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 4rem;
    --space-2xl: 5rem;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(248, 249, 252, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    z-index: 999;
  }

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

  .header-nav a {
    font-size: 1.1rem;
  }

  .menu-toggle {
    display: block;
  }

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

  .footer-inner {
    flex-direction: column;
    gap: var(--space-md);
  }

  .footer-nav {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .hero-tagline {
    letter-spacing: 0.08em;
  }

  .sp-feature-grid {
    grid-template-columns: 1fr;
  }

  .sp-hero {
    padding-top: calc(var(--header-height) + var(--space-lg));
    padding-bottom: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .hero-tagline {
    font-size: clamp(1rem, 4.5vw, 1.3rem);
    letter-spacing: 0.06em;
    line-height: 2.2;
  }

  .header-logo img {
    height: 30px;
    width: 30px;
    object-fit: contain;
  }

  .footer-brand img {
    height: 24px;
    width: 24px;
    object-fit: contain;
  }

  .about-info-table th {
    display: block;
    padding-bottom: 0;
    width: 100%;
  }

  .about-info-table td {
    display: block;
    padding-top: 0.25rem;
  }
}
