/* ── Fonts ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* ── Design Tokens ─────────────────────────────── */
:root {
  --blue: #7BADC4;
  --blue-light: #B5D5E2;
  --blue-dark: #5A8FA8;
  --blue-deep: #3D7A96;
  --yellow: #F0B840;
  --yellow-light: #F7D57A;
  --yellow-dark: #D9A020;
  --cream: #FFF9F0;
  --cream-dark: #FFF3E0;
  --text: #2C3E50;
  --text-light: #6B7D8D;
  --text-muted: #94A3B3;
  --bg: #FEFCFA;
  --white: #FFFFFF;
  --green: #5A9E4B;
  --green-light: #E8F5E3;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.10);
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
  --transition-slow: 0.5s cubic-bezier(.4,0,.2,1);
  --bounce: 0.5s cubic-bezier(.34,1.56,.64,1);
}

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

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

body {
  font-family: 'Nunito', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Shared ───────────────────────────────────── */
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-title--center {
  text-align: center;
  margin-bottom: 48px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Nav ──────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(254,252,250,0.8);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(123,173,196,0.1);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  height: 38px;
  width: auto;
  transition: transform var(--transition);
}
.nav-logo:hover { transform: scale(1.04); }

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 110;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  border-radius: 2px;
  background: var(--text);
  transition: all var(--transition);
}
.nav-toggle:checked ~ .nav-hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle:checked ~ .nav-hamburger span:nth-child(2) {
  opacity: 0;
}
.nav-toggle:checked ~ .nav-hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Overlay (hidden on desktop) */
.nav-overlay {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-light);
  transition: color var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  border-radius: 1px;
  transition: width var(--transition);
}
.nav-link:hover { color: var(--blue-deep); }
.nav-link:hover::after { width: 100%; }

/* Language toggle */
.lang-toggle {
  display: flex;
  background: var(--white);
  border: 2px solid rgba(123,173,196,0.15);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 800;
}

.lang-btn {
  border: none;
  background: none;
  padding: 6px 16px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.lang-btn:hover { color: var(--text); }

.lang-btn.active {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
  color: var(--white);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ── Hero ─────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 72px 28px 80px;
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(123,173,196,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(240,184,64,0.06) 0%, transparent 50%);
  overflow: hidden;
}

/* Floating kana decoration */
.hero::before,
.hero::after {
  position: absolute;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  opacity: 0.04;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}
.hero::before {
  content: 'あ';
  font-size: 14rem;
  top: -20px;
  left: -30px;
  color: var(--blue);
  animation-delay: 0s;
}
.hero::after {
  content: 'カ';
  font-size: 10rem;
  bottom: -10px;
  right: -10px;
  color: var(--yellow);
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(3deg); }
}

.hero-logo {
  height: 140px;
  width: auto;
  margin: 0 auto 36px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.06));
  animation: heroEntrance 0.8s ease-out both;
}

@keyframes heroEntrance {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--text);
  letter-spacing: -0.03em;
  animation: heroEntrance 0.8s ease-out 0.15s both;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-light);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 600;
  animation: heroEntrance 0.8s ease-out 0.3s both;
}

