/* ==========================================================================
   SGS Intercools — Base layer
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body.sgs-body {
    font-family: var(--sgs-font);
    font-weight: 400;
    color: var(--sgs-text-body);
    background: var(--sgs-white);
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.sgs-body img {
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.sgs-shell {
    width: 100%;
    padding-inline: var(--sgs-shell-pad);
    margin-inline: auto;
    max-width: 2100px;
}

.sgs-section {
    position: relative;
    padding-block: var(--sgs-section-y);
}

.sgs-skip-link {
    position: absolute;
    inset-inline: 0;
    margin-inline: auto;
    width: fit-content;
    transform: translateY(-200%);
    z-index: 2000;
    padding: 12px 24px;
    border-radius: var(--sgs-radius-pill);
    background: var(--sgs-white);
    color: var(--sgs-primary);
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--sgs-dur-base) var(--sgs-ease-out);
}

.sgs-skip-link:focus {
    transform: translateY(12px);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.sgs-h1,
.sgs-h2,
.sgs-h3,
.sgs-h4 {
    font-family: var(--sgs-font);
    font-weight: 700;
    font-stretch: var(--sgs-font-wide);
    letter-spacing: 0.02em;
    line-height: 1.05;
    color: var(--sgs-primary);
    margin: 0;
}

.sgs-h1 {
    font-size: clamp(2.65rem, 5.85vw, 7rem);
    line-height: 0.96;
    color: var(--sgs-white);
    letter-spacing: 0.01em;
}

.sgs-h2 {
    font-size: clamp(2rem, 2.98vw, 4.75rem);
    letter-spacing: 0.04em;
    line-height: 1.08;
}

.sgs-h3 {
    font-size: clamp(1.4rem, 2.3vw, 2.75rem);
    letter-spacing: 0.02em;
    line-height: 1.16;
}

.sgs-h4 {
    font-size: clamp(1.15rem, 1.6vw, 1.9rem);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.sgs-sub {
    font-family: var(--sgs-font);
    font-stretch: var(--sgs-font-narrow);
    font-weight: 300;
    font-size: clamp(1rem, 1.58vw, 1.9rem);
    line-height: 1.5;
    color: var(--sgs-text-body);
    margin: 0;
}

.sgs-copy {
    font-family: var(--sgs-font);
    font-stretch: var(--sgs-font-narrow);
    font-weight: 400;
    font-size: clamp(0.98rem, 1.32vw, 1.6rem);
    line-height: 1.62;
    color: var(--sgs-text-body);
}

.sgs-copy--light {
    font-weight: 300;
}

/* Rich text produced by CKEditor (admin Description fields). */
.sgs-copy.rich-content > :first-child {
    margin-block-start: 0;
}

.sgs-copy.rich-content > :last-child {
    margin-block-end: 0;
}

.sgs-copy.rich-content p {
    margin-block: 0 0.85em;
}

.sgs-copy.rich-content ul,
.sgs-copy.rich-content ol {
    margin-block: 0 0.85em;
    padding-inline-start: 1.4em;
}

.sgs-copy.rich-content li {
    margin-block-end: 0.35em;
}

.sgs-copy.rich-content li:last-child {
    margin-block-end: 0;
}

.sgs-copy.rich-content h3,
.sgs-copy.rich-content h4 {
    margin-block: 1.1em 0.5em;
    line-height: 1.25;
}

.sgs-copy.rich-content h3 {
    font-size: 1.15em;
}

.sgs-copy.rich-content h4 {
    font-size: 1.05em;
}

.sgs-copy.rich-content blockquote {
    margin: 0 0 0.85em;
    padding-inline-start: 1em;
    border-inline-start: 3px solid rgba(8, 71, 109, 0.25);
}

