/* The public Valaydis site.
 *
 * Plain CSS, no build step. Colors and typefaces are the brand kit's
 * (valaydis-brand/README.md): paper and white for most of the page, the
 * primary color for text and solid areas, copper for a single accent.
 * Status colors appear only in the illustration of a review result, always
 * with a label, as the kit asks.
 */

@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Condensed'; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-sans-condensed-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Condensed'; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-sans-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }

:root {
    --display: 'IBM Plex Sans Condensed', 'Arial Narrow', sans-serif;
    --body: 'IBM Plex Sans', Arial, sans-serif;
    --mono: 'IBM Plex Mono', Menlo, monospace;

    --paper: #f6f5f2;
    --surface: #ffffff;
    --text: #2a2d2e;
    --muted: #5b6166;
    --border: #e1e3e5;
    --border-strong: #c9cdd0;
    --primary: #1d4340;
    --primary-hover: #163533;
    --copper: #b4532a;
    --copper-on-dark: #e08a5f;

    --compliant: #1e6b30;
    --compliant-bg: #e6f4ea;
    --partial: #7a4f00;
    --partial-bg: #fdf3dc;
    --deficient: #a61b1b;
    --deficient-bg: #fde8e8;

    --measure: 68rem;
    --gutter: clamp(1rem, 4vw, 2rem);
}

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

/* "hidden" means hidden, whatever else a rule here says about display */
[hidden] {
    display: none !important;
}

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

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

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

a {
    color: var(--primary);
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--primary-hover);
}

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

h1,
h2,
h3 {
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--primary);
    margin: 0 0 0.6em 0;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.1rem, 5vw, 3.25rem);
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(1.6rem, 3.2vw, 2.1rem);
}

h3 {
    font-size: 1.25rem;
}

p {
    margin: 0 0 1em 0;
}

.wrap {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip {
    position: absolute;
    left: -999rem;
}

.skip:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10;
    background: var(--surface);
    padding: 0.5rem 0.8rem;
}

/* ------------------------------------------------------------ the top */

.top {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.top .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.logo {
    display: block;
    height: 2.1rem;
    width: auto;
}

.logo .stroke {
    fill: none;
    stroke: var(--primary);
    stroke-width: 7;
    stroke-linecap: square;
}

.logo .fill {
    fill: var(--primary);
}

.logo .tip {
    fill: var(--copper);
}

.logo .word {
    font-family: var(--display);
    font-weight: 600;
    font-size: 58px;
    letter-spacing: 2.9px;
}

.top nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.top nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}

.top nav a:hover,
.top nav a[aria-current='page'] {
    border-bottom-color: var(--copper);
}

.top nav a.signin {
    border: 1px solid var(--primary);
    border-radius: 4px;
    padding: 0.35rem 0.85rem;
    color: var(--primary);
}

.top nav a.signin:hover {
    background: var(--primary);
    color: #fff;
}

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

.btn {
    display: inline-block;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    padding: 0.7rem 1.25rem;
    border-radius: 4px;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-hover);
    color: #fff;
}

.btn.quiet {
    background: transparent;
    color: var(--primary);
}

.btn.quiet:hover {
    background: var(--surface);
    color: var(--primary-hover);
}

.btn[disabled] {
    opacity: 0.6;
    cursor: default;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ------------------------------------------------------------- hero */

.hero {
    padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
}

.eyebrow {
    font-family: var(--display);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--copper);
    margin: 0 0 0.8rem 0;
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 36rem;
}

/* The illustration of a review result */
.result {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(42, 45, 46, 0.06), 0 12px 32px -12px rgba(29, 67, 64, 0.25);
    margin: 0;
    font-size: 0.95rem;
}

.result .bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

.result .item {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
}

.result .item:last-of-type {
    border-bottom: none;
}

.result .req {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 0.45rem 0;
    font-weight: 500;
}

.result .key {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--muted);
    margin-right: 0.5rem;
}

.badge {
    flex: none;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}

.badge.met {
    color: var(--compliant);
    background: var(--compliant-bg);
}

