/* Colours follow the app's Theme.swift. */
:root {
  color-scheme: light;
  --ink: #1e1b3a;
  --muted: #6b6789;
  --purple: #5b47e0;
  --purple-soft: #ece9fc;
  --orange: #ff9533;
  --orange-soft: #fff0e1;
  --green: #3fae6e;
  --green-soft: #e3f5ea;
  --line: #e7e4f2;
  --bg: #f6f4fb;
  --card: #ffffff;
  --gradient: linear-gradient(135deg, #7360f2, #4733c9);
  --radius: 28px;
  --shadow: 0 24px 60px -28px rgba(60, 40, 140, .35);
  --font: ui-rounded, "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Kept for the blog cards. */
  --peach: var(--orange-soft);
  --lilac: var(--purple-soft);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 var(--font); }
main { overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); }
svg { flex: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); background: rgba(246, 244, 251, .8); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 16px; white-space: nowrap; }
.nav a:hover { color: var(--purple); }
.nav a.btn, .nav a.btn:hover { color: #fff; }
@media (max-width: 640px) { .nav a.hide-sm { display: none; } }
@media (max-width: 480px) { .nav { gap: 12px; } .nav a.blog-link { display: none; } .btn.small { padding: 9px 14px; font-size: 14px; } }

/* Buttons: the app's purple capsule */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 999px; background: var(--gradient); color: #fff; font-weight: 800; text-decoration: none; font-size: 17px; transition: transform .25s, box-shadow .25s; box-shadow: 0 14px 30px -12px rgba(91, 71, 224, .7); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(91, 71, 224, .75); }
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; }
.btn.small { padding: 10px 18px; font-size: 15px; }
.btn.ghost { background: var(--card); color: var(--purple); box-shadow: inset 0 0 0 2px var(--purple-soft); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px #d6cffa; }

/* Highlights: a marker stroke that draws in when visible and wraps with the text */
.hl { --hl: #ffd9b3; background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 88% / 0% .42em; -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .08em; border-radius: 6px; transition: background-size .9s cubic-bezier(.2, .8, .2, 1) .35s; }
.in .hl, .hl.in { background-size: 100% .42em; }
.hl.purple { --hl: #d9d1ff; }
.hl.mint { --hl: #bfe8cf; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; overflow-wrap: break-word; }
h1 { font-size: clamp(40px, 5.6vw, 66px); font-weight: 800; }
h2 { font-size: clamp(32px, 4.2vw, 50px); font-weight: 800; }
h3 { font-size: 23px; font-weight: 800; }
.lead { font-size: clamp(18px, 1.9vw, 21px); color: var(--muted); max-width: 34em; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--purple); background: var(--purple-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.center { text-align: center; }
.center .lead { margin: 18px auto 0; }
section { padding: 104px 0; position: relative; }

/* Soft colour clouds behind the hero, drifting slowly */
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: -1; pointer-events: none; animation: drift 18s ease-in-out infinite alternate; }
.blob.a { width: 520px; height: 520px; background: #d9d1ff; top: -160px; right: -120px; }
.blob.b { width: 380px; height: 380px; background: #ffe0c2; bottom: -120px; left: -140px; animation-delay: -6s; }
.blob.c { width: 300px; height: 300px; background: #cdeedb; top: 40%; left: 46%; animation-delay: -12s; opacity: .45; }
@keyframes drift { to { transform: translate(40px, -30px) scale(1.08); } }

/* Hero */
.hero { padding: 64px 0 96px; isolation: isolate; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero .lead { margin: 22px 0 0; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero-note { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-note span { font-size: 14px; font-weight: 700; color: var(--muted); background: var(--card); border-radius: 999px; padding: 6px 14px 6px 10px; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 6px 16px -10px rgba(60, 40, 140, .3); }
.hero-note span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.stage { position: relative; min-height: 620px; display: flex; justify-content: center; align-items: center; }
.stage .illu { position: absolute; width: 250px; right: -40px; bottom: -6px; z-index: 3; filter: drop-shadow(0 10px 20px rgba(60, 40, 140, .12)); }
.phone { position: relative; z-index: 1; width: 290px; border-radius: 46px; padding: 9px; background: #fff; box-shadow: 0 50px 90px -40px rgba(50, 30, 140, .55), 0 0 0 1px var(--line); animation: bob 7s ease-in-out infinite; }
.phone img { border-radius: 38px; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* Floating cards in the app's card style */
.card { position: absolute; z-index: 2; background: var(--card); border-radius: 22px; padding: 14px 18px; box-shadow: var(--shadow); font-size: 15px; line-height: 1.3; }
.card b { display: block; font-weight: 800; }
.card small { display: block; color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 2px; }
.float { animation: float 6s ease-in-out infinite; }
.float.f2 { animation-duration: 7s; animation-delay: -2s; }
.float.f3 { animation-duration: 8s; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-12px); } }

.card.dose { left: -10px; top: 70px; display: flex; gap: 12px; align-items: center; background: var(--gradient); color: #fff; padding: 14px 20px 14px 14px; }
.card.dose small { color: rgba(255, 255, 255, .8); }
.tick { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; }
.tick svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; }
.in .tick svg { animation: draw .6s ease-out 1.1s forwards; }
.in .tick { animation: popin .5s cubic-bezier(.3, 1.6, .5, 1) 1s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.card.mood { right: -16px; top: 210px; }
.scale { display: flex; gap: 6px; margin: 8px 0 4px; }
.scale i { width: 28px; height: 28px; border-radius: 9px; background: var(--bg); color: var(--muted); font-style: normal; font-size: 13px; font-weight: 800; display: grid; place-items: center; transition: background .4s, color .4s, transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.in .scale i.on { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 2px var(--green); transform: scale(1.12); transition-delay: 1.4s; }

.card.week { left: 0; bottom: 70px; width: 230px; }
.bar { height: 8px; border-radius: 99px; background: var(--purple-soft); margin: 10px 0 4px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--gradient); transition: width 1.4s cubic-bezier(.2, .8, .2, 1) 1.2s; }
.in .bar span { width: 57%; }

/* Features: three soft cards, each with its illustration and a screen rising from the bottom */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.feature { position: relative; border-radius: var(--radius); padding: 30px 28px 0; overflow: hidden; display: flex; flex-direction: column; background: var(--soft); }
.feature.purple { --soft: var(--purple-soft); --hl: #d9d1ff; }
.feature.orange { --soft: var(--orange-soft); }
.feature.green { --soft: var(--green-soft); }
.feature .art { height: 120px; width: auto; margin-bottom: 18px; align-self: flex-start; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.feature:hover .art { transform: rotate(-3deg) scale(1.05); }
.feature h3 .hl { background: none; padding: 0; }
.feature p { color: var(--muted); font-size: 16px; margin: 10px 0 26px; }
.feature .shot { margin-top: auto; height: 300px; overflow: hidden; display: flex; justify-content: center; }
.feature .shot img { width: 78%; max-width: 260px; height: max-content; border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px -20px rgba(60, 40, 140, .4); transform: translateY(70px); transition: transform 1s cubic-bezier(.2, .8, .2, 1) .3s; }
.feature.in .shot img { transform: translateY(0); }
.feature:hover .shot img { transform: translateY(-14px); transition-delay: 0s; transition-duration: .5s; }

/* Privacy: the app's deep ink with a purple glow */
.privacy-card { position: relative; overflow: hidden; border-radius: 40px; background: var(--ink); color: #fff; padding: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.privacy-card .glow { position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(#6a55f0, transparent 65%); top: -260px; right: -160px; opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.privacy-text { position: relative; }
.privacy-card .eyebrow { background: rgba(255, 255, 255, .1); color: #d9d1ff; }
.privacy-card .lead { color: #c9c5e6; margin-top: 18px; }
.privacy-card .hl { --hl: rgba(106, 85, 240, .7); }
.more { display: inline-block; margin-top: 22px; color: #d9d1ff; font-weight: 800; text-decoration: none; }
.more:hover { color: #fff; }
.locks { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lock { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 4px; transition: background .3s, transform .3s; }
.lock:hover { background: rgba(255, 255, 255, .11); transform: translateY(-3px); }
.lock b { font-size: 17px; }
.lock span:last-child { color: #b9b4dc; font-size: 15px; line-height: 1.4; }
.ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--gradient); margin-bottom: 8px; }
.ico svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Download and support */
.cta { text-align: center; padding-bottom: 88px; }
.cta .illu { width: 240px; margin: 0 auto 26px; }
.cta .illu.in { animation: bob 6s ease-in-out infinite; }
.cta .lead { margin: 16px auto 30px; }
.support { display: flex; align-items: center; gap: 18px; text-align: left; max-width: 760px; margin: 64px auto 0; background: var(--card); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.support .ico { margin: 0; }
.support div { flex: 1; }
.support p { margin: 2px 0 0; color: var(--muted); font-size: 16px; line-height: 1.45; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 22px; }
footer a { color: var(--muted); text-decoration: none; font-weight: 700; }
footer a:hover { color: var(--purple); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .12s; } .reveal.d2 { transition-delay: .24s; }
@keyframes popin { from { opacity: 0; transform: scale(.6); } }

/* Article pages (privacy, blog) */
.article { max-width: 720px; margin: 0 auto; padding: 64px 20px 96px; }
.article h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 10px; }
.article h2 { font-size: 26px; margin: 40px 0 10px; color: var(--ink); }
.article p, .article li { color: #3e3a5c; }
.article .meta { color: var(--muted); margin-bottom: 32px; }
.article .hero-illu { width: 300px; margin: 8px 0 32px; }
.article .note { background: var(--purple-soft); border-radius: 20px; padding: 18px 22px; margin: 28px 0; }
.summary { background: #fff; border-radius: var(--radius); padding: 28px 32px; box-shadow: 0 10px 40px -24px rgba(60, 40, 140, .3); }
.summary ul { margin: 10px 0 0; padding-left: 20px; }

.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 40px; }
.post { border-radius: var(--radius); padding: 32px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.post:hover { transform: translateY(-6px); }
.post img { height: 150px; margin: 0 auto 10px; }
.post p { margin: 0; color: var(--muted); font-size: 16px; }
.post .meta { font-size: 14px; color: var(--muted); font-weight: 700; }


@media (max-width: 900px) {
  section { padding: 72px 0; }
  .hero { padding-top: 36px; }
  .hero .wrap, .privacy-card { grid-template-columns: 1fr; }
  .stage { min-height: 560px; width: 100%; max-width: 440px; margin: 0 auto; }
  .features, .posts { grid-template-columns: 1fr; }
  .feature { max-width: 520px; margin: 0 auto; width: 100%; }
  .privacy-card { padding: 44px 24px; border-radius: 32px; }
}
@media (max-width: 480px) {
  .article h1, .article h2 { -webkit-hyphens: auto; hyphens: auto; }
  .phone { width: 240px; border-radius: 40px; }
  .phone img { border-radius: 32px; }
  .stage { min-height: 520px; }
  .stage .illu { width: 170px; right: -14px; }
  .card { font-size: 14px; padding: 12px 14px; }
  .card.dose { left: -8px; top: 40px; }
  .card.mood { right: -8px; top: 220px; }
  .card.week { left: -8px; bottom: 40px; width: 200px; }
  .scale i { width: 24px; height: 24px; }
  .locks { grid-template-columns: 1fr; }
  .support { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hl { background-size: 100% .42em; }
  .tick svg { stroke-dashoffset: 0; }
  .bar span { width: 57%; }
  .feature .shot img { transform: none; }
}

/* Language switcher */
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 16px; padding: 6px 4px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 18px; height: 18px; }
.lang summary:hover { color: var(--purple); }
.lang[open] summary { color: var(--purple); }
.lang div { position: absolute; right: 0; top: calc(100% + 10px); background: #fff; border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(60, 40, 140, .35); padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-width: 300px; animation: pop .2s ease-out; }
.lang div a { padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.lang div a:hover { background: var(--purple-soft); }
.lang div a[aria-current] { color: var(--purple); background: var(--purple-soft); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 640px) { .lang summary span { display: none; } .lang div { right: -90px; min-width: 260px; } }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ko) h1, :lang(ko) h2, :lang(ko) h3 { letter-spacing: 0; line-height: 1.3; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3, :lang(ko) .lead { word-break: keep-all; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
:lang(ja) body, :lang(ko) body { font-family: ui-rounded, "Nunito", -apple-system, "Hiragino Sans", "Apple SD Gothic Neo", sans-serif; }