.sgs-copy.rich-content a {
    color: var(--sgs-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sgs-copy.rich-content hr {
    margin-block: 1.2em;
    border: 0;
    border-top: 1px solid rgba(8, 71, 109, 0.15);
}

.sgs-eyebrow {
    display: inline-block;
    font-size: clamp(0.72rem, 0.82vw, 0.95rem);
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sgs-primary);
    margin: 0 0 14px;
}

.sgs-eyebrow--light {
    color: rgba(255, 255, 255, 0.78);
}

.sgs-section-head {
    max-width: 62rem;
    margin-inline: auto;
}

.sgs-section-head--start {
    margin-inline: 0;
    text-align: start;
}

.sgs-section-head .sgs-sub {
    margin-top: clamp(10px, 1.1vw, 22px);
}

.sgs-num {
    font-size: clamp(0.95rem, 1.05vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.sgs-btn {
    --sgs-btn-bg: var(--sgs-white);
    --sgs-btn-fg: var(--sgs-primary);
    --sgs-btn-border: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7em;
    min-height: clamp(46px, 3.3vw, 64px);
    padding: 0.55em clamp(22px, 2.5vw, 48px);
    border: 1.5px solid var(--sgs-btn-border);
    border-radius: var(--sgs-radius-pill);
    background: var(--sgs-btn-bg);
    color: var(--sgs-btn-fg);
    font-family: var(--sgs-font);
    font-size: clamp(0.9rem, 1.28vw, 1.55rem);
    font-weight: 400;
    letter-spacing: 0.035em;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform var(--sgs-dur-fast) var(--sgs-ease-out),
        box-shadow var(--sgs-dur-fast) var(--sgs-ease-out),
        background-color var(--sgs-dur-fast) var(--sgs-ease),
        color var(--sgs-dur-fast) var(--sgs-ease),
        border-color var(--sgs-dur-fast) var(--sgs-ease);
}

.sgs-btn svg {
    width: 1em;
    height: 1em;
    flex: none;
}

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

.sgs-btn:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 100ms;
}

.sgs-btn--surface {
    --sgs-btn-bg: var(--sgs-surface);
    --sgs-btn-fg: var(--sgs-primary);
}

.sgs-btn--light {
    --sgs-btn-bg: var(--sgs-white);
    --sgs-btn-fg: var(--sgs-primary);
    box-shadow: var(--sgs-shadow-btn);
}

.sgs-btn--dark {
    --sgs-btn-bg: var(--sgs-navy-action);
    --sgs-btn-fg: var(--sgs-white);
    box-shadow: var(--sgs-shadow-btn);
}

.sgs-btn--outline {
    --sgs-btn-bg: transparent;
    --sgs-btn-fg: var(--sgs-primary);
    --sgs-btn-border: var(--sgs-primary);
}

.sgs-btn--outline-light {
    --sgs-btn-bg: transparent;
    --sgs-btn-fg: var(--sgs-white);
    --sgs-btn-border: rgba(255, 255, 255, 0.9);
}

.sgs-btn--outline:hover,
.sgs-btn--outline-light:hover {
    background: color-mix(in srgb, var(--sgs-btn-border) 12%, transparent);
}

.sgs-btn--sm {
    min-height: 44px;
    padding: 0.4em 1.5em;
    font-size: clamp(0.85rem, 1.05vw, 1.15rem);
}

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

.sgs-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: var(--sgs-primary);
    font-weight: 500;
    text-decoration: none;
    transition: gap var(--sgs-dur-base) var(--sgs-ease-out), color var(--sgs-dur-fast) var(--sgs-ease);
}

.sgs-link-arrow svg {
    width: 1em;
    height: 1em;
    transition: transform var(--sgs-dur-base) var(--sgs-ease-out);
}

.sgs-link-arrow:hover {
    color: var(--sgs-primary);
    gap: 0.85em;
}

/* --------------------------------------------------------------------------
   Glass surfaces
   -------------------------------------------------------------------------- */

.sgs-glass {
    background: var(--sgs-glass-fill);
    border: 1px solid var(--sgs-glass-border);
    border-radius: var(--sgs-radius-card);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.sgs-header {
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 1030;
    color: var(--sgs-white);
    padding-block: clamp(10px, 1vw, 22px);
}

.sgs-nav {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.4vw, 28px);
}

.sgs-brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    text-decoration: none;
}

