/* ═══════════════════════════════════════════════
   Mr.AI Search — Landing Page Styles
   Palette: Navy brand #2d3646, Blue accent #4a6cf7
   ═══════════════════════════════════════════════ */

:root {
  --navy: #2d3646;
  --navy-light: #3d4a5c;
  --blue: #4a6cf7;
  --blue-hover: #3a5ae5;
  --blue-glow: rgba(74, 108, 247, .15);
  --bg: #f8f9fc;
  --bg-alt: #ffffff;
  --card: #ffffff;
  --card-border: #e8ecf4;
  --text: #1e2432;
  --text-muted: #6b7a8d;
  --text-light: #98a3b3;
  --success: #10b981;
  --surface: #eef1f7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(30,36,50,.06);
  --shadow-md: 0 4px 16px rgba(30,36,50,.08);
  --shadow-lg: 0 8px 32px rgba(30,36,50,.12);
  --transition: .2s ease;
  --max-w: 1120px;
  --max-w-narrow: 780px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--max-w-narrow); }

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(248,249,252,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav.scrolled {
  border-bottom-color: var(--card-border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo img { height: 32px; display: block; }
.nav-links {
  display: flex;
  gap: 28px;
  margin-right: auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-nav {
  padding: 8px 20px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
}
.btn-nav:hover { background: var(--navy-light); }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 12px rgba(74,108,247,.25);
}
.btn-primary:hover {
  background: var(--blue-hover);
  box-shadow: 0 4px 20px rgba(74,108,247,.35);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--card-border);
}
.btn-ghost:hover {
  border-color: var(--navy);
  background: rgba(45,54,70,.04);
}
.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover {
  background: var(--blue-glow);
}
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }

/* ─── HERO ─── */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(180deg, var(--bg) 0%, #eef2fb 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-text h1 {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.02em;
  color: var(--navy);
  margin-bottom: 20px;
}
.nowrap { white-space: nowrap; }
.hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.8;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-note { font-size: 13px; color: var(--text-light); }

/* Widget Mock */
.hero-visual { position: relative; }
.widget-mock {
  width: 340px;
  margin-left: auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.06);
  background: #fff;
  transform: perspective(800px) rotateY(-2deg);
}
.wm-header {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.wm-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
}
.wm-title { flex: 1; }
.wm-close { opacity: .6; font-size: 18px; cursor: default; }
.wm-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.wm-msg p { margin: 0; font-size: 13px; line-height: 1.6; }
.wm-bot p { color: var(--text); }
.wm-user {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
  padding: 8px 14px;
  border-radius: 14px 14px 4px 14px;
  max-width: 80%;
}
.wm-bot {
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 14px 14px 14px 4px;
}
.wm-answer { margin-bottom: 6px !important; }
.wm-table { width: 100%; font-size: 12px; border-collapse: collapse; margin: 6px 0; }
.wm-table td { padding: 3px 8px 3px 0; }
.wm-table td:last-child { text-align: right; color: var(--text-muted); }
.wm-ref { font-size: 11px; color: var(--text-light); margin-top: 4px !important; }
.wm-link { color: var(--blue); }
.wm-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--card-border);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-light);
}
.wm-send {
  background: var(--blue);
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.widget-fab {
  position: absolute;
  bottom: -24px;
  right: 0;
  width: 56px;
  height: 56px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-md);
}

/* ─── TRUST BAR ─── */
.trust-bar {
  background: var(--navy);
  color: rgba(255,255,255,.9);
  padding: 20px 0;
}
.trust-items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  font-size: 14px;
  font-weight: 500;
}
.trust-item { display: flex; align-items: center; gap: 8px; }
.trust-icon { font-size: 18px; }

/* ─── SECTIONS ─── */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 56px; }
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: var(--navy);
  text-wrap: balance;
}

