/* ASTRA site module styles — new-site additions only.
 * dala_assets/css/style.css (template base) stays untouched; everything here uses the
 * astra- prefix and the template palette: purple #8052ff · gold #ffb829 · green #189b81. */

/* ---- generic placeholder panel (team / investors / datasets …) ---- */
.astra-placeholder {
  background: rgba(10, 10, 14, 0.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.6rem;
  padding: 2.5rem 2rem;
  text-align: center;
}
.astra-placeholder__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 0 1rem;
  color: #9a9a9a;
}
.astra-placeholder__icon svg { width: 100%; height: 100%; }
.astra-placeholder__title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 0.5rem; color: #fff; }
.astra-placeholder__desc { font-size: 1rem; opacity: 0.65; margin: 0; }

/* ---- shared link / button accents (FORMATS rows, spatial CTA, light pages) ---- */
.astra-link {
  color: #ffb829;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-color: rgba(255, 184, 41, 0.45);
  transition: text-decoration-color 0.3s ease;
}
.astra-link:hover { text-decoration-color: #ffb829; }

.astra-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2rem;
  background: transparent;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.astra-btn:hover { border-color: #ffb829; color: #ffb829; }

.astra-tutorial-hint {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
  opacity: 0.55;
}

/* ---- browser compatibility banner (built by astra-compat.js) ---- */
.astra-compat {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  background: rgba(255, 184, 41, 0.95);
  border-top: 1px solid rgba(255, 184, 41, 0.5);
  color: #451a03;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
}
.astra-compat__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.375rem; }
.astra-compat__text p { margin: 0; }
.astra-compat__close {
  flex: 0 0 auto;
  background: none;
  border: 0;
  padding: 0.25rem;
  border-radius: 0.375rem;
  color: inherit;
  cursor: pointer;
  line-height: 0;
}
.astra-compat__close:hover { background: rgba(69, 26, 3, 0.12); }
.astra-compat__close svg { width: 14px; height: 14px; }

/* ---- reveal-on-scroll utility (driven by astra-site.js, light pages) ----
 * The landing stack keeps its GSAP animate-from engine; .astra-reveal is for the
 * no-vendor light pages where IntersectionObserver replaces it. */
.astra-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1), transform 0.72s cubic-bezier(0.22, 1, 0.36, 1); }
.astra-reveal.is-visible { opacity: 1; transform: none; }

/* ---- reduced-motion best-effort de-escalation ----
 * The GSAP/three particle runtime is inline in theme.js and not governed by this;
 * particles staying on for reduced-motion users is a known limitation. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .astra-reveal { transition: none; transform: none; opacity: 1; }
}

/* ---- top-bar navigation (home `.header` and light pages `.astra-page__header`), 2026-11-02 ----
 * Order: AI Annotation · Format Conversion · VIBE Tools · Datasets · Resources ▾ · language · CTA.
 * The template keeps its desktop nav down to 768px and wraps long labels mid-word, so labels stay on
 * one line and the widest entries step aside as the bar narrows (all of them are in the footer too).
 * Home items carry section-name, light-page items carry data-nav. */