.sgs-brand img {
    width: clamp(165px, 19vw, 360px);
    height: auto;
}

.sgs-nav__links {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.65vw, 34px);
    margin-inline-start: auto;
    padding: 0;
    list-style: none;
}

.sgs-nav__link {
    position: relative;
    display: inline-block;
    padding-block: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--sgs-font);
    font-stretch: var(--sgs-font-narrow);
    font-style: italic;
    font-size: clamp(0.85rem, 1.5vw, 1.75rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--sgs-dur-base) var(--sgs-ease);
}

.sgs-nav__link::after {
    content: '';
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: inset-inline-start center;
    transition: transform var(--sgs-dur-base) var(--sgs-ease-out);
}

[dir='rtl'] .sgs-nav__link::after {
    transform-origin: right center;
}

.sgs-nav__link:hover,
.sgs-nav__link:focus-visible,
.sgs-nav__link.is-active {
    color: var(--sgs-white);
}

.sgs-nav__link:hover::after,
.sgs-nav__link:focus-visible::after,
.sgs-nav__link.is-active::after {
    transform: scaleX(1);
}

.sgs-nav__tools {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1vw, 20px);
    margin-inline-start: clamp(6px, 1vw, 18px);
}

.sgs-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--sgs-white);
    text-decoration: none;
    transition: background-color var(--sgs-dur-fast) var(--sgs-ease), transform var(--sgs-dur-fast) var(--sgs-ease-out);
}

.sgs-icon-btn svg {
    width: clamp(20px, 1.7vw, 30px);
    height: clamp(20px, 1.7vw, 30px);
}

.sgs-icon-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.sgs-lang {
    padding: 6px 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--sgs-radius-pill);
    color: var(--sgs-white);
    font-size: clamp(0.78rem, 0.95vw, 1.05rem);
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: background-color var(--sgs-dur-fast) var(--sgs-ease), border-color var(--sgs-dur-fast) var(--sgs-ease);
}

.sgs-lang:hover {
    border-color: var(--sgs-white);
    background: rgba(255, 255, 255, 0.16);
    color: var(--sgs-white);
}

.sgs-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 46px;
    height: 46px;
    margin-inline-start: auto;
    padding: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: transparent;
}

.sgs-burger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--sgs-white);
}

/* Offcanvas / mobile menu */
.sgs-offcanvas {
    --bs-offcanvas-width: min(380px, 92vw);
    background: var(--sgs-primary);
    color: var(--sgs-white);
}

.sgs-offcanvas .offcanvas-header {
    padding: 22px var(--sgs-shell-pad);
}

.sgs-offcanvas .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
}

.sgs-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 var(--sgs-shell-pad) 32px;
}

