/* Datasheet: a person described like a component, for EEBus technical leads. */

@font-face {
    font-family: "Archivo";
    src: url("fonts/archivo.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #F6F8F9;
    --ink: #15242F;
    --ink-soft: #4F5F6B;
    --rule: #C9D3DA;
    --grid: #1F7A8C;
    --trust: #E3A21A;
    --field: #FFFFFF;
    --ok: #1B6B4B;
    --err: #A8322D;

    /* Header band */
    --band: #15242F;
    --band-text: #F6F8F9;
    --band-soft: #A9B8C3;
    --band-curve: #5CC3D6;
    --band-rule: #3A4D5B;

    --radius: 2px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #0F1A22;
        --ink: #E6ECF0;
        --ink-soft: #9AAAB6;
        --rule: #2A3A46;
        --grid: #5CC3D6;
        --field: #15232D;
        --ok: #7FD1A8;
        --err: #F2A09A;
        --band: #172834;
        color-scheme: dark;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 106.25%; /* 17px base */
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Archivo", system-ui, sans-serif;
    font-stretch: 100%;
    font-weight: 400;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--grid);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

:focus-visible {
    outline: 3px solid var(--grid);
    outline-offset: 2px;
}

.small {
    font-size: 0.85rem;
    color: var(--ink-soft);
}

/* Header band */

.band {
    background: var(--band);
    color: var(--band-text);
}

.band-inner {
    max-width: 36rem;
    margin: 0 auto;
    padding: max(2rem, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 1.25rem
        max(16px, env(safe-area-inset-left));
}

.band-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.lang-switch {
    display: flex;
    gap: 0.25rem;
    margin-right: -0.5rem;
}

.lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    color: var(--band-soft);
    font-size: 0.85rem;
    font-weight: 600;
    font-stretch: 125%;
    text-decoration: none;
}

.lang-switch a[aria-current="true"] {
    color: var(--band-text);
    text-decoration: underline;
    text-decoration-color: var(--band-curve);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.35em;
}

.portrait {
    display: block;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    object-fit: cover;
}

.monogram {
    display: grid;
    place-items: center;
    border: 1px solid var(--band-soft);
    color: var(--band-text);
    font-size: 0.95rem;
    font-weight: 600;
    font-stretch: 125%;
}

.name {
    margin: 0;
    font-size: clamp(2rem, 9.5vw, 3.4rem);
    font-weight: 750;
    font-stretch: 125%;
    line-height: 1.02;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.role {
    margin: 0.5rem 0 0;
    color: var(--band-soft);
    font-size: 1.0625rem;
}

/* The SHIP pairing: discover (0-0.9s), trust (0.9-1.5s), connect (1.5-2.4s). */

.pairing {
    margin: 1.5rem 0 0;
}

.pairing svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.pair-node {
    fill: none;
    stroke: var(--band-soft);
    stroke-width: 1;
}

.pairing text {
    font-family: inherit;
    text-anchor: middle;
}

.pair-label {
    fill: var(--band-text);
    font-size: 11px;
    font-weight: 600;
}

.pair-mdns,
.pair-ski {
    font-size: 10.5px;
    font-stretch: 87.5%;
    letter-spacing: 0.02em;
}

.pair-mdns {
    fill: var(--band-curve);
    opacity: 0;
    animation: flash 0.95s ease-out 0.15s both;
}

.pair-ski {
    fill: var(--trust);
    animation: appear 0.35s ease-out 0.95s backwards;
}

.pair-arc {
    fill: none;
    stroke: var(--band-curve);
    stroke-width: 1.5;
    stroke-linecap: round;
    opacity: 0;
    animation: flash 0.7s ease-out both;
}

.arc-1 {
    animation-delay: 0.2s;
}

.arc-2 {
    animation-delay: 0.35s;
}

.arc-3 {
    animation-delay: 0.5s;
}

.pair-check circle {
    fill: var(--band);
    stroke: var(--trust);
    stroke-width: 1.25;
}

.pair-check path {
    fill: none;
    stroke: var(--trust);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pair-check {
    animation: appear 0.3s ease-out 1.2s backwards;
}

.pair-link {
    stroke: var(--band-curve);
    stroke-width: 1.5;
    stroke-dasharray: 1;
    animation: draw 0.6s cubic-bezier(0.4, 0, 0.2, 1) 1.5s backwards;
}

.pair-dots {
    stroke: var(--band-curve);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 0 14;
    animation:
        appear 0.2s ease-out 2.05s backwards,
        flow 0.55s linear 2.1s 4;
}

@keyframes flash {
    0% {
        opacity: 0;
    }
    25%,
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes appear {
    from {
        opacity: 0;
    }
}

@keyframes draw {
    from {
        stroke-dashoffset: 1;
    }
}

@keyframes flow {
    to {
        stroke-dashoffset: -14;
    }
}


/* Content column */

.card {
    max-width: 36rem;
    margin: 0 auto;
    padding: 1.5rem max(16px, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
}

.tagline {
    margin: 0 0 1.5rem;
    max-width: 30em;
    font-size: 1.25rem;
    line-height: 1.35;
}

.card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 650;
    letter-spacing: 0;
}

/* Actions */

.actions {
    display: grid;
    gap: 0.625rem;
    margin-bottom: 2.5rem;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.button:active {
    transform: translateY(1px);
}

.button.primary {
    min-height: 3.5rem;
    background: var(--ink);
    color: var(--paper);
    font-size: 1.0625rem;
}

.button.quiet {
    border-color: var(--rule);
    background: var(--field);
}

.button:disabled {
    cursor: progress;
    opacity: 0.7;
}

.remind-options {
    padding: 0.25rem 0 0.5rem;
}

.remind-options[hidden] {
    display: none;
}

.remind-options p {
    margin: 0 0 0.5rem;
}

.status {
    margin: 0;
    min-height: 1.5em;
}

.actions .status:empty {
    display: none;
}

.status .ok {
    color: var(--ok);
    font-weight: 600;
}

.status .err {
    color: var(--err);
    font-weight: 600;
}

/* Datasheet tables: specifications and contact */

.sheet-section {
    margin-bottom: 2.5rem;
}

.table {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}

.table .row {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 1rem;
    align-items: baseline;
    margin: 0;
    padding: 0.625rem 0;
}

.table > .row + .row,
.table li + li .row {
    border-top: 1px solid var(--rule);
}

.table .label {
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 500;
    font-stretch: 75%;
}

.table .value {
    margin: 0;
    overflow-wrap: anywhere;
}

.contact-list .row {
    min-height: 2.75rem;
    color: var(--ink);
    text-decoration: none;
}

.contact-list .value {
    color: var(--grid);
    font-weight: 500;
}

@media (hover: hover) {
    .contact-list .row:hover .value {
        text-decoration: underline;
    }
}

/* Lead form */

.lead {
    margin-bottom: 2.5rem;
}

.lead > .small {
    margin: 0 0 1.25rem;
}

.lead form {
    display: grid;
    gap: 0.875rem;
}

.lead label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.lead label em {
    font-style: normal;
    color: var(--ink-soft);
}

.lead input {
    width: 100%;
    min-height: 3rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--rule);
    border-bottom-color: var(--ink-soft);
    border-radius: var(--radius);
    background: var(--field);
    color: var(--ink);
    font: inherit;
    font-size: 1.0625rem; /* ≥16px keeps iOS from zooming in */
}

.lead input:focus-visible {
    border-color: var(--grid);
}

.lead .button.primary {
    margin-top: 0.5rem;
}

.consent {
    margin: 0;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* QR: always dark-on-light so every scanner reads it. */

.qr {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 2.5rem;
}

.qr svg {
    flex: none;
    width: 8rem;
    height: 8rem;
    border: 1px solid var(--rule);
}

.qr-bg {
    fill: #FFFFFF;
}

.qr-fg {
    fill: #15242F;
}

.qr figcaption {
    display: grid;
    gap: 0.25rem;
    max-width: 12em;
}

.revision {
    font-stretch: 75%;
}

/* Legal */

.legal {
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.legal-note {
    margin: 0 0 0.5rem;
}

.legal-section {
    border-bottom: 1px solid var(--rule);
}

.legal-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.75rem;
    cursor: pointer;
    list-style: none;
}

.legal-section summary::-webkit-details-marker {
    display: none;
}

/* Chevron: points down when closed, up when open. */
.legal-section summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.25rem;
    border-right: 1.5px solid var(--ink-soft);
    border-bottom: 1.5px solid var(--ink-soft);
    transform: translateY(-25%) rotate(45deg);
    transition: transform 150ms ease-out;
}

.legal-section[open] summary::after {
    transform: translateY(25%) rotate(-135deg);
}

.legal-section summary h2 {
    margin: 0;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
}

.legal-body {
    padding: 0.25rem 0 1rem;
}

.legal h3 {
    margin: 1rem 0 0.25rem;
    font-size: 0.85rem;
    color: var(--ink);
}

.legal p {
    margin: 0 0 0.75rem;
    max-width: 65ch;
}

@media (prefers-reduced-motion: reduce) {
    .pairing * {
        animation: none;
    }

    .button:active {
        transform: none;
    }

    .legal-section summary::after {
        transition: none;
    }
}
