/* ==============================
   Koushirou Works — Global Styles
   ============================== */

:root {
  --color-bg: #ffffff;
  --color-bg-muted: #f5f6f8;
  --color-text: #1a1a1a;
  --color-text-muted: #6b7280;
  --color-primary: #1a2e4a;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e2e8f0;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fcd34d;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  --radius: 8px;
  --max-width: 860px;
  --spacing: clamp(1rem, 4vw, 2rem);
}

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

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

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* ---- Header ---- */
.site-header {
  background: var(--color-primary);
  color: #fff;
  padding: 0 var(--spacing);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 56px;
}

.site-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.site-nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: #fff;
}

/* ---- Hero ---- */
.hero {
  background: var(--color-primary);
  color: #fff;
  padding: 4rem var(--spacing) 3.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: #93c5fd;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.hero-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ---- Sections ---- */
.section {
  padding: 3rem 0;
}

.section--muted {
  background: var(--color-bg-muted);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

/* ---- Cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card--muted {
  background: var(--color-bg-muted);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ---- App Card ---- */
.app-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.app-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-badge--soon {
  background: #f3f4f6;
  color: #6b7280;
}

.app-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.app-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* ---- CTA Button ---- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}

.btn-ghost:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ---- Notice / Warning ---- */
.notice {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.7;
}

.notice strong {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

/* ---- Feature List ---- */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-list li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.feature-title {
  font-weight: 700;
  color: var(--color-primary);
  display: block;
  margin-bottom: 0.15rem;
}

/* ---- Use Cases ---- */
.usecase-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.usecase-list li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.usecase-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* ---- FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.faq-q {
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.faq-a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding: 0.75rem 0;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumb a {
  color: var(--color-accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--color-text-muted);
}

/* ---- Legal / Doc pages ---- */
.doc-header {
  background: var(--color-bg-muted);
  padding: 2.5rem var(--spacing);
  border-bottom: 1px solid var(--color-border);
}

.doc-header h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--color-primary);
}

.doc-header .meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}

.doc-body {
  padding: 2.5rem 0 4rem;
}

.doc-body h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border);
}

.doc-body h2:first-child {
  margin-top: 0;
}

.doc-body p {
  font-size: 0.925rem;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.doc-body ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.doc-body ul li {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.75;
  margin-bottom: 0.25rem;
}

/* ---- Sub-nav (for app pages) ---- */
.sub-nav {
  background: var(--color-bg-muted);
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--spacing);
}

.sub-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sub-nav a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.sub-nav a:hover,
.sub-nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

/* ---- Info Table (legal page) ---- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.info-table th,
.info-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  line-height: 1.7;
  vertical-align: top;
}

.info-table th {
  background: var(--color-bg-muted);
  font-weight: 600;
  color: var(--color-primary);
  width: 35%;
  text-align: left;
}

.info-table td {
  color: var(--color-text);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-primary);
  color: #94a3b8;
  padding: 2.5rem var(--spacing);
  font-size: 0.8rem;
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.footer-legal {
  color: #64748b;
  font-size: 0.775rem;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #fff;
}

/* ---- Support contact box ---- */
.contact-box {
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
}

.contact-box .email {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}

.contact-box .email:hover {
  text-decoration: underline;
}

.contact-box p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .site-header-inner {
    height: auto;
    padding: 0.75rem 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .hero {
    padding: 2.5rem var(--spacing) 2rem;
    text-align: left;
  }

  .info-table th {
    width: 40%;
  }
}
