/* =========================================================================
   Serenio — shared chrome: navigation, drawer, footer, page headers, device
   frames, store badge, FAQ, prose and closing CTA. Loaded on every page.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.76);
  border-bottom: 1px solid rgba(136, 117, 180, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 70px;
  max-width: var(--max-shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
  border-radius: 12px;
}
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: var(--shadow-control);
}
.brand__word {
  font-family: "Glitten", "Iowan Old Style", Georgia, serif; /* the wordmark, in every language */
  font-size: 1.32rem;
  letter-spacing: 0.16em;
  color: var(--plum);
  padding-left: 0.16em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline: auto;
}
.nav__link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--r-control);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color var(--dur-control) var(--ease-entry),
    background-color var(--dur-control) var(--ease-entry);
}
.nav__link:hover {
  color: var(--plum);
  background: rgba(136, 117, 180, 0.08);
}
.nav__link[aria-current="page"] {
  color: var(--plum);
  background: rgba(136, 117, 180, 0.12);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
}

/* language switcher */
.lang {
  position: relative;
  flex: none;
}
.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(136, 117, 180, 0.22);
  background: rgba(255, 252, 248, 0.7);
  color: var(--plum);
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color var(--dur-control) var(--ease-entry);
}
.lang__btn:hover {
  border-color: rgba(136, 117, 180, 0.5);
}
.lang__btn svg {
  width: 1.1em;
  height: 1.1em;
}
.lang__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 168px;
  padding: 6px;
  border-radius: 18px;
  list-style: none;
  margin: 0;
  background: rgba(255, 252, 248, 0.97);
  border: 1px solid var(--ring-highlight);
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity var(--dur-control) var(--ease-entry),
    transform var(--dur-control) var(--ease-entry),
    visibility 0s linear var(--dur-control);
}
.lang[data-open="true"] .lang__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.lang__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: start;
  font-size: 0.95rem;
  color: var(--ink);
  transition: background-color var(--dur-press) var(--ease-press);
}
.lang__opt:hover {
  background: rgba(136, 117, 180, 0.1);
}
.lang__opt[aria-current="true"] {
  color: var(--plum);
  font-weight: 600;
}
.lang__opt[aria-current="true"]::after {
  content: "";
  width: 1rem;
  height: 1rem;
  background: var(--plum);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
}

/* mobile nav toggle + drawer */
.nav__toggle {
  display: none;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(136, 117, 180, 0.22);
  border-radius: 12px;
  background: rgba(255, 252, 248, 0.7);
  color: var(--plum);
  align-items: center;
  justify-content: center;
}
.nav__toggle svg {
  width: 22px;
  height: 22px;
}
.nav__drawer {
  display: none;
}

@media (max-width: 960px) {
  .nav__links,
  .nav__actions .btn {
    display: none;
  }
  .nav__toggle {
    display: inline-flex;
  }
  .nav__drawer {
    display: block;
    position: fixed;
    inset: 70px 0 0;
    z-index: 99;
    padding: 1rem var(--gutter) 2.5rem;
    background: rgba(250, 247, 242, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-panel) var(--ease-entry),
      transform var(--dur-panel) var(--ease-entry),
      visibility 0s linear var(--dur-panel);
    overflow-y: auto;
  }
  body[data-nav-open="true"] .nav__drawer {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }
  body[data-nav-open="true"] {
    overflow: hidden;
  }
  .nav__drawer .nav__link {
    display: block;
    padding: 1rem 0.5rem;
    font-size: 1.15rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(136, 117, 180, 0.12);
  }
  .nav__drawer-cta {
    display: grid;
    justify-items: start;
    gap: 1rem;
    margin-top: 1.8rem;
  }
}

/* the smallest phones: keep logo, language and menu on one row */
@media (max-width: 380px) {
  .nav__inner {
    gap: 0.5rem;
  }
  .brand {
    gap: 0.45rem;
  }
  .brand__word {
    font-size: 1.05rem;
    letter-spacing: 0.12em;
  }
  .lang__btn {
    padding: 0 0.6rem;
    gap: 0.3rem;
  }
}

/* -------------------------------------------------------------------------
   App Store badge (Apple artwork, unmodified) + CTA rows
   ------------------------------------------------------------------------- */
.store-link {
  display: inline-flex;
  flex: none;
  border-radius: 12px;
  transition: transform var(--dur-press) var(--ease-press),
    box-shadow var(--dur-control) var(--ease-entry);
}
.store-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -16px rgba(29, 26, 36, 0.55);
}
.store-link:active {
  transform: scale(0.975);
}
.store-badge {
  height: 52px;
  width: auto;
}
.store-link--lg .store-badge {
  height: 58px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}
.cta-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin-top: 1.1rem;
  font-size: var(--text-label);
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}
.cta-note span {
  white-space: nowrap;
}

