/* ============================================
   VTT Generator - Website Stylesheet
   Version: 1.0
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: #333333;
  background-color: #ffffff;
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: #4263eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #3b5bdb;
}

a:focus-visible {
  outline: 2px solid #4263eb;
  outline-offset: 2px;
  border-radius: 2px;
}

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.4;
  color: #333333;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #e0e0e0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo a {
  font-size: 20px;
  font-weight: 700;
  color: #4263eb;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-logo a:hover {
  color: #3b5bdb;
}

/* --- Desktop Navigation --- */
.global-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list li a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #333333;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-list li a:hover {
  background-color: #f8f9fa;
  color: #4263eb;
}

.nav-list li a:focus-visible {
  outline: 2px solid #4263eb;
  outline-offset: 2px;
}

.nav-list li a.nav-cta {
  background-color: #4263eb;
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 6px;
}

.nav-list li a.nav-cta:hover {
  background-color: #3b5bdb;
  color: #ffffff;
}

/* --- Hamburger Menu --- */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  color: #333333;
  z-index: 1100;
}

.hamburger-btn:focus-visible {
  outline: 2px solid #4263eb;
  outline-offset: 2px;
}

.hamburger-btn .material-icons {
  font-size: 28px;
}

/* --- Mobile Menu Overlay --- */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.is-active {
  opacity: 1;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background-color: #ffffff;
  z-index: 1100;
  padding: 80px 24px 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.mobile-nav.is-active {
  transform: translateX(0);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-list li a {
  display: block;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #333333;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.mobile-nav-list li a:hover {
  background-color: #f8f9fa;
}

.mobile-nav-list li a.nav-cta {
  background-color: #4263eb;
  color: #ffffff;
  text-align: center;
  margin-top: 8px;
}

.mobile-nav-list li a.nav-cta:hover {
  background-color: #3b5bdb;
}

/* --- Hero Section --- */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
  text-align: center;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 24px;
  color: #333333;
}

.hero-subtitle {
  font-size: 16px;
  color: #666666;
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.9;
}

.btn-primary {
  display: inline-block;
  background-color: #4263eb;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 40px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-primary:hover {
  background-color: #3b5bdb;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-primary:focus-visible {
  outline: 2px solid #4263eb;
  outline-offset: 3px;
}

.btn-primary-lg {
  font-size: 18px;
  padding: 18px 48px;
  border-radius: 10px;
}

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

.section-alt {
  background-color: #f8f9fa;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  color: #333333;
}

.section-note {
  text-align: center;
  font-size: 14px;
  color: #666666;
  margin-top: 32px;
}

/* --- Features Section --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.features-grid--bottom-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 740px;
  margin: 24px auto 0;
}

.feature-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: box-shadow 0.2s ease;
}

.section-alt .feature-card {
  background-color: #ffffff;
}

.feature-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: #edf2ff;
  border-radius: 12px;
  margin-bottom: 16px;
}

.feature-icon .material-icons {
  font-size: 28px;
  color: #4263eb;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: #666666;
  line-height: 1.8;
}

/* --- Formats Section --- */
.formats-group {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.formats-category h3 {
  font-size: 16px;
  text-align: center;
  margin-bottom: 16px;
  color: #666666;
}

.formats-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.format-badge {
  display: inline-block;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #333333;
}

.section-alt .format-badge {
  background-color: #ffffff;
}

/* --- Steps Section --- */
.steps-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step-counter;
}

.step-item {
  text-align: center;
  position: relative;
}

.step-number {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #4263eb;
  background-color: #edf2ff;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background-color: #edf2ff;
  border-radius: 50%;
  margin-bottom: 16px;
}

.step-icon .material-icons {
  font-size: 30px;
  color: #4263eb;
}

.step-item h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

.step-item p {
  font-size: 14px;
  color: #666666;
  line-height: 1.8;
}

/* --- Model Table --- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.model-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 600px;
}

.model-table thead {
  background-color: #4263eb;
  color: #ffffff;
}

.model-table th {
  padding: 14px 16px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.model-table th:first-child {
  border-radius: 8px 0 0 0;
}

.model-table th:last-child {
  border-radius: 0 8px 0 0;
}

.model-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.model-table tbody tr:last-child td {
  border-bottom: none;
}

.model-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.model-table tbody tr:hover {
  background-color: #edf2ff;
}

/* --- Browser Table --- */
.browser-table {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 14px;
}

.browser-table th,
.browser-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.browser-table th {
  font-weight: 700;
  background-color: #f8f9fa;
}

.browser-table thead th:first-child {
  border-radius: 8px 0 0 0;
}

.browser-table thead th:last-child {
  border-radius: 0 8px 0 0;
}

.browser-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- CTA Section --- */
.cta-section {
  padding: 64px 0;
  background-color: #edf2ff;
  text-align: center;
}

.cta-section h2 {
  font-size: 24px;
  margin-bottom: 32px;
  color: #333333;
}

/* --- Footer --- */
.site-footer {
  background-color: #333333;
  color: #ffffff;
  padding: 40px 0 24px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-nav ul {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: #cccccc;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-copyright {
  font-size: 13px;
  color: #999999;
}

/* ============================================
   Guide Page
   ============================================ */

/* --- Page Header --- */
.page-header {
  padding: 100px 0 40px;
  background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
  text-align: center;
}

.page-header h1 {
  font-size: 32px;
}

/* --- Table of Contents --- */
.toc {
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 24px 32px;
  margin-bottom: 48px;
}

.toc-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #333333;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list li a {
  font-size: 14px;
  color: #4263eb;
  text-decoration: none;
}

.toc-list li a:hover {
  text-decoration: underline;
}

/* --- Guide Content --- */
.guide-section {
  margin-bottom: 56px;
}

.guide-section:last-child {
  margin-bottom: 0;
}

.guide-section h2 {
  font-size: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #4263eb;
  margin-bottom: 24px;
}

.guide-section h3 {
  font-size: 18px;
  margin-top: 32px;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid #4263eb;
}

.guide-section p {
  margin-bottom: 16px;
  line-height: 1.9;
}

.guide-section p:last-child {
  margin-bottom: 0;
}

.guide-code {
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  overflow-x: auto;
  margin: 16px 0;
  line-height: 1.6;
}

.guide-code code {
  font-family: inherit;
}

/* ============================================
   FAQ Page
   ============================================ */

.faq-category {
  margin-bottom: 48px;
}

.faq-category:last-child {
  margin-bottom: 0;
}

.faq-category-title {
  font-size: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid #4263eb;
  margin-bottom: 16px;
}

/* --- Accordion --- */
.accordion-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-item:last-child {
  margin-bottom: 0;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #333333;
  gap: 12px;
  transition: background-color 0.2s ease;
}

.accordion-trigger:hover {
  background-color: #f8f9fa;
}

.accordion-trigger:focus-visible {
  outline: 2px solid #4263eb;
  outline-offset: -2px;
  border-radius: 8px;
}

.accordion-trigger .q-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: #4263eb;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.accordion-trigger .q-text {
  flex: 1;
}

