/* =============================================
   週末カウンター — style.css
   ============================================= */

/* --- CSS Variables --- */
:root {
  --bg-dark-from: #0a0a23;
  --bg-dark-to:   #1a1a3e;
  --bg-light:     #f6f9fc;
  --accent-from:  #635bff;
  --accent-to:    #80b3ff;
  --text-on-dark:       #ffffff;
  --text-on-dark-dim:   rgba(255,255,255,0.7);
  --text-on-light:      #1a1a2e;
  --text-on-light-sub:  #4a4a6a;
  --dot-past:     rgba(255,255,255,0.15);
  --dot-current:  #ffffff;
  --radius-sm:    8px;
  --radius-md:    12px;
  --max-w:        800px;
  --transition:   0.35s ease-out;
}

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

html { scroll-behavior: smooth; }

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

body.page-dark {
  color: var(--text-on-dark);
  background: linear-gradient(160deg, var(--bg-dark-from), var(--bg-dark-to));
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* =============================================
   Header
   ============================================= */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

body.page-dark .site-header {
  background: rgba(10,10,35,0.85);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(255,255,255,0.08);
}

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

.logo {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-nav { display: flex; gap: 24px; }

.site-nav a {
  font-size: 14px;
  color: var(--text-on-light-sub);
  transition: color var(--transition);
}

body.page-dark .site-nav a { color: var(--text-on-dark-dim); }

.site-nav a:hover { color: var(--accent-from); }

/* =============================================
   Hero
   ============================================= */
.hero {
  padding: 100px 0 80px;
  background: var(--bg-light);
}

.hero-inner { text-align: center; }

.hero-eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-from);
  margin-bottom: 16px;
}

.hero-title {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--text-on-light);
  margin-bottom: 24px;
}

.hero-title .accent {
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-icon { font-size: 48px; display: block; margin-bottom: 16px; }

.hero-sub {
  font-size: 18px;
  color: var(--text-on-light-sub);
  margin-bottom: 12px;
}

.event-calc-note {
  font-size: 13px;
  color: var(--text-on-light-sub);
  background: rgba(99,91,255,0.06);
  border-left: 3px solid var(--accent-from);
  padding: 8px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: inline-block;
  margin-top: 8px;
}

/* =============================================
   Form Section
   ============================================= */
.form-section { padding: 0 0 80px; }

.form-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.form-group { margin-bottom: 28px; }

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

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-on-light);
  margin-bottom: 8px;
}

.dob-select-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.dob-select-row .dob-select {
  flex: 1;
  min-width: 0;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  color: var(--text-on-light);
}

.form-input:focus {
  border-color: var(--accent-from);
  box-shadow: 0 0 0 3px rgba(99,91,255,0.15);
}

.form-range {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  border-radius: 3px;
  cursor: pointer;
  outline: none;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-from);
  box-shadow: 0 2px 6px rgba(99,91,255,0.3);
  cursor: pointer;
  transition: transform var(--transition);
}

.form-range::-webkit-slider-thumb:hover { transform: scale(1.15); }

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-on-light-sub);
  margin-top: 6px;
}

.form-error {
  display: none;
  padding: 12px 16px;
  background: rgba(220,53,69,0.08);
  border: 1px solid rgba(220,53,69,0.3);
  border-radius: var(--radius-sm);
  color: #dc3545;
  font-size: 14px;
  margin-bottom: 16px;
}

.form-error.show { display: block; }

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,91,255,0.25); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  color: #fff;
  box-shadow: 0 2px 10px rgba(99,91,255,0.3);
}

.btn-large { width: 100%; padding: 16px; font-size: 18px; }

.btn-share {
  font-size: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
}

.btn-twitter  { background: #000; color: #fff; }
.btn-line     { background: #06c755; color: #fff; }
.btn-download { background: rgba(255,255,255,0.1); color: var(--text-on-dark); border: 1px solid rgba(255,255,255,0.2); }
.btn-copy     { background: rgba(255,255,255,0.1); color: var(--text-on-dark); border: 1px solid rgba(255,255,255,0.2); }

/* =============================================
   Features
   ============================================= */
.features { padding: 80px 0; background: #fff; }

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

.feature-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius-md);
  border: 1px solid #f0f0f0;
}

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

.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 14px; color: var(--text-on-light-sub); }

/* =============================================
   Events Grid
   ============================================= */
