/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-dark: #12151e;
    --bg-card: #1a1f2e;
    --bg-card-hover: #222840;
    --text: #e8eaf0;
    --text-secondary: #8a90a0;
    --accent: #e8621a;
    --accent-light: #f0a830;
    --glow: #ffc040;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 12px;
}

/* Base type scale. Every font-size, padding, and gap in this file is in rem,
   so this single value scales the whole site proportionally: 112.5% of the
   browser default = 18px body text instead of 16px. Container max-widths and
   media-query breakpoints stay in px on purpose, so the layout keeps breaking
   at the same viewport sizes. */
html { font-size: 112.5%; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--glow); }

h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 2rem; text-align: center; margin-bottom: 0.5rem; }

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1.05rem; }
.btn-xl { padding: 1rem 2.5rem; font-size: 1.2rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-xl i { font-size: 1.3rem; }

a.btn-primary, a.btn-primary:visited, .btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff !important;
    opacity: 1;
}
a.btn-primary:hover, .btn-primary:hover {
    color: #fff !important;
    opacity: 1;
    box-shadow: 0 4px 24px rgba(232, 98, 26, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent-light);
}
.btn-outline:hover {
    background: rgba(232, 98, 26, 0.1);
    color: var(--glow);
    border-color: var(--accent-light);
}

/* ===== Navigation ===== */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Never less than 2rem at the sides: the calc goes negative below 1272px. */
    padding: 1.2rem max(2rem, calc((100% - 1200px) / 2 + 2rem));
    background: rgba(18, 21, 30, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a { color: var(--text-secondary); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { color: var(--accent-light); }
.nav-links .nav-link[aria-current="page"] { color: var(--text); }
/* The free pair: part of the row here, a headed list on a phone. */
.nav-free { display: contents; }
.nav-link .nav-item-icon { display: none; }

/* A group that opens: the app, help. The toggle reads like the links beside it. */
.nav-group { position: relative; }
.nav-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.nav-group-toggle:hover,
.nav-group-toggle.is-active,
.nav-group-toggle[aria-expanded="true"] { color: var(--text); }
.nav-group-toggle .nav-svg { width: 0.8rem; height: 0.8rem; transition: transform 0.2s; }
.nav-group-toggle[aria-expanded="true"] .nav-svg { transform: rotate(180deg); }

.nav-menu {
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    width: 22.5rem;
    padding: 0.4rem;
    display: grid;
    gap: 0.1rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -6px);
    transition: opacity 0.15s, transform 0.15s, visibility 0s 0.15s;
}
/* A bridge over the gap, so the pointer can travel down to the panel. */
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -1rem; height: 1rem; }
.nav-group.is-open .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity 0.15s, transform 0.15s;
}

.nav-links .nav-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
}
.nav-links .nav-item:hover,
.nav-links .nav-item:focus-visible { background: var(--bg-card-hover); color: var(--text); }
.nav-item-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: rgba(232, 98, 26, 0.12);
    color: var(--accent-light);
}
.nav-item-icon .nav-svg { width: 1rem; height: 1rem; }
.nav-item-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.nav-item-title { font-weight: 600; line-height: 1.3; }
.nav-item[aria-current="page"] .nav-item-title { color: var(--accent-light); }
.nav-item-desc { color: var(--text-secondary); font-size: 0.78rem; line-height: 1.4; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
    background: radial-gradient(ellipse at 50% 80%, rgba(232, 98, 26, 0.12) 0%, transparent 60%),
                var(--bg-dark);
    padding-bottom: 5rem;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem 0;
}

.hero-icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    box-shadow: 0 8px 40px rgba(232, 98, 26, 0.3);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.hero-requirement {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-bottom: 0.9rem;
}

/* ===== Hero Screenshot 3D ===== */
.hero-screenshot-wrapper {
    perspective: 1500px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 0 0;
}

