:root {
    --bg: #f6f4f0;
    --page-bg:
        radial-gradient(
            1200px 600px at 80% -10%,
            rgba(218, 106, 0, 0.12),
            transparent 60%
        ),
        radial-gradient(
            800px 500px at 10% 10%,
            rgba(15, 109, 110, 0.12),
            transparent 55%
        ),
        #f6f4f0;
    --ink: #141414;
    --muted: #6b6b6b;
    --accent: #da6a00;
    --accent-2: #0f6d6e;
    --panel: #ffffff;
    --panel-2: #f0eee9;
    --border: #e2ddd6;
    --shadow: 0 20px 60px rgba(20, 20, 20, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a1a;
        --page-bg:
            radial-gradient(
                1200px 600px at 80% -10%,
                rgba(218, 106, 0, 0.15),
                transparent 60%
            ),
            radial-gradient(
                800px 500px at 10% 10%,
                rgba(15, 109, 110, 0.15),
                transparent 55%
            ),
            #1a1a1a;
        --ink: #e8e8e8;
        --muted: #a0a0a0;
        --accent: #ff8c42;
        --accent-2: #4fb3b4;
        --panel: #242424;
        --panel-2: #2a2a2a;
        --border: #3a3a3a;
        --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial,
        "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--page-bg);
    background-attachment: fixed;
    line-height: 1.6;
}

a {
    color: #ea1;
    text-decoration: none;
}

a:hover {
    color: #fc2;
}

@media (prefers-color-scheme: dark) {
    a {
        color: #ffb84d;
    }

    a:hover {
        color: #ffd480;
    }
}

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.nav-wrap {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--page-bg);
    background-attachment: fixed;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
    width: 100%;
    margin: 0;
    padding: 0;
}

.nav-wrap.scrolled {
    border-bottom-color: var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1120px;
    padding: 12px 24px;
    margin: 0 auto;
}

.brand {
    font-family:
        "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial,
        "Segoe UI", sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

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

.nav-links {
    display: flex;
    gap: 18px;
    font-size: 0.95rem;
    color: var(--muted);
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--accent-2);
}

.nav-toggle span {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--accent-2);
    position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--accent-2);
}

.nav-toggle span::before {
    top: -6px;
}

.nav-toggle span::after {
    top: 6px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 20px;
    align-items: center;
    padding: 24px 0 64px;
}

.hero-title {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: clamp(2.6rem, 5vw, 4.2rem);
    line-height: 1.05;
    margin: 0 0 16px;
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--muted);
    margin: 0 0 2px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    font-weight: 600;
    font-size: 0.95rem;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.button.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 12px 24px rgba(218, 106, 0, 0.24);
}

.button:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.hero-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
}

.hero-panel h3 {
    margin: 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 1.25rem;
}

.hero-panel p {
    margin: 0;
    color: var(--muted);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.oss-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

/* Base tile styles shared by cards and client tiles */
.tile {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    color: var(--ink);
}

.tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(20, 20, 20, 0.16);
    border-color: var(--accent-2);
}

.oss-card {
    min-height: 190px;
}

.card {
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    container-type: inline-size;
}

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

.card * {
    color: inherit;
}

.card-body {
    padding: 28px 22px 26px;
    display: grid;
    gap: 16px;
}

.product-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    text-shadow: #ccc 0px 1px 3px;
    margin: 0;
    font-size: 4rem;
    line-height: 1.05;
    white-space: nowrap;
    max-width: 100%;
}

@media (prefers-color-scheme: dark) {
    .product-title {
        text-shadow: #000 0px 2px 4px;
    }
}

.product-title em {
    font-style: italic;
    min-width: 0;
}

