/* =========================================================
   Captovia — shared design system (LP + detail pages)
   Tokens, header, footer, browser frame, glass CTA, lang
   switch, feature steps, reveal. Mirrors the LP exactly so
   detail pages never drift from the landing page tone.
   ========================================================= */
:root {
  --bg:        #0b0e13;
  --bg-soft:   #11151c;
  --text:      #f2f2f2;
  --text-dim:  #9aa3ad;
  --text-faint:#5d6671;
  --mint:      #42e8b4;
  --mint-dark: #2fcf9e;
  --on-mint:   #06120d;

  --maxw:      1280px;
  --header-h:  78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN",
               "Yu Gothic", Meiryo, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 56px);
}

/* ---------- Shared buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn-cta {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 52%),
    rgba(66, 232, 180, .20);
  color: #eafff8;
  border: 1px solid rgba(66, 232, 180, .5);
  border-radius: 12px;
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 6px 20px -10px rgba(66, 232, 180, .35);
}
.btn-cta:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 52%),
    rgba(66, 232, 180, .30);
  border-color: rgba(66, 232, 180, .7);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 10px 26px -10px rgba(66, 232, 180, .45);
}
.btn-cta:active { transform: translateY(0); }
.btn-sm { height: 44px; padding: 0 22px; font-size: 15px; }
.btn-lg { padding: 16px 34px; font-size: 17px; }

.btn-outline {
  background: transparent;
  color: var(--mint);
  border: 1px solid rgba(66, 232, 180, .55);
  border-radius: 12px;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn-outline:hover {
  background: rgba(66, 232, 180, .1);
  border-color: var(--mint);
  transform: translateY(-1px);
}
.btn-outline:active { transform: translateY(0); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11, 14, 19, 0);
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}
.site-header.is-scrolled {
  background: rgba(11, 14, 19, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: rgba(255, 255, 255, .07);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo svg { display: block; }
.logo .wordmark {
  color: var(--text);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: .2px;
}

.header-actions { display: flex; align-items: center; gap: 18px; }

.lang-switch {
  display: inline-flex;
  align-items: stretch;
  height: 44px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px;
  padding: 4px;
}
.lang-switch button {
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: none;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.lang-switch button.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, .1);
}
.lang-switch button:not(.is-active):hover { color: var(--text); }

/* ---------- Browser frame (shared mock) ---------- */
.browser {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .04) inset,
    0 40px 80px -36px rgba(0, 0, 0, .85),
    0 12px 28px -18px rgba(0, 0, 0, .7);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 40px;
  padding: 0 14px;
  background: linear-gradient(180deg, #181d25, #141922);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.browser-dots { display: flex; gap: 7px; flex: none; }
.browser-dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a414b; }
.browser-bar .url {
  flex: 1;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .05);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: .3px;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
}
.browser-screen video,
.browser-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* placeholder shown until the real screen image is dropped in */
.browser-screen.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(66,232,180,.05), transparent 60%),
    #05070a;
  color: rgba(242, 242, 242, .26);
  font-size: 13px;
  letter-spacing: 2px;
  text-align: center;
  padding: 20px;
}

/* ---------- Feature steps (shared 3-up list) ---------- */
.feature-steps {
  margin: clamp(28px, 4vw, 40px) 0 0;
  display: flex;
  flex-direction: column;
}
.feature-step {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  margin: 0;
  padding: clamp(16px, 2.4vw, 22px) 0;
}
.feature-step + .feature-step { border-top: 1px solid rgba(255, 255, 255, .07); }
.step-icon { display: block; flex: none; line-height: 0; }
.step-icon svg { display: block; }
.step-num {
  order: -1;
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 700;
  line-height: 1;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
  letter-spacing: .5px;
}
.step-body .name {
  font-size: clamp(16.5px, 1.7vw, 19px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: .2px;
}
.step-body .desc {
  margin: 4px 0 0;
  font-size: clamp(14px, 1.4vw, 15.5px);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-dim);
}

/* ---------- Text link (mint underline + arrow) ---------- */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid rgba(66, 232, 180, .55);
  padding-bottom: 3px;
  transition: gap .15s ease, border-color .15s ease, color .15s ease;
}
.text-link .arrow { color: var(--mint); transition: transform .15s ease; }
.text-link:hover { gap: 12px; color: #fff; border-bottom-color: var(--mint); }
.text-link:hover .arrow { transform: translateX(2px); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding-top: clamp(28px, 4vw, 40px);
  padding-bottom: clamp(28px, 4vw, 40px);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-logo .wordmark { font-size: 17px; }
.footer-meta {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  color: var(--text-faint);
}
.footer-link { color: var(--text-dim); transition: color .15s ease; }
.footer-link:hover { color: var(--text); }

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
      opacity .7s cubic-bezier(.22, .61, .36, 1),
      transform .7s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
  }
  .reveal.in { opacity: 1; transform: none; }

  .feature-steps .feature-step:nth-child(1) { --reveal-delay: .04s; }
  .feature-steps .feature-step:nth-child(2) { --reveal-delay: .18s; }
  .feature-steps .feature-step:nth-child(3) { --reveal-delay: .32s; }
}
