/* Design System */
:root {
  /* Let the browser know we support both */
  color-scheme: light dark;

  /* Page base */
  /* Matches app's light background (very pale cyan) */
  --page-bg: #e9fbff;

  /* Backgrounds */
  --bg1: rgba(0, 122, 255, 0.10);
  --bg2: rgba(0, 122, 255, 0.08);
  --bg3: rgba(0, 188, 212, 0.09);
  --bg4: rgba(0, 150, 136, 0.08);
  --bg5: rgba(0, 188, 212, 0.07);
  --blob-blue: rgba(0, 122, 255, 0.18);
  --blob-cyan: rgba(0, 188, 212, 0.12);
  --blob-teal: rgba(0, 150, 136, 0.10);
  --blob-blue-2: rgba(0, 122, 255, 0.09);

  /* Colors (Light) */
  --text: #0a2540;
  --text-weak: rgba(11, 18, 32, 0.72);
  --surface: rgba(255, 255, 255, 0.60);
  --surface-solid: rgba(255, 255, 255, 0.85);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --surface-menu: rgba(255, 255, 255, 0.98);
  --surface-hover: rgba(255, 255, 255, 0.55);
  --stroke: rgba(60, 60, 67, 0.16);
  /* Matches app's iOS blue accent */
  --accent: #007aff;
  --accent-hover: #0066d6;
  --success: #10b981;

  /* Shadows (Light) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Page base */
    /* Matches app's dark background (deep navy) */
    --page-bg: #071a2b;

    /* Backgrounds (Dark) */
    --bg1: rgba(0, 122, 255, 0.18);
    --bg2: rgba(0, 122, 255, 0.12);
    --bg3: rgba(0, 188, 212, 0.11);
    --bg4: rgba(0, 150, 136, 0.10);
    --bg5: rgba(0, 188, 212, 0.08);
    --blob-blue: rgba(0, 122, 255, 0.22);
    --blob-cyan: rgba(0, 188, 212, 0.14);
    --blob-teal: rgba(0, 150, 136, 0.12);
    --blob-blue-2: rgba(0, 122, 255, 0.10);

    /* Colors (Dark) */
    --text: #dbe8ff;
    --text-weak: rgba(234, 240, 255, 0.74);
    --surface: rgba(18, 26, 46, 0.62);
    --surface-solid: rgba(18, 26, 46, 0.86);
    --surface-strong: rgba(22, 33, 56, 0.94);
    --surface-menu: rgba(12, 18, 32, 0.98);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --stroke: rgba(255, 255, 255, 0.14);
    --accent: #0a84ff;
    --accent-hover: #409cff;

    /* Shadows (Dark) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.65);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic UI', 'YuGothic', 'Meiryo', sans-serif; color: var(--text); line-height: 1.6; background: var(--page-bg); }

/* Background (replicates ChatBackgroundView + AnimatedBlueTealBackground) */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: -1; background: var(--page-bg); }
.bg-layer { position: absolute; inset: 0; }
.bg-gradient { background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 25%, var(--bg3) 50%, var(--bg4) 75%, var(--bg5) 100%); }
.bg-blobs::before, .bg-blobs::after { content: ""; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(40px); transform: translate(-20%, -20%); animation: float-1 22s ease-in-out infinite alternate; background: radial-gradient(circle at 30% 30%, var(--blob-blue), transparent 60%); }
.bg-blobs::after { left: auto; right: -10vmax; top: 20vmin; width: 50vmax; height: 50vmax; animation: float-2 26s ease-in-out infinite alternate; background: radial-gradient(circle at 70% 70%, var(--blob-cyan), transparent 60%), radial-gradient(circle at 40% 30%, var(--blob-teal), transparent 65%), radial-gradient(circle at 60% 20%, var(--blob-blue-2), transparent 70%); }

@keyframes float-1 { 0% { transform: translate(-12%, -8%) scale(1.0); } 100% { transform: translate(-18%, -14%) scale(1.05); } }
@keyframes float-2 { 0% { transform: translate(6%, -4%) scale(1.0); } 100% { transform: translate(2%, -6%) scale(1.06); } }

/* Layout */
.container { max-width: 1000px; margin: 0 auto; padding: clamp(16px, 2.5vw, 32px); }

