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

:root {
  --black: #1a1a1a;
  --gray: #4a4a4a;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --white: #ffffff;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-light: #6b7280;
  --radius: 12px;
  --font-jp: 'Noto Sans JP', sans-serif;
  --font-en: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== COMMON ===== */
.section-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

/* ===== TEXT BLOCKS (Design Signature) ===== */
.text-block {
  display: inline-block;
  padding: 8px 20px;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.3;
  transform: translateX(-120%) skewX(-3deg);
  opacity: 0;
  transition: none;
}

.text-block span {
  display: inline-block;
  transform: skewX(3deg);
}

.text-block.black { background: var(--black); }
.text-block.gray  { background: var(--gray); }
.text-block.blue  { background: var(--blue); }

/* Animation: block slides in */
.text-block.anim-block.visible {
  animation: blockSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes blockSlideIn {
  0% {
    transform: translateX(-120%) skewX(-3deg);
    opacity: 0;
  }
  60% {
    transform: translateX(4%) skewX(-1deg);
    opacity: 1;
  }
  100% {
    transform: translateX(0) skewX(0deg);
    opacity: 1;
  }
}

/* Fade animation */
.anim-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: none;
}

.anim-fade.visible {
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card animation */
.anim-card {
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: none;
}

.anim-card.visible {
  animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
  animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

.hero-inner {
  max-width: 800px;
  padding: 60px 24px;
  position: relative;
  z-index: 1;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 60px;
}

.hero-sub strong {
  font-size: 1.3em;
  color: var(--blue);
}

/* ===== PIXEL CHARACTER ===== */
.pixel-character {
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
}

.pixel-grid {
  display: grid;
  grid-template-columns: repeat(12, 8px);
  grid-template-rows: repeat(14, 8px);
  gap: 1px;
  image-rendering: pixelated;
  animation: pixelBounce 2s ease-in-out infinite;
}

@keyframes pixelBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.pixel-grid .p {
  width: 8px;
  height: 8px;
  border-radius: 1px;
}

.pixel-shadow {
  width: 80px;
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: 50%;
  margin: 4px auto 0;
  animation: shadowPulse 2s ease-in-out infinite;
}

@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.3; }
  50% { transform: scaleX(0.7); opacity: 0.15; }
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 3px;
}

.scroll-arrow {
  width: 2px;
  height: 40px;
  background: var(--text-light);
  position: relative;
  animation: scrollBounce 1.5s ease-in-out infinite;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-light);
  border-bottom: 2px solid var(--text-light);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.5; }
}

/* ===== SKILLS ===== */
.skills {
  background: var(--bg);
}

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

.skill-card {
  background: var(--card-bg);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: default;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.skill-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.skill-desc {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 400;
}

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

.pricing-box {
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.pricing-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(37,99,235,0.1), transparent, rgba(37,99,235,0.05), transparent);
  animation: pricingRotate 10s linear infinite;
}

@keyframes pricingRotate {
  to { transform: rotate(360deg); }
}

.pricing-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pricing-label {
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 700;
}

.pricing-plus {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--blue);
  font-weight: 900;
}

.pricing-amount {
  font-family: var(--font-en);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -2px;
}

.pricing-amount .yen {
  font-size: 0.6em;
  color: var(--blue);
}

.pricing-amount .from {
  font-size: 0.4em;
  font-family: var(--font-jp);
  letter-spacing: 0;
}

.pricing-note {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
}

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

.feature {
  background: var(--card-bg);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.feature-text {
  font-size: 0.85rem;
  font-weight: 700;
}

/* ===== CTA / FORM ===== */
.cta {
  background: var(--bg);
}

.contact-form {
  background: var(--card-bg);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  padding: 40px 32px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.input-wrap {
  display: flex;
  align-items: center;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.input-wrap:focus-within {
  border-color: var(--blue);
}

.input-prefix {
  padding: 12px 0 12px 16px;
  color: var(--text-light);
  font-family: var(--font-en);
  font-weight: 700;
  user-select: none;
}

.input-wrap input {
  border: none;
  outline: none;
  flex: 1;
  padding: 12px 16px 12px 4px;
  font-size: 1rem;
  font-family: var(--font-en);
}

input[type="email"],
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-jp);
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

input[type="email"]:focus,
textarea:focus {
  border-color: var(--blue);
}

/* Checkbox chips */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.chip input {
  display: none;
}

.chip span {
  display: inline-block;
  padding: 8px 16px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s ease;
  user-select: none;
}

.chip input:checked + span {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  transform: scale(1.05);
}

.chip:hover span {
  border-color: var(--blue);
}

/* Submit button */
.submit-btn {
  width: 100%;
  padding: 16px 32px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-jp);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
}

.submit-btn:hover {
  background: var(--blue);
}

.submit-btn .btn-arrow {
  transition: transform 0.3s ease;
  font-family: var(--font-en);
}

.submit-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* Submit button ripple */
.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.submit-btn:active::after {
  transform: scaleX(1);
}

/* Success state */
.form-success {
  display: none;
  text-align: center;
  padding: 60px 20px;
}

.form-success.show {
  display: block;
  animation: fadeUp 0.5s ease forwards;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 16px;
  animation: successPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.form-success p {
  font-size: 1.2rem;
  font-weight: 700;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.75rem;
  color: var(--text-light);
  background: var(--white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .features-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-inner {
    padding: 80px 16px;
  }

  .contact-form {
    padding: 24px 16px;
  }

  .pricing-box {
    padding: 32px 20px;
  }

  .pixel-grid {
    grid-template-columns: repeat(12, 6px);
    grid-template-rows: repeat(14, 6px);
  }

  .pixel-grid .p {
    width: 6px;
    height: 6px;
  }
}

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

/* ===== FLOATING PARTICLES ===== */
.particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--blue);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  animation: particleFloat 6s ease-in-out infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.3; }
  90% { opacity: 0.1; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}
