/* Shared colors, spacing, and surface styles. */
:root {
    --green: #128044;
    --green-dark: #0d6738;
    --green-deep: #084827;
    --blue: #168fc6;
    --blue-dark: #0b6f9d;
    --ink: #15291d;
    --muted: #596b60;
    --surface: #ffffff;
    --surface-soft: #f4f9f6;
    --border: #d9e8df;
    --shadow: 0 18px 50px rgba(10, 71, 39, 0.1);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

/* Global page defaults and accessible focus treatment. */
html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f4fbf7 0, #ffffff 34rem);
    font-size: 1rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: var(--green-dark);
    text-underline-offset: 0.18em;
}

a:focus-visible {
    outline: 3px solid rgba(27, 125, 169, 0.38);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Navigation */
.nav {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 100px;
    padding: 1.05rem max(1.5rem, calc((100vw - 1240px) / 2));
    overflow: hidden;
    background:
        radial-gradient(circle at 82% -120%, rgba(22, 143, 198, 0.46), transparent 55%),
        linear-gradient(108deg, #16814a 0%, #137442 34%, #126d4c 60%, #116b78 100%);
    border-bottom: 0;
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.13),
        inset 0 -14px 30px rgba(5, 61, 34, 0.15);
    transform-origin: top center;
    animation: header-arrive 820ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Decorative highlight that sweeps across the nav on load. */
.nav::before {
    position: absolute;
    z-index: -1;
    inset: -180% 38% -180% 18%;
    transform: rotate(22deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
    content: "";
    animation: header-sheen 1100ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

/* Product identity shown at the left of the navigation. */
#addon-icon {
    width: 58px;
    height: 58px;
    margin: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18);
}

#brand-names {
    margin-left: 0.85rem;
    line-height: 1.2;
}

.add-on-title {
    color: #ffffff;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 750;
    letter-spacing: -0.02em;
}

.author-name {
    margin: 0.3rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    font-weight: 500;
}

.top-div {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0;
}

/* Navigation links use a lightweight button treatment. */
.top-menu {
    margin: 0;
    padding: 0.68rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.2rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.top-menu:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 22px rgba(4, 62, 35, 0.18);
    transform: translateY(-1px);
}

/* Product banner */
#banner {
    position: relative;
    isolation: isolate;
    padding: clamp(2.75rem, 8vw, 6.5rem) 1rem;
    overflow: hidden;
    color: #f8fafc;
    background:
        radial-gradient(circle at 18% 0%, rgba(18, 128, 68, 0.34), transparent 32%),
        radial-gradient(circle at 82% 120%, rgba(22, 143, 198, 0.48), transparent 42%),
        linear-gradient(145deg, #11291c 0%, #06130d 52%, #062436 100%);
    margin-top: -1px;
    border-top: 0;
    border-bottom: 1px solid rgba(27, 125, 169, 0.25);
    box-shadow:
        0 24px 48px rgba(3, 7, 18, 0.24),
        inset 0 -30px 60px rgba(0, 0, 0, 0.34);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: clamp(2.35rem, 7vw, 5rem);
    font-weight: 750;
    letter-spacing: -0.06em;
    line-height: 1.05;
    text-align: center;
    transform-origin: top center;
    animation: header-arrive 820ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Faint grid texture behind the product wordmark. */
#banner::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0.16;
    background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
    content: "";
}

.stylized-t {
    color: #53b6df;
    text-shadow: 0 0 26px rgba(27, 125, 169, 0.5);
    animation: logo-glow 950ms 300ms ease-out both;
}

#store-link {
    position: relative;
    display: inline-block;
    color: transparent;
    background: linear-gradient(108deg, #36cf7e 0%, #3acbac 52%, #63c8ee 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px rgba(56, 197, 176, 0.22);
    text-decoration: none;
}

/* One temporary highlight crosses the wordmark, then disappears completely. */
#store-link::after {
    position: absolute;
    inset: 0;
    color: transparent;
    background: linear-gradient(105deg, transparent 47%, rgba(255, 255, 255, 0.96) 50%, transparent 53%);
    background-position: 140% 0;
    background-size: 250% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    content: attr(data-wordmark);
    pointer-events: none;
    animation: wordmark-shine 2800ms 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#store-link:hover {
    filter: brightness(1.13);
}

#store-link:focus-visible {
    outline-color: rgba(99, 200, 238, 0.82);
}

/* A single bright band travels across the product name when the page opens. */
@keyframes wordmark-shine {
    from {
        opacity: 0;
        background-position: 140% 0;
    }

    10%,
    82% {
        opacity: 1;
    }

    to {
        background-position: -140% 0;
        opacity: 0;
    }
}