.events-section { padding: 80px 0; }

.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-on-dark);
}

body.page-light .section-title { color: var(--text-on-light); }

.section-desc {
  font-size: 16px;
  color: var(--text-on-dark-dim);
  margin-bottom: 40px;
}

body.page-light .section-desc { color: var(--text-on-light-sub); }

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.event-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
}

body.page-light .event-card {
  background: #fff;
  border-color: #e0e0e0;
}

.event-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

body.page-light .event-card:hover { background: #f6f9fc; }

.event-icon  { font-size: 28px; }
.event-label { font-size: 12px; font-weight: 700; text-align: center; color: var(--text-on-dark-dim); }
body.page-light .event-label { color: var(--text-on-light-sub); }

/* =============================================
   Result Hero
   ============================================= */
.result-hero {
  padding: 100px 0 80px;
  background: linear-gradient(160deg, var(--bg-dark-from), var(--bg-dark-to));
  text-align: center;
}

.result-hero-inner {}

.result-label {
  font-size: 18px;
  color: var(--text-on-dark-dim);
  margin-bottom: 16px;
}

.result-main-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.count-up {
  font-size: 96px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: linear-gradient(90deg, #fff, var(--accent-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  will-change: transform;
}

.result-unit {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-on-dark-dim);
}

.result-sub {
  font-size: 18px;
  color: var(--text-on-dark-dim);
}

.result-sub strong { color: var(--text-on-dark); }

/* =============================================
   Dot Grid
   ============================================= */
.dot-grid-section {
  padding: 80px 0;
  background: linear-gradient(160deg, var(--bg-dark-from), var(--bg-dark-to));
}

#dot-grid {
  display: block;
  width: 100%;
  max-width: 752px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

.dot-legend {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.legend-item {
  font-size: 13px;
  color: var(--text-on-dark-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-item::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-past::before    { background: var(--dot-past); }
.legend-current::before { background: var(--dot-current); box-shadow: 0 0 6px rgba(255,255,255,0.8); }
.legend-future::before  { background: var(--accent-from); }

/* =============================================
   Conversion Section
   ============================================= */
.conversion-section {
  padding: 80px 0;
  background: linear-gradient(160deg, #0d0d2b, #1a1a3e);
}

.conversion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.conversion-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  transition: background var(--transition);
}

.conversion-card:hover { background: rgba(255,255,255,0.08); }

.conversion-icon  { font-size: 28px; margin-bottom: 12px; }

.conversion-number {
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.conversion-label { font-size: 16px; font-weight: 700; color: var(--text-on-dark); margin-bottom: 4px; }
.conversion-note  { font-size: 12px; color: var(--text-on-dark-dim); }

/* =============================================
   Share Section
   ============================================= */
.share-section {
  padding: 80px 0;
  background: linear-gradient(160deg, var(--bg-dark-from), var(--bg-dark-to));
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* LINE シェアはスマホ表示時のみ（768px 以下は既存レスポンシブと同じブレークポイント） */
.share-section .btn-line {
  display: none;
}

/* =============================================
   Event Result
   ============================================= */
.event-result {
  padding: 80px 0;
  background: linear-gradient(160deg, var(--bg-dark-from), var(--bg-dark-to));
}

.event-result-inner {
  text-align: center;
}

/* =============================================
   Static Pages
   ============================================= */
.static-page { padding: 80px 0; min-height: 60vh; }

.page-title {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 40px;
  color: var(--text-on-light);
}

.static-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text-on-light);
}

.static-content p, .static-content li {
  color: var(--text-on-light-sub);
  margin-bottom: 12px;
}

.static-content a { color: var(--accent-from); text-decoration: underline; }
.static-content ul { padding-left: 20px; }
.static-content code {
  background: #f0f0f8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.update-date { font-size: 13px; color: var(--text-on-light-sub); margin-top: 40px; }

/* =============================================
   Column List
   ============================================= */
.column-lead {
  font-size: 16px;
  color: var(--text-on-light-sub);
  margin-top: -24px;
  margin-bottom: 40px;
}

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

.column-card {
  display: block;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-md);
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  border-left: 4px solid transparent;
}

.column-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99,91,255,0.1);
  border-left-color: var(--accent-from);
}

.column-card__meta time {
  font-size: 13px;
  color: var(--accent-from);
  font-weight: 700;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 8px;
}

.column-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-on-light);
  margin-bottom: 10px;
  line-height: 1.45;
}

