/* ============================================================
   Answer Rise — Corporate Site
   Design system per renewal proposal (2026-06)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --navy:      #1a1a2e;
  --navy-700:  #20203a;
  --navy-600:  #2a2a4a;
  --navy-500:  #353560;
  --blue:      #4a9eff;
  --blue-700:  #2f86ef;
  --blue-soft: #f0f5ff;
  --gray-bg:   #f5f5f5;
  --ink:       #1a1a2e;
  --ink-60:    rgba(26,26,46,.62);
  --ink-45:    rgba(26,26,46,.45);
  --white:     #ffffff;
  --line:      rgba(26,26,46,.10);
  --line-on-navy: rgba(255,255,255,.12);
  --white-70:  rgba(255,255,255,.70);
  --white-45:  rgba(255,255,255,.45);

  --maxw: 1080px;
  --maxw-narrow: 760px;
  --pad: clamp(20px, 5vw, 40px);
  --sec: clamp(64px, 10vw, 120px);     /* section vertical rhythm */

  --r-card: 8px;
  --r-pill: 20px;

  --ff-jp: "Noto Sans JP", system-ui, sans-serif;
  --ff-en: "Inter", "Noto Sans JP", sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-jp);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.8;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; letter-spacing: .01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.wrap--narrow { max-width: var(--maxw-narrow); }
.section { padding-block: var(--sec); }
.section--navy { background: var(--navy); color: var(--white); }
.section--soft { background: var(--blue-soft); }
.section--gray { background: var(--gray-bg); }

/* ---------- English label / eyebrow ---------- */
.eyebrow {
  font-family: var(--ff-en);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: attr(data-num);
  font-size: 12px;
  color: var(--ink-45);
  letter-spacing: .12em;
}
.section--navy .eyebrow::before { color: var(--white-45); }

/* ---------- Section heading ---------- */
.s-head { margin-bottom: clamp(36px, 6vw, 64px); }
.s-head__en {
  font-family: var(--ff-en);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin-top: 18px;
}
.s-head__jp {
  font-size: clamp(15px, 2.4vw, 18px);
  color: var(--ink-60);
  margin-top: 16px;
  font-weight: 500;
}
.section--navy .s-head__jp { color: var(--white-70); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid transparent;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
  will-change: transform;
}
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: #62adff; }     /* ~10% brighter */
.btn--ghost { background: transparent; color: var(--white); border-color: var(--white-45); }
.btn--ghost:hover { background: rgba(255,255,255,.08); border-color: #fff; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--navy-500); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); }

/* ---------- Image placeholder ---------- */
.ph {
  position: relative;
  overflow: hidden;
  background-color: var(--navy-600);
  background-image:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,.045) 0, rgba(255,255,255,.045) 1px,
      transparent 1px, transparent 12px);
  display: grid;
  place-items: center;
  border-radius: var(--r-card);
  color: var(--white-45);
}
.ph--light {
  background-color: #e7edf6;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(26,26,46,.05) 0, rgba(26,26,46,.05) 1px,
      transparent 1px, transparent 12px);
  color: var(--ink-45);
}
.ph__label {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  letter-spacing: .08em;
  text-align: center;
  padding: 8px 14px;
  border: 1px dashed currentColor;
  border-radius: 4px;
  max-width: 80%;
}

/* ============================================================
   Header
   ============================================================ */
