/* ==========================================================
   Knowledge Laboratory — Corporate Site
   ========================================================== */

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-soft: #5b606b;
  --ink-mute: #9a9ea8;
  --line: rgba(22, 24, 29, 0.08);
  --accent: #1f4fd8;
  --accent-2: #6a8cff;
  --accent-soft: rgba(31, 79, 216, 0.08);

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 6px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.05), 0 16px 32px -8px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.06), 0 32px 64px -16px rgba(16, 24, 40, 0.16);

  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* ease-in-out: the change unfolds evenly instead of finishing in the first instant */
  --ease-hover: cubic-bezier(0.4, 0, 0.2, 1);
  --hover: .6s;
  --hover-slow: .9s;
  --header-h: 80px;

  --ff-ja: "Noto Sans JP", system-ui, sans-serif;
  --ff-en: "Inter", system-ui, sans-serif;
  --ff-num: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--ff-ja);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
img, svg, iframe { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #fff; }

.container { width: min(1160px, 100% - 48px); margin-inline: auto; }
.sp { display: none; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .9s var(--ease) .15s, visibility .9s .15s;
}
/* Sequence: logo resolves from blur → rule draws out from the center → names rise in */
.loader__inner {
  display: flex; flex-direction: column; align-items: center;
  transition: transform 1s var(--ease), filter 1s var(--ease);
}
.loader__mark {
  width: clamp(200px, 30vw, 300px); height: auto;
  animation: loaderIn 1.1s var(--ease) both;
}
.loader__line {
  width: 48px; height: 1px; margin: 28px 0 22px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: loaderLine .9s var(--ease) .45s both;
}
.loader__ja {
  font-size: clamp(14px, 1.6vw, 17px); font-weight: 500; letter-spacing: .24em;
  animation: loaderText .9s var(--ease) .7s both;
}
.loader__en {
  margin-top: 8px;
  font-family: var(--ff-en); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-mute);
  animation: loaderText .9s var(--ease) .85s both;
}
@keyframes loaderIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes loaderLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes loaderText {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
body.is-loaded .loader { opacity: 0; visibility: hidden; }
body.is-loaded .loader__inner { transform: translateY(-16px); filter: blur(4px); }

/* ---------- Cursor glow ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 0;
  width: 480px; height: 480px; margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 140, 255, 0.12), transparent 65%);
  pointer-events: none;
  transition: opacity .4s;
  will-change: transform;
}
@media (hover: none) { .cursor { display: none; } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  transition: height .5s var(--ease);
}
/* The frosted backdrop lives on a pseudo-element: backdrop-filter on .header itself would
   make it the containing block for the fixed mobile menu and trap the menu inside the bar. */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(246, 245, 242, 0.45);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px -12px rgba(16, 24, 40, 0.08);
  opacity: 0; transition: opacity .5s var(--ease);
}
.header.is-scrolled::before { opacity: 1; }
.header.is-scrolled {
  height: 64px;
}

.logo { display: flex; align-items: center; gap: 18px; }
.logo__img {
  height: 34px; width: auto;
  transition: transform var(--hover) var(--ease-hover), height .5s var(--ease);
}
.logo:hover .logo__img { transform: translateY(-2px) rotate(-2deg); }
.header.is-scrolled .logo__img { height: 28px; }
.logo__text {
  display: flex; flex-direction: column; line-height: 1.3;
  padding-left: 18px; border-left: 1px solid var(--line);
}
.logo__ja { font-size: 12px; font-weight: 500; letter-spacing: .08em; }
.logo__en { font-family: var(--ff-en); font-size: 10px; color: var(--ink-mute); letter-spacing: .14em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 36px; font-family: var(--ff-en); font-size: 13px; letter-spacing: .08em; }
.nav a { position: relative; padding: 4px 0; color: var(--ink-soft); transition: color var(--hover) var(--ease-hover); }
.nav a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: right;
  transition: transform var(--hover) var(--ease-hover);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  padding: 10px 22px !important; border-radius: 999px;
  background: var(--ink); color: #fff !important;
  box-shadow: 0 6px 18px -6px rgba(22, 24, 29, .5);
  transition: transform var(--hover) var(--ease-hover), box-shadow var(--hover) var(--ease-hover) !important;
}
.nav__cta:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(22, 24, 29, .55); }

