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

:root {
  --primary: #1565C0;
  --primary-dark: #0D47A1;
  --primary-light: #1E88E5;
  --accent: #00BFA5;
  --accent-dark: #00897B;
  --text: #212121;
  --text-secondary: #616161;
  --bg: #FAFAFA;
  --bg-white: #FFFFFF;
  --bg-light: #F5F5F5;
  --border: #E0E0E0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1120px;
  --transition: 0.2s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', 'Noto Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--primary-dark);
}

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

/* ===== Utility ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 72px 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-size: 1rem;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
  text-decoration: none;
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--primary);
}

.lang-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 80px 0 96px;
  text-align: center;
}

.hero-icon {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.hero-tagline {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: 0.95rem;
  opacity: 0.78;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.badge-link {
  display: inline-block;
  height: 48px;
}

.badge-link img {
  height: 48px;
}

.badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 10px 24px;
  border-radius: 28px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background var(--transition);
  text-decoration: none;
}

.badge-btn:hover {
  background: rgba(255,255,255,0.28);
  color: #fff;
}

.badge-btn-icon {
  font-size: 1.3rem;
}

.badge-btn-primary {
  background: rgba(255,255,255,0.95);
  color: var(--primary-dark);
  border-color: #fff;
  font-weight: 700;
}

.badge-btn-primary:hover {
  background: #fff;
  color: var(--primary-dark);
}

/* ===== Stats Bar ===== */
.stats-bar {
  background: var(--primary-dark);
  padding: 24px 0;
  color: #fff;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  opacity: 0.75;
  letter-spacing: 0.03em;
}

/* ===== Pre-registration Banner ===== */
.prereg-banner {
  background: linear-gradient(135deg, #FF6F00 0%, #FF8F00 100%);
  padding: 56px 0;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.prereg-inner {
  position: relative;
  z-index: 1;
}

.prereg-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  padding: 4px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.prereg-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.prereg-value {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 800;
  background: rgba(255,255,255,0.2);
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.prereg-desc {
  font-size: 1rem;
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.prereg-highlights {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.prereg-highlight {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  max-width: 260px;
}

.prereg-highlight-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.prereg-highlight-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prereg-highlight-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.prereg-highlight-desc {
  font-size: 0.82rem;
  opacity: 0.8;
  line-height: 1.4;
}

.btn-prereg {
  display: inline-block;
  padding: 14px 40px;
  border-radius: 28px;
  font-weight: 700;
  font-size: 1.05rem;
  background: #fff;
  color: #E65100;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.btn-prereg:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  color: #BF360C;
}

.prereg-note {
  margin-top: 16px;
  font-size: 0.8rem;
  opacity: 0.75;
}

/* Nav pre-registration link highlight */
.nav-prereg {
  color: #E65100 !important;
  font-weight: 700 !important;
}

/* Disabled badge button (App Store coming soon) */
.badge-btn-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* Pricing pre-reg tag */
.pricing-prereg-tag {
  background: linear-gradient(135deg, #FF6F00, #FF8F00);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 12px;
}

/* ===== Features ===== */
.features {
  background: var(--bg-white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Exam List ===== */
.exam-list {
  background: var(--bg);
}

.accordion-group {
  max-width: 800px;
  margin: 0 auto;
}

.accordion {
  background: var(--bg-white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text);
  transition: background var(--transition);
}

.accordion-header:hover {
  background: var(--bg-light);
}

.accordion-arrow {
  transition: transform var(--transition);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.accordion.open .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion.open .accordion-body {
  max-height: 2000px;
}

.exam-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-row:hover {
  background: var(--bg-light);
}

.exam-name {
  font-weight: 600;
  flex: 1;
  min-width: 160px;
}

.exam-meta {
  display: flex;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.exam-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

/* ===== Pricing ===== */
.pricing {
  background: var(--bg-white);
}

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

.pricing-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,191,165,0.15);
}

.pricing-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.pricing-card.featured .pricing-label {
  color: var(--accent-dark);
}

.pricing-price {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.pricing-period {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.pricing-annual {
  font-size: 0.8rem;
  color: var(--accent-dark);
  font-weight: 600;
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.pricing-features li {
  padding: 6px 0;
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pricing-features li::before {
  content: "\2713";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 28px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== Footer ===== */
.site-footer {
  background: #263238;
  color: #B0BEC5;
  padding: 40px 0;
  font-size: 0.88rem;
}

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

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: #B0BEC5;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  color: #78909C;
}

/* ===== Exam Info Page ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}

.page-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-hero p {
  opacity: 0.9;
  font-size: 1.05rem;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

.page-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 40px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.page-content ul, .page-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--text-secondary);
}

.page-content li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.page-content strong {
  color: var(--text);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.info-table th,
.info-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.info-table th {
  background: var(--bg-light);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.info-table td {
  color: var(--text-secondary);
}

.cta-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  margin-top: 48px;
}

.cta-box h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.cta-box p {
  color: rgba(255,255,255,0.88);
  margin-bottom: 24px;
}

.cta-box .btn {
  background: var(--accent);
  color: #fff;
}

.cta-box .btn:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* ===== Legal Pages ===== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 72px;
  line-height: 1.8;
}

.legal-content h1 {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.legal-content h2 {
  font-size: 1.2rem;
  margin-top: 2em;
  color: var(--primary);
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-content .date {
  color: #666;
  font-size: 0.9rem;
}

.legal-content p {
  margin-bottom: 12px;
}

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    gap: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-hamburger {
    display: block;
  }

  .stats-grid {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .prereg-banner {
    padding: 40px 0;
  }

  .prereg-title {
    font-size: 1.35rem;
  }

  .prereg-highlights {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .prereg-highlight {
    max-width: 100%;
  }

  .hero {
    padding: 56px 0 64px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

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

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .exam-meta {
    display: none;
  }

  .hero-icon {
    width: 64px;
    height: 64px;
    font-size: 1.8rem;
  }
}