/* ─── PROBLEM ─── */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.problem-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: box-shadow var(--transition);
}
.problem-card:hover { box-shadow: var(--shadow-md); }
.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.problem-icon { font-size: 36px; margin-bottom: 16px; }
.problem-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.problem-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── FEATURES ─── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 80px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row-rev .feature-text { order: 2; }
.feature-text h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
}
.feature-text p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Code blocks */
.code-block {
  background: #1a1e2a;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.code-bar {
  display: flex; gap: 6px; padding: 12px 16px;
  background: rgba(255,255,255,.05);
}
.cd {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.15);
}
.cd:first-child { background: #ff5f57; }
.cd:nth-child(2) { background: #febc2e; }
.cd:last-child { background: #28c840; }
.code-block pre {
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  font-family: 'SF Mono', Menlo, monospace;
}
.code-block code { color: #c9d1d9; }
.ck { color: #79c0ff; }
.ca { color: #7ee787; }
.cs { color: #a5d6ff; }
.cv { color: #ff7b72; }
.cc { color: #6e7681; }

/* Format demo */
.format-demo {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--card-border);
}
.fd-section { margin-bottom: 16px; }
.fd-section:last-child { margin-bottom: 0; }
.fd-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.fd-table { display: flex; flex-direction: column; gap: 4px; }
.fd-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 8px;
  background: var(--card);
  border-radius: 4px;
}
.fd-row-off { color: var(--text-light); }
.fd-text { font-size: 13px; color: var(--text-muted); }

/* ─── HOW IT WORKS ─── */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}
.step {
  flex: 0 0 260px;
  text-align: center;
  padding: 0 20px;
}
.step-num {
  width: 52px; height: 52px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin: 0 auto 18px;
  box-shadow: 0 4px 16px rgba(74,108,247,.2);
}
.step h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.step-arrow {
  flex: 0 0 40px;
  height: 2px;
  background: var(--card-border);
  margin-top: 26px;
  position: relative;
}
.step-arrow::after {
  content: '';
  position: absolute;
  right: -4px; top: -4px;
  border: 5px solid transparent;
  border-left-color: var(--card-border);
}

/* ─── USE CASES ─── */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.usecase-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.usecase-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.uc-icon { font-size: 32px; margin-bottom: 14px; }
.usecase-card .card-img { aspect-ratio: 3/2; }
.usecase-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.usecase-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── PRICING ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.price-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: box-shadow var(--transition);
}
.price-card:hover { box-shadow: var(--shadow-md); }
.price-card-pop {
  border-color: var(--blue);
  border-width: 2px;
  box-shadow: 0 4px 24px rgba(74,108,247,.12);
  transform: scale(1.04);
}
.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
}
.price-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.price-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.price-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 24px;
}
.price-amount span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.price-list { margin-bottom: 28px; }
.price-list li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--surface);
}
.price-list li::before {
  content: '✓ ';
  color: var(--success);
  font-weight: 700;
}
.price-card .btn { width: 100%; }

/* ─── FAQ ─── */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-item summary {
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--text-light);
  transition: transform var(--transition);
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
  padding: 0 24px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ─── CTA SECTION ─── */
.cta-section {
  background: linear-gradient(180deg, var(--bg) 0%, #e8edf8 100%);
}
.cta-section h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
}
.cta-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.8;
}

/* ─── FOOTER ─── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-brand img { height: 28px; filter: brightness(10); }
.footer-company { font-size: 13px; }
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 13px;
}
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; opacity: .5; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-actions { justify-content: center; }
  .hero-visual { display: flex; justify-content: center; }
  .widget-mock { margin-left: 0; transform: none; }
  .widget-fab { right: 20px; }

  .problem-grid,
  .usecase-grid,
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .feature-row-rev .feature-text { order: 0; }

  .steps { flex-direction: column; align-items: center; gap: 24px; }
  .step { flex: none; max-width: 320px; }
  .step-arrow { display: none; }

  .price-card-pop { transform: none; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: rgba(248,249,252,.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--navy);
    border-radius: 1px;
  }
  .btn-nav { display: none; }

  .hero { padding: 96px 0 56px; }
  .hero-text h1 { font-size: 26px; }
  .section { padding: 64px 0; }
  .trust-items { gap: 20px; font-size: 13px; }
  .hide-sp { display: none; }
}
