/* ===== PATTERN 3: Benoist — Minimalism & Refined Motion ===== */

:root {
  --bg: #f8f7f4;
  --white: #ffffff;
  --ink: #111111;
  --ink-light: #888888;
  --ink-xlight: #cccccc;
  --accent: #1a1a1a;
  --red: #c0392b;
  --line: rgba(0,0,0,0.08);
  --font: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  --serif: 'Georgia', 'Times New Roman', '游明朝', serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.6s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  cursor: none;
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s;
  will-change: transform;
}
.cursor-follower {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: left 0.15s var(--ease), top 0.15s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.3s;
  will-change: transform;
}
body:has(a:hover) .cursor,
body:has(button:hover) .cursor { width: 0; height: 0; }
body:has(a:hover) .cursor-follower,
body:has(button:hover) .cursor-follower { width: 56px; height: 56px; background: rgba(0,0,0,0.06); }

/* ===== APPEAR ANIMATION ===== */
.appear {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.appear.visible { opacity: 1; transform: translateY(0); }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 28px 64px;
  mix-blend-mode: normal;
  transition: padding 0.4s var(--ease), background 0.4s;
}
.nav.scrolled {
  padding: 18px 64px;
  background: rgba(248,247,244,0.94);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  text-decoration: none;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.nav__logo > span:first-child {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--ink);
}
.nav__logo-full {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.12em;
}
.nav__links {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
}
.nav__links a {
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  transition: color 0.3s;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  color: var(--ink) !important;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 7px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
}
.toggle-bar {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--ink);
  transition: var(--dur) var(--ease);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  padding: 0 64px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--white);
}
.hero__number {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: clamp(8rem, 15vw, 20rem);
  color: rgba(0,0,0,0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}
.hero__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 120px;
  align-items: center;
  padding-top: 80px;
  width: 100%;
  position: relative;
  z-index: 1;
}
.hero__tag {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--ink-light);
  text-transform: uppercase;
  margin-bottom: 40px;
  display: block;
}
.hero__title {
  font-family: var(--serif);
  font-size: clamp(3rem, 5.5vw, 5.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .word { display: block; }
.hero__desc {
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 2;
  margin-bottom: 48px;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 64px;
}
.link-arrow {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: gap 0.3s var(--ease);
}
.link-arrow:hover { gap: 20px; }
.link-arrow .arrow { transition: transform 0.3s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }
.link-plain {
  text-decoration: none;
  color: var(--ink-light);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}
.link-plain:hover { color: var(--ink); }
.hero__metrics {
  display: flex;
  gap: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.metric__num {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--ink);
  line-height: 1;
}
.metric__unit {
  font-size: 1rem;
  color: var(--ink-light);
}
.metric__label {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-xlight);
  letter-spacing: 0.1em;
  margin-top: 6px;
}
.hero__line--v {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line);
}
.hero__scroll {
  position: absolute;
  bottom: 40px;
  right: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--ink-xlight);
  writing-mode: vertical-rl;
}
.scroll__track {
  width: 1px;
  height: 60px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.scroll__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: var(--ink-light);
  animation: scrollThumb 2s ease-in-out infinite;
}
@keyframes scrollThumb {
  0% { top: -30px; }
  100% { top: 60px; }
}

/* ===== SERVICE ===== */
.service {
  padding: 140px 64px;
  background: var(--bg);
}
.service__inner { max-width: 1440px; margin: 0 auto; }
.section-header {
  margin-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--ink-xlight);
  text-transform: uppercase;
}
.section-header h2 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.service__items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.service__item {
  background: var(--white);
  padding: 64px 48px;
}
.service__item-top {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}
.service__num {
  font-family: var(--serif);
  font-size: 0.8rem;
  color: var(--ink-xlight);
  letter-spacing: 0.1em;
}
.service__sep {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.service__item h3 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.service__item p {
  font-size: 0.875rem;
  color: var(--ink-light);
  line-height: 2;
  margin-bottom: 40px;
}
.service__detail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.service__col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-xlight);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.service__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service__col li {
  font-size: 0.82rem;
  color: var(--ink-light);
  padding-left: 12px;
  position: relative;
}
.service__col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 1px;
  background: var(--ink-xlight);
}
.service__system-img {
  background: var(--bg);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}
