/* ═══════════════ Sommify — Site Shell (nav + footer + marketing pages) ═══════════════ */
/* Shares color tokens with style.css; include AFTER style.css for pages that also load the tool CSS,
   or standalone (it re-declares the minimal tokens it needs) for pure marketing pages. */

:root {
  --bg: #f3f1fa;
  --bg-alt: #ffffff;
  --text: #1e1b2e;
  --text-dim: #746a94;
  --muted: #a79bc9;
  --border: #e6e1f5;
  --wine: #8b7cc8;
  --wine-dark: #6a58a8;
  --wine-tint: #f1eefa;
  --gold: #a99adf;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow: 0 2px 10px rgba(107, 88, 168, 0.06), 0 10px 30px rgba(107, 88, 168, 0.08);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
body.site-page {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ─── Shared top nav ─── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.site-brand img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.site-brand-text { display: flex; flex-direction: column; gap: 1px; }
.site-brand-name { font-weight: 700; font-size: 18px; letter-spacing: 0.2px; line-height: 1.1; }
.site-brand-tagline {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--wine-dark);
  background: var(--wine-tint);
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.5;
  white-space: nowrap;
}
.site-links { display: flex; align-items: center; gap: 6px; }
.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  border: none; background: transparent;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 8px; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle span { top: 17px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.is-active span { opacity: 0; }
.nav-toggle.is-active span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-active span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 640px) {
  .site-nav-inner { padding: 10px 14px; gap: 8px; }
  .site-brand-tagline { display: none; }
  .site-brand-name { font-size: 15px; }
  .site-brand img { width: 30px; height: 30px; }
  .site-cta { padding: 8px 12px; font-size: 12.5px; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-links {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 14px;
    box-shadow: 0 12px 24px rgba(107,88,168,0.1);
    z-index: 60;
  }
  .site-links.site-links-open { display: flex; }
  .site-links .site-link { padding: 12px 10px; }
}
.site-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.site-link:hover { background: var(--wine-tint); color: var(--wine-dark); }
.site-link.active { background: var(--wine-tint); color: var(--wine-dark); }
.site-link .soon {
  font-size: 10px;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--border);
  color: var(--text-dim);
  vertical-align: 1px;
}
.site-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--wine), var(--wine-dark));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.site-cta:hover { opacity: 0.92; }

/* ─── Shared footer ─── */
.site-footer {
  margin-top: 80px;
  padding: 36px 24px 44px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--wine-dark); }

/* ─── Homepage: compact top badge (title/slogan/demo now live inside the Atelier section itself) ─── */
.hero-badge-wrap { text-align: center; padding: 28px 24px 4px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--wine-tint);
  color: var(--wine-dark);
  font-size: 13px;
  font-weight: 600;
}
.hero-title .accent, .product-title .accent {
  background: linear-gradient(135deg, var(--wine), var(--wine-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ─── Homepage: left floating side-nav + product sections layout ─── */
.home-layout {
  display: flex;
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px 0;
  gap: 32px;
  align-items: flex-start;
}
.side-nav {
  position: sticky;
  top: 120px;
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-nav-item {
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-dim);
  border-left: 2px solid transparent;
  background: transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.side-nav-item .side-nav-name { font-size: 14px; font-weight: 700; }
.side-nav-item .side-nav-sub { font-size: 11.5px; opacity: 0.75; }
.side-nav-item:hover { background: var(--wine-tint); color: var(--wine-dark); }
.side-nav-item.active {
  background: var(--wine-tint);
  color: var(--wine-dark);
  border-left-color: var(--wine-dark);
}
.home-sections { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 72px; }
.product-section { padding: 12px 0; }
.product-section-head { text-align: center; margin-bottom: 24px; }
.product-section-head h2, .placeholder-section h2 { font-size: 26px; font-weight: 800; margin: 6px 0 10px; }
.product-title {
  font-size: 38px;
  font-weight: 800;
  margin: 8px 0 14px;
  letter-spacing: -0.5px;
}
.product-slogan { color: var(--text-dim); font-size: 15px; max-width: 560px; margin: 0 auto; line-height: 1.6; }
.section-cta-wrap { text-align: center; margin: 32px 0; }
.section-cta-wrap .btn-primary {
  display: inline-block; padding: 13px 28px; border-radius: 999px;
  background: linear-gradient(135deg, var(--wine), var(--wine-dark)); color: #fff;
  font-weight: 700; font-size: 15px; text-decoration: none; box-shadow: var(--shadow);
}
.partners-inline { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.placeholder-section {
  text-align: center;
  padding: 56px 24px;
  border-radius: var(--radius-xl);
  background: var(--bg-alt);
  border: 1px dashed var(--border);
}

/* ─── Floating persistent trial CTA (always visible while scrolling, eye-catching) ─── */
.floating-trial-cta {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 55%, var(--wine) 100%);
  background-size: 200% 200%;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(107, 88, 168, 0.35);
  animation: cta-breathe 2.6s ease-in-out infinite, cta-gradient 4s ease infinite;
}
.floating-trial-cta:hover { animation-play-state: paused; transform: translateY(-50%) scale(1.08); }
.floating-trial-cta .cta-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--wine);
  animation: cta-ring-pulse 2s ease-out infinite;
  pointer-events: none;
}
.floating-trial-cta .cta-icon { font-size: 19px; line-height: 1; }
.floating-trial-cta .cta-text { font-size: 11px; font-weight: 800; line-height: 1.25; letter-spacing: 0.3px; }
.floating-trial-cta .cta-badge {
  position: absolute;
  top: -12px;
  right: -10px;
  background: #ff5f6d;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 95, 109, 0.5);
  animation: cta-badge-bounce 1.8s ease-in-out infinite;
}

@keyframes cta-breathe {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.06); }
}
@keyframes cta-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes cta-ring-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.45); opacity: 0; }
}
@keyframes cta-badge-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@media (max-width: 900px) {
  .home-layout { flex-direction: column; }
  .side-nav {
    position: sticky; top: 56px; flex-direction: row; flex: none;
    overflow-x: auto; background: rgba(255,255,255,0.9); backdrop-filter: blur(8px);
    padding: 8px 4px; margin: 0 -4px 8px; border-radius: 0; z-index: 40;
  }
  .side-nav-item { flex: 0 0 auto; border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
  .side-nav-item.active { border-left-color: transparent; border-bottom-color: var(--wine-dark); }
  .floating-trial-cta { right: 12px; width: 60px; height: 60px; }
  .floating-trial-cta .cta-icon { font-size: 15px; }
  .floating-trial-cta .cta-text { font-size: 9px; }
  .floating-trial-cta .cta-badge { font-size: 8px; padding: 2px 6px; top: -10px; right: -8px; }
}

/* ─── Homepage: generic section ─── */
.section { max-width: 1120px; margin: 0 auto; padding: 56px 24px; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-tag { color: var(--wine-dark); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.section-title { font-size: 28px; font-weight: 800; margin: 0 0 10px; }
.section-sub { color: var(--text-dim); font-size: 15px; max-width: 560px; margin: 0 auto; line-height: 1.6; }

/* ─── Demo showcase grid ─── */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.demo-card {
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--wine-tint), var(--border));
  box-shadow: var(--shadow);
}
.demo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-card .placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--wine-dark); opacity: 0.55; font-size: 13px; text-align: center; padding: 16px;
}
.demo-card .demo-tag {
  position: absolute; left: 10px; bottom: 10px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(30, 27, 46, 0.55);
  backdrop-filter: blur(4px);
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.2px;
}
.demo-card { cursor: pointer; transition: transform 0.15s; }
.demo-card:hover { transform: translateY(-3px); }
.demo-hint {
  text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px;
}

