@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700;900&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Bebas+Neue&display=swap');

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --text-primary: #f0ece4;
  --text-secondary: #8a8578;
  --text-muted: #5a564e;
  --accent: #c23a22;
  --accent-glow: #e84c30;
  --accent-dark: #8a1a0a;
  --border: #2a2620;
  --border-light: #3a3630;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 3px; }

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideRight {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -2%); }
  30% { transform: translate(3%, 1%); }
  50% { transform: translate(-1%, 3%); }
  70% { transform: translate(2%, -1%); }
  90% { transform: translate(-3%, 2%); }
}

/* ── GRAIN OVERLAY ──────────────────────────────────────── */
.grain-overlay {
  position: fixed;
  top: -50%; left: -50%; right: -50%; bottom: -50%;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  animation: grain 8s steps(10) infinite;
  opacity: 0.5;
}

/* ── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10,10,10,0.7);
  border-bottom: 1px solid rgba(42,38,32,0.4);
  transition: all 0.3s ease;
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 6px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.nav-logo-mark {
  width: 36px; height: 36px;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  color: var(--accent);
  transition: all 0.3s ease;
}
.nav-logo:hover .nav-logo-mark {
  background: var(--accent);
  color: var(--bg-primary);
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  list-style: none;
}
.nav-link {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  animation: slideRight 0.4s ease forwards;
  transform-origin: left;
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 48px 80px;
  position: relative;
  overflow: hidden;
}
.hero-bg-kanji {
  position: absolute;
  right: -40px; top: 50%;
  transform: translateY(-50%);
  font-family: 'Noto Serif JP', serif;
  font-size: min(50vw, 500px);
  color: rgba(194, 58, 34, 0.04);
  user-select: none;
  pointer-events: none;
  line-height: 1;
}
.hero-label {
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  animation: fadeUp 0.8s ease both;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero-label::before {
  content: '';
  width: 40px; height: 1px;
  background: var(--accent);
}
.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 10vw, 140px);
  line-height: 0.9;
  letter-spacing: 4px;
  margin-bottom: 40px;
  animation: fadeUp 0.8s ease 0.15s both;
}
.hero-title .accent { color: var(--accent); }
.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  animation: fadeUp 0.8s ease 0.3s both;
  margin-bottom: 48px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  background: var(--accent);
  color: var(--text-primary);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeUp 0.8s ease 0.45s both;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
}
.hero-cta:hover {
  background: var(--accent-glow);
  transform: translateX(4px);
}
.hero-scroll {
  position: absolute;
  bottom: 40px; left: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: fadeIn 1s ease 1s both;
}
.hero-scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: pulse 2s ease infinite;
}

/* ── PAGE HERO (sub-pages) ──────────────────────────────── */
.page-hero {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px 48px 80px;
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  right: 48px; bottom: 40px;
  font-family: 'Noto Serif JP', serif;
  font-size: min(30vw, 300px);
  color: rgba(194, 58, 34, 0.03);
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

/* ── SECTIONS ───────────────────────────────────────────── */
.section {
  padding: 120px 48px;
  position: relative;
}
.section-label {
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-label::before {
  content: '';
  width: 40px; height: 1px;
  background: var(--accent);
}
.section-label--center {
  justify-content: center;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 6vw, 72px);
  letter-spacing: 3px;
  margin-bottom: 24px;
  line-height: 1;
}
.section-title--xl {
  font-size: clamp(40px, 7vw, 80px);
}
.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.8;
  margin-bottom: 64px;
}

/* ── DIVIDER ────────────────────────────────────────────── */
.divider {
  width: 100%; height: 1px;
  background: var(--border);
  position: relative;
}
.divider::after {
  content: '浪人';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Noto Serif JP', serif;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 0 20px;
  letter-spacing: 8px;
}

