/* THE STAR CHART TABLE / 星図の帳場 — PizzaVessel Galaxy */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@500&family=IBM+Plex+Sans+JP:wght@400;600&family=Shippori+Mincho+B1:wght@600&display=swap');

:root {
  --porcelain: #FAFAF7;
  --haze: #EBEEF2;
  --sumi: #11151C;
  --lapis: #1F49C7;
  --vermillion: #E4572E;
  --warm-gray: #7C7F86;
  --font-heading: 'Shippori Mincho B1', 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-body: 'IBM Plex Sans JP', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  --font-mono: 'DM Mono', 'Consolas', monospace;
  --max-width: 1140px;
  --section-pad: clamp(4rem, 8vw, 8.75rem);
  --hairline: 1px solid rgba(17, 21, 28, 0.12);
  --shadow-soft: 0 4px 24px rgba(17, 21, 28, 0.06);
  --shadow-plate: 0 8px 32px rgba(17, 21, 28, 0.08);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.02em;
  line-break: strict;
  overflow-wrap: normal;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: currentColor; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: opacity 0.2s; }
a:hover { opacity: 0.75; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* Surfaces */
.surface-porcelain { background: var(--porcelain); color: var(--sumi); }
.surface-sumi { background: var(--sumi); color: var(--porcelain); }
.surface-haze { background: var(--haze); color: var(--sumi); }
.surface-lapis { background: var(--lapis); color: var(--porcelain); }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.375rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); margin-bottom: 1rem; }
h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.0625rem; color: rgba(17, 21, 28, 0.78); max-width: 40em; }
.surface-sumi .lead { color: rgba(250, 250, 247, 0.82); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lapis);
}

.mono, .metric, .trust-bar {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.text-lapis { color: var(--lapis); }
.text-vermillion { color: var(--vermillion); }
.text-warm { color: var(--warm-gray); }

.section { padding: var(--section-pad) 0; }
.section-header { margin-bottom: 2.5rem; }
.section-header .eyebrow { margin-bottom: 0.75rem; display: block; }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transition: background 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  background: var(--sumi);
  color: var(--porcelain);
  box-shadow: var(--shadow-soft);
}

.site-header.is-scrolled .logo-main,
.site-header.is-scrolled .main-nav a { color: var(--porcelain); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo { text-decoration: none; }
.logo-main {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sumi);
  display: block;
}
.logo-sub {
  font-size: 0.6875rem;
  color: var(--warm-gray);
  letter-spacing: 0.06em;
  display: block;
  margin-top: 0.125rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid currentColor;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: inherit;
  border-radius: 2px;
}

.main-nav ul { display: flex; gap: 1.5rem; list-style: none; }
.main-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--sumi);
}
.main-nav a.is-active { color: var(--lapis); }
.site-header.is-scrolled .main-nav a.is-active { color: var(--porcelain); opacity: 1; text-decoration: underline; }

/* Hero — THE STAR CHART */
.hero-chart {
  min-height: 94vh;
  padding-top: 5rem;
  padding-bottom: 3rem;
  background: var(--porcelain);
  background-image:
    linear-gradient(rgba(31, 73, 199, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 73, 199, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--sumi);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-topbar .eyebrow { color: var(--sumi); letter-spacing: 0.12em; }
.hero-topbar .location { font-size: 0.8125rem; color: var(--warm-gray); }

.hero-chart h1 { max-width: 14em; margin-bottom: 1.25rem; }
.hero-chart h1 .highlight {
  color: var(--lapis);
  position: relative;
}
.hero-chart h1 .highlight::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.05em;
  width: 100%;
  height: 2px;
  background: var(--lapis);
  opacity: 0.4;
}

.process-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(31, 73, 199, 0.2);
}

.process-strip span {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--lapis);
  letter-spacing: 0.08em;
}
.process-strip span::before { content: '◆ '; font-size: 0.5rem; vertical-align: middle; }

.hero-lead { max-width: 36em; margin-bottom: 2rem; font-size: 1rem; color: rgba(17, 21, 28, 0.82); }

