/* TDR Informatica - biglietto da visita (PWA). Stessi colori del sito, contrasti WCAG 2.2 AA. */

@font-face {
    font-family: "Inter";
    src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #172033;
    --muted: #445066;
    --red: #c62828;
    --red-dark: #a51f1f;
    --soft: #f3f6fa;
    --line: #d5dce6;
    --focus: #0b57d0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.5;
    color: var(--ink);
    background: var(--soft);
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
             max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; vertical-align: -.2em; }

.card {
    max-width: 28rem; margin: 0 auto; padding: 1.75rem 1.25rem 1.25rem;
    background: #fff; border: 1px solid var(--line); border-radius: 1.25rem;
}
@media (min-width: 576px) {
    body { padding-top: 3rem; }
    .card { padding: 2.25rem 2rem 1.5rem; }
}

/* intestazione */
.brand { display: flex; align-items: center; gap: .85rem; margin: 0; font-size: 1rem; font-weight: 500; }
.brand img { height: 40px; width: auto; }
.brand span { border-left: 2px solid var(--line); padding-left: .85rem; text-transform: uppercase; letter-spacing: .22em; }
.tagline { margin: 1.1rem 0 .1rem; font-weight: 600; }
.place { margin: 0; color: var(--muted); }
@media (max-width: 399.98px) {
    .brand { gap: .6rem; }
    .brand img { height: 32px; }
    .brand span { padding-left: .6rem; font-size: .875rem; letter-spacing: .14em; }
}

/* pulsante principale: chiamata */
.cta {
    display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0;
    padding: 1rem 1.25rem; min-height: 64px; border-radius: 1rem;
    background: var(--red); color: #fff; text-decoration: none;
}
.cta:hover { background: var(--red-dark); }
.cta .icon { width: 1.75rem; height: 1.75rem; }
.cta strong { display: block; font-size: 1.125rem; }
.cta-sub { display: block; font-size: .95rem; }
.nowrap { white-space: nowrap; }

/* recapiti */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.rows a, .row-static {
    display: grid; grid-template-columns: 1.5rem 1fr; column-gap: .9rem; align-items: start;
    padding: .8rem .25rem; min-height: 56px; color: var(--ink); text-decoration: none;
}
.rows .icon { grid-row: span 2; width: 1.35rem; height: 1.35rem; margin-top: .2rem; color: var(--red); }
.row-label { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.row-value { font-weight: 500; overflow-wrap: anywhere; }
.rows a:hover .row-value { text-decoration: underline; text-underline-offset: 3px; }

/* azioni */
.actions { display: grid; gap: .75rem; margin-top: 1.5rem; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 48px; padding: .65rem 1rem; border: 2px solid var(--ink); border-radius: 999px;
    background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

.status { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: .75rem; background: var(--soft); overflow-wrap: anywhere; }

/* installazione */
.install { margin-top: 1.5rem; padding: 1.25rem; border-radius: 1rem; background: var(--soft); }
.install h2 { margin: 0 0 .35rem; font-size: 1.05rem; }
.install p { margin: 0 0 .85rem; color: var(--muted); }
.install p:last-child { margin-bottom: 0; }
.install .btn { width: 100%; }
.steps { margin: 0 0 .85rem; padding-left: 1.25rem; color: var(--muted); }
.steps li + li { margin-top: .35rem; }
.steps .icon { color: var(--ink); }

.offline {
    display: flex; gap: .65rem; align-items: flex-start; margin: 1rem 0 0;
    padding: .75rem 1rem; border-radius: .75rem; background: #fff4e5; color: #5c3b00;
}
.offline .icon { margin-top: .15rem; }

.card-foot { margin-top: 1.5rem; text-align: center; color: var(--muted); }
.card-foot a { color: var(--red-dark); text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
    .cta, .btn { border: 2px solid ButtonText; }
}
