/* ==========================================================================
   InvictusPIC — Design Tokens
   Color:  base #0A0A0F (near-black) / raised #14141C / ink #EDEBE6
           amber #FF8A3D (BECK)  teal #2FD6C0 (AI)  violet #A78BFA (SNS運用)
   Type:   display = "Space Grotesk" / body(JP) = "Noto Sans JP" / mono = "JetBrains Mono"
   ========================================================================== */

:root {
  --bg: #0A0A0F;
  --bg-raised: #14141C;
  --bg-raised-2: #1B1B26;
  --ink: #EDEBE6;
  --ink-dim: #A6A3B0;
  --line: rgba(237, 235, 230, 0.12);

  --amber: #FF8A3D;
  --teal: #2FD6C0;
  --violet: #A78BFA;

  --font-display: "Space Grotesk", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --container: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--amber); color: #0A0A0F; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* subtle grain overlay for texture */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.section-inner { max-width: var(--container); margin: 0 auto; padding: 0 32px; }

/* ==========================================================================
   Custom cursor(カーソル追従の演出。マウス操作のできる画面だけで有効)
   ========================================================================== */

@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor { cursor: none; }
  body.has-custom-cursor a,
  body.has-custom-cursor button { cursor: none; }
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 998;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.cursor-dot {
  width: 6px; height: 6px;
  background: var(--amber);
}

.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(237, 235, 230, 0.5);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.cursor-ring.is-hovering {
  width: 64px; height: 64px;
  border-color: var(--amber);
  background: rgba(255, 138, 61, 0.08);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.4);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(10, 10, 15, 0.86);
  border-bottom-color: var(--line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
}
.logo-dot { color: var(--amber); }

.main-nav {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.main-nav a {
  color: var(--ink-dim);
  transition: color 0.2s ease;
  position: relative;
}
.main-nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 32px 80px;
  overflow: hidden;
}

.hero-threads {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
}
.hero-threads svg { width: 100%; height: 100%; }
.thread {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.9;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw-thread 2.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.thread-amber { stroke: var(--amber); animation-delay: 0.1s; }
.thread-teal { stroke: var(--teal); animation-delay: 0.3s; }
.thread-violet { stroke: var(--violet); animation-delay: 0.5s; }

@keyframes draw-thread {
  to { stroke-dashoffset: 0; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin: 0 0 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5.2vw, 56px);
  line-height: 1.35;
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}
.hero-title-accent {
  background: linear-gradient(90deg, var(--amber), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 16px;
  color: var(--ink-dim);
  max-width: 620px;
  margin: 0 0 40px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--amber);
  color: #0A0A0F;
  font-weight: 500;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink-dim); transform: translateY(-2px); }

.scroll-cue {
  position: absolute;
  bottom: 36px; left: 32px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.15em;
}
.scroll-cue span {
  width: 1px; height: 32px;
  background: linear-gradient(var(--ink-dim), transparent);
}

/* ==========================================================================
   Section shared
   ========================================================================== */

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
  margin: 0 0 12px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 38px);
  margin: 0 0 20px;
}
.section-lead {
  color: var(--ink-dim);
  max-width: 640px;
  margin: 0 0 48px;
}

/* ==========================================================================
   About
   ========================================================================== */

.about { padding: 100px 0; background: var(--bg-raised); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-copy p { color: var(--ink-dim); font-size: 15px; }

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.info-table th, .info-table td {
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.info-table th {
  width: 34%;
  color: var(--ink-dim);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding-right: 16px;
}

.update-note {
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--amber);
  border: 1px dashed rgba(255, 138, 61, 0.4);
  border-radius: 8px;
  padding: 12px 16px;
  background: rgba(255, 138, 61, 0.06);
}

/* ==========================================================================
   Business pillars
   ========================================================================== */

.business { padding: 100px 0; }

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

.pillar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  background: var(--bg-raised);
  border-top: 3px solid transparent;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.pillar:hover { transform: translateY(-4px); }

.pillar-amber { border-top-color: var(--amber); }
.pillar-teal { border-top-color: var(--teal); }
.pillar-violet { border-top-color: var(--violet); }

.pillar-head { margin-bottom: 18px; }
.pillar-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.pillar-amber .pillar-tag { color: var(--amber); }
.pillar-teal .pillar-tag { color: var(--teal); }
.pillar-violet .pillar-tag { color: var(--violet); }

.pillar h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0;
  line-height: 1.5;
}

.pillar p {
  font-size: 14px;
  color: var(--ink-dim);
  margin: 0 0 20px;
}

.pillar-points { display: flex; flex-direction: column; gap: 10px; }
.pillar-points li {
  font-size: 13px;
  padding-left: 18px;
  position: relative;
  color: var(--ink);
}
.pillar-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-dim);
}
.pillar-amber .pillar-points li::before { background: var(--amber); }
.pillar-teal .pillar-points li::before { background: var(--teal); }
.pillar-violet .pillar-points li::before { background: var(--violet); }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact { padding: 100px 0 140px; background: var(--bg-raised); }

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 32px;
  max-width: 560px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.contact-row:last-child { border-bottom: none; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.1em;
  width: 90px;
  flex-shrink: 0;
}
.contact-row a { transition: color 0.2s ease; }
.contact-row a:hover { color: var(--amber); }

/* ==========================================================================
   Legal page (tokushoho.html)
   ========================================================================== */

.legal-hero { padding: 160px 0 40px; }
.legal-body { padding: 20px 0 120px; }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.legal-table th, .legal-table td {
  text-align: left;
  padding: 22px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal-table th {
  width: 26%;
  background: var(--bg-raised);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
.legal-table td { color: var(--ink); }
.legal-note { color: var(--ink-dim); font-size: 12.5px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-logo { font-size: 17px; }
.footer-nav {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.footer-nav a:hover { color: var(--ink); }
.copyright {
  width: 100%;
  font-size: 12px;
  color: var(--ink-dim);
  margin: 0;
}

/* ==========================================================================
   To-top button
   ========================================================================== */

.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 90;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-raised-2);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
}
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { border-color: var(--amber); }

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .pillars { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0;
    padding: 8px 32px 24px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .hero { padding-top: 120px; }
}