.service__system-img img { width: 80%; height: 80%; object-fit: contain; opacity: 0.7; }

/* ===== ABOUT ===== */
.about {
  padding: 140px 64px;
  background: var(--white);
}
.about__inner { max-width: 1440px; margin: 0 auto; }
.about__layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 80px;
}
.about__overview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.about__overview tr { border-bottom: 1px solid var(--line); }
.about__overview th {
  padding: 18px 24px 18px 0;
  text-align: left;
  font-weight: 500;
  color: var(--ink-light);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  width: 120px;
  vertical-align: top;
}
.about__overview td {
  padding: 18px 0;
  color: var(--ink);
  line-height: 1.8;
  font-size: 0.875rem;
}
.about__timeline h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 40px;
  letter-spacing: -0.01em;
}
.tl { display: flex; flex-direction: column; }
.tl__item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.tl__y {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-xlight);
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.tl__item p {
  font-size: 0.82rem;
  color: var(--ink-light);
  line-height: 1.7;
}

/* ===== RESULTS ===== */
.results {
  padding: 140px 64px;
  background: var(--bg);
}
.results__inner { max-width: 1440px; margin: 0 auto; }
.results__intro {
  font-size: 0.95rem;
  color: var(--ink-light);
  line-height: 1.9;
  margin-bottom: 64px;
  max-width: 600px;
}
.results__list { display: flex; flex-direction: column; }
.results__item {
  border-top: 1px solid var(--line);
}
.results__item:last-child { border-bottom: 1px solid var(--line); }
.results__item-inner {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 40px;
  padding: 40px 0;
  align-items: start;
  cursor: none;
  transition: padding 0.3s var(--ease);
}
.results__item:hover .results__item-inner { padding: 40px 24px; background: var(--white); }
.results__count {
  font-family: var(--serif);
  font-size: 0.8rem;
  color: var(--ink-xlight);
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.results__content h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
  transition: color 0.3s;
}
.results__content p {
  font-size: 0.83rem;
  color: var(--ink-light);
  line-height: 1.9;
}
.results__arrow {
  font-size: 1.2rem;
  color: var(--ink-xlight);
  transition: transform 0.4s var(--ease), color 0.3s;
  align-self: center;
}
.results__item:hover .results__arrow { transform: translateX(8px); color: var(--ink); }

/* ===== ACCESS ===== */
.access {
  padding: 140px 64px;
  background: var(--white);
}
.access__inner { max-width: 1440px; margin: 0 auto; }
.access__offices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.access__office {
  background: var(--bg);
  padding: 56px;
}
.access__office h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.access__office address {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--ink-light);
  line-height: 2;
  margin-bottom: 28px;
}
.access__office address a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-xlight);
}
.access__map { overflow: hidden; }
.access__map iframe { display: block; }