/* -------------------------------------------------------------------------
   Device frames (real product screenshots live inside these)
   ------------------------------------------------------------------------- */
.device-phone {
  --phone-w: 300px;
  position: relative;
  width: var(--phone-w);
  max-width: 100%;
  margin: 0;
  padding: calc(var(--phone-w) * 0.034);
  border-radius: calc(var(--phone-w) * 0.16);
  background: linear-gradient(150deg, #3b3446, #1f1b27 45%, #2c2635);
  box-shadow: 0 40px 80px -30px rgba(46, 34, 72, 0.55),
    0 12px 28px -12px rgba(46, 34, 72, 0.35),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
.device-phone img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--phone-w) * 0.13);
  background: var(--canvas);
}
.device-phone::after {
  content: "";
  position: absolute;
  top: calc(var(--phone-w) * 0.062);
  left: 50%;
  width: 30%;
  height: calc(var(--phone-w) * 0.07);
  transform: translateX(-50%);
  border-radius: 999px;
  background: #121017;
}
.device-browser {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(136, 117, 180, 0.18);
  box-shadow: 0 40px 90px -40px rgba(46, 34, 72, 0.45),
    0 10px 30px -14px rgba(46, 34, 72, 0.2);
}
.device-browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding-inline: 14px;
  background: linear-gradient(180deg, #f6f1f5, #efe9f2);
  border-bottom: 1px solid rgba(136, 117, 180, 0.14);
}
.device-browser__bar > span:not(.device-browser__url) {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(136, 117, 180, 0.32);
}
.device-browser__url {
  margin-inline: auto;
  padding: 0.2rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}
.device-browser img {
  width: 100%;
  height: auto;
}

/* -------------------------------------------------------------------------
   Inner page header (how it works, organizations, contact, legal)
   ------------------------------------------------------------------------- */
.page-head {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 3rem + 5vw, 7.5rem) clamp(2.5rem, 2rem + 2vw, 4rem);
}
.page-head__inner {
  position: relative;
  z-index: 1;
}
.page-head .eyebrow {
  margin: 0 0 1rem;
  font-size: var(--text-label);
  color: var(--violet-ink);
}
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-display);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 18ch;
  text-wrap: balance;
}
:lang(zh-Hant) .page-head h1,
:lang(ja) .page-head h1,
:lang(ko) .page-head h1 {
  max-width: 22ch;
  line-height: 1.2;
}
.page-head p {
  margin-top: 1.3rem;
  max-width: 60ch;
  color: var(--ink-muted);
  font-size: var(--text-body-lg);
  line-height: 1.65;
}
.page-head__note:empty {
  display: none;
}

/* section heading block */
.section-head {
  max-width: 50rem;
  margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.4rem);
}
.section-head .eyebrow {
  margin-bottom: 0.9rem;
}
.section-head .lead {
  margin-top: 1rem;
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head--center .lead {
  margin-inline: auto;
}

/* -------------------------------------------------------------------------
   FAQ
   ------------------------------------------------------------------------- */
.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 820px;
}
.faq details {
  border-radius: var(--r-media);
  background: rgba(255, 252, 248, 0.74);
  border: 1px solid var(--ring-highlight);
  box-shadow: var(--shadow-control);
  overflow: hidden;
  transition: box-shadow var(--dur-control) var(--ease-entry);
}
.faq details[open] {
  box-shadow: var(--shadow-soft);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.2rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  color: var(--ink);
  border-radius: var(--r-media);
}
.faq summary::-webkit-details-marker {
  display: none;
}
/* details clips overflow, so draw the focus ring inside */
.faq summary:focus-visible {
  outline-offset: -3px;
}
.faq summary::after {
  content: "";
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--plum);
  -webkit-mask: var(--icon-plus) center / contain no-repeat;
  mask: var(--icon-plus) center / contain no-repeat;
  transition: transform var(--dur-control) var(--ease-entry);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details > p {
  padding: 0 1.4rem 1.3rem;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 68ch;
}
.faq details a {
  color: var(--plum);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* -------------------------------------------------------------------------
   Closing CTA band (used across pages)
   ------------------------------------------------------------------------- */
.closer {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-panel);
  padding: clamp(2.4rem, 1.8rem + 3vw, 4.4rem);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(155deg, #efe9f5, #f6f1f0 55%, #eaf2ee);
  border: 1px solid var(--ring-highlight);
  box-shadow: var(--shadow-soft);
}
.closer__copy {
  position: relative;
  z-index: 1;
}
.closer .lead {
  margin-top: 1rem;
}
.closer .cta-row {
  margin-top: 1.8rem;
}
.closer__art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}
@media (max-width: 760px) {
  .closer {
    grid-template-columns: 1fr;
  }
  .closer__art {
    display: none;
  }
}

