/* Public website. Depends on brand.css. */

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

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

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

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.1;
    margin: 0;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.4rem, 1.4rem + 4.2vw, 4.4rem);
    font-weight: 750;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.35rem;
    font-weight: 650;
}

p {
    margin: 0;
}

a {
    color: inherit;
}

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

.wrap {
    width: min(100% - 2.5rem, var(--wrap));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    padding: 0.6rem 1rem;
    background: var(--brand);
    color: var(--on-brand);
    border-radius: var(--radius-control);
}

.skip-link:focus {
    top: 1rem;
}

/* Buttons and links */

.button {
    display: inline-block;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-control);
    background: var(--brand);
    color: var(--on-brand);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 650;
    text-decoration: none;
    border: 2px solid var(--brand);
}

.button:hover {
    background: transparent;
    color: var(--brand);
}

.button--small {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.button--light {
    background: var(--sun);
    border-color: var(--sun);
    color: var(--ink-deep);
}

.button--light:hover {
    background: transparent;
    color: var(--sun);
}

.link {
    font-weight: 600;
    text-underline-offset: 0.25em;
    text-decoration-thickness: 2px;
}

/* Messages after an action, such as a completed registration */

.notice {
    margin-block: 1rem;
    padding: 0.9rem 1.1rem;
    border: 2px solid var(--line);
    border-left: 0.6rem solid var(--sun);
    border-radius: var(--radius-control);
    background: var(--surface);
}

/* Header */

.site-header {
    padding-block: 1.1rem;
}

.site-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
}

.site-header__logo {
    display: inline-flex;
}

.site-header__logo img {
    display: block;
    height: 2.1rem;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem 1.5rem;
    flex-wrap: wrap;
    font-size: 1rem;
}

.site-nav__form {
    margin: 0;
}

button.button {
    cursor: pointer;
}

.site-nav a:not(.button) {
    text-decoration: none;
    padding-block: 0.4rem;
    border-bottom: 2px solid transparent;
}

.site-nav a:not(.button):hover {
    border-bottom-color: var(--sun);
}

/* Hero */

.hero {
    padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
}

.hero__grid {
    display: grid;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

@media (min-width: 60rem) {
    .hero__grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    }
}

.lead {
    margin-top: 1.5rem;
    max-width: 34rem;
    font-size: 1.3rem;
    color: var(--text-soft);
}

.hero__actions {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem 1.75rem;
    flex-wrap: wrap;
}

.hint {
    margin-top: 2rem;
    font-size: 1rem;
    color: var(--text-soft);
}

@media (max-width: 59.99rem) {
    .hint {
        display: none;
    }
}

/* The invoice sheet: the one expressive element of the page. */

.sheet {
    position: relative;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius-sheet);
    box-shadow: 10px 10px 0 var(--sun);
    color: var(--text);
}

@media (prefers-color-scheme: dark) {
    .sheet {
        border-color: var(--sky);
    }
}

.sheet__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.25rem 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--line);
}

.sheet__head h2 {
    font-size: 1.45rem;
}

.sheet__head p {
    font-size: 0.95rem;
    color: var(--text-soft);
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font: inherit;
    color: var(--text);
    background: var(--page);
    border: 2px solid var(--line);
    border-radius: var(--radius-control);
}

.field input:hover {
    border-color: var(--sky);
}

.field input[aria-invalid="true"] {
    border-color: var(--alert);
}

.field--amount input {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.field__error {
    margin-top: 0.35rem;
    font-size: 1rem;
    color: var(--alert);
}

@media (prefers-color-scheme: dark) {
    .field__error {
        color: #ffb4ab;
    }

    .field input[aria-invalid="true"] {
        border-color: #ffb4ab;
    }
}

.totals {
    margin: 1.5rem 0 0;
    font-variant-numeric: tabular-nums;
}

.totals div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.3rem;
}

.totals dt {
    color: var(--text-soft);
}

.totals dd {
    margin: 0;
    font-family: var(--font-display);
}

.totals__due {
    margin-top: 0.5rem;
    padding-top: 0.8rem !important;
    border-top: 2px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.totals__due dt {
    color: var(--text);
}

.totals__due mark {
    padding: 0.05em 0.35em;
    background: var(--sun);
    color: var(--ink-deep);
    border-radius: 6px;
}

.sheet__ref {
    margin-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    flex-wrap: wrap;
    font-size: 1rem;
    color: var(--text-soft);
}

.sheet__ref span {
    font-family: var(--font-display);
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Steps: three bars that grow like the lines in the logo. */

.steps {
    padding-block: clamp(3rem, 7vw, 5.5rem);
    background: var(--mist);
}

.steps__list {
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 2.5rem;
    counter-reset: step;
}

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

.steps__list li {
    counter-increment: step;
}

.steps__bar {
    display: block;
    height: 0.75rem;
    margin-bottom: 1.25rem;
    border-radius: 999px;
    background: var(--ink);
}

@media (prefers-color-scheme: dark) {
    .steps__bar {
        background: var(--sky);
    }
}

.steps__list li:nth-child(1) .steps__bar {
    width: 34%;
}

.steps__list li:nth-child(2) .steps__bar {
    width: 62%;
}

.steps__list li:nth-child(3) .steps__bar {
    width: 92%;
    background: var(--sun);
}

.steps__list h3::before {
    content: counter(step) ". ";
}

.steps__list p {
    margin-top: 0.6rem;
    max-width: 24rem;
    color: var(--text-soft);
}

/* Two audiences */

.audiences {
    padding-block: clamp(3rem, 7vw, 5.5rem);
}

.audiences__grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 56rem) {
    .audiences__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.audience {
    padding: clamp(1.5rem, 4vw, 2.75rem);
    border: 2px solid var(--line);
    border-radius: var(--radius-sheet);
    scroll-margin-top: 1rem;
}

.audience--pro {
    background: var(--ink);
    border-color: var(--ink);
    color: #ffffff;
}

.audience p {
    margin-top: 1rem;
    max-width: 32rem;
}

.audience ul {
    margin: 1.5rem 0 2rem;
    padding: 0;
    list-style: none;
}

.audience li {
    position: relative;
    padding: 0.55rem 0 0.55rem 1.75rem;
    border-top: 1px solid var(--line);
}

.audience--pro li {
    border-top-color: rgb(255 255 255 / 0.25);
}

.audience li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.15rem;
    width: 1rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--sun);
}

.audience--pro :focus-visible {
    outline-color: var(--sun);
}

/* Closing call and footer */

.closing {
    padding-block: clamp(3rem, 7vw, 5.5rem);
    background: var(--mist);
    text-align: center;
}

.closing p {
    margin: 0.75rem 0 2rem;
    color: var(--text-soft);
}

.site-footer {
    padding-block: 2rem;
    font-size: 1rem;
    color: var(--text-soft);
}

.site-footer__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
}

.site-footer nav {
    display: flex;
    gap: 1.5rem;
}