/* Main content */
main,
#app-home {
    width: min(calc(100% - 2.5rem), 1040px);
    max-width: none;
    margin: clamp(2.5rem, 6vw, 5rem) auto;
    padding: 0;
    animation: content-rise 650ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Homepage uses a text column beside a screenshot column. */
#app-home {
    width: min(calc(100% - 2.5rem), 1180px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

h1,
h2,
h3 {
    color: #10251a;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

h1,
.title {
    margin: 0 0 1.5rem;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 780;
}

h3 {
    margin: 2rem 0 0.65rem;
    font-size: 1.2rem;
}

p {
    margin: 0 0 1.15rem;
}

main > ul,
main > p,
main > h3,
main > h1:not(.title) {
    max-width: 78ch;
}

main li + li {
    margin-top: 0.35rem;
}

/* Support-page CSV fields remain distinct and readable on narrow screens. */
#app code {
    color: #087b43;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.94em;
    overflow-wrap: anywhere;
}

#app > ol {
    max-width: 78ch;
    padding-left: 2.4rem;
}

#about-paragraphs {
    grid-column: 1;
    max-width: 82ch;
}

/* Lets the use-case children participate in the parent grid. */
#example-use-cases {
    display: contents;
}

#example-use-cases > div:first-child {
    grid-column: 1;
    margin-top: 1.5rem;
}

#example-use-cases h3 {
    position: relative;
    padding-left: 1rem;
}

/* Green-to-blue accent beside homepage section headings. */
#example-use-cases h3::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(var(--green), var(--blue));
    content: "";
}

#example-images {
    position: static;
    display: grid;
    grid-column: 2;
    grid-row: 1 / span 2;
    width: auto;
    height: auto;
    gap: 1.25rem;
    align-self: start;
    margin-top: 0.35rem;
    animation: images-arrive 680ms 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Screenshot cards lift slightly on hover. */
.ex-images {
    width: 100%;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.ex-images:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 24px 55px rgba(10, 71, 39, 0.18);
}

.code,
#formula {
    padding: 0.08em 0.3em;
    border-radius: 4px;
}

/* Inline examples demonstrate styles produced by the add-on. */
.code {
    background: #e9eef5;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.92em;
}

#formula {
    background: #fff59a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05em;
}

#question-styling {
    color: #087b43;
    font-style: italic;
    text-decoration: underline;
}

#todo-styling {
    color: #d21b2c;
    font-weight: 700;
}

/* Developer page */
.dev-page,
.dev-bio {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

.dev-page {
    padding: clamp(1.25rem, 4vw, 2.25rem);
}

/* Profile image and details remain side-by-side on larger screens. */
.dev-grid {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
    gap: clamp(1.75rem, 5vw, 3.5rem);
    align-items: center;
}

.dev-photo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dev-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 5px solid #ffffff;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 12px 35px rgba(18, 54, 89, 0.18);
}

.dev-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

/* Compact profile metadata pills. */
.dev-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.3rem 0.65rem;
    border: 1px solid #c9e4d4;
    border-radius: 999px;
    color: var(--green-deep);
    background: #edf8f1;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.25;
}

.dev-badge br {
    display: none;
}

.dev-name {
    margin: 0 0 0.4rem;
    font-size: clamp(1.85rem, 4vw, 2.65rem);
}

.dev-role {
    margin-bottom: 0.45rem;
    color: var(--green-dark);
    font-size: 1.1rem;
    font-weight: 700;
}

.dev-tagline {
    max-width: 62ch;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.dev-orgs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.75rem;
}

/* Organization logos share consistent card dimensions. */
.dev-orgs a {
    display: grid;
    width: 64px;
    height: 64px;
    padding: 0.4rem;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(10, 71, 39, 0.08);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.dev-orgs a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(10, 71, 39, 0.15);
}

.dev-orgs img,
.dev-orgs img[style],
.orgLogos {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.dev-bio {
    margin-top: 1.5rem;
    padding: clamp(1.4rem, 4vw, 2.5rem);
}

.dev-bio h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.dev-bio p {
    max-width: 78ch;
    margin-bottom: 0;
    color: #31483a;
}

/* Shared section marker used across content pages. */
#app > h2,
#app > h3,
.dev-bio > h3 {
    position: relative;
    padding-left: 1rem;
}

#app > h2::before,
#app > h3::before,
.dev-bio > h3::before {
    position: absolute;
    inset: 0.08em auto 0.08em 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(var(--green), var(--blue));
    content: "";
}

/* Footer */
footer {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto auto auto auto auto minmax(260px, 1fr);
    align-items: center;
    gap: 0.65rem;
    padding: 2.4rem max(1.5rem, calc((100vw - 1240px) / 2));
    color: rgba(255, 255, 255, 0.88);
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 150%, rgba(22, 143, 198, 0.5), transparent 42%),
        linear-gradient(108deg, #16814a 0%, #137442 34%, #126d4c 60%, #116b78 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 -16px 38px rgba(8, 73, 41, 0.22),
        inset 0 1px rgba(255, 255, 255, 0.16),
        inset 0 22px 45px rgba(4, 58, 33, 0.14);
    animation: footer-arrive 650ms 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Subtle diagonal texture over the footer gradient. */
footer::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0.11;
    background: repeating-linear-gradient(135deg, transparent 0 42px, rgba(255, 255, 255, 0.14) 43px 44px);
    content: "";
}

#footer-h3 {
    margin: 0 0.5rem 0 0;
    color: #ffffff;
    font-size: 1.4rem;
}