.sgs-offcanvas .sgs-nav__link {
    padding-block: 12px;
    font-size: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sgs-offcanvas .sgs-nav__link::after {
    display: none;
}

.sgs-offcanvas .sgs-nav__tools {
    margin: 26px 0 0;
}

/* --------------------------------------------------------------------------
   Focus visibility (ANIM-GLOBAL-01)
   -------------------------------------------------------------------------- */

.sgs-body :focus-visible {
    outline: 2px solid var(--sgs-focus);
    outline-offset: 3px;
}

.sgs-hero :focus-visible,
.sgs-header :focus-visible,
.sgs-contact-info :focus-visible,
.sgs-footer :focus-visible,
.sgs-card--dark :focus-visible,
.sgs-card--featured :focus-visible {
    outline-color: var(--sgs-white);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.sgs-field {
    position: relative;
    margin: 0;
}

.sgs-label {
    display: block;
    margin-block-end: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--sgs-primary);
}

.sgs-control {
    width: 100%;
    min-height: clamp(48px, 3.7vw, 70px);
    padding: 0.6em clamp(18px, 1.4vw, 26px);
    border: 1px solid var(--sgs-input-border);
    border-radius: var(--sgs-radius-field);
    background: var(--sgs-input-fill);
    color: var(--sgs-text-body);
    font-family: var(--sgs-font);
    font-size: clamp(0.92rem, 1vw, 1.2rem);
    font-weight: 300;
    line-height: 1.4;
    transition: border-color var(--sgs-dur-fast) var(--sgs-ease), box-shadow var(--sgs-dur-fast) var(--sgs-ease), background-color var(--sgs-dur-fast) var(--sgs-ease);
}

textarea.sgs-control {
    min-height: clamp(140px, 11vw, 250px);
    padding-block: 1em;
    border-radius: var(--sgs-radius-textarea);
    resize: vertical;
}

.sgs-control::placeholder {
    color: var(--sgs-placeholder);
    opacity: 1;
}

.sgs-control:hover {
    border-color: var(--sgs-primary);
}

.sgs-control:focus {
    outline: none;
    border-color: var(--sgs-primary);
    border-width: 2px;
    padding-block-end: calc(0.6em - 1px);
    box-shadow: 0 0 0 4px rgba(8, 71, 109, 0.18);
    background: var(--sgs-white);
}

.sgs-control.is-invalid {
    border-color: #B42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16);
}

.sgs-error {
    display: block;
    margin-block-start: 6px;
    padding-inline-start: 4px;
    color: #B42318;
    font-size: 0.85rem;
}

.sgs-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-block-end: 18px;
    padding: 14px 20px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.sgs-alert--success {
    background: #E6F4EA;
    color: #14532D;
    border: 1px solid #B6E2C4;
}

.sgs-alert--error {
    background: #FDECEA;
    color: #8A1C13;
    border: 1px solid #F3C3BE;
}

.sgs-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.sgs-footer {
    background: var(--sgs-surface);
    color: var(--sgs-primary);
    padding-block: clamp(40px, 4.6vw, 88px) clamp(20px, 2.4vw, 44px);
}

.sgs-footer__brand img {
    width: clamp(150px, 14vw, 260px);
    height: auto;
    margin-block-end: clamp(14px, 1.4vw, 26px);
}

.sgs-footer__about {
    font-stretch: var(--sgs-font-narrow);
    font-weight: 300;
    font-size: clamp(0.9rem, 1.28vw, 1.55rem);
    line-height: 1.4;
    max-width: 26em;
    margin: 0;
}

.sgs-footer__social {
    display: flex;
    gap: clamp(10px, 1.2vw, 22px);
    margin-block-start: clamp(16px, 1.6vw, 30px);
}

.sgs-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(38px, 2.8vw, 54px);
    height: clamp(38px, 2.8vw, 54px);
    border-radius: 50%;
    color: var(--sgs-primary);
    background: rgba(8, 71, 109, 0.06);
    text-decoration: none;
    transition: transform var(--sgs-dur-fast) var(--sgs-ease-out), background-color var(--sgs-dur-fast) var(--sgs-ease), color var(--sgs-dur-fast) var(--sgs-ease);
}

.sgs-social svg {
    width: 55%;
    height: 55%;
}

.sgs-social:hover {
    transform: translateY(-3px) scale(1.08);
    background: var(--sgs-primary);
    color: var(--sgs-white);
}

.sgs-footer__title {
    margin: 0 0 clamp(14px, 1.4vw, 26px);
    font-size: clamp(1rem, 1.62vw, 1.95rem);
    font-weight: 700;
    font-stretch: var(--sgs-font-narrow);
    font-style: italic;
    letter-spacing: 0.02em;
    color: var(--sgs-primary);
}

