/* Hallmark · shape: Side-by-Side Live Sandbox Hero · genre: atmospheric · theme: Hillside Meadow ASCII (zero-idle-GPU WebGL2 ripples, inspired by quiet.md and slashsci.com) · job: try
 * hero: Stage · nav: floating edge-aligned · footer: colophon + community · imagery: live embedded 350x816 SemiDone V7 sandbox with real collapse-to-bar/floating-ball bridge + hillside-meadow WebGL2 ASCII ripples
 * axes: light/grotesk-sans/cool · posture: committed · contrast: pass · fold: pass · v2.0.0 */
@import "./tokens.css";
@import "./base.css";

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
}

.skip {
  position: absolute;
  left: var(--space-md);
  top: calc(-1 * var(--space-3xl));
  z-index: var(--z-toast);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-surface);
  text-decoration: none;
}

.skip:focus-visible {
  top: var(--space-md);
}

/* Floating minimal top bar — zero backdrop-filter blur to keep GPU idle */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky-nav);
  padding: var(--space-md) 0;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
  border-bottom: var(--rule-hair) solid transparent;
}

.top-nav.is-scrolled {
  background: color-mix(in oklab, var(--color-paper) 96%, transparent);
  border-bottom-color: var(--color-rule);
}

.top-nav__inner {
  max-width: none;
  width: 100%;
  padding-inline: clamp(20px, 3vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-2xs) var(--space-sm) var(--space-2xs) var(--space-2xs);
  border-radius: var(--radius-pill);
  color: var(--color-sky-ink);
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 2px 14px var(--color-sky-shadow);
  transition: color var(--dur-short) var(--ease-out);
}

.top-nav.is-scrolled .brand-link {
  color: var(--color-ink);
  text-shadow: none;
}

.brand-link__icon {
  width: 30px;
  height: 30px;
  padding: var(--space-3xs);
  border-radius: 9px;
  background: var(--color-surface);
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}

.brand-link__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.top-nav__controls {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 40px;
  padding: 0 var(--space-md);
  border: var(--rule-hair) solid var(--color-glass-edge);
  border-radius: var(--radius-pill);
  background: var(--color-glass-light);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.nav-pill:hover {
  background: var(--color-glass-light-hi);
}

.nav-pill:active {
  transform: translateY(1px);
}

.nav-pill--lang {
  padding: 0 var(--space-xs);
  gap: var(--space-3xs);
}

.nav-pill__stars {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  padding-left: var(--space-xs);
  border-left: var(--rule-hair) solid var(--color-rule);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-ink);
}

.nav-pill__star-icon {
  color: var(--color-star);
  flex-shrink: 0;
}

.lang-btn {
  min-height: 32px;
  padding: 0 var(--space-sm);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink-2);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}

.lang-btn:hover {
  color: var(--color-ink);
}

.lang-btn[aria-pressed="true"] {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

/* Side-by-Side Desktop Hero over Low-GPU Hillside ASCII Canvas */
.hero-scenic {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--space-2xl) + var(--space-xl));
  padding-bottom: var(--space-2xl);
}

.ascii-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-split {
  position: relative;
  z-index: var(--z-base);
  width: 100%;
  max-width: 1230px;
  margin-left: clamp(0px, calc(50vw - 810px), 520px);
  margin-right: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-2xs) var(--space-md);
  border: var(--rule-hair) solid var(--color-glass-edge);
  border-radius: var(--radius-pill);
  background: var(--color-glass-light);
  color: var(--color-ink);
  font-size: var(--text-xs);
  font-weight: 500;
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-lg);
}

.hero-chip__tag {
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-xs);
  font-weight: 600;
}

.hero-title {
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: var(--tracking-display);
  color: var(--color-sky-ink);
  text-shadow: 0 4px 26px var(--color-sky-shadow);
  margin-bottom: var(--space-md);
}

.hero-title__line2 {
  display: block;
  color: var(--color-sky-accent);
}

.hero-lead {
  max-width: 40ch;
  font-size: var(--text-lead);
  line-height: 1.6;
  color: var(--color-sky-sub);
  text-shadow: 0 2px 16px var(--color-sky-shadow);
  margin-bottom: var(--space-xl);
}

