/* ============================================================
   XEN合同会社 — Common Stylesheet
   Token system: Dark hero / Light body, Teal + Terracotta + Indigo
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500;700;900&family=Noto+Sans+JP:wght@400;500;600;700;900&display=swap');

:root {
  /* ── Core palette ── */
  --ink:        #0A0A0C;   /* dark hero bg */
  --ink-soft:   #15151A;   /* dark surface */
  --ink-line:   rgba(255,255,255,.10);
  --ink-line-strong: rgba(255,255,255,.18);

  --paper:      #FAFAF8;   /* light body bg */
  --paper-deep: #F1F0EC;   /* light surface */
  --paper-line: #E4E2DB;

  --text-on-dark:      #F5F5F2;
  --text-on-dark-soft: #9C9CA3;
  --text-on-light:      #15151A;
  --text-on-light-soft: #5B5B63;

  /* ── Brand accents ── */
  --teal:       #14B8A6;   /* ツクル求人由来 */
  --teal-deep:  #0D9488;
  --teal-glow:  rgba(20,184,166,.30);

  --terra:      #FF6B4A;   /* ミセル由来 */
  --terra-deep: #E2552F;
  --terra-glow: rgba(255,107,74,.30);

  --indigo:     #6B5FFF;   /* Komiru基盤 */
  --indigo-deep:#5347E0;
  --indigo-glow:rgba(107,95,255,.30);

  /* ── Type ── */
  --f-display: 'Space Grotesk', 'Zen Kaku Gothic New', sans-serif;
  --f-jp:      'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  --f-body:    'Noto Sans JP', sans-serif;
  --f-mono:    'JetBrains Mono', monospace;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --wrap: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--text-on-light);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================================
   Typography
   ============================================================ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-glow);
}
.section--dark .eyebrow { color: var(--teal); }

h1, h2, h3, h4 {
  font-family: var(--f-jp);
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.35;
}

h2.section-title {
  font-size: clamp(26px, 3.4vw, 40px);
  margin-bottom: 16px;
  letter-spacing: -.02em;
}

p.section-lead {
  font-size: 16px;
  color: var(--text-on-light-soft);
  max-width: 640px;
  margin-bottom: 48px;
}
.section--dark p.section-lead { color: var(--text-on-dark-soft); }

.section-head {
  margin-bottom: 48px;
}

/* ============================================================
   Layout sections
   ============================================================ */

section { position: relative; }

.section--dark {
  background: var(--ink);
  color: var(--text-on-dark);
}
.section--light {
  background: var(--paper);
  color: var(--text-on-light);
}
.section--deep {
  background: var(--paper-deep);
}

.pad-l { padding: 110px 0; }
.pad-m { padding: 80px 0; }
.pad-s { padding: 56px 0; }

@media (max-width: 720px) {
  .pad-l { padding: 72px 0; }
  .pad-m { padding: 56px 0; }
  .pad-s { padding: 40px 0; }
}

/* ============================================================
   Nav
   ============================================================ */

.gnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(10,10,12,.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.gnav.scrolled {
  background: rgba(10,10,12,.86);
  border-bottom-color: var(--ink-line);
}
.gnav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gnav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--text-on-dark);
  letter-spacing: .01em;
}
.gnav-logo .mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--indigo));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 13px;
  color: #fff;
}
.gnav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.gnav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-on-dark-soft);
  transition: color .2s ease;
  white-space: nowrap;
}
.gnav-link:hover { color: var(--text-on-dark); }
.gnav-link.current { color: var(--teal); }
.gnav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.gnav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-on-dark);
  width: 36px; height: 36px;
}
@media (max-width: 860px) {
  .gnav-links { display: none; }
  .gnav-toggle { display: flex; align-items: center; justify-content: center; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-teal {
  background: var(--teal);
  color: #06201C;
  box-shadow: 0 8px 24px var(--teal-glow);
}
.btn-teal:hover { background: var(--teal-deep); box-shadow: 0 10px 30px var(--teal-glow); }

.btn-ghost-dark {
  background: transparent;
  border-color: var(--ink-line-strong);
  color: var(--text-on-dark);
}
.btn-ghost-dark:hover { border-color: var(--teal); color: var(--teal); }

.btn-ghost-light {
  background: transparent;
  border-color: var(--paper-line);
  color: var(--text-on-light);
}
.btn-ghost-light:hover { border-color: var(--teal-deep); color: var(--teal-deep); }

.btn-dark {
  background: var(--ink);
  color: var(--text-on-dark);
}
.btn-dark:hover { background: var(--ink-soft); }

.btn-lg { padding: 15px 30px; font-size: 15.5px; }
.btn-sm { padding: 9px 18px; font-size: 13px; }

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

.hero {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 168px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 60%; height: 80%;
  background: radial-gradient(circle, var(--indigo-glow) 0%, transparent 68%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -15%;
  width: 55%; height: 70%;
  background: radial-gradient(circle, var(--teal-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--ink-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,.5) 30%, transparent 85%);
  mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,.5) 30%, transparent 85%);
  opacity: .5;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-size: clamp(34px, 5.6vw, 60px);
  letter-spacing: -.02em;
  margin: 22px 0 24px;
  max-width: 880px;
}
.hero h1 .accent-teal { color: var(--teal); }
.hero h1 .accent-terra { color: var(--terra); }
.hero h1 .accent-indigo { color: var(--indigo); }

.hero-sub {
  font-size: 17px;
  color: var(--text-on-dark-soft);
  max-width: 560px;
  margin-bottom: 40px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.page-hero {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 150px 0 84px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -30%; right: -10%;
  width: 55%; height: 90%;
  background: radial-gradient(circle, var(--indigo-glow) 0%, transparent 68%);
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(30px, 4.6vw, 48px);
  margin: 18px 0 18px;
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.page-hero p {
  font-size: 16px;
  color: var(--text-on-dark-soft);
  max-width: 560px;
  position: relative;
  z-index: 2;
}

/* ============================================================
   Lineage diagram (signature element)
   ============================================================ */

.lineage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.lineage-core {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--ink-line-strong);
  width: fit-content;
  margin-bottom: 28px;
}
.lineage-core .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--indigo), var(--terra));
}
.lineage-core span {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--text-on-dark);
}
.lineage-branches {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-l);
  overflow: hidden;
}
@media (max-width: 720px) {
  .lineage-branches { grid-template-columns: 1fr; }
}
.lineage-branch {
  background: var(--ink-soft);
  padding: 28px;
}
.lineage-branch .branch-tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.lineage-branch.teal .branch-tag { background: var(--teal-glow); color: var(--teal); }
.lineage-branch.terra .branch-tag { background: var(--terra-glow); color: var(--terra); }
.lineage-branch h3 {
  font-size: 19px;
  margin-bottom: 8px;
  color: var(--text-on-dark);
}
.lineage-branch p {
  font-size: 13.5px;
  color: var(--text-on-dark-soft);
}

