/*
 * Novem
 *
 * Views style themselves with SwiftWebUI modifiers. This stylesheet holds only what
 * an inline declaration cannot express: the color tokens for light and dark
 * appearance, the document defaults, hover states, viewport breakpoints, masks and
 * animations.
 */

/* Tokens */

:root {
    color-scheme: light dark;

    --brand: #169F84;
    --brand-strong: #0F8A72;
    --brand-text: #0F8A72;
    --brand-soft: rgba(22, 159, 132, 0.10);
    --brand-glow: rgba(22, 159, 132, 0.28);

    --background: #FFFFFF;
    --background-tinted: #F4F8F7;
    --surface: #FFFFFF;
    --surface-raised: #FFFFFF;
    --text: #1B2322;
    --text-muted: #4E4E4E;
    --text-subtle: #7A8482;
    --border: rgba(27, 35, 34, 0.10);
    --border-strong: rgba(27, 35, 34, 0.16);
    --shadow-small: 0 1px 2px rgba(16, 32, 29, 0.06), 0 2px 8px rgba(16, 32, 29, 0.04);
    --shadow-large: 0 24px 60px -18px rgba(16, 32, 29, 0.22), 0 8px 24px -12px rgba(16, 32, 29, 0.10);
    --header-background: rgba(255, 255, 255, 0.78);

    --header-height: 72px;
    --gutter: 24px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --brand-text: #3FCBAE;
        --brand-soft: rgba(22, 159, 132, 0.16);
        --brand-glow: rgba(22, 159, 132, 0.38);

        --background: #0C1211;
        --background-tinted: #101817;
        --surface: #131C1B;
        --surface-raised: #182322;
        --text: #F1F5F4;
        --text-muted: #AEB8B6;
        --text-subtle: #7E8A88;
        --border: rgba(255, 255, 255, 0.08);
        --border-strong: rgba(255, 255, 255, 0.14);
        --shadow-small: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-large: 0 30px 70px -20px rgba(0, 0, 0, 0.7), 0 10px 30px -14px rgba(0, 0, 0, 0.5);
        --header-background: rgba(12, 18, 17, 0.72);
    }
}

@media (max-width: 640px) {
    :root {
        --header-height: 64px;
        --gutter: 16px;
    }
}

/* Document */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

h1, h2, h3, p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

button {
    font: inherit;
    color: inherit;
}

::selection {
    background: var(--brand);
    color: #FFFFFF;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Display headings: fluid sizes, which `Font` cannot express */

.display-extra-large,
.display-large,
.display-medium {
    font-family: var(--font-display);
    text-wrap: balance;
}

.display-extra-large { font-size: clamp(2.6rem, 5.6vw, 4.6rem); }
.display-large { font-size: clamp(2rem, 3.8vw, 3rem); }
.display-medium { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }

/* Icons: monochrome masks in the current text color */

.icon {
    background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

.icon-apps { --icon: url("/assets/icons/apps.svg"); }
.icon-server { --icon: url("/assets/icons/server.svg"); }
.icon-business { --icon: url("/assets/icons/business.svg"); }
.icon-web { --icon: url("/assets/icons/web.svg"); }
.icon-check { --icon: url("/assets/icons/check.svg"); }
.icon-arrow { --icon: url("/assets/icons/arrow.svg"); }
.icon-arrow-up-right { --icon: url("/assets/icons/arrow-up-right.svg"); }
.icon-swift { --icon: url("/assets/icons/swift.svg"); }
.icon-spark { --icon: url("/assets/icons/spark.svg"); }
.icon-github { --icon: url("/assets/icons/github.svg"); }
.icon-mail { --icon: url("/assets/icons/mail.svg"); }
.icon-location { --icon: url("/assets/icons/location.svg"); }

/* Logo: the variant for the current color scheme */

.logo-for-dark { display: none; }

@media (prefers-color-scheme: dark) {
    .logo-for-light { display: none; }
    .logo-for-dark { display: block; }
}

/* Hover states */

.button {
    border: 1px solid transparent;
    transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.button .icon-arrow {
    transition: transform 200ms var(--ease);
}

.button:hover .icon-arrow {
    transform: translateX(3px);
}

.button-primary {
    background: var(--brand);
    color: #FFFFFF;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 20px -8px var(--brand-glow);
}

.button-primary:hover {
    background: var(--brand-strong);
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 14px 28px -10px var(--brand-glow);
}

.button-secondary {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
    box-shadow: var(--shadow-small);
}

.button-secondary:hover {
    border-color: var(--brand);
    color: var(--brand-text);
    transform: translateY(-1px);
}

.button-light {
    background: #FFFFFF;
    color: #0F2A25;
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.45);
}

.button-light:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px -12px rgba(0, 0, 0, 0.5);
}

.site-nav-link {
    color: var(--text-muted);
    transition: color 150ms ease, background-color 150ms ease;
}

.site-nav-link:hover {
    color: var(--text);
    background: var(--brand-soft);
}

.capability-tab:hover {
    transform: translateX(2px);
}

.package-card {
    border: 1px solid var(--border);
    transition: transform 250ms var(--ease), box-shadow 250ms var(--ease), border-color 250ms ease;
}

.package-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-large);
}

.package-card:hover .package-arrow {
    color: var(--brand-text);
}

.contact-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-link {
    color: var(--text-muted);
    transition: color 150ms ease;
}

.footer-link:hover {
    color: var(--brand-text);
}

/* Header breakpoint: the section links collapse into the menu */

.site-nav { display: flex; }
.menu-toggle,
.mobile-nav { display: none; }

@media (max-width: 960px) {
    .site-nav,
    .header-cta { display: none; }
    .menu-toggle { display: block; }
    .mobile-nav { display: grid; }
}

/* Decorative grids, faded out with a mask */

.backdrop-grid,
.contact-grid {
    background-size: 64px 64px;
}

.backdrop-grid {
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
    opacity: 0.6;
}

.contact-grid {
    background-size: 48px 48px;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000);
    mask-image: linear-gradient(120deg, transparent 30%, #000);
}

/* Motion: only once the application is live, so the prerendered page paints still */

.is-live .pulse-ring { animation: pulse 2.4s ease-out infinite; }
.is-live .hero-focus { animation: rise-in 600ms var(--ease) both; }
.is-live .enters-gently { animation: rise-in 450ms var(--ease) both; }
.is-live .hero-ring-outer { animation: spin 80s linear infinite; }
.is-live .hero-ring-inner { animation: spin 60s linear infinite reverse; }
.is-live .hero-float { animation: float 7s ease-in-out infinite; }
.is-live .hero-float-delayed { animation-duration: 6s; animation-delay: 0.4s; }
.is-live .hero-float-slow { animation-duration: 6.5s; animation-delay: 1.2s; }
.is-live .hero-float-slower { animation-duration: 7.5s; animation-delay: 0.8s; }

@keyframes rise-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(3); opacity: 0; }
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
