/* =========================================================
   Stretch Navi — Landing page shared styles
   -----------------------------------------------------------
   Design language inspired by the Play Store feature graphic:
     - Bright teal hero / CTA with soft light beams and dots
     - Clean light feature sections with generous whitespace
     - Sharp typographic hierarchy with restrained accents
   Used by both ja/ and en/ pages. Only the font family is
   switched per locale via html[lang] selectors.
   ========================================================= */

:root {
  /* Brand palette (centered on #22C1C3) */
  --brand:        #22C1C3;
  --brand-dark:   #0FA3A6;
  --brand-soft:   #E6F9F9;
  --brand-tint:   #D6F3F3;

  /* Text */
  --ink:      #0D1B1A;
  --ink-sub:  #4B5F5D;
  --ink-muted:#8A9A98;

  /* Surfaces */
  --bg:        #FFFFFF;
  --bg-soft:   #F4F9F8;
  --bg-soft-2: #EAF3F1;
  --border:    #E4EEED;

  /* Shadow */
  --shadow-md: 0 10px 28px rgba(14, 60, 56, 0.10);
  --shadow-lg: 0 32px 64px -16px rgba(6, 19, 26, 0.30);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Per-locale font family */
html[lang^="ja"] {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.8;
}
html[lang^="en"] {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  letter-spacing: -0.005em;
}

body { overflow-x: hidden; background: var(--bg); }

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* =========================================================
   Hero — bright teal stage with soft beams and tilted phone
   ========================================================= */
.hero {
  position: relative;
  color: var(--ink);
  overflow: hidden;
  padding: 5.5rem 0 5rem;
  isolation: isolate;
  background:
    radial-gradient(900px 500px at 88% 8%, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(800px 420px at 8% 100%, rgba(255, 255, 255, 0.30), transparent 65%),
    linear-gradient(160deg, #3FC8CA 0%, #17A9AB 55%, #0A7A7C 100%);
}

/* Soft light beams across the hero */
.hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hero-decor::before,
.hero-decor::after {
  content: '';
  position: absolute;
  width: 140%;
  height: 220px;
  left: -20%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  filter: blur(3px);
}
.hero-decor::before { top: 16%; transform: rotate(-12deg); opacity: 0.75; }
.hero-decor::after  { bottom: 8%; transform: rotate(-12deg); opacity: 0.5; }

/* Diagonal dot field, masked to a soft ellipse */
.hero-dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 35%, transparent 75%);
}

/* Soft white slash on the far right */
.hero-slash {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 320px;
  height: 130%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 45%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  filter: blur(2px);
  z-index: 0;
  opacity: 0.7;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* App-name lockup in the hero */
.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.hero-brand .mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 8px 20px -8px rgba(6, 60, 62, 0.4);
}
.hero-brand .mark img { width: 100%; height: 100%; object-fit: cover; }
.hero-brand .name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #FFFFFF;
}
html[lang^="ja"] .hero-brand .name { letter-spacing: 0.06em; }

.hero-title {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
  color: #FFFFFF;
  text-wrap: pretty;
  text-shadow: 0 2px 14px rgba(6, 60, 62, 0.4);
}
/* Japanese cap is smaller so wide-screen headlines don't wrap awkwardly.
   auto-phrase + line-break:strict avoids orphan particles (e.g. "を。"). */
html[lang^="ja"] .hero-title {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.45;
  letter-spacing: 0.005em;
  word-break: auto-phrase;
  line-break: strict;
}

.hero-tagline {
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  color: #FFFFFF;
  line-height: 1.9;
  margin-bottom: 2.5rem;
  max-width: 32em;
  text-wrap: pretty;
  text-shadow: 0 1px 8px rgba(6, 60, 62, 0.3);
}
html[lang^="ja"] .hero-tagline {
  line-height: 2.0;
  word-break: auto-phrase;
  line-break: strict;
}

.cta-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-block;
  transition: transform 0.2s ease;
}
.store-badge img {
  height: 60px;
  width: auto;
}
.store-badge:hover { transform: translateY(-2px); }

/* Hero phone — tilted, glowing platform */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
/* Bright halo behind the hero phone */
.hero-visual::before {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 60%);
  filter: blur(10px);
  z-index: 0;
}
.hero-visual .phone {
  position: relative;
  z-index: 1;
  transform: rotate(-4deg);
  box-shadow:
    0 40px 80px -20px rgba(10, 80, 82, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 60px rgba(255, 255, 255, 0.25);
}

/* =========================================================
   Phone mockup
   ========================================================= */
.phone {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 9 / 19.5;
  border-radius: 38px;
  background: linear-gradient(160deg, #1a2a2f 0%, #0b1518 100%);
  padding: 9px;
  box-shadow: var(--shadow-lg);
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: #F4F9F8;
  overflow: hidden;
  position: relative;
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Subtle glass highlight on the screen */
.phone-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 30%);
}
/* Top notch */
.phone::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 6px;
  background: #000;
  border-radius: 99px;
  z-index: 3;
}