.menu-btn { display: none; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 32px; border-radius: 999px;
  font-size: 14px; font-weight: 500; overflow: hidden;
  transition: transform var(--hover) var(--ease-hover), box-shadow var(--hover) var(--ease-hover), color var(--hover) var(--ease-hover);
}
.btn span { position: relative; z-index: 1; }
.btn--primary {
  background: var(--ink); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(22, 24, 29, .6), inset 0 1px 0 rgba(255,255,255,.1);
}
.btn--primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  transform: translateY(101%); transition: transform var(--hover-slow) var(--ease-hover);
}
.btn--primary:hover::before { transform: translateY(0); }
.btn--ghost {
  background: rgba(255,255,255,.6); color: var(--ink);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  backdrop-filter: blur(8px);
}
.btn:hover { transform: translateY(-3px); }
.btn--ghost:hover { box-shadow: var(--shadow-md), inset 0 0 0 1px var(--line); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) clamp(24px, 8vw, 120px) 120px;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.orb--1 { width: 520px; height: 520px; top: -120px; right: -80px; background: #c9d6ff; animation: float1 18s ease-in-out infinite; }
.orb--2 { width: 380px; height: 380px; bottom: -80px; right: 28%; background: #e9e1d4; animation: float2 22s ease-in-out infinite; }
.orb--3 { width: 300px; height: 300px; top: 30%; left: -100px; background: #dfe7f5; animation: float1 26s ease-in-out infinite reverse; }
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px, 50px) scale(1.08); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(50px, -30px) scale(.94); } }

.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
  opacity: .6;
}

