/* =============================================
   山崎文栄堂 LP - Global CSS
   ============================================= */

/* CSS Custom Properties */
:root {
  --background: #FFFFFF;
  --foreground: #1a1a2e;
  --card: #FFFFFF;
  --card-foreground: #1a1a2e;
  --primary: #0061D5;
  --primary-foreground: #FFFFFF;
  --secondary: #F5F7F9;
  --secondary-foreground: #1a1a2e;
  --muted: #F5F7F9;
  --muted-foreground: #64748b;
  --accent: #29B6F6;
  --accent-foreground: #FFFFFF;
  --destructive: #ef4444;
  --destructive-foreground: #FFFFFF;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #0061D5;
  --radius: 0.625rem;
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

/* =============================================
   Scroll Animations (framer-motion replacement)
   ============================================= */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.animated {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-left.animated {
  opacity: 1;
  transform: translateX(0);
}

/* Hero: animate on load immediately */
.hero-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.hero-animate.delay-1 {
  transition-delay: 0.2s;
}
.hero-animate.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Transition delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* =============================================
   Bounce animation for ChevronDown
   ============================================= */

@keyframes bounce-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
.animate-bounce-y {
  animation: bounce-y 1.5s ease-in-out infinite;
}

/* =============================================
   Sticky CTA Bar
   ============================================= */

#sticky-cta {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  background-color: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
#sticky-cta.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* =============================================
   Component Styles
   ============================================= */

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Noto Sans JP', sans-serif;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,97,213,0.3);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  color: var(--foreground);
  border: 2px solid rgba(100, 116, 139, 0.3);
  border-radius: var(--radius);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Noto Sans JP', sans-serif;
}
.btn-outline:hover {
  background-color: var(--muted);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Cards */
.card {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

/* Image Placeholder */
.img-placeholder {
  background-color: var(--muted);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.img-placeholder::before {
  content: '';
  display: block;
  padding-top: 75%; /* 4/3 ratio default */
}
.img-placeholder.ratio-16-9::before { padding-top: 56.25%; }
.img-placeholder.ratio-4-3::before { padding-top: 75%; }
.img-placeholder span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.2rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* =============================================
   Section-specific Styles
   ============================================= */

/* Hero grid pattern */
.hero-pattern {
  background-image:
    linear-gradient(to right, rgba(0, 97, 213, 0.063) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 97, 213, 0.063) 1px, transparent 1px);
  background-size: 4rem 4rem;
}

/* Problems section header */
.problem-card-header {
  background-color: var(--primary);
  padding: 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Pricing: recommended card */
.pricing-card-recommended {
  border: 2px solid var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(0, 97, 213, 0.1), 0 8px 24px rgba(0,0,0,0.1) !important;
}
.pricing-card-accent {
  border: 2px solid #EE8451 !important;
  box-shadow: 0 0 0 4px rgba(238, 132, 81, 0.1), 0 8px 24px rgba(0,0,0,0.1) !important;
}

/* Flow: step connector */
.flow-line-h {
  display: none;
  position: absolute;
  top: 2.5rem;
  left: 12%;
  right: 12%;
  height: 2px;
  background-color: rgba(0, 97, 213, 0.2);
}
@media (min-width: 1024px) {
  .flow-line-h {
    display: block;
  }
}

.flow-line-v {
  display: block;
  position: absolute;
  left: 2.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: rgba(0, 97, 213, 0.2);
}
@media (min-width: 1024px) {
  .flow-line-v {
    display: none;
  }
}

/* Company table */
.company-table th {
  background-color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding: 1rem 1.5rem;
  color: var(--foreground);
  width: 33%;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.company-table td {
  padding: 1rem 1.5rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.company-table tr:last-child th,
.company-table tr:last-child td {
  border-bottom: none;
}

/* =============================================
   Contact Form Styles
   ============================================= */

.form-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  color: var(--foreground);
  background-color: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.form-input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(0, 97, 213, 0.15);
}
.form-input.error {
  border-color: var(--destructive);
}

.form-radio-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.form-radio-item:hover {
  border-color: rgba(0, 97, 213, 0.5);
}
.form-radio-item input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.form-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.form-checkbox-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.form-error {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--destructive);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-size: 1.125rem;
  font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-submit:hover {
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(0,97,213,0.3);
}

/* Success card */
.success-card {
  text-align: center;
  padding: 3rem 2rem;
}

/* Feature 4 card: responsive padding */
.feature4-content {
  padding: 50px 25px;
}
@media (min-width: 1024px) {
  .feature4-content {
    padding: 50px 60px;
  }
}

/* BOXでできること: p description min-height */
.feature-desc {
  min-height: 6rem; /* mobile */
}
@media (min-width: 1024px) {
  .feature-desc {
    min-height: 5rem; /* desktop, matches Figma ~80px */
  }
}

/* BOXでできること: h3 min-height (all cards) */
.feature-h3 {
  min-height: 3.5rem;
  white-space: pre-line;
}
@media (min-width: 1024px) {
  .feature-h3 {
    min-height: 4rem; /* Figma: 64.5px */
  }
}


/* Hidden utility */
.hidden { display: none !important; }
