/* SAMTPI public site — shared design system.
   Builds on the brand color vars already defined in layout.php's :root
   (--primary-color, --secondary-color, --accent-color, --text-dark, --text-light). */

:root {
    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 2px 8px rgba(17, 24, 39, 0.06);
    --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.08);
    --shadow-lg: 0 20px 48px rgba(17, 24, 39, 0.14);

    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.5rem;
}

/* ---------- Typography ---------- */
h1, .display-4, .display-5, .display-6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 3rem); }
.section-title { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.25rem); }

/* ---------- Nav: glass state on scroll ---------- */
.navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.navbar-scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

/* ---------- Cards ---------- */
.card {
    border-radius: var(--radius-md);
}

.hover-up {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-up:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg) !important;
}

.transition {
    transition: all 0.3s ease;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bootstrap's .ratio utility only auto-positions its direct child. Our <picture> (for
   WebP <source> + <img> fallback) sits between .ratio and the actual <img>, so the
   image itself never gets constrained — it renders at its natural aspect ratio and
   overflows the box for any photo that isn't already ~16:9, spilling into the text
   below. Force both the wrapper and the image to fill the ratio box. */
.ratio picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.ratio picture img,
.object-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Hero slide-in text (fixes previously-undefined classes) ---------- */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUpFade 0.7s ease both;
}

.slide-up-delay {
    animation: slideUpFade 0.7s ease 0.15s both;
}

.slide-up-delay-2 {
    animation: slideUpFade 0.7s ease 0.3s both;
}

/* ---------- Back to top ---------- */
#backToTop {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1030;
    border: none;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background: var(--secondary-color);
}

/* ---------- Footer ---------- */
.footer a:hover {
    color: var(--accent-color) !important;
}

.footer .social-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.footer .social-circle:hover {
    background: var(--accent-color);
    color: #111827 !important;
    transform: translateY(-3px);
}

/* ---------- Offcanvas mobile nav ---------- */
.offcanvas .nav-link {
    padding: 0.75rem 0;
    font-weight: 500;
}