.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.hdr__inner {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 var(--pad);
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: height .35s var(--ease);
}
.hdr.is-stuck { background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.hdr.is-stuck .hdr__inner { height: 68px; }

/* logo (image, swaps white<->color with header state) */
.logo { position: relative; display: inline-flex; align-items: center; }
.logo__img {
  height: 28px; width: auto; display: block;
  transition: opacity .35s var(--ease), height .35s var(--ease);
}
.logo__img--color {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  opacity: 0;
}
.hdr.is-stuck .logo__img { height: 25px; }
.hdr.is-stuck .logo__img--white { opacity: 0; }
.hdr.is-stuck .logo__img--color { opacity: 1; }

/* nav */
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav__list { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); }
.nav__link {
  font-family: var(--ff-en);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .08em;
  color: var(--white-70);
  position: relative;
  padding: 6px 0;
  transition: color .25s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1.5px; background: var(--blue);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: #fff; }
.hdr.is-stuck .nav__link { color: var(--ink-60); }
.hdr.is-stuck .nav__link:hover, .hdr.is-stuck .nav__link.is-active { color: var(--ink); }
.nav__cta { padding: 10px 22px; font-size: 13.5px; }

/* SNS icon links */
.nav__sns { display: flex; align-items: center; gap: 13px; }
.nav__sns a { color: var(--white-70); display: inline-flex; transition: color .2s var(--ease); }
.nav__sns a:hover { color: #fff; }
.nav__sns svg { width: 18px; height: 18px; display: block; }
.hdr.is-stuck .nav__sns a { color: var(--ink-45); }
.hdr.is-stuck .nav__sns a:hover { color: var(--ink); }

/* burger */
.burger {
  display: none;
  width: 44px; height: 44px;
  border: none; background: transparent;
  position: relative;
}
.burger span {
  position: absolute; left: 10px; right: 10px; height: 2px;
  background: #fff; transition: transform .3s var(--ease), opacity .2s, background .35s;
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
.hdr.is-stuck .burger span { background: var(--ink); }
.burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* mobile menu */
.mnav {
  position: fixed; inset: 0; z-index: 99;
  background: var(--navy);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad);
  transform: translateY(-100%);
  transition: transform .45s var(--ease);
  visibility: hidden;
}
.mnav.is-open { transform: translateY(0); visibility: visible; }
.mnav__list { display: flex; flex-direction: column; gap: 4px; }
.mnav__link {
  display: flex; align-items: baseline; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-on-navy);
  color: #fff;
}
.mnav__num { font-family: var(--ff-en); font-size: 12px; color: var(--blue); letter-spacing: .1em; }
.mnav__en { font-family: var(--ff-en); font-weight: 700; font-size: 24px; letter-spacing: .02em; }
.mnav__jp { font-size: 12px; color: var(--white-45); margin-left: auto; }
.mnav__foot { margin-top: 40px; }
.mnav__sns { display: flex; gap: 22px; margin-top: 28px; }
.mnav__sns a { color: #fff; display: inline-flex; opacity: .85; transition: opacity .2s var(--ease); }
.mnav__sns a:hover { opacity: 1; }
.mnav__sns svg { width: 24px; height: 24px; display: block; }

/* ============================================================
   Footer
   ============================================================ */
.ftr { background: var(--navy); color: var(--white-70); padding-block: clamp(56px, 8vw, 90px) 36px; }
.ftr__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.ftr__brand .logo__img { height: 30px; }
.ftr__tag { margin-top: 22px; font-size: 14px; line-height: 1.9; color: var(--white-70); max-width: 30ch; }
.ftr__col h4 {
  font-family: var(--ff-en); font-size: 12px; letter-spacing: .18em;
  color: var(--white-45); text-transform: uppercase; margin-bottom: 18px; font-weight: 700;
}
.ftr__col li { margin-bottom: 12px; }
.ftr__col a { font-size: 14px; color: var(--white-70); transition: color .2s; }
.ftr__col a:hover { color: #fff; }
.ftr__info { font-size: 13px; line-height: 2; color: var(--white-45); font-style: normal; }
.ftr__bottom {
  margin-top: clamp(40px, 6vw, 64px); padding-top: 26px;
  border-top: 1px solid var(--line-on-navy);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.ftr__copy { font-family: var(--ff-en); font-size: 12px; letter-spacing: .06em; color: var(--white-45); }
.ftr__totop {
  font-family: var(--ff-en); font-size: 12px; letter-spacing: .12em;
  color: var(--white-70); display: inline-flex; align-items: center; gap: 8px;
}
.ftr__totop:hover { color: #fff; }

/* footer SNS */
.ftr__sns { display: flex; gap: 16px; margin-top: 24px; }
.ftr__sns a { color: var(--white-70); display: inline-flex; transition: color .2s var(--ease); }
.ftr__sns a:hover { color: #fff; }
.ftr__sns svg { width: 20px; height: 20px; display: block; }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .nav__list, .nav__cta, .nav__sns { display: none; }
  .burger { display: block; }
  .ftr__top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .ftr__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .ftr__top { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
}
