/* ===== CSS Variables ===== */
:root {
  --color-primary: #10b981;
  --color-primary-dark: #059669;
  --color-primary-light: #d1fae5;
  --color-text: #1f2937;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;
  --color-bg: #ffffff;
  --color-bg-secondary: #f9fafb;
  --color-bg-accent: #ecfdf5;
  --color-border: #e5e7eb;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  --max-width: 1120px;
  --section-padding: 6rem 1.5rem;
  --section-padding-mobile: 4rem 1rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.125rem;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-padding);
}

@media (max-width: 768px) {
  section {
    padding: var(--section-padding-mobile);
  }
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: 64px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  flex-wrap: nowrap;
  gap: 1rem;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
  min-width: 0;
}

.header__logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.header__logo span {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .header__nav {
    gap: 1.5rem;
  }
}

.header__link {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

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

/* Hide blog link on very small screens to prevent overflow */
@media (max-width: 374px) {
  .header__link {
    display: none;
  }
}

.header__lang {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: background-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.header__lang:hover {
  background-color: var(--color-bg-secondary);
  opacity: 1;
}

.header__cta {
  display: none !important;
}

@media (min-width: 640px) {
  .header__cta {
    display: inline-flex !important;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  opacity: 1;
}

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

.btn--secondary:hover {
  background: var(--color-bg-secondary);
  opacity: 1;
}

.btn--small {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* ===== Hero Section ===== */
.hero {
  padding-top: calc(64px + 4rem);
  padding-bottom: 4rem;
  background: linear-gradient(180deg, var(--color-bg-accent) 0%, var(--color-bg) 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.hero__content {
  text-align: center;
}

@media (min-width: 768px) {
  .hero__content {
    text-align: left;
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

.hero__badge span {
  font-size: 1rem;
}

.hero__title {
  margin-bottom: 1.25rem;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #10b981, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
}

@media (min-width: 768px) {
  .hero__subtitle {
    margin-left: 0;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero__cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero__cta {
    flex-direction: row;
    align-items: flex-start;
  }
}

.hero__visual {
  display: flex;
  justify-content: center;
  position: relative;
}

/* ===== Phone Mockup ===== */
.phone-mockup {
  width: 260px;
  max-width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 6px solid #1f2937;
  background: #1f2937;
}

.phone-mockup--small {
  width: 220px;
  border-radius: 24px;
  border-width: 5px;
}

@media (max-width: 767px) {
  .phone-mockup {
    width: 200px;
    border-radius: 20px;
    border-width: 4px;
  }

  .phone-mockup--small {
    width: 180px;
  }
}

/* ===== Feature Rows (Alternating Layout) ===== */
.feature-row {
  padding: var(--section-padding);
}

.feature-row:nth-child(even) {
  background: var(--color-bg-secondary);
}

.feature-row__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .feature-row__inner {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
}

/* Reverse order for alternating layout */
@media (min-width: 768px) {
  .feature-row--reverse .feature-row__inner {
    direction: rtl;
  }

  .feature-row--reverse .feature-row__inner > * {
    direction: ltr;
  }
}

.feature-row__content {
  text-align: center;
}

@media (min-width: 768px) {
  .feature-row__content {
    text-align: left;
  }
}

.feature-row__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.feature-row__title {
  margin-bottom: 1rem;
}

.feature-row__desc {
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.feature-row__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-row__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.feature-row__list li::before {
  content: '✓';
  color: var(--color-primary);
  font-weight: 700;
  flex-shrink: 0;
}

.feature-row__visual {
  display: flex;
  justify-content: center;
}

@media (max-width: 767px) {
  .feature-row__visual {
    order: -1;
  }
}

/* ===== FAQ Section ===== */
.faq {
  background: var(--color-bg);
}

.faq__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.faq__header p {
  color: var(--color-text-secondary);
  margin-top: 0.75rem;
}

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

@media (min-width: 640px) {
  .faq__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

.faq__item {
  padding: 1.5rem;
  background: var(--color-bg-secondary);
  border-radius: 1rem;
}

.faq__question {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.faq__answer {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  opacity: 0.9;
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

.cta-section .btn--primary {
  background: white;
  color: var(--color-primary-dark);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.cta-section .btn--primary:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer__logo span {
  font-weight: 600;
  color: var(--color-text);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.footer__social {
  display: inline-flex;
  align-items: center;
}

.footer__social svg {
  transition: opacity 0.2s;
}

.footer__social:hover svg {
  opacity: 0.7;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ===== Utilities ===== */
.text-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

/* Initial hidden state for animations */
[class*="animate-fade"] {
  opacity: 0;
}
