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

:root {
  --bg: #f8f7f7;
  --fg: #0a0a0a;
  --gray-1: #111;
  --gray-2: #222;
  --gray-3: #ddd;
  --gray-4: #0a0a0a;
  --gray-5: #0a0a0a;
  --gray-6: #bbb;
  --border: #e0e0e0;
}

html {
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 700;
}

/* ===== Particle Canvas ===== */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== Splash ===== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.splash.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.splash-mark {
  width: 140px;
  height: auto;
  fill: var(--fg);
}

.splash-percent {
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  color: var(--fg);
  opacity: 0.4;
  font-weight: 700;
}

.splash-rect {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.splash-rect-1 { animation: splashRectIn 1s ease 0.5s forwards; }
.splash-rect-2 { animation: splashRectIn 1s ease 1.2s forwards; }
.splash-rect-3 { animation: splashRectIn 1s ease 1.9s forwards; }

@keyframes splashRectIn {
  to { opacity: 1; }
}

/* ===== Main ===== */
.main {
  position: relative;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.8s ease;
}
.main.hidden {
  opacity: 0;
}

/* ===== Hero ===== */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 48px;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.header.visible {
  opacity: 1;
  transform: translateY(0);
}

.header-logo {
  z-index: 10;
  text-decoration: none;
  cursor: pointer;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-link {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

.header-link:hover {
  opacity: 0.5;
}

.header-lang {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
}

.lang-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  color: var(--fg);
  cursor: pointer;
  opacity: 0.3;
  font-weight: 700;
  transition: opacity 0.3s ease;
}

.lang-btn.active {
  opacity: 1;
}

.lang-divider {
  font-size: 0.6875rem;
  color: var(--fg);
  opacity: 0.3;
}

.header-logo {
  position: relative;
}

.header-logotype {
  width: 150px;
  height: auto;
  fill: var(--fg);
  transition: opacity 0.4s ease;
}

.header-logomark {
  width: 84px;
  height: auto;
  fill: var(--fg);
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.header.scrolled .header-logotype {
  opacity: 0;
  pointer-events: none;
}

.header.scrolled .header-logomark {
  opacity: 1;
}

/* Header inverts on dark sections */
.header.inverted .header-logotype,
.header.inverted .header-logomark {
  fill: var(--bg);
}

.header.inverted .header-link,
.header.inverted .lang-btn,
.header.inverted .lang-divider {
  color: var(--bg);
}

/* Tilted rectangle photo strip - like reference image */
.hero-strip-wrapper {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  overflow: hidden;
  height: 100vh;
  display: flex;
  align-items: center;
}

.hero-strip {
  display: flex;
  align-items: center;
  animation: stripScroll 40s linear infinite;
  will-change: transform;
  margin-left: -80px;
}

@keyframes stripScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/*
  Each shape: a tall rectangle rotated 45deg.
  Neatly aligned in a row with small uniform gaps.
  The rotation naturally creates the zigzag mountain pattern.
*/
.para-photo {
  --w: clamp(165px, 18.5vw, 265px);
  width: var(--w);
  /* Fixed aspect ratio 220:400 = 1:1.818 */
  aspect-ratio: 220 / 400;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transform: rotate(45deg);
  margin: 0 calc(var(--w) * 0.22);
}

.para-photo-inner {
  position: absolute;
  inset: -60%;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  transform: rotate(-45deg);
  filter: grayscale(100%);
  transition: filter 1.5s ease;
}

.para-photo-inner.color-active {
  filter: grayscale(0%);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 1s ease;
}

.scroll-indicator.visible {
  opacity: 1;
}

.scroll-indicator-line {
  width: 1px;
  height: 48px;
  position: relative;
  overflow: hidden;
  background: var(--border);
}

.scroll-indicator-line::after {
  content: '';
  position: absolute;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--fg);
  animation: scrollPulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scrollPulse {
  0% { top: -100%; }
  40% { top: 100%; }
  100% { top: 100%; }
}

.scroll-indicator-text {
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  color: var(--gray-4);
}

/* ===== Manifesto ===== */
.manifesto {
  padding: 100px 80px;
  display: flex;
  justify-content: center;
}

.manifesto-inner {
  display: flex;
  flex-direction: row-reverse;
  gap: clamp(16px, 2vw, 32px);
}

.manifesto-gap {
  width: clamp(12px, 1.5vw, 24px);
  flex-shrink: 0;
}

.manifesto-inner p,
.manifesto-inner .manifesto-gap {
  opacity: 0;
  transition: opacity 1.5s ease;
}

.manifesto-inner.revealed p,
.manifesto-inner.revealed .manifesto-gap {
  opacity: 1;
}

.manifesto-inner p {
  writing-mode: vertical-rl;
  font-size: clamp(0.9375rem, 1.3vw, 1.0625rem);
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.15em;
  color: var(--fg);
  white-space: nowrap;
}

/* ===== Section Label ===== */
.section-label {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--fg);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-label-line {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin-bottom: 56px;
}

/* ===== Concept ===== */
.concept {
  padding: 160px 24px;
}

.concept-inner {
  max-width: 860px;
  margin: 0 auto;
}

.concept-heading {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 80px;
  letter-spacing: 0.04em;
}

.concept-body {
  display: flex;
  align-items: stretch;
}

.concept-col {
  flex: 1;
  padding: 32px 0;
}

.concept-col-label {
  display: block;
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: 0.2em;
  color: var(--fg);
  margin-bottom: 24px;
  font-weight: 700;
}

.concept-col-text {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 2.1;
  color: var(--fg);
  letter-spacing: 0.04em;
  font-weight: 600;
}

.concept-divider {
  width: 1px;
  margin: 0 48px;
}

.concept-divider span {
  display: block;
  width: 1px;
  height: 100%;
  background: var(--border);
}

/* ===== Pillars ===== */
.pillars {
  padding: 80px 24px 160px;
}

.pillars-inner {
  max-width: 860px;
  margin: 0 auto;
}

.pillar {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 48px 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: color 0.5s ease;
  cursor: default;
}

.pillar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: translateX(-101%);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.pillar:hover::before {
  transform: translateX(0);
}

.pillar:hover {
  color: var(--bg);
  transition: color 0.8s ease;
}

.pillar:first-child {
  border-top: 1px solid var(--border);
}

.pillar > * {
  position: relative;
  z-index: 1;
}

.pillar-num {
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  flex-shrink: 0;
  padding-top: 12px;
  font-weight: 700;
  transition: color 0.5s ease;
}

.pillar-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  transition: letter-spacing 0.5s ease;
}

.pillar-title {
  transition: color 0.5s ease;
}

.pillar-desc {
  font-size: 0.8125rem;
  line-height: 1.8;
  letter-spacing: 0.04em;
  font-weight: 600;
  transition: color 0.5s ease;
}

/* ===== Recruit ===== */
.recruit {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 160px 24px;
  background: var(--fg);
  color: var(--bg);
}

.recruit-inner {
  text-align: center;
}

.recruit .section-label {
  color: rgba(255,255,255,0.35);
}

.recruit-heading {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 40px;
  letter-spacing: 0.04em;
}

.recruit-text {
  font-size: clamp(0.8125rem, 1.4vw, 0.9375rem);
  line-height: 2;
  color: rgba(255,255,255,0.5);
  margin-bottom: 64px;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.recruit-btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--bg);
  text-decoration: none;
  font-size: 0.8125rem;
  letter-spacing: 0.35em;
  font-weight: 700;
  padding: 20px 56px;
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
  transition: border-color 0.6s ease;
}

.recruit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.recruit-btn:hover {
  border-color: var(--bg);
}

.recruit-btn:hover::before {
  transform: scaleX(1);
}

.recruit-btn-text,
.recruit-btn-arrow {
  position: relative;
  z-index: 1;
  transition: color 0.5s ease;
}

.recruit-btn:hover .recruit-btn-text,
.recruit-btn:hover .recruit-btn-arrow {
  color: var(--fg);
}

.recruit-btn-arrow {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 0.5s ease;
}

.recruit-btn:hover .recruit-btn-arrow {
  transform: translateX(6px);
}

/* Recruit positions */
.recruit-positions {
  max-width: 700px;
  margin: 0 auto 80px;
  text-align: left;
}

.recruit-position {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.recruit-position-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 28px 0;
  font-family: inherit;
}

.recruit-position-title {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.recruit-toggle-icon {
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.recruit-position.open .recruit-toggle-icon {
  transform: rotate(45deg);
}

.recruit-table {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
  padding: 0;
}

.recruit-position.open .recruit-table {
  max-height: 600px;
  padding-bottom: 32px;
}

.recruit-row {
  display: flex;
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.recruit-label {
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
  width: 100px;
  letter-spacing: 0.05em;
}

.recruit-value {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
}

.recruit-contact {
  text-align: center;
}

.recruit-contact-text {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 2;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
}

.recruit-apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  color: var(--fg);
  border: none;
  padding: 18px 48px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.recruit-apply-btn:hover {
  opacity: 0.8;
}

.recruit-email {
  display: inline-block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--bg);
  letter-spacing: 0.1em;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 4px;
  transition: border-color 0.3s ease;
}

.recruit-email:hover {
  border-color: var(--bg);
}

/* ===== Company ===== */
.company {
  padding: 160px 24px;
}

.company-inner {
  max-width: 860px;
  margin: 0 auto;
}

.company-table {
  margin-top: 48px;
}

.company-row {
  display: flex;
  gap: 48px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.company-row:first-child {
  border-top: 1px solid var(--border);
}

.company-label {
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  flex-shrink: 0;
  width: 120px;
}

.company-value {
  font-size: 0.875rem;
  line-height: 1.8;
  font-weight: 700;
}

.company-link {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: opacity 0.3s ease;
}

.company-link:hover {
  opacity: 0.5;
}

/* ===== Footer ===== */
.footer {
  padding: 80px 24px 48px;
  background: var(--fg);
  color: var(--bg);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.footer-combined-logo {
  width: 84px;
  height: auto;
  fill: rgba(255,255,255,0.8);
  margin-bottom: 40px;
}

.footer-copy {
  font-size: 0.5625rem;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.15em;
}

/* ===== Scroll Reveal ===== */
[data-scroll-reveal] {
  opacity: 0;
  transition: opacity 1s ease;
}

[data-scroll-reveal].revealed {
  opacity: 1;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  background: var(--bg);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 48px 40px;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.modal.open .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--fg);
  font-weight: 300;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}

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

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.required {
  color: #c00;
}

.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--fg);
}

.form-group textarea {
  resize: vertical;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--fg);
  color: var(--bg);
  border: none;
  padding: 16px 40px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: opacity 0.3s ease;
  margin-top: 8px;
}

.form-submit:hover {
  opacity: 0.8;
}

.form-note {
  font-size: 0.6875rem;
  color: var(--gray-4);
  margin-top: 16px;
}

.form-success {
  text-align: center;
  padding: 40px 0;
}

.form-success p {
  font-size: 0.9375rem;
  line-height: 2;
  font-weight: 500;
}

/* ===== English mode ===== */
body.lang-en .manifesto-inner {
  flex-direction: column;
  align-items: center;
  gap: 0;
}

body.lang-en .manifesto-inner p {
  writing-mode: horizontal-tb;
  white-space: normal;
  text-align: center;
  line-height: 2.2;
}

body.lang-en .manifesto-gap {
  width: auto;
  height: 16px;
}

/* ===== SP only ===== */
.sp-only { display: none; }
.hamburger { display: none; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sp-only { display: inline; }

  /* Header: hamburger menu */
  .header {
    padding: 20px 24px;
  }

  .header-logotype {
    width: 110px;
  }

  .header-logomark {
    width: 48px;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: var(--fg);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 200;
  }

  .header-nav.open {
    transform: translateX(0);
  }

  .header-nav .header-link {
    color: var(--bg);
    font-size: 0.875rem;
  }

  .header-nav .lang-btn {
    color: var(--bg);
  }

  .header-nav .lang-divider {
    color: var(--bg);
  }

  .hamburger {
    display: block;
    position: relative;
    z-index: 300;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
  }

  .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--fg);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
  }

  .hamburger span:nth-child(1) { top: 0; }
  .hamburger span:nth-child(2) { top: 9px; }
  .hamburger span:nth-child(3) { top: 18px; }

  .hamburger.open span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
    background: var(--bg);
  }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
    background: var(--bg);
  }

  .header.inverted .hamburger span {
    background: var(--bg);
  }

  /* Hero strip smaller */
  .para-photo {
    --w: clamp(120px, 35vw, 180px);
  }

  /* Manifesto: horizontal on mobile */
  .manifesto {
    padding: 60px 24px;
  }

  .manifesto-inner {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .manifesto-inner p {
    writing-mode: horizontal-tb;
    white-space: normal;
    text-align: center;
    font-size: 0.9375rem;
    line-height: 2.2;
  }

  .manifesto-gap {
    width: auto !important;
    height: 16px;
  }

  /* Concept */
  .concept {
    padding: 80px 24px;
  }

  .concept-heading {
    font-size: 1.75rem;
  }

  .concept-body {
    flex-direction: column;
  }

  .concept-divider {
    width: 40px;
    height: 1px;
    margin: 8px 0;
  }

  .concept-divider span {
    width: 100%;
    height: 1px;
  }

  /* Pillars */
  .pillars {
    padding: 40px 24px 80px;
  }

  .pillar {
    flex-direction: column;
    gap: 12px;
    padding: 32px 24px;
  }

  .pillar-title {
    font-size: 1.5rem;
  }

  /* Recruit */
  .recruit {
    padding: 80px 24px;
  }

  .recruit-heading {
    font-size: 1.75rem;
  }

  .recruit-row {
    flex-direction: column;
    gap: 8px;
  }

  .recruit-label {
    width: auto;
  }

  /* Company */
  .company {
    padding: 80px 24px;
  }

  .company-row {
    flex-direction: column;
    gap: 8px;
  }

  .company-label {
    width: auto;
  }

  /* Modal */
  .modal-content {
    width: 95%;
    padding: 32px 24px;
  }
}