.hero__inner { position: relative; z-index: 1; max-width: 720px; }
.hero__eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--ff-en); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft);
  opacity: 0; transform: translateY(10px);
}
.hero__eyebrow .line { width: 40px; height: 1px; background: var(--ink); }
.hero__title {
  margin: 28px 0 32px;
  font-size: clamp(48px, 9vw, 112px); font-weight: 700; line-height: 1.12; letter-spacing: .02em;
}
.split { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; }
.split .char {
  display: inline-block; transform: translateY(110%); opacity: 0;
  transition: transform 1.1s var(--ease), opacity 1.1s var(--ease);
}
.split .char.accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { color: var(--ink-soft); font-size: clamp(14px, 1.4vw, 16px); opacity: 0; transform: translateY(16px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; opacity: 0; transform: translateY(16px); }

body.is-loaded .split .char { transform: translateY(0); opacity: 1; }
body.is-loaded .hero__eyebrow,
body.is-loaded .hero__lead,
body.is-loaded .hero__actions { opacity: 1; transform: none; transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
body.is-loaded .hero__eyebrow { transition-delay: .5s; }
body.is-loaded .hero__lead { transition-delay: 1.1s; }
body.is-loaded .hero__actions { transition-delay: 1.3s; }

.hero__card {
  position: absolute; z-index: 1; right: clamp(24px, 9vw, 160px); bottom: 18%;
  width: 260px; padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(255,255,255,.5);
  opacity: 0; transform: translateY(30px);
  transition: opacity 1.4s var(--ease) 1.5s, transform 1.4s var(--ease) 1.5s;
}
body.is-loaded .hero__card { opacity: 1; transform: none; }
.hero__card-inner { display: flex; flex-direction: column; gap: 4px; }
.hero__card-label, .hero__card-sub { font-family: var(--ff-en); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); }
.hero__card-num { font-family: var(--ff-num); font-size: 64px; line-height: 1; font-weight: 200; letter-spacing: -.02em; }

.scroll-hint {
  position: absolute; left: clamp(24px, 8vw, 120px); bottom: 36px; z-index: 1;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--ff-en); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft);
}
.scroll-hint__bar { position: relative; width: 64px; height: 1px; background: var(--line); overflow: hidden; }
.scroll-hint__bar::after {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  animation: scrollBar 2.4s var(--ease) infinite;
}
@keyframes scrollBar { 0% { transform: translateX(-100%); } 60%,100% { transform: translateX(100%); } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; padding: 28px 0;
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.marquee__track {
  display: flex; align-items: center; gap: 40px; width: max-content;
  font-family: var(--ff-num); font-size: clamp(24px, 3.4vw, 38px); font-weight: 200; letter-spacing: .02em; color: var(--ink);
  animation: marquee 40s linear infinite;
}
.marquee__track i { font-style: normal; font-size: .5em; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- Section ---------- */
.section { position: relative; padding: clamp(96px, 14vw, 180px) 0; }
.section > .container { position: relative; z-index: 1; }
.section-head { margin-bottom: 56px; }

/* Hero-style grid, kept away from text:
   (1) in the side gutters outside the 1160px content column, fading toward the center and the section edges */
:root {
  --grid-lines:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
}
.section::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--grid-lines); background-size: 80px 80px; background-position: center top;
  -webkit-mask-image:
    linear-gradient(90deg, #000 0, transparent calc(50% - 560px), transparent calc(50% + 560px), #000 100%),
    linear-gradient(transparent 0, #000 25%, #000 75%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, #000 0, transparent calc(50% - 560px), transparent calc(50% + 560px), #000 100%),
    linear-gradient(transparent 0, #000 25%, #000 75%, transparent 100%);
  mask-composite: intersect;
}
/* Soft blue glow like the hero's top-right orb; one per section, alternating sides, kept to the edges */
.section { overflow: hidden; }
.section::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 700px; height: 700px; border-radius: 50%;
  top: var(--glow-top, 0); bottom: var(--glow-bottom, auto);
  left: var(--glow-left, auto); right: var(--glow-right, auto);
  background: radial-gradient(circle, rgba(201, 214, 255, .9), rgba(201, 214, 255, 0) 68%);
  filter: blur(30px);
  animation: float1 22s ease-in-out infinite;
}
.about    { --glow-top: -120px; --glow-right: -260px; }
.service  { --glow-top: auto; --glow-bottom: -200px; --glow-left: -280px; }
.strength { --glow-top: 30%; --glow-right: -300px; }
.company  { --glow-top: 38%; --glow-left: -320px; }
.contact  { --glow-top: -160px; --glow-right: -240px; }
.service::after, .company::after { animation-direction: reverse; animation-duration: 26s; }

/* (2) in the empty space under left-column headings */
.about__grid > .section-head,
.company__grid > .section-head,
.contact__grid > .section-head { position: relative; }
.about__grid > .section-head::after,
.company__grid > .section-head::after,
.contact__grid > .section-head::after {
  content: ""; position: absolute; left: -40px; right: 0; top: calc(100% + 48px); height: 320px; pointer-events: none;
  background-image: var(--grid-lines); background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 55% 50% at 40% 45%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 55% 50% at 40% 45%, #000 0%, transparent 70%);
}
.section-head--center { text-align: center; }
.section-head__en {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--ff-en); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent);
}
.section-head__en::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px var(--accent-soft); }
.section-head__ja { margin-top: 16px; font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; line-height: 1.5; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; }
.about__body p { color: var(--ink-soft); font-size: 15px; }
.about__body p + p { margin-top: 24px; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px;
}
.stat {
  position: relative; overflow: hidden;
  padding: 28px 24px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-md);
  transition: transform var(--hover-slow) var(--ease-hover), box-shadow var(--hover-slow) var(--ease-hover);
}
.stat::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--hover-slow) var(--ease-hover);
}
.stat:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.stat:hover::before { transform: scaleX(1); }
.stat__num {
  display: block; font-family: var(--ff-num); font-size: 40px; line-height: 1; font-weight: 200; letter-spacing: -.02em;
  transition: color var(--hover-slow) var(--ease-hover), transform var(--hover-slow) var(--ease-hover);
}
.stat:hover .stat__num { color: var(--accent); transform: translateX(4px); }
.stat__num em { font-style: normal; }
.stat__num small { margin-left: 6px; font-size: .45em; font-weight: 300; letter-spacing: .04em; }
.stat__label {
  display: block; margin-top: 12px; font-family: var(--ff-en); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
  transition: color var(--hover-slow) var(--ease-hover);
}
.stat:hover .stat__label { color: var(--ink-soft); }

