/* Skin B, "Campionario": the sample board.
   Cement ground, paper labels, navy ink, one siena button. One typeface (Jost).
   Each result is a sample cut from the supplier's photo, lying on the board with the same
   sawn edge and shadow as the landing; the detail is one large sample with its paper label. */
:root {
    --bg: #E8E9E7;          /* cemento */
    --surface: #FFFFFF;     /* carta */
    --ink: #27324D;         /* blu */
    --mute: #555C6A;        /* grigio-testo: 5.5:1 on cemento, 6.7:1 on carta */
    --line: #D2D4D1;        /* riga */
    --accent: #C8922E;      /* siena: the button only */
    --accent-ink: #27324D;  /* blu on siena: 4.6:1 (5.2:1 on the hover shade) */
    --focus: #27324D;
    --font-display: "Jost", "Century Gothic", system-ui, sans-serif;
    --font-text: "Jost", "Century Gothic", system-ui, sans-serif;
    --wrap: 1360px;
    --gutter: clamp(16px, 4vw, 56px);
    --grigio: #6E7480;
    /* the piece seen from just above (a sawn edge), then the shadow it leaves on the board */
    --edge: #B4B7BA;
    --lift-shadow: 0 4px 0 var(--edge), 0 18px 20px -12px rgba(39, 50, 77, .55);
    --lift-shadow-up: 0 4px 0 var(--edge), 0 26px 26px -14px rgba(39, 50, 77, .5);
}

body { font-size: 1.0625rem; line-height: 1.5; }