.badge.partly {
    color: var(--partial);
    background: var(--partial-bg);
}

.badge.missing {
    color: var(--deficient);
    background: var(--deficient-bg);
}

.result blockquote {
    margin: 0;
    padding: 0.1rem 0 0.1rem 0.75rem;
    border-left: 3px solid var(--border-strong);
    color: var(--muted);
}

.result .where {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
}

.result figcaption {
    padding: 0.6rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--paper);
    color: var(--muted);
    font-size: 0.8rem;
    border-radius: 0 0 6px 6px;
}

/* ---------------------------------------------------------- sections */

.band {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.band.white {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.band.dark {
    background: var(--primary);
    color: #fff;
}

.band.dark h2,
.band.dark h3 {
    color: #fff;
}

.band.dark p {
    color: rgba(255, 255, 255, 0.86);
}

.band.dark a {
    color: #fff;
}

.band.dark .btn {
    background: #fff;
    border-color: #fff;
    color: var(--primary);
}

.band.dark .btn:hover {
    background: var(--paper);
}

.band.dark .rule {
    background: var(--copper-on-dark);
}

.intro {
    max-width: 44rem;
    margin-bottom: 2rem;
}

.intro p {
    color: var(--muted);
    font-size: 1.1rem;
}

/* The one accent rule */
.rule {
    display: block;
    width: 3rem;
    height: 3px;
    background: var(--copper);
    margin: 0 0 1.1rem 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Four cards sit two by two, not three and one */
.grid.pairs {
    grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.3rem 1.3rem 1.1rem;
}

.band.white .card {
    background: var(--paper);
}

.card p:last-child,
.card ul:last-child {
    margin-bottom: 0;
}

.card ul {
    margin: 0 0 1em 0;
    padding-left: 1.1rem;
}

.card li {
    margin-bottom: 0.35rem;
}

.steps {
    counter-reset: step;
}

.steps .card {
    counter-increment: step;
}

.steps .card h3::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    font-family: var(--mono);
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--copper);
    margin-bottom: 0.4rem;
}

.tag {
    display: inline-block;
    font-family: var(--display);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    padding: 0.05rem 0.45rem;
    margin-bottom: 0.7rem;
}

.tag.included {
    color: var(--primary);
    border-color: var(--primary);
}

/* Running text keeps to a readable width, on the same left edge as the rest */
.plain > * {
    max-width: 44rem;
}

.plain h2 {
    margin-top: 2.2rem;
}

.plain h2:first-child {
    margin-top: 0;
}

.plain li {
    margin-bottom: 0.5rem;
}

.page-head {
    padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1rem, 3vw, 2rem);
}

.page-head .lead {
    max-width: 44rem;
}

/* -------------------------------------------------------------- form */

.form {
    display: grid;
    gap: 1.1rem;
    max-width: 36rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
}

.form label {
    display: grid;
    gap: 0.3rem;
    font-weight: 500;
}

.form .optional {
    font-weight: 400;
    color: var(--muted);
}

.form input,
.form select,
.form textarea {
    font: inherit;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: #fff;
    color: var(--text);
}

.form textarea {
    min-height: 9rem;
    resize: vertical;
}

.form .two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1.1rem;
}

.form .hint {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
}

/* A field no person sees or fills in; a program that fills it in gives itself away */
.form .leave-empty {
    position: absolute;
    left: -999rem;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.notice {
    max-width: 36rem;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    margin: 0 0 1.1rem 0;
}

.notice.problem {
    border-color: #e5a9a9;
    background: var(--deficient-bg);
    color: #7f1414;
}

.notice.sent {
    border-color: #9fcfae;
    background: var(--compliant-bg);
    color: var(--compliant);
}


/* ------------------------------------------------------------ bottom */

.bottom {
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.95rem;
    padding: 1.75rem 0;
}

.bottom .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 2rem;
}

.bottom ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bottom p {
    margin: 0;
}

@media (max-width: 52rem) {
    .hero .wrap {
        grid-template-columns: 1fr;
    }
}

@media print {
    .top nav,
    .actions,
    .bottom ul {
        display: none;
    }
}
