/* TalkForMe — calm bedside teal; family-first, not SaaS chrome */
@import url("https://fonts.googleapis.com/css2?family=Literata:opsz,wght@7..72,600;7..72,700&family=Noto+Sans+TC:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light only;
  --sky: #e8f4f7;
  --mist: #f7fbfc;
  --paper: #ffffff;
  --ink: #1c2d36;
  --soft: #4a5f6a;
  --teal: #1a7f8c;
  --teal-deep: #0f5c67;
  --teal-glow: rgba(26, 127, 140, 0.16);
  --line: #d0e0e5;
  --warm: #fff8f0;
  --focus: #1a7f8c;
  --radius: 20px;
  --shadow: 0 20px 48px rgba(28, 60, 72, 0.07);
  --max: 680px;
  --wide: 1040px;
  --font-display: "Literata", "Noto Sans TC", "Songti TC", serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Hiragino Sans CNS", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--mist);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(26, 127, 140, 0.13), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 5%, rgba(255, 232, 210, 0.45), transparent 50%),
    linear-gradient(180deg, var(--sky) 0%, var(--mist) 28%, #f4f9fa 100%);
  background-attachment: fixed;
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--teal); }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.shell { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.shell--wide { width: min(100% - 2rem, var(--wide)); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--paper); color: var(--ink);
  padding: 0.55rem 0.85rem; border-radius: 8px; z-index: 40;
}
.skip:focus { left: 0.85rem; top: 0.85rem; }

/* —— Nav —— */
.nav {
  display: flex; flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  align-items: center; justify-content: space-between;
  padding: 1.25rem 0 0;
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.28rem;
  color: var(--ink); text-decoration: none;
  letter-spacing: 0.01em;
}
.nav__brand:hover { color: var(--teal-deep); }
.nav__links {
  display: flex; flex-wrap: wrap;
  gap: 0.65rem 1.05rem; align-items: center;
}
.nav__links a {
  text-decoration: none; color: var(--soft);
  font-weight: 500; font-size: 0.94rem;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--teal-deep); }
.nav__cta {
  display: inline-flex; align-items: center;
  background: var(--teal); color: #fff !important;
  text-decoration: none !important;
  font-weight: 700; font-size: 0.9rem;
  border-radius: 999px; padding: 0.52rem 1.1rem;
  box-shadow: 0 8px 20px var(--teal-glow);
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav__cta:hover { background: var(--teal-deep); color: #fff !important; transform: translateY(-1px); }

/* —— Hero —— */
.hero {
  display: grid; gap: 2.25rem;
  padding: 2.6rem 0 2.2rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    padding: 3.6rem 0 3rem;
  }
}

.hero__eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--teal-deep);
}