.product-title img {
    height: 1em;
    margin: -0.1em;
    filter: drop-shadow(2px 4px 3px #ccc);
}

@media (prefers-color-scheme: dark) {
    .product-title img {
        filter: drop-shadow(2px 4px 4px #000);
    }
}

.product-subtitle {
    display: flex;
    justify-content: center;
    text-align: center;
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
}

.logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
    padding: 3px;
}

@media (prefers-color-scheme: dark) {
    .logo {
        background: #ffffff;
    }
}

.card h3 {
    margin: 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 1.4rem;
}

.card h3.product-title {
    font-size: 4.4em;
    font-family:
        "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial,
        "Segoe UI", sans-serif;
    text-shadow: #ccc 2px 4px 3px;
}

@media (prefers-color-scheme: dark) {
    .card h3.product-title {
        text-shadow: #000 2px 4px 4px;
    }
}

@container (max-width: 400px) {
    .product-title {
        font-size: 3rem;
    }
    .product-subtitle {
        font-size: 1rem;
    }
}

.card p {
    margin: 0;
    color: var(--muted);
}

.oss-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.oss-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
}

.oss-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    color: var(--muted);
    line-height: 0;
}

.icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.oss-desc {
    min-height: 48px;
}

.blog-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.blog-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.blog-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(20, 20, 20, 0.16);
    border-color: var(--accent-2);
}

.blog-image-container {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: var(--panel-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.blog-title {
    font-weight: 600;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
}

.blog-date {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: auto;
}

.blog-more {
    margin-top: 16px;
    display: inline-flex;
    font-weight: 600;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted);
}

.hero-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.hero-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    flex: 0 0 auto;
    margin-top: 0;
}

.section {
    padding: 56px 0;
}

.section-title {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    margin: 0 0 12px;
}

.section-lead {
    margin: 0;
    color: var(--muted);
    max-width: 700px;
}

.client-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    align-items: center;
}

.client-tile {
    border-radius: 16px;
    padding: 16px;
    display: grid;
    place-items: center;
    min-height: 90px;
    min-width: 0;
}

.client-tile img {
    max-width: 100%;
    height: auto;
    max-height: 52px;
    filter: grayscale(1);
    opacity: 0.8;
    transition:
        filter 0.2s ease,
        opacity 0.2s ease;
}

.client-tile:hover img {
    filter: none;
    opacity: 1;
}

@media (max-width: 640px) {
    .client-tile img {
        filter: none;
        opacity: 1;
    }
}

@media (prefers-color-scheme: dark) {
    .client-tile {
        background: #3a3a3a;
    }

    .client-tile img {
        filter: none;
        opacity: 1;
    }
}

.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 28px;
}

.info-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-box .button {
    align-self: center;
    margin-top: auto;
}

.info-box h4 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.ml-form-embedBody {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form {
    display: grid;
    gap: 12px;
    align-items: center;
    justify-items: center;
}

.newsletter-form input[type="email"] {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--ink);
    width: 100%;
    max-width: 300px;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-2);
}

.newsletter-form button {
    justify-self: center;
    cursor: pointer;
    color: #ea1;
}

.ml-form-successBody {
    text-align: center;
}

.ml-form-successContent {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ml-form-successBody h4 {
    margin: 0;
    font-size: 1.1rem;
}

.ml-form-successBody p {
    margin: 0;
}

.newsletter-form button:hover {
    color: #fc2;
}

footer {
    border-top: 1px solid var(--border);
    padding-top: 28px;
    color: var(--muted);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    gap: 16px;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .hero > div:first-child {
        order: 1;
    }

    .hero-panel {
        order: 2;
    }

    .hero-actions {
        order: 3;
        align-self: center;
        width: 100%;
    }
}

@media (min-width: 901px) {
    .hero-actions {
        grid-column: 1;
        grid-row: 2;
    }
}

@media (max-width: 640px) {
    .nav {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: flex-end;
        gap: 12px;
        font-size: 0.95rem;
        padding: 12px 24px 12px;
        border-top: 1px solid var(--border);
        background: var(--page-bg);
        background-attachment: fixed;
        white-space: normal;
        flex-wrap: wrap;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: var(--shadow);
    }

    .nav-links a {
        color: var(--accent-2);
        padding: 4px 0;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .nav-wrap.open .nav-links {
        display: flex;
    }
}

@media (max-width: 900px) {
    .oss-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

@media (max-width: 640px) {
    .oss-grid {
        grid-template-columns: minmax(240px, 1fr);
    }
}

@media (max-width: 640px) {
    .client-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hero-title {
        animation: slideIn 0.9s ease both;
    }
    .hero-panel {
        animation: fadeUp 1s ease 0.2s both;
    }
    .card {
        animation: cardFade 0.8s ease both;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