/* --- Header: on the board, like the landing ---------------------------------------------------- */
.site-top { background: var(--bg); border-bottom: 0; }
.site-top-inner { padding-top: 22px; padding-bottom: 18px; }
.brand { color: var(--ink); gap: 12px; }
.brand img { height: 28px; }
.brand span { font-weight: 500; font-size: 1.6rem; letter-spacing: -.01em; }
.site-search { background: var(--surface); border: 1px solid var(--ink); max-width: 560px; }
.site-search:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.site-search input { border: 0; height: 52px; padding: 0 18px; font-size: 1.0625rem; color: var(--ink); background: none; }
.site-search input::placeholder { color: var(--grigio); }
.site-search input:focus { outline: none; }
.site-search button {
    height: 52px; padding: 0 28px; border: 0; border-left: 1px solid var(--ink);
    font-weight: 500; font-size: 1.0625rem; color: var(--accent-ink); background: var(--accent);
}
.site-search button:hover { background: #D39D38; }
.site-search button:focus-visible { outline-offset: -5px; }
.site-search button:disabled { opacity: 1; background: var(--bg); color: var(--mute); }

.page { padding-top: clamp(28px, 5vw, 56px); padding-bottom: 120px; }

/* links in running text: navy, a quiet grey underline that turns navy */
.results-message a, .slab-back a, .action:not(.action-main) {
    color: var(--ink); text-decoration: none;
    border-bottom: 1px solid var(--grigio); padding-bottom: 1px;
}
.results-message a:hover, .slab-back a:hover, .action:not(.action-main):hover { border-bottom-color: var(--ink); }

/* --- Results ------------------------------------------------------------------------------------ */
.status { margin-bottom: clamp(32px, 4vw, 48px); }
.status-title { font-weight: 300; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.028em; }
.status-line { margin-top: 14px; font-size: 1.125rem; color: var(--mute); }
.status-pending { margin-top: 6px; font-size: .9375rem; }
.status-bar { height: 1px; margin-top: 22px; max-width: 33rem; background: var(--line); }
.status-bar span { background: var(--ink); }

@media (min-width: 601px) {
    .results-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 64px 40px; }
}
.result-link { outline-offset: 10px; }
.result-photo {
    background: #DADBD8; /* while the photo loads: a blank sample a shade darker than the board */
    box-shadow: var(--lift-shadow);
    transition: transform .22s ease-out, box-shadow .22s ease-out;
}
.result-link:hover .result-photo, .result-link:focus-visible .result-photo {
    transform: translateY(-5px); box-shadow: var(--lift-shadow-up);
}
/* no photo: an empty place on the board, nothing lying on it */
.result-photo.is-missing { background: transparent; box-shadow: none; border: 1px solid #BFC2BF; }
.result-photo.is-missing::after { font-size: .9375rem; color: var(--mute); }

.result-text { padding-top: 18px; gap: 1px; }
.result-name { font-family: var(--font-text); font-weight: 500; font-size: 1rem; line-height: 1.3; }
.result-link:hover .result-name, .result-link:focus-visible .result-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.result-source { font-size: .9375rem; color: var(--mute); }
.result-facts, .result-price { font-size: .875rem; color: var(--mute); }
.result-facts { margin-top: 4px; }

.results-message h1, .results-message h2 { font-weight: 300; font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.12; letter-spacing: -.02em; }
.results-message p { margin-top: 14px; }
.results-message p:last-child { margin-top: 22px; }
.results-message a { color: var(--ink); }
#failed { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--ink); }

/* --- Detail: one large sample, with its paper label --------------------------------------------- */
.slab-back { margin-bottom: 28px; font-size: 1rem; }
.slab-main { gap: 40px 64px; }
@media (min-width: 861px) {
    .slab-main { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
}
.zoom { background: var(--surface); box-shadow: 0 5px 0 var(--edge), 0 30px 30px -18px rgba(39, 50, 77, .55); }
.zoom:focus-visible { outline-offset: 8px; }
.slab-nophoto { background: transparent; border: 1px solid #BFC2BF; }

.slab-info { background: var(--surface); padding: clamp(24px, 3vw, 36px); }
.slab-source { font-size: 1rem; }
.slab-name { margin-top: 4px; font-weight: 300; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.06; letter-spacing: -.02em; }
.slab-facts { margin-top: 28px; border-top: 1px solid var(--ink); }
.slab-facts div { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); padding: 14px 0 15px; }
.slab-facts dt { font-weight: 400; }
.slab-facts dd { font-weight: 500; }
.slab-actions { margin-top: 32px; gap: 16px; }
.action-main {
    padding: 16px 28px; border: 1px solid var(--ink);
    font-weight: 500; color: var(--accent-ink); background: var(--accent);
}
.action-main:hover { background: #D39D38; }

.slab-details { margin-top: clamp(64px, 8vw, 104px); max-width: none; padding-top: 0; border-top: 0; }
.slab-details h2 { font-weight: 300; font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -.02em; padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.slab-details-body { margin-top: 24px; max-width: 80ch; }
.slab-details-body img { margin: 8px 0; }
.slab-details-body a { color: var(--ink); text-underline-offset: 3px; }

.lightbox { background: rgba(30, 36, 51, .94); }

@media (max-width: 860px) {
    .slab-info { padding: 24px 20px 28px; }
}
@media (max-width: 640px) {
    .site-top-inner { padding-top: 16px; padding-bottom: 14px; gap: 14px; }
    .brand span { font-size: 1.45rem; }
    .brand img { height: 25px; }
    .site-search input { padding: 0 14px; height: 50px; font-size: 1rem; }
    .site-search button { height: 50px; padding: 0 18px; }
}
@media (max-width: 600px) {
    .results-grid { gap: 44px 18px; }
    .result-text { padding-top: 14px; }
    .result-name { font-size: .9375rem; }
    .result-source { font-size: .875rem; }
    .result-facts, .result-price { font-size: .8125rem; }
    .results-grid { --lift-shadow: 0 3px 0 var(--edge), 0 14px 16px -10px rgba(39, 50, 77, .55); }
}
@media (prefers-reduced-motion: reduce) {
    .result-link:hover .result-photo, .result-link:focus-visible .result-photo { transform: none; }
}
