/* ===================================
   Main Styles - Lapify
   =================================== */

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

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-body);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  padding: 1rem 0;
  z-index: var(--z-fixed);
  transition: all var(--transition-base);
}

.header.scrolled {
  background: var(--primary);
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.header-nav a {
  color: var(--white);
  font-weight: 500;
  font-size: 0.9rem;
  transition: opacity var(--transition-fast);
}

.header-nav a:hover {
  opacity: 0.8;
}

.header-nav .btn {
  margin-left: 1rem;
  background: var(--accent);
  color: var(--white);
  border: none;
}

.header-nav .btn:hover {
  background: #ea580c;
  transform: translateY(-2px);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  flex-direction: column;
  gap: 1.5rem;
  z-index: var(--z-dropdown);
}

.mobile-menu a {
  color: var(--gray-dark);
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-light);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: 80px;
  padding-bottom: 3rem;
}

.hero > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
  width: 100%;
}

.hero-wrapper {
  display: flex;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 10;
}

.hero-content {
  flex: 1.5;
  color: var(--white);
  max-width: none;
}

.hero-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slideUpFade 1s ease-out;
  position: relative;
}

.hero-media img {
  width: 100%;
  height: auto;
  max-width: 500px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

.hero-accent-image {
  position: absolute;
  bottom: -150px;
  right: -120px;
  width: 5px;
  /* height: auto; */
  z-index: 30;
  /* box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); */
  /* border-radius: var(--radius-lg); */
  animation: fadeInScale 1s ease-out 0.5s both, floatUpDown 3s ease-in-out infinite;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.01);
  }
  100% {
    opacity: 1;
    transform: scale(0.03);
  }
}

@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(0) scale(0.5);
  }
  50% {
    transform: translateY(-15px) scale(0.5);
  }
}

/* iPhone Mockup with Video/Iframe */
.iphone-mockup {
  position: relative;
  width: 100%;
  max-width: 350px;
}

.mockup-frame {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.mockup-video {
  position: absolute;
  top: 5%;
  left: 0.5%;
  width: 78%;
  height: auto;
  max-height: 89%;
  object-fit: contain;
  border-radius: 28px;
  z-index: 1;
}

.mockup-browser-bar {
  position: absolute;
  top: 3.5%;
  left: 7.2%;
  width: 85.4%;
  height: 6%;
  background: #f5f5f7;
  border-radius: 28px 28px 0 0;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
  z-index: 2;
  border-bottom: 1px solid #e0e0e0;
}

.browser-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #ffbd2e;
}

.dot-green {
  background: #28c840;
}

.browser-address-bar {
  flex: 1;
  background: white;
  border-radius: 4px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  height: 60%;
}

.address-text {
  font-size: 7px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.mockup-iframe-container {
  position: absolute;
  top: 12.3%;
  left: 6.7%;
  width: 86.5%;
  height: 83.8%;
  border-radius: 0 0 32px 32px;
  overflow: hidden;
  z-index: 1;
  background: white;
}

.mockup-iframe {
  width: 100%;
  height: 100%;
  border: none;
  transform-origin: top left;
  transform: scale(0.5);
  width: 200%;
  height: 200%;
}

@keyframes slideUpFade {
  0% {
    opacity: 0;
    transform: translateY(100px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: var(--spacing-lg);
  line-height: 1.2;
}

.hero-title .highlight {
  color: var(--yellow);
  font-size: 3.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  opacity: 0.95;
}

.hero-description {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: var(--spacing-2xl);
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  width: 100%;
  max-width: 400px;
}

.hero-cta .btn {
  width: 100%;
}

.hero-cta .btn-primary {
  background: var(--accent);
  color: var(--white);
  border: none;
}

.hero-cta .btn-primary:hover {
  background: #ea580c;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.hero-cta .btn-outline {
  border-color: var(--white);
  color: var(--white);
  background: transparent;
}

.hero-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Features Section */
.features {
  background: var(--white);
  padding: 6rem 0;
}

.features > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.features-grid {
  display: grid;
  gap: 2.5rem;
}

/* Improvement Info Section */
.improvement-info {
  background: var(--bg-light-blue);
  padding: 6rem 0;
}

.improvement-info > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.improvement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: var(--spacing-3xl);
}

.improvement-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.improvement-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.improvement-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 3px solid var(--primary);
}

.improvement-text {
  color: var(--gray-dark);
  line-height: 1.8;
  font-size: 1rem;
}

.improvement-solution {
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-lg);
}

