/* Shared tokens keep the public page in the same neutral palette as company settings and the editor. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    /* Let the footer reach the bottom of short public pages while long pages scroll normally. */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    color: var(--text);
    background: var(--bg);
    /* Inherit one existing product font across headings, navigation, and body copy instead of mixing serif and sans. */
    font: 16px/1.6 var(--font-ui);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
.landing-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
/* Anchor destinations remain readable below the existing sticky navigation. */
section[id] { scroll-margin-top: 88px; }

/* A solid header keeps navigation legible without an additional blur effect. */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.landing-nav { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.landing-brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.landing-brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--accent-ink); background: var(--accent); font-size: 16px; }
.landing-links { display: flex; align-items: center; gap: 30px; }
.landing-links a, .nav-secondary { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 400; text-decoration: none; transition: color .16s ease; }
.landing-links a:hover, .nav-secondary:hover { color: var(--text); }
.landing-actions { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.nav-primary { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 8px; color: var(--accent-ink); background: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; }

/* A smaller, consistent type scale puts the actual editor in view sooner and removes the oversized slogan treatment. */
.hero { padding: 72px 0; }
.hero-copy { width: min(760px, 100%); margin: 0 auto 48px; text-align: center; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.12; }
h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.02em; }
p { text-wrap: pretty; }
.hero-lede { width: min(580px, 100%); margin: 24px auto 0; color: var(--muted); }
.hero-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 8px; font-size: 16px; font-weight: 600; text-decoration: none; transition: background .16s ease; }
.button-primary { color: var(--accent-ink); background: var(--accent); }
.button-primary:hover, .nav-primary:hover { background: var(--accent-hover); }
.hero-details { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-underline-offset: 4px; }
.hero-details:hover { color: var(--text); }

/* The screenshots carry the product detail without duplicated window chrome, tilt, or decorative shadows. */
.product-frame { overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.product-frame img { width: 100%; height: auto; }

/* Give category headings more space from the previous category than from their own features. */
.feature-section { padding: 64px 0; background: var(--panel); }
.feature-groups { display: grid; gap: clamp(48px, 6vw, 88px); }
.feature-heading { margin-block-end: 28px; }
/* Keep the existing gallery scale while grouping the examples after the editor features. */
.editor-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); margin-block-start: clamp(40px, 5vw, 64px); }
.editor-example { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; }
.editor-example > p { max-width: 48ch; margin: 0; color: var(--muted); }
.editor-example-frame { border: 0; }
/* Each thumbnail is the sole preview link for its example, with a focus ring inside the clipped frame. */
.editor-example-thumbnail { display: block; cursor: zoom-in; }
.editor-example-thumbnail:focus-visible { outline-offset: -4px; }

/* Keep the page still and scroll only the original image when it is larger than the window. */
html:has(.editor-preview[open]) { overflow: hidden; scrollbar-gutter: stable; }
.editor-preview {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.editor-preview[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.editor-preview::backdrop { background: rgba(6, 7, 10, .88); }
.editor-preview-controls { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 8px; }
.editor-preview-controls button {
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: var(--text);
    background: var(--panel-2);
    font: inherit;
    cursor: pointer;
}
.editor-preview-controls button:hover { background: var(--surface-hover); }
.editor-preview-controls [type="submit"] { font-size: 24px; }
.editor-preview-scroll {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0 16px 16px;
}
.editor-preview-scroll:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: -4px; }
.editor-preview-scroll img { max-height: 100%; }
.editor-preview.is-actual-size .editor-preview-scroll { display: block; }
.editor-preview.is-actual-size img { max-width: none; max-height: none; margin-inline: auto; }

/* Fit a fourth editor feature at wide widths so the final row stays balanced. */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 36px 40px; }
/* AI and Workspace fit into pairs, with spacing keeping the items distinct. */
.feature-grid-two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card { min-width: 0; }
/* One locally served Lucide sprite provides crisp, distinct icons with the same stroke and palette as the product. */
.feature-icon { display: block; margin-bottom: 16px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.feature-card h3 { color: var(--text); }
.feature-card p { max-width: 54ch; margin: 12px 0 0; color: var(--muted); }

/* Place the upload and export choices beside the existing publishing preview. */
.publish-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 72px; }
.publish-features { display: grid; gap: 32px; }
/* A close capture keeps the complete publishing form readable without repeating the editor preview. */
.publish-product { width: min(100%, 480px); justify-self: center; }
/* Leave room between the last feature group and the pricing band. */
.workspace-section { padding-block-end: 72px; }

