/* T&E Innovations. Design tokens and base styles.
   Source: the brand guide. Change a value there first, then here. */

/* Fonts are served from this site. No outside font service is called. */
@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/public-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/assets/fonts/public-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/assets/fonts/public-sans-latin-700-normal.woff2") format("woff2");
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}

:root {
    /* Color */
    --page: #FAFAF7;
    --panel: #F0F1EC;
    --ink: #14171A;
    --ink-soft: #4A5157;
    --ink-faint: #6A7178; /* on --page only, never on --panel */
    --green: #1F6F54;
    --green-deep: #17573F;
    --green-light: #7BC7A6; /* the ampersand on dark surfaces */
    --line: #D9DCD6;
    --flag: #A3321F; /* marks an error inside an example, nothing else */

    /* Type */
    --font-sans: "Public Sans", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;

    --size-headline: clamp(2.25rem, 5vw, 3.5rem);
    --size-section: clamp(1.5rem, 3vw, 2rem);
    --size-sub: 1.25rem;
    --size-body: 1.125rem;
    --size-small: 0.9375rem;
    --size-label: 0.8125rem;

    /* Space, on a 4px base */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;

    --measure: 68ch;
    --wrap: 72rem;
    --radius: 2px;
}

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

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

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--size-body);
    font-weight: 400;
    line-height: 1.6;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin: 0 0 var(--space-4);
    max-width: var(--measure);
}

a {
    color: var(--green);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--green-deep);
}

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

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.label {
    font-family: var(--font-mono);
    font-size: var(--size-label);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -4rem;
    padding: var(--space-2) var(--space-4);
    background: var(--ink);
    color: var(--page);
    z-index: 10;
}

.skip-link:focus {
    top: var(--space-4);
    color: var(--page);
}

/* Wordmark. Live text until step 07 supplies the outlined SVG. */
.wordmark {
    color: var(--ink);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.wordmark:hover {
    color: var(--ink);
}

/* The header wordmark is an image. It keeps the size of the 1.5rem text it replaced. */
.wordmark img {
    display: block;
    width: auto;
    height: 1.125rem;
}

.wordmark__amp {
    color: var(--green);
}

.wordmark--small {
    font-size: 1.25rem;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3) var(--space-6);
    padding-top: var(--space-5);
    padding-bottom: var(--space-5);
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    color: var(--ink);
    font-size: var(--size-small);
    font-weight: 600;
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--green);
    text-decoration: underline;
}

/* The top of the Home page */
.hero {
    padding: var(--space-8) 0 var(--space-9);
}

.rule {
    width: 48px;
    height: 2px;
    margin-bottom: var(--space-5);
    background: var(--green);
}

.hero__headline {
    max-width: 22ch;
    font-size: var(--size-headline);
    text-wrap: balance;
    line-height: 1.1;
    letter-spacing: -0.015em;
}

.hero__subhead {
    max-width: 38rem;
    margin: var(--space-5) 0 0;
    font-size: var(--size-sub);
    line-height: 1.5;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4) var(--space-6);
    margin: var(--space-6) 0 0;
    max-width: none;
}

.button {
    display: inline-block;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius);
    background: var(--green);
    color: var(--page);
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
}

.button:hover {
    background: var(--green-deep);
    color: var(--page);
}

.action-link {
    font-weight: 600;
}

/* The top of an inner page: title and opening line */
.page-top {
    padding: var(--space-8) 0 var(--space-7);
}

.page-top__title {
    max-width: 22ch;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.page-top__lead {
    max-width: 42rem;
    margin: var(--space-5) 0 0;
    font-size: var(--size-sub);
    line-height: 1.5;
}

/* Bands: the sections of a page, each opened by a hairline.
   On wide screens the heading sits to the left of its text. */
.band {
    border-top: 1px solid var(--line);
    padding: var(--space-7) 0;
}

.band__inner {
    display: grid;
    gap: var(--space-4) var(--space-7);
}

.band__heading {
    font-size: var(--size-section);
    letter-spacing: -0.01em;
}

.band__body > :last-child {
    margin-bottom: 0;
}

.plain-list {
    max-width: var(--measure);
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
}

.plain-list li {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--line);
}

.plain-list li:first-child {
    padding-top: 0;
}

p + .plain-list li:first-child {
    padding-top: var(--space-3);
    border-top: 1px solid var(--line);
}

/* Numbered steps. The number is set in the mono, as all figures are. */
.steps {
    max-width: var(--measure);
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding: var(--space-3) 0 var(--space-3) var(--space-7);
    border-bottom: 1px solid var(--line);
    counter-increment: step;
}

.steps li:first-child {
    padding-top: 0;
}

.steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0;
    color: var(--ink-faint);
    font-family: var(--font-mono);
    font-size: var(--size-small);
    font-weight: 500;
    line-height: 1.9;
}

.person {
    font-weight: 600;
}

.address-block {
    font-style: normal;
}

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

/* The closing call to action at the foot of a page */
.closing {
    border-top: 1px solid var(--line);
    padding: var(--space-8) 0;
}

.closing__heading {
    font-size: var(--size-section);
    letter-spacing: -0.01em;
}

.closing .actions {
    margin-top: var(--space-5);
}

/* Forms */
.form {
    max-width: 36rem;
}

.field {
    margin: 0 0 var(--space-5);
    padding: 0;
    border: 0;
}

.field label,
.field legend {
    display: block;
    padding: 0;
    font-weight: 600;
}

