/* ==========================================================
   StapeTech — Components
   ========================================================== */

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--c-ink-900);
    --btn-fg: var(--c-white);
    --btn-border: transparent;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.75rem 1.4rem;
    border: 1.5px solid var(--btn-border);
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur), color var(--dur), border-color var(--dur);
}

.btn:hover {
    color: var(--btn-fg);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn .icon {
    transition: transform var(--dur) var(--ease);
}

.btn:hover .icon {
    transform: translateX(3px);
}

.btn--primary {
    --btn-bg: var(--c-brand);
    box-shadow: var(--shadow-brand);
}

.btn--primary:hover {
    --btn-bg: var(--c-brand-600);
}

.btn--outline {
    --btn-bg: transparent;
    --btn-fg: var(--c-ink-900);
    --btn-border: var(--c-border-strong);
}

.btn--outline:hover {
    --btn-border: var(--c-brand);
    --btn-fg: var(--c-brand-700);
}

.btn--outline-light {
    --btn-bg: rgba(255, 255, 255, 0.04);
    --btn-fg: var(--c-white);
    --btn-border: rgba(255, 255, 255, 0.3);
}

.btn--outline-light:hover {
    --btn-bg: rgba(255, 255, 255, 0.1);
    --btn-border: rgba(255, 255, 255, 0.6);
}

.btn--light {
    --btn-bg: var(--c-white);
    --btn-fg: var(--c-ink-900);
}

.btn--light:hover {
    --btn-fg: var(--c-brand-700);
}

.btn--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--c-muted);
}

.btn--danger {
    --btn-bg: var(--c-error);
}

.btn--sm {
    min-height: 40px;
    padding: 0.5rem 1.05rem;
    font-size: var(--fs-xs);
}

.btn--lg {
    min-height: 56px;
    padding: 0.9rem 1.75rem;
    font-size: 1rem;
}

.btn--block {
    width: 100%;
}

.btn[disabled],
.btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn.is-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Chips ---------- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: var(--c-brand-50);
    color: var(--c-brand-700);
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.chip--success { background: var(--c-success-bg); color: var(--c-success); }
.chip--warning { background: var(--c-warning-bg); color: var(--c-warning); }
.chip--muted { background: var(--surface-alt); color: var(--c-muted); }
.chip--error { background: var(--c-error-bg); color: var(--c-error); }

/* ---------- Cards: projects ---------- */
.project-grid {
    display: grid;
    gap: 1.5rem;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--c-border);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.project-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--c-brand-50);
}

.project-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.project-card:hover .project-card__media img {
    transform: scale(1.06);
}

.project-card__status {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.project-card__body {
    padding: 1.5rem;
}

.project-card__category {
    margin-bottom: 0.4rem;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-brand);
}

.project-card__title {
    margin-bottom: 0.5rem;
    font-size: var(--fs-lg);
}

.project-card__title a {
    color: inherit;
    text-decoration: none;
}

.project-card__body p:last-child {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--c-muted);
}

@media (min-width: 640px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
    .project-grid { grid-template-columns: repeat(3, 1fr); }
    .project-grid--featured .project-card:first-child { grid-column: span 2; grid-row: span 2; }
    .project-grid--featured .project-card:first-child .project-card__media { aspect-ratio: auto; flex: 1; min-height: 320px; }
    .project-grid--featured .project-card:first-child .project-card__title { font-size: var(--fs-2xl); }
}

/* ---------- Cards: posts ---------- */
.post-grid {
    display: grid;
    gap: 1.5rem;
}

.post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.post-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--c-brand-50);
}

.post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.post-card:hover .post-card__media img {
    transform: scale(1.05);
}

.post-card__body {
    padding: 1.5rem;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--fs-xs);
    color: var(--c-subtle);
}

.post-card__title {
    font-size: var(--fs-lg);
}

.post-card__title a {
    color: inherit;
    text-decoration: none;
}

.post-card__body > p:last-child {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--c-muted);
}

@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Testimonials ---------- */
.testimonial-grid {
    display: grid;
    gap: 1.5rem;
}

.testimonial {
    position: relative;
    margin: 0;
    padding: 2.25rem;
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
    border: 1px solid var(--c-border);
}