.improvement-solution-content {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.improvement-solution-text-wrapper {
  flex: 1;
  text-align: left;
}

.improvement-solution-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: var(--spacing-lg);
  line-height: 1.4;
}

.improvement-solution-text {
  color: var(--gray-dark);
  line-height: 1.8;
  font-size: 1rem;
}

.improvement-solution-image {
  flex: 0 0 auto;
  max-width: 250px;
}

.improvement-solution-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Problems & Solutions Wrapper */
.problems-solutions-wrapper {
  background: linear-gradient(to bottom, var(--bg-light-blue) 0%, var(--bg-light-blue) 50%, var(--white) 50%, var(--white) 100%);
  padding: 6rem 0;
}

.problems-solutions-wrapper > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.problems-solutions-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-3xl);
  box-shadow: var(--shadow-2xl);
}

.problems-section,
.solutions-section {
  width: 100%;
}

.problems-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.problems-image {
  max-width: 500px;
  width: 100%;
}

.problems-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.problems-grid {
  display: grid;
  gap: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.problems-column h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  margin-bottom: var(--spacing-lg);
  color: var(--dark);
}

.problems-solutions-container .section-header {
  margin-bottom: var(--spacing-lg);
}

/* Arrow Connector */
.arrow-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
  position: relative;
}

.arrow-connector::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--primary) 30%, var(--accent) 70%, transparent 100%);
  transform: translateX(-50%);
}

.arrow-line {
  display: none;
}

.arrow-head {
  position: relative;
  z-index: 1;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
  animation: arrowFloat 3s ease-in-out infinite;
}

.arrow-head::before {
  content: "↓";
  font-size: 2rem;
  color: var(--white);
  font-weight: bold;
  animation: arrowBounce 2s ease-in-out infinite;
}

.arrow-head::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: ripple 3s ease-out infinite;
}

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

@keyframes arrowBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

@keyframes ripple {
  0% {
    width: 60px;
    height: 60px;
    opacity: 0.8;
  }
  100% {
    width: 100px;
    height: 100px;
    opacity: 0;
  }
}

/* Pricing Section */
.pricing {
  background: var(--white);
  padding: 6rem 0;
}

.pricing > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: stretch;
}

/* Process Section */
.process {
  background: var(--bg-light-blue);
  padding: 6rem 0;
}

.process > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* FAQ Section */
.faq {
  background: var(--white);
  padding: 6rem 0;
}

.faq > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  padding: 1.5rem 2rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform var(--transition-base);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq-answer-content {
  padding: 0 2rem 1.5rem 2rem;
  color: var(--gray);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* Contact Section */
.contact {
  background: var(--gradient-hero);
  color: var(--white);
  text-align: center;
  padding: 6rem 0;
}

.contact > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.contact .section-title,
.contact .section-subtitle {
  color: var(--white);
}

.contact-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: var(--spacing-2xl);
}

.contact-cta .btn-primary {
  background: var(--accent);
  color: var(--white);
}

.contact-cta .btn-primary:hover {
  background: #ea580c;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.contact-cta .btn-outline {
  border-color: var(--white);
  color: var(--white);
}

.contact-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Footer */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-section a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xl);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* Fixed CTA Button */
.fixed-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.fixed-cta-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1.125rem;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.fixed-cta-btn:hover {
  background: #E64A19;
  transform: translateY(-3px);
}

/* モバイル版では下部全幅に配置 */
@media (max-width: 640px) {
  .fixed-cta {
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
  }
  
  .fixed-cta-btn {
    width: 100%;
    text-align: center;
    padding: 1.125rem 1.5rem;
    font-size: 1rem;
  }
}

/* Yellow Highlight Text */
.yellow-text {
  color: var(--yellow);
  font-weight: 800;
}

/* Highlight Marker */
.highlight-marker {
  background: linear-gradient(transparent 60%, #fef08a 60%);
  padding: 0 0.2em;
  font-weight: 700;
}

/* Underlined Heading */
.underlined-heading {
  position: relative;
  display: inline-block;
  padding-bottom: 1rem;
}

.underlined-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--dark);
}