.hero-plate {
  position: relative;
  margin: 2rem 0;
  border: 1px solid var(--sumi);
  box-shadow: var(--shadow-plate);
  overflow: hidden;
}
.hero-plate::before,
.hero-plate::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--lapis);
  z-index: 2;
}
.hero-plate::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.hero-plate::after { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.hero-plate img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }

.trust-bar {
  font-size: 0.75rem;
  color: var(--warm-gray);
  letter-spacing: 0.04em;
  padding-top: 1rem;
  border-top: var(--hairline);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.2s, filter 0.2s;
  line-height: 1.4;
}
.btn:hover { opacity: 1; filter: brightness(1.05); box-shadow: var(--shadow-soft); }
.btn-primary { background: var(--lapis); color: var(--porcelain); border-color: var(--lapis); }
.btn-outline { background: transparent; color: var(--sumi); border-color: var(--sumi); }
.surface-sumi .btn-outline { color: var(--porcelain); border-color: var(--porcelain); }

/* Horizontal strip */
.strip-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.strip-card {
  padding: 1.75rem;
  background: var(--haze);
  border: 1px solid rgba(17, 21, 28, 0.06);
}
.strip-card h3 { font-family: var(--font-body); font-weight: 600; font-size: 1rem; }
.strip-card p { font-size: 0.9375rem; margin-bottom: 0; color: rgba(17, 21, 28, 0.78); }

/* Process band */
.process-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgba(17, 21, 28, 0.1);
  margin: 2rem 0;
}
.process-step {
  padding: 1.5rem 1.25rem;
  border-right: 1px solid rgba(17, 21, 28, 0.08);
  text-align: center;
}
.process-step:last-child { border-right: none; }
.process-step .step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--lapis);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}
.process-step h3 { font-size: 1.0625rem; margin-bottom: 0.375rem; }
.process-step p { font-size: 0.875rem; color: var(--warm-gray); margin: 0; }

/* 2x3 tile grid */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tile {
  padding: 1.75rem;
  background: var(--porcelain);
  border: 1px solid rgba(17, 21, 28, 0.08);
  position: relative;
}
.tile-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--lapis);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  display: block;
}
.tile h3 { font-size: 1.0625rem; margin-bottom: 0.625rem; }
.tile p { font-size: 0.9375rem; color: rgba(17, 21, 28, 0.78); margin: 0; }

/* Ring diagram */
.ring-block {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem;
  border: 1px solid rgba(17, 21, 28, 0.1);
  background: var(--porcelain);
}
.ring-diagram {
  width: 160px;
  height: 160px;
  margin: 0 auto;
}
.ring-legend { list-style: none; }
.ring-legend li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: var(--hairline);
  font-size: 0.9375rem;
}
.ring-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Cards & cases */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.case-card {
  padding: 1.75rem;
  border: 1px solid rgba(17, 21, 28, 0.08);
  background: var(--porcelain);
}
.case-card .tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--vermillion);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: block;
}

/* Image blocks */
.img-plate {
  border: 1px solid var(--sumi);
  box-shadow: var(--shadow-soft);
  margin: 1.5rem 0;
  position: relative;
}
.img-plate img { width: 100%; object-fit: cover; }

.img-plate--compact img {
  aspect-ratio: 21 / 9;
  max-height: 240px;
}

.service-block .img-plate,
.case-card .img-plate {
  margin: 0 0 1.25rem;
}

.service-block .img-plate img,
.case-card .img-plate img {
  aspect-ratio: 16 / 6;
  max-height: 180px;
}

.img-caption {
  font-size: 0.8125rem;
  color: var(--warm-gray);
  margin-top: 0.5rem;
  padding-left: 0.25rem;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }

/* FAQ */
.faq-list { list-style: none; }
.faq-item { border-bottom: var(--hairline); padding: 1.5rem 0; }
.faq-item:first-child { border-top: var(--hairline); }
.faq-q {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.faq-a { font-size: 0.9375rem; color: rgba(17, 21, 28, 0.85); }
.faq-a p { margin-bottom: 0.75rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.375rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid rgba(17, 21, 28, 0.2);
  background: var(--porcelain);
  color: var(--sumi);
  border-radius: 2px;
  line-height: 1.5;
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--lapis);
  outline-offset: 1px;
}
.form-group input.error,
.form-group textarea.error { border-color: var(--vermillion); }
.form-check { display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.875rem; }
.form-check input { width: auto; margin-top: 0.25rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Disclaimer box */
.disclaimer-box {
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--lapis);
  background: rgba(31, 73, 199, 0.04);
  font-size: 0.875rem;
  color: rgba(17, 21, 28, 0.82);
  margin: 2rem 0;
}