.testimonial__mark {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    color: var(--c-brand);
    opacity: 0.6;
}

.testimonial blockquote {
    margin: 0 0 1.5rem;
    font-size: var(--fs-lg);
    line-height: 1.6;
    color: var(--c-heading);
}

.testimonial figcaption {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.testimonial figcaption img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial figcaption strong {
    display: block;
    font-family: var(--font-display);
    color: var(--c-heading);
}

.testimonial figcaption small {
    color: var(--c-muted);
}

@media (min-width: 768px) { .testimonial-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Team ---------- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
    justify-content: center;
    gap: 1.5rem;
}

.team-card {
    position: relative;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--c-border);
    text-align: center;
}

.team-card__photo {
    display: grid;
    place-items: center;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.25rem;
    overflow: hidden;
    border-radius: 50%;
    background: var(--g-brand);
    box-shadow: 0 0 0 6px var(--c-brand-50);
}

.team-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card__initials {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--c-white);
}

.team-card__name {
    margin-bottom: 0.25rem;
    font-size: var(--fs-lg);
}

.team-card__role {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-brand);
}

.team-card__bio {
    font-size: var(--fs-sm);
    color: var(--c-muted);
}

.team-card__link {
    position: relative;
    z-index: 2;
    color: var(--c-muted);
}

/* ---------- Features & lists ---------- */
.feature-grid {
    display: grid;
    gap: 1rem;
}

.feature {
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    background: var(--surface-alt);
}

.feature__icon {
    display: inline-flex;
    margin-bottom: 0.75rem;
    color: var(--c-brand);
}

.feature h3 {
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

.feature p {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--c-muted);
}

@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }

.check-list {
    display: grid;
    gap: 0.6rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.check-list li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.check-list .icon {
    margin-top: 0.3rem;
    color: var(--c-brand);
}

/* ---------- Aside cards ---------- */
.aside-card {
    padding: 1.75rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.aside-card h2 {
    font-size: var(--fs-lg);
}

.aside-card__subtitle {
    margin-top: 1.5rem;
    font-size: 1rem;
}

.aside-card--accent {
    border: 0;
    background: var(--g-dark);
    color: rgba(255, 255, 255, 0.78);
}

.aside-card--accent h2 {
    color: var(--c-white);
}

.aside-card__phone {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.aside-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.aside-links a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--c-text);
    text-decoration: none;
}

.aside-links a:hover,
.aside-links a.is-active {
    background: var(--c-brand-50);
    color: var(--c-brand-700);
}

.meta-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--c-border);
}

.meta-list dt {
    color: var(--c-muted);
}

.meta-list dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

/* ---------- Forms ---------- */
.form-card {
    padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.form-card__lead {
    color: var(--c-muted);
}

.form-grid {
    display: grid;
    gap: 1.1rem 1.25rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .field--full { grid-column: 1 / -1; }
}

.field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-heading);
}

.field label span[aria-hidden] {
    color: var(--c-error);
}

.field input:not([type="checkbox"], [type="radio"]),
.field select,
.field textarea {
    width: 100%;
    min-height: 50px;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    font-size: 1rem;
    transition: border-color var(--dur), box-shadow var(--dur), background-color var(--dur);
}

.field textarea {
    resize: vertical;
    min-height: 140px;
}

.field input:not([type="checkbox"], [type="radio"]):focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--c-brand);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(66, 139, 202, 0.15);
}

.field.has-error input:not([type="checkbox"]),
.field.has-error select,
.field.has-error textarea {
    border-color: var(--c-error);
}

.field__error {
    min-height: 0;
    margin: 0.35rem 0 0;
    font-size: var(--fs-xs);
    color: var(--c-error);
}

.field__error:empty {
    display: none;
}

.checkbox {
    display: flex !important;
    gap: 0.75rem;
    align-items: flex-start;
    font-weight: 400 !important;
    color: var(--c-muted) !important;
}

.checkbox input {
    width: 20px;
    height: 20px;
    min-height: 0;
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--c-brand);
}

