/* ============================================================
   Marutai — marutai-web.com
   css/style.css
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --bg: #FAFCFE;
  --bg-panel: #F0F6FC;
  --ink: #333333;
  --ink-strong: #1F2733;
  --accent: #2B5FA3;
  --line: #DFE8F2;
  --muted: #6B7684;

  --shadow: 0 2px 12px rgba(31, 39, 51, .06);
  --radius-card: 16px;
  --radius-pill: 999px;

  --font-display: "Archivo", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --section-pad: 88px;
  --content-max: 1120px;
  --prose-max: 720px;
}

@media (min-width: 768px) {
  :root {
    --section-pad: 140px;
  }
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  font-feature-settings: "palt";
  overflow-x: hidden;
}

h1, h2, h3, p, dl, dd, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  scroll-margin-top: 72px;
}

/* ---------- 3. Shared elements ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 20px;
}

.section {
  padding: var(--section-pad) 0;
}

.section-title {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-strong);
  letter-spacing: 0.01em;
  margin-bottom: 40px;
}

.prose {
  max-width: var(--prose-max);
}

.prose p + p {
  margin-top: 1.6em;
}

/* ---------- 4. Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease,
              -webkit-backdrop-filter 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled {
  background: rgba(250, 252, 254, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--ink-strong);
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--accent);
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 96px;
  overflow: hidden;
}

/* 極薄グリッド（ヒーローのみ） */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(223, 232, 242, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 232, 242, 0.4) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  pointer-events: none;
}

/* ラジアルグロー（accent 6%・60s ドリフト） */
.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  width: 1200px;
  height: 1200px;
  margin-left: -600px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(43, 95, 163, 0.06), rgba(43, 95, 163, 0));
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-glow {
    animation: glow-drift 60s ease-in-out infinite alternate;
  }
}

@keyframes glow-drift {
  from { transform: translate(-6%, -2%); }
  50%  { transform: translate(4%, 5%); }
  to   { transform: translate(8%, -4%); }
}

.hero .container {
  position: relative;
  width: 100%;
}

.hero-eyebrow {
  margin-bottom: 8px;
}

/* ワードマーク */
.wordmark {
  font-family: var(--font-display);
  font-size: clamp(52px, 15vw, 192px);
  line-height: 1.05;
  color: var(--ink-strong);
  letter-spacing: -0.015em;
  margin: 0 0 16px -0.04em;
  white-space: nowrap;
  user-select: none;
}

.wm-letter {
  display: inline-block;
  font-variation-settings: "wght" 700, "wdth" 110;
  will-change: font-variation-settings, opacity;
}

@media (prefers-reduced-motion: no-preference) {
  .js .wordmark:not(.wm-live) .wm-letter {
    animation: wm-in 0.84s var(--ease-out) both;
    animation-delay: calc(var(--i) * 60ms);
  }
}

@keyframes wm-in {
  from {
    opacity: 0;
    transform: translateY(0.16em);
    font-variation-settings: "wght" 300, "wdth" 70;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    font-variation-settings: "wght" 700, "wdth" 110;
  }
}

.hero-title {
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink-strong);
  letter-spacing: 0.01em;
  margin-bottom: 28px;
}

.hero-lead {
  max-width: var(--prose-max);
  font-size: 16px;
  line-height: 1.8;
}

.hero-rotator {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  min-height: 28px;
}

.hero-rotator::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.rotator-word {
  font-weight: 500;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: no-preference) {
  .rotator-word {
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .rotator-word.is-out {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* 下向き矢印 */
.hero-arrow {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  display: block;
  width: 28px;
  height: 44px;
  color: var(--muted);
}

.hero-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 34px;
  background: currentColor;
}

.hero-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 26px;
  width: 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-arrow {
    animation: arrow-bob 2.4s ease-in-out infinite;
  }
}

@keyframes arrow-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ---------- 6. Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal:not(.stagger),
  .js .reveal.stagger > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }

  .js .reveal.in:not(.stagger),
  .js .reveal.in.stagger > * {
    opacity: 1;
    transform: translateY(0);
  }

  .js .reveal.stagger > *:nth-child(2) { transition-delay: 80ms; }
  .js .reveal.stagger > *:nth-child(3) { transition-delay: 160ms; }
  .js .reveal.stagger > *:nth-child(4) { transition-delay: 240ms; }
  .js .reveal.stagger > *:nth-child(5) { transition-delay: 320ms; }
  .js .reveal.stagger > *:nth-child(6) { transition-delay: 400ms; }
  .js .reveal.stagger > *:nth-child(7) { transition-delay: 480ms; }
}

/* ---------- 7. Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.service-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  .service-card:hover {
    transform: translateY(-4px);
  }
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}

.service-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-strong);
  line-height: 1.5;
  margin-bottom: 12px;
}

.service-desc {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink);
}

/* ---------- 8. Track record ---------- */
.track-lead {
  max-width: var(--prose-max);
  margin-bottom: 56px;
}

.track-list {
  border-top: 1px solid var(--line);
}

.track-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
  .track-row {
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    align-items: baseline;
    padding: 26px 0;
  }
}

.track-industry {
  font-weight: 500;
  color: var(--ink-strong);
  line-height: 1.7;
}

.track-scope {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.track-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 28px;
}

.track-confidential {
  font-size: 12px;
  margin-top: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.chip {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  white-space: nowrap;
}

/* ---------- 9. ええとこ。 ---------- */
.section-eetoco {
  background: var(--bg-panel);
}

.eetoco-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 44px 28px;
}

@media (min-width: 768px) {
  .eetoco-card {
    padding: 64px 72px;
  }
  .eetoco-card.has-figure {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
  }
}

.eetoco-figure {
  margin: 32px 0 0;
}

.eetoco-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .eetoco-figure {
    margin: 0;
  }
}

.eetoco-logo {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  color: var(--ink-strong);
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.eetoco-logo .dot {
  color: var(--accent);
}

.eetoco-body {
  max-width: var(--prose-max);
  margin-bottom: 36px;
}

.btn-ghost {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  padding: 12px 32px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.btn-ghost:hover {
  background: var(--accent);
  color: #FFFFFF;
}

/* ---------- 10. Company ---------- */
.company-table {
  border-top: 1px solid var(--line);
  max-width: 880px;
}

.company-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
  .company-row {
    grid-template-columns: 240px 1fr;
    gap: 32px;
    padding: 24px 0;
  }
}

.company-row dt {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.8;
}

.company-row dd {
  color: var(--ink);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.company-row .num {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

/* ---------- 11. Contact ---------- */
.section-contact .prose {
  margin-bottom: 40px;
}

.btn-solid {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
  background: var(--accent);
  border-radius: var(--radius-pill);
  padding: 14px 36px;
  transition: background-color 0.25s ease;
}

.btn-solid:hover {
  background: #234E87;
}

/* ---------- 12. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.footer-brand .mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-strong);
}

.footer-brand .copyright {
  font-size: 12px;
  color: var(--muted);
}

.footer-link {
  font-size: 13px;
  color: var(--ink);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent);
}
