/*
 * Public zone: showcase, pricing, legal pages, errors.
 * Values taken from the interface mock-ups, translated into classes — the mock-ups carry inline
 * styles because of the tool that draws them, and the project rules forbid those here.
 *
 * Barlow is served from assets/fonts/, never from Google Fonts: a visitor's address would leave
 * for a third party on every page, which the project's hosting stance refuses. The licence and the
 * subset that was downloaded are recorded in assets/fonts/LICENCE.md.
 */

:root {
    --ink: #16211b;
    --muted: #56625b;
    --ground: #f3f5f2;
    --ground-sunk: #e9edea;
    --surface: #ffffff;
    --line: #d3d9d4;
    --line-strong: #c8d0ca;
    --field-line: #aeb8b1;
    --accent: #1d6b45;
    --accent-dark: #134a30;
    --accent-soft: #e3efe7;
    --pitch: #2c6e49;
    --font-text: 'Barlow', system-ui, -apple-system, sans-serif;
    --font-display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
    --gutter: 64px;
}

@font-face {
    font-family: 'Barlow';
    src: url("../fonts/barlow-regular-l053MFU.woff2") format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow';
    src: url("../fonts/barlow-semibold-fSS6XKm.woff2") format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Barlow Condensed';
    src: url("../fonts/barlow-condensed-bold-fn5da0S.woff2") format('woff2');
    font-weight: 700;
    font-display: swap;
}

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

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 15px;
    line-height: 1.5;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-dark);
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Headings */

.heading {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.05;
    text-wrap: balance;
}

.muted {
    color: var(--muted);
}

/* Buttons and action links */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: var(--surface);
    font-family: var(--font-text);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--accent-dark);
    color: var(--surface);
}

.button--secondary {
    background: var(--surface);
    color: var(--accent);
}

.button--secondary:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

/* Forms */

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    text-align: left;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-weight: 600;
}

.form-input {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--field-line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 15px;
}

.form-input:hover {
    border-color: var(--accent);
}

.form-submit {
    margin-top: 8px;
}

.form-hint {
    margin: 0;
    font-size: 14px;
}

/* A message about one field, under that field. The error block above the form is for what no
   single field is to blame for. */

.form-message {
    margin: 0;
    color: var(--accent-dark);
    font-weight: 600;
}

.form-field--check {
    gap: 4px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.form-check input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

/* The second factor: the picture an authenticator application reads, the secret under it for
   whoever types it by hand, and the backup codes. All three are read character by character, so
   they are set in a monospaced face with room between the lines. */

.qr-code {
    align-self: center;
    background: var(--surface);
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.secret {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--ground-sunk);
    font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    font-size: 16px;
    letter-spacing: 1px;
    word-break: break-all;
}

.backup-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--ground-sunk);
    list-style: none;
}

.backup-codes__code {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    font-size: 16px;
    letter-spacing: 1px;
}

.form-error {
    margin: 0;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--ground-sunk);
    text-align: left;
}

/* The language choice, in the header beside the account buttons. Both languages show, the one
   being read marked rather than hidden: somebody who landed on the wrong one is looking for the
   name of their own, not for a link that is missing. */

.language-choice {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-right: 8px;
}

.language-choice__link {
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

.language-choice__link:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.language-choice__link[aria-current] {
    background: var(--ground-sunk);
    color: var(--ink);
}

/* Page frame */

.site-header {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    padding: 18px var(--gutter);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.site-header__name {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 24px;
    font-weight: 500;
}

.site-nav__link[aria-current='page'] {
    color: var(--ink);
}

.site-header__actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.site-main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.site-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: auto;
    padding: 20px var(--gutter);
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.page-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.section {
    padding: 48px var(--gutter);
}

.section--tight {
    padding-top: 0;
}

/* Cards and grids */

.card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.grid {
    display: grid;
    gap: 24px;
}

.grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Home */

.hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
    align-items: center;
    padding: 64px var(--gutter) 48px;
}

.hero__text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero__title {
    font-size: 68px;
}

.hero__lead {
    margin: 0;
    max-width: 30em;
    font-size: 20px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero__figure {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

.hero__caption {
    margin: 0;
    font-size: 14px;
}

.hero__figure-action {
    align-self: flex-start;
}

.pitch {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--pitch);
}

.pitch::before {
    content: '';
    position: absolute;
    inset: 9%;
    border: 1.5px solid rgba(234, 242, 236, 0.8);
}

.pitch::after {
    content: '';
    position: absolute;
    top: 9%;
    bottom: 9%;
    left: 50%;
    border-left: 1.5px solid rgba(234, 242, 236, 0.8);
}

.pitch--hero {
    height: 360px;
}

.feature {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 3px solid var(--ink);
}

.feature__title {
    font-size: 28px;
}

.feature__text {
    margin: 0;
}

/* Pricing */

.offer {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
}

.offer--highlighted {
    border: 2px solid var(--accent);
}

.offer__price {
    margin: 0;
}

.offer__amount {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 700;
}

.offer__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
}

.offer__action {
    margin-top: auto;
}

.question__title {
    margin: 0 0 6px;
    font-size: 17px;
}

.question__answer {
    margin: 0;
}

/* Legal pages */

.legal {
    max-width: 48em;
    padding: 24px;
}

.legal__title {
    font-size: 38px;
}

.legal__version {
    margin: 0;
    font-size: 14px;
}

.legal__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 24px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.legal__section-title {
    margin-top: 24px;
    font-size: 24px;
}

/* Errors */

/* The notice shell is a page of its own, with no header and no footer: an error happens on all
   four host names, and a zone never shows another zone's chrome. */
.notice-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px;
    background: var(--ground-sunk);
}

.notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 560px;
    padding: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--ground);
    text-align: center;
}

.notice__title {
    font-size: 40px;
}

/* The notice card holds centred text; the one that holds a form holds fields instead, aligned
   left, and takes a width of its own. */

.notice--form {
    align-items: stretch;
    max-width: 420px;
}

.notice--form .notice__title,
.notice--form .pitch--notice {
    align-self: center;
}

.notice__text {
    margin: 0;
    max-width: 28em;
}

.notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.pitch--notice {
    width: 280px;
    max-width: 100%;
    height: 170px;
}

/* Phone */

@media (max-width: 860px) {
    :root {
        --gutter: 20px;
    }

    .hero,
    .grid--three,
    .grid--two,
    .legal__summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__title {
        font-size: 44px;
    }

    .site-header__actions {
        margin-left: 0;
    }
}
