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

:root {
  --blue: #4A9BD9;
  --deep-teal: #1A5276;
  --light-blue: #D4F1F9;
  --kappa-green: #6DBE8B;
  --cucumber: #8BC34A;
  --cream: #FAFEF6;
  --text: #2C3E50;
  --blush: #F4A4B0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--light-blue);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

h2 {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-intro {
  text-align: center;
  font-style: italic;
  opacity: 0.8;
  margin-bottom: 2rem;
}

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--deep-teal) 0%, #1E6A9C 50%, var(--blue) 100%);
  color: white;
  text-align: center;
  padding: 3rem 1rem 0;
  position: relative;
}

.hero-inner {
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.hero h1 {
  font-size: 2.2rem;
  margin: 1rem 0 0.25rem;
  letter-spacing: 0.02em;
}

.hero .subtitle {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.greeting {
  font-size: 1.1rem;
  min-height: 1.6em;
  opacity: 0.95;
}

.greeting .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: white;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* === Nitori CSS Art === */
.nitori-face {
  width: 120px;
  height: 140px;
  margin: 0 auto;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.nitori-face:hover {
  transform: scale(1.05);
}

.nitori-face .face-circle {
  width: 100px;
  height: 100px;
  background: #FDE8D0;
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.nitori-face .hair {
  position: absolute;
  width: 110px;
  height: 70px;
  background: var(--blue);
  border-radius: 55px 55px 10px 10px;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.nitori-face .hair::before,
.nitori-face .hair::after {
  content: '';
  position: absolute;
  background: var(--blue);
  border-radius: 50%;
}

/* Side hair */
.nitori-face .hair::before {
  width: 25px;
  height: 50px;
  bottom: -30px;
  left: -2px;
  border-radius: 50% 0 50% 50%;
}

.nitori-face .hair::after {
  width: 25px;
  height: 50px;
  bottom: -30px;
  right: -2px;
  border-radius: 0 50% 50% 50%;
}

.nitori-face .hat {
  position: absolute;
  width: 60px;
  height: 25px;
  background: var(--kappa-green);
  border-radius: 30px 30px 5px 5px;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.nitori-face .hat::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 6px;
  background: #5AAE78;
  border-radius: 3px;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.nitori-face .eye {
  width: 8px;
  height: 8px;
  background: var(--text);
  border-radius: 50%;
  position: absolute;
  top: 38px;
  z-index: 2;
}

.nitori-face .eye.left { left: 30px; }
.nitori-face .eye.right { right: 30px; }

.nitori-face .blush {
  width: 18px;
  height: 10px;
  background: var(--blush);
  border-radius: 50%;
  position: absolute;
  top: 50px;
  opacity: 0.6;
  z-index: 2;
}

.nitori-face .blush.left { left: 18px; }
.nitori-face .blush.right { right: 18px; }

.nitori-face .mouth {
  width: 14px;
  height: 7px;
  border-bottom: 2.5px solid #C48B6E;
  border-radius: 0 0 50% 50%;
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* Dance animation for easter egg */
@keyframes nitori-dance {
  0%, 100% { transform: scale(1.05) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-8deg); }
  50% { transform: scale(1.05) rotate(0deg); }
  75% { transform: scale(1.1) rotate(8deg); }
}

.nitori-face.dancing {
  animation: nitori-dance 0.5s ease-in-out 4;
}

/* Speech bubble */
.speech-bubble {
  background: white;
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  display: inline-block;
  position: relative;
  margin-top: 0.5rem;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid white;
}

.speech-bubble.hidden {
  display: none;
}

/* === Wave Divider === */
.wave-divider {
  position: relative;
  height: 60px;
  overflow: hidden;
}

.wave-divider.top {
  height: 60px;
}

.wave {
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
  height: 40px;
  background: var(--light-blue);
  border-radius: 100% 100% 0 0;
}

.wave.flip {
  top: 0;
  bottom: auto;
  border-radius: 0 0 100% 100%;
}

.wave-2 {
  height: 25px;
  opacity: 0.5;
  bottom: 10px;
}

.wave-2.flip {
  top: 10px;
  bottom: auto;
}

/* Hero wave uses light-blue to transition to about section */
.hero .wave-divider .wave {
  background: var(--light-blue);
}

/* Workshop (teal bg) waves */
.workshop > .wave-divider.top .wave {
  background: var(--light-blue);
}

.workshop > .wave-divider.top .wave.flip {
  background: var(--light-blue);
}

/* River strip in wave dividers */
.river {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

/* === About === */
.about {
  padding: 2rem 1rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.about-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 16px rgba(26, 82, 118, 0.08);
  margin-top: 1rem;
}

.about-card p {
  margin-bottom: 1rem;
}

.river-temp {
  font-size: 0.9rem;
  color: var(--deep-teal);
  background: var(--light-blue);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  background: var(--kappa-green);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* === Workshop === */
.workshop {
  background: linear-gradient(180deg, var(--deep-teal) 0%, #1E6A9C 100%);
  color: white;
  padding: 0 1rem 3rem;
  position: relative;
}

.workshop h2 {
  padding-top: 2rem;
}

.invention-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .invention-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.invention-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.invention-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.invention-card h3 {
  margin: 0.8rem 0 0.5rem;
  font-size: 1.1rem;
}

.invention-card p {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.5;
}

/* CSS Icons */
.invention-icon {
  width: 48px;
  height: 48px;
  position: relative;
}

.gear-icon {
  width: 40px;
  height: 40px;
  border: 5px solid var(--kappa-green);
  border-radius: 50%;
  position: relative;
}

.gear-icon::before, .gear-icon::after {
  content: '';
  position: absolute;
  background: var(--kappa-green);
}

.gear-icon::before {
  width: 6px;
  height: 48px;
  top: -9px;
  left: 12px;
  border-radius: 3px;
}

.gear-icon::after {
  width: 48px;
  height: 6px;
  top: 12px;
  left: -9px;
  border-radius: 3px;
}

.drop-icon {
  width: 30px;
  height: 30px;
  background: var(--blue);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: relative;
  top: 10px;
  left: 5px;
}

.drop-icon::after {
  content: '';
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  position: absolute;
  top: 6px;
  left: 6px;
}

/* === Secrets / Accordion === */
.secrets {
  padding: 0 1rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.secrets h2 {
  padding-top: 1rem;
}

.accordion {
  margin-top: 1rem;
}

details {
  background: var(--cream);
  border-radius: 12px;
  margin-bottom: 0.8rem;
  box-shadow: 0 1px 8px rgba(26, 82, 118, 0.06);
  overflow: hidden;
}

summary {
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.2s;
}

summary:hover {
  background: rgba(77, 155, 217, 0.08);
}

summary::before {
  content: '▸';
  font-size: 0.9rem;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

details[open] summary::before {
  transform: rotate(90deg);
}

summary::-webkit-details-marker {
  display: none;
}

details p {
  padding: 0 1.2rem 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* === Footer === */
.footer {
  background: linear-gradient(180deg, var(--deep-teal) 0%, #12384F 100%);
  color: white;
  text-align: center;
  padding: 0 1rem 2rem;
  position: relative;
}

.footer .wave-divider .wave {
  background: var(--light-blue);
}

.footer-inner {
  padding-top: 2rem;
  max-width: 500px;
  margin: 0 auto;
}

.footer-inner p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.footer-note {
  font-size: 0.85rem !important;
  opacity: 0.7 !important;
}

.footer-copy {
  font-size: 0.8rem !important;
  opacity: 0.5 !important;
}

/* === Click Ripple === */
.ripple {
  position: fixed;
  border-radius: 50%;
  border: 2px solid var(--blue);
  pointer-events: none;
  animation: ripple-expand 0.6s ease-out forwards;
  z-index: 9999;
}

@keyframes ripple-expand {
  0% {
    width: 0;
    height: 0;
    opacity: 0.6;
  }
  100% {
    width: 60px;
    height: 60px;
    opacity: 0;
    margin-top: -30px;
    margin-left: -30px;
  }
}

/* === Floating Cucumber === */
.floating-cucumber {
  position: absolute;
  width: 28px;
  height: 12px;
  background: var(--cucumber);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  animation: cucumber-float 5s linear forwards;
}

.floating-cucumber::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #7CB342;
  border-radius: 50%;
  top: 2px;
  right: 4px;
}

@keyframes cucumber-float {
  0% {
    transform: translateX(-40px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateX(calc(100vw + 40px)) rotate(20deg);
    opacity: 0;
  }
}

/* === Water Ripple BG on Hero === */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 50%);
  animation: water-shimmer 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes water-shimmer {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* === Responsive === */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .hero .subtitle {
    font-size: 0.9rem;
  }

  .about-card {
    padding: 1.2rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .nitori-face {
    width: 100px;
    height: 120px;
  }

  .nitori-face .face-circle {
    width: 85px;
    height: 85px;
  }

  .nitori-face .hair {
    width: 95px;
    height: 60px;
    top: 24px;
  }

  .nitori-face .hat {
    width: 50px;
    height: 22px;
    top: 8px;
  }

  .nitori-face .eye {
    width: 7px;
    height: 7px;
    top: 33px;
  }

  .nitori-face .eye.left { left: 25px; }
  .nitori-face .eye.right { right: 25px; }

  .nitori-face .blush {
    top: 43px;
  }

  .nitori-face .blush.left { left: 14px; }
  .nitori-face .blush.right { right: 14px; }

  .nitori-face .mouth {
    top: 50px;
  }
}

/* === Nitori Day Banner === */
.nitori-day-banner {
  background: linear-gradient(90deg, var(--kappa-green), #4CAF50, var(--kappa-green));
  color: white;
  text-align: center;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* === River Source Label === */
.river-source {
  font-size: 0.75rem;
  opacity: 0.6;
  font-style: italic;
}

/* === Ironic Tag Variant === */
.tag.ironic {
  background: var(--blue);
  font-style: italic;
}

/* === Haughty Face Expression === */
.nitori-face.haughty .mouth {
  border-bottom: none;
  border-top: 2.5px solid #C48B6E;
  border-radius: 50% 50% 0 0;
}

.nitori-face.haughty .blush {
  opacity: 0.25;
}

.nitori-face.haughty {
  animation: nitori-haughty 0.6s ease-in-out 2;
}

@keyframes nitori-haughty {
  0%, 100% { transform: scale(1.05) translateY(0); }
  50% { transform: scale(1.08) translateY(-4px); }
}

/* === Cucumber Rain === */
.cucumber-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.cucumber-drop {
  position: absolute;
  top: -20px;
  left: var(--x, 50vw);
  font-size: 1.5rem;
  animation: cucumber-fall var(--speed, 3s) var(--delay, 0s) linear forwards;
  transform: rotate(var(--rotate, 0deg));
}

@keyframes cucumber-fall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0;
  }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .greeting .cursor {
    display: none;
  }
}