@media (min-width: 768px) {
  /* Hit area (2026-11-10, PLAN-landing-nav-click-fix): the whole bar moves 1rem when it switches grown <-> compact, and a link was only
   * ~23px tall, so a press that started on it could end beside it (Chrome then gives the click to the common parent: nothing happens).
   * 1.2rem of padding above and below, cancelled by the same negative margin, makes each link ~45px tall without moving a pixel.
   * The template's overflow:hidden on .nav__item / .nav__link only serves the click "chars roll up" timeline of [anchor-link] items,
   * which the top-bar links are not; it would clip the padding away. */
  .header .nav__item { overflow: visible; }
  .header .nav__link { white-space: nowrap; padding-block: 1.2rem; margin-block: -1.2rem; overflow: visible; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  html:not([lang^="zh"]) .header .nav__item[section-name="converter"],
  html:not([lang^="zh"]) .header .nav__item[section-name="vibetools"],
  html:not([lang^="zh"]) .astra-page__nav [data-nav="converter"],
  html:not([lang^="zh"]) .astra-page__nav [data-nav="vibetools"] { display: none; }
}

/* "Resources" dropdown — one component for both bars. Open = .is-open, set only by js/astra-site.js: on desktop mice hovering opens it
 * (60 ms) and leaving closes it (200 ms); click / Enter toggles it everywhere. (Until 2026-11-10 a CSS :hover rule opened it too, and
 * the two states fought: a click on a hover-opened menu changed nothing and the menu then stuck open.) */
.astra-dd { position: relative; display: inline-flex; align-items: center; }
.astra-dd__btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font-family: inherit; /* size / weight / colour come from .nav__link (home) or .astra-page__nav-link */
}
/* the template clips .nav__item (overflow:hidden, for its letter animation) — let the menu out */
.header .nav__item--dd { overflow: visible; }
/* letter-hop spans (js/astra-site.js); they also carry the template's .nav__link__chars top padding */
.astra-hop__c { display: inline-block; white-space: pre; }
.astra-dd__chev { flex: none; transition: transform 0.25s ease; }
.astra-dd.is-open .astra-dd__chev { transform: rotate(180deg); }
.astra-dd__menu {
  display: none; position: absolute; z-index: 60; top: calc(100% + 16px); left: 50%; transform: translateX(-50%);
  min-width: 220px; padding: 8px; text-align: left;
  border-radius: 16px; border: 1px solid rgba(229, 231, 235, 0.15);
  background: rgba(14, 14, 16, 0.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.5);
}
.astra-dd.is-open .astra-dd__menu { display: block; }
@media (hover: hover) and (min-width: 768px) {
  /* bridge the gap so the pointer can travel into the menu */
  .astra-dd__menu::before { content: ''; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
}
.astra-dd__title {
  margin: 6px 12px 8px; white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(229, 231, 235, 0.4);
}
.astra-dd__link {
  display: block; padding: 9px 12px; border-radius: 10px; white-space: nowrap;
  color: rgba(229, 231, 235, 0.72); text-decoration: none;
  font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1.4;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.astra-dd__link:hover, .astra-dd__link:focus-visible, .astra-dd__link[aria-current="page"] { color: #fff; background: rgba(229, 231, 235, 0.08); }
.header .astra-dd__btn:hover, .header .astra-dd.is-open .astra-dd__btn { color: #fff; }

/* home phone menu (< 768px): the template stacks the items in a full-screen panel — show the
 * resources group expanded inline there, the button becomes a small label */
@media (max-width: 767px) {
  .header .nav__item--dd .astra-dd { display: flex; flex-direction: column; align-items: center; width: 100%; text-align: center; }
  .header .astra-dd__btn { pointer-events: none; opacity: 0.45; font-size: 12px; }
  .header .astra-dd__chev { display: none; }
  .header .astra-dd__menu {
    display: flex; flex-direction: column; align-items: center; position: static; transform: none;
    min-width: 0; margin-top: 8px; padding: 0; border: 0; background: none; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .header .astra-dd__menu::before { display: none; }
  .header .astra-dd__title { display: none; }
  .header .astra-dd__link { padding: 6px 0; background: none !important; font-size: 15px; text-align: center; }
}

/* Navigation feedback (2026-11-10, js/astra-site.js "Navigation feedback"): from the click on an in-site link until the next page paints
 * (~0.3 s locally, ~0.9 s over a 150 ms network) a thin purple bar grows along the top edge and the cursor shows progress — before this,
 * nothing changed on screen and visitors clicked again. Above the home loader (10100); never takes the pointer. */
html.astra-nav-pending, html.astra-nav-pending * { cursor: progress !important; }
html.astra-nav-pending body::after {
  content: ''; position: fixed; z-index: 10200; left: 0; top: 0; width: 100%; height: 2px; pointer-events: none;
  background: #8052ff; box-shadow: 0 0 8px rgba(128, 82, 255, 0.7);
  transform-origin: 0 50%; transform: scaleX(0.9);
  animation: astra-nav-pending 8s cubic-bezier(0.08, 0.82, 0.17, 1) both;
}
@keyframes astra-nav-pending { from { transform: scaleX(0.08); } to { transform: scaleX(0.9); } }

/* No page-switch crossfade (2026-11-10, PLAN-landing-nav-click-fix §9). The site used to opt in to cross-document view
 * transitions (`@view-transition { navigation: auto }`, top bar named so it stayed put). While such a transition runs — from the
 * moment the new page commits until its 0.22 s crossfade ends, longer when the new page's first paint is held — the browser
 * shows snapshots and hit-tests every click to the root element, and pointerenter never reaches the Resources dropdown. The
 * top bar looked identical and ready on every sub-page, so the first click after a sub-page → sub-page switch was silently
 * lost ("I have to click twice"). Pages now switch with the browser's plain same-origin paint holding; the pageswap guard in
 * astra-site.js stays as a no-op. Do not opt back in to @view-transition here. */

/* ---- Interactive tutorial floating modal over the landing page (2026-11-12) ---- */
html.astra-tp-open, html.astra-tp-open body { overflow: hidden; }
.astra-tp-modal {
  position: fixed;
  inset: 0;
  z-index: 10300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3.5vh, 36px) clamp(16px, 3.5vw, 44px);
  background: rgba(6, 7, 12, 0.58);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: astra-tp-fade 0.22s ease-out both;
}
.astra-tp-modal[hidden] { display: none !important; }
.astra-tp-dialog {
  position: relative;
  width: min(1220px, 92vw);
  height: min(790px, 88vh);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(11, 12, 18, 0.94);
  border: 1px solid rgba(229, 231, 235, 0.16);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(128, 82, 255, 0.18);
}
.astra-tp-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}
.astra-tp-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 11, 16, 0.88);
}
.astra-tp-loader[hidden] { display: none !important; }
.astra-tp-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid rgba(229, 231, 235, 0.16);
  border-top-color: #8052ff;
  animation: astra-tp-spin 0.8s linear infinite;
}
.astra-tp-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(229, 231, 235, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.astra-tp-close:hover { background: rgba(255, 255, 255, 0.14); }
@keyframes astra-tp-spin { to { transform: rotate(360deg); } }
@keyframes astra-tp-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- footer bar, 2026-11-10 (PLAN-landing-exit-loader-footer) ----
 * The footer has no navigation any more: everything it used to repeat (Platform / Team, the four tools, Docs / Changelog / Support / Blog,
 * the language switch) is in the top bar of every page (user, 2026-11-10: "the entries in the bottom bar are redundant with the top
 * one"). What is left is the copyright line, plus the logo below 1024px (the template's own rule), so:
 *  - Padding: the template pads the bar 2.5rem above and below that single line (zh 1440: 80px; 1920: 107px); halved to 1.25rem
 *    (user, 2026-11-10: "the footer bar's height needs to come down overall"). Horizontal padding is the template's own.
 *  - Type: the copyright line is .8rem at every width and never below 10px. The template only makes it .8rem between 768 and 1365px
 *    and 1rem above (1440: 12px, 1920: 16px, 2560: 21px) and on phones (12px); the user asked for a smaller line (1440: 12 -> 10px,
 *    1920: 16 -> 12.8px). At the laptop root size (12px) .8rem alone would be 9.6px, hence the 10px floor.
 *  - Phones (< 768px): the template's `white-space: nowrap` on the two copyright items would run the English tagline (about 365px at
 *    10px) past a 315px box; let it wrap, centred.
 * This file loads on the home page and on every light page, so the bars stay identical (qa/check_footer_parity.mjs). */
.footer__bar { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.footer__copyright { font-size: max(.8rem, 10px); }
@media (max-width: 767px) {
  .footer__copyright__item { white-space: normal; text-align: center; }
}