.accordion-trigger .expand-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: #666666;
  font-size: 24px;
}

.accordion-trigger[aria-expanded="true"] .expand-icon {
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.accordion-panel.is-open {
  max-height: 500px;
}

.accordion-panel-inner {
  padding: 0 20px 20px 60px;
  font-size: 14px;
  line-height: 1.9;
  color: #666666;
}

/* ============================================
   Responsive - Tablet (768px - 1023px)
   ============================================ */
@media screen and (max-width: 1023px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid--bottom-row {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .steps-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* ============================================
   Responsive - Mobile (767px and below)
   ============================================ */
@media screen and (max-width: 767px) {

  body {
    font-size: 15px;
  }

  /* Header Mobile */
  .global-nav {
    display: none;
  }

  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-overlay {
    display: block;
    pointer-events: none;
  }

  .mobile-nav-overlay.is-active {
    pointer-events: auto;
  }

  .mobile-nav {
    display: block;
  }

  /* Hero */
  .hero {
    padding: 96px 0 56px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .btn-primary-lg {
    font-size: 16px;
    padding: 16px 36px;
  }

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

  .section-title {
    font-size: 22px;
    margin-bottom: 32px;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .features-grid--bottom-row {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
    margin-top: 16px;
  }

  /* Formats */
  .formats-group {
    flex-direction: column;
    gap: 32px;
  }

  /* Steps */
  .steps-list {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* CTA */
  .cta-section h2 {
    font-size: 20px;
  }

  /* Page Header */
  .page-header {
    padding: 88px 0 32px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  /* Guide */
  .toc {
    padding: 20px;
  }

  .guide-section h2 {
    font-size: 20px;
  }

  .guide-section h3 {
    font-size: 16px;
  }

  /* FAQ */
  .faq-category-title {
    font-size: 19px;
  }

  .accordion-panel-inner {
    padding-left: 20px;
  }

  /* Footer */
  .footer-nav ul {
    gap: 16px;
  }
}
