/* ==========================================================================
   麻雀ヘルパー (Mahjong Helper) Landing Page Design System
   Tech Enterprise Modern & Refined Aesthetic (Apple/Linear Style)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Refined & Muted Slate Green */
  --bg-dark: #0a0f0d;
  --bg-surface: #111815;
  --bg-card: rgba(22, 32, 28, 0.6);
  --bg-card-hover: rgba(30, 44, 38, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --accent-green: #34d399;
  --accent-emerald: #10b981;
  --accent-gold: #eab308;
  --accent-gold-muted: rgba(234, 179, 8, 0.15);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;

  /* Typography */
  --font-sans: 'Outfit', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --container-max: 1140px;
  --header-height: 72px;

  /* Shadows & Radius */
  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-window: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --backdrop-blur: blur(20px);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* Subtle Gradient Glow in Center Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 600px;
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.08) 0%, rgba(10, 15, 13, 0) 70%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section Styling */
.section {
  padding: 7rem 0;
  position: relative;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 4rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.section-description {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   3. Header & Navigation (Tech Enterprise Style)
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(10, 15, 13, 0.8);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-subtle);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.logo-mark {
  width: 30px;
  height: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  font-weight: 800;
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.925rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text-main);
  color: #0a0f0d;
}

.btn-primary:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

/* --------------------------------------------------------------------------
   4. Hero Section (Clean & Impactful)
   -------------------------------------------------------------------------- */
.hero {
  padding-top: calc(var(--header-height) + 5rem);
  padding-bottom: 5rem;
  text-align: center;
}

.hero-content {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-pill);
  color: var(--accent-green);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
  font-weight: 400;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

/* App Window Preview (Enterprise Device Window Style) */
.preview-window {
  width: 100%;
  max-width: 800px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  text-align: left;
}

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.preview-title {
  font-size: 0.8rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
}

.preview-body {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}

/* Tile Layout inside Preview */
.tile-grid-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.tile-item {
  width: 26px;
  height: 38px;
  background: #f8fafc;
  border-radius: 4px;
  border-bottom: 3px solid var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tile-item.red { color: #e11d48; }
.tile-item.honor { color: #2563eb; }

.result-panel-preview {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.result-score-main {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.result-breakdown {
  font-size: 0.9rem;
  color: var(--accent-green);
  margin-top: 0.25rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. Features Section (Minimal Modern Grid)
   -------------------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon-svg {
  width: 24px;
  height: 24px;
  color: var(--accent-green);
  margin-bottom: 1.25rem;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.feature-text {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   6. Interactive Score Simulator Section (Clean Panel)
   -------------------------------------------------------------------------- */
.simulator-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.sim-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.sim-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sim-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sim-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.sim-select:focus {
  border-color: var(--accent-green);
}

.sim-result-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.sim-score-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.sim-score-detail {
  font-size: 0.95rem;
  color: var(--accent-green);
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   7. Guide Table (Clean Enterprise Tables)
   -------------------------------------------------------------------------- */
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.guide-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.guide-table th, .guide-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.guide-table th {
  color: var(--text-sub);
  font-weight: 600;
}

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

/* --------------------------------------------------------------------------
   8. FAQ Section
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-question {
  width: 100%;
  padding: 1.15rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-icon-chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
  color: var(--text-sub);
}

.faq-item.active .faq-icon-chevron {
  transform: rotate(180deg);
  color: var(--text-main);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
  max-height: 250px;
  padding: 0 1.5rem 1.25rem 1.5rem;
}

/* --------------------------------------------------------------------------
   9. Footer & CTA Banner
   -------------------------------------------------------------------------- */
.cta-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
}

.cta-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.cta-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  color: var(--text-sub);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col-title {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--text-main);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   10. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-title { font-size: 3rem; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .preview-body { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 2.25rem; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