/* Quiet secondary line (e.g. the organizations pointer) */
.minicta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 1rem;
  text-align: center;
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-media);
  border: 1px solid rgba(136, 117, 180, 0.16);
  background: rgba(255, 252, 248, 0.55);
}
.minicta p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}
.minicta .btn--ghost {
  min-height: 44px;
}

/* -------------------------------------------------------------------------
   Prose (legal pages)
   ------------------------------------------------------------------------- */
.prose {
  max-width: 75ch;
}
.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h2);
  line-height: 1.2;
  margin-top: 2.8rem;
  margin-bottom: 0.9rem;
  color: var(--ink);
  scroll-margin-top: 90px;
}
.prose > div > h2:first-child,
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  font-size: 1.08rem;
  color: var(--plum);
}
.prose p,
.prose li,
.prose td {
  color: var(--ink-muted);
  line-height: 1.72;
}
.prose p + p {
  margin-top: 1rem;
}
.prose ul,
.prose ol {
  margin: 1rem 0;
  padding-left: 1.2rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose a {
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.prose .summary {
  margin: 0 0 2.4rem;
  padding: clamp(1.3rem, 1rem + 1vw, 1.8rem) clamp(1.3rem, 1rem + 1.5vw, 2rem);
  border-radius: var(--r-media);
  background: rgba(167, 207, 190, 0.14);
  border: 1px solid rgba(167, 207, 190, 0.45);
}
.prose .summary h2 {
  margin-top: 0;
  font-size: var(--text-h3);
}
.prose .summary ul {
  margin-bottom: 0;
}
.prose .table-wrap {
  margin: 1.2rem 0 1.4rem;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(136, 117, 180, 0.18);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 560px;
}
.prose th,
.prose td {
  padding: 0.75rem 0.95rem;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid rgba(136, 117, 180, 0.12);
}
.prose th {
  background: rgba(237, 231, 243, 0.6);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.85rem;
}
.prose tr:last-child td {
  border-bottom: 0;
}
.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2.4rem;
  padding: 0;
  list-style: none;
}
.legal-toc a {
  display: inline-flex;
  padding: 0.4rem 0.8rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(136, 117, 180, 0.2);
  background: rgba(255, 252, 248, 0.7);
  font-size: var(--text-label);
  font-weight: 500;
  color: var(--plum);
  text-decoration: none;
}
.legal-toc a:hover {
  border-color: rgba(136, 117, 180, 0.5);
}
@media (max-width: 760px) {
  /* stack legal tables so no column hides off-screen */
  .prose .table-wrap {
    overflow: visible;
  }
  .prose table {
    min-width: 0;
  }
  .prose thead {
    display: none;
  }
  .prose table,
  .prose tbody,
  .prose tr,
  .prose td {
    display: block;
    width: 100%;
  }
  .prose tr {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(136, 117, 180, 0.12);
  }
  .prose tr:last-child {
    border-bottom: 0;
  }
  .prose td {
    padding: 0.1rem 0;
    border: 0;
  }
  .prose td:first-child {
    color: var(--ink);
    font-weight: 600;
  }
}
.legal-updated {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(136, 117, 180, 0.16);
  font-size: var(--text-label);
  color: var(--ink-faint);
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.footer {
  position: relative;
  margin-top: var(--section-y);
  padding-block: clamp(3rem, 2.4rem + 2vw, 4.5rem) 2rem;
  border-top: 1px solid rgba(136, 117, 180, 0.14);
  background: linear-gradient(180deg, rgba(244, 239, 246, 0.55), var(--canvas));
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 2.4rem;
}
.footer__about {
  max-width: 38ch;
}
.footer__about p {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.65;
}
.footer__get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.1rem;
  margin-top: 1.4rem;
}
.footer__get .store-badge {
  height: 44px;
}
.footer__get a:not(.store-link) {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--plum);
}
.footer__get a:not(.store-link):hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__title {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.footer__col a {
  display: block;
  width: fit-content;
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
  transition: color var(--dur-control) var(--ease-entry);
}
.footer__col a:hover {
  color: var(--plum);
}
.footer__care {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2.4rem;
  padding: 1.05rem 1.3rem;
  border-radius: var(--r-media);
  background: rgba(167, 207, 190, 0.16);
  border: 1px solid rgba(167, 207, 190, 0.42);
}
.footer__care .ic {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(167, 207, 190, 0.32);
  color: #3f7a64;
}
.footer__care .ic svg {
  width: 20px;
  height: 20px;
}
.footer__care p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
}
.footer__care a {
  color: var(--plum);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__bottom {
  margin-top: 2.2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(136, 117, 180, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  font-size: var(--text-caption);
  color: var(--ink-faint);
}
@media (max-width: 760px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer__about {
    grid-column: span 2;
  }
}
@media (max-width: 560px) {
  .footer__care {
    align-items: flex-start;
  }
}