/* Pricing uses the same full-width background as Features; only its text and price stay within the shared content width. */
.pricing-section { padding-block: 64px; background: var(--panel); }
.pricing-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; }
.pricing-copy > p { max-width: 360px; margin: 20px 0 0; color: var(--muted); }
.pricing-copy .pricing-trial { color: var(--positive); font-weight: 600; }
.pricing-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin: 0; }
.pricing-price strong { font-size: clamp(40px, 5vw, 56px); font-weight: 600; line-height: 1.15; letter-spacing: -.03em; }
.pricing-price > span, .pricing-terms { color: var(--muted); }
.pricing-terms { margin: 8px 0 0; }
.pricing-includes { display: grid; gap: 8px; margin: 24px 0; padding-left: 20px; }

/* A plain final action closes the page without another decorative panel or slogan. */
/* The pricing background already marks the section boundary, so the following action needs spacing rather than another rule. */
.final-cta { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-block: 48px; }
.final-cta .button { flex-shrink: 0; }
/* Separate the footer from the page across the full viewport while keeping its links in the content grid. */
.landing-footer { margin-top: auto; border-top: 1px solid var(--line); }
/* Keep every footer link free of underlines on hover too, while preserving native keyboard focus. */
.landing-footer a, .landing-footer a:hover { text-decoration: none; }
/* Compare and Guides each own one column; the utility row spans both without changing any link destinations. */
.landing-footer .landing-container { min-height: 96px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px 48px; padding-block: 24px; }
.landing-footer p { color: var(--muted); font-size: 14px; }
/* A final full-width group keeps the brand and policies below both navigation sections, including on phones. */
.landing-footer-bottom { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding-top: 24px; }
.landing-footer-bottom > a[href="#top"] { display: inline-flex; align-items: center; min-height: 44px; justify-self: end; color: var(--muted); font-size: 14px; }

/* Single vertical lists keep the two groups readable at every width instead of introducing nested link columns or rows. */
.comparison-links, .seo-links { min-width: 0; }
.comparison-links h2, .seo-links h2 { font-size: 16px; letter-spacing: normal; }
.comparison-links ul, .seo-links ul { display: grid; grid-template-columns: 1fr; margin: 12px 0 0; padding: 0; list-style: none; }
.comparison-links a, .seo-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; }
.comparison-links a:hover, .comparison-links a[aria-current="page"], .seo-links a:hover, .seo-links a[aria-current="page"] { color: var(--text); }

/* Responsive rules preserve the product imagery at useful size while keeping every action touch-friendly. */
@media (max-width: 900px) {
    .landing-nav { grid-template-columns: 1fr auto; }
    /* The shared legal stylesheet places policies on a second row inside this bottom group at the same breakpoint. */
    .landing-footer-bottom { grid-template-columns: 1fr auto; }
    .landing-links { display: none; }
    /* Two columns preserve scanability on tablets instead of turning fifteen features into one long list too early. */
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
    .publish-section { grid-template-columns: 1fr; }
    /* Stack the offer before its price when the shared two-column section layout no longer has room. */
    .pricing-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* Stacking keeps the selected layer and its controls together instead of squeezing two editor views onto a phone. */
@media (max-width: 800px) {
    .editor-examples { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 640px) {
    .landing-container { width: min(100% - 28px, 1180px); }
    .landing-nav { min-height: 64px; gap: 12px; }
    .landing-brand { font-size: 14px; }
    .landing-brand-mark { width: 29px; height: 29px; }
    /* Keep sign-in reachable on small screens; account creation remains the primary hero action. */
    .landing-actions .nav-primary { display: none; }
    .hero { padding: 48px 0; }
    .hero-copy { margin-bottom: 32px; }
    .hero-actions { gap: 16px; }
    .feature-section { padding: 48px 0; }
    /* The icon shares a row with the title on phones, reducing scrolling while keeping the full descriptions. */
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 16px; align-items: start; }
    .feature-icon { margin-bottom: 0; }
    .feature-card p { grid-column: 2; }
    .publish-section { gap: 32px; padding-block: 48px; }
    /* Match the shorter section rhythm on phones. */
    .workspace-section { padding-block-end: 48px; }
    .pricing-section { padding-block: 48px; }
    .final-cta { align-items: flex-start; flex-direction: column; gap: 24px; padding-block: 32px; }
    /* Retain two equal link columns on phones; a smaller gap leaves room for natural text wrapping. */
    .landing-footer .landing-container { column-gap: 20px; }
    /* Wrapped link titles need space between entries so adjacent links do not read as a single paragraph. */
    .comparison-links ul, .seo-links ul { row-gap: 8px; }
    .landing-footer p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .button { transition: none; }
}
