:root {
  --primary: #0F56B3;
  --primary-dark: #0A3D82;
  --primary-soft: #EAF2FF;
  --emerald: #0E8A5F;
  --emerald-soft: #E6F6F0;
  --amber: #D97706;
  --amber-soft: #FEF3C7;
  --paper: #F6F9FC;
  --surface: #FFFFFF;
  --text: #142134;
  --muted: #4B5B73;
  --border: #DCE5F2;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--paper);
  padding-top: var(--header-h);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header (Uncluttered on mobile, icon buttons with tooltips) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: 32px;
  height: 32px;
}

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

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary);
  text-decoration: none;
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

/* Hero Section */
.hero {
  padding: 40px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 32px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-sub {
  margin: 0 0 24px;
  font-size: 16px;
  color: var(--muted);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  border-radius: 14px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 86, 179, 0.22);
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-emerald {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--emerald);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(14, 138, 95, 0.2);
}

.btn-emerald:hover {
  background: #0B6E4B;
  text-decoration: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

.hero-note {
  font-size: 13px;
  color: var(--muted);
}

/* Visual Catch Card */
.visual-catch-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 86, 179, 0.08);
}

.visual-catch-img-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--primary-soft);
}

.visual-catch-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.visual-overlay-pill {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.visual-catch-body {
  padding: 18px;
}

.visual-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric-box {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.metric-box strong {
  display: block;
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
}

.metric-box span {
  font-size: 12px;
  color: var(--muted);
}

/* Interactive Receipt OCR Demo */
.demo-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(15, 86, 179, 0.06);
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip-btn {
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.chip-btn:hover {
  background: var(--primary-soft);
}

.ocr-textarea {
  width: 100%;
  min-height: 220px;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px; /* Strictly >= 16px to prevent iOS Safari zoom */
  line-height: 1.5;
  resize: vertical;
}

.parsed-panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.parsed-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.parsed-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.parsed-row span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.parsed-row strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

/* Sections */
.section {
  padding: 44px 0;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--text);
}

.section-header p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 700px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.tag-blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.tag-emerald {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.tag-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

/* Recommendations / Circulation Cards */
.rec-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.rec-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  text-decoration: none;
}

.rec-link {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Legal / Doc Pages */
.doc-page {
  padding: 36px 0 64px;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  max-width: 820px;
  margin: 0 auto;
}

.doc-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  color: var(--text);
}

.doc-card h2 {
  margin: 24px 0 8px;
  font-size: 18px;
  color: var(--primary);
}

.doc-card p, .doc-card li {
  font-size: 15px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 32px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Mobile Responsive */
@media (max-width: 840px) {
  .hero-grid, .demo-grid, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .header-nav {
    display: none;
  }
  .hero {
    padding: 24px 0 32px;
  }
  .btn-primary, .btn-emerald {
    width: 100%;
  }
}
