/* A compact catalogue of the marks shown by Francestle. */
.page-certificates {
    --cert-gold: #8b642b;
    --cert-line: #dbc7a4;
}
.cert-hero {
    padding-block: 18px clamp(25px, 3.8vw, 48px);
    border-bottom: 1px solid #ad8352;
    background: radial-gradient(ellipse at 80% 0%, #65452a, transparent 70%), #291b13;
    color: #fff8e9;
}
.cert-hero-inner > .breadcrumbs {
    margin-bottom: clamp(17px, 2vw, 26px);
    color: #e7d2b2;
}
.cert-hero-inner > .breadcrumbs a { color: #fff8e9; }
.cert-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(20px, 4vw, 60px);
}
.cert-hero .eyebrow { margin-bottom: 10px; color: #edcf91; }
.certificates-page .cert-hero h1 {
    margin: 0;
    color: #fff8e9;
    font-size: clamp(40px, 4.9vw, 69px);
    line-height: 1.03;
    letter-spacing: -.05em;
}
.cert-hero h1 em { display: inline; color: #edcc93; }
.cert-hero-note { max-width: 36ch; justify-self: end; }
.cert-hero-note p { margin: 0 0 14px; color: #efdfc6; }
.cert-hero-note .button { min-height: 44px; }

.certificates-page .cert-marks-section {
    padding-block: clamp(30px, 4.2vw, 58px) clamp(28px, 3.4vw, 46px);
    scroll-margin-top: 12px;
}
.cert-section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 20px;
    margin-bottom: 18px;
}
.cert-section-heading h2 { margin: 0; font-size: clamp(30px, 3.4vw, 47px); line-height: 1.08; letter-spacing: -.045em; }
.cert-section-heading h2 em { color: var(--cert-gold); }
.cert-enlarge-hint { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 13px; }
.cert-enlarge-hint .icon, .cert-mark-action .icon { width: 15px; height: 15px; flex: none; color: var(--cert-gold); }

.cert-mark-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(9px, 1.4vw, 18px);
    padding: 0;
    margin: 0;
    list-style: none;
}
.cert-mark-pair { grid-column: span 2; }
.cert-mark-image {
    display: flex;
    height: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    padding: clamp(13px, 2vw, 27px) clamp(9px, 1.3vw, 18px) 10px;
    border: 1px solid #e8ddc9;
    border-block-start-color: var(--cert-line);
    border-radius: 4px;
    background: #fcf8ef;
    color: #3d2b1b;
    text-align: center;
    isolation: isolate;
    transition: background-color .22s ease, border-color .22s ease;
}
.cert-mark-image:is(:hover,:focus-visible) { border-color: #bd9a62; background: #f6ecda; }
.cert-mark-image:focus-visible { outline: 2px solid #8b642b; outline-offset: 3px; }
.cert-mark-visual {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    height: clamp(65px, 8vw, 112px);
    margin-bottom: 12px;
}
.cert-mark-visual > :is(svg,img) {
    display: block;
    width: 100%;
    max-width: 190px;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform .28s var(--ease);
}
.cert-mark-pair .cert-mark-visual > :is(svg,img) { max-width: min(100%, 320px); }
.cert-mark-name {
    display: flex;
    flex: 1;
    align-items: center;
    margin-block-end: 3px;
    font-size: clamp(13px, 1.35vw, 17px);
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.cert-mark-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    color: #785326;
    font-size: 12px;
    line-height: 1.3;
}
.cert-marks-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 16px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
}
.cert-marks-caption .text-link { min-height: 44px; color: #714d24; font-size: 12px; }

.cert-preview-dialog {
    width: min(740px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--cert-line);
    border-radius: 7px;
    background: #faf7ef;
    color: #281d12;
    box-shadow: 0 28px 75px -24px #281d1290;
}
.cert-preview-dialog::backdrop { background: #281d12b8; }
.cert-preview-dialog [hidden] { display: none !important; }
.cert-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: clamp(12px, 2vw, 22px);
    border-bottom: 1px solid var(--cert-line);
}
.cert-preview-heading .eyebrow { margin-bottom: 4px; color: var(--cert-gold); font-size: 10px; }
.cert-preview-heading h2 {
    margin: 0;
    font: 400 clamp(21px, 3vw, 32px)/1.15 var(--serif);
    overflow-wrap: anywhere;
}
.cert-preview-heading > .icon-button { flex: none; width: 44px; height: 44px; }
.cert-preview-body {
    display: grid;
    place-items: center;
    padding: clamp(13px, 3vw, 34px);
    background: #fffaf1;
    isolation: isolate;
}
.cert-preview-body > :is(svg,img) {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(45vh, 340px);
    max-height: min(45dvh, 340px);
    object-fit: contain;
    mix-blend-mode: multiply;
}
.cert-preview-body > p { margin: 0; color: var(--muted); font-size: 14px; }
.cert-preview-footer {
    display: flex;
    justify-content: end;
    padding: 4px clamp(12px, 2vw, 22px);
    border-top: 1px solid var(--cert-line);
}
.cert-preview-footer .text-link { min-height: 44px; }

.cert-enquiry { display: grid; justify-items: end; gap: 9px; padding-bottom: clamp(32px, 4.6vw, 65px); }
.certificates-page .cert-enquiry-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(12px, 2vw, 25px);
    width: 100%;
    padding: clamp(17px, 2.6vw, 34px);
    border-block: 1px solid var(--cert-line);
    background: #f5eddf;
}
.cert-enquiry-mark {
    display: grid;
    place-items: center;
    width: 44px;
    aspect-ratio: 1;
    border: 1px solid var(--cert-line);
    border-radius: 3px;
    color: var(--cert-gold);
}
.cert-enquiry-mark .icon { width: 23px; height: 23px; }
.cert-enquiry-copy .eyebrow { margin-bottom: 6px; color: var(--cert-gold); }
.cert-enquiry-copy h2 { margin: 0; font-size: clamp(25px, 3vw, 43px); line-height: 1.08; letter-spacing: -.04em; }
.cert-enquiry-copy h2 em { color: var(--cert-gold); }
.cert-enquiry-copy > p:not(.eyebrow) { max-width: 56ch; margin-top: 8px; }
.cert-enquiry-card > .button { justify-self: start; min-height: 44px; }
.cert-enquiry-collection { min-height: 44px; }

@media (max-width: 780px) {
    .cert-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .cert-hero-note { justify-self: start; }
    .cert-hero-note p { margin-bottom: 10px; }
    .cert-mark-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cert-enquiry-card > .button { grid-column: 2; }
    .certificates-page .cert-enquiry-card { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
}
@media (max-width: 440px) {
    .certificates-page .cert-hero h1 { font-size: 38px; }
    .cert-mark-visual { margin-bottom: 8px; }
    .cert-enquiry-mark { display: none; }
    .certificates-page .cert-enquiry-card { grid-template-columns: minmax(0, 1fr); }
    .cert-enquiry-card > .button { grid-column: 1; }
}
@media (prefers-reduced-motion: no-preference) {
    .cert-mark-card:nth-child(4n+2) { --mark-delay: 45ms; }
    .cert-mark-card:nth-child(4n+3) { --mark-delay: 90ms; }
    .cert-mark-card:nth-child(4n+4) { --mark-delay: 135ms; }
    .cert-marks-section.experience-reveal-visible .cert-mark-card {
        animation: cert-mark-reveal 420ms var(--mark-delay, 0ms) var(--ease) both;
    }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .cert-mark-image:hover .cert-mark-visual > :is(svg,img) { transform: scale(1.04); }
}
@keyframes cert-mark-reveal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
