/* ============================================
   cocoheat — style.css
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500;700;900&family=Oswald:wght@300;400;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Dark Mode (default) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a26;
  --bg-card-hover: #22223a;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,120,40,0.5);
  --text-primary: #f0ede8;
  --text-secondary: #a09890;
  --text-muted: #605850;
  --accent-primary: #ff6b1a;
  --accent-secondary: #ffaa44;
  --accent-glow: rgba(255, 107, 26, 0.3);
  --danger: #ff2d2d;
  --severe: #ff6600;
  --warning: #ffaa00;
  --caution: #ffe44d;
  --safe: #44cc88;
  --header-bg: rgba(10, 10, 15, 0.92);
  --shadow: 0 4px 24px rgba(0,0,0,0.6);
  --logo-filter: none;
}

body.light {
  --bg-primary: #fef8f2;
  --bg-secondary: #fff4ec;
  --bg-card: #ffffff;
  --bg-card-hover: #fff0e6;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(255,100,20,0.4);
  --text-primary: #1a1008;
  --text-secondary: #664422;
  --text-muted: #aa8866;
  --accent-primary: #e05500;
  --accent-secondary: #ff8800;
  --accent-glow: rgba(224, 85, 0, 0.15);
  --header-bg: rgba(254, 248, 242, 0.94);
  --shadow: 0 4px 24px rgba(100,40,0,0.12);
}

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

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

body {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

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

img { max-width: 100%; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.4rem;
}

.logo-text {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
}

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
}

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  gap: 4px;
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.mobile-nav a:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ---- Hero ---- */
.hero {
  padding: 140px 24px 80px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.heat-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: pulse-orb 6s ease-in-out infinite;
}

.orb1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #ff4400, #ff6600, transparent);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.orb2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #ff8800, transparent);
  bottom: -100px;
  left: -100px;
  animation-delay: 2s;
}

.orb3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #ffcc00, transparent);
  top: 50%;
  left: 40%;
  animation-delay: 4s;
  opacity: 0.2;
}

body.light .heat-orb {
  opacity: 0.15;
}

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

.heat-shimmer {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 100, 0, 0.015) 2px,
    rgba(255, 100, 0, 0.015) 4px
  );
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 760px;
}

.hero-badge {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--accent-primary);
  border-radius: 100px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-primary);
  margin-bottom: 28px;
  animation: badge-pulse 2s ease infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.hero-title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
}

.title-line1 {
  display: block;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.title-line2 {
  display: block;
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.hero-stats {
  position: relative;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 100px;
}

.stat-num {
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---- Current Location ---- */
.current-location {
  padding: 60px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.wbgt-display {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 40px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border);
  max-width: 600px;
  margin: 0 auto;
}

.wbgt-main {
  text-align: center;
}

.wbgt-value {
  font-family: 'Oswald', sans-serif;
  font-size: 5rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
}

.wbgt-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.risk-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.risk-danger { background: var(--danger); color: white; }
.risk-severe { background: var(--severe); color: white; }
.risk-warning { background: var(--warning); color: #1a1000; }
.risk-caution { background: var(--caution); color: #1a1000; }
.risk-safe { background: var(--safe); color: white; }

.wbgt-params {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

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

.region-block {
  margin-bottom: 48px;
}

.region-title {
  font-family: 'Oswald', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

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

.city-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.city-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.city-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.city-name small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.city-wbgt {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  min-width: 56px;
  text-align: center;
}

.city-wbgt.loading {
  color: var(--text-muted);
  background: var(--bg-secondary);
}

.city-wbgt.wbgt-danger { background: rgba(255,45,45,0.18); color: var(--danger); }
.city-wbgt.wbgt-severe { background: rgba(255,102,0,0.18); color: var(--severe); }
.city-wbgt.wbgt-warning { background: rgba(255,170,0,0.18); color: var(--warning); }
.city-wbgt.wbgt-caution { background: rgba(255,228,77,0.18); color: #cc9900; }
.city-wbgt.wbgt-safe { background: rgba(68,204,136,0.18); color: var(--safe); }

/* ---- WBGT Guide ---- */
.wbgt-guide {
  padding: 80px 0;
  background: var(--bg-secondary);
}

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

.guide-card {
  padding: 24px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.2s;
}

.guide-card:hover {
  transform: translateY(-3px);
}

.level-num {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.level-name {
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 10px;
}

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

.level-danger {
  background: rgba(255,45,45,0.1);
  border-color: rgba(255,45,45,0.3);
}
.level-danger .level-name { color: var(--danger); }
.level-danger .level-num { color: var(--danger); }

.level-severe {
  background: rgba(255,102,0,0.1);
  border-color: rgba(255,102,0,0.3);
}
.level-severe .level-name { color: var(--severe); }
.level-severe .level-num { color: var(--severe); }

.level-warning {
  background: rgba(255,170,0,0.1);
  border-color: rgba(255,170,0,0.3);
}
.level-warning .level-name { color: var(--warning); }
.level-warning .level-num { color: var(--warning); }

.level-caution {
  background: rgba(255,228,77,0.08);
  border-color: rgba(255,228,77,0.3);
}
.level-caution .level-name { color: #ccaa00; }
.level-caution .level-num { color: #ccaa00; }

.level-safe {
  background: rgba(68,204,136,0.08);
  border-color: rgba(68,204,136,0.3);
}
.level-safe .level-name { color: var(--safe); }
.level-safe .level-num { color: var(--safe); }

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

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

.feature-item {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.2s;
}

.feature-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

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

.feature-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Related ---- */
.related-section {
  padding: 60px 0;
  background: var(--bg-secondary);
}

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

.related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.2s;
  text-align: center;
}

.related-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.related-icon { font-size: 1.8rem; }
.related-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-secondary);
}
.related-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- About ---- */
.about-section {
  padding: 60px 0;
}

.about-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.about-inner h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 20px;
}

.about-inner p {
  color: var(--text-secondary);
  line-height: 1.9;
  font-size: 0.95rem;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}

.footer-inner {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  flex-shrink: 0;
}

.footer-logo {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--accent-primary);
}

.footer-company {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .guide-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hero { padding: 120px 16px 60px; }
  .cities-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-stats { gap: 10px; }
  .stat-card { padding: 12px 16px; min-width: 80px; }
}

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

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content { animation: fadeInUp 0.7s ease both; }
.hero-stats { animation: fadeInUp 0.7s 0.2s ease both; }
