/* Shared Dev: components for page content (sd- classes). Sizes and spacing follow the approved mockup. */

/* ---- Home hero with the cluster of page marks ---- */

.sd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
    padding-block: 3.5rem 5rem;
}

.sd-hero p,
.sd-phead p {
    max-width: var(--sd-measure);
    margin-top: 1.5rem;
    color: var(--sd-graphite);
    font-size: 1.3rem;
    line-height: 1.55;
}

/* Six marks as links, one per page colour, in a pyramid of 1-2-3. Each link carries its own sd-tone-* class. */
.sd-cluster {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 34rem;
    aspect-ratio: 1 / 1;
}

.sd-cluster a {
    position: absolute;
    display: block;
    width: 36%;
    text-decoration: none;
}

.sd-cluster .sd-mark { width: 100%; }

.sd-cluster a:hover,
.sd-cluster a:focus-visible { z-index: 1; }

/* The label sits on the mark itself, so it is visible wherever the mark is. */
.sd-cluster span {
    position: absolute;
    left: 50%;
    top: 50%;
    padding: 0.3rem 0.8rem;
    border: 2px solid var(--sd-tone);
    border-radius: 999px;
    background: var(--sd-paper);
    color: var(--sd-ink);
    font-size: 0.95rem;
    font-weight: 650;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0.5rem 1rem -0.5rem rgba(0, 0, 0, 0.4);
}

.sd-cluster a:hover span,
.sd-cluster a:focus-visible span { opacity: 1; }

.sd-cluster a:nth-child(1) { left: 32%; top: 0; }
.sd-cluster a:nth-child(2) { left: 16%; top: 30%; }
.sd-cluster a:nth-child(3) { left: 48%; top: 30%; }
.sd-cluster a:nth-child(4) { left: 0; top: 60%; }
.sd-cluster a:nth-child(5) { left: 32%; top: 60%; }
.sd-cluster a:nth-child(6) { left: 64%; top: 60%; }

/* ---- Page head: title and intro left, the page's own mark right ---- */

.sd-phead {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
    padding-block: 3rem 4.5rem;
}

.sd-phead > .sd-mark {
    justify-self: end;
    width: min(100%, 17rem);
}