.form-status {
    margin: 1rem 0 0;
    font-size: var(--fs-sm);
    font-weight: 600;
}

.form-status:empty {
    display: none;
}

.form-status.is-success { color: var(--c-success); }
.form-status.is-error { color: var(--c-error); }

.newsletter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.newsletter-form input {
    flex: 1 1 220px;
    min-height: 50px;
    padding: 0.75rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--c-white);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--c-brand);
}

.newsletter-form .form-status {
    flex-basis: 100%;
    margin: 0;
}

.newsletter-form .form-status.is-success { color: #6ee7a0; }
.newsletter-form .form-status.is-error { color: #fca5a5; }

/* ---------- Alerts ---------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
}

.alert .icon {
    margin-top: 0.1rem;
}

.alert--success { background: var(--c-success-bg); color: var(--c-success); }
.alert--error { background: var(--c-error-bg); color: var(--c-error); }

/* ---------- FAQ accordion ---------- */
.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: box-shadow var(--dur);
}

.faq[open] {
    box-shadow: var(--shadow);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.4rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--c-heading);
    list-style: none;
    cursor: pointer;
}

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

.faq__icon {
    color: var(--c-brand);
    transition: transform var(--dur) var(--ease);
}

.faq[open] .faq__icon {
    transform: rotate(45deg);
}

.faq p {
    margin: 0;
    padding: 0 1.4rem 1.3rem;
    color: var(--c-muted);
}

/* ---------- Filters & pagination ---------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.filter-bar__item {
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-muted);
    text-decoration: none;
    transition: all var(--dur);
}

.filter-bar__item:hover {
    border-color: var(--c-brand);
    color: var(--c-brand-700);
}

.filter-bar__item.is-active {
    border-color: var(--c-heading);
    background: var(--c-ink-900);
    color: var(--c-white);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    font-size: var(--fs-sm);
    color: var(--c-muted);
}

.pagination a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    text-decoration: none;
}

/* ---------- Gallery & lightbox ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.9rem;
    margin-bottom: 2rem;
}

.gallery__item {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--c-brand-50);
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.gallery__zoom {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(14, 24, 34, 0.45);
    color: var(--c-white);
    opacity: 0;
    transition: opacity var(--dur);
}

.gallery__item:hover img { transform: scale(1.06); }
.gallery__item:hover .gallery__zoom { opacity: 1; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 4rem 1rem;
    background: rgba(8, 14, 20, 0.92);
}

.lightbox__img {
    max-width: min(1100px, 100%);
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--c-white);
}

.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 1rem; top: 50%; }
.lightbox__nav--next { right: 1rem; top: 50%; }

.lightbox__close:hover,
.lightbox__nav:hover {
    background: var(--c-brand);
}

/* ---------- Prose (Markdown content) ---------- */
.prose {
    color: var(--c-text);
}

.prose h2 {
    margin-top: 2.2em;
    font-size: var(--fs-xl);
}

.prose h3 {
    margin-top: 1.8em;
    font-size: 1.15rem;
}

.prose > :first-child {
    margin-top: 0;
}

.prose ul,
.prose ol {
    margin: 0 0 1.25em;
    padding-left: 1.4em;
}

.prose li + li {
    margin-top: 0.4em;
}

.prose blockquote {
    margin: 1.75em 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--c-brand);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--c-brand-50);
    font-size: var(--fs-lg);
    color: var(--c-heading);
}

.prose blockquote p:last-child {
    margin: 0;
}

.prose img {
    margin: 1.5em 0;
    border-radius: var(--radius);
}

.prose code {
    padding: 0.15em 0.4em;
    border-radius: 6px;
    background: var(--surface-alt);
    font-size: 0.9em;
}

.prose--article {
    font-size: 1.125rem;
    line-height: 1.8;
}

.table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
}

.table-wrap table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}

.table-wrap th,
.table-wrap td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--c-border);
    text-align: left;
    vertical-align: top;
}

.table-wrap th {
    background: var(--surface-alt);
    font-weight: 700;
}

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

