/* ============================================================
   Xmaker Corporate Site — Global Stylesheet
   Design: Bright / Friendly / Clean
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Design Tokens ── */
:root {
  /* Backgrounds */
  --ink:       #FFFFFF;
  --ink-2:     #F4F7FF;

  /* Text */
  --white:     #FFFFFF;
  --text:      #1E293B;
  --muted:     #94A3B8;

  /* Lines */
  --line:      rgba(30,41,59,0.09);
  --line-lit:  rgba(30,41,59,0.18);

  /* Brand */
  --pink:      #3B82F6;
  --cyan:      #F97316;
  --violet:    #8B5CF6;
  --grad:      linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #F97316 100%);
  --grad-text: linear-gradient(90deg, #3B82F6 0%, #8B5CF6 60%, #F97316 100%);

  /* Type */
  --serif:  'Noto Sans JP', 'Inter', system-ui, sans-serif;
  --sans:   'Inter', 'Noto Sans JP', system-ui, sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.section { padding: 140px 0; }
.section-sm { padding: 100px 0; }

/* ── Type scale ── */
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}
.label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--muted);
  flex-shrink: 0;
}

.heading-xl {
  font-family: var(--serif);
  font-size: clamp(56px, 8vw, 112px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.heading-lg {
  font-family: var(--serif);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.heading-md {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.body-lg {
  font-size: 15px;
  color: rgba(30,41,59,0.65);
  line-height: 1.9;
  font-weight: 300;
}

.body-sm {
  font-size: 13px;
  color: rgba(30,41,59,0.5);
  line-height: 1.8;
  font-weight: 300;
}

/* ── Grad text util ── */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, border-color 0.3s, background 0.3s, color 0.3s;
}

/* shimmer sweep on all buttons */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
  pointer-events: none;
}
.btn:hover::after { transform: translateX(100%); }

.btn:hover { transform: translateY(-4px) scale(1.03); }
.btn:active { transform: translateY(-1px) scale(1.01); transition-duration: 0.1s; }

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--line-lit);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: #3B82F6;
  color: #3B82F6;
  box-shadow: 0 8px 28px rgba(59,130,246,0.18), 0 0 0 3px rgba(59,130,246,0.08);
  background: rgba(59,130,246,0.04);
}

.btn-fill {
  background: var(--text);
  color: var(--white);
  border: 1.5px solid transparent;
}
.btn-fill:hover {
  box-shadow: 0 10px 32px rgba(30,41,59,0.28), 0 0 0 3px rgba(30,41,59,0.08);
  background: #0f172a;
}

.btn-grad {
  background: var(--grad);
  color: var(--white);
  font-weight: 700;
  border: none;
}
.btn-grad:hover {
  box-shadow: 0 10px 36px rgba(59,130,246,0.45), 0 0 0 4px rgba(59,130,246,0.12);
  filter: brightness(1.08);
}

.btn-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}
.btn:hover .btn-icon { transform: translateX(6px); }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 68px;
  display: flex;
  align-items: center;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: var(--line);
  box-shadow: 0 1px 24px rgba(30,41,59,0.06);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  height: 28px;
  width: auto;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(30,41,59,0.5);
  transition: color 0.2s;
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__ext-icon { margin-left: 3px; vertical-align: -1px; opacity: 0.5; display: inline-block; }
.nav__link:hover .nav__ext-icon { opacity: 1; }

.nav__cta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 9px 22px;
  border: 1.5px solid var(--line-lit);
  border-radius: 8px;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.nav__cta:hover {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
  box-shadow: 0 4px 12px rgba(30,41,59,0.15);
}

/* ── Footer ── */
.footer {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  padding: 56px 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 48px;
}

.footer__logo {
  display: flex;
  align-items: center;
}
.footer__logo-img {
  height: 24px;
  width: auto;
}

.footer__nav {
  display: flex;
  gap: 28px;
}
.footer__nav a {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(30,41,59,0.4);
  transition: color 0.2s;
}
.footer__nav a:hover { color: var(--text); }
.footer__ext-icon { margin-left: 3px; vertical-align: -1px; opacity: 0.5; display: inline-block; }
.footer__nav a:hover .footer__ext-icon { opacity: 1; }

.footer__copy {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(30,41,59,0.3);
  white-space: nowrap;
}

/* ── Marquee ── */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  background: var(--ink-2);
}
.marquee__track {
  display: flex;
  gap: 80px;
  animation: marquee 32s linear infinite;
  white-space: nowrap;
}
.marquee__item {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(30,41,59,0.3);
  flex-shrink: 0;
}
.marquee__dot {
  color: var(--violet);
  font-size: 16px;
  line-height: 1;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--line);
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-up {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }

.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }
.d5 { transition-delay: 0.40s; }

/* ── Page header (inner pages) ── */
.page-header {
  padding: 160px 0 100px;
  border-bottom: 1px solid var(--line);
}
.page-header__label { margin-bottom: 32px; }
.page-header__title { margin-bottom: 28px; }
.page-header__desc { max-width: 560px; }

/* ── Noise overlay: hidden for clean bright design ── */
.noise { display: none; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .nav__inner { padding: 0 32px; }
  .footer__inner { gap: 32px; }
  .footer__nav { gap: 20px; }
}

/* Hamburger button — hidden on desktop */
.nav__hamburger {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 310;
}
.nav__hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
  position: absolute;
}
.nav__hamburger-line:nth-child(1) { transform: translateY(-6px); }
.nav__hamburger-line:nth-child(2) { transform: translateY(0); }
.nav__hamburger-line:nth-child(3) { transform: translateY(6px); }
.nav__hamburger.is-open .nav__hamburger-line:nth-child(1) { transform: rotate(45deg); }
.nav__hamburger.is-open .nav__hamburger-line:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open .nav__hamburger-line:nth-child(3) { transform: rotate(-45deg); }

/* Mobile drawer */
.nav__drawer {
  display: none;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav__inner { padding: 0 20px; }
  .section { padding: 96px 0; }
  .nav__menu { display: none; }
  .nav__cta { display: none; }
  .nav__hamburger { display: flex !important; }

  .nav__drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0;
    width: 280px;
    height: 100dvh;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 300;
    padding: 88px 32px 40px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22,0.61,0.36,1);
    border-left: 1px solid var(--line);
    box-shadow: -8px 0 40px rgba(30,41,59,0.08);
  }
  .nav__drawer.is-open {
    transform: translateX(0);
  }
  .nav__drawer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text);
    transition: color 0.2s;
  }
  .nav__drawer-link:first-child { border-top: 1px solid var(--line); }
  .nav__drawer-link:hover { color: var(--text); }
  .nav__drawer-link .nav__ext-icon { opacity: 0.4; }
  .nav__drawer-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 14px 0;
    background: var(--text);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    border-radius: 8px;
    transition: opacity 0.2s;
  }
  .nav__drawer-cta:hover { opacity: 0.85; }

  .nav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(30,41,59,0.2);
    z-index: 290;
  }
  .nav__overlay.is-open { display: block; }

  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .footer__nav { flex-wrap: wrap; gap: 16px 20px; }
}