/* ── CONTENT GRID ───────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
}
.content-card {
  background: var(--bg-card);
  padding: 48px 36px;
  border: 1px solid var(--border);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.content-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.content-card:hover::before { transform: scaleX(1); }
.content-card:hover {
  background: #1a1a1a;
  border-color: var(--border-light);
}
.content-card-icon {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}
.content-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.content-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}
.content-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.3s ease;
}
.content-card:hover .tag {
  border-color: var(--border-light);
  color: var(--text-secondary);
}

/* ── STEP / PROCESS GRID ────────────────────────────────── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.process-card {
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.process-card:hover { border-color: var(--border-light); }
.process-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.process-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.process-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── SERVICES LIST ──────────────────────────────────────── */
.services-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.service-item {
  display: grid;
  grid-template-columns: 80px 240px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  transition: all 0.3s ease;
}
.service-item:hover {
  padding-left: 20px;
  border-bottom-color: var(--border-light);
}
.service-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  color: var(--accent);
  letter-spacing: 2px;
}
.service-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 2px;
}
.service-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── ENGAGEMENT MODELS ──────────────────────────────────── */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2px;
  max-width: 960px;
  margin: 48px auto 0;
}
.model-card {
  padding: 48px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.model-card:hover { border-color: var(--border-light); }
.model-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.model-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── VALUES GRID ────────────────────────────────────────── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.value-card {
  padding: 48px 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.4s ease;
}
.value-card:hover {
  border-color: var(--accent-dark);
  transform: translateY(-4px);
}
.value-kanji {
  font-family: 'Noto Serif JP', serif;
  font-size: 56px;
  color: var(--accent);
  margin-bottom: 16px;
  line-height: 1;
}
.value-word {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 4px;
  margin-bottom: 16px;
}
.value-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── ABOUT BODY ─────────────────────────────────────────── */
.about-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.about-text {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.9;
}
.about-text p { margin-bottom: 24px; }
.about-highlight {
  font-family: 'Noto Serif JP', serif;
  font-size: 24px;
  color: var(--text-primary);
  line-height: 1.6;
  border-left: 2px solid var(--accent);
  padding-left: 24px;
  margin: 32px 0;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-content: start;
}
.stat-item {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.stat-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  color: var(--accent);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── CTA BANNER ─────────────────────────────────────────── */
.cta-banner {
  padding: 100px 48px;
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '侍';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Noto Serif JP', serif;
  font-size: min(40vw, 400px);
  color: rgba(194,58,34,0.03);
  user-select: none;
  pointer-events: none;
}
.cta-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: 4px;
  margin-bottom: 20px;
  position: relative;
}
.cta-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.7;
  position: relative;
}

/* ── CONTACT ────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.contact-info h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 2px;
  margin-bottom: 16px;
  margin-top: 40px;
}
.contact-info h3:first-child { margin-top: 0; }
.contact-info p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.contact-social {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}
.social-link {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.3s ease;
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(194,58,34,0.08);
}

/* ── FORM ───────────────────────────────────────────────── */
.form-group { margin-bottom: 24px; }
.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-card);
}
.form-textarea {
  min-height: 160px;
  resize: vertical;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 48px;
  background: var(--accent);
  color: var(--text-primary);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  margin-top: 8px;
  width: 100%;
}
.form-submit:hover { background: var(--accent-glow); }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-message {
  padding: 20px;
  border: 1px solid var(--accent-dark);
  color: var(--text-primary);
  font-size: 14px;
  text-align: center;
  margin-top: 16px;
  display: none;
}
.form-message.show { display: block; }
.form-message.success { background: rgba(194,58,34,0.1); }
.form-message.error { background: rgba(170,51,51,0.1); border-color: #aa3333; }

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
  padding: 60px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 4px;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-link {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.footer-link:hover { color: var(--text-secondary); }
.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-body { grid-template-columns: 1fr; gap: 48px; }
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }
  .service-item { grid-template-columns: 1fr; gap: 12px; padding: 32px 0; }
}
@media (max-width: 768px) {
  .nav { padding: 16px 24px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .mobile-toggle { display: block; }
  .hero { padding: 120px 24px 80px; }
  .page-hero { padding: 120px 24px 60px; min-height: 45vh; }
  .section { padding: 80px 24px; }
  .cta-banner { padding: 80px 24px; }
  .footer { padding: 40px 24px; flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .hero-scroll { display: none; }
}
