/* Frienbead website — tokens follow docs/design/mockup-v2.html (milk-tea palette). */

:root {
  --page: #F7F5F0;
  --card: #FFFFFF;
  --soft: #EFE7DB;
  --cell: #F3F1EC;
  --text: #2B2723;
  --text2: #6B635A;           /* darker than the app's #8C857C so body text passes WCAG AA */
  --accent: #8A6F4E;
  --accent-ink: #FFFFFF;
  --line: rgba(60, 45, 30, .09);
  --sh: 0 8px 24px rgba(60, 40, 20, .06);
  --sh-s: 0 4px 12px rgba(60, 40, 20, .05);
  --r-card: 28px;
  --r-cell: 14px;

  /* jar illustration */
  --glass: rgba(255, 255, 255, .55);
  --glass-edge: #B9A58B;
  --lid: #8A6F4E;
  --lid-hi: #A88D6B;
  --m1: #E7B96B;  /* honey   */
  --m2: #8FB0C6;  /* mist    */
  --m3: #D8907B;  /* clay    */
  --m4: #A7BF97;  /* sage    */
  --m5: #B8A3C9;  /* lilac   */
  --m6: #F0D9A8;  /* cream   */
  --shine: rgba(255, 255, 255, .75);

  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "PingFang TC",
          "Hiragino Sans", "Apple SD Gothic Neo", system-ui, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #181512;
    --card: #24201C;
    --soft: #342C22;
    --cell: #2C2823;
    --text: #F2EDE6;
    --text2: #A69E94;
    --accent: #C4A27C;
    --accent-ink: #1A1511;
    --line: rgba(255, 255, 255, .08);
    --sh: 0 8px 24px rgba(0, 0, 0, .35);
    --sh-s: 0 4px 12px rgba(0, 0, 0, .28);

    --glass: rgba(255, 255, 255, .06);
    --glass-edge: #6E5F4E;
    --lid: #7A6246;
    --lid-hi: #957A5A;
    --m1: #D4A659;
    --m2: #6F92AA;
    --m3: #C07866;
    --m4: #88A279;
    --m5: #9884AB;
    --m6: #D8C08E;
    --shine: rgba(255, 255, 255, .16);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
:lang(ja) body, body:lang(ja) { line-break: strict; }
:lang(ko) body, body:lang(ko) { word-break: keep-all; }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.3; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 7vw, 40px); font-weight: 800; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: .35em; }
svg { display: block; }

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--card); color: var(--text); padding: 8px 14px; border-radius: 999px;
  box-shadow: var(--sh-s); z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header { padding: 18px 0 8px; }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 800; font-size: 18px;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { font-weight: 700; color: var(--text2); font-size: 13px; }

.langs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.langs li + li { margin: 0; }
.langs a {
  display: inline-block; padding: 5px 11px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: var(--text2); text-decoration: none;
  background: transparent; border: 1px solid var(--line);
}
.langs a:hover { color: var(--text); background: var(--card); }
.langs a[aria-current="page"] { background: var(--card); color: var(--text); box-shadow: var(--sh-s); border-color: transparent; }

/* ---------- hero ---------- */
.hero { padding: 28px 0 12px; text-align: center; }
.hero .jar { width: min(220px, 58vw); height: auto; margin: 0 auto 18px; }
.hero h1 { margin-bottom: .2em; }
.tagline { font-size: 19px; font-weight: 700; color: var(--accent); margin-bottom: .9em; }
.lead { color: var(--text2); max-width: 32em; margin: 0 auto 1.4em; }
.soon {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--card); box-shadow: var(--sh-s);
  padding: 10px 18px; border-radius: 999px; font-weight: 800; font-size: 15px;
}
.soon::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--m4); }

