/* ================================================================
   IT企業デモサイト — archi.css v4
   ダークテーマ / シアン+インディゴ / JetBrains Mono
   Skova Digital 2026-03-22
   ================================================================ */

/* --- CSS Variables --- */
:root {
  --it-bg:          #0a0a0a;
  --it-surface:     #111113;
  --it-surface2:    #18181b;
  --it-border:      #27272a;
  --it-border-accent: rgba(34, 211, 238, 0.25);
  --it-text:        #f4f4f5;
  --it-text-sub:    #a1a1aa;
  --it-muted:       #838383;
  --it-cyan:        #22d3ee;
  --it-cyan-lt:     #67e8f9;
  --it-cyan-dim:    rgba(34, 211, 238, 0.12);
  --it-indigo:      #818cf8;
  --it-indigo-dim:  rgba(129, 140, 248, 0.10);
  --it-terminal-bg: #0c0c0e;
  --it-success:     #34d399;
  --it-error:       #f87171;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.025em;
  color: var(--it-text);
  background: var(--it-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* --- Focus --- */
:focus-visible {
  outline: 2px solid var(--it-cyan);
  outline-offset: 2px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  line-height: 1.3;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 8vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); font-weight: 600; }
p { text-wrap: pretty; }

.mono { font-family: "JetBrains Mono", monospace; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}
@media (min-width: 768px) {
  .container { padding: 0 4rem; }
}

/* --- Section Label --- */
.section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--it-cyan);
  text-transform: uppercase;
  letter-spacing: 0.4em;
}

/* --- Hero CTA Group --- */
.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .hero-cta-group {
    flex-direction: row;
    align-items: center;
  }
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--it-cyan);
  color: #0a0a0a;
  padding: 0.875rem 2rem;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0.375rem;
  transition: all 200ms;
  white-space: nowrap;
  min-width: 200px;
}
.btn-primary:hover {
  background: var(--it-cyan-lt);
  transform: translateY(-2px);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--it-border);
  color: var(--it-text-sub);
  padding: 0.875rem 2rem;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0.375rem;
  transition: all 200ms;
  white-space: nowrap;
  min-width: 200px;
}
.btn-secondary:hover {
  border-color: var(--it-cyan);
  color: var(--it-cyan);
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 300ms ease;
}

.site-header.hidden-up {
  transform: translateY(-100%);
}

.site-header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 2rem;
}
@media (min-width: 768px) { .site-header-nav { padding: 0 3rem; } }
@media (min-width: 1024px) { .site-header-nav { padding: 0 4rem; } }

.demo-banner {
  background: #0a0a0a;
  color: #ffffff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 9999;
}

.demo-banner a {
  color: #22d3ee;
  margin-left: 0.25rem;
  text-decoration: underline;
}

.demo-banner a:hover {
  opacity: 0.8;
}

.header-logo {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--it-cyan);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.header-logo-sub {
  font-size: 0.5625rem;
  color: #9b9ba4;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
@media (max-width: 767px) { .nav-links { display: none; } }

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--it-text-sub);
  position: relative;
  transition: color 200ms;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--it-cyan);
  transition: width 300ms ease-out;
}
@media (hover: hover) {
  .nav-link:hover { color: var(--it-cyan); }
  .nav-link:hover::after { width: 100%; }
}
.nav-link[aria-current="page"] { color: var(--it-cyan); }
.nav-link[aria-current="page"]::after { width: 100%; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--it-cyan);
  color: #0a0a0a;
  padding: 0.625rem 1.5rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: background 200ms;
}
.nav-cta:hover { background: var(--it-cyan-lt); }

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}
@media (max-width: 767px) { .menu-toggle { display: flex; } }
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--it-text);
  transition: all 300ms;
  transform-origin: center;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--it-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateX(100%);
  transition: transform 500ms ease-in-out;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-nav-link {
  font-size: 1.25rem;
  color: var(--it-text-sub);
  font-weight: 500;
  transition: color 200ms;
}
.mobile-nav-link[aria-current="page"] { color: var(--it-cyan); }
.mobile-nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80%;
  max-width: 320px;
  background: var(--it-cyan);
  color: #0a0a0a;
  padding: 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--it-surface2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-logo {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: var(--it-cyan);
  font-size: 0.9375rem;
}
.footer-desc {
  font-size: 0.8125rem;
  color: #9b9ba4;
  line-height: 1.7;
}
.footer-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--it-text-sub);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.footer-link {
  color: rgba(244, 244, 245, 0.6);
  font-size: 0.875rem;
  transition: color 200ms;
  display: block;
}
@media (hover: hover) { .footer-link:hover { color: var(--it-cyan); } }
.footer-copy {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  color: #9b9ba4;
}

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--it-surface);
  border: 1px solid var(--it-border);
  border-radius: 0.5rem;
  transition: all 300ms;
}
@media (hover: hover) {
  .card:hover {
    border-color: var(--it-border-accent);
    transform: translateY(-2px);
  }
}

/* ================================================================
   TERMINAL BLOCK
   ================================================================ */
.terminal {
  background: var(--it-terminal-bg);
  border: 1px solid var(--it-border);
  border-radius: 0.5rem;
  overflow: hidden;
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--it-border);
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.red { background: #f87171; }
.terminal-dot.yellow { background: #fbbf24; }
.terminal-dot.green { background: #34d399; }
.terminal-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  color: var(--it-muted);
}
.terminal-body {
  padding: 1.25rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--it-text-sub);
}
.terminal-prompt { color: var(--it-cyan); }
.terminal-comment { color: var(--it-muted); }
.terminal-output { color: var(--it-success); }

/* ================================================================
   TECH TAGS
   ================================================================ */
.tech-tag {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--it-border);
  border-radius: 9999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  color: var(--it-text-sub);
  transition: border-color 200ms;
}