/* ============================================================
   Browser mock (product screen frame)
   ============================================================ */

.mock {
  border-radius: var(--radius-m);
  background: var(--ink-soft);
  border: 1px solid var(--ink-line-strong);
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0,0,0,.55);
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--ink-line);
}
.mock-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.mock-bar .url {
  margin-left: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-on-dark-soft);
  background: rgba(255,255,255,.05);
  padding: 4px 12px;
  border-radius: 6px;
}
.mock-body { padding: 0; }

/* ============================================================
   Cards
   ============================================================ */

.card-grid {
  display: grid;
  gap: 22px;
}
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) {
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-m);
  padding: 30px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(20,20,25,.07);
  border-color: var(--paper-line);
}
.card .icon-box {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 19px;
}
.card h3 {
  font-size: 17px;
  margin-bottom: 10px;
  letter-spacing: -.01em;
}
.card p {
  font-size: 14px;
  color: var(--text-on-light-soft);
}

.icon-teal   { background: rgba(20,184,166,.12); color: var(--teal-deep); }
.icon-terra  { background: rgba(255,107,74,.12); color: var(--terra-deep); }
.icon-indigo { background: rgba(107,95,255,.12); color: var(--indigo-deep); }

/* ============================================================
   Stats strip
   ============================================================ */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
}
@media (max-width: 760px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
.stat-cell {
  padding: 32px 20px;
  border-right: 1px solid var(--ink-line);
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--teal);
}
.stat-label {
  font-size: 12.5px;
  color: var(--text-on-dark-soft);
  margin-top: 6px;
}

/* ============================================================
   Product split section
   ============================================================ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
}
.split.reverse .split-text { order: 2; }
@media (max-width: 880px) {
  .split.reverse .split-text { order: 0; }
}

.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.tag-teal { background: rgba(20,184,166,.10); color: var(--teal-deep); }
.tag-terra { background: rgba(255,107,74,.10); color: var(--terra-deep); }

.split-text h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin-bottom: 16px;
}
.split-text p {
  color: var(--text-on-light-soft);
  margin-bottom: 24px;
}
.feature-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-on-light);
}
.feature-list .check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
  font-size: 11px;
  color: #fff;
}

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

.site-footer {
  background: var(--ink);
  color: var(--text-on-dark-soft);
  padding: 72px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--ink-line);
}
@media (max-width: 760px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); }
}
.footer-brand .gnav-logo { margin-bottom: 16px; }
.footer-brand p {
  font-size: 13.5px;
  max-width: 280px;
  line-height: 1.8;
}
.footer-col h4 {
  font-family: var(--f-body);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; transition: color .2s ease; }
.footer-col a:hover { color: var(--teal); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   Misc
   ============================================================ */

.divider-dark { border-top: 1px solid var(--ink-line); }
.divider-light { border-top: 1px solid var(--paper-line); }

.quote-block {
  background: var(--paper-deep);
  border-radius: var(--radius-l);
  padding: 56px;
}
@media (max-width: 720px) { .quote-block { padding: 32px; } }
.quote-block p.q {
  font-family: var(--f-jp);
  font-size: clamp(19px, 2.4vw, 25px);
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: -.01em;
  margin-bottom: 24px;
}
.quote-block .who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quote-block .who .name { font-weight: 700; font-size: 14px; }
.quote-block .who .role { font-size: 12.5px; color: var(--text-on-light-soft); }

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

/* ============================================================
   Scroll progress bar
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--indigo), var(--terra));
  z-index: 999;
  transition: width .08s linear;
}

/* ============================================================
   Parallax layers (hero)
   ============================================================ */

.hero { will-change: transform; }
.hero-grid, .hero::before, .hero::after { will-change: transform; }
.parallax-layer {
  transition: transform .05s linear;
}

/* ============================================================
   Count-up stat numbers
   ============================================================ */

.stat-num[data-count] {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Mock tilt on scroll
   ============================================================ */

.mock-tilt-wrap {
  perspective: 1400px;
}
.mock-tilt {
  transform-style: preserve-3d;
  transition: transform .15s ease-out;
  will-change: transform;
}

/* ============================================================
   Stagger children (cards, lists) — used with .reveal-stagger
   ============================================================ */

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .mock-tilt { transform: none !important; transition: none; }
  .parallax-layer { transform: none !important; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}
.mobile-menu-close {
  background: none; border: none; color: var(--text-on-dark);
  width: 36px; height: 36px;
}
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.mobile-menu-links a {
  font-family: var(--f-jp);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-on-dark);
}