.sgs-footer__list {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 0.85vw, 16px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.sgs-footer__link {
    display: inline-block;
    color: var(--sgs-primary);
    font-size: clamp(0.88rem, 1.44vw, 1.75rem);
    font-weight: 300;
    text-decoration: none;
    transition: transform var(--sgs-dur-fast) var(--sgs-ease-out), opacity var(--sgs-dur-fast) var(--sgs-ease);
}

.sgs-footer__link:hover {
    transform: translateX(4px);
    text-decoration: underline;
    text-underline-offset: 4px;
}

[dir='rtl'] .sgs-footer__link:hover {
    transform: translateX(-4px);
}

.sgs-footer__text {
    margin-block-end: 16px;
    font-size: clamp(0.85rem, 0.92vw, 1.1rem);
    font-weight: 300;
    line-height: 1.5;
}

.sgs-footer__contact {
    margin-block-start: clamp(18px, 1.8vw, 30px);
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 0.8vw, 14px);
}

.sgs-footer__contact a,
.sgs-footer__contact address {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: var(--sgs-primary);
    font-size: clamp(0.82rem, 0.9vw, 1.1rem);
    font-weight: 300;
    line-height: 1.45;
    text-decoration: none;
    transition: opacity var(--sgs-dur-fast) var(--sgs-ease);
}

.sgs-footer__contact a:hover {
    opacity: 0.75;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sgs-footer__contact svg {
    flex: none;
    width: 1.1em;
    height: 1.1em;
    margin-block-start: 0.15em;
}

.sgs-footer__bottom {
    margin-block-start: clamp(24px, 3vw, 52px);
    padding-block-start: clamp(14px, 1.4vw, 22px);
    border-top: 1px solid rgba(8, 71, 109, 0.16);
    font-size: clamp(0.72rem, 0.8vw, 0.95rem);
    font-weight: 300;
    text-align: center;
    opacity: 0.85;
}

.sgs-footer__credit a {
    color: var(--sgs-primary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
    transition: color 0.2s ease;
}

.sgs-footer__credit a:hover,
.sgs-footer__credit a:focus-visible {
    color: var(--sgs-navy-action);
    text-decoration-thickness: 2px;
}

/* --------------------------------------------------------------------------
   Reveal-on-scroll (P2) — only active when JS adds .sgs-js
   Three layers share one timing model:
   --sgs-delay           per-element delay (set in Blade)
   --sgs-stagger-delay   per-child delay (set by JS inside [data-sgs-stagger])
   --sgs-rise-delay      per-element delay (set by JS in [data-sgs-timeline])
   -------------------------------------------------------------------------- */

.sgs-js .sgs-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--sgs-dur-slow) var(--sgs-ease-out), transform var(--sgs-dur-slow) var(--sgs-ease-out);
    transition-delay: calc(var(--sgs-delay, 0ms) + var(--sgs-stagger-delay, 0ms));
}

.sgs-js .sgs-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Stagger group: every direct child rises in turn, each one observed on its
   own so long grids keep their per-row reveal. */
.sgs-js [data-sgs-stagger] > * {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity var(--sgs-dur-slow) var(--sgs-ease-out), transform var(--sgs-dur-slow) var(--sgs-ease-out);
    transition-delay: var(--sgs-stagger-delay, 0ms);
}

.sgs-js [data-sgs-stagger] > *.is-visible {
    opacity: 1;
    transform: none;
}

/* Entry timeline: runs once on load (hero / page hero). The H1 is never a
   [data-sgs-rise] node so the largest paint stays immediate. */
.sgs-js [data-sgs-timeline] [data-sgs-rise] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--sgs-dur-slow) var(--sgs-ease-out), transform var(--sgs-dur-slow) var(--sgs-ease-out);
    transition-delay: var(--sgs-rise-delay, 0ms);
}

