/*
Theme Name: SWM Blocks
Description: Editable block theme for Sustainable Waste Management (Pvt) Ltd. On activation it creates a "Home" page built from normal blocks and sets it as the homepage. Pastel colours, waste-management icons.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Author: Sustainable Waste Management (Pvt) Ltd
License: GPL-2.0-or-later
Text Domain: swm-blocks
*/

/* ---------- frame ---------- */
.wp-site-blocks > * { margin-block-start: 0; }
.wp-site-blocks > header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.entry-content > .swm-band, .wp-block-post-content > .swm-band { margin-block-start: 0 !important; }

.swm-header { background: color-mix(in srgb, #fbfaf6 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid #dfe6e1; padding-block: 10px; }
.swm-header-inner { gap: 16px; }
.swm-brand { font-family: var(--wp--preset--font-family--display); font-weight: 800; line-height: 1.15; font-size: 1.02rem; margin: 0; padding-left: 50px; position: relative; min-height: 40px; }
.swm-brand::before { content: ""; position: absolute; left: 0; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 12px; background: #cdeee0 url(assets/icons/recycle.svg) center / 24px no-repeat; }
.swm-brand a { text-decoration: none; color: inherit; }
.swm-nav a { font-weight: 600; font-size: .94rem; color: #4d6763; text-decoration: none; padding: 6px 10px; border-radius: 999px; }
.swm-nav a:hover { background: #cdeee0; color: #1e6b52; }

.swm-footer { border-top: 1px solid #dfe6e1; padding-block: 28px; color: #4d6763; font-size: .9rem; }
.swm-bins { margin: 0; width: 86px; height: 20px; background:
  linear-gradient(90deg, #cdeee0 0 14px, transparent 14px 18px, #d3e9f7 18px 32px, transparent 32px 36px, #fbefbd 36px 50px, transparent 50px 54px, #ffdcca 54px 68px, transparent 68px 72px, #e1dcf5 72px 86px); border-radius: 4px; }

/* ---------- sections ---------- */
.swm-band { padding-block: clamp(48px, 7vw, 88px) 0; }
.swm-band:last-child { padding-bottom: clamp(48px, 7vw, 88px); }
.swm-hero { padding-top: clamp(32px, 5vw, 64px); }
.swm-tight { padding-top: 32px; }
.swm-section-head { margin-bottom: 8px; }
.swm-section-head > * { margin-block: 0 10px; }
.swm-eyebrow { font-family: var(--wp--preset--font-family--mono); font-size: .75rem !important; letter-spacing: .12em; text-transform: uppercase; color: #2f8f6f; margin-bottom: 0; display: flex; align-items: center; gap: 8px; }
.swm-eyebrow::before { content: ""; width: 18px; height: 18px; flex: none; background: url(assets/icons/sprout.svg) center / contain no-repeat; }
.swm-lede { color: #4d6763; font-size: 1.125rem; max-width: 62ch; }
.swm-note { color: #4d6763; padding-left: 34px; background: url(assets/icons/truck.svg) left top 2px / 24px no-repeat; max-width: 72ch; }
h1, h2, h3 { text-wrap: balance; }

/* hero */
.swm-hero-cols { gap: clamp(24px, 5vw, 64px); align-items: center !important; }
.swm-hero-title em { font-style: normal; background: linear-gradient(transparent 58%, #fbefbd 58%); padding-inline: .08em; }
.swm-hero-art img { width: 100%; height: auto; border-radius: 32px; display: block; }
.swm-hero-art { margin: 0; }
.swm-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.swm-chips li { font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: #cdeee0; color: #1e6b52; margin: 0; }
.swm-chips li:nth-child(4n+2) { background: #d3e9f7; color: #1e5d84; }
.swm-chips li:nth-child(4n+3) { background: #fbefbd; color: #7a5c06; }
.swm-chips li:nth-child(4n+4) { background: #ffdcca; color: #9a4523; }

/* pastel fills */
.swm-bg-mint { background: #cdeee0; }
.swm-bg-sky { background: #d3e9f7; }
.swm-bg-butter { background: #fbefbd; }
.swm-bg-peach { background: #ffdcca; }
.swm-bg-lav { background: #e1dcf5; }
.swm-bg-white { background: #ffffff; }

/* icon tiles (image blocks) */
.wp-block-image.swm-tile { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin: 0; flex: none; }
.wp-block-image.swm-tile img { width: 30px; height: 30px; }

/* stats */
.swm-stats { gap: 16px; }
.swm-stat { border-radius: 24px; padding: 22px; }
.swm-stat > * { margin: 0; }
.swm-stat-num { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.6rem) !important; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.swm-stat-label { font-size: .92rem; font-weight: 500; }

/* belief */
.swm-belief { border-radius: 32px; padding: clamp(28px, 5vw, 56px); gap: clamp(20px, 4vw, 40px) !important; }
.swm-belief .swm-tile { width: clamp(72px, 10vw, 112px); height: clamp(72px, 10vw, 112px); border-radius: 28px; }
.swm-belief .swm-tile img { width: 60%; height: 60%; }
.swm-belief-text { flex: 1 1 320px; min-width: 0; }
.swm-belief-text > * { margin-block: 0 12px; }
.swm-belief h2 { color: #4f3f93; font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.swm-belief .swm-eyebrow { color: #4f3f93; }
.swm-belief .swm-eyebrow::before { background-image: url(assets/icons/mind.svg); }

/* cards */
.swm-steps, .swm-progs, .swm-team, .swm-awards, .swm-sols, .swm-badges { gap: 16px; }
.swm-card { background: #ffffff; border: 1px solid #dfe6e1; border-radius: 24px; padding: 24px; position: relative; }
.swm-card > * { margin-block: 0 10px; }
.swm-card p { color: #4d6763; }
.swm-num { position: absolute; top: 20px; right: 22px; font-family: var(--wp--preset--font-family--mono); font-size: .8rem !important; color: #4d6763; }
.swm-by { font-weight: 600; color: #2f8f6f !important; font-size: .92rem; }
.swm-sol { border-radius: 28px; padding: 28px; }
.swm-sol > * { margin-block: 0 12px; }
.swm-facts { list-style: none; padding: 14px 0 0; border-top: 1px dashed #dfe6e1; font-size: .94rem; display: grid; gap: 6px; }
.swm-facts strong, .swm-meta strong { font-family: var(--wp--preset--font-family--mono); font-weight: 500; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #4d6763; display: inline-block; min-width: 84px; }

/* case study */
.swm-case { gap: clamp(24px, 5vw, 56px); align-items: center !important; }
.swm-case-card { border-radius: 32px; padding: clamp(24px, 4vw, 40px); }
.swm-case-card > * { margin-block: 0 8px; }
.swm-case-card .swm-eyebrow { color: #7a5c06; }
.swm-case-card .swm-eyebrow::before { background-image: url(assets/icons/school.svg); }
.swm-huge { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(3.4rem, 9vw, 6rem) !important; line-height: 1; letter-spacing: -.04em; color: #7a5c06; }
.swm-unit { font-weight: 700; font-size: 1.1rem; color: #7a5c06; margin-bottom: 18px !important; }
.swm-meta { font-size: .95rem; }
.swm-checks { list-style: none; padding: 0; display: grid; gap: 12px; }
.swm-checks li { padding-left: 34px; background: url(assets/icons/check.svg) left top 1px / 24px no-repeat; }

/* panel */
.swm-panel { border-radius: 32px; padding: clamp(28px, 5vw, 56px); }
.swm-panel h2 { color: #1e6b52; }
.swm-panel .swm-eyebrow::before { background-image: url(assets/icons/globe.svg); }
.swm-panel .wp-block-columns { gap: 32px; align-items: center; }
.swm-badge { background: #ffffff; border-radius: 20px; padding: 16px; }
.swm-badge > * { margin: 0; }
.swm-badge-k { font-family: var(--wp--preset--font-family--mono); font-size: .7rem !important; letter-spacing: .1em; text-transform: uppercase; color: #4d6763; }
.swm-badge-v { font-family: var(--wp--preset--font-family--display); font-weight: 700; line-height: 1.25; margin-top: 4px !important; }

/* timeline */
.swm-timeline { position: relative; padding-left: 40px; }
.swm-timeline::before { content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: linear-gradient(#cdeee0, #d3e9f7, #e1dcf5, #ffdcca, #fbefbd); }
.swm-timeline > .swm-tl { margin-block: 0 !important; padding-block: 12px; position: relative; display: grid; grid-template-columns: 112px 1fr; column-gap: 16px; }
.swm-tl::before { content: ""; position: absolute; left: -38px; top: 16px; width: 22px; height: 22px; border-radius: 50%; background: #cdeee0; border: 4px solid #fbfaf6; }
.swm-tl:nth-child(5n+2)::before { background: #d3e9f7; }
.swm-tl:nth-child(5n+3)::before { background: #fbefbd; }
.swm-tl:nth-child(5n+4)::before { background: #e1dcf5; }
.swm-tl:nth-child(5n+5)::before { background: #ffdcca; }
.swm-tl > * { margin: 0 !important; }
.swm-tl-date { grid-row: span 2; font-family: var(--wp--preset--font-family--mono); font-size: .82rem; color: #4d6763; padding-top: 3px; }
.swm-tl h3 { font-size: 1.08rem; }
.swm-tl p:not(.swm-tl-date) { color: #4d6763; font-size: .96rem; grid-column: 2; }
@media (max-width: 600px) { .swm-timeline > .swm-tl { grid-template-columns: 1fr; } .swm-tl-date { grid-row: auto; } .swm-tl p:not(.swm-tl-date) { grid-column: 1; } }
.swm-award { border: 1px solid #dfe6e1; background: #ffffff; border-radius: 22px; padding: 20px; }
.swm-award > * { margin-block: 0 8px; }
.swm-award p { color: #4d6763; font-size: .92rem; }

/* team */
.swm-avatar { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.3rem !important; color: #1f3a37 !important; }
.swm-subhead { margin-top: 40px !important; }
.swm-papers { list-style: none; padding: 0; }
.swm-papers li { padding: 14px 0; border-top: 1px solid #dfe6e1; color: #4d6763; font-size: .95rem; }
.swm-papers strong { color: #1f3a37; font-weight: 600; display: inline-block; margin-bottom: 2px; }

/* contact */
.swm-contact { gap: clamp(24px, 5vw, 56px); }
.swm-info { padding-left: 34px; background: url(assets/icons/pin.svg) left top 1px / 24px no-repeat; font-weight: 600; }
.swm-info-mail { background-image: url(assets/icons/mail.svg); user-select: all; }
.swm-contact .swm-card ul { color: #4d6763; padding-left: 1.2em; }

/* outline button */
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: #1f3a37; border: 2px solid #dfe6e1; }
.wp-block-button__link { transition: transform .15s; }
.wp-block-button__link:hover { transform: translateY(-2px); }
:focus-visible { outline: 3px solid #2f8f6f; outline-offset: 3px; }