/* ---------- CTA band ---------- */
.cta-band {
    padding-block: clamp(3.5rem, 2.5rem + 3vw, 5rem);
    background: linear-gradient(120deg, var(--c-brand-600) 0%, var(--c-brand) 50%, #3aa9dc 100%);
    color: rgba(255, 255, 255, 0.88);
}

.cta-band__inner {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.cta-band__title {
    margin-bottom: 0.5rem;
    font-size: var(--fs-2xl);
    color: var(--c-white);
}

.cta-band p {
    max-width: 560px;
    margin: 0;
    font-size: var(--fs-lg);
}

.cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (min-width: 900px) {
    .cta-band__inner { grid-template-columns: 1fr auto; }
}

/* ---------- Floating contact buttons (WhatsApp, Telegram) ---------- */
.whatsapp-fab,
.telegram-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: var(--c-white);
    transition: transform var(--dur) var(--ease);
}

.whatsapp-fab {
    background: #25d366;
    box-shadow: 0 10px 25px -8px rgba(37, 211, 102, 0.7);
}

.telegram-fab {
    background: #1f94cf;
    box-shadow: 0 10px 25px -8px rgba(31, 148, 207, 0.7);
}

/* With both, Telegram sits just above WhatsApp */
.whatsapp-fab ~ .telegram-fab {
    bottom: calc(1.25rem + 58px + 0.85rem);
}

.whatsapp-fab:hover,
.telegram-fab:hover {
    color: var(--c-white);
    transform: scale(1.08);
}

.whatsapp-fab .icon,
.telegram-fab .icon {
    width: 30px;
    height: 30px;
}

.whatsapp-fab::after,
.telegram-fab::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #25d366;
    animation: ping 2.4s var(--ease) infinite;
}

.telegram-fab::after {
    border-color: #1f94cf;
    animation-delay: 1.2s;
}

@keyframes ping {
    0% { transform: scale(1); opacity: 0.7; }
    80%, 100% { transform: scale(1.6); opacity: 0; }
}

.cookie-open .whatsapp-fab,
.cookie-open .telegram-fab {
    display: none;
}

/* ---------- Cookie consent ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 200;
    display: grid;
    gap: 1rem;
    max-width: 980px;
    margin-inline: auto;
    padding: 1.25rem 1.4rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    animation: slide-up 0.5s var(--ease);
}

.cookie-banner__text {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    font-size: var(--fs-sm);
    color: var(--c-muted);
}

.cookie-banner__text p {
    margin: 0;
}

.cookie-banner__text .icon {
    color: var(--c-brand);
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

@media (min-width: 900px) {
    .cookie-banner { grid-template-columns: 1fr auto; align-items: center; }
}

@keyframes slide-up {
    from { transform: translateY(30px); opacity: 0; }
}

.cookie-dialog {
    width: min(520px, calc(100% - 2rem));
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.cookie-dialog::backdrop {
    background: rgba(8, 14, 20, 0.6);
    backdrop-filter: blur(4px);
}

.cookie-dialog__body {
    padding: 1.75rem;
}

.cookie-dialog h2 {
    font-size: var(--fs-xl);
}

.cookie-dialog__body > p {
    font-size: var(--fs-sm);
    color: var(--c-muted);
}

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--c-border);
    cursor: pointer;
}

.cookie-option strong {
    font-family: var(--font-display);
}

.cookie-option p {
    margin: 0.15rem 0 0;
    font-size: var(--fs-xs);
    color: var(--c-muted);
}

.cookie-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--c-border);
}

/* Toggle switch */
.switch {
    appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
    margin: 0;
    border-radius: 999px;
    background: var(--c-border-strong);
    cursor: pointer;
    transition: background-color var(--dur);
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--c-white);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease);
}

.switch:checked {
    background: var(--c-brand);
}

.switch:checked::after {
    transform: translateX(20px);
}

/* ---------- Share ---------- */
.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 3rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-border);
    font-weight: 600;
}

.share span {
    margin-right: 0.5rem;
}

.share a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-alt);
    color: var(--c-ink);
}

.share a:hover {
    background: var(--c-brand);
    color: var(--c-white);
}

.share .icon {
    width: 18px;
    height: 18px;
}

