/* layout.css — site chrome shared by every page: brand, sticky header with section nav,
   language and section menus (<details>), footer. */

/* ---- Brand ---- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.brand-mark { width: 32px; height: 32px; flex: none; color: var(--primary); } /* the logo symbol fills with currentColor */
.brand-name { white-space: nowrap; }
.brand-accent { color: var(--primary); } /* wordmark two-tone: "Clips" + "ForAI" */
.brand-name.small { font-weight: 800; font-size: 18px; letter-spacing: -0.03em; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.account-nav { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); flex-wrap: wrap; justify-content: flex-end; }
/* Language and section menus: <details>, so keyboard and touch work without script */
.lang-menu, .nav-menu { position: relative; flex: none; }
.lang-menu { margin-left: auto; }
.site-nav + .lang-menu { margin-left: 4px; }
.lang-menu > summary, .nav-menu > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; min-width: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px;
}
.lang-menu > summary::-webkit-details-marker, .nav-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .nav-menu > summary:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.lang-menu > summary .ico { width: 18px; height: 18px; color: var(--muted); }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; margin: 0; padding: 6px; list-style: none; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 30; }
.menu-list a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.menu-list a:hover { background: var(--surface-2); }
.menu-list a[aria-current] { color: var(--link); background: var(--primary-soft); }
.menu-list a b { width: 24px; font-size: 13px; color: var(--muted); }
.menu-list a.chosen b { color: var(--link); }
.nav-menu { display: none; }
.account-nav { flex: none; }
@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-nav + .lang-menu { margin-left: auto; }
  .nav-menu { display: block; }
}
@media (max-width: 520px) {
  .header-row { gap: 8px; min-height: 60px; }
  .account-nav { gap: 8px; }
  .account-nav > span, .account-nav .signup, .account-nav .back { display: none; }
  .account-nav > .badge.soon { display: inline-block; }
  .account-nav .btn, .account-nav button { padding: 10px 14px; }
}

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }
.footer-row { display: flex; align-items: center; gap: 16px 28px; flex-wrap: wrap; }
.footer-row nav { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.footer-row a { color: var(--muted); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.footer-row a:hover { color: var(--text); text-decoration: underline; }