.footer-logo-div {
    display: grid;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0.45rem;
    place-items: center;
    border-radius: 11px;
    background: #ffffff;
    transition: transform 160ms ease;
}

.footer-logo-div:hover {
    transform: translateY(-2px);
}

.linkedIn-footer-logo,
.github-footer-logo {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
}

.footer-link {
    color: #39ecc1;
    font-size: 1.08rem;
    font-weight: 600;
}

#footer-text-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0 0 0 clamp(1rem, 4vw, 4rem);
}

.footer-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
    line-height: 1.55;
}

/* Joined nav and product banner enter with identical timing. */
@keyframes header-arrive {
    from {
        opacity: 0;
        filter: blur(4px) saturate(0.8);
        transform: translateX(-52px);
    }
    68% {
        opacity: 1;
        filter: blur(0) saturate(1.06);
        transform: translateX(3px);
    }
    to {
        opacity: 1;
        filter: blur(0) saturate(1);
        transform: translateX(0);
    }
}

@keyframes header-sheen {
    from {
        opacity: 0;
        transform: translateX(-85%) rotate(22deg);
    }
    38% {
        opacity: 0.8;
    }
    to {
        opacity: 1;
        transform: translateX(85%) rotate(22deg);
    }
}

/* Brief emphasis on blue-accented wordmark characters. */
@keyframes logo-glow {
    from {
        color: #a4e1f5;
        text-shadow: 0 0 42px rgba(83, 182, 223, 0.9);
    }
    to {
        color: #53b6df;
        text-shadow: 0 0 26px rgba(27, 125, 169, 0.5);
    }
}

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

@keyframes images-arrive {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Tablet: stack navigation and move screenshots below the text. */
@media (max-width: 900px) {
    .nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.8rem;
    }

    .top-div {
        justify-content: flex-start;
        width: 100%;
    }

    .top-menu {
        padding: 0.58rem 0.75rem;
        font-size: 1rem;
    }

    #app-home {
        display: block;
    }

    #example-use-cases {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 1.5rem;
    }

    #example-use-cases > div:first-child {
        margin-top: 0;
    }

    #example-images {
        position: static;
        grid-column: 1;
        grid-row: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 0;
    }

    footer {
        grid-template-columns: auto auto 1fr;
    }

    #footer-h3 {
        grid-column: 1 / -1;
        margin-bottom: 0.35rem;
    }

    #footer-text-section {
        grid-column: 1 / -1;
        margin: 1rem 0 0;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
    }
}

/* Phone: use single-column content and scrollable navigation. */
@media (max-width: 640px) {
    body {
        font-size: 0.96rem;
        line-height: 1.68;
    }

    .nav {
        min-height: auto;
        padding: 0.85rem 1rem 0.75rem;
    }

    #addon-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }

    .top-div {
        flex-wrap: nowrap;
        gap: 0.15rem;
        padding-bottom: 0.25rem;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .top-menu {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    #banner {
        padding-block: 3.25rem;
        font-size: clamp(2rem, 11vw, 3.1rem);
    }

    main,
    #app-home {
        width: min(calc(100% - 2rem), 1040px);
        margin-block: 2.5rem;
    }

    #example-images {
        grid-template-columns: 1fr;
    }

    .dev-grid {
        grid-template-columns: 1fr;
    }

    .dev-photo {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        align-items: center;
    }

    .dev-img {
        border-width: 3px;
        border-radius: 16px;
    }

    .dev-quick {
        align-content: center;
    }

    .dev-orgs a {
        width: 54px;
        height: 54px;
    }

    footer {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 0.5rem 0.75rem;
        padding-block: 1.75rem;
    }

    #footer-h3 {
        grid-column: 1 / -1;
    }

    footer > a:nth-of-type(2) {
        grid-column: 1;
    }

    #footer-text-section {
        grid-column: 1 / -1;
    }
}

/* Respect operating-system motion accessibility settings. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
    }
}
