:root {
  /* Default (also ?color=gray) */
  --color-primary: #4b5563;
  --color-primary-dark: #1f2937;
  --color-accent: #9ca3af;
  --color-mid: #6b7280;
  --color-text: #1b2533;
  --color-muted: #5d6b7d;
  --color-border: #e2e4e8;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f6f7;
  --color-footer: #111827;
  --color-on-primary: #fff;
  --color-hero-start: var(--color-primary-dark);
  --font-en: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --header-height: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Color variations for review (?color=blue etc.) */
:root[data-color="blue"] {
  --color-primary: #0a4fa8;
  --color-primary-dark: #062f66;
  --color-accent: #1fb6e0;
  --color-mid: #1c8fd6;
  --color-border: #dde4ee;
  --color-bg-alt: #f3f7fc;
  --color-footer: #0b1626;
}

:root[data-color="green"] {
  --color-primary: #0b7a75;
  --color-primary-dark: #075450;
  --color-accent: #2ec4b6;
  --color-mid: #0f9a8f;
  --color-border: #dde9e7;
  --color-bg-alt: #f2f8f7;
  --color-footer: #0f1f1d;
}

:root[data-color="orange"] {
  --color-primary: #d9601a;
  --color-primary-dark: #8a3608;
  --color-accent: #f5a524;
  --color-mid: #ec7f1f;
  --color-border: #efe3d8;
  --color-bg-alt: #fdf6f0;
  --color-footer: #22150d;
}

:root[data-color="purple"] {
  --color-primary: #5b3cc4;
  --color-primary-dark: #33207a;
  --color-accent: #a78bfa;
  --color-mid: #7c5ce0;
  --color-border: #e4def5;
  --color-bg-alt: #f6f4fd;
  --color-footer: #15112a;
}

:root[data-color="red"] {
  --color-primary: #c8102e;
  --color-primary-dark: #7a0a1c;
  --color-accent: #f0506e;
  --color-mid: #e02a45;
  --color-border: #f0dfe2;
  --color-bg-alt: #fdf4f5;
  --color-footer: #1f0a0e;
}

:root[data-color="black"] {
  --color-primary: #1a1a1a;
  --color-primary-dark: #000000;
  --color-accent: #8a8a8a;
  --color-mid: #333333;
  --color-border: #e5e5e5;
  --color-bg-alt: #f5f5f5;
  --color-footer: #0a0a0a;
}

/* Yellow is too light for white text, so text on colored areas turns dark */
:root[data-color="yellow"] {
  --color-primary: #c99a00;
  --color-primary-dark: #3a2f00;
  --color-accent: #e0b000;
  --color-mid: #ffd84a;
  --color-border: #efe7c8;
  --color-bg-alt: #fdf9ea;
  --color-footer: #1f1a00;
  --color-on-primary: #1f1a00;
  --color-hero-start: #f5c400;
}

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

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

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.9;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

.arrow {
  display: inline-block;
  margin-left: 12px;
  transition: transform 0.3s var(--ease);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 24px rgba(10, 40, 90, 0.06);
}

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

.logo {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-primary-dark);
  text-decoration: none;
}

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

.nav a {
  position: relative;
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}

.nav a:not(.nav-cta):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  padding: 8px 22px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-on-primary) !important;
  transition: background 0.3s;
}

.nav-cta:hover {
  background: var(--color-primary-dark);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  padding: 120px 0;
  color: var(--color-on-primary);
  background: linear-gradient(120deg, var(--color-hero-start) 0%, var(--color-primary) 45%, var(--color-mid) 75%, var(--color-accent) 100%);
  background-size: 200% 200%;
  animation: gradient-flow 16s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 48px 48px;
  pointer-events: none;
}

@keyframes gradient-flow {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.hero-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--color-on-primary);
  stroke-opacity: 0.35;
  stroke-width: 1;
}

.hero-lines path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw-line 3.2s var(--ease) forwards;
}

.hero-lines path:nth-child(2) { animation-delay: 0.3s; }
.hero-lines path:nth-child(3) { animation-delay: 0.6s; }
.hero-lines path:nth-child(4) { animation-delay: 0.9s; }

.hero-lines circle {
  fill: var(--color-on-primary);
  fill-opacity: 0.8;
  stroke: none;
  opacity: 0;
  animation: fade-in 0.8s ease forwards 2s;
}

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

@keyframes fade-in {
  to { opacity: 1; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-inner > * {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-in 1s var(--ease) forwards;
}

.hero-inner > :nth-child(2) { animation-delay: 0.15s; }
.hero-inner > :nth-child(3) { animation-delay: 0.3s; }
.hero-inner > :nth-child(4) { animation-delay: 0.45s; }

@keyframes hero-in {
  to { opacity: 1; transform: none; }
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
}

.hero-title {
  margin: 0 0 28px;
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.06em;
}

.hero-lead {
  margin: 0 0 48px;
  font-size: 1.05rem;
  opacity: 0.9;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 16px 40px;
  border-radius: 999px;
  background: #fff;
  color: var(--color-primary-dark);
  font-weight: 700;
  text-decoration: none;
  transition: box-shadow 0.3s, transform 0.3s var(--ease);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 20, 60, 0.25);
}

.button:hover .arrow,
.mail:hover .arrow {
  transform: translateX(6px);
}

.scroll-down {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding-bottom: 56px;
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-on-primary);
  opacity: 0.8;
  text-decoration: none;
}