.column-card__desc {
  font-size: 14px;
  color: var(--text-on-light-sub);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-sm);
  color: var(--text-on-light-sub);
  background: #fff;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.pagination__btn:hover {
  background: rgba(99,91,255,0.06);
  border-color: var(--accent-from);
  color: var(--accent-from);
}

.pagination__btn--active {
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  border-color: transparent;
  color: #fff;
  pointer-events: none;
}

/* =============================================
   Column Article
   ============================================= */
.column-article { padding: 60px 0 80px; min-height: 60vh; }

.column-article__breadcrumb {
  font-size: 13px;
  color: var(--text-on-light-sub);
  margin-bottom: 16px;
}

.column-article__breadcrumb a {
  color: var(--accent-from);
  text-decoration: underline;
}

.column-article__date {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-from);
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.column-article__title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-on-light);
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e0e0e0;
}

/* markdownのH1（タイトル重複）を非表示 */
.column-article__body h1:first-child { display: none; }
/* 区切り線（コメント直後のhr）を非表示 */
.column-article__body > hr:first-of-type { display: none; }

.column-article__body {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-on-light);
}

.column-article__body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--accent-from);
  color: var(--text-on-light);
}

.column-article__body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text-on-light);
}

.column-article__body p {
  color: var(--text-on-light-sub);
  margin-bottom: 20px;
}

.column-article__body ul,
.column-article__body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.column-article__body li {
  color: var(--text-on-light-sub);
  margin-bottom: 6px;
}

.column-article__body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: rgba(99,91,255,0.05);
  border-left: 4px solid var(--accent-from);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-on-light-sub);
  font-style: italic;
}

.column-article__body strong { color: var(--text-on-light); font-weight: 700; }

.column-article__body a { color: var(--accent-from); text-decoration: underline; }

.column-article__body code {
  background: #f0f0f8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.column-article__body pre {
  background: #f0f0f8;
  padding: 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 20px;
}

.column-article__body pre code {
  background: none;
  padding: 0;
  font-size: 14px;
}

.column-article__body hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 40px 0;
}

.column-article__footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid #e0e0e0;
}

.column-article__back {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-from);
  text-decoration: underline;
  transition: opacity var(--transition);
}

.column-article__back:hover { opacity: 0.7; }

/* =============================================
   Ad Slots
   ============================================= */
.ad-slot {
  text-align: center;
  padding: 16px 0;
}

.ad-slot--form       { margin-top: 32px; }
.ad-slot--result-top { background: linear-gradient(160deg, var(--bg-dark-from), var(--bg-dark-to)); padding: 16px 0; }
.ad-slot--result-mid { background: linear-gradient(160deg, #0d0d2b, #1a1a3e); padding: 16px 0; }
.ad-slot--result-bottom { background: linear-gradient(160deg, var(--bg-dark-from), var(--bg-dark-to)); padding: 16px 0; }

/* =============================================
   Footer
   ============================================= */
.site-footer {
  padding: 40px 0;
  background: var(--bg-dark-from);
  color: var(--text-on-dark-dim);
}

.footer-nav {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 13px;
  color: var(--text-on-dark-dim);
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--text-on-dark); }

.footer-copy { font-size: 12px; }

/* =============================================
   Fade-in animation (IntersectionObserver)
   ============================================= */
.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   Pulse for current dot
   ============================================= */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
  .hero-title { font-size: 40px; }
  .count-up   { font-size: 80px; }
}

@media (max-width: 768px) {
  .column-card         { padding: 20px 20px; }
  .column-card__title  { font-size: 16px; }
  .column-article__title { font-size: 26px; }
  .column-article__body h2 { font-size: 18px; }

  .hero-title       { font-size: 32px; }
  .hero-sub         { font-size: 16px; }
  .count-up         { font-size: 64px; }
  .result-unit      { font-size: 28px; }
  .features-grid    { grid-template-columns: 1fr; }
  .conversion-grid  { grid-template-columns: 1fr; }
  .share-buttons    { flex-direction: column; }
  .btn-share        { width: 100%; }
  .share-section .btn-line { display: inline-flex; }
  .form-card        { padding: 24px; }
  .section-title    { font-size: 22px; }
  .events-grid      { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 375px) {
  .hero-title  { font-size: 26px; }
  .count-up    { font-size: 52px; }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
}
