/*
 * segler.org's own rules: the hero, the pipeline, the nav's home button and
 * the footer logo. Loaded after axe/axe.css so that these win a tie with it;
 * brand.css holds only the variables.
 *
 * Author: David M. Anderson
 * Built with AI assistance (Claude, Anthropic)
 */

/* The one-line statement under a title. */
.lede {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-top: -0.25rem;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-row img {
    width: 64px;
    height: 64px;
    flex: none;
}

.title-row h1 { margin: 0; }

/* Install and download links on a product page, set apart from running prose. */
.get {
    max-width: 860px;
    margin: 0 auto 1rem;
    padding: 0.9rem 1.25rem;
    background: var(--color-surface);
    border-left: 4px solid var(--color-highlight);
    box-shadow: var(--shadow);
}

.get p { margin: 0; }

/* An image that comes in a light and a dark version; the one matching the
   theme in force is shown. */
.on-dark { display: none; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .on-light { display: none; }
    :root:not([data-theme="light"]) .on-dark  { display: block; }
}

[data-theme="dark"] .on-light { display: none; }
[data-theme="dark"] .on-dark  { display: block; }

/* The convert, review, use path on the front page. */
.pipeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    counter-reset: step;
}

.pipeline > a {
    counter-increment: step;
}

@media (max-width: 700px) {
    .pipeline { grid-template-columns: 1fr; }
}

.pipeline > a::before {
    content: counter(step);
    display: inline-block;
    width: 1.75rem;
    height: 1.75rem;
    line-height: 1.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-bg);
    font-weight: 600;
    font-size: 0.9rem;
}

/* The front page opens on a band in the roundel blue, as the app's own page
   does: this is a product site, and the first screen says so. Axe styles the
   prose below it. */
.hero {
    background: linear-gradient(180deg, #4a6fa5 0%, #34507a 100%);
    color: #f2eee4;
    padding: 3rem 1.25rem 3.5rem;
    overflow: hidden;
}

[data-theme="dark"] .hero {
    background: linear-gradient(180deg, #2a4670 0%, #1c3150 100%);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hero {
        background: linear-gradient(180deg, #2a4670 0%, #1c3150 100%);
    }
}

.hero-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.hero-text {
    max-width: 640px;
    margin-bottom: 2rem;
}

.hero-icon {
    width: 96px;
    height: 96px;
    margin-bottom: 0.75rem;
}

.hero h1 {
    color: #f2eee4;
    font-size: 3rem;
    margin: 0 0 0.25rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin: 0 0 0.75rem;
    color: #f2eee4;
}

.hero-lede {
    font-size: 1.1rem;
    color: #d6e0f0;
    margin: 0 0 1.25rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-cta a {
    display: inline-block;
    line-height: 0;
}

.hero-note {
    margin: 1rem 0 0;
    font-size: 0.95rem;
    color: #d6e0f0;
}

.hero a:not(.hero-cta a) {
    color: #f2eee4;
    text-decoration: underline;
}

/* The screenshot sits on the band with blue below it. */
.hero-shot {
    margin: 0;
}

.hero-shot img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Duckling's band takes the duck's yellow, so the two products read as
   different at a glance. Dark type on the light band; cream on the dark one. */
.hero-duckling {
    background: linear-gradient(180deg, #faeaba 0%, #f2d27a 100%);
    color: #2f3337;
}

.hero-duckling h1,
.hero-duckling .hero-subtitle {
    color: #2f3337;
}

.hero-duckling .hero-lede,
.hero-duckling .hero-note {
    color: #3d3a2c;
}

.hero-duckling a:not(.hero-cta a) {
    color: #2f3337;
}

[data-theme="dark"] .hero-duckling {
    background: linear-gradient(180deg, #7a5a12 0%, #54400d 100%);
}

[data-theme="dark"] .hero-duckling h1,
[data-theme="dark"] .hero-duckling .hero-subtitle,
[data-theme="dark"] .hero-duckling a:not(.hero-cta a) {
    color: #f2eee4;
}

[data-theme="dark"] .hero-duckling .hero-lede,
[data-theme="dark"] .hero-duckling .hero-note {
    color: #e6dcc0;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hero-duckling {
        background: linear-gradient(180deg, #7a5a12 0%, #54400d 100%);
    }

    :root:not([data-theme="light"]) .hero-duckling h1,
    :root:not([data-theme="light"]) .hero-duckling .hero-subtitle,
    :root:not([data-theme="light"]) .hero-duckling a:not(.hero-cta a) {
        color: #f2eee4;
    }

    :root:not([data-theme="light"]) .hero-duckling .hero-lede,
    :root:not([data-theme="light"]) .hero-duckling .hero-note {
        color: #e6dcc0;
    }
}

.made-by {
    margin: 1.5rem 0 1rem;
    text-align: center;
}

.made-by a {
    display: inline-block;
    line-height: 0;
}

.made-by img {
    height: 31px;
    width: auto;
}

/* The bare sailboat is the nav's home link. */
nav a.nav-home {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.875rem 0.4rem 0;
    line-height: 0;
}

nav a.nav-home img {
    display: block;
    width: 30px;
    height: auto;
}

/* A nav item keeps its size; when the row is too narrow it scrolls rather than
   squeezing the home button to nothing. */
nav ul li {
    flex: none;
}

@media (max-width: 480px) {
    nav ul {
        padding: 0 0.5rem;
    }

    nav ul li a {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    nav a.nav-home {
        padding-left: 0;
    }
}

article > footer {
    margin-top: 2rem;
}

article table {
    width: 100%;
}