/* ---------- Service ---------- */
.service { background: linear-gradient(180deg, var(--bg), #eeedea); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  position: relative; padding: 40px 28px 36px; border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform-style: preserve-3d;
  transition: box-shadow var(--hover) var(--ease-hover), opacity 1.2s var(--ease), transform 1.2s var(--ease);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(106,140,255,.12), transparent 50%);
  opacity: 0; transition: opacity var(--hover-slow) var(--ease-hover);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card:hover::before { opacity: 1; }
.card:nth-child(2) { transition-delay: .1s; }
.card:nth-child(3) { transition-delay: .2s; }
.card:nth-child(4) { transition-delay: .3s; }
.card__no { position: absolute; top: 24px; right: 28px; font-family: var(--ff-num); font-size: 13px; font-weight: 400; letter-spacing: .1em; color: var(--ink-mute); }
.card__icon {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(145deg, #fff, #eef0f5);
  box-shadow: 6px 6px 14px rgba(16,24,40,.08), -6px -6px 14px rgba(255,255,255,.9);
  color: var(--accent);
  transition: transform var(--hover-slow) var(--ease-hover);
}
.card__icon svg { width: 30px; height: 30px; }
.card:hover .card__icon { transform: translateZ(30px) rotate(-6deg); }
.card__title { margin-top: 32px; font-size: 19px; font-weight: 700; }
.card__en { font-family: var(--ff-en); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.card__text { margin-top: 16px; font-size: 14px; color: var(--ink-soft); line-height: 1.85; }

/* ---------- Strength ---------- */
.strength__list { border-top: 1px solid var(--line); }
.strength__item {
  position: relative; display: grid; grid-template-columns: 160px 1fr; gap: 32px; align-items: baseline;
  padding: 48px 0; border-bottom: 1px solid var(--line);
}
.strength__item::before {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform var(--hover-slow) var(--ease-hover);
}
.strength__item:hover::before { transform: scaleX(1); }
/* Number is an outline; on hover, ink fills it from left to right (a gradient wipe clipped to the text). */
.strength__num {
  display: inline-block;
  font-family: var(--ff-num); font-weight: 200; font-size: 64px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--ink-mute);
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 50%, transparent 50%) no-repeat;
  background-size: 200% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  transition:
    background-position var(--hover-slow) var(--ease-hover),
    -webkit-text-stroke-color var(--hover-slow) var(--ease-hover),
    transform var(--hover-slow) var(--ease-hover);
}
.strength__item:hover .strength__num {
  background-position: 0 0;
  -webkit-text-stroke-color: transparent;
  transform: translateX(10px);
}
.strength__item > div { transition: transform var(--hover-slow) var(--ease-hover); }
.strength__item:hover > div { transform: translateX(10px); }
.strength__item h3 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; }
.strength__item p {
  margin-top: 12px; max-width: 640px; color: var(--ink-soft); font-size: 15px;
  transition: color var(--hover-slow) var(--ease-hover);
}
.strength__item:hover p { color: var(--ink); }

/* On scroll-in, each number draws in a beat after its row appears. */
.strength__item .strength__num { opacity: 0; translate: 0 24px; transition-property: background-position, -webkit-text-stroke-color, transform, opacity, translate; transition-duration: var(--hover-slow), var(--hover-slow), var(--hover-slow), 1.4s, 1.4s; transition-delay: 0s, 0s, 0s, .35s, .35s; transition-timing-function: var(--ease-hover), var(--ease-hover), var(--ease-hover), var(--ease), var(--ease); }
.strength__item.is-in .strength__num { opacity: 1; translate: 0 0; }

/* ---------- Company ---------- */
.company { background: var(--surface); }
.company__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 80px; }
.company__table > div { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.company__table > div:first-child { border-top: 1px solid var(--line); }
.company__table dt { font-size: 13px; font-weight: 500; color: var(--ink-mute); }
.company__table dd { font-size: 15px; }
/* History timeline: each row draws its segment of the line and lights its dot as it scrolls in */
.history { margin-top: 96px; }
.timeline { position: relative; }
.timeline__item {
  position: relative; display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: baseline;
  padding: 0 0 40px 40px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink-mute);
  transition: background .8s var(--ease) .4s, box-shadow .8s var(--ease) .4s;
}
.timeline__item::after {
  content: ""; position: absolute; left: 0; top: 24px; bottom: -6px; width: 1px;
  background: linear-gradient(var(--accent-2), var(--line));
  transform: scaleY(0); transform-origin: top;
  transition: transform 1.2s var(--ease) .5s;
}
.timeline__item:last-child::after { display: none; }
.timeline__item.is-in::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline__item.is-in::after { transform: scaleY(1); }
.timeline__date { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 2px; }
.timeline__year { font-family: var(--ff-num); font-size: 28px; font-weight: 200; line-height: 1; letter-spacing: -.01em; }
.timeline__month { font-family: var(--ff-num); font-size: 15px; font-weight: 300; color: var(--ink-soft); }
.timeline__jp { width: 100%; margin-top: 6px; font-size: 11px; color: var(--ink-mute); letter-spacing: .08em; }
.timeline__text { font-size: 15px; }

.map {
  margin-top: 80px; border-radius: 28px; overflow: hidden; height: 420px;
  box-shadow: var(--shadow-lg);
}
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05) brightness(1.02); transition: filter 1.1s var(--ease-hover); }
.map:hover iframe { filter: grayscale(0); }
/* Touch devices can't hover: bring the color in once the map scrolls into view */
@media (hover: none) {
  .map.is-in iframe { filter: grayscale(0); transition: filter 2s var(--ease-hover) .6s; }
}