/* Multi-platform Download Button Group */
.dl-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.close-download .dl-group {
  justify-content: center;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 54px;
  padding: var(--space-xs) var(--space-lg);
  border: var(--rule-hair) solid var(--color-glass-edge);
  border-radius: var(--radius-inner);
  background: var(--color-glass-light);
  color: var(--color-ink);
  text-decoration: none;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.dl-btn:hover {
  background: var(--color-glass-light-hi);
  transform: translateY(-1px);
}

.dl-btn:active {
  transform: translateY(1px);
}

.dl-btn--primary {
  background: var(--color-glass-dark);
  color: var(--color-accent-ink);
  border-color: color-mix(in oklab, var(--color-sky-ink) 22%, transparent);
}

.dl-btn--primary:hover {
  background: var(--color-glass-dark-hi);
}

.dl-btn--polishing {
  background: var(--color-glass-mist);
  color: var(--color-ink-2);
  border-style: dashed;
  border-color: color-mix(in oklab, var(--color-ink) 26%, transparent);
}

.dl-btn--polishing:hover {
  background: var(--color-glass-mist-hi);
  color: var(--color-ink);
}

.dl-btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.dl-btn__text {
  display: flex;
  flex-direction: column;
  line-height: 1.22;
}

.dl-btn__sub {
  font-size: 0.72rem;
  opacity: 0.8;
}

.dl-btn__main {
  font-size: var(--text-sm);
  font-weight: 600;
}

.macos-note {
  max-width: 44ch;
  margin-bottom: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--color-glass-edge);
  border-radius: var(--radius-inner);
  background: var(--color-glass-light-hi);
  color: var(--color-ink-2);
  font-size: var(--text-xs);
  line-height: 1.55;
  box-shadow: var(--shadow-card);
}

.macos-note a {
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dl-sublinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-md);
  font-size: var(--text-xs);
  color: var(--color-sky-ink);
  text-shadow: 0 2px 12px var(--color-sky-shadow);
}

.close-download .dl-sublinks {
  justify-content: center;
  color: var(--color-ink-2);
  text-shadow: none;
}

.dl-sublinks a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.94;
  transition: opacity var(--dur-micro) var(--ease-out);
}

.dl-sublinks a:hover {
  opacity: 1;
}

/* Right Side: Live Interactive SemiDone V7 Window (default 350 x 816, supports real collapse to Bar & Floating Ball!) */
.showcase-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
  margin-left: 50px;
}

.preview-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3xs);
  padding: var(--space-2xs);
  border: var(--rule-hair) solid var(--color-glass-edge);
  border-radius: var(--radius-pill);
  background: var(--color-glass-light);
  box-shadow: var(--shadow-card);
}

.preview-tab {
  min-height: 32px;
  padding: 0 var(--space-sm);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink-2);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}

.preview-tab:hover {
  color: var(--color-ink);
}

.preview-tab[aria-selected="true"] {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.window-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 750px;
}

.resizable-shell {
  position: relative;
  width: 380px;
  height: 750px;
  max-width: 100%;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-window);
  transition: width var(--dur-short) var(--ease-out), height var(--dur-short) var(--ease-out), border-radius var(--dur-short) var(--ease-out);
}

.resizable-shell.is-bar {
  border-radius: 16px;
}

.resizable-shell.is-floating {
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 12px 28px rgba(18, 28, 24, 0.26);
}

.live-app-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: var(--color-surface);
}

.resizable-shell.is-floating .live-app-viewport {
  background: transparent;
}

.live-app-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.preview-footer-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--color-glass-light);
  color: var(--color-ink-2);
  font-size: 0.75rem;
  box-shadow: var(--shadow-card);
}

.mini-action-btn {
  min-height: 26px;
  padding: 0 var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--dur-micro) var(--ease-out);
}

.mini-action-btn:hover {
  border-color: var(--color-ink);
}

/* SlashSci-Inspired Minimalist Narrative Pillars */
.pillars-section {
  padding-block: var(--section-gap-s) var(--section-gap);
  background: var(--color-paper);
}

.section-intro {
  max-width: 64ch;
  margin-bottom: var(--space-2xl);
}

.section-intro__title {
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: var(--tracking-display);
  color: var(--color-ink);
  margin-bottom: var(--space-md);
}

.section-intro__lead {
  font-size: var(--text-lead);
  line-height: 1.62;
  color: var(--color-ink-2);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
}

