/* Direct Jarvis (AGE-322).

   Chrome (header, footer, .btn, .lead) comes from /assets/styles.css, which is
   where the brand tokens live on this branch and which becomes the @import of
   assets/design/tokens.css once the design-system migration lands. Steps of the
   accent ladder that this branch does not carry yet are written as
   var(--accent-*, <the ladder's own value>), so the token takes over the moment
   it exists and nothing here forks a brand value.

   Spacing and type sizes are the published ladder steps written literally, for
   the same reason: --space-* and --fs-* are not on this branch yet.

   The page is one screen: the wordmark, four buttons and a line of terms. The
   site's own .btn is a 0.76rem micro-label, which is right for a nav button and
   wrong for the only thing on this page, so .amount-btn overrides its height
   and type size rather than adding a second button style. Square corners
   throughout, mono only for micro-labels, teal only on things a viewer can act
   on — except the wordmark's gem and its "powered by Jev" line, which are teal
   because the shipped Jarvis branding draws them that way. */

.jarvis-page main {
    flex: 1 0 auto;
}

.jarvis-section {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto;
    padding: 2.5rem 0;
}

.jarvis-hero {
    padding-top: 3rem;
}

/* --- wordmark --------------------------------------------------------- */

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

.wordmark-gem {
    flex: 0 0 auto;
    width: clamp(2.75rem, 8vw, 4.5rem);
    height: auto;
    color: var(--diamond);
}

.wordmark-text h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(3rem, 11vw, 5rem);
    font-weight: 400;
    line-height: 0.94;
    letter-spacing: 0;
    text-transform: uppercase;
}

.wordmark-sub {
    margin: 0.5rem 0 0;
    color: var(--diamond);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.jarvis-lead {
    max-width: 34rem;
    margin-top: 1.25rem;
}

/* --- the buttons ------------------------------------------------------ */

/* Two forms, not one: the preset buttons carry their own amount and the custom
   field carries its own, so posting them separately is what keeps each submit
   unambiguous without a line of JavaScript. */
.tip-form {
    max-width: 40rem;
    margin: 1.5rem 0 0;
}

/* Stacked and full-width on a phone; a row once there is room for one. */
.amount-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.amount-btn {
    gap: 0.6rem;
    min-height: 4rem;
    padding: 0.9rem 1.5rem;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
}

.amount-value {
    font-size: 1.2rem;
}

.amount-dot,
.amount-time {
    color: var(--muted-2);
}

.amount-time {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

/* The dollar sign belongs to the field, not to the value the tipper types. */
.custom-amount-field {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-height: 4rem;
    border: 1px solid var(--line);
    background: var(--bg-2);
}

.custom-amount-field:focus-within {
    border-color: var(--line-strong);
}

.custom-amount-unit {
    padding: 0 0.25rem 0 1.1rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 1.2rem;
}

.custom-amount-input {
    width: 100%;
    min-width: 0;
    min-height: 4rem;
    padding: 0 1rem 0 0.35rem;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    /* The spinner arrows are a second set of controls beside a 64px button and
       would be the smallest hit target on the page. */
    -moz-appearance: textfield;
    appearance: textfield;
}

.custom-amount-input::-webkit-outer-spin-button,
.custom-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-amount-input:focus {
    outline: none;
}

.custom-amount-input[aria-invalid="true"] {
    color: var(--gold);
}

.amount-error {
    margin: 0.75rem 0 0;
    color: var(--gold);
    font-size: 0.9rem;
    line-height: 1.55;
}

.tip-note {
    max-width: 44rem;
    margin: 1.75rem 0 0;
    color: var(--muted-2);
    font-size: 0.94rem;
    line-height: 1.55;
}

/* --- the thanks page -------------------------------------------------- */

/* /stream/thanks/ loads this file too, and these are the rules it uses that
   the tip page no longer does. They stay because that page still has an
   eyebrow, a section heading, a back link and a terms panel. */

.section-title {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: 1.62rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

.jarvis-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.jarvis-eyebrow .dash {
    width: 2rem;
    height: 1px;
    background: var(--diamond);
}

.tier-action {
    margin: 1.75rem 0 0;
}

.terms-panel {
    display: grid;
    gap: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--line-strong);
    background: var(--bg-2);
    color: var(--muted-2);
}

.terms-panel p {
    margin: 0;
    max-width: 58rem;
    line-height: 1.55;
}

.terms-links a {
    color: var(--diamond);
    border-bottom: 1px solid var(--accent-edge, rgba(111, 223, 208, 0.44));
    transition: color 0.18s ease, border-color 0.18s ease;
}

.terms-links a:hover {
    color: var(--diamond-bright);
    border-bottom-color: var(--accent-edge-2, rgba(111, 223, 208, 0.58));
}

/* The marketing site sets no focus outline of its own (a known gap recorded in
   DESIGN-SYSTEM.md). This page gives its own controls a real ring rather than
   inheriting that gap; it is scoped here, not a site-wide change. */
.jarvis-page a:focus-visible,
.jarvis-page button:focus-visible,
.jarvis-page input:focus-visible {
    outline: var(--focus-ring, 2px solid var(--diamond));
    outline-offset: 2px;
}

/* --- wider screens ---------------------------------------------------- */

@media (min-width: 721px) {
    .jarvis-section {
        width: min(var(--max), calc(100% - 6rem));
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2.4rem;
    }

    .wordmark {
        gap: 1.5rem;
    }

    .amount-row {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .amount-btn {
        flex: 1 1 10rem;
        min-height: 4.5rem;
        font-size: 1.15rem;
    }

    .amount-value {
        font-size: 1.35rem;
    }

    .custom-amount-field {
        flex: 1 1 14rem;
        min-height: 4.5rem;
    }

    .custom-amount-input {
        min-height: 4.5rem;
    }

    .tip-form-custom .amount-btn {
        flex: 0 1 12rem;
    }
}
