/* ============================================
   株式会社ベリーナーゼ 公式サイト
   共通スタイルシート
   作成日: 2026-04-07
   ============================================ */

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #131a2e;
  --bg-card: #1a2238;
  --text-primary: #e8ecf4;
  --text-secondary: #94a0b8;
  --text-muted: #5a6485;
  --accent: #6ee7ff;
  --accent-dim: #4a8aa0;
  --border: #2a3454;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --max-width: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

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

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: .02em;
}
.logo span { color: var(--accent); }

.nav { display: flex; gap: 24px; }
.nav a { color: var(--text-secondary); font-size: 14px; }
.nav a:hover { color: var(--accent); opacity: 1; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  padding: 120px 24px 80px;
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 24px;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
}

.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(110, 231, 255, 0.3); opacity: 1; }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

/* ===== Section ===== */
.section {
  padding: 80px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.section-lead {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 56px;
  font-size: 15px;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-dim); }

.card-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-text h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--accent);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 15px;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  margin-top: 80px;
  background: var(--bg-secondary);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-inner small {
  color: var(--text-muted);
  font-size: 12px;
}

/* ===== Chat (Clone) ===== */
.chat-wrap {
  max-width: 720px;
  margin: 100px auto 40px;
  padding: 0 24px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.chat-meta h2 {
  font-size: 18px;
  margin-bottom: 2px;
}

.chat-meta .status {
  font-size: 12px;
  color: var(--accent);
}
.chat-meta .status::before {
  content: "● ";
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.chat-log {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.msg-bot {
  background: var(--bg-card);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-user {
  background: var(--accent);
  color: var(--bg-primary);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg-typing {
  background: var(--bg-card);
  border: 1px solid var(--border);
  align-self: flex-start;
  color: var(--text-muted);
  font-style: italic;
}

.chat-input-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.chat-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.chat-input:focus { border-color: var(--accent); }

.chat-disclaimer {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ===== Portfolio ===== */
.portfolio-hero {
  padding: 100px 24px 40px;
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.portfolio-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  gap: 20px;
}

.work-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.work-item h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.work-item .tag {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  background: rgba(110, 231, 255, 0.1);
  padding: 2px 10px;
  border-radius: 20px;
  margin-right: 6px;
  margin-bottom: 12px;
}

.work-item p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

.work-item .role {
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 16px;
  }
  .nav-toggle { display: block; }

  .hero { padding: 80px 24px 60px; }
  .section { padding: 60px 24px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .chat-log { height: 60vh; }
  .chat-wrap { margin-top: 80px; }
}
