/* ==========================================================
   Public website styles (layouts/front + CMS sections)
   ========================================================== */

:root {
    --r: #ff0000;
    --rd: #cc0000;
    --dk: #1c1c1e;
    --text: rgba(0, 0, 0, .81);
    --muted: #6b6b6b;
    --line: rgba(0, 0, 0, .08);
    --light: #f5f5f4;
    --radius: 0px;
    --header-h: 76px;
    --page: 1300px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Aptos', 'Inter', Arial, sans-serif;
    color: var(--text);
    background: #fff;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { color: #000; font-weight: 700; line-height: 1.2; }
a { color: inherit; }
img { max-width: 100%; }

/* ── FOOTER ────────────────────────────────────────────── */
.site-footer { background: var(--dk); color: rgba(255,255,255,.6); font-size: 14px; }
.site-footer__inner {
    max-width: var(--page); margin: 0 auto; padding: 48px 24px 32px;
    display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between;
}
.site-footer__brand img { display: block; max-height: 120px; width: auto; background: #fff; padding: 8px; border-radius: 8px; }
.site-footer__brand strong { color: #fff; font-size: 20px; }
.site-footer__brand p { margin: 14px 0 0; }
.site-footer__links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 48px; }
.site-footer__links li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom {
    max-width: var(--page); margin: 0 auto; padding: 18px 24px;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 12px;
}
.site-footer__legal a { margin-left: 16px; }

/* ── SECTION FRAMEWORK ─────────────────────────────────── */
.cms-container { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 24px; }
.cms-w--narrow { max-width: 860px; }
.cms-w--wide { max-width: 1600px; }
.cms-w--full { max-width: none; }

.cms-pad--none { padding: 0; }
.cms-pad--small { padding: 24px 0; }
.cms-pad--medium { padding: 56px 0; }
.cms-pad--large { padding: 96px 0; }
@media (max-width: 767.98px) {
    .cms-pad--medium { padding: 40px 0; }
    .cms-pad--large { padding: 64px 0; }
}

.cms-bg--white { background: #fff; }
.cms-bg--light { background: var(--light); }
.cms-bg--dark { background: var(--dk); color: rgba(255,255,255,.8); }
.cms-bg--brand { background: var(--r); color: rgba(255,255,255,.9); }
.cms-bg--dark h1, .cms-bg--dark h2, .cms-bg--dark h3,
.cms-bg--brand h1, .cms-bg--brand h2, .cms-bg--brand h3 { color: #fff; }

.cms-heading { margin-bottom: 36px; }
.cms-heading h2 { font-size: clamp(26px, 3vw, 38px); margin-bottom: 10px; }
.cms-heading p { color: var(--muted); max-width: 720px; margin: 0 auto; }
.cms-bg--dark .cms-heading p, .cms-bg--brand .cms-heading p { color: inherit; }
.cms-title { font-size: clamp(32px, 4.5vw, 56px); margin: 0; letter-spacing: -.5px; }
.cms-subtitle { color: var(--muted); font-size: 18px; margin: 14px auto 0; max-width: 720px; }
.cms-section-title { font-size: clamp(24px, 2.6vw, 34px); margin-bottom: 18px; }

.cms-grid { display: grid; gap: 20px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.cms-cols-2 { --cols: 2; } .cms-cols-3 { --cols: 3; } .cms-cols-4 { --cols: 4; }
.cms-cols-5 { --cols: 5; } .cms-cols-6 { --cols: 6; }
@media (max-width: 991.98px) { .cms-cols-4, .cms-cols-5, .cms-cols-6 { --cols: 3; } }
@media (max-width: 767.98px) { .cms-grid { --cols: 2 !important; gap: 12px; } }
@media (max-width: 479.98px) { .cms--link_tiles .cms-grid, .cms--feature_rows .cms-grid { --cols: 1 !important; } }

.ratio-square { aspect-ratio: 1 / 1; }
.ratio-landscape { aspect-ratio: 4 / 3; }
.ratio-portrait { aspect-ratio: 3 / 4; }

/* Rich text produced by the Quill editor */
.cms-prose { line-height: 1.75; }
.cms-prose > :last-child { margin-bottom: 0; }
.cms-prose p { margin-bottom: 1em; }
.cms-prose h1, .cms-prose h2, .cms-prose h3 { margin: 1.4em 0 .5em; }
.cms-prose h1:first-child, .cms-prose h2:first-child, .cms-prose h3:first-child { margin-top: 0; }
.cms-prose ul, .cms-prose ol { padding-left: 1.4em; margin-bottom: 1em; }
.cms-prose a { color: var(--r); }
.cms-prose blockquote { border-left: 3px solid var(--r); padding: 6px 16px; margin: 1.2em 0; color: var(--muted); font-style: italic; }
.cms-prose img { height: auto; }
.cms-prose .ql-align-center { text-align: center; }
.cms-prose .ql-align-right { text-align: right; }
.cms-prose .ql-align-justify { text-align: justify; }
.cms-prose .ql-indent-1 { padding-left: 3em; }
.cms-prose .ql-indent-2 { padding-left: 6em; }

/* Buttons */
.cms-btn {
    display: inline-block;
    background: var(--r); color: #fff; border: 2px solid var(--r);
    padding: 12px 30px; font-size: 15px; font-weight: 700; letter-spacing: .5px;
    text-decoration: none; transition: all .2s; cursor: pointer;
}
.cms-btn:hover { background: var(--rd); border-color: var(--rd); color: #fff; }
.cms-btn--light { background: #fff; color: #000; border-color: #fff; }
.cms-btn--light:hover { background: transparent; color: #fff; border-color: #fff; }
.cms-link { color: var(--r); font-weight: 700; text-decoration: none; }
.cms-link i { font-size: 12px; margin-left: 4px; transition: margin .2s; }
.cms-link:hover i { margin-left: 8px; }

/* ── HERO ──────────────────────────────────────────────── */
.cms--hero { padding: 0 !important; }
.hero { position: relative; display: flex; align-items: center; overflow: hidden; background: #111; }
.hero--small { min-height: 320px; }
.hero--medium { min-height: 480px; }
.hero--large { min-height: min(720px, 80vh); }
.hero--full { min-height: calc(100vh - var(--header-h)); }
.hero picture { position: absolute; inset: 0; }
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: #121212; }
.hero__content { position: relative; z-index: 1; color: #fff; padding-top: 60px; padding-bottom: 60px; }
.hero__title { color: #fff; font-size: clamp(34px, 5.5vw, 72px); margin-bottom: 16px; letter-spacing: -1px; }
.hero__text { font-size: clamp(16px, 1.6vw, 20px); max-width: 640px; margin: 0 0 28px; opacity: .9; }
.hero.text-center .hero__text { margin-left: auto; margin-right: auto; }
.hero.text-end .hero__text { margin-left: auto; }
.hero--bottom { align-items: flex-end; }
.hero__logo { margin: 28px 0 0; line-height: 0; }
.hero__logo img { width: clamp(220px, 42vw, 620px); height: auto; }
.hero.text-center .hero__logo { text-align: center; }
.hero.text-end .hero__logo { text-align: right; }
@media (max-width: 749px) {
    .hero--large, .hero--medium { min-height: 56vw; }
    .hero--large { min-height: 420px; }
    .hero__logo { margin-top: 20px; }
}

/* ── IMAGE WITH TEXT ───────────────────────────────────── */
.image-text { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.image-text--reverse .image-text__media { order: 2; }
.image-text__media img { width: auto; max-width: 100%; height: auto; max-height: 620px; display: block; margin: 0 auto; }
@media (max-width: 767.98px) {
    .image-text { grid-template-columns: 1fr; gap: 24px; }
    .image-text--reverse .image-text__media { order: 0; }
}

/* ── FEATURES ──────────────────────────────────────────── */
.feature-body h3 { font-size: 22px; margin-bottom: 10px; }
.feature-body .cms-prose { color: var(--muted); }
.cms-bg--dark .feature-body .cms-prose, .cms-bg--brand .feature-body .cms-prose { color: inherit; }
.feature-body .cms-link { display: inline-block; margin-top: 12px; }

.fit-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fit-contain { display: flex; align-items: center; justify-content: center; }
.fit-contain img { max-width: 70%; max-height: 260px; object-fit: contain; }

/* Alternating rows */
.feature-rows { display: flex; flex-direction: column; gap: 56px; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-row--reverse .feature-row__media { order: 2; }
.feature-row__media.fit-cover { aspect-ratio: 4 / 3; }
.feature-row__media.fit-contain { min-height: 200px; }
.feature-row__text { font-size: 18px; }
@media (max-width: 767.98px) {
    .feature-rows { gap: 40px; }
    .feature-row { grid-template-columns: 1fr; gap: 20px; }
    .feature-row--reverse .feature-row__media { order: 0; }
}

/* Mosaic: two image+text pairs per row, checkerboard */
.feature-mosaic { display: grid; grid-template-columns: 1fr 1fr; }
.feature-mosaic__pair { display: grid; grid-template-columns: 1fr 1fr; }
.feature-mosaic__pair.is-reversed .feature-mosaic__media { order: 2; }
.feature-mosaic__media { aspect-ratio: 1 / 1; overflow: hidden; background: var(--light); }
.feature-mosaic__media img { transition: transform .6s ease; }
.feature-mosaic__pair:hover .feature-mosaic__media img { transform: scale(1.04); }
.feature-mosaic__text { display: flex; align-items: center; padding: clamp(20px, 3vw, 48px); background: var(--light); }
.cms-bg--light .feature-mosaic__text { background: #fff; }
.feature-mosaic__pair:nth-child(odd) .feature-mosaic__text { background: #fff; }
.cms-bg--light .feature-mosaic__pair:nth-child(odd) .feature-mosaic__text { background: var(--light); }
@media (max-width: 991.98px) {
    .feature-mosaic { grid-template-columns: 1fr; }
    .feature-mosaic__pair.is-reversed .feature-mosaic__media { order: 0; }
    .feature-mosaic__pair:nth-child(even) .feature-mosaic__media { order: 2; }
}
@media (max-width: 575.98px) {
    .feature-mosaic__pair { grid-template-columns: 1fr; }
    .feature-mosaic__pair:nth-child(even) .feature-mosaic__media { order: 0; }
    .feature-mosaic__media { aspect-ratio: 4 / 3; }
}

/* Cards */
.feature-card { display: flex; flex-direction: column; gap: 16px; }
.feature-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--light); }

/* ── LINK TILES ────────────────────────────────────────── */
.tile { position: relative; display: block; text-decoration: none; color: #000; overflow: hidden; }
.tile__media { display: block; overflow: hidden; background: var(--light); }
.tile__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.tile:hover .tile__media img { transform: scale(1.05); }
.tile--label-overlay .tile__label {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 40px 20px 18px;
    background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
    color: #fff; font-size: 20px; font-weight: 700;
}
.tile--label-below .tile__label { display: block; padding-top: 12px; font-size: 18px; font-weight: 700; }
.tile--text {
    display: flex; align-items: center;
    border: 1px solid var(--line); background: #fff;
    padding: 22px 24px; font-size: 18px; font-weight: 700;
    transition: all .2s;
}
.tile--text .tile__label { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; }
.tile--text i { color: var(--r); font-size: 14px; transition: transform .2s; }
.tile--text:hover { border-color: var(--r); color: var(--r); }
.tile--text:hover i { transform: translateX(4px); }

/* ── GALLERY ───────────────────────────────────────────── */
.gallery__item { margin: 0; }
.gallery__link { display: block; overflow: hidden; background: var(--light); cursor: zoom-in; }
.gallery__link img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.gallery__link:hover img { transform: scale(1.04); }
.gallery__item figcaption { font-size: 14px; color: var(--muted); padding-top: 8px; }
.gallery--masonry { display: block; columns: var(--cols, 3); column-gap: 20px; }
.gallery--masonry .gallery__item { break-inside: avoid; margin-bottom: 20px; }
.gallery--masonry .gallery__link img { height: auto; }
@media (max-width: 767.98px) { .gallery--masonry { columns: 2; column-gap: 12px; } .gallery--masonry .gallery__item { margin-bottom: 12px; } }

/* ── COLOUR SWATCHES ───────────────────────────────────── */
.swatch__media { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--light); cursor: zoom-in; }
.swatch__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.swatch__media:hover img { transform: scale(1.05); }
.swatch__media--link { cursor: pointer; }
.swatch__name { font-size: 17px; font-weight: 600; margin: 12px 0 0; }
.swatch__name a { text-decoration: none; }
.swatch__name a:hover { color: var(--r); }
.swatch__desc { font-size: 14px; color: var(--muted); margin: 4px 0 0; }

/* ── FAQ ───────────────────────────────────────────────── */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
    list-style: none; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 20px 0; font-size: 18px; font-weight: 600; color: #000;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary i { font-size: 14px; transition: transform .2s; color: var(--r); }
.faq__item[open] summary i { transform: rotate(45deg); }
.faq__answer { padding: 0 0 22px; color: var(--muted); }

/* ── CTA ───────────────────────────────────────────────── */
.cta { background: var(--dk); color: #fff; text-align: center; padding: clamp(40px, 6vw, 80px) 24px; background-size: cover; background-position: center; position: relative; }
.cta--image::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.cta__inner { position: relative; max-width: 720px; margin: 0 auto; }
.cta h2 { color: #fff; font-size: clamp(26px, 3vw, 40px); }
.cta p { opacity: .85; margin-bottom: 26px; font-size: 18px; }

/* ── CONTACT ───────────────────────────────────────────── */
.contact--with-side { display: grid; grid-template-columns: 2fr 1fr; gap: 56px; }
@media (max-width: 767.98px) { .contact--with-side { grid-template-columns: 1fr; gap: 32px; } }
.contact__side { background: var(--light); padding: 28px; }
.cms-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: #000; }
.cms-input {
    width: 100%; border: 1px solid rgba(0,0,0,.2); background: #fff;
    padding: 12px 14px; font-size: 15px; font-family: inherit; outline: none; transition: border-color .2s;
}
.cms-input:focus { border-color: #000; }
.cms-input.is-invalid { border-color: var(--r); }
.cms-error { color: var(--r); font-size: 13px; margin-top: 4px; }
.cms-alert { padding: 14px 18px; margin-bottom: 24px; font-size: 15px; }
.cms-alert--success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* ── LIGHTBOX ──────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; }
.lightbox__caption { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 28px; width: 56px; height: 56px; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lightbox__close { top: 10px; right: 10px; }
.lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ── QUOTE (calculator landing + sign in) ──────────────── */
.cms--quote_login { padding: 0 !important; }
.quote-hero {
    background: #ff0000;
    background-size: cover; background-position: center;
    min-height: calc(100vh - var(--header-h));
    display: flex; align-items: center;
    padding: 40px 0;
}
.quote-hero__inner { display: flex; align-items: center; gap: 60px; max-width: 1150px; }
.quote-hero__text { flex: 1; color: #fff; }
.quote-hero__text h1 { color: #fff; font-size: 42px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; line-height: 1.15; }
.quote-hero__text h1 span { color: #fca5a5; }
.quote-hero__logo { display: block; width: 300px; max-width: 100%; height: auto; margin-bottom: 14px; }
.quote-hero__text p { font-size: 16px; color: rgba(255,255,255,.8); line-height: 1.7; margin-bottom: 24px; max-width: 480px; }
.quote-hero__features { list-style: none; padding: 0; margin: 0 0 30px; }
.quote-hero__features li { color: rgba(255,255,255,.85); font-size: 14px; padding: 5px 0; display: flex; align-items: center; gap: 10px; }
.quote-hero__features li i { color: #fca5a5; font-size: 13px; }

.login-card { width: 380px; flex-shrink: 0; background: #fff; border-radius: 8px; padding: 36px 32px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-card h2 { font-size: 22px; font-weight: 700; color: var(--dk); margin-bottom: 6px; }
.login-card .subtitle { font-size: 13px; color: #777; margin-bottom: 24px; }
.form-label-custom { font-size: 13px; font-weight: 600; color: #444; margin-bottom: 5px; display: block; }
.form-control-custom { width: 100%; border: 2px solid #e0e0e0; border-radius: 5px; padding: 10px 14px; font-size: 14px; transition: border-color .2s; outline: none; margin-bottom: 16px; }
.form-control-custom:focus, .form-control-custom.error { border-color: var(--r); }
.remember-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.remember-row label { font-size: 13px; color: #555; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.remember-row a { font-size: 13px; color: var(--r); text-decoration: none; }
.remember-row a:hover { text-decoration: underline; }
.btn-login { width: 100%; background: var(--r); color: #fff; border: none; border-radius: 5px; padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; letter-spacing: 1px; text-transform: uppercase; transition: background .2s; }
.btn-login:hover { background: var(--rd); color: #fff; }
.divider { text-align: center; font-size: 12px; color: #aaa; margin: 18px 0; position: relative; }
.divider::before, .divider::after { content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: #e0e0e0; }
.divider::before { left: 0; }
.divider::after { right: 0; }
.btn-register { width: 100%; background: #fff; color: var(--dk); border: 2px solid #e0e0e0; border-radius: 5px; padding: 11px; font-size: 14px; font-weight: 600; text-align: center; text-decoration: none; display: block; transition: all .2s; }
.btn-register:hover { border-color: var(--r); color: var(--r); }
.alert-error { background: #fee2e2; border: 1px solid #fca5a5; border-radius: 5px; padding: 10px 14px; font-size: 13px; color: #991b1b; margin-bottom: 16px; }
.alert-success { background: #dcfce7; border: 1px solid #86efac; border-radius: 5px; padding: 10px 14px; font-size: 13px; color: #166534; margin-bottom: 16px; }
.alert-warning { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 5px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.alert-warning a { color: #92400e; font-weight: 700; }
@media (max-width: 900px) {
    .quote-hero__inner { flex-direction: column; gap: 30px; }
    .login-card { width: 100%; max-width: 400px; }
    .quote-hero__text h1 { font-size: 28px; }
    .quote-hero__logo { width: 220px; }
}