/* ===== CONTACT ===== */
.contact {
  padding: 140px 64px;
  background: var(--bg);
}
.contact__inner { max-width: 800px; margin: 0 auto; }
.contact__lead {
  font-size: 0.95rem;
  color: var(--ink-light);
  line-height: 1.9;
  margin-bottom: 64px;
}
.contact__form { display: flex; flex-direction: column; }
.f-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.f-group {
  position: relative;
}
.f-full { margin-bottom: 24px; }
.f-group input,
.f-group textarea,
.f-group select {
  width: 100%;
  background: var(--white);
  border: none;
  border-bottom: 1px solid var(--ink-xlight);
  padding: 20px 0 12px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s;
  cursor: none;
}
.f-group select { padding: 12px 0; cursor: none; }
.f-group input:focus,
.f-group textarea:focus,
.f-group select:focus { border-bottom-color: var(--ink); }
.f-group label {
  position: absolute;
  top: 16px;
  left: 0;
  font-size: 0.82rem;
  color: var(--ink-xlight);
  pointer-events: none;
  transition: all 0.3s var(--ease);
  letter-spacing: 0.05em;
}
.f-group input:not(:placeholder-shown) ~ label,
.f-group input:focus ~ label,
.f-group textarea:not(:placeholder-shown) ~ label,
.f-group textarea:focus ~ label {
  top: 0;
  font-size: 0.68rem;
  color: var(--ink-light);
  letter-spacing: 0.1em;
}
.f-group label em { color: var(--red); font-style: normal; margin-left: 2px; }
.f-group--select { margin-bottom: 0; }
.f-kojyu { display: flex; flex-direction: column; gap: 10px; }
.f-kojyu__label {
  font-size: 0.82rem;
  color: var(--ink-xlight);
  letter-spacing: 0.05em;
}
.f-hint {
  font-size: 0.73rem;
  color: var(--ink-xlight);
  margin-left: 6px;
  letter-spacing: 0.02em;
}
.f-kojyu select[multiple] {
  width: 100%;
  background: var(--white);
  border: none;
  border-bottom: 1px solid var(--ink-xlight);
  padding: 4px 0;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--ink);
  outline: none;
  height: auto;
  cursor: none;
  transition: border-color 0.3s;
}
.f-kojyu select[multiple]:focus { border-bottom-color: var(--ink); }
.f-kojyu select[multiple] option {
  padding: 10px 8px;
  cursor: none;
}
.f-kojyu select[multiple] option:checked {
  background: var(--ink);
  color: #fff;
}
.f-textarea textarea { resize: vertical; min-height: 100px; }
.submit-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--ink);
  color: var(--white);
  border: none;
  padding: 20px 48px;
  font-size: 0.875rem;
  font-family: var(--font);
  letter-spacing: 0.08em;
  cursor: none;
  transition: all 0.4s var(--ease);
  align-self: flex-start;
  margin-top: 16px;
}
.submit-btn:hover { background: #333; }
.submit-btn__icon { display: flex; align-items: center; transition: transform 0.3s var(--ease); }
.submit-btn:hover .submit-btn__icon { transform: translateX(4px); }
.form-msg {
  margin-top: 20px;
  font-size: 0.85rem;
  min-height: 20px;
}
.form-msg.ok { color: #27ae60; }
.form-msg.err { color: var(--red); }

/* ===== FOOTER ===== */
.footer {
  background: var(--ink);
  padding: 64px;
}
.footer__inner { max-width: 1440px; margin: 0 auto; }
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 40px;
}
.footer__logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 0.08em;
}
.footer__nav {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.footer__nav a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.3s;
}
.footer__nav a:hover { color: rgba(255,255,255,0.8); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}
.footer__bottom p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.9;
}
.footer__copy {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2) !important;
  white-space: nowrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .hero__inner { grid-template-columns: 1fr; gap: 64px; }
  .hero__line--v { display: none; }
  .hero__number { font-size: 8rem; }
  .service__items { grid-template-columns: 1fr; }
  .about__layout { grid-template-columns: 1fr; }
  .access__offices { grid-template-columns: 1fr; }
  .results__item-inner { grid-template-columns: 48px 1fr auto; }
}
@media (max-width: 768px) {
  .nav { padding: 20px 24px; }
  .nav.scrolled { padding: 14px 24px; }
  .nav__links {
    position: fixed;
    top: 0; right: -100%; bottom: 0;
    width: 280px;
    background: var(--white);
    flex-direction: column;
    padding: 80px 32px;
    gap: 24px;
    transition: right var(--dur) var(--ease);
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
  }
  .nav__links.open { right: 0; }
  .nav__links a { font-size: 1rem; color: var(--ink); }
  .nav__toggle { display: flex; }
  .hero, .service, .about, .results, .access, .contact { padding-left: 24px; padding-right: 24px; }
  .hero { padding-top: 0; min-height: 100vh; }
  .hero__inner { padding-top: 100px; }
  .service__item { padding: 40px 24px; }
  .service__detail { grid-template-columns: 1fr; }
  .about__overview th { width: 90px; }
  .access__office { padding: 32px 24px; }
  .f-row { grid-template-columns: 1fr; }
  .footer { padding: 40px 24px; }
  .footer__top { flex-direction: column; gap: 32px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  body { cursor: auto; }
  .cursor, .cursor-follower { display: none; }
}
