/*
 * Home, Manual and Contact pages ("showcase" pages).
 * Plus Jakarta Sans for a rounder, more open look than the working tools, and
 * generous spacing. Sections: shared, home, manual, contact.
 */

/* ── Shared ────────────────────────────────────────────────────────── */
.showcase {
    --home-ink: var(--ink);
    --home-muted: var(--muted);
    --home-line: var(--line);
    font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;
    color: var(--home-ink);
}

/* ── Home: hero ──────────────────────────────────────────────────────────── */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    padding: clamp(2rem, 4vw, 3.75rem) clamp(1.5rem, 4vw, 3.75rem);
    border-radius: 1.5rem;
    background:
        radial-gradient(120% 90% at 100% 0%, var(--hero-glow) 0%, transparent 60%),
        linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
    border: 1px solid var(--line);
    overflow: hidden;           /* clips the oversized hero image at the box edge */
    position: relative;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 1.1rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line-strong);
    color: #25586b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    margin: 0;
    font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.6rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-lead {
    margin: 1.1rem 0 0;
    max-width: 34rem;
    color: var(--ink-2);
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
    line-height: 1.7;
}

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

.hero-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--home-ink);
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.hero-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 31, 43, 0.08);
}

.hero-button-primary {
    background: #355e8e;
    border-color: #355e8e;
    color: #fff;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--home-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.hero-points li::before {
    content: "✓";
    margin-right: 0.4rem;
    color: #1a9e6a;
    font-weight: 800;
}

/* The structure image is much larger than its column and anchored to the
   bottom-right corner, so the hero box cuts it off and about half of it shows.
   It reaches into the empty space beside the text; the size was chosen so the
   molecule's visible pixels never touch a text line or button (checked at
   2000px and 1366px). */
.hero-art {
    position: relative;
    align-self: stretch;
    min-height: 24rem;
}

.hero-art img {
    position: absolute;
    right: -70%;
    bottom: -48%;
    width: 220%;
    max-width: none;
    height: auto;
    filter: drop-shadow(0 18px 30px rgba(15, 31, 43, 0.12));
    pointer-events: none;
}

/* ── Sections ──────────────────────────────────────────────────────── */
.section {
    margin-top: clamp(3rem, 6vw, 4.5rem);
}

.section-head {
    max-width: 44rem;
    margin-bottom: 1.75rem;
}

.section-title {
    margin: 0;
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-lead {
    margin: 0.6rem 0 0;
    color: var(--home-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* ── Task cards ────────────────────────────────────────────────────── */
.task-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.75rem);
}

.task-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid var(--home-line);
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 31, 43, 0.04);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(15, 31, 43, 0.09);
}

/* The structure image sits on a soft tinted panel with room around it.
   multiply blends the images' white background into the tint. */
.task-art {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: clamp(0.5rem, 1.2vw, 0.9rem);
    background: var(--tint);
}

.task-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.task-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.35rem 1.4rem 1.5rem;
}

.task-tag {
    align-self: flex-start;
    margin: 0 0 0.6rem;
    padding: 0.2rem 0.55rem;
    border-radius: 0.4rem;
    background: var(--tint);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.task-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
    font-weight: 750;
}

.task-text {
    margin: 0.6rem 0 0;
    color: var(--home-muted);
    font-size: 0.93rem;
    line-height: 1.65;
}

.task-meta {
    display: grid;
    gap: 0.45rem;
    margin: 1rem 0 1.25rem;
    padding: 0;
    list-style: none;
    color: var(--ink-2);
    font-size: 0.84rem;
    line-height: 1.45;
}

.task-meta li {
    padding-left: 0.75rem;
    border-left: 3px solid var(--accent);
}

.task-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    align-self: flex-start;
    padding: 0.6rem 1rem;
    border-radius: 0.7rem;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.task-link .material-symbols-outlined {
    font-size: 18px;
}

.task-link .arrow {
    transition: transform 140ms ease;
}

.task-card:hover .task-link .arrow {
    transform: translateX(3px);
}