/* ---------- cards ---------- */
.card {
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh);
  padding: 24px 22px; margin: 0 0 16px;
}
.features { display: grid; gap: 16px; margin: 36px 0 12px; padding: 0; list-style: none; }
.features li + li { margin: 0; }
.features .card { margin: 0; display: flex; gap: 16px; align-items: flex-start; }
.features p { color: var(--text2); margin: 0; }
.features h2 { font-size: 19px; margin-bottom: .3em; }
.dot {
  flex: none; width: 40px; height: 40px; border-radius: 50%; margin-top: 2px;
  box-shadow: inset -5px -6px 0 rgba(0, 0, 0, .08), inset 5px 5px 0 rgba(255, 255, 255, .35);
}
.dot.m1 { background: var(--m1); } .dot.m2 { background: var(--m2); }
.dot.m3 { background: var(--m3); } .dot.m4 { background: var(--m4); }
.dot.m5 { background: var(--m5); }
@media (min-width: 700px) {
  .features { grid-template-columns: 1fr 1fr; }
  .features .card { flex-direction: column; }
}

.note {
  background: var(--soft); border-radius: var(--r-card); padding: 20px 22px; margin: 20px 0;
}
.note p:last-child { margin-bottom: 0; }

/* ---------- document pages (privacy / support) ---------- */
.doc { padding-top: 24px; padding-bottom: 8px; }
.doc .meta { color: var(--text2); font-size: 15px; margin-bottom: 1.4em; }
.doc section { margin: 0 0 12px; }
.doc section.card h2 { margin-bottom: .45em; }
.doc section.card p:last-child, .doc section.card ul:last-child { margin-bottom: 0; }
.doc .muted { color: var(--text2); }

.contact { text-align: center; }
.contact .mail {
  display: inline-block; margin: 6px 0 10px; padding: 12px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none;
}
.contact .mail:hover { filter: brightness(1.06); }

.faq { margin: 0; }
.faq details {
  background: var(--card); border-radius: 20px; box-shadow: var(--sh-s);
  margin: 0 0 10px; padding: 0 20px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 700; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 13px; font-size: 22px; font-weight: 700; color: var(--accent);
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 16px; color: var(--text2); }
.faq details > div p:last-child, .faq details > div ol:last-child { margin-bottom: 0; }
.path { color: var(--text); font-weight: 700; white-space: normal; }

/* ---------- language chooser (redirect pages, 404) ---------- */
.chooser { padding-top: 48px; padding-bottom: 24px; text-align: center; }
.chooser .jar { width: 120px; height: auto; margin: 0 auto 20px; }
.chooser ul { list-style: none; padding: 0; margin: 24px auto; display: grid; gap: 10px; max-width: 320px; }
.chooser li + li { margin: 0; }
.chooser a {
  display: block; padding: 14px 18px; border-radius: 18px; background: var(--card); box-shadow: var(--sh-s);
  color: var(--text); font-weight: 800; text-decoration: none;
}
.chooser a:hover { box-shadow: var(--sh); }
.chooser p { color: var(--text2); }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; padding: 28px 0 40px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text2); }
.site-footer nav ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer nav li + li { margin: 0; }
.site-footer nav a { color: var(--text); font-weight: 700; text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0 0 6px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .jar .bob { animation: bob 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .jar .bob:nth-of-type(2n) { animation-duration: 7.5s; animation-delay: -2s; }
  .jar .bob:nth-of-type(3n) { animation-duration: 8.5s; animation-delay: -4s; }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
  .faq summary::after { transition: transform .2s ease; }
}

/* ---------- jar illustration parts (inline SVG) ---------- */
.lid { fill: var(--lid); }
.lid-hi { fill: var(--lid-hi); }
.glass { fill: var(--glass); stroke: var(--glass-edge); stroke-width: 3; stroke-linejoin: round; }
.brand .glass { stroke-width: 3.5; }
.m1 { fill: var(--m1); } .m2 { fill: var(--m2); } .m3 { fill: var(--m3); }
.m4 { fill: var(--m4); } .m5 { fill: var(--m5); } .m6 { fill: var(--m6); }
.jar .shade { fill: none; stroke: rgba(60, 40, 20, .12); stroke-width: 2; }
.jar .hi { fill: rgba(255, 255, 255, .7); }
.jar .shine { stroke: var(--shine); stroke-width: 5; stroke-linecap: round; fill: none; }
.faq-title { margin-top: 28px; }