/* ---------- Contact ---------- */
/* Same grammar as About: heading left, content right, cards like the About stat panels */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; }
.contact__text { color: var(--ink-soft); font-size: 15px; }
.contact__cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.contact-card {
  position: relative; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; gap: 24px;
  padding: 28px 24px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-md);
  transition: transform var(--hover-slow) var(--ease-hover), box-shadow var(--hover-slow) var(--ease-hover);
}
.contact-card::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--hover-slow) var(--ease-hover);
}
.contact-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.contact-card:hover::before { transform: scaleX(1); }
.contact-card__icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(145deg, #fff, #eef0f5);
  box-shadow: 5px 5px 12px rgba(16,24,40,.08), -5px -5px 12px rgba(255,255,255,.9);
  color: var(--accent);
  transition: transform var(--hover-slow) var(--ease-hover);
}
.contact-card__icon svg { width: 24px; height: 24px; }
.contact-card:hover .contact-card__icon { transform: rotate(-8deg); }
.contact-card__value {
  font-family: var(--ff-num); font-size: clamp(20px, 2vw, 26px); font-weight: 300; letter-spacing: .02em; white-space: nowrap;
  transition: color var(--hover-slow) var(--ease-hover);
}
.contact-card:hover .contact-card__value { color: var(--accent); }
.contact__info { margin-top: 40px; }
.contact__info > div { display: grid; grid-template-columns: 100px 1fr; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact__info > div:first-child { border-top: 1px solid var(--line); }
.contact__info dt { font-size: 13px; font-weight: 500; color: var(--ink-mute); }
.contact__info dd { font-size: 15px; }

/* ---------- Footer ---------- */
.footer { padding: 64px 0 40px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer__addr { font-size: 12px; color: var(--ink-soft); }
.footer__copy { width: 100%; padding-top: 28px; margin-top: 12px; border-top: 1px solid var(--line); font-family: var(--ff-en); font-size: 11px; letter-spacing: .1em; color: var(--ink-mute); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about__grid, .company__grid, .contact__grid { grid-template-columns: 1fr; gap: 24px; }
  .about__grid > .section-head::after,
  .company__grid > .section-head::after,
  .contact__grid > .section-head::after { display: none; }
  .hero__card { display: none; }

  /* Hamburger menu from tablet width down; a full row of links doesn't fit beside the logo here */
  .menu-btn {
    position: relative; z-index: 110; display: block; width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: var(--surface); box-shadow: var(--shadow-md); cursor: pointer;
  }
  .menu-btn span { position: absolute; left: 14px; width: 16px; height: 1.5px; background: var(--ink); transition: transform .5s var(--ease); }
  .menu-btn span:first-child { top: 18px; }
  .menu-btn span:last-child { top: 25px; }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  .nav {
    position: fixed; inset: 0; z-index: 105;
    flex-direction: column; justify-content: center; gap: 28px;
    font-size: 22px; background: rgba(246,245,242,.96); backdrop-filter: blur(20px);
    opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
}

@media (max-width: 768px) {
  :root { --header-h: 68px; }
  .sp { display: inline; }
  .pc { display: none; }
  .hero { padding-inline: 24px; }
  .scroll-hint { left: 24px; }
  .stats { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .strength__item { grid-template-columns: 1fr; gap: 12px; padding: 36px 0; }
  .strength__num { font-size: 44px; }
  .company__table > div { grid-template-columns: 1fr; gap: 4px; }
  .map { height: 300px; margin-top: 48px; }
  .history { margin-top: 72px; }
  .timeline__item { grid-template-columns: 1fr; gap: 6px; padding-left: 28px; }
  .contact__cards { grid-template-columns: 1fr; }
  .contact-card { flex-direction: row; align-items: center; gap: 20px; padding: 20px; }
  .contact__info > div { grid-template-columns: 80px 1fr; gap: 16px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .header .logo__text { display: none; }
  .logo__img { height: 30px; }
}

/* Reduced motion (e.g. Windows "Animation effects" off): stop large and looping motion,
   but keep gentle hover transitions and fades. */
@media (prefers-reduced-motion: reduce) {
  .orb, .section::after, .scroll-hint__bar::after { animation: none !important; }
  .marquee__track { animation-duration: 60s; }
  .reveal, .strength__item .strength__num { transform: none; translate: none; }
  .split .char { transform: none; }
}