.scroll-down::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 48px;
  background: var(--color-on-primary);
  transform-origin: top;
  animation: scroll-line 2s var(--ease) infinite;
}

@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Sections */
.section {
  padding: 120px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  margin: 0 0 56px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-muted);
}

.section-title .en {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-en);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--color-primary-dark);
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 20px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.note {
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Reveal on scroll (only when JS is available) */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.cards .reveal:nth-child(2),
.numbers-inner .reveal:nth-child(2) { transition-delay: 0.12s; }
.cards .reveal:nth-child(3),
.numbers-inner .reveal:nth-child(3) { transition-delay: 0.24s; }

/* Business */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  position: relative;
  padding: 40px 32px 36px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.card:hover {
  border-color: transparent;
  box-shadow: 0 20px 48px rgba(10, 40, 90, 0.1);
}

.card.is-visible:hover {
  transform: translateY(-6px);
}

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

.card-num {
  position: absolute;
  top: 28px;
  right: 28px;
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* Numbers */
.numbers {
  padding: 72px 0;
  border-top: 1px solid var(--color-border);
}

.numbers-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.number {
  padding: 8px 24px;
  text-align: center;
}

.number + .number {
  border-left: 1px solid var(--color-border);
}

.number p {
  margin: 0;
}

.number-label {
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.number-value {
  font-family: var(--font-en);
  font-size: clamp(2.4rem, 5vw, 3.25rem);
  font-weight: 300;
  line-height: 1.3;
  color: var(--color-primary-dark);
}

.number-value small {
  margin-left: 4px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1rem;
  font-weight: 500;
}

.number-caption {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* News */
.news {
  margin: 0;
  border-top: 1px solid var(--color-border);
}

.news div {
  display: flex;
  gap: 40px;
  padding: 24px 8px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s;
}

.news div:hover {
  background: rgba(255, 255, 255, 0.7);
}

.news dt {
  flex-shrink: 0;
  font-family: var(--font-en);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

.news dd {
  margin: 0;
}

/* Definition table */
.table {
  margin: 0;
  border-top: 1px solid var(--color-primary-dark);
}

.table div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 22px 8px;
  border-bottom: 1px solid var(--color-border);
}

.table dt {
  font-weight: 700;
  color: var(--color-primary-dark);
}

.table dd {
  margin: 0;
}

/* Company */
.company {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: start;
}

.company .table div {
  grid-template-columns: 120px 1fr;
}

.map {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.4);
}

/* Contact */
.contact {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: var(--color-on-primary);
  background: linear-gradient(120deg, var(--color-hero-start), var(--color-primary) 60%, var(--color-mid));
}

.contact .container {
  position: relative;
}

.contact .section-title {
  color: inherit;
}

.contact .section-title .en {
  color: inherit;
}

.contact .section-title::after {
  margin-left: auto;
  margin-right: auto;
  background: var(--color-accent);
}

.contact .note {
  color: inherit;
  opacity: 0.75;
}

.mail {
  display: inline-flex;
  align-items: center;
  margin-top: 24px;
  padding: 20px 48px;
  border-radius: 999px;
  background: #fff;
  color: var(--color-primary-dark);
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: box-shadow 0.3s, transform 0.3s var(--ease);
}

.mail.is-visible:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 20, 60, 0.3);
}

/* Privacy */
#privacy {
  padding: 48px 0;
}

.privacy summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
}

.privacy-body {
  margin-top: 24px;
  font-size: 0.875rem;
}

.privacy-body h3 {
  margin: 24px 0 8px;
  font-size: 0.95rem;
}

.privacy-body p {
  margin: 0;
}

/* Footer */
.site-footer {
  padding: 56px 0 40px;
  background: var(--color-footer);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.site-footer p {
  margin: 0;
}

.footer-name {
  margin-bottom: 12px !important;
  font-family: var(--font-en);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
}

.copyright {
  font-family: var(--font-en);
  letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 860px) {
  .nav {
    gap: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  .cards,
  .company {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 104px;
  }

  .container {
    padding: 0 16px;
  }

  .site-header {
    height: auto;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav {
    width: 100%;
  }

  .nav-cta {
    padding: 4px 16px;
  }

  .hero {
    min-height: 0;
    padding: 96px 0 140px;
  }

  .section {
    padding: 80px 0;
  }

  .numbers-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .number + .number {
    border-left: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 32px;
  }

  .table div,
  .company .table div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .news div {
    flex-direction: column;
    gap: 4px;
  }

  .mail {
    padding: 16px 28px;
    font-size: 1rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