.sgs-js [data-sgs-timeline].is-visible [data-sgs-rise] {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------------
   GSAP motion layer (optional) — motion.js adds .sgs-gsap to <html>.
   It writes inline transforms every frame, so the CSS transform transitions
   are dropped for the elements it drives (colour/shadow transitions stay).
   Reveal + timeline keep the CSS fallback above when the layer is absent,
   fails to load, or the visitor prefers reduced motion.
   -------------------------------------------------------------------------- */

.sgs-gsap [data-sgs-parallax],
.sgs-gsap [data-sgs-tilt] {
    transition-property: border-color, box-shadow, background-color, color;
}

/* Parallax layers move inside their box: the extra scale keeps the moving
   edges covered. Stays 1 (no change) without the motion layer. */
.sgs-gsap .sgs-bg-zone::before,
.sgs-gsap .sgs-page-hero::before {
    --sgs-parallax-scale: 1.08;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .sgs-js .sgs-reveal,
    .sgs-js .sgs-reveal.is-visible,
    .sgs-js [data-sgs-stagger] > *,
    .sgs-js [data-sgs-stagger] > *.is-visible,
    .sgs-js [data-sgs-timeline] [data-sgs-rise],
    .sgs-js [data-sgs-timeline].is-visible [data-sgs-rise] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .sgs-body *,
    .sgs-body *::before,
    .sgs-body *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   WhatsApp float
   Persistent chat button (every public page) fed by Site Settings. The
   partial renders nothing when no usable number is stored, so none of these
   rules ever apply on a site without WhatsApp.

   - Anchored with logical properties: right in LTR, left in RTL.
   - z-index 1025: above the page, below the offcanvas backdrop (1040).
   - The label sits on the inline-end side of the circle, which is always the
     side facing the page content, so the pill never runs off-screen.
   - Pure CSS: the anchor works before/without JavaScript.
   -------------------------------------------------------------------------- */

.sgs-wa {
    position: fixed;
    inset-inline-end: clamp(16px, 2.2vw, 30px);
    bottom: max(18px, env(safe-area-inset-bottom, 0px));
    z-index: 1025;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: var(--sgs-radius-pill);
    color: var(--sgs-white);
    background: linear-gradient(145deg, #2CDB74 0%, #25D366 48%, #17A94F 100%);
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.92),
        0 12px 26px rgba(7, 38, 80, 0.26);
    text-decoration: none;
    transition:
        transform var(--sgs-dur-fast) var(--sgs-ease-out),
        box-shadow var(--sgs-dur-fast) var(--sgs-ease-out);
}

.sgs-wa__svg {
    width: 30px;
    height: 30px;
    display: block;
}

.sgs-wa__label {
    position: absolute;
    inset-inline-end: calc(100% + 14px);
    top: 50%;
    padding: 10px 18px;
    border-radius: var(--sgs-radius-pill);
    background: var(--sgs-white);
    color: var(--sgs-primary);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: var(--sgs-shadow-float);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-50%) scale(0.94);
    transition:
        opacity var(--sgs-dur-fast) var(--sgs-ease-out),
        transform var(--sgs-dur-fast) var(--sgs-ease-out),
        visibility var(--sgs-dur-fast) linear;
}

.sgs-wa:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.92),
        0 16px 32px rgba(7, 38, 80, 0.32);
}

.sgs-wa:hover .sgs-wa__label,
.sgs-wa:focus-visible .sgs-wa__label {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.sgs-wa:focus-visible {
    outline: 3px solid var(--sgs-primary);
    outline-offset: 6px;
}

@media (max-width: 767.98px) {
    .sgs-wa {
        width: 54px;
        height: 54px;
    }

    .sgs-wa__svg {
        width: 27px;
        height: 27px;
    }

    /* Touch screens: no hover, the aria-label carries the meaning. */
    .sgs-wa__label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgs-wa,
    .sgs-wa:hover {
        transform: none;
        transition: none;
    }
}

@media print {
    .sgs-wa {
        display: none;
    }
}
