/* ============================================================
   Brand elements — formalized from Brand Book v1
   Wordmark · Monogram · The Period · Anatomical motifs
   Load AFTER components.css to refine the brand identity layer.
   ============================================================ */

/* ---------- The Period — signature mark ---------- */
/* The single teal Fraunces italic terminal dot. Used at the end of
   every brand statement, in the wordmark, in 中文 as 。, on invoices.
   Pattern: <span class="tm">.</span> or <em class="tm">.</em>      */

.tm {
  color: var(--primary);
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.band-deep .tm,
.bg-deep .tm,
[data-on-deep] .tm { color: var(--primary-soft); }

.tm-big {
  display: inline-block;
  color: var(--primary);
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.band-deep .tm-big,
[data-on-deep] .tm-big { color: var(--primary-soft); }

/* Existing pattern: <h1>Title<em>.</em></h1> — keep `em` as the inline
   period accent. The brand book uses `<span class="mark">.</span>` for
   the same purpose; alias here so both work. */
.mark {
  color: var(--primary);
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.band-deep .mark,
[data-on-deep] .mark { color: var(--primary-soft); }


/* ---------- Wordmark ---------- */
/* Pattern: <span class="wordmark">Jacqueline <span class="it">Yun</span><span class="dot">.</span></span> */

.wordmark {
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 30, 'WONK' 0;
  font-size: 72px;
  line-height: 1;
  letter-spacing: -0.028em;
  color: inherit;
  display: inline-flex;
  align-items: baseline;
  gap: 0.2em;
}
.wordmark .it {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.wordmark .dot {
  color: var(--primary);
}
.band-deep .wordmark .dot,
[data-on-deep] .wordmark .dot { color: var(--primary-soft); }

/* Sub-sizes */
.wordmark-sm {
  font-size: 22px;
  letter-spacing: -0.02em;
}
.wordmark-xs {
  font-size: 16px;
  letter-spacing: -0.015em;
}

/* Wordmark block — wordmark + monospace credentials */
.wordmark-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.wordmark-block small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.band-deep .wordmark-block small,
[data-on-deep] .wordmark-block small { color: var(--ink-on-deep-soft); }


/* ---------- Monogram (Jy ligature) ---------- */
/* Pattern: <span class="monogram">J<span class="y">y</span></span>     */

.monogram {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--inverse);
  color: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  font-size: 56px;
  line-height: 1;
  position: relative;
  flex-shrink: 0;
}
.monogram .y { margin-left: -0.08em; }
.monogram::after {
  content: '';
  position: absolute;
  bottom: 22px;
  right: 26px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-soft);
}

.monogram-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.monogram-outline::after { background: var(--primary); }

.monogram-primary {
  background: var(--primary);
  color: var(--surface);
}
.monogram-primary::after { background: var(--secondary-soft); }

.monogram-sm {
  width: 36px;
  height: 36px;
  font-size: 22px;
}
.monogram-sm::after {
  width: 3px;
  height: 3px;
  bottom: 10px;
  right: 11px;
}

.monogram-md {
  width: 56px;
  height: 56px;
  font-size: 34px;
}
.monogram-md::after {
  width: 4px;
  height: 4px;
  bottom: 14px;
  right: 16px;
}


/* ---------- Anatomical motifs ----------
   Three SVGs delivered as reusable classes. All use currentColor so
   they inherit text color. Sizes set via inline width/height or
   modifier classes. */

.vert {
  --c: currentColor;
  width: 92px;
  height: 92px;
  color: var(--c);
  flex-shrink: 0;
}
.vert path,
.vert circle,
.vert line { vector-effect: non-scaling-stroke; }

.vert-curve {
  width: 64px;
  height: 140px;
}

.vert-force {
  width: 160px;
  height: 60px;
}


/* ---------- Section dividers using the breath line ---------- */
.breath-rule {
  height: 60px;
  width: 100%;
  max-width: 200px;
  margin: var(--s-7) auto;
  color: var(--primary);
  opacity: 0.7;
}


/* ---------- nav-brand — monogram icon + wordmark + tagline ---------- */
.nav .nav-brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--ink);
}
.nav .nav-monogram {
  width: 38px;
  height: 38px;
  font-size: 22px;
  flex-shrink: 0;
}
.nav .nav-monogram::after {
  width: 3px;
  height: 3px;
  bottom: 10px;
  right: 11px;
}
.nav .nav-brand-text {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  min-width: 0;
}
.nav .nav-brand .wordmark-sm {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.nav .nav-brand .wordmark-sm .it {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.nav .nav-brand .wordmark-sm .dot {
  color: var(--primary);
}
.nav .nav-brand small {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Hide tagline on very narrow viewports — keep monogram + wordmark */
@media (max-width: 420px) {
  .nav .nav-brand small { display: none; }
  .nav .nav-brand .wordmark-sm { font-size: 18px; }
}

/* ---------- Nav actions cluster (sign-in icon + Book CTA) ---------- */
.nav-actions {
  display: inline-flex; /* visible on mobile too, but on phones it carries ONLY
                           the account control (sign-in icon / account circle);
                           the language toggle + Start CTA are hidden below 880px
                           (lang moves to the drawer, CTA is desktop-only). */
  align-items: center;
  gap: var(--s-3);
}

/* Mobile top bar = brand + account control + hamburger only. */
@media (max-width: 879px) {
  .nav-brand { margin-right: auto; }               /* group account + hamburger together on the right */
  .nav-actions > .lang-toggle { display: none; }  /* language toggle lives in the drawer */
  .nav-actions > .nav-cta { display: none; }       /* Start CTA is desktop-only */
}
@media (max-width: 559px) {
  .nav-brand small { display: none; }              /* drop tagline on small phones */
}

/* Respect the signed-in/out toggle written by the inline nav script: when it
   sets [hidden], actually hide it. (.nav-signin's display:inline-flex below
   otherwise overrides the [hidden] attribute, leaving the person icon visible
   next to the account circle when signed in.) */
.nav-signin[hidden] { display: none !important; }

.nav-signin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), transform var(--dur-1) var(--ease);
  cursor: pointer;
}
.nav-signin:hover {
  background: var(--bg-sunk);
  color: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.nav-signin:active { transform: translateY(0); }
.nav-signin svg { display: block; }

@media (min-width: 880px) {
  .nav-actions { display: inline-flex; }
  /* The old standalone nav-cta is hidden — it now lives inside .nav-actions */
  .nav-inner > .nav-cta { display: none; }
}

/* ---------- Language toggle — segmented slider (EN ↔ 中) ---------- */
.lang-toggle {
  display: inline-flex;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 2px;
  background: transparent;
  user-select: none;
}
.lang-toggle .lang-btn {
  width: 34px;
  height: 26px;
  background: none;
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  position: relative;
  z-index: 2;
  transition: color 220ms cubic-bezier(0.22, 1, 0.36, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.lang-toggle .lang-btn:hover { color: var(--ink); }
.lang-toggle .lang-btn.is-active {
  color: var(--bg);
}
.lang-toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 34px;
  height: 26px;
  border-radius: var(--r-pill);
  background: var(--sage-deep);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}
.lang-toggle[data-lang-active="zh"]::before {
  transform: translateX(34px);
}
.lang-toggle .lang-divider { display: none; }

/* Drawer variant — slightly larger pill */
.lang-toggle.drawer-lang {
  align-self: flex-start;
  margin-bottom: var(--s-5);
}
.lang-toggle.drawer-lang .lang-btn { width: 44px; height: 30px; font-size: 12px; }
.lang-toggle.drawer-lang::before { width: 44px; height: 30px; }
.lang-toggle.drawer-lang[data-lang-active="zh"]::before { transform: translateX(44px); }