/* Recognisable situations in a page head: one short line each, a small mark as bullet. */
.sd-recognize {
    display: grid;
    gap: 0.9rem;
    max-width: var(--sd-measure);
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

.sd-recognize li {
    display: grid;
    grid-template-columns: 1.5rem 1fr;
    gap: 0.8rem;
    align-items: start;
    color: var(--sd-ink);
    font-size: 1.2rem;
    line-height: 1.45;
}

.sd-recognize .sd-mark { width: 1.5rem; margin-top: 0.15rem; }

/* ---- Bands and text ---- */

.sd-band { padding-block: 4.5rem; }
.sd-band-stone { background: var(--sd-stone); }
.sd-band > .sd-wrap > h2 { max-width: 24ch; }
.sd-band > .sd-wrap > h2 + p { max-width: var(--sd-measure); margin-top: 1rem; color: var(--sd-graphite); }

.sd-prose { max-width: var(--sd-measure); }
.sd-prose p,
.sd-prose ul,
.sd-prose ol { color: var(--sd-graphite); }
.sd-prose p + p { margin-top: 1rem; }
.sd-prose h2 { margin-bottom: 1.25rem; }
.sd-prose h3 { margin: 2rem 0 0.5rem; }
.sd-prose a:not(.sd-btn) { font-weight: 650; text-decoration-color: var(--sd-tone); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---- Three steps: in each step one block of a grey mark lights up in yellow ---- */

.sd-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    margin: 3rem 0 0;
    padding: 0;
    list-style: none;
}

.sd-steps li {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 1.25rem;
    align-items: start;
}

.sd-steps .sd-mark { width: 4.5rem; --sd-tone: #e2e2e2; --sd-block: #c4c4c4; }
.sd-steps li:nth-child(1) .sd-mark { --sd-b1: var(--sd-geel); }
.sd-steps li:nth-child(2) .sd-mark { --sd-b2: var(--sd-geel); }
.sd-steps li:nth-child(3) .sd-mark { --sd-b3: var(--sd-geel); }
.sd-steps h3 { margin-bottom: 0.5rem; }
.sd-steps p { color: var(--sd-graphite); }

/* ---- Custom work against building together ---- */

.sd-versus {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.sd-versus > div { padding: 2rem; border-radius: 1rem; }
.sd-versus-old { background: var(--sd-paper); border: 2px dashed #c9c9c9; }
.sd-versus-new { background: color-mix(in srgb, var(--sd-tone) 28%, #fff); }
.sd-versus ul { margin: 1rem 0 0; padding-left: 1.2rem; color: var(--sd-graphite); }
.sd-versus li + li { margin-top: 0.5rem; }

/* ---- Product panel and facts ---- */

.sd-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
    margin-top: 2.5rem;
    padding: 3rem;
    border-radius: var(--sd-radius-lg);
    background: color-mix(in srgb, var(--sd-tone) 22%, #fff);
}

.sd-product p { max-width: var(--sd-measure); margin-top: 1rem; }
.sd-product .sd-link { display: inline-block; margin-top: 1.5rem; }
.sd-product img { justify-self: center; width: min(100%, 18rem); }
.sd-product > .sd-mark { justify-self: center; width: min(100%, 14rem); }

.sd-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
}

.sd-facts li { padding-top: 1rem; border-top: 4px solid var(--sd-tone); }
.sd-facts h3 { margin-bottom: 0.4rem; font-size: 1.25rem; }
.sd-facts p { color: var(--sd-graphite); }
.sd-facts p + p { margin-top: 0.5rem; }

/* ---- Two columns, portrait ---- */

.sd-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 3.5rem;
    align-items: start;
}

.sd-portrait {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--sd-tone) 25%, #fff);
}

/* ---- Dark closing band ---- */

.sd-closing {
    padding-block: 5rem;
    background: var(--sd-ink);
    color: #fff;
}

.sd-closing > .sd-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.sd-closing p { max-width: var(--sd-measure); margin-top: 1rem; color: #d6d6d6; }
.sd-closing .sd-btn { background: var(--sd-paper); color: var(--sd-ink); }
.sd-closing .sd-btn:hover { background: var(--sd-stone); }
.sd-closing :focus-visible { outline-color: #fff; }

/* ---- Contact form (form.<lang>.html) ---- */

.sd-form { display: grid; gap: 1.25rem; max-width: 36rem; }
.sd-field { display: grid; gap: 0.4rem; }
.sd-label { font-weight: 600; }
.sd-hint { color: var(--sd-graphite); font-size: 0.95rem; }

.sd-input,
.sd-textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 2px solid var(--sd-line);
    border-radius: var(--sd-radius);
    background: var(--sd-paper);
    color: var(--sd-ink);
    font: inherit;
}

.sd-input:focus,
.sd-textarea:focus { border-color: var(--sd-tone-deep); }
.sd-textarea { min-height: 9rem; resize: vertical; }

.sd-check { display: flex; gap: 0.6rem; align-items: center; }
.sd-check input { width: 1.2rem; height: 1.2rem; accent-color: var(--sd-ink); }

.sd-form-note { color: var(--sd-graphite); font-size: 0.95rem; }
.sd-form-note a { font-weight: 650; }
.sd-form .sd-btn { justify-self: start; }

/* ---- Narrow screens ---- */

@media (max-width: 860px) {
    .sd-hero,
    .sd-phead,
    .sd-product,
    .sd-split,
    .sd-versus,
    .sd-facts,
    .sd-steps { grid-template-columns: 1fr; }

    .sd-cluster { justify-self: center; max-width: 22rem; }
    .sd-phead > .sd-mark { grid-row: 1; justify-self: start; width: 8rem; }
    .sd-product { padding: 2rem; }
    .sd-product img { justify-self: start; width: 9rem; }
    .sd-product > .sd-mark { justify-self: start; width: 8rem; }
}