/* =========================================================
   Features — alternating text / phone rows
   ========================================================= */
.features {
  padding: 6rem 0 3rem;
  background: var(--bg);
  position: relative;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
  position: relative;
}
.feature + .feature { border-top: 1px solid var(--border); }

.feature-text .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem;
  background: #fff;
  border: 1px solid var(--brand);
  color: var(--brand-dark);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1.4rem;
}
.feature-text .eyebrow .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

.feature-text h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  color: var(--ink);
  text-wrap: pretty;
}
html[lang^="ja"] .feature-text h2 {
  line-height: 1.55;
  letter-spacing: 0;
  word-break: auto-phrase;
  line-break: strict;
}

.feature-text p {
  font-size: 1rem;
  color: var(--ink-sub);
  line-height: 2;
  max-width: 34em;
  text-wrap: pretty;
}

.feature-visual {
  display: flex;
  justify-content: center;
  position: relative;
}
/* Soft teal backdrop panel behind each phone */
.feature-visual::before {
  content: '';
  position: absolute;
  width: 380px;
  height: 420px;
  max-width: 100%;
  background: linear-gradient(160deg, var(--bg-soft) 0%, var(--bg-soft-2) 100%);
  border-radius: 48px;
  z-index: 0;
  transform: rotate(-6deg);
}
.feature-visual .phone {
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-md);
}

.feature.reverse .feature-visual { order: -1; }
.feature.reverse .feature-visual::before { transform: rotate(6deg); }

/* =========================================================
   Final CTA — bright teal, mirrors the hero but compact
   ========================================================= */
.final-cta {
  position: relative;
  text-align: center;
  padding: 6rem 0;
  color: #FFFFFF;
  overflow: hidden;
  isolation: isolate;
  /* Dark at top where the heading sits, lighter toward the bottom
     where the Play Store badge anchors the section. Uses the app
     theme teals so the brand palette stays consistent. */
  background:
    radial-gradient(600px 360px at 50% 100%, rgba(255, 255, 255, 0.25), transparent 70%),
    linear-gradient(180deg, #14B8A6 0%, #22C1C3 100%);
}
/* Dot overlay, masked to a soft ellipse */
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 35%, transparent 75%);
}
.final-cta .container { position: relative; z-index: 1; }

.final-cta h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
  color: #FFFFFF;
  text-wrap: pretty;
  text-shadow: 0 2px 14px rgba(6, 60, 62, 0.4);
}
html[lang^="ja"] .final-cta h2 {
  line-height: 1.5;
  letter-spacing: 0;
  word-break: auto-phrase;
  line-break: strict;
}

.final-cta p {
  color: #FFFFFF;
  margin-bottom: 2rem;
  font-size: 1rem;
}
.final-cta .cta-row { justify-content: center; }

/* =========================================================
   Footer
   ========================================================= */
footer {
  background: linear-gradient(180deg, var(--brand-soft) 0%, #F4FBFB 100%);
  border-top: 1px solid var(--brand-tint);
  padding: 2.75rem 0 2.25rem;
  font-size: 0.85rem;
  color: var(--ink-sub);
  text-align: center;
}
footer a { text-decoration: none; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  margin-bottom: 1.25rem;
}
.footer-links a {
  color: var(--ink-sub);
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--brand-dark); }

.lang-switch { margin-bottom: 1rem; font-size: 0.8rem; }
.lang-switch a { color: var(--ink-muted); margin: 0 0.35rem; }
.lang-switch a:hover { color: var(--brand-dark); }
.lang-switch .current { color: var(--ink); font-weight: 700; margin: 0 0.35rem; }

.copyright { font-size: 0.75rem; color: var(--ink-muted); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  /* Mobile hero: dark at top (text area) → light at bottom (phone area).
     Decorative overlays (beams / dots / slash) are hidden on mobile for
     a cleaner, more readable layout. */
  .hero {
    padding: 4rem 0 3rem;
    background:
      radial-gradient(600px 400px at 50% 100%, rgba(255, 255, 255, 0.25), transparent 70%),
      linear-gradient(180deg, #14B8A6 0%, #22C1C3 100%);
  }
  .hero-decor,
  .hero-dots,
  .hero-slash { display: none; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .cta-row { justify-content: center; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-visual .phone { transform: rotate(0); }

  .feature {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3rem 0;
    text-align: center;
  }
  .feature.reverse .feature-visual { order: 0; }
  .feature-text p { margin-left: auto; margin-right: auto; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .phone { max-width: 240px; }
  .hero { padding: 3.25rem 0 2.5rem; }
  .hero-title { font-size: 1.85rem; }
  .store-badge img { height: 52px; }
  .feature-visual::before { width: 300px; height: 340px; }
}

/* =========================================================
   Scroll reveal animation
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}