/* Hero Section */
.hero { text-align: center; padding: clamp(40px, 8vw, 80px) 0 clamp(32px, 6vw, 64px); }
.hero-content { max-width: 720px; margin: 0 auto; }
/* Language Dropdown */
.lang-switch { position: relative; display: inline-block; }
.lang-switch-fixed { position: fixed !important; top: 16px; right: 16px; left: auto !important; z-index: 1000; }
.lang-dropdown-btn { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--stroke); background: var(--surface-solid); backdrop-filter: saturate(180%) blur(8px); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; box-shadow: var(--shadow-sm); }
.lang-dropdown-btn:hover { background: var(--surface-strong); box-shadow: var(--shadow-md); }
.lang-dropdown-btn::before { content: "🌐"; font-size: 16px; }
.lang-dropdown-btn::after { content: "▼"; font-size: 10px; margin-left: 4px; opacity: 0.6; }
.lang-dropdown-menu { position: absolute; top: 100%; right: 0; margin-top: 4px; min-width: 140px; background: var(--surface-menu); border: 1px solid var(--stroke); border-radius: 8px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.2s ease; z-index: 1001; }
.lang-switch-fixed .lang-dropdown-menu { right: 0; }
.lang-switch.open .lang-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown-menu a { display: block; padding: 10px 14px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 500; transition: background 0.15s ease; }
.lang-dropdown-menu a:first-child { border-radius: 8px 8px 0 0; }
.lang-dropdown-menu a:last-child { border-radius: 0 0 8px 8px; }
.lang-dropdown-menu a:hover { background: rgba(0, 188, 212, 0.08); }
.lang-dropdown-menu a.is-active { background: rgba(0, 188, 212, 0.12); color: var(--accent); font-weight: 600; }
.hero-icon { width: clamp(80px, 15vw, 120px); height: clamp(80px, 15vw, 120px); margin: 0 auto 24px; display: block; border-radius: 22%; box-shadow: var(--shadow-lg); transition: transform 0.3s ease; }
.hero-icon:hover { transform: scale(1.05); }
.hero-title { margin: 0 0 16px; font-size: clamp(32px, 5vw, 56px); font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.hero-subtitle { margin: 0 0 32px; font-size: clamp(16px, 2vw, 20px); color: var(--text-weak); line-height: 1.5; }
.hero-nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.hero-nav a { padding: 8px 16px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--stroke); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s ease; }
.hero-nav a:hover { background: var(--surface-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* Sections */
.section { margin-top: clamp(48px, 8vw, 80px); }
.section-title-large { margin: 0 0 clamp(24px, 4vw, 40px); font-size: clamp(24px, 3.5vw, 36px); font-weight: 700; text-align: center; letter-spacing: -0.3px; }

/* CTA Button */
.cta-button { display: inline-flex; align-items: center; gap: 10px; padding: 16px 32px; background: var(--accent); color: white; text-decoration: none; border-radius: 12px; font-size: 16px; font-weight: 600; box-shadow: var(--shadow-lg); transition: all 0.2s ease; border: none; cursor: pointer; }
.cta-button:hover { background: var(--accent-hover); box-shadow: var(--shadow-xl); transform: translateY(-2px); }
.cta-button:active { transform: translateY(0); }
.cta-button-large { padding: 20px 40px; font-size: 18px; }
.cta-icon { width: clamp(80px, 15vw, 120px); height: clamp(80px, 15vw, 120px); margin: 0 auto 24px; display: block; border-radius: 22%; box-shadow: var(--shadow-lg); transition: transform 0.3s ease; }
.cta-icon:hover { transform: scale(1.05); }
.cta-text { line-height: 1; }

/* Card Grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature-card { backdrop-filter: saturate(180%) blur(8px); background: var(--surface); border: 1px solid var(--stroke); border-radius: 16px; padding: 28px 24px; text-align: center; transition: all 0.3s ease; box-shadow: var(--shadow-sm); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.card-icon { font-size: 48px; margin-bottom: 16px; }
.card-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.card-description { margin: 0; color: var(--text-weak); font-size: 15px; line-height: 1.6; }

/* Feature List */
.feature-list { display: grid; gap: 16px; max-width: 800px; margin: 0 auto; }
.feature-item { display: flex; gap: 20px; align-items: flex-start; backdrop-filter: saturate(180%) blur(8px); background: var(--surface); border: 1px solid var(--stroke); border-radius: 14px; padding: 24px; transition: all 0.2s ease; box-shadow: var(--shadow-sm); }
.feature-item:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.feature-icon { font-size: 36px; flex-shrink: 0; }
.feature-content { flex: 1; }
.feature-heading { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.feature-text { margin: 0; color: var(--text-weak); line-height: 1.6; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto; }
.step { text-align: center; backdrop-filter: saturate(180%) blur(8px); background: var(--surface); border: 1px solid var(--stroke); border-radius: 16px; padding: 32px 24px; transition: all 0.3s ease; box-shadow: var(--shadow-sm); }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; background: var(--accent); color: white; font-size: 32px; font-weight: 700; border-radius: 50%; margin-bottom: 20px; box-shadow: var(--shadow-md); }
.step-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.step-description { margin: 0; color: var(--text-weak); font-size: 15px; line-height: 1.6; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { backdrop-filter: saturate(180%) blur(8px); background: var(--surface); border: 1px solid var(--stroke); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); transition: all 0.2s ease; }
.faq-item:hover { box-shadow: var(--shadow-md); }
.faq-item[open] { border-color: var(--accent); }
.faq-question { display: flex; align-items: center; gap: 12px; padding: 20px 24px; cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; user-select: none; transition: background 0.2s ease; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { background: var(--surface-hover); }
.faq-icon { font-size: 24px; flex-shrink: 0; }
.faq-text { flex: 1; }
.faq-toggle { opacity: 0.5; transition: transform 0.2s ease; }
.faq-item[open] .faq-toggle { transform: rotate(180deg); }
.faq-answer { padding: 0 24px 24px 60px; color: var(--text-weak); line-height: 1.7; }

/* Link list */
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 600px; margin: 0 auto; }
.link-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-radius: 14px; text-decoration: none; color: var(--text); background: var(--surface-solid); border: 1px solid var(--stroke); transition: all 0.2s ease; box-shadow: var(--shadow-sm); }
.link-item:hover { background: var(--surface-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.link-item:active { transform: translateY(0); }
.link-item .sub { color: var(--text-weak); font-size: 14px; margin-left: 6px; }
.arrow { opacity: 0.6; }

/* Policy */
.policy-section { text-align: center; }
.policy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 700px; margin: 0 auto; }
.policy-card { backdrop-filter: saturate(180%) blur(8px); background: var(--surface); border: 1px solid var(--stroke); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-sm); transition: all 0.2s ease; }
.policy-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.policy-card-title { margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.policy-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.policy-links a { display: inline-block; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--surface-solid); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s ease; }
.policy-links a:hover { background: var(--surface-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }

/* CTA Footer */
.cta-footer { text-align: center; margin-top: clamp(64px, 10vw, 100px); padding: clamp(48px, 8vw, 64px) clamp(24px, 4vw, 48px); backdrop-filter: saturate(180%) blur(8px); background: var(--surface); border: 1px solid var(--stroke); border-radius: 20px; box-shadow: var(--shadow-lg); }
.cta-footer-title { margin: 0 0 12px; font-size: clamp(24px, 3.5vw, 32px); font-weight: 700; }
.cta-footer-text { margin: 0 0 32px; color: var(--text-weak); font-size: clamp(15px, 2vw, 18px); }

/* Footer */
.page-footer { text-align: center; color: var(--text-weak); padding: 40px 0 40px; font-size: 14px; }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.testimonial-card { position: relative; backdrop-filter: saturate(180%) blur(8px); background: var(--surface); border: 1px solid var(--stroke); border-radius: 16px; padding: 32px 24px; text-align: center; transition: all 0.3s ease; box-shadow: var(--shadow-sm); }
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.testimonial-icon { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 64px; color: var(--accent); opacity: 0.2; }
.testimonial-text { margin: 0 0 16px; font-size: 16px; font-style: italic; color: var(--text); line-height: 1.7; }
.testimonial-author { margin: 0; font-size: 14px; color: var(--text-weak); font-weight: 500; }
.testimonial-note { margin-top: 24px; text-align: center; color: var(--text-weak); font-size: 14px; font-style: italic; }

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-title { font-size: clamp(28px, 8vw, 40px); }
  .card-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .feature-item { flex-direction: column; text-align: center; }
  .faq-answer { padding-left: 24px; }
  .policy-grid { grid-template-columns: 1fr; }
  .lang-switch-fixed { top: 12px; right: 12px; }
  .lang-dropdown-btn { padding: 6px 12px; font-size: 12px; }
  .lang-dropdown-btn::before { font-size: 14px; }
}

@media (max-width: 480px) {
  .hero { padding-top: 32px; }
  .hero-nav { gap: 8px; }
  .hero-nav a { padding: 6px 12px; font-size: 13px; }
  .cta-button { padding: 14px 24px; font-size: 15px; }
  .cta-button-large { padding: 16px 28px; font-size: 16px; }
  .section { margin-top: 40px; }
}