.hero-screenshot {
    transform: rotateX(35deg) scale(0.85);
    transform-origin: center bottom;
    will-change: transform;
}

.hero-screenshot img {
    width: 100%;
    display: block;
}

/* ===== Features ===== */
.features {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: linear-gradient(160deg, rgba(232, 98, 26, 0.06) 0%, rgba(26, 31, 46, 0.5) 40%, rgba(18, 21, 30, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.feature-card:hover {
    background: linear-gradient(160deg, rgba(232, 98, 26, 0.12) 0%, rgba(34, 40, 64, 0.6) 40%, rgba(18, 21, 30, 0.9) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--accent-light);
    opacity: 0.9;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* The first cards, then "Show N more features" (script.js sets is-collapsed;
   without the script every card shows). Kept: the wide cards and one row of the
   small ones — three here, two on a tablet, none on a phone. The last row fades
   into the button so the cut reads as "more below". */
.features.is-collapsed .feature-card:nth-child(n+9) {
    display: none;
}

.features.is-collapsed .features-grid {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 7rem), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 7rem), transparent);
}

.features-more {
    margin-top: 1.5rem;
    text-align: center;
}

.features-more .btn[hidden] {
    display: none;
}

/* "Show more" hands focus to the first card it revealed: a ring for the
   keyboard, none after a click. */
.feature-card:focus:not(:focus-visible) {
    outline: none;
}

/* Feature card with wide screenshot (side by side) */
.feature-card-wide {
    grid-column: span 3;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.feature-card-wide .feature-text {
    flex: 1;
    min-width: 280px;
}

.feature-card-wide .feature-screenshot {
    flex: 1.5;
    max-width: 60%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Feature card with inline screenshot (below text) */
.feature-screenshot-inline {
    margin-top: 1.2rem;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ===== Screenshot (legacy, used on subpages) ===== */
.screenshot-container {
    border-radius: var(--radius);
    overflow: hidden;
}

.screenshot-container img {
    width: 100%;
    display: block;
}

/* ===== Video ===== */
.video-section {
    padding: 5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    border-radius: var(--radius);
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== Samples ===== */
.samples {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.samples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
    text-align: left;
}

.sample-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(18, 21, 30, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sample-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.sample-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.sample-card figcaption {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Title, then material · technique · machine, then who made it: one line each. */
.sample-card a { display: block; }

.sample-title {
    display: block;
    color: var(--text);
    font-weight: 600;
}

.sample-detail {
    display: block;
    margin-top: 0.15rem;
}

.sample-credit {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    opacity: 0.75;
}

.samples-more {
    margin-top: 2rem;
    font-weight: 600;
}

/* ===== Made with Lùmen (/made-with-lumen) ===== */
.showcase-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
    text-align: center;
}

.showcase-hero {
    padding: 4.5rem 0 0;
}

.showcase-hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 10%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.showcase-hero .section-subtitle { margin-bottom: 0; }

.showcase-send {
    max-width: 640px;
    margin: 4rem auto 0;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(18, 21, 30, 0.6);
}

.showcase-send h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }

.showcase-send p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.showcase-send-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Testimonials ===== */
.testimonials {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* One row that scrolls sideways: cards snap into place, the edges fade only on
   the side that has more (script.js sets can-prev / can-next), and the arrows
   appear only for a mouse or trackpad; a finger just swipes. */
.testimonials-rail {
    position: relative;
    margin-top: 2.5rem;
    border-radius: 16px;
}

.testimonials-rail:has(.testimonials-track:focus-visible) {
    outline: 2px solid var(--accent-light);
    outline-offset: 6px;
}

.testimonials-track {
    --fade-l: 0px;
    --fade-r: 0px;
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2rem;
    /* Out to the section's edges, so a card can be cut by the fade rather than by
       the column; the vertical padding leaves room for the hover lift. */
    margin: -0.75rem -2rem -1.25rem;
    padding: 0.75rem 2rem 1.75rem;
    text-align: left;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
    mask-image: linear-gradient(to right, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
}

.testimonials-track::-webkit-scrollbar {
    display: none;
}

.testimonials-track:focus {
    outline: none;
}

.testimonials-rail.can-prev .testimonials-track { --fade-l: 4rem; }
.testimonials-rail.can-next .testimonials-track { --fade-r: 4rem; }

.testimonial-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 var(--w, 360px);
    gap: 1.25rem;
    padding: 1.6rem 1.5rem 1.4rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(18, 21, 30, 0.6);
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Centred while they all fit, scrollable from the first card once they don't
   (justify-content: center would push the first ones out of reach). */
.testimonial-card:first-child { margin-left: auto; }
.testimonial-card:last-child  { margin-right: auto; }

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.testimonial-card blockquote {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--text);
}

.testimonial-card.is-short blockquote {
    font-size: 1.12rem;
}

.testimonial-card blockquote::before {
    content: "\201C";
    color: var(--accent-light);
    font-size: 1.6rem;
    line-height: 0;
    margin-right: 0.15rem;
    vertical-align: -0.35rem;
}

.testimonial-card figcaption {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.testimonial-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    color: #1a1206;
    background: linear-gradient(135deg, var(--glow), var(--accent));
}

.testimonial-who {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.testimonial-author {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.testimonial-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.testimonials-nav {
    position: absolute;
    top: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(26, 31, 46, 0.92);
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-50%);
    transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.testimonials-nav.prev { left: -1.1rem; }
.testimonials-nav.next { right: -1.1rem; }

.testimonials-nav:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.22);
}

.testimonials-nav:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 2px;
}

.testimonials-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.testimonials-nav[hidden] {
    display: none;
}

@media (hover: none), (pointer: coarse) {
    .testimonials-nav { display: none; }
}

@media (max-width: 600px) {
    .testimonials { padding: 4rem 1rem; }
    .testimonials-track {
        margin-inline: -1rem;
        padding-inline: 1rem;
        scroll-padding-inline: 1rem;
        gap: 0.9rem;
    }
    /* One card and the edge of the next, so the row says it scrolls. */
    .testimonial-card { flex-basis: 84%; }
    .testimonials-track { align-items: flex-start; }
    .testimonials-nav.prev { left: -0.4rem; }
    .testimonials-nav.next { right: -0.4rem; }
    .testimonials-rail.can-prev .testimonials-track { --fade-l: 1.5rem; }
    .testimonials-rail.can-next .testimonials-track { --fade-r: 1.5rem; }
}

.testimonials-cta {
    margin-top: 2rem;
    text-align: center;
}

.testimonials-cta a {
    color: var(--accent-light);
    font-weight: 600;
    text-decoration: none;
}

.testimonials-cta a:hover {
    text-decoration: underline;
}

/* ===== Devices ===== */
.devices {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.brand-card {
    background: linear-gradient(160deg, rgba(232, 98, 26, 0.06) 0%, rgba(26, 31, 46, 0.5) 40%, rgba(18, 21, 30, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.brand-card:hover {
    background: linear-gradient(160deg, rgba(232, 98, 26, 0.12) 0%, rgba(34, 40, 64, 0.6) 40%, rgba(18, 21, 30, 0.9) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.brand-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--accent-light);
}

.brand-card ul {
    list-style: none;
}

.brand-card li {
    padding: 0.35rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.brand-card li::before {
    content: "\2713";
    color: var(--accent);
    margin-right: 0.5rem;
    font-weight: 700;
}

.brand-card-custom p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.65;
}

/* ===== Download ===== */
.download {
    padding: 5rem 2rem;
    text-align: center;
    background: radial-gradient(ellipse at 50% 50%, rgba(232, 98, 26, 0.08) 0%, transparent 60%);
}

.download-content {
    max-width: 600px;
    margin: 0 auto;
}

.download-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(232, 98, 26, 0.25);
}

.download h2 {
    margin-bottom: 0.5rem;
}

.download-content > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.download-note {
    font-size: 0.82rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* ===== Free projects + generator (render_home_free) ===== */
.free {
    padding: 3rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    scroll-margin-top: 4rem; /* the hero's line lands here, under the sticky bar */
}

.free-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    text-align: left;
}

a.free-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    color: var(--text);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
a.free-card:hover {
    color: var(--text);
    transform: translateY(-3px);
    border-color: rgba(232, 98, 26, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.free-media {
    position: relative;
    display: grid;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

/* Three projects: a large one beside two small ones. */
.free-media-projects {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    background: var(--bg-dark);
}
.free-media-projects img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.free-media-projects img:first-child { grid-row: span 2; }
a.free-card:hover .free-media-projects img { transform: scale(1.03); }

/* A picture in, a panel out. */
.free-media-tool {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.5fr);
    align-items: center;
    gap: 0.9rem;
    padding: 1.5rem 1.8rem;
    background:
        radial-gradient(ellipse at 72% 45%, rgba(240, 168, 48, 0.16) 0%, transparent 62%),
        #161b28;
}
.free-shot {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
.free-shot:first-child { transform: rotate(-3deg); }
.free-shot img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.free-arrow { color: var(--accent-light); display: grid; place-items: center; }
.free-arrow svg { width: 1.4rem; height: 1.4rem; }

.free-tag {
    position: absolute;
    left: 0.55rem;
    bottom: 0.55rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: rgba(18, 21, 30, 0.74);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.3;
}

.free-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    padding: 1.5rem 1.6rem 1.7rem;
}
.free-kicker {
    color: var(--accent-light);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.free-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    text-wrap: balance;
}
.free-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}
.free-link {
    margin-top: auto;
    padding-top: 0.6rem;
    color: var(--accent-light);
    font-weight: 600;
    font-size: 0.95rem;
}
a.free-card:hover .free-link { color: var(--glow); }

@media (max-width: 768px) {
    .free { padding: 4rem 1rem; }
    .free-grid { grid-template-columns: minmax(0, 1fr); }
    .free-media-tool { padding: 1.2rem; gap: 0.6rem; }
}

/* The hero's line pointing at the free section. */
.hero-news {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 1.6rem;
    padding: 0.32rem 0.85rem 0.32rem 0.35rem;
    border: 1px solid rgba(240, 168, 48, 0.28);
    border-radius: 999px;
    background: rgba(232, 98, 26, 0.08);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    transition: background 0.2s, border-color 0.2s;
}
.hero-news:hover { color: var(--text); background: rgba(232, 98, 26, 0.15); border-color: rgba(240, 168, 48, 0.55); }
.hero-news-tag {
    flex: none;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ===== Guides Section ===== */
.guides-section {
    padding: 3rem 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.guides-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
}

.guides-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.guides-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.guides-links a:hover {
    color: var(--accent-light);
}

/* ===== Footer ===== */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.footer-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.footer-social a {
    display: inline-flex;
    padding: 0.35rem;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: color 0.15s, background-color 0.15s;
}

.footer-social a:hover,
.footer-social a:focus-visible {
    color: var(--text);
    background: var(--bg-card);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.82rem;
    opacity: 0.6;
}

/* ===== Legal Pages ===== */
.legal {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.legal h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.legal .legal-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.legal h2 {
    font-size: 1.3rem;
    text-align: left;
    margin: 2rem 0 0.8rem;
}

.legal p, .legal li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.legal ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal a { color: var(--accent-light); }

.legal-back {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.legal-back:hover { color: var(--text); }

/* ===== Support Page ===== */
.support-email {
    text-align: center;
    padding: 2rem 0;
}

/* ===== Release Cards ===== */
.release-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.release-latest {
    border-color: rgba(232, 98, 26, 0.3);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(232, 98, 26, 0.06) 100%);
}

.release-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.release-header h2, .release-header h3 {
    text-align: left;
    margin: 0;
    font-size: 1.2rem;
}

.release-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.release-notes {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-top: 0.8rem;
}

.release-meta {
    color: var(--text-secondary);
    font-size: 0.82rem;
    opacity: 0.6;
    margin-top: 0.3rem;
}

/* ===== Older releases (downloads page) =====
   Collapsed and deliberately muted: the history exists for rollback and for
   Macs too old for the current build, not as an everyday choice. */
.release-history {
    margin-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.release-history > summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    cursor: pointer;
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
}
.release-history > summary::-webkit-details-marker { display: none; }
.release-history > summary::before {
    content: "\25B8";
    display: inline-block;
    transition: transform 0.2s;
}
.release-history[open] > summary::before { transform: rotate(90deg); }
.release-history > summary:hover { color: var(--text); }

.release-history-note {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin: 0 0 1.2rem;
    max-width: 60ch;
}

.release-old {
    background: transparent;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.release-old:hover { opacity: 1; }

/* Quiet action: reads as a link, not as an invitation. */
a.btn-quiet, a.btn-quiet:visited {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s, border-color 0.2s;
}
a.btn-quiet:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ===== Older-build confirmation (analytics/dl.php) ===== */
.confirm-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}
.confirm-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 0.4rem !important;
}
.confirm-card h1 { font-size: 1.6rem; margin-bottom: 1rem; }
.confirm-card strong { color: var(--text); }
.confirm-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin: 1.6rem 0 0.5rem;
}
.confirm-back { font-size: 0.88rem; margin-top: 1.5rem !important; }

/* ===== License CTA (downloads page) ===== */
.license-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(232, 98, 26, 0.1) 100%);
    border: 1px solid rgba(232, 98, 26, 0.3);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 2.5rem;
}
.license-cta-text { flex: 1 1 300px; }
.license-cta h2 {
    text-align: left;
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
}
.license-cta p {
    color: var(--text-secondary);
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
}
.license-cta ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.2rem;
}
.license-cta li {
    position: relative;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}
.license-cta li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--accent-light);
    font-weight: 700;
}
.license-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 0 0 auto;
}
.license-cta .license-cta-req {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0.2rem 0 0;
    text-align: center;
}

/* ===== Scroll Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.8rem; }
    .features-grid, .devices-grid { grid-template-columns: 1fr; }
    .features.is-collapsed .feature-card:nth-child(n+6) { display: none; }
    .samples-grid { grid-template-columns: repeat(2, 1fr); }
    .showcase-page { padding: 0 1rem 4rem; }
    .showcase-hero { padding-top: 3rem; }
    .showcase-hero h1 { font-size: 2.4rem; }
    .feature-card-wide { grid-column: span 1; flex-direction: column; }
    /* Its 280 px floor is for the side-by-side layout; in a column it pushed the
       whole grid past a 375 px phone and the page scrolled sideways. */
    .feature-card-wide .feature-text { min-width: 0; }
    /* In a column, `flex: 1.5` sizes the screenshot's HEIGHT, not its width:
       the width shrank to the phone while the height kept the image's own, and
       every wide-card screenshot came out tall and squeezed. Size it by width. */
    .feature-card-wide .feature-screenshot {
        flex: none;
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    nav { padding: 1rem; flex-wrap: wrap; }
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-top: 1rem;
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 0.8rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
    /* On a phone a group is a headed list, always open. */
    .nav-group {
        padding: 0.7rem 0 0.3rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
    .nav-links .nav-group-toggle {
        color: var(--text-secondary);
        pointer-events: none;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
    .nav-group-toggle .nav-svg { display: none; }
    .nav-free {
        display: block;
        padding: 0.7rem 0 0.3rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
    .nav-free::before {
        content: attr(data-label);
        display: block;
        padding: 0.3rem 0;
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
    .nav-links .nav-link {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        padding: 0.5rem 0;
        border-top: 0;
        color: var(--text);
        font-size: 0.9rem;
        font-weight: 600;
    }
    .nav-free .nav-link:first-child { margin-top: 0.3rem; }
    .nav-link .nav-item-icon { display: grid; }
    .nav-menu,
    .nav-group.is-open .nav-menu {
        position: static;
        width: auto;
        margin-top: 0.3rem;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }
    .nav-menu::before { display: none; }
    .nav-links .nav-item { align-items: center; padding: 0.5rem 0; border-top: 0; }
    .nav-item-desc { display: none; }
    .nav-item-icon { width: 1.8rem; height: 1.8rem; }
    .nav-links .nav-cta {
        margin: 0.8rem 0 0.4rem;
        padding: 0.75rem 1rem;
        border-top: 0;
        background: linear-gradient(135deg, var(--accent), var(--accent-light));
        color: #fff;
        font-size: 0.95rem;
    }
    .footer-content { flex-direction: column; text-align: center; }

    /* Comparison grids and settings charts are wider than a phone screen — the
       widest is ~660px against a 390px viewport. Let each table scroll inside
       its own box rather than pushing the whole page sideways. (Predates the
       18px type scale: two of these already overflowed at 16px.) */
    .legal table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    /* The bar's items, one row, down to the phone menu at 768px. */
    .nav-links { gap: 1rem; }
    .nav-links a, .nav-group-toggle { white-space: nowrap; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .features.is-collapsed .feature-card:nth-child(n+8) { display: none; }
    .feature-card-wide { grid-column: span 2; }
    .devices-grid { grid-template-columns: repeat(2, 1fr); }
    .samples-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ===== Launch Banner ===== */
.launch-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: filter 0.2s;
}
.launch-banner:hover {
    color: #fff;
    filter: brightness(1.08);
}
.launch-banner-text { color: #fff; }
.launch-banner-code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.28);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.03em;
    margin: 0 0.15rem;
}
.launch-banner-cta {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .launch-banner {
        font-size: 0.85rem;
        padding: 0.65rem 1rem;
        gap: 0.5rem;
    }
}

.btn-launch {
    border-color: var(--glow);
    color: var(--glow);
}
.btn-launch:hover {
    border-color: var(--glow);
    background: rgba(255, 192, 64, 0.12);
    color: #fff;
}

/* "Works with Claude" badge — hero trust badge, Claude terracotta (#D97757) */
.hero-claude-badge {
    text-align: center;
    margin: 1.9rem 0 1.5rem;
}
.claude-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.42em 0.95em;
    border: 1px solid rgba(217, 119, 87, 0.38);
    border-radius: 999px;
    background: rgba(217, 119, 87, 0.09);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.claude-badge:hover {
    background: rgba(217, 119, 87, 0.16);
    border-color: rgba(217, 119, 87, 0.65);
    transform: translateY(-1px);
}
.claude-badge img {
    width: 1.15em;
    height: 1.15em;
    display: block;
}

/* Self-hosted promo spot (render_promo_video) */
.promo-video { margin: 0 auto; }
.promo-video video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background: #000;
}
.promo-video figcaption {
    margin-top: 0.7rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}
.legal .promo-video { margin: 1.8rem 0 2rem; }
.legal div > .promo-video:first-child { margin-top: 0; }

/* Top-of-guide "try it" box (render_guide_cta) */
.guide-cta-top {
    margin: 1.8rem 0 2.2rem;
    padding: 1.3rem 1.5rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    background: rgba(232, 98, 26, 0.06);
}
.legal .guide-cta-top p { margin: 0; }
.legal .guide-cta-top .guide-cta-top-lead { margin-bottom: 1rem; }
.guide-cta-top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; }
.guide-cta-top-link { font-weight: 600; }
.legal .guide-cta-top .guide-cta-top-meta { margin-top: 0.8rem; font-size: 0.85rem; color: var(--text-secondary); }