/* ── About ────────────────────────────────────── */
.about {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px 100px;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text .section-title {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-desc {
  font-size: 1.02rem;
  color: var(--text-light);
  line-height: 1.9;
  font-weight: 600;
}

/* Flashcard stack illustration */
.about-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 600px;
}

.card-stack {
  position: relative;
  width: 220px;
  height: 160px;
}

.card-stack-item {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transition: transform var(--transition-slow);
}

.card-stack-item:nth-child(1) {
  background: linear-gradient(145deg, #e8f4f8, var(--blue-light));
  transform: rotate(-8deg) translateX(-16px);
  z-index: 1;
}
.card-stack-item:nth-child(2) {
  background: linear-gradient(145deg, #fef3d0, var(--yellow-light));
  transform: rotate(5deg) translateX(12px) translateY(-8px);
  z-index: 2;
}
.card-stack-item:nth-child(3) {
  background: var(--white);
  border: 2.5px solid var(--blue-light);
  z-index: 3;
  font-size: 3.5rem;
  color: var(--blue-deep);
  transform: rotate(-1deg);
}

.card-stack:hover .card-stack-item:nth-child(1) {
  transform: rotate(-14deg) translateX(-28px) translateY(4px);
}
.card-stack:hover .card-stack-item:nth-child(2) {
  transform: rotate(10deg) translateX(24px) translateY(-14px);
}
.card-stack:hover .card-stack-item:nth-child(3) {
  transform: rotate(0deg) scale(1.04);
}

/* Floating dots decoration */
.about-illustration::before,
.about-illustration::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  animation: bobble 6s ease-in-out infinite;
}
.about-illustration {
  position: relative;
}
.about-illustration::before {
  width: 48px;
  height: 48px;
  background: var(--yellow-light);
  opacity: 0.5;
  top: -10px;
  right: 20px;
  animation-delay: -2s;
}
.about-illustration::after {
  width: 28px;
  height: 28px;
  background: var(--blue-light);
  opacity: 0.5;
  bottom: -5px;
  left: 30px;
  animation-delay: -4s;
}

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

/* ── Features ─────────────────────────────────── */
.features {
  background:
    linear-gradient(180deg, var(--white) 0%, var(--cream) 100%);
  padding: 88px 28px;
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-light), transparent);
}

.features-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.feature {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1.5px solid transparent;
  transition: all var(--transition);
  position: relative;
}

.feature:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  position: relative;
}