/* ================================================================
   STAT COUNTER
   ================================================================ */
.stat-number {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--it-cyan);
  line-height: 1;
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--it-muted);
}

/* ================================================================
   DOT GRID TEXTURE
   ================================================================ */
.dot-grid {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ================================================================
   CASE SCROLL (index) - PC: Grid 2x2 / SP: Vertical Stack
   ================================================================ */
.case-scroll {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .case-scroll {
    grid-template-columns: repeat(2, 1fr);
  }
}
.case-card {
  scroll-snap-align: start;
}

/* ================================================================
   SPLIT LAYOUT (service)
   ================================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
@media (max-width: 767px) {
  .split { grid-template-columns: 1fr; }
}
.split-reverse { direction: rtl; }
.split-reverse > * { direction: ltr; }

/* ================================================================
   PRICING (service)
   ================================================================ */
.price-card {
  background: var(--it-surface);
  border: 1px solid var(--it-border);
  border-radius: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: all 300ms;
}
@media (hover: hover) {
  .price-card:hover {
    border-color: var(--it-border-accent);
    transform: translateY(-2px);
  }
}
.price-card.featured { border-color: var(--it-cyan); }
.price-card.featured::before {
  content: 'おすすめ';
  position: absolute;
  top: 0;
  right: 0;
  background: var(--it-cyan);
  color: #0a0a0a;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.375rem 1rem;
  border-radius: 0 0 0 0.5rem;
}
.price-amount {
  font-family: "JetBrains Mono", monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--it-text);
}
.price-unit {
  font-size: 0.875rem;
  color: var(--it-muted);
  font-weight: 400;
}
.price-feature {
  font-size: 0.875rem;
  color: var(--it-text-sub);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.price-feature::before {
  content: '✓';
  color: var(--it-cyan);
  font-weight: 700;
}

/* ================================================================
   MISSION QUOTE (about)
   ================================================================ */
.mission-quote { position: relative; }
.mission-quote::before {
  content: '\201C';
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(4rem, 10vw, 8rem);
  color: rgba(34, 211, 238, 0.15);
  position: absolute;
  top: -0.5em;
  left: -0.1em;
  line-height: 1;
  pointer-events: none;
}

/* ================================================================
   TIMELINE (about)
   ================================================================ */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--it-border);
}
.timeline-item {
  position: relative;
  padding-left: 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0.5rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--it-cyan);
  background: var(--it-bg);
}
.timeline-year {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  color: var(--it-cyan);
  font-weight: 500;
}

/* ================================================================
   FAQ ACCORDION
   ================================================================ */
.faq-item { border-bottom: 1px solid var(--it-border); }
.faq-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--it-text);
  text-align: left;
}
@media (hover: hover) { .faq-trigger:hover { color: var(--it-cyan); } }
.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--it-muted);
  transition: transform 300ms;
  flex-shrink: 0;
}
.faq-item.is-open .faq-icon { transform: rotate(45deg); }
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease-out;
}
.faq-content-inner {
  padding-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--it-text-sub);
  line-height: 1.8;
}

/* ================================================================
   FORM
   ================================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--it-text-sub);
}
.form-label .required { color: var(--it-cyan); }
.form-input,
.form-select,
.form-textarea {
  background: var(--it-surface);
  border: 1px solid var(--it-border);
  border-radius: 0.375rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--it-text);
  font-family: inherit;
  transition: border-color 200ms;
  outline: none;
  width: 100%;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--it-cyan);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23838383' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-textarea {
  min-height: 160px;
  resize: vertical;
}
.form-error {
  font-size: 0.75rem;
  color: var(--it-error);
  display: none;
}
.form-group.has-error .form-error { display: block; }
.form-group.has-error .form-input,
.form-group.has-error .form-select,
.form-group.has-error .form-textarea {
  border-color: var(--it-error);
}

/* ================================================================
   CTA BILLBOARD
   ================================================================ */
.cta-billboard {
  background: linear-gradient(135deg, #0e7490, #4338ca);
  text-align: center;
}

/* ================================================================
   PAGE HERO (about/service/contact)
   ================================================================ */
.page-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 50svh;
}

/* ================================================================
   ANIMATION STATES (GSAP)
   ================================================================ */
.reveal-fade { opacity: 0; }
.reveal-left { opacity: 0; transform: translateX(-40px); }
.reveal-right { opacity: 0; transform: translateX(40px); }
.reveal-up { opacity: 0; transform: translateY(30px); }
.reveal-scale { opacity: 0; transform: scale(0.8); }

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal-fade,
  .reveal-left,
  .reveal-right,
  .reveal-up,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto !important; }
}

/* ================================================================
   UTILITIES
   ================================================================ */
.text-cyan { color: var(--it-cyan); }
.text-muted { color: var(--it-muted); }
.text-sub { color: var(--it-text-sub); }
.bg-surface { background: var(--it-surface); }
.bg-surface2 { background: var(--it-surface2); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ================================================================
   HERO SPLIT LAYOUT
   ================================================================ */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}
.hero-text {
  /* モバイルではテキストのみ先行表示 */
}
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  /* モバイルでは非表示（ヒーロー高さ節約） */
  display: none;
}
@media (min-width: 900px) {
  .hero-visual {
    display: flex;
  }
}

/* ================================================================
   CLS 対策: ヒーロー内 reveal-up は transform(Y) を除去し
   opacity のみのフェードにする。
   GSAP を defer で遅延読み込みしても位置ずれ (CLS) が発生しない。
   GSAP 側も対応: Hero timeline で y:0 のみ指定 (index.html 参照)
   ================================================================ */
section:first-of-type .reveal-up,
section:first-of-type .reveal-fade {
  transform: none;
}
