/* ============================================================
   AiSpace Corporation — Corporate Site Stylesheet
   ============================================================ */

/* ============ VARIABLES ============ */
:root {
  --ink: #0a0f1e;
  --ink-light: #1a2038;
  --slate: #4a5568;
  --silver: #94a3b8;
  --mist: #e2e8f0;
  --cloud: #f1f5f9;
  --white: #ffffff;
  --accent: #2563eb;
  --accent-deep: #1d4ed8;
  --accent-glow: #3b82f6;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-line: rgba(37, 99, 235, 0.2);
  --cyber: #06b6d4;
  --ai: #8b5cf6;
  --web: #10b981;
  --font-display: 'DM Sans', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

/* ============ RESET ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; overflow-y: scroll; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ============ UTILITY ============ */
.container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 6rem 0; }
.section--gray { background: var(--cloud); }
.section--dark { background: var(--ink); }

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.section-lead {
  color: var(--slate);
  font-size: 0.95rem;
  max-width: 640px;
  line-height: 1.9;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
}

.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--mist); }
.btn--ghost:hover { border-color: var(--silver); background: var(--cloud); }

.btn--white { background: var(--white); color: var(--ink); }
.btn--white:hover { background: var(--cloud); transform: translateY(-1px); }

.btn__arrow { transition: transform 0.2s; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--mist);
  transition: all 0.3s ease;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
}

.header__logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.header__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

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

.header__nav a {
  font-size: 0.82rem;
  color: var(--slate);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.header__nav a:hover { color: var(--ink); }

.header__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ink);
  color: var(--white) !important;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  transition: background 0.2s;
}

.header__cta:hover { background: var(--ink-light); }

.header__menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.header__menu-btn span {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  margin: 4px 0;
  transition: 0.3s;
}

/* ============ HERO (TOP) ============ */
.hero {
  padding-top: 72px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(37, 99, 235, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
  will-change: auto;
}

.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--mist) 1px, transparent 1px),
    linear-gradient(90deg, var(--mist) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  will-change: auto;
}

.hero__content { position: relative; z-index: 2; }

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero__eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.hero__title em { font-style: normal; color: var(--accent); }

.hero__desc {
  font-size: 1rem;
  color: var(--slate);
  line-height: 2;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.hero__actions { display: flex; gap: 1rem; align-items: center; }

/* ============ PAGE HERO (Sub pages) ============ */
.page-hero {
  padding-top: 72px;
  padding-bottom: 0;
}

.page-hero__inner {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--mist);
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.page-hero__desc {
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.9;
  max-width: 600px;
}

/* ============ PILLAR CARDS ============ */
.pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.pillar-card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.3s;
}

.pillar-card:hover {
  border-color: transparent;
  box-shadow: 0 8px 40px rgba(10, 15, 30, 0.08), 0 1px 3px rgba(10, 15, 30, 0.04);
  transform: translateY(-2px);
}

.pillar-card:hover::before { opacity: 1; }

.pillar-card--ai::before { background: var(--ai); }
.pillar-card--cyber::before { background: var(--cyber); }
.pillar-card--web::before { background: var(--web); }

.pillar-card__icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.pillar-card--ai .pillar-card__icon { background: rgba(139, 92, 246, 0.08); color: var(--ai); }
.pillar-card--cyber .pillar-card__icon { background: rgba(6, 182, 212, 0.08); color: var(--cyber); }
.pillar-card--web .pillar-card__icon { background: rgba(16, 185, 129, 0.08); color: var(--web); }

.pillar-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.pillar-card__desc { font-size: 0.88rem; color: var(--slate); line-height: 1.8; margin-bottom: 1.5rem; }

.pillar-card__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pillar-card:hover .pillar-card__link span { transform: translateX(3px); }
.pillar-card__link span { transition: transform 0.2s; }

/* ============ FEATURES GRID ============ */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

/*.feature { text-align: left; display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }*/

/*.feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature__icon svg {
  width: 20px;
  height: 20px;
}

.feature__content { flex: 1; }

.feature__content h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.feature__content p {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.8;
  margin: 0;
}*/
.feature { text-align: left; }

.feature__number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--silver);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.feature__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.feature__desc { font-size: 0.85rem; color: var(--slate); line-height: 1.8; }

/* ============ OTHER SERVICES ============ */
.other-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.other-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
}

a.other-card:hover { border-color: var(--accent-line); box-shadow: 0 2px 12px rgba(10, 15, 30, 0.04); cursor: pointer; }
div.other-card { cursor: default; }

.other-card__icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--cloud);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--slate);
}

.other-card__title { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.2rem; }
.other-card__desc { font-size: 0.78rem; color: var(--silver); }

/* ============ NEWS LIST ============ */
.news-list { margin-top: 2rem; }