/* Newsletter consent: a full row under the email field, readable on the dark footer */
.newsletter-form .newsletter-form__consent {
    flex: 1 0 100%;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.newsletter-form .newsletter-form__consent input {
    flex: 0 0 20px;
    width: 20px;
    min-height: 0;
    padding: 0;
    border-radius: 4px;
}

.newsletter-form .newsletter-form__consent a {
    color: #fff;
    text-decoration: underline;
}
/* Keep the last footer links clear of the floating WhatsApp button */
.site-footer .footer-bottom {
    padding-right: 4.5rem;
}

@media (max-width: 720px) {
    .site-footer .footer-bottom {
        padding-right: 0;
        padding-bottom: 4.5rem;
    }
}

/* ---------- Notice for administrators while maintenance mode is on (never shown to visitors) ---------- */
.maintenance-pill {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 400;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 1rem;
    width: max-content;
    max-width: min(94vw, 780px);
    padding: 0.65rem 1.1rem;
    transform: translateX(-50%);
    border: 1px solid rgba(124, 45, 18, 0.35);
    border-radius: 12px;
    background: #fef3c7;
    box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.55);
    color: #7c2d12;
    font-family: var(--font-body, "Inter", system-ui, sans-serif);
    font-size: 0.85rem;
    line-height: 1.45;
}

