/* The page uses the system font, which is San Francisco on a Mac, and Apple's neutral grays with one blue. */
:root {
    color-scheme: light dark;
    --page: light-dark(#fff, #000);
    --tile: light-dark(#f5f5f7, #161617);
    --text: light-dark(#1d1d1f, #f5f5f7);
    --text-2: light-dark(#6e6e73, #a1a1a6);
    --text-3: light-dark(#86868b, #6e6e73);
    --hairline: light-dark(#d2d2d7, #424245);
    --link: light-dark(#06c, #2997ff);
    --blue: #0071e3;
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --gutter: clamp(1.375rem, 4vw, 2.5rem);
    --content: 61.25rem;
    --wide: 78.75rem;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 4.5rem;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font: 400 1.0625rem/1.47 var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

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

h1,
h2,
h3 {
    font-weight: 600;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

img,
video,
svg {
    display: block;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* A link inside a sentence is underlined, so it does not depend on its color alone. */
p a {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--blue) 70%, transparent);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip {
    position: absolute;
    left: var(--gutter);
    top: -5rem;
    z-index: 20;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    background: var(--tile);
}

.skip:focus {
    top: 0.5rem;
}

/* Buttons */

.button {
    display: inline-block;
    padding: 0.72rem 1.4rem;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: 1.0625rem;
    line-height: 1.2;
    transition: background-color 0.2s var(--ease);
}

.button:hover {
    background: #0077ed;
    text-decoration: none;
}

.button:active {
    background: #006edb;
}

.button-small {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
}

/* The bar stays at the top of the window, with the page blurred behind it. */

.bar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid light-dark(rgb(0 0 0 / 0.08), rgb(255 255 255 / 0.12));
    background: light-dark(rgb(255 255 255 / 0.72), rgb(22 22 23 / 0.72));
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

.bar-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: calc(var(--content) + 2 * var(--gutter));
    height: 3.25rem;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.bar-name {
    margin-right: auto;
    color: var(--text);
    font-size: 1.3125rem;
    font-weight: 600;
}

.bar-name:hover {
    text-decoration: none;
}

.bar nav {
    display: flex;
    gap: 1.5rem;
}

.bar nav a {
    color: var(--text);
    font-size: 0.75rem;
    opacity: 0.8;
    transition: opacity 0.2s var(--ease);
}

.bar nav a:hover {
    opacity: 1;
    text-decoration: none;
}

/* Hero */

.hero {
    padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) 0;
    text-align: center;
}

.hero-icon img {
    margin-inline: auto;
}

h1 {
    max-width: 11em;
    margin: 1.25rem auto 0;
    font-size: clamp(3rem, 8.4vw, 6rem);
    line-height: 1.05;
    letter-spacing: -0.012em;
}

.intro {
    max-width: 39rem;
    margin: 1.25rem auto 0;
    font-size: clamp(1.1875rem, 2.1vw, 1.5rem);
    line-height: 1.33;
}

.hero .button,
.closing .button {
    margin-top: 1.75rem;
}

.fine {
    margin-top: 0.9rem;
    color: var(--text-2);
    font-size: 0.75rem;
}

.window {
    max-width: var(--wide);
    margin: clamp(2.75rem, 6vw, 4.5rem) auto 0;
}

.window video {
    width: 100%;
    height: auto;
    border-radius: clamp(0.5rem, 1.45vw, 1.15rem);
    background: var(--tile);
    box-shadow:
        0 0 0 0.5px light-dark(rgb(0 0 0 / 0.22), rgb(255 255 255 / 0.22)),
        0 0.25rem 0.75rem rgb(0 0 0 / 0.08),
        0 3rem 6rem -1.5rem light-dark(rgb(0 0 0 / 0.38), rgb(0 0 0 / 0.9));
}

/* The pause button hangs below the right corner of the video, clear of the picture. */
.stage {
    position: relative;
}

.playback {
    position: absolute;
    top: calc(100% + 0.875rem);
    right: 0;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: light-dark(rgb(0 0 0 / 0.07), rgb(255 255 255 / 0.12));
    color: var(--text-2);
    cursor: pointer;
}

.playback[hidden] {
    display: none;
}

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

.playback svg {
    fill: currentColor;
}

.playback[aria-pressed="false"] .play,
.playback[aria-pressed="true"] .pause {
    display: none;
}

/* Statement */

.statement {
    max-width: calc(var(--content) + 2 * var(--gutter));
    margin-inline: auto;
    padding: clamp(5rem, 13vw, 10.5rem) var(--gutter) clamp(2rem, 6vw, 4rem);
}

.statement p {
    color: var(--text-3);
    font-size: clamp(1.625rem, 4.1vw, 3rem);
    font-weight: 600;
    line-height: 1.17;
    letter-spacing: -0.008em;
}

.statement strong {
    color: var(--text);
    font-weight: inherit;
}

/* Sections */

.section {
    padding-block: clamp(4rem, 10vw, 7.5rem);
    padding-inline: max(var(--gutter), calc((100% - var(--wide)) / 2));
}

/* Two sections in a row share one gap. */
.section + .section {
    padding-top: 0;
}

.narrow {
    padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2));
}

h2 {
    font-size: clamp(2.25rem, 5.4vw, 4rem);
    line-height: 1.07;
    letter-spacing: -0.01em;
}

.section > h2 {
    margin-bottom: clamp(2rem, 4.5vw, 3.5rem);
}

/* Tiles */

.tiles {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}

.tile {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(1.75rem, 3.2vw, 2.75rem);
    border-radius: 1.75rem;
    background: var(--tile);
}

.tile h3 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    line-height: 1.125;
}

.tile p {
    max-width: 26rem;
    margin-top: 0.6rem;
    color: var(--text-2);
}

.tile-shot {
    padding-bottom: 0;
}

.tile-shot img {
    width: 165%;
    max-width: none;
    height: auto;
    margin-top: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: -14%;
    border-radius: 0.75rem 0 0 0;
    box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.2), 0 1.25rem 2.5rem -0.75rem rgb(0 0 0 / 0.3);
}

/* Three more features, as plain text under the tiles. */

.points {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem 1.25rem;
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

/* Each point lines up with the text of the tile above it. */
.points > div {
    padding-inline: clamp(1.75rem, 3.2vw, 2.75rem);
}

.points h3 {
    font-size: 1.3125rem;
    line-height: 1.2;
}

.points p {
    max-width: 22rem;
    margin-top: 0.4rem;
    color: var(--text-2);
}

/* AI agents: the setup steps beside the real Settings pane. */

.tile-agents {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 1rem 2rem;
}

.tile-agents h3 {
    max-width: 28rem;
}

.steps {
    max-width: 30rem;
    margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
    border-bottom: 1px solid var(--hairline);
}

.steps li {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    padding-block: 0.85rem;
    border-top: 1px solid var(--hairline);
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    color: var(--text-3);
    font-weight: 600;
}

/* The picture element hands its image to the grid. Its source element would otherwise take a grid cell. */
.tile-agents picture {
    display: contents;
}

.tile-agents source {
    display: none;
}

/* The screenshot is 1224 px wide and has a transparent margin for the window shadow: 112 px on each
   side, 76 px above and 147 px below. Negative margins of the same share pull that margin out of the
   layout, so the window itself, not the shadow, meets the tile padding on every side. */
.tile-agents img {
    --shot: min(100%, 36rem);
    justify-self: end;
    width: var(--shot);
    max-width: none;
    height: auto;
    margin: calc(-0.0621 * var(--shot)) calc(-0.0915 * var(--shot)) calc(-0.1201 * var(--shot));
}

/* Questions */

.faq {
    border-bottom: 1px solid var(--hairline);
}

.faq details {
    border-top: 1px solid var(--hairline);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 1.4rem;
    font-size: clamp(1.1875rem, 2.1vw, 1.5rem);
    font-weight: 600;
    line-height: 1.2;
    list-style: none;
    cursor: pointer;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "";
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
    background:
        linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
        linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
    transition: rotate 0.3s var(--ease);
}

details[open] summary::after {
    rotate: 45deg;
}

.faq details p {
    max-width: 44rem;
    padding-bottom: 1.75rem;
    color: var(--text-2);
}

/* Closing */

.closing {
    padding: clamp(4.5rem, 10vw, 7.5rem) var(--gutter);
    background: var(--tile);
    text-align: center;
}

.closing img {
    margin-inline: auto;
}

.closing h2 {
    margin-top: 1rem;
}

/* Footer */

.footer {
    background: var(--tile);
    color: var(--text-2);
    font-size: 0.75rem;
    line-height: 1.4;
}

.footer-inner {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    max-width: calc(var(--content) + 2 * var(--gutter));
    margin-inline: auto;
    padding: 1.5rem var(--gutter) 2.25rem;
    border-top: 1px solid var(--hairline);
    text-align: center;
}

.footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.5rem;
}

.footer nav a {
    color: var(--text-2);
}

/* Wider windows */

@media (min-width: 46rem) {
    .tiles,
    .points {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tile-agents {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }
}

@media (max-width: 46rem) {
    .bar nav {
        display: none;
    }

    /* On a phone the window is as wide as the text above it. */
    .tile-agents img {
        --shot: 122.4%;
        margin-top: calc(1rem - 0.0621 * var(--shot));
    }
}

/* Motion: the hero rises in once, and the window grows as it scrolls into view. */

@media (prefers-reduced-motion: no-preference) {
    .hero > * {
        animation: rise 0.9s var(--ease) both;
    }

    .hero > :nth-child(2) {
        animation-delay: 0.06s;
    }

    .hero > :nth-child(3) {
        animation-delay: 0.12s;
    }

    .hero > :nth-child(4),
    .hero > :nth-child(5) {
        animation-delay: 0.18s;
    }

    .hero > :nth-child(6) {
        animation-delay: 0.26s;
    }

    @supports (animation-timeline: view()) {
        .stage {
            transform-origin: 50% 0;
            animation: grow linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 42%;
        }
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
}

@keyframes grow {
    from {
        transform: scale(0.9);
    }
}

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