/* Cogmigo website: same tokens as frontend/src/styles/base.css (forest green, raccoon
   orange, warm cream page, white cards). */
@font-face {
  font-family: "Fredoka";
  font-weight: 700;
  font-display: block;
  src: url("/assets/fredoka-latin-700-normal.woff2") format("woff2");
}

:root {
  --c-page: #fffaf3;
  --c-card: #ffffff;
  --shadow-card: 0 1px 2px rgb(107 74 42 / 6%), 0 4px 14px rgb(107 74 42 / 7%);
  --c-ink: #1d2a22;
  --c-muted: #6f7d74;
  --c-primary: #234d34;
  --c-primary-soft: #e6f0e9;
  --c-accent: #fd6d0c;
  --c-accent-soft: #fff0e4;
  --c-line: #efe6da;
  --c-surface: #f6f0e7;
  --c-gem: #1c9ce0;
  --c-dci: #3a7be0;

  --c-vision: #2a8a7c;
  --c-vision-soft: #e2f3f0;
  --c-hearing: #3a6fd0;
  --c-hearing-soft: #e5edfb;
  --c-reasoning: #cf4a7c;
  --c-reasoning-soft: #fbe7ef;
  --c-attention: #e2702a;
  --c-attention-soft: #fdeee3;
  --c-speed: #c98a00;
  --c-speed-soft: #fdf3d8;
  --c-memory: #8457bd;
  --c-memory-soft: #f1eafa;

  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
  line-height: 1.5;
  color: var(--c-ink);
  background: var(--c-page);
  -webkit-text-size-adjust: 100%;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--c-page); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

/* Japanese uses its own system fonts so kanji take Japanese forms */
:root:lang(ja) {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", sans-serif;
  line-break: strict;
}
:root:not(:lang(ko)):not(:lang(ja)) { word-break: normal; }

.wrap { width: 100%; max-width: 960px; margin-inline: auto; padding-inline: 16px; }

/* Top bar */
.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  color: #fff;
  font-family: "Fredoka", sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}
/* Language menu: a pill that opens a small card with the six languages */
.lang-menu { position: relative; }
.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 14%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary { background: rgb(255 255 255 / 24%); }
.lang-menu ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 168px;
  margin: 0;
  padding: 6px;
  border-radius: 16px;
  background: var(--c-card);
  box-shadow: 0 8px 30px rgb(29 42 34 / 18%);
  list-style: none;
}
.lang-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--c-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.lang-menu li a:hover { background: var(--c-surface); }
.lang-menu li a[aria-current="true"] { color: var(--c-primary); }
.lang-menu li a[aria-current="true"]::after {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%23234d34' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}

/* Hero: the sign-in screen's green with the raccoon over the wordmark */
.hero {
  position: relative;
  overflow: hidden;
  padding: 104px 0 64px;
  background: var(--c-primary);
  color: #fff;
  text-align: center;
}
.hero img { width: min(52vw, 220px); margin: 0 auto 6px; }
.wordmark {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(44px, 11vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.tagline {
  max-width: 420px;
  margin: 10px auto 0;
  color: rgb(255 255 255 / 85%);
  font-size: 19px;
  font-weight: 500;
  text-wrap: balance;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.tagline.coming { margin-top: 24px; font-size: 15px; opacity: .85; }
.store-badge.light { background: #fff; color: #1f1f1f; }
.store-badge small { display: block; font-size: 11px; font-weight: 500; opacity: .8; line-height: 1.1; }
.store-badge span { text-align: left; line-height: 1.2; }

/* Sections */
section { padding: 56px 0 8px; }
.section-title {
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-lead { margin-bottom: 22px; color: var(--c-muted); font-size: 16px; text-wrap: pretty; }

.card {
  padding: 20px;
  border-radius: 20px;
  background: var(--c-card);
  box-shadow: var(--shadow-card);
}

.grid { display: grid; gap: 12px; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.feature h3 { margin: 12px 0 4px; font-size: 18px; font-weight: 700; }
.feature p { color: var(--c-muted); font-size: 15px; }
.icon-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 22px;
}

/* The six areas, in their domain colours */
.domain { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.domain .icon-tile { flex: none; width: 40px; height: 40px; border-radius: 12px; }
.domain .icon-tile svg { width: 22px; height: 22px; }
.domain strong { display: block; font-size: 16px; }
.domain span { display: block; color: var(--c-muted); font-size: 14px; }
.d-vision .icon-tile { background: var(--c-vision-soft); color: var(--c-vision); }
.d-hearing .icon-tile { background: var(--c-hearing-soft); color: var(--c-hearing); }
.d-reasoning .icon-tile { background: var(--c-reasoning-soft); color: var(--c-reasoning); }
.d-attention .icon-tile { background: var(--c-attention-soft); color: var(--c-attention); }
.d-speed .icon-tile { background: var(--c-speed-soft); color: var(--c-speed); }
.d-memory .icon-tile { background: var(--c-memory-soft); color: var(--c-memory); }

.note { margin-top: 28px; color: var(--c-muted); font-size: 13px; text-align: center; }

/* Grouped rows, like RowGroup in the app */
.row-group-title {
  margin: 0 4px 8px;
  color: var(--c-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.row-group { overflow: hidden; border-radius: 18px; background: var(--c-card); box-shadow: var(--shadow-card); }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 18px;
  border-top: 1px solid var(--c-line);
  color: var(--c-ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.row:first-child { border-top: 0; }
.row .value { color: var(--c-muted); font-weight: 500; font-size: 15px; }
.chevron { flex: none; overflow: visible; width: 16px; height: 16px; color: #b9b0a3; }

/* FAQ: native disclosure styled as rows */
details.row-item { border-top: 1px solid var(--c-line); }
details.row-item:first-child { border-top: 0; }
details.row-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
details.row-item summary::-webkit-details-marker { display: none; }
details.row-item summary .chevron { transform: rotate(90deg); transition: transform .2s; }
details.row-item[open] summary .chevron { transform: rotate(-90deg); }
details.row-item .answer { padding: 0 18px 16px; color: var(--c-muted); font-size: 15px; }
details.row-item .answer p + p { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { details.row-item summary .chevron { transition: none; } }

/* Support page header: a shorter green band */
.page-hero { padding: 96px 0 36px; background: var(--c-primary); color: #fff; }
.page-hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.page-hero p { margin-top: 6px; color: rgb(255 255 255 / 85%); font-size: 17px; }

.contact { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.contact h2 { font-size: 20px; font-weight: 800; }
.contact p { margin-top: 4px; color: var(--c-muted); font-size: 15px; }
.contact-main { display: flex; gap: 14px; align-items: center; min-width: 0; }
.contact-main img { flex: none; width: 64px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  background: var(--c-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
@media (max-width: 520px) { .contact .button { width: 100%; } }

.stack > * + * { margin-top: 28px; }

/* Terms and privacy */
.doc { padding: 24px 22px 28px; font-size: 16px; line-height: 1.7; user-select: text; }
.doc h2 { margin: 26px 0 6px; font-size: 18px; font-weight: 800; }
.doc p { color: #3c4a41; }
.doc p + p { margin-top: 10px; }
.doc a { color: var(--c-primary); font-weight: 600; }
.doc-meta { color: var(--c-muted) !important; font-size: 14px; }
.doc-note {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--c-surface);
  color: var(--c-muted);
  font-size: 14px;
}

footer {
  margin-top: 64px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 14px;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--c-ink); }
