/* ==========================================================================
   SakodaAI - Corporate Site Styles
   Dark + Neon Cyan / Cyber Theme
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --color-primary: #00d4ff;
  --color-secondary: #0066ff;
  --color-accent: #00ffcc;
  --color-text: #e0e0e0;
  --color-text-muted: #8888a0;
  --color-white: #ffffff;
  --color-border: rgba(0, 212, 255, 0.15);
  --glow-primary: 0 0 20px rgba(0, 212, 255, 0.3), 0 0 40px rgba(0, 212, 255, 0.1);
  --glow-primary-strong: 0 0 20px rgba(0, 212, 255, 0.5), 0 0 60px rgba(0, 212, 255, 0.2);
  --glow-accent: 0 0 20px rgba(0, 255, 204, 0.3), 0 0 40px rgba(0, 255, 204, 0.1);
  --font-sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-height: 64px;
  --container-width: 1100px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.sp-hide {
  display: inline;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn:hover::after {
  left: 120%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--bg-primary);
  box-shadow: var(--glow-primary);
}

.btn-primary:hover {
  box-shadow: var(--glow-primary-strong);
  transform: translateY(-2px);
  color: var(--bg-primary);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  box-shadow: var(--glow-primary);
  color: var(--color-primary);
}

.btn-block {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

.navbar-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-text {
  color: var(--color-white);
}

.logo-accent {
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all var(--transition);
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 36px;
}

.navbar-menu a {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color var(--transition);
  position: relative;
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-primary);
  box-shadow: 0 0 6px var(--color-primary);
  transition: width var(--transition);
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--color-primary);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 100%;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Scanline overlay */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 212, 255, 0.008) 2px,
    rgba(0, 212, 255, 0.008) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.hero-tagline {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 16px;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  opacity: 0;
  animation: heroFadeIn 0.8s ease 0.2s forwards;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: heroFadeIn 0.8s ease 0.5s forwards;
}

.hero-description {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.9;
  margin-bottom: 32px;
  opacity: 0;
  animation: heroFadeIn 0.8s ease 0.8s forwards;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroFadeIn 0.8s ease 1.1s forwards;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  opacity: 0;
  animation: heroFadeIn 0.8s ease 1.5s forwards;
}

.hero-scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--color-primary), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ---------- Sections ---------- */
.section {
  padding: 80px 0;
  position: relative;
}

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

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-description {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ---------- Services ---------- */
.services {
  background: var(--bg-primary);
}

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px 28px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

/* Moving gradient border on hover */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 1px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent), var(--color-secondary), var(--color-primary));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: borderGradient 3s ease infinite;
}

@keyframes borderGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.service-card:hover {
  box-shadow: var(--glow-primary);
  transform: translateY(-6px);
}

.service-card:hover::before {
  transform: scaleX(1);
}

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

.service-icon {
  width: 44px;
  height: 44px;
  color: var(--color-primary);
  margin-bottom: 20px;
  transition: all 0.4s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 10px;
}

.service-description {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.service-tags li {
  font-size: 0.7rem;
  padding: 3px 10px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-primary);
  letter-spacing: 0.02em;
  transition: all var(--transition);
}

.service-card:hover .service-tags li {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.05);
}

/* ---------- About ---------- */
.about {
  background: var(--bg-secondary);
}

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

.about-block {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px;
  height: 100%;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.about-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.03), transparent);
  transition: left 0.6s ease;
}

.about-block:hover::before {
  left: 100%;
}

.about-block:hover {
  border-color: rgba(0, 212, 255, 0.25);
}

.about-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.about-text {
  font-size: 1.05rem;
  color: var(--color-white);
  line-height: 1.8;
  font-weight: 300;
}

.about-info {
  grid-column: 1 / -1;
}

.about-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

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

.about-table tr:last-child {
  border-bottom: none;
}

.about-table tr:hover {
  background: rgba(0, 212, 255, 0.02);
}

.about-table th,
.about-table td {
  padding: 14px 24px;
  text-align: left;
  font-size: 0.88rem;
}

.about-table th {
  color: var(--color-text-muted);
  font-weight: 400;
  width: 150px;
  background: rgba(0, 212, 255, 0.03);
}

.about-table td {
  color: var(--color-text);
}

/* ---------- Contact ---------- */
.contact {
  background: var(--bg-primary);
}

.contact-form-wrapper {
  max-width: 560px;
  margin: 0 auto;
}

.form-errors {
  background: rgba(255, 50, 50, 0.1);
  border: 1px solid rgba(255, 50, 50, 0.3);
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 20px;
  color: #ff6b6b;
  font-size: 0.83rem;
}

.form-errors ul {
  list-style: none;
  margin-top: 6px;
}

.form-errors li::before {
  content: '・';
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.required {
  color: var(--color-primary);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-white);
  font-size: 0.92rem;
  font-family: var(--font-sans);
  transition: all var(--transition);
  outline: none;
}

.form-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.5;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1), 0 0 20px rgba(0, 212, 255, 0.1);
}

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

.form-submit {
  margin-top: 24px;
}

/* ---------- Contact Success ---------- */
.contact-success {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  animation: fadeInUp 0.5s ease;
}

.success-icon {
  width: 52px;
  height: 52px;
  color: var(--color-accent);
  margin: 0 auto 16px;
  animation: successPulse 1.5s ease infinite;
}

@keyframes successPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(0, 255, 204, 0.3)); }
  50% { filter: drop-shadow(0 0 12px rgba(0, 255, 204, 0.6)); }
}

.success-icon svg {
  width: 100%;
  height: 100%;
}

.contact-success h3 {
  font-size: 1.1rem;
  color: var(--color-white);
  margin-bottom: 6px;
}

.contact-success p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

/* ---------- Footer ---------- */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--color-border);
  background: var(--bg-primary);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ---------- Scroll Animations ---------- */
[data-scroll-target="item"] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-scroll-target="item"].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for cards */
[data-scroll-target="item"][data-delay="1"] {
  transition-delay: 0.1s;
}
[data-scroll-target="item"][data-delay="2"] {
  transition-delay: 0.2s;
}
[data-scroll-target="item"][data-delay="3"] {
  transition-delay: 0.3s;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Ambient glow effects ---------- */
.services::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.contact::before {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(0, 102, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .sp-hide { display: none; }

  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 0;
    transition: right var(--transition);
    border-left: 1px solid var(--color-border);
  }

  .navbar-menu.open {
    right: 0;
  }

  .navbar-menu a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .navbar-menu a::after { display: none; }

  .section {
    padding: 56px 0;
  }

  .section-header {
    margin-bottom: 32px;
  }

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

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

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 260px;
  }

  .footer-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

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

  .hero-description {
    font-size: 0.88rem;
  }

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

  .about-block {
    padding: 24px 20px;
  }

  .about-table th {
    width: 100px;
  }

  .about-table th,
  .about-table td {
    padding: 12px 16px;
    font-size: 0.83rem;
  }
}