.feature:nth-child(1) .feature-icon { background: linear-gradient(135deg, #e8f4f8, #d0eaf4); }
.feature:nth-child(2) .feature-icon { background: linear-gradient(135deg, #fef3d0, #fce8b2); }
.feature:nth-child(3) .feature-icon { background: linear-gradient(135deg, var(--green-light), #d4edce); }
.feature:nth-child(4) .feature-icon { background: linear-gradient(135deg, #f0e8f8, #e4d8f0); }

.feature-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.65;
  font-weight: 600;
}

/* ── Apps Section ─────────────────────────────── */
.apps-section {
  padding: 88px 28px 0;
  position: relative;
}

.apps-section .section-title--center {
  position: relative;
}

.apps-section .section-title--center::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--yellow), var(--blue));
  margin: 14px auto 0;
}

.apps {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 0 88px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.app-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px 28px 32px;
  text-align: center;
  border: 1.5px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow);
  transition: transform var(--bounce), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px 2px 0 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.app-card:nth-child(1)::before { background: linear-gradient(90deg, #4a8c3a, var(--green)); }
.app-card:nth-child(2)::before { background: linear-gradient(90deg, var(--yellow-dark), var(--yellow)); }
.app-card:nth-child(3)::before { background: linear-gradient(90deg, #3a7aaa, var(--blue)); }

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.app-card:hover::before { opacity: 1; }
.app-card:nth-child(1):hover { border-color: var(--green); }
.app-card:nth-child(2):hover { border-color: var(--yellow); }
.app-card:nth-child(3):hover { border-color: var(--blue); }

.app-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 22px;
  border-radius: 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transition: transform var(--bounce);
}

.app-card:hover .app-logo {
  transform: scale(1.06) rotate(-2deg);
}

.app-name {
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.app-desc {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 22px;
  flex-grow: 1;
  font-weight: 600;
}

.app-badges {
  display: flex;
  gap: 8px;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--text-light);
  border: 1.5px solid rgba(0,0,0,0.06);
  transition: all var(--transition);
}

.app-badge:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
  background: rgba(123,173,196,0.06);
  transform: translateY(-1px);
}

.app-badge--soon {
  background: var(--cream-dark);
  color: var(--yellow-dark);
  border-color: rgba(240,184,64,0.2);
  cursor: default;
}
.app-badge--soon:hover {
  background: var(--cream-dark);
  color: var(--yellow-dark);
  border-color: rgba(240,184,64,0.2);
  transform: none;
}

/* ── Demo / How it works ──────────────────────── */
.demo {
  padding: 0 28px 100px;
}

.demo-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.demo-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.demo-phones {
  position: relative;
  width: 320px;
  height: 420px;
}

.demo-phone {
  position: absolute;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--white);
  transition: transform var(--transition-slow);
}

.demo-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.demo-phone--front {
  width: 220px;
  bottom: 0;
  left: 0;
  z-index: 2;
  border: 3px solid rgba(0,0,0,0.08);
}

.demo-phone--back {
  width: 200px;
  top: 0;
  right: 0;
  z-index: 1;
  border: 3px solid rgba(0,0,0,0.06);
  opacity: 0.85;
}

.demo-phones:hover .demo-phone--front {
  transform: translateX(-8px) rotate(-2deg);
}
.demo-phones:hover .demo-phone--back {
  transform: translateX(8px) rotate(2deg);
}

.demo-text .section-title {
  background: linear-gradient(135deg, var(--yellow-dark), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.demo-desc {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.9;
  margin-bottom: 14px;
  font-weight: 600;
}

/* ── Contact ──────────────────────────────────── */
.contact {
  padding: 88px 28px;
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--cream) 100%);
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
}

.contact-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 40px;
  margin-top: -8px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  border: 2px solid rgba(123,173,196,0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(123,173,196,0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}

.form-submit {
  align-self: center;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  border: none;
  border-radius: 999px;
  padding: 14px 36px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  box-shadow: 0 4px 16px rgba(90,143,168,0.25);
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(90,143,168,0.35);
}

.form-submit:active {
  transform: translateY(0);
}

/* ── Go to top ────────────────────────────────── */
.go-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(90,143,168,0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  z-index: 90;
}

.go-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.go-top:hover {
  box-shadow: 0 6px 24px rgba(90,143,168,0.45);
  transform: translateY(-2px);
}

/* ── Footer ───────────────────────────────────── */
.footer {
  margin-top: auto;
  border-top: 1px solid rgba(123,173,196,0.1);
  padding: 28px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--white);
}

.footer a {
  color: var(--blue-dark);
  font-weight: 700;
  transition: color var(--transition);
}
.footer a:hover {
  color: var(--blue-deep);
  text-decoration: underline;
}
.footer-sep { margin: 0 10px; opacity: 0.4; }

/* ── Privacy Policy ───────────────────────────── */
.policy {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 28px 88px;
}

.policy h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.policy-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 44px;
  font-weight: 600;
}

.policy h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 36px;
  margin-bottom: 10px;
  color: var(--blue-deep);
}

.policy p,
.policy ul {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.8;
  font-weight: 600;
}

.policy ul {
  padding-left: 22px;
}

.policy li {
  margin-bottom: 8px;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* Mobile nav */
  .nav-hamburger {
    display: flex;
  }

  .nav-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 80px 28px 32px;
    background: var(--white);
    box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 105;
  }

  .nav-toggle:checked ~ .nav-right {
    transform: translateX(0);
  }

  /* Overlay behind menu */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 104;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }
  .nav-toggle:checked ~ .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1rem;
    padding: 10px 0;
    width: 100%;
  }
  .nav-link::after { display: none; }

  .lang-toggle {
    margin-top: 8px;
  }

  .apps {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .about-inner,
  .demo-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-illustration { order: -1; }

  .hero {
    padding: 56px 24px 60px;
  }
  .hero::before { font-size: 8rem; }
  .hero::after { font-size: 6rem; }
  .hero-logo { height: 100px; }

  .features { padding: 64px 24px; }
  .apps-section { padding-top: 64px; }
  .demo { padding-bottom: 64px; }

  .demo-phones {
    width: 260px;
    height: 340px;
  }
  .demo-phone--front { width: 180px; }
  .demo-phone--back { width: 160px; }
}

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

  .hero-title { font-size: 1.6rem; }

  .card-stack {
    width: 180px;
    height: 130px;
  }
  .card-stack-item:nth-child(3) { font-size: 2.5rem; }
}
