/* =============================================
   VIVATS v2 — Shared Stylesheet
   ============================================= */

:root {
  --red:        #b11920;
  --red-dark:   #8e1118;
  --red-muted:  rgba(177,25,32,0.08);
  --ink:        #1a1a1a;
  --ink-sub:    #555;
  --ink-light:  #888;
  --bg:         #ffffff;
  --bg-off:     #f8f8f6;
  --border:     #e8e8e8;
  --max:        900px;
  --serif:      'Noto Serif JP', serif;
  --sans:       'Noto Sans JP', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: 64px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---- Header ---- */
.site-header {
  position: fixed; top:0; left:0; right:0; z-index:100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}
.site-header .wrap {
  display: flex; justify-content: space-between;
  align-items: center; height: 100%;
}
.header-logo img { height: 36px; }
.header-nav { display: flex; gap: 8px; align-items: center; }

/* Sub-nav (secondary pages) */
.sub-nav {
  background: var(--bg-off);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.sub-nav .wrap {
  display: flex; gap: 0; height: 44px; align-items: stretch;
}
.sub-nav a {
  display: flex; align-items: center; padding: 0 18px;
  color: var(--ink-sub); font-weight: 500;
  border-right: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.sub-nav a:first-child { border-left: 1px solid var(--border); }
.sub-nav a:hover { color: var(--red); background: var(--bg); }
.sub-nav a.active { color: var(--red); font-weight: 700; background: var(--bg); }

/* ---- Buttons ---- */
.btn-demo {
  background: var(--red); color: #fff;
  padding: 9px 20px; border-radius: 4px;
  font-size: 0.85rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.2s;
}
.btn-demo:hover { background: var(--red-dark); }
.btn-doc {
  color: var(--ink-sub); padding: 9px 16px;
  border-radius: 4px; font-size: 0.85rem; font-weight: 500;
  border: 1px solid var(--border); transition: border-color 0.2s;
}
.btn-doc:hover { border-color: var(--ink-sub); }

.cta-primary {
  background: var(--red); color: #fff;
  padding: 14px 28px; border-radius: 4px;
  font-size: 0.95rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.2s, transform 0.15s;
}
.cta-primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.cta-secondary {
  color: var(--ink-sub); padding: 14px 20px;
  border-radius: 4px; font-size: 0.9rem; font-weight: 500;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color 0.2s;
}
.cta-secondary:hover { border-color: var(--ink-sub); }

/* ---- Typography ---- */
.page-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero .eyebrow {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; color: rgba(255,255,255,0.5);
  text-transform: uppercase; margin-bottom: 16px;
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900; line-height: 1.3;
  color: #fff; margin-bottom: 16px;
}
.page-hero p {
  font-size: 1rem; color: rgba(255,255,255,0.7);
  line-height: 1.9; max-width: 560px;
}

.section-label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; color: var(--red);
  text-transform: uppercase; margin-bottom: 12px;
}
.section-heading {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900; line-height: 1.3;
  color: var(--ink); margin-bottom: 24px;
}
.section-body {
  font-size: 0.95rem; color: var(--ink-sub);
  line-height: 2; max-width: 600px;
}

section { padding: 80px 0; }
section:nth-of-type(even) { background: var(--bg-off); }

/* ---- Hero with background image ---- */
.hero-visual {
  position: relative;
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-visual::before {
  content: '';
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  pointer-events: none;
}
.hero-visual .wrap { position: relative; z-index: 1; }

/* ---- Screenshot block ---- */
.screenshot {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-off);
  margin: 32px 0;
}
.screenshot img {
  width: 100%;
  height: auto;
  display: block;
}
.screenshot-caption {
  padding: 10px 16px;
  font-size: 0.75rem;
  color: var(--ink-light);
  border-top: 1px solid var(--border);
}

/* ---- Bottom CTA band ---- */
.cta-band {
  background: var(--ink); color: #fff;
  padding: 72px 0; text-align: center;
}
.cta-band h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900; margin-bottom: 12px;
}
.cta-band p {
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem; margin-bottom: 36px;
  line-height: 1.8;
}
.cta-band .cta-primary {
  background: var(--red); font-size: 1rem; padding: 16px 36px;
}
.cta-band .cta-secondary {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
}
.cta-band .cta-secondary:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
.cta-band-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Footer ---- */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,0.4);
  padding: 40px 0; font-size: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.site-footer .wrap {
  display: flex; justify-content: space-between;
  align-items: flex-end; gap: 20px; flex-wrap: wrap;
}
.footer-logo img {
  height: 26px; filter: brightness(0) invert(1);
  opacity: 0.4; margin-bottom: 10px;
}
.footer-nav {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.footer-nav a {
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem; font-weight: 500;
  transition: color 0.2s;
}
.footer-nav a:hover { color: #fff; }
.footer-info { line-height: 1.9; }
.footer-copy { color: rgba(255,255,255,0.2); }

/* ---- Floating CTA ---- */
.floating {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.floating.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.floating a {
  background: var(--red); color: #fff;
  padding: 13px 22px; border-radius: 4px;
  font-size: 0.88rem; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(177,25,32,0.35);
  transition: background 0.2s;
}
.floating a:hover { background: var(--red-dark); }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---- Mobile ---- */
@media (max-width: 680px) {
  body { padding-top: 56px; }
  .site-header { height: 56px; }
  .header-logo img { height: 28px; }
  .header-nav .btn-doc { display: none; }
  .btn-doc { display: none; }
  section { padding: 56px 0; }
  .cta-band { padding: 56px 0; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .sub-nav .wrap { overflow-x: auto; gap: 0; }
  .sub-nav a { white-space: nowrap; padding: 0 14px; }
}

/* ---- Image Modal ---- */
.screenshot img, .feature-visual img, .sol-card .screenshot img {
  cursor: zoom-in;
}
.img-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  cursor: zoom-out;
}
.img-modal.open {
  opacity: 1; pointer-events: auto;
}
.img-modal img {
  max-width: 92vw; max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}
.img-modal.open img {
  transform: scale(1);
}
.img-modal-close {
  position: absolute; top: 20px; right: 24px;
  color: rgba(255,255,255,0.7); font-size: 2rem;
  cursor: pointer; line-height: 1;
  transition: color 0.2s;
}
.img-modal-close:hover { color: #fff; }