.pillar {
  padding-top: var(--space-lg);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.pillar__index {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.pillar__title {
  font-family: var(--font-display);
  font-size: var(--text-title);
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: var(--space-sm);
}

.pillar__body {
  font-size: var(--text-md);
  line-height: 1.68;
  color: var(--color-ink-2);
}

/* SlashSci-Inspired Deep Forest-Pine Local-First Privacy Sanctuary */
.privacy-band {
  padding-block: var(--section-gap);
  background: var(--color-pine);
  color: var(--color-pine-ink);
}

.privacy-band__title {
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: var(--text-display-s);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: var(--tracking-display);
  color: var(--color-pine-ink);
  margin-bottom: var(--space-md);
}

.privacy-band__lead {
  max-width: 54ch;
  font-size: var(--text-lead);
  line-height: 1.62;
  color: var(--color-pine-muted);
  margin-bottom: var(--space-2xl);
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
}

.privacy-item {
  padding-top: var(--space-lg);
  border-top: var(--rule-hair) solid var(--color-pine-rule);
}

.privacy-item__title {
  font-family: var(--font-display);
  font-size: var(--text-title);
  font-weight: 600;
  color: var(--color-pine-accent);
  margin-bottom: var(--space-xs);
}

.privacy-item__body {
  font-size: var(--text-md);
  line-height: 1.66;
  color: var(--color-pine-muted);
}

/* Closing Download + Community (Xiaohongshu, WeChat Official Account, GitHub, Blog) */
.close-section {
  padding-block: var(--section-gap) var(--section-gap-s);
  background: var(--color-paper-2);
}

.close-download {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: var(--space-3xl);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.close-download__title {
  font-family: var(--font-display);
  font-size: var(--text-display-s);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: var(--tracking-display);
  color: var(--color-ink);
  margin-bottom: var(--space-sm);
  text-wrap: balance;
}

.close-download__lead {
  max-width: 48ch;
  font-size: var(--text-lead);
  color: var(--color-ink-2);
  margin-bottom: var(--space-xl);
}

.community-block {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-2xl);
  align-items: center;
  padding-top: var(--space-2xl);
}

.community-copy__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: var(--space-sm);
}

.community-copy__lead {
  font-size: var(--text-md);
  line-height: 1.68;
  color: var(--color-ink-2);
  margin-bottom: var(--space-lg);
}

.community-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.community-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 40px;
  padding: 0 var(--space-md);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: border-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.community-link:hover {
  border-color: var(--color-ink);
  transform: translateY(-1px);
}

.qr-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}

.qr-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0;
  padding: var(--space-md);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.qr-card__img {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-inner);
  object-fit: cover;
  flex-shrink: 0;
  border: var(--rule-hair) solid var(--color-rule-2);
}

.qr-card__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.qr-card__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.qr-card__logo {
  height: 18px;
  width: auto;
  object-fit: contain;
}

.qr-card__handle {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-ink);
}

.qr-card__desc {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  line-height: 1.5;
}

/* Minimal Footer */
.site-footer {
  padding-block: var(--space-xl);
  background: var(--color-paper-2);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  color: var(--color-ink-2);
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease-out);
}

.site-footer__links a:hover {
  color: var(--color-ink);
}

/* Responsive */
@media (max-width: 64rem) {
  .hero-split {
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

  .showcase-wrap {
    margin-left: 0;
  }

  .hero-copy {
    align-items: center;
    text-align: center;
  }

  .dl-group,
  .dl-sublinks {
    justify-content: center;
  }

  .pillars-grid,
  .privacy-grid,
  .community-block {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

  .window-stage {
    min-height: 0;
    width: 100%;
  }
}

@media (max-width: 40rem) {
  :root {
    --gutter: 16px;
  }

  .hero-scenic {
    padding-top: calc(var(--space-2xl) + var(--space-lg));
  }

  .resizable-shell {
    width: min(380px, calc(100vw - 32px));
    height: 680px;
  }

  .qr-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .dl-btn {
    width: 100%;
    justify-content: center;
  }

  .nav-pill__gh-label {
    display: none;
  }

  .top-nav__inner {
    gap: var(--space-xs);
  }

  .brand-link {
    gap: var(--space-xs);
    padding-right: var(--space-xs);
  }

  .brand-link__name {
    font-size: var(--text-sm);
  }

  .nav-pill {
    min-height: 36px;
    padding: 0 var(--space-sm);
    gap: var(--space-2xs);
  }

  .nav-pill--lang {
    padding: 0 var(--space-2xs);
  }

  .lang-btn {
    min-height: 28px;
    padding: 0 var(--space-xs);
  }

  .nav-pill__stars {
    padding-left: var(--space-2xs);
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-nav,
  .dl-btn,
  .nav-pill,
  .lang-btn,
  .preview-tab,
  .community-link,
  .resizable-shell {
    transition: none;
    transform: none;
  }
}
