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

/* Light mode */
body.light {
  --bg: #ffffff;
  --text: #111111;
  --header_text:#111111;
  --sub: #666666;
  --accent: #0055ff;
}

/* Dark mode */
body.dark {
  --bg: #0e0e0e;
  --text: #f5f5f5;
  --header_text:#ffffff;
  --sub: #aaaaaa;
  --accent: #6aa6ff;
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 0;
}
#theme-toggle:hover {
  transform: scale(1.15);
}

body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-family: "Inter", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  line-height: 1.8;
  letter-spacing: 0.02em;
}


a {
  color: var(--header_text);
}


.header {
  position: fixed;
  top: 0;
  width: 100%;
  height:64px;

  padding:0 16px;
  background: rgb(230, 57, 70);
  z-index: 10;

  display:flex;
  justify-content: space-between;
  align-items:center;
}

.nav {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.hero {
  min-height: 100dvh;
  padding: 120px 24px 80px;
  padding-left: 24px;
  text-align: left;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 1;
}


.role {
  color: var(--sub);
}

/* ===============================
   Section
================================ */
section {
  margin-bottom: 48px;
}

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

.lead {
  padding-left: 24px;
  font-size: 1.1rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 24px;
  padding: 80px 24px;
  max-width: 900px;
  margin: auto;
}

.metrics span {
  font-size: 1.6rem;
  font-weight: 600;
}

main {
  padding-top: 80px;
}

.list {
  margin-top: 24px;
}

.list li {
  margin-bottom: 12px;
}

footer {
  padding: 80px 24px;
  text-align: center;
  color: #999;
}

/* animation */
.fade {
  opacity: 0;
  transform: translateY(40px);
  transition: 1s ease;
}

.fade.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Loading ===== */
#loader {
  position: fixed;
  inset: 0;
  background: #111;
  flex-direction: column;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-inner {
  display: inline-block; /* ← 文字幅基準になる */
  text-align: center;
}

.loader-text {
  color: #fff;
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeIn 1.5s ease forwards;
}

.loader-line {
  width: 100%;
  height: 1px;
  margin: 12px auto 0;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.loader-line-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: #fff;
  transition: width 1s linear;
}



@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

#loader.hide {
  animation: fadeOut 1s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}





/* ===============================
   Layout
================================ */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}


/* =========================
  Theme Switch
========================= */

.theme-switch {
  position:relative;
  width: 56px;
  height: 28px;
  padding:4px;

  background: #e5e5e5;
  border: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 4px;
}

/* アイコン */
.theme-switch .icon {
  font-size: 14px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 2;
}

/* ノブ（丸） */
.theme-switch .knob {
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translate(0,-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================
  Dark Mode
========================= */

body.dark .theme-switch {
  background: #222;
}

body.dark .theme-switch .knob {
  transform: translate(32px,-50%);
}

body.dark .sun {
  opacity: 0.3;
}

body.dark .moon {
  opacity: 1;
}

/* =========================
  Light Mode
========================= */

body.light .theme-switch {
  background: #ddd;
}

body.light .sun {
  opacity: 1;
}

body.light .moon {
  opacity: 0.3;
}


@media (max-width: 480px) {
  .theme-switch {
    width: 44px;
    height: 24px;
  }

  .theme-switch .icon {
    font-size: 10px;
  }

  .theme-switch .knob {
    width: 16px;
    height: 16px;
  }

  body.dark .theme-switch .knob {
    transform: translate(20px,-50%);
  }
}


@media (min-width: 768px) {
  .nav {
    gap: 24px;
    font-size: 1rem;
  }

  .hero {
    padding-left: 80px;
  }

  .lead {
    padding-left: 80px;
    font-size: 1.25rem;
  }
}

/* ===============================
   PC (>= 1024px)
================================ */
@media (min-width: 1024px) {
  .hero {
    padding-left: 200px;
  }

  .lead {
    padding-left: 200px;
    font-size: 1.4rem;
  }

  .metrics {
    padding: 160px 24px;
  }
}