.hero__copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 5.2vw, 3.35rem);
  line-height: 1.16;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.hero__copy .lede {
  margin: 0 0 1.6rem;
  color: var(--soft);
  font-size: 1.08rem;
  max-width: 36rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.trust {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.85rem;
  margin: 1.35rem 0 0;
  padding: 0; list-style: none;
}
.trust li {
  font-size: 0.86rem; font-weight: 600;
  color: var(--teal-deep);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
}

.langswitch {
  margin: 1.15rem 0 0;
  color: var(--soft);
  font-size: 0.92rem;
}
.langswitch a { font-weight: 600; text-decoration: none; }
.langswitch a:hover { text-decoration: underline; }

/* Language switch (9 home pages) */
.langnav {
  display: flex; flex-wrap: wrap;
  gap: 0.15rem 1rem;
  padding: 0.55rem 0 0;
  font-size: 0.86rem;
}
.langnav a {
  color: var(--soft); text-decoration: none;
  padding: 0.3rem 0;
}
.langnav a:hover { color: var(--teal-deep); text-decoration: underline; }
.langnav a[aria-current="true"] { color: var(--teal-deep); font-weight: 700; }
@media (max-width: 640px) {
  /* keep the header short on phones so the headline and download buttons stay near the top */
  .langnav {
    flex-wrap: nowrap; gap: 0 1.1rem; overflow-x: auto; white-space: nowrap;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .langnav::-webkit-scrollbar { display: none; }
  .langnav a { flex: none; padding: 0.55rem 0; }
  .nav { padding-top: 0.9rem; gap: 0.5rem 1rem; }
  .nav__links { gap: 0.4rem 0.9rem; }
}
.guidelink { margin: 1.2rem 0 0; font-size: 0.98rem; }
.guidelink a { font-weight: 600; }

/* Per-language system font stacks (Han glyph variants, Hangul, Thai) */
html:lang(ja) {
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", "Noto Sans TC", sans-serif;
  --font-display: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Literata", serif;
}
html:lang(ko) {
  --font-body: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans TC", sans-serif;
  --font-display: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Literata", serif;
}
html:lang(th) {
  --font-body: "Thonburi", "Noto Sans Thai", "Leelawadee UI", "Noto Sans TC", sans-serif;
  --font-display: "Thonburi", "Noto Sans Thai", "Leelawadee UI", "Literata", serif;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 0.82rem 1.35rem;
  font-weight: 700; text-decoration: none; font-size: 0.98rem;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--teal); color: #fff;
  box-shadow: 0 12px 28px var(--teal-glow);
}
.btn--primary:hover { background: var(--teal-deep); color: #fff; }
.btn--ghost {
  background: rgba(255, 255, 255, 0.9);
  color: var(--teal-deep);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }

/* Phone-ish board preview — product signature */
.demo {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 1.2rem 1.15rem 1.3rem;
  box-shadow: var(--shadow);
}
.demo::before {
  content: "";
  display: block;
  width: 3rem; height: 0.35rem;
  background: var(--line);
  border-radius: 999px;
  margin: 0 auto 1rem;
}
.demo__label {
  font-size: 0.8rem; font-weight: 700;
  color: var(--teal);
  margin: 0 0 0.9rem;
  text-align: center;
}
.demo__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.phrase {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 0.7rem 0.9rem;
  text-align: center;
  min-height: 6.8rem;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.4rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease;
  font: inherit;
  color: inherit;
  cursor: default;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.phrase:hover { transform: translateY(-2px); }
.phrase__emoji { font-size: 1.9rem; line-height: 1; transition: transform 0.35s ease; }
.phrase__text {
  font-weight: 700; font-size: 0.96rem; line-height: 1.35;
  color: var(--ink);
}
.phrase--active {
  background: linear-gradient(155deg, #1f96a5 0%, #157987 100%);
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(21, 121, 135, 0.28);
  transform: translateY(-3px) scale(1.02);
}
.phrase--active .phrase__text { color: #fff; }
.phrase--active .phrase__emoji { transform: scale(1.12); }
.demo__hint {
  margin: 0.95rem 0 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--soft);
  min-height: 1.4em;
}
.demo__speak {
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  margin-top: 0.85rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.demo__speak.is-on {
  opacity: 1;
  transform: translateY(0);
}
.demo__bars {
  display: flex; align-items: flex-end; gap: 3px; height: 14px;
}
.demo__bars span {
  width: 3px; border-radius: 2px;
  background: var(--teal);
  animation: barPulse 0.9s ease-in-out infinite;
}
.demo__bars span:nth-child(1) { height: 40%; animation-delay: 0s; }
.demo__bars span:nth-child(2) { height: 80%; animation-delay: 0.12s; }
.demo__bars span:nth-child(3) { height: 55%; animation-delay: 0.24s; }
.demo__bars span:nth-child(4) { height: 95%; animation-delay: 0.08s; }
.demo__speak-text {
  font-size: 0.8rem; font-weight: 600; color: var(--teal-deep);
}

@keyframes barPulse {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.hero__copy.reveal { transition-delay: 0.05s; }
.demo.reveal { transition-delay: 0.18s; }

/* —— Sections —— */
.section { padding: 0 0 3rem; }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  margin: 0 0 0.4rem;
  font-weight: 700;
}
.section__intro {
  margin: 0 0 1.4rem;
  color: var(--soft);
  max-width: 40rem;
}

.grid {
  display: grid; gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem 1.3rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: #b5d0d7;
  box-shadow: 0 10px 24px rgba(28, 60, 72, 0.05);
  transform: translateY(-2px);
}
.card__icon {
  font-size: 1.55rem;
  line-height: 1;
  margin-bottom: 0.55rem;
}
.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.06rem;
  font-weight: 700;
}
.card p { margin: 0; color: var(--soft); font-size: 0.95rem; }

/* How-it-works — real sequence */
.steps {
  display: grid; gap: 0.9rem;
  counter-reset: step;
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem 1.25rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 1.85rem; height: 1.85rem;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 0.85rem; font-weight: 800;
  margin-bottom: 0.7rem;
}
.step h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--soft); font-size: 0.94rem; }

.notes { display: grid; gap: 0.8rem; }
.note {
  margin: 0;
  padding: 1.05rem 1.2rem;
  background: var(--paper);
  border-left: 4px solid var(--teal);
  border-radius: 0 14px 14px 0;
  color: var(--soft);
  box-shadow: 0 4px 16px rgba(28, 60, 72, 0.03);
}
.note strong { color: var(--ink); }
.note--warm {
  background: var(--warm);
  border-left-color: #c9894a;
}

.faq { margin: 0; display: grid; gap: 0.55rem; }
.faq details {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.15rem 1rem;
  transition: border-color 0.2s ease;
}
.faq details[open] { border-color: #b5d0d7; }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.02rem;
  padding: 0.85rem 0;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--teal);
  font-weight: 700;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  margin: 0 0 0.95rem;
  color: var(--soft);
}

.contact {
  margin-top: 1.6rem;
  background: linear-gradient(135deg, #dff0f3 0%, #e8f4f7 100%);
  border: 1px solid #c3dae0;
  border-radius: 18px;
  padding: 1.2rem 1.3rem;
}
.contact strong { display: block; margin-bottom: 0.25rem; font-size: 1.02rem; }

.cta-band {
  margin: 0 0 3rem;
  padding: 1.6rem 1.4rem;
  background: linear-gradient(135deg, #157987 0%, #1a7f8c 55%, #2297ac 100%);
  border-radius: 24px;
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 40px rgba(21, 121, 135, 0.25);
}
.cta-band h2 {
  font-family: var(--font-display);
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: #fff;
}
.cta-band p {
  margin: 0 0 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}
.cta-band .hero__actions { justify-content: center; }
.cta-band .btn--primary {
  background: #fff; color: var(--teal-deep);
  box-shadow: none;
}
.cta-band .btn--primary:hover { background: #f3fbfd; color: var(--teal-deep); }
.cta-band .btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.cta-band .btn--ghost:hover { border-color: #fff; color: #fff; }

footer {
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
  padding: 1.5rem 0 2.8rem;
  color: var(--soft);
  font-size: 0.9rem;
}
footer nav {
  display: flex; flex-wrap: wrap; gap: 0.7rem 1.1rem;
  margin-bottom: 0.8rem;
}
footer a {
  color: var(--soft); text-decoration: none; font-weight: 500;
}
footer a:hover { color: var(--teal-deep); }

/* Inner pages */
.content { padding: 1.7rem 0 2.2rem; }
.content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.3rem);
  margin: 0 0 0.3rem;
}
.content .sub { color: var(--soft); margin: 0 0 1.35rem; }
.content h2 {
  font-size: 1.12rem;
  margin: 1.85em 0 0.55rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.content p { color: var(--ink); }
.content ul, .content ol { padding-left: 1.15em; color: var(--soft); }
.content li { margin: 0.4rem 0; }
.content h3 { font-size: 1.02rem; margin: 1.3em 0 0.3rem; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--sky);
  padding: 0.12em 0.4em;
  border-radius: 5px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .phrase:hover, .card:hover, .nav__cta:hover { transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .demo__bars span { animation: none; height: 70% !important; }
  .phrase, .phrase__emoji, .demo__speak { transition: none; }
}