.news-item {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--mist);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.news-item:first-child { border-top: 1px solid var(--mist); }
.news-item:hover { opacity: 0.7; }

.news-item__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--silver);
  white-space: nowrap;
  min-width: 90px;
}

.news-item__tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  white-space: nowrap;
}

.news-item__title { font-size: 0.9rem; font-weight: 500; }

.news-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.news-more:hover span { transform: translateX(3px); }
.news-more span { transition: transform 0.2s; }

/* ============ SERVICE DETAIL PAGE ============ */
.service-hero-badge {
  margin-top: 1.5rem;
}

.service-hero-badge img {
  height: 48px;
  width: auto;
  display: block;
}

.service-detail { padding: 4rem 0; }

.service-detail__grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
}

.service-detail__main { min-width: 0; }

.service-detail__sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.service-block { margin-bottom: 3rem; }

.service-block__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--mist);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-block__title-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.service-block__text {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.9;
}

/* Sidebar card */
.sidebar-card {
  background: var(--cloud);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.sidebar-card__title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.sidebar-card__list { list-style: none; }

.sidebar-card__list li {
  font-size: 0.82rem;
  color: var(--slate);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--mist);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.7;
}

.sidebar-card__list li:last-child { border-bottom: none; }

.sidebar-card__list li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.55em;
}

.sidebar-cta {
  background: var(--ink);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
}

.sidebar-cta__title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.sidebar-cta__desc {
  font-size: 0.78rem;
  color: var(--silver);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* ============ COMPANY TABLE ============ */
.company-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.company-table th,
.company-table td {
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--mist);
  vertical-align: top;
}

.company-table th {
  width: 160px;
  font-weight: 600;
  color: var(--ink);
  background: var(--cloud);
}

.company-table td { color: var(--slate); }

/* Timeline */
.timeline { margin-top: 2rem; }

.timeline__item {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  position: relative;
}

.timeline__year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 60px;
  flex-shrink: 0;
}

.timeline__text { font-size: 0.88rem; color: var(--slate); line-height: 1.7; }

.timeline__item + .timeline__item { border-top: 1px solid var(--mist); }

/* ============ CONTACT FORM ============ */
.form-group { margin-bottom: 1.5rem; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.form-label .required {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--white);
  background: var(--accent);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.5rem;
}

.form-label .optional {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--silver);
  margin-left: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--mist);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ============ CTA SECTION ============ */
.cta-section {
  background: var(--ink);
  padding: 5rem 0;
  text-align: center;
}

.cta-section .label { color: var(--accent-glow); }
.cta-section .section-title { color: var(--white); }

.cta-section__desc {
  color: var(--silver);
  font-size: 0.92rem;
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.9;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 0 2rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer__logo .header__logo-img {
  height: 24px;
}

.footer__logo .header__logo-text {
  color: var(--white);
}
.footer__corp { font-size: 0.78rem; color: var(--silver); }

.footer__pmark {
  margin-top: 1rem;
}

.footer__pmark img {
  height: 56px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer__pmark img:hover { opacity: 1; }
.footer__nav { display: flex; gap: 3rem; }

.footer__nav-group h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.footer__nav-group a {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.footer__nav-group a:hover { color: var(--white); }

.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copy { font-size: 0.72rem; color: rgba(255, 255, 255, 0.3); }
.footer__links { display: flex; gap: 1.5rem; }
.footer__links a {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__links a:hover { color: rgba(255, 255, 255, 0.6); }

/* ============ 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); }
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .pillars__grid { grid-template-columns: 1fr; gap: 1rem; }
  .features__grid { grid-template-columns: 1fr; gap: 2rem; }
  .other-services { grid-template-columns: 1fr; }
  .service-detail__grid { grid-template-columns: 1fr; gap: 2rem; }
  .service-detail__sidebar { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .header__menu-btn { display: block; }
  .footer__inner { flex-direction: column; }
  .footer__nav { flex-direction: column; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .news-item { flex-wrap: wrap; gap: 0.5rem 1rem; }

  /* Mobile Navigation */
  .header__nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem 2rem;
    gap: 0;
    z-index: 99;
    overflow-y: auto;
  }

  .header__nav.active {
    display: flex;
  }

  .header__nav a {
    display: block;
    width: 100%;
    padding: 1rem 0;
    font-size: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--mist);
  }

  .header__nav .header__cta {
    margin-top: 1rem;
    width: auto;
    padding: 0.75rem 2rem;
  }

  /* Hamburger animation */
  .header__menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .header__menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

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

  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
  }
}


/* ============ SERVICE FEATURE ============ */
.service-feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.service-feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-feature__icon svg {
  width: 20px;
  height: 20px;
}

.service-feature__content {
  flex: 1;
}

.service-feature__content h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.service-feature__content p {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.8;
  margin: 0;
}