/* Shared quality layer for the public site. Kept separate so every page gets
   the same interaction, accessibility, and mobile treatment. */
:root {
  scroll-padding-top: 84px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 10020;
  padding: 10px 14px;
  border: 1px solid rgba(167, 139, 250, .65);
  border-radius: 10px;
  background: #17131f;
  color: #fff;
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
}

img,
video {
  content-visibility: auto;
}

.hero-video-shell video,
.showcase-video-player {
  object-fit: contain;
}

.mobile-download {
  display: none;
}

/* The blog header uses the same spacing and App Store control as the home
   and guide headers, even though its legacy markup uses different class names. */
.site-nav .lang-btn {
  min-width: 96px;
}

.site-nav .nav-cta svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.site-nav .nav-cta span {
  white-space: nowrap;
}

/* Shared language control for the blog list and article pages. */
.lang-toggle-wrap {
  position: relative;
  display: inline-flex;
}

.lang-dropdown {
  position: fixed;
  min-width: 170px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: #17141f;
  box-shadow: 0 20px 52px rgba(0, 0, 0, .82);
  z-index: 10001;
  display: none;
  pointer-events: none;
}

.lang-dropdown.open {
  display: block;
  animation: blogLangDropdownIn .18s ease both;
  pointer-events: auto;
}

.lang-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  color: #e6e0f0;
  font-size: 13px;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}

.lang-option-item:hover,
.lang-option-item.active {
  background: rgba(167, 139, 250, .12);
  color: #fff;
}

.lang-option-item .lang-label {
  flex: 1;
  min-width: 0;
}

.lang-option-item .check {
  width: 14px;
  color: #a78bfa;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

@keyframes blogLangDropdownIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Keep the compact site-wide navigation consistent on every page. */
.nav a[data-site="navFlow"],
.nav a[data-site="navFeatures"],
.nav a[data-site="navGallery"],
.nav a[data-site="navFaq"],
.site-nav .nav-links a[href$="#flow"],
.site-nav .nav-links a[href$="#features"],
.site-nav .nav-links a[href$="#gallery"],
.site-nav .nav-links a[href$="#faq"] {
  display: none !important;
}

/* Older localized landing pages once hid the two shared section links. Keep
   the published language entry points on the same compact navigation. */
.nav a[data-site="navGuide"],
.nav a[data-site="navBlog"] {
  display: inline-flex !important;
}

.footer a:focus-visible,
.logo:focus-visible,
.skip-link:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .mobile-download {
    position: fixed;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 14px;
    z-index: 19;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 11px 18px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .36);
    color: #111;
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(16px);
  }

  .mobile-download small {
    color: #6b6474;
    font-size: 10px;
    font-weight: 600;
  }

  .footer {
    padding-bottom: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link,
  .mobile-download {
    transition: none;
  }
}

/* Mobile system pass: keep the home, guide, blog, article, and localized
   entry points comfortable at one hand-held width. */