.tone-ppi { --accent: #0f766e; --tint: #eaf6f4; }
.tone-dtpi { --accent: #2563eb; --tint: #eef3fe; }
.tone-rpi { --accent: #a21caf; --tint: #f8eefa; }

/* ── Workflow steps ────────────────────────────────────────────────── */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.9rem, 2vw, 1.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    padding: 1.4rem 1.35rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--home-line);
    background: var(--surface);
}

.step-number {
    display: inline-flex;
    width: 2.1rem;
    height: 2.1rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #17333f;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
}

.step h3 {
    margin: 1rem 0 0.4rem;
    font-size: 1.02rem;
    font-weight: 750;
}

.step p {
    margin: 0;
    color: var(--home-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Smaller screens ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Two columns need room: below 1180px the image moves under the text. */
@media (max-width: 1180px) {
    .hero { grid-template-columns: 1fr; }
    /* Stacked: the image sits below the text and runs off the bottom-right corner. */
    .hero-art { order: 2; min-height: 18rem; margin: 0 calc(-1 * clamp(1.5rem, 4vw, 3.75rem)) calc(-1 * clamp(2rem, 4vw, 3.75rem)) 0; }
    .hero-art img { right: -22%; bottom: -25%; width: min(125%, 36rem); }
}

@media (max-width: 640px) {
    .task-grid, .steps { grid-template-columns: 1fr; }
    .hero { border-radius: 1.1rem; }
}

/* ── Shared: page header used by Manual and Contact ────────────────── */
.page-hero {
    padding: clamp(1.75rem, 3.5vw, 3rem) clamp(1.5rem, 4vw, 3.25rem);
    border-radius: 1.5rem;
    background:
        radial-gradient(120% 90% at 100% 0%, var(--hero-glow) 0%, transparent 60%),
        linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
    border: 1px solid var(--line);
}

.page-hero-title {
    margin: 0;
    font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.page-hero-lead {
    margin: 0.9rem 0 0;
    max-width: 44rem;
    color: var(--ink-2);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.12rem);
    line-height: 1.7;
}

.showcase code {
    padding: 0.05rem 0.35rem;
    border-radius: 0.3rem;
    background: var(--surface-3);
    font-size: 0.86em;
}

/* ── Manual ────────────────────────────────────────────────────────── */
.flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: flow;
}

.flow li {
    counter-increment: flow;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem 0.4rem 0.45rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-2);
}

.flow li::before {
    content: counter(flow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    background: #355e8e;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.doc-layout {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 2.75rem);
    margin-top: clamp(2rem, 4vw, 3rem);
    align-items: start;
}

.toc {
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toc-title {
    margin: 0 0 0.5rem;
    color: var(--home-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.toc a {
    padding: 0.45rem 0.7rem;
    border-left: 2px solid var(--home-line);
    color: var(--ink-2);
    font-size: 0.9rem;
    font-weight: 500;
}

.toc a:hover {
    border-left-color: #355e8e;
    color: var(--brand-ink);
    background: var(--surface-3);
}

.doc {
    display: grid;
    gap: clamp(1.25rem, 2.5vw, 1.75rem);
    min-width: 0;
}

.doc-section {
    scroll-margin-top: 5rem;
    padding: clamp(1.35rem, 3vw, 2rem);
    border-radius: 1.1rem;
    border: 1px solid var(--home-line);
    background: var(--surface);
}

.doc-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.75rem;
    font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.doc-num {
    display: inline-flex;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 0.95rem;
    font-weight: 800;
}

.doc-subtitle {
    margin: 1.4rem 0 0.5rem;
    font-weight: 700;
}

.doc-text {
    margin: 0.6rem 0;
    max-width: 70ch;
    color: var(--ink-2);
    line-height: 1.75;
}

.doc-task-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.1rem;
}

.doc-task {
    padding: 1.1rem 1.15rem;
    border-radius: 0.9rem;
    background: var(--surface-2);
    border: 1px solid var(--home-line);
}

.doc-task-icon {
    color: var(--brand-ink);
    font-size: 24px;
}

.doc-task-id {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--brand-ink);
}

.doc-task-name {
    margin: 0.15rem 0 0;
    font-weight: 700;
    line-height: 1.35;
}

.doc-task-text {
    margin: 0.4rem 0 0;
    color: var(--home-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.doc-table-wrap {
    margin: 1rem 0;
    overflow-x: auto;
    border: 1px solid var(--home-line);
    border-radius: 0.8rem;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.doc-table th,
.doc-table td {
    padding: 0.7rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--home-line);
}

.doc-table thead th {
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.doc-table tbody tr:last-child td {
    border-bottom: 0;
}

.checklist {
    display: grid;
    gap: 0.55rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.checklist li {
    position: relative;
    padding-left: 1.7rem;
    color: var(--ink-2);
    line-height: 1.6;
}

.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.05rem;
    display: inline-flex;
    width: 1.15rem;
    height: 1.15rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e3f5ec;
    color: #1a9e6a;
    font-size: 0.7rem;
    font-weight: 800;
}

.checklist.plain li::before {
    content: "";
    top: 0.6rem;
    left: 0.35rem;
    width: 0.4rem;
    height: 0.4rem;
    background: #355e8e;
}

.numbered {
    display: grid;
    gap: 0.6rem;
    margin: 1.1rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: numbered;
}

.numbered li {
    counter-increment: numbered;
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    color: var(--ink-2);
    line-height: 1.6;
}

.numbered li::before {
    content: counter(numbered);
    flex-shrink: 0;
    width: 1.6rem;
    height: 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: var(--brand-ink);
    font-size: 0.8rem;
    font-weight: 700;
}

.doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

.doc-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1rem;
    border-radius: 0.7rem;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 650;
    transition: border-color 120ms ease, background 120ms ease;
}

.doc-button:hover {
    border-color: #355e8e;
    background: var(--surface-3);
}

.doc-button .material-symbols-outlined {
    font-size: 18px;
    color: var(--brand-ink);
}

.doc-details {
    margin-top: 0.85rem;
    border: 1px solid var(--home-line);
    border-radius: 0.85rem;
    background: var(--surface-2);
}

.doc-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    cursor: pointer;
    list-style: none;
    font-weight: 650;
}

.doc-details > summary::-webkit-details-marker {
    display: none;
}

.doc-details > summary::after {
    content: "+";
    flex-shrink: 0;
    color: var(--brand-ink);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1;
}

.doc-details[open] > summary::after {
    content: "−";
}

.doc-details > :not(summary) {
    margin-left: 1.1rem;
    margin-right: 1.1rem;
}

.doc-details > :last-child {
    margin-bottom: 1rem;
}

/* ── Contact ───────────────────────────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    border-radius: 1.1rem;
    border: 1px solid var(--home-line);
    background: var(--surface);
}

.contact-icon {
    display: inline-flex;
    width: 2.6rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 22px;
}

.contact-title {
    margin: 1rem 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 750;
}

.contact-text {
    flex: 1;
    margin: 0 0 1.25rem;
    color: var(--ink-2);
    font-style: normal;
    line-height: 1.7;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.person {
    display: flex;
    gap: 1rem;
    padding: 1.4rem;
    border-radius: 1.1rem;
    border: 1px solid var(--home-line);
    background: var(--surface);
    min-width: 0;
}

.person-lead {
    max-width: 44rem;
}

.avatar {
    display: inline-flex;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #355e8e, #0f766e);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.avatar-lg {
    width: 3.75rem;
    height: 3.75rem;
    font-size: 1.15rem;
}

.person-body {
    min-width: 0;
}

.person-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
}

.person-role {
    margin: 0.2rem 0 0;
    color: var(--brand-ink);
    font-size: 0.9rem;
    font-weight: 650;
}

.person-org {
    margin: 0.55rem 0 0;
    color: var(--home-muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

.person-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-top: 0.85rem;
}

.person-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.person-links a:hover {
    color: var(--brand-ink);
    text-decoration: underline;
}

.person-links .material-symbols-outlined {
    font-size: 17px;
    color: var(--brand-ink);
}

/* ── Manual and Contact on smaller screens ─────────────────────────── */
@media (max-width: 1100px) {
    .contact-grid, .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .doc-layout { grid-template-columns: 1fr; }
    /* Contents become a horizontally scrollable row of chips above the text. */
    .toc {
        position: sticky;
        top: 3.6rem;
        z-index: 5;
        flex-direction: row;
        gap: 0.4rem;
        margin: 0 -0.25rem;
        padding: 0.5rem 0.25rem;
        overflow-x: auto;
        background: var(--page-bg, var(--page-bg));
        scrollbar-width: none;
    }
    .toc-title { display: none; }
    .toc a {
        flex-shrink: 0;
        padding: 0.35rem 0.75rem;
        border: 1px solid var(--home-line);
        border-radius: 999px;
        background: var(--surface);
        white-space: nowrap;
        font-size: 0.82rem;
    }
    .doc-task-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .contact-grid, .people-grid { grid-template-columns: 1fr; }
    .flow li { font-size: 0.8rem; }
}