.maintenance-pill a,
.maintenance-pill button {
    padding: 0.3rem 0.8rem;
    border: 1px solid #7c2d12;
    border-radius: 999px;
    background: #ffffff;
    color: #7c2d12;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.maintenance-pill a:hover,
.maintenance-pill button:hover {
    background: #7c2d12;
    color: #ffffff;
}

.maintenance-pill form { margin: 0; }

@media (max-width: 720px) {
    .maintenance-pill {
        bottom: 5.4rem;
        font-size: 0.8rem;
    }
}

/* ---------- Atmosphere: occasions, weather and music (only while switched on in the admin) ---------- */
.atmo-canvas {
    position: fixed;
    inset: 0;
    z-index: 55;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/*
 * The music and effects buttons stack above the floating contact buttons (WhatsApp, Telegram), never over them.
 * One contact button takes 58px plus a 0.85rem gap; the stack starts above however many are on the page.
 * Browsers without :has() always leave room for both.
 */
.atmo-controls {
    position: fixed;
    right: calc(1.25rem + 7px); /* centred over the 58px contact buttons */
    bottom: calc(1.25rem + 2 * (58px + 0.85rem));
    z-index: 91;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

@supports selector(:has(*)) {
    body:not(:has(.whatsapp-fab)) .atmo-controls,
    body:not(:has(.telegram-fab)) .atmo-controls { bottom: calc(1.25rem + 58px + 0.85rem); }
    body:not(:has(.whatsapp-fab)):not(:has(.telegram-fab)) .atmo-controls { bottom: 1.25rem; }
}

.cookie-open .atmo-controls { display: none; }

.atmo-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(10, 30, 56, 0.78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.6);
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.atmo-btn:hover { transform: scale(1.08); background: rgba(10, 30, 56, 0.92); }
.atmo-btn:focus-visible { outline: 3px solid var(--c-cyan, #22c4ef); outline-offset: 3px; }
.atmo-btn[hidden] { display: none; }

.atmo-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* A button that is switched off wears a slash */
.atmo-btn[aria-pressed="false"]::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    top: 50%;
    height: 2.5px;
    border-radius: 2px;
    background: #ffffff;
    transform: rotate(-42deg);
    box-shadow: 0 0 0 1.5px rgba(10, 30, 56, 0.9);
}

.theme-light .atmo-btn {
    border-color: rgba(26, 68, 112, 0.35);
    background: rgba(247, 250, 252, 0.9);
    color: #1a4470;
}

.theme-light .atmo-btn:hover { background: #ffffff; }
.theme-light .atmo-btn[aria-pressed="false"]::after { background: #1a4470; box-shadow: 0 0 0 1.5px rgba(247, 250, 252, 0.95); }

.atmo-greeting {
    position: fixed;
    top: 5.4rem;
    left: 50%;
    z-index: 92;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: min(92vw, 560px);
    padding: 0.75rem 0.9rem 0.75rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    background: rgba(10, 30, 56, 0.92);
    box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.45;
    opacity: 0;
    transform: translate(-50%, -14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.atmo-greeting.is-in { opacity: 1; transform: translate(-50%, 0); }
.atmo-greeting p { margin: 0; }

.atmo-greeting__close {
    flex: none;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.atmo-greeting__close:hover { background: rgba(255, 255, 255, 0.28); }
.atmo-greeting__close:focus-visible { outline: 3px solid var(--c-cyan, #22c4ef); outline-offset: 2px; }

@media (max-width: 720px) {
    .atmo-greeting { top: 4.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .atmo-btn, .atmo-greeting { transition: none; }
}
/* ------------------------------------------------------------------
   Returning-visitor notifications: the invitation and the share card
   (built by assets/js/modules/push.js; light-world colours are in light-era.css)
   ------------------------------------------------------------------ */
.push-card {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 120;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    width: min(25rem, calc(100vw - 2.5rem));
    padding: 1.15rem 1.25rem 1.1rem;
    border: 1px solid rgba(66, 139, 202, 0.55);
    border-radius: var(--radius-lg);
    background: #0c1824;
    color: #e6eef6;
    box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.65);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.push-card.is-in {
    opacity: 1;
    transform: none;
}

.push-card__icon {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: #428bca;
    color: #ffffff;
}

.push-card__icon .icon {
    width: 1.3rem;
    height: 1.3rem;
}

/* Same specificity as the worlds' own heading rules, so the card keeps its own calm type in both */
.push-card .push-card__title,
.theme-dark .push-card .push-card__title,
.theme-light .push-card .push-card__title {
    margin: 0 0 0.35rem;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    color: inherit;
}

.push-card__text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #c8d6e3;
}

.push-card__badge {
    display: inline-block;
    margin: 0 0 0.5rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(66, 139, 202, 0.25);
    color: #cfe6fa;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.push-card__status {
    margin: 0.55rem 0 0;
    font-size: 0.88rem;
    color: #a9d6f7;
    overflow-wrap: anywhere;
}

.push-card__status:empty {
    display: none;
}

.push-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.push-card__actions .icon {
    width: 1rem;
    height: 1rem;
}

.push-card__link {
    font-size: 0.82rem;
    color: #a9d6f7;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.push-card__link:hover {
    color: #ffffff;
}

.push-card .btn--ghost {
    color: #e6eef6;
    border-color: rgba(230, 238, 246, 0.4);
    background: transparent;
}

.push-card .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.footer-push-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
}

.footer-push-note:empty {
    display: none;
}

@media (max-width: 640px) {
    /* sits above the round chat button, never over it */
    .push-card {
        left: 1rem;
        right: 1rem;
        bottom: 6.4rem;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .push-card { transition: none; transform: none; }
}

@media print {
    .push-card { display: none; }
}

/* ------------------------------------------------------------------
   The site's own offers: a pop-up or a small corner card (Admin -> Promotions)
   Built by partials/promo.php and shown by assets/js/modules/promo.js; light-world colours are in light-era.css
   ------------------------------------------------------------------ */
.promo {
    position: relative;
    margin: auto;
    padding: 0;
    border: 1px solid rgba(66, 139, 202, 0.55);
    border-radius: var(--radius-lg);
    background: #0c1824;
    color: #e6eef6;
    box-shadow: 0 30px 70px -22px rgba(0, 0, 0, 0.7);
}

.promo--popup {
    width: min(30rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow: auto;
}

.promo--popup::backdrop {
    background: rgba(5, 11, 17, 0.66);
}

.promo--popup[open] {
    animation: promo-in 0.3s var(--ease);
}

@keyframes promo-in {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.promo--corner {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 120;
    width: min(23rem, calc(100vw - 2.5rem));
    margin: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.promo--corner.is-in {
    opacity: 1;
    transform: none;
}

.promo__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(7, 17, 27, 0.78);
    color: #ffffff;
    cursor: pointer;
}

.promo__close:hover {
    background: rgba(7, 17, 27, 0.95);
}

.promo__close:focus-visible {
    outline: 2px solid #22c4ef;
    outline-offset: 2px;
}

.promo__close .icon {
    width: 1.15rem;
    height: 1.15rem;
}

.promo__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(55vh, 28rem);
    object-fit: contain;
    background: #07111b;
}

.promo--corner .promo__image {
    max-height: 11rem;
}

.promo__body {
    padding: 1.15rem 1.35rem 1.3rem;
}

/* Same specificity as the worlds' own heading rules, so the offer keeps its own calm type in both */
.promo .promo__title,
.theme-dark .promo .promo__title,
.theme-light .promo .promo__title {
    margin: 0 0 0.4rem;
    padding-right: 2.4rem;
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    color: inherit;
}

.promo__image + .promo__body .promo__title {
    padding-right: 0;
}

.promo__text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #c8d6e3;
}

.promo__deadline {
    margin: 0.65rem 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #a9d6f7;
}

.promo__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.promo .btn--ghost {
    color: #e6eef6;
    border-color: rgba(230, 238, 246, 0.4);
    background: transparent;
}

.promo .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 640px) {
    /* sits above the round chat button, never over it */
    .promo--corner {
        left: 1rem;
        right: 1rem;
        bottom: 6.4rem;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .promo--popup[open] { animation: none; }
    .promo--corner { transition: none; transform: none; }
}

@media print {
    .promo { display: none; }
}

/* ------------------------------------------------------------------
   Clients: the slow logo strip on the home page, and the Clients page
   (world-specific looks are in dark-hud.css and light-era.css)
   ------------------------------------------------------------------ */
.clients-band {
    padding: clamp(2.75rem, 6vw, 4.5rem) 0;
    overflow: hidden;
}

.clients-band__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 1.75rem;
}

.clients-band .clients-band__title {
    margin: 0;
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem);
    line-height: 1.15;
}

.clients-band__preview {
    margin: -0.75rem 0 1.25rem;
    font-size: 0.85rem;
    color: var(--c-muted);
}

.logo-strip {
    position: relative;
    overflow: hidden;
    padding: 0.5rem 0 1rem;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

/* Two identical lists side by side; moving left by exactly one list makes the loop seamless */
.logo-strip__row {
    display: flex;
    width: max-content;
    animation: logo-strip-scroll var(--logo-strip-duration, 60s) linear infinite;
    will-change: transform;
}

.logo-strip:hover .logo-strip__row,
.logo-strip__row.is-paused {
    animation-play-state: paused;
}

.logo-strip__track {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 0;
    padding: 0 1.25rem 0 0;
    list-style: none;
}

.logo-strip__item {
    display: grid;
    flex: none;
    place-items: center;
    height: 92px;
    padding: 0 2rem;
    border: 1px solid #dfe8f1;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px -16px rgba(15, 40, 70, 0.45);
}

@keyframes logo-strip-scroll {
    to { transform: translateX(-50%); }
}

.client-logo {
    display: block;
    width: auto;
    height: 50px;
    max-width: 170px;
    object-fit: contain;
}

.client-logo--sample {
    height: auto;
    color: #3d5163;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .logo-strip {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .logo-strip__row {
        width: auto;
        animation: none;
    }

    .logo-strip__track {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 1rem;
    }

    .logo-strip__track[aria-hidden="true"] {
        display: none;
    }
}

/* The Clients page */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.client-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.1rem 1.25rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.client-card__logo {
    display: grid;
    place-items: center;
    height: 116px;
    margin-bottom: 0.4rem;
    padding: 1rem;
    border: 1px solid #e3ebf2;
    border-radius: 14px;
    background: #ffffff;
}

.client-card__logo .client-logo {
    height: 64px;
    max-width: 100%;
}

.client-card .client-card__name {
    margin: 0.2rem 0 0;
    font-size: 1.1rem;
    line-height: 1.25;
}

.client-card__what {
    margin: 0;
    color: var(--c-muted);
    font-size: 0.95rem;
}

.client-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.client-card__link .icon {
    width: 1rem;
    height: 1rem;
}

@media print {
    .logo-strip__row { animation: none; }
}

/* "About this music" link beside the music button */
a.atmo-btn { text-decoration: none; }