@media (max-width: 720px) {
  :root {
    scroll-padding-top: 72px;
  }

  body {
    min-width: 0;
    overflow-x: clip;
  }

  .container,
  .wrap,
  .footer-inner,
  .nav-inner {
    width: calc(100% - 32px);
    max-width: none;
  }

  .nav,
  .site-nav {
    height: 64px;
  }

  .nav-inner {
    min-height: 64px;
    gap: 12px;
  }

  .nav-inner > *,
  .hero-grid > *,
  .flow-grid > *,
  .section-head > *,
  .post-tools > *,
  .footer-inner > * {
    min-width: 0;
  }

  .logo,
  .brand {
    min-width: 0;
    max-width: calc(100% - 56px);
    font-size: 18px;
  }

  .logo-mark,
  .brand img {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
  }

  .menu {
    display: grid !important;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    place-items: center;
    padding: 0;
    margin-left: auto;
    font-size: 21px;
    border-radius: 12px;
    touch-action: manipulation;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    z-index: 30;
    display: none;
    width: auto;
    max-height: calc(100vh - 82px);
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    overscroll-behavior: contain;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 15px;
    background: rgba(25, 21, 33, .98);
    box-shadow: 0 20px 52px rgba(0, 0, 0, .68);
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.open,
  .nav-links.is-open {
    display: flex;
  }

  .nav-links a:not(.nav-cta):not(.nav-download) {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 15px;
  }

  .nav-links a:not(.nav-cta):not(.nav-download)::after {
    display: none;
  }

  .nav-links a:not(.nav-cta):not(.nav-download):hover,
  .nav-links a:not(.nav-cta):not(.nav-download)[aria-current="page"],
  .nav-links a:not(.nav-cta):not(.nav-download)[aria-current="location"] {
    background: rgba(167, 139, 250, .1);
  }

  .lang-switch,
  .lang-btn {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    font-size: 13px;
  }

  .nav-download,
  .nav-cta {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    padding: 11px 14px;
    font-size: 14px;
    touch-action: manipulation;
  }

  .footer {
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
  }

  .mobile-download + .footer,
  body:has(.mobile-download) .footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .hero {
    padding: 112px 0 72px;
    background-position: 64% center;
  }

  .hero-grid,
  .flow-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .eyebrow {
    margin-bottom: 16px;
    font-size: 10px;
    letter-spacing: .11em;
  }

  .hero h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(40px, 12vw, 58px);
    line-height: 1.06;
  }

  .hero p,
  .hero-lead {
    max-width: none;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.75;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .hero-actions > * {
    min-height: 48px;
    justify-content: center;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 30px;
    padding-top: 16px;
  }

  .stat b {
    font-size: 16px;
    line-height: 1.25;
  }

  .stat small {
    font-size: 10px;
    line-height: 1.4;
  }

  .workspace-wrap::before {
    width: 360px;
    height: 360px;
  }

  .workspace {
    width: 100%;
    padding: 9px;
    border-radius: 18px;
    transform: none !important;
    animation: none !important;
  }

  .work-canvas {
    height: 320px;
  }

  .device {
    width: 132px;
    height: 254px;
  }

  .canvas-chip {
    right: 12px;
    bottom: 12px;
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace-toolbar {
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .workspace-toolbar::-webkit-scrollbar,
  .filter-list::-webkit-scrollbar {
    display: none;
  }

  .tool {
    display: inline-flex;
    min-height: 36px;
    flex: 0 0 auto;
    align-items: center;
  }

  .workspace-caption {
    position: static;
    display: block;
    margin-top: 9px;
    font-size: 9px;
    line-height: 1.4;
  }

  .section {
    padding: 76px 0;
  }

  .section-head {
    display: block;
    margin-bottom: 28px;
  }

  .section-head .desc {
    max-width: none;
    margin-top: 16px;
  }

  .title,
  .section-title {
    font-size: clamp(30px, 9vw, 42px);
  }

  .flow-preview {
    order: -1;
    min-height: 360px;
    border-radius: 16px;
  }

  .flow-phone {
    width: 150px;
    height: 300px;
  }

  .flow-label {
    top: 13px;
    right: 13px;
    font-size: 9px;
  }

  .flow-note {
    right: 14px;
    bottom: 14px;
    left: 14px;
    max-width: 190px;
    font-size: 10px;
  }

  .flow-steps {
    right: 14px;
    bottom: 18px;
  }

  .feature-grid,
  .gallery-grid,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .feature {
    min-height: 0;
    padding: 20px;
  }

  .feature-icon {
    margin-bottom: 20px;
  }

  .shot .picture-img,
  .shot video {
    height: auto !important;
    min-height: 0;
    object-fit: contain;
  }

  .shot figcaption {
    padding: 34px 16px 14px;
  }

  .faq-item {
    padding: 0 16px;
  }

  .faq-item summary {
    min-height: 56px;
    display: flex;
    align-items: center;
    padding: 16px 26px 16px 0;
    font-size: 15px;
  }

  .faq-item p {
    font-size: 14px;
  }

  .cta {
    padding: 84px 0 104px;
  }

  .cta h2 {
    font-size: clamp(38px, 11vw, 56px);
  }

  .appstore {
    width: min(100%, 320px);
    min-height: 48px;
    justify-content: center;
  }

  /* Guide subpage */
  .page-guide {
    padding-top: 64px;
  }

  .page-guide .page-hero {
    padding: 48px 0 40px;
  }

  .page-guide .page-hero h1 {
    font-size: clamp(38px, 12vw, 56px);
    line-height: 1.08;
  }

  .page-guide .page-lead {
    font-size: 15px;
  }

  .page-guide .hero-ctas {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .page-guide .hero-ctas > * {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  .page-guide .page-body {
    padding: 40px 0 86px;
  }

  .guide-step,
  .guide-step:nth-child(even) {
    padding: 20px;
    border-radius: 16px;
  }

  .guide-step h3 {
    font-size: clamp(24px, 8vw, 30px);
    line-height: 1.15;
  }

  .guide-step p {
    font-size: 14px;
    line-height: 1.8;
  }

  .guide-visual {
    min-height: 0;
    margin-top: 22px;
    padding: 8px;
    border-radius: 14px;
  }

  .guide-visual img {
    height: auto !important;
    object-fit: contain;
  }

  .guide-tips,
  .page-guide .faq,
  .page-guide .page-cta {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .guide-tips li {
    padding: 16px 16px 16px 42px;
  }

  .page-guide .page-cta {
    padding-top: 44px;
    padding-bottom: 50px;
  }

  .page-guide .page-cta h2 {
    font-size: clamp(30px, 9vw, 44px);
  }

  /* Blog list and long-form articles */
  .post-grid,
  .checklist,
  .next {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-tools {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .filter-list {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-chip {
    min-height: 40px;
    flex: 0 0 auto;
  }

  .post-card {
    min-height: 0;
    padding: 20px;
    border-radius: 14px;
  }

  .post-card h2 {
    margin-top: 14px;
    font-size: 21px;
    overflow-wrap: anywhere;
  }

  .post-card p {
    font-size: 14px;
  }

  .article-shell {
    padding: 48px 0 76px;
  }

  .article {
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 21px 17px;
    border-radius: 16px;
  }

  .article section + section {
    margin-top: 34px;
    padding-top: 30px;
  }

  .article h2 {
    font-size: 26px;
    overflow-wrap: anywhere;
  }

  .article h3 {
    font-size: 18px;
  }

  .article p {
    font-size: 15px;
    line-height: 1.8;
  }

  .article ul,
  .article ol {
    padding-left: 20px;
  }

  .article table {
    min-width: 560px;
    font-size: 13px;
  }

  .article th,
  .article td {
    padding: 11px 12px;
  }

  .note {
    padding: 13px 14px;
  }

  .next {
    margin-top: 32px;
  }
}