/* ─── Lightbox (demo showcase swipe viewer) ─── */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 16, 32, 0.92);
  align-items: center; justify-content: center;
}
.lightbox.show { display: flex; }
.lightbox-stage {
  position: relative;
  max-width: min(88vw, 620px);
  max-height: 86vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-stage img {
  max-width: 100%; max-height: 86vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  display: block;
  -webkit-user-select: none; user-select: none;
}
.lightbox-tag {
  position: absolute; left: 16px; bottom: 16px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 13px; font-weight: 600;
}
.lightbox-count {
  position: absolute; right: 16px; bottom: 16px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 12px;
}
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff; border: none;
  font-size: 18px; cursor: pointer; z-index: 5;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-nav {
  background: rgba(255, 255, 255, 0.12); color: #fff; border: none;
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 26px; cursor: pointer; flex-shrink: 0;
  margin: 0 16px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-nav.is-disabled { opacity: 0.25; cursor: default; pointer-events: none; }
@media (max-width: 640px) {
  .lightbox-nav { width: 38px; height: 38px; font-size: 20px; margin: 0 8px; }
  .lightbox-close { top: 12px; right: 12px; }
}

/* ─── Returning-tester notice banner (site-wide, dismissible) ─── */
.notice-banner {
  background: linear-gradient(135deg, var(--wine-tint), var(--bg-alt));
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 10px 20px;
  font-size: 13.5px;
  color: var(--wine-dark);
  position: relative;
}
.notice-banner a { color: var(--wine-dark); font-weight: 700; text-decoration: underline; }
.notice-banner .notice-close {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 4px;
  background: none; border: none;
}
.notice-banner.hidden { display: none; }

/* ─── Partner winery strip ─── */
.partner-strip {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
}
.partner-chip {
  padding: 16px 26px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  min-width: 140px;
  text-align: center;
}

/* ─── Product/tool cards on homepage ─── */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.tool-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: box-shadow 0.15s, transform 0.15s;
}
.tool-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-card.disabled { opacity: 0.6; cursor: default; }
.tool-card.disabled:hover { box-shadow: none; transform: none; }
.tool-card-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--wine-tint); color: var(--wine-dark);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.tool-card h3 { margin: 0 0 4px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.tool-card .tool-name-en { color: var(--wine-dark); }
.tool-card p { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.6; }
.tool-card .tag-soon {
  display: inline-block; margin-left: 8px; font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: var(--border); color: var(--text-dim); font-weight: 600; vertical-align: 2px;
}

/* ─── Trial CTA band ─── */
.trial-band {
  max-width: 1120px; margin: 40px auto 0; padding: 48px 40px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--wine), var(--wine-dark));
  color: #fff; text-align: center;
}
.trial-band h2 { margin: 0 0 10px; font-size: 24px; }
.trial-band p { margin: 0 0 24px; opacity: 0.9; font-size: 14.5px; }
.trial-band .btn-primary {
  display: inline-block; padding: 13px 30px; border-radius: 999px; background: #fff; color: var(--wine-dark);
  font-weight: 700; text-decoration: none; font-size: 15px;
}

/* ─── "Coming soon" tool page ─── */
.coming-soon-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  text-align: center;
}
.coming-soon-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 20px;
  background: var(--wine-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wine-dark);
}
.coming-soon-wrap h1 { font-size: 30px; margin: 0 0 8px; }
.coming-soon-wrap .subtitle { color: var(--text-dim); font-size: 16px; margin: 0 0 28px; }
.coming-soon-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--wine-tint);
  color: var(--wine-dark);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
}
.coming-soon-desc {
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 14.5px;
  margin-bottom: 36px;
}
.coming-soon-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.coming-soon-back:hover { background: var(--wine-tint); border-color: var(--wine); }