/* Legal prose */
.legal-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.25rem; }
.legal-content h3 { margin-top: 1.5rem; margin-bottom: 0.75rem; font-size: 1.0625rem; font-family: var(--font-body); font-weight: 600; }
.legal-content ul, .legal-content ol { margin: 0 0 1rem 1.5rem; }
.legal-content li { margin-bottom: 0.5rem; }

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  font-size: 0.8125rem;
  line-height: 1.85;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 0.375rem; }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(250, 250, 247, 0.15);
  color: rgba(250, 250, 247, 0.65);
  font-size: 0.75rem;
}
.footer-disclaimer { margin-top: 1rem; font-size: 0.75rem; color: rgba(250, 250, 247, 0.6); }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--sumi);
  color: var(--porcelain);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-text { flex: 1; min-width: 240px; font-size: 0.8125rem; line-height: 1.7; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.cookie-actions .btn { padding: 0.625rem 1.25rem; font-size: 0.8125rem; }
.btn-cookie-accept { background: var(--lapis); color: var(--porcelain); border: none; }
.btn-cookie-decline { background: transparent; color: var(--porcelain); border: 1px solid rgba(250, 250, 247, 0.4); }
.btn-cookie-settings { background: transparent; color: var(--porcelain); border: 1px solid rgba(250, 250, 247, 0.25); }

.cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(17, 21, 28, 0.6);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.cookie-modal.is-open { display: flex; }
.cookie-modal-panel {
  background: var(--porcelain);
  color: var(--sumi);
  max-width: 480px;
  width: 100%;
  padding: 2rem;
  border-radius: 2px;
  max-height: 90vh;
  overflow-y: auto;
}
.cookie-option { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: var(--hairline); }
.cookie-option label { font-size: 0.875rem; }

/* Page hero (inner pages) */
.page-hero {
  padding: 7rem 0 3rem;
  border-bottom: 1px solid rgba(17, 21, 28, 0.08);
}
.page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }

/* 404 */
.error-page { min-height: 70vh; display: flex; align-items: center; text-align: center; }
.error-page h1 { margin-bottom: 1rem; }
.error-links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2rem; }

/* Reveal animation */
.js .reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(16px);
}

/* Service detail */
.service-block {
  padding: 2.5rem 0;
  border-bottom: var(--hairline);
}
.service-block:last-child { border-bottom: none; }
.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1rem 0;
  font-size: 0.875rem;
}
.service-meta span { font-family: var(--font-mono); color: var(--warm-gray); }
.not-doing {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(228, 87, 46, 0.06);
  border-left: 2px solid var(--vermillion);
  font-size: 0.875rem;
}

/* Thanks page */
.thanks-box { text-align: center; padding: 4rem 0; max-width: 36em; margin: 0 auto; }

/* Responsive */
@media (max-width: 900px) {
  .strip-row, .tile-grid, .card-grid, .split, .footer-grid, .ring-block { grid-template-columns: 1fr; }
  .process-band { grid-template-columns: repeat(2, 1fr); }
  .process-step:nth-child(2) { border-right: none; }
  .process-step:nth-child(1), .process-step:nth-child(2) { border-bottom: 1px solid rgba(17, 21, 28, 0.08); }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sumi);
    color: var(--porcelain);
    padding: 1rem 1.5rem;
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.75rem; }
  .main-nav a { color: var(--porcelain); }
  .hero-chart { min-height: auto; padding-top: 4.5rem; }
  .process-band { grid-template-columns: 1fr; }
  .process-step { border-right: none; border-bottom: 1px solid rgba(17, 21, 28, 0.08); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal:not(.is-visible) {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .cookie-banner { transition: none; }
}