.field__help {
    margin: var(--space-1) 0 0;
    color: var(--ink-soft);
    font-size: var(--size-small);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field textarea {
    display: block;
    width: 100%;
    margin-top: var(--space-2);
    padding: var(--space-3);
    border: 1px solid var(--ink-soft);
    border-radius: var(--radius);
    background: var(--page);
    color: var(--ink);
    font: inherit;
}

.field textarea {
    resize: vertical;
}

/* Errors use weight and a heavier border, not red.
   The brand guide keeps --flag for marking an error inside an example. */
.field--error input[type="text"],
.field--error input[type="email"],
.field--error textarea {
    border-color: var(--ink);
    border-width: 2px;
}

.field__error {
    margin: var(--space-2) 0 0;
    color: var(--ink);
    font-size: var(--size-small);
    font-weight: 700;
}

.field--choices .choice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-top: var(--space-3);
    font-weight: 400;
}

.field--choices input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.3rem 0 0;
    accent-color: var(--green);
    flex: none;
}

.form__consent {
    color: var(--ink-soft);
    font-size: var(--size-small);
}

button.button {
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

button.button:disabled {
    background: var(--ink-soft);
    cursor: default;
}

/* The trap field. Hidden from people, visible to bots that fill every field. */
.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.notice {
    max-width: 36rem;
    margin: 0 0 var(--space-5);
    padding: var(--space-4) var(--space-5);
    border-left: 3px solid var(--green);
    background: var(--panel);
}

.notice p {
    margin: 0;
}

.notice__heading {
    font-weight: 700;
}

.notice--error {
    border-left-color: var(--ink);
    font-weight: 600;
}

/* Plain pages, such as the 404 and 500 pages */
.plain-page {
    padding: var(--space-8) 0 var(--space-9);
}

.plain-page h1 {
    margin-bottom: var(--space-4);
    font-size: var(--size-section);
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    margin: var(--space-5) 0 0;
    padding: 0;
    list-style: none;
    font-weight: 600;
}

/* The desk: the admin page where stored inquiries are read.
   It uses the site's own type and color and adds a table and a list of facts. */
.desk__tag {
    margin-left: var(--space-3);
    color: var(--ink-soft);
    vertical-align: middle;
}

.desk .site-nav ul {
    align-items: center;
}

.desk .site-nav form {
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: var(--size-small);
    font-weight: 600;
}

.link-button:hover {
    color: var(--green);
    text-decoration: underline;
}

.desk__summary {
    color: var(--ink-soft);
}

.table-wrap {
    overflow-x: auto;
    margin: var(--space-5) 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--size-small);
}

.table th,
.table td {
    padding: var(--space-3) var(--space-4) var(--space-3) 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.table th {
    border-bottom-color: var(--ink);
    font-family: var(--font-mono);
    font-size: var(--size-label);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.table__time {
    font-family: var(--font-mono);
    white-space: nowrap;
}

.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-2) var(--space-5);
    max-width: var(--measure);
    margin: var(--space-5) 0;
}

.facts dt {
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: var(--size-label);
    letter-spacing: 0.06em;
    line-height: 2.2;
    text-transform: uppercase;
}

.facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.desk__subhead {
    margin: var(--space-6) 0 var(--space-3);
    font-size: var(--size-sub);
}

.desk__message {
    padding: var(--space-4) var(--space-5);
    border-left: 3px solid var(--line);
    background: var(--panel);
    overflow-wrap: anywhere;
}

.desk__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4) var(--space-5);
    margin-top: var(--space-5);
}

/* Footer. Text here is --ink-soft, since --ink-faint fails contrast on --panel. */
.site-footer {
    padding: var(--space-7) 0;
    border-top: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink-soft);
    font-size: var(--size-small);
}

.site-footer p {
    margin: 0;
}

.site-footer .label {
    margin-top: var(--space-2);
}

.site-footer__address {
    margin-top: var(--space-5);
    font-style: normal;
}

.site-footer__legal ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    margin: var(--space-5) 0 0;
    padding: 0;
    list-style: none;
}

.site-footer__legal a {
    color: var(--ink-soft);
}

.site-footer__legal a:hover {
    color: var(--ink);
}

/* The legal pages: one column of headed sections. */
.legal {
    padding: var(--space-8) 0 var(--space-9);
}

.legal h1 {
    margin-bottom: var(--space-3);
    font-size: var(--size-section);
}

.legal__effective {
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: var(--size-label);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.legal h2 {
    margin: var(--space-6) 0 var(--space-3);
    font-size: var(--size-sub);
}

.legal ul {
    max-width: var(--measure);
    margin: 0 0 var(--space-4);
    padding-left: 1.25rem;
}

.legal li {
    margin-bottom: var(--space-2);
}

.site-footer__founded {
    margin-top: var(--space-4);
}

@media (max-width: 40rem) {
    .hero {
        padding: var(--space-7) 0 var(--space-8);
    }

    .site-header__inner {
        padding-top: var(--space-4);
        padding-bottom: var(--space-4);
    }

    .site-nav ul {
        gap: var(--space-2) 0.875rem;
    }

    /* On a phone each inquiry in the desk list is a stacked block, not a table row. */
    .table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .table tr {
        display: block;
        padding: var(--space-3) 0;
        border-bottom: 1px solid var(--line);
    }

    .table td {
        display: block;
        padding: 0;
        border: 0;
    }

    .table__time {
        color: var(--ink-soft);
        font-size: var(--size-label);
    }
}
