/* ==========================================================================
   Cipher Marketing — Design System
   Editorial, photography-forward, clean & premium.
   ========================================================================== */

:root {
    /* Backgrounds */
    --bg: #FFFFFF;
    --bg-soft: #F7F6FB;
    --bg-dark: #140B29; /* deep violet-ink */

    /* Text */
    --ink: #1A1330;      /* headings */
    --body: #5A5470;     /* body text */
    --muted: #6E6885;    /* muted */
    --border: #ECE9F5;   /* borders */

    /* Brand */
    --brand: #6D5DF5;
    --brand-2: #A855F7;
    --pink: #F472B6;
    --gradient: linear-gradient(135deg, #6D5DF5, #A855F7);
    --gradient-warm: linear-gradient(135deg, #6D5DF5, #A855F7 55%, #F472B6);

    /* Radius */
    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 28px;
    --r-pill: 999px;

    /* Shadows */
    --shadow: 0 18px 50px rgba(45, 20, 90, .10);
    --shadow-sm: 0 2px 10px rgba(45, 20, 90, .06);
    --shadow-lg: 0 30px 70px rgba(45, 20, 90, .18);

    /* Layout */
    --section-pad: clamp(64px, 9vw, 120px);
    --container: 1200px;
    --gutter: 24px;

    /* Motion */
    --ease: cubic-bezier(.2, .7, .2, 1);
    --t-fast: 150ms var(--ease);
    --t: 200ms var(--ease);
    --t-slow: 250ms var(--ease);
}

/* ----------------------------- Reset / Base ------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 86px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--body);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 700;
}

::selection {
    background: rgba(109, 93, 245, .18);
    color: var(--ink);
}

:focus-visible {
    outline: 3px solid rgba(109, 93, 245, .5);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ------------------------------- Layout ---------------------------------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    width: 100%;
}

section {
    position: relative;
}

/* Most sections get vertical rhythm (hero handles its own) */
.about-section,
.team-section,
.services-section,
.portfolio-section,
.clients-section,
.contact-section {
    padding: var(--section-pad) 0;
}

.about-section { background: var(--bg); }
.team-section { background: var(--bg-soft); }
.services-section { background: var(--bg); }
.portfolio-section { background: var(--bg-soft); }
.clients-section { background: var(--bg); }

/* ---------------------- Scroll-reveal (JS: .section-visible) ------------- */
/* Base state is VISIBLE so content never gets stuck if JS fails to run.
   We only animate a gentle entrance when JS marks the section visible. */
section {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    html.js .about-section:not(.section-visible),
    html.js .team-section:not(.section-visible),
    html.js .services-section:not(.section-visible),
    html.js .portfolio-section:not(.section-visible),
    html.js .clients-section:not(.section-visible),
    html.js .contact-section:not(.section-visible) {
        opacity: 0;
        transform: translateY(24px);
    }

    .about-section,
    .team-section,
    .services-section,
    .portfolio-section,
    .clients-section,
    .contact-section {
        transition: opacity .7s var(--ease), transform .7s var(--ease);
    }

    .section-visible {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --------------------------- Section Header ------------------------------ */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(40px, 6vw, 64px);
}

.section-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand);
    background: rgba(109, 93, 245, .08);
    border: 1px solid rgba(109, 93, 245, .16);
    padding: 7px 16px;
    border-radius: var(--r-pill);
    margin-bottom: 20px;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    color: var(--ink);
    letter-spacing: -0.015em;
    line-height: 1.08;
}

.section-subtitle {
    margin: 18px auto 0;
    max-width: 640px;
    color: var(--muted);
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    line-height: 1.7;
}

/* ------------------------------- Buttons --------------------------------- */
.cta-primary,
.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    background: var(--gradient);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 15px 30px;
    border: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(109, 93, 245, .32);
    transition: transform var(--t), box-shadow var(--t), filter var(--t);
}

.cta-primary:hover,
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(109, 93, 245, .42);
    filter: brightness(1.04);
}

.cta-primary:active,
.submit-btn:active {
    transform: translateY(0);
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    color: var(--ink);
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 28px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.cta-secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(109, 93, 245, .4);
    box-shadow: var(--shadow);
}

.cta-secondary i {
    color: var(--brand);
}

/* ------------------------------- Navbar ---------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .8);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background var(--t), box-shadow var(--t), border-color var(--t);
}

/* JS toggles .scrolled / sets inline bg+shadow; mirror a refined scrolled look */
.navbar.scrolled,
.navbar.active {
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 6px 24px rgba(45, 20, 90, .08);
}

.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--brand);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu li { display: flex; }

.nav-link {
    position: relative;
    display: inline-block;
    padding: 10px 16px;
    font-size: .95rem;
    font-weight: 500;
    color: var(--body);
    border-radius: var(--r-pill);
    transition: color var(--t), background var(--t);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t);
}

.nav-link:hover {
    color: var(--ink);
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    cursor: pointer;
    background: none;
    border: none;
    border-radius: var(--r-sm);
    transition: background var(--t);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform var(--t), opacity var(--t);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ------------------------------- Hero ------------------------------------ */
.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: clamp(40px, 5vw, 80px);
    max-width: var(--container);
    margin: 0 auto;
    padding: 140px var(--gutter) 90px;
    overflow: visible;
}

.hero-background {
    position: absolute;
    inset: -10% -20% 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60% 50% at 80% 0%, rgba(168, 85, 247, .16), transparent 60%),
        radial-gradient(55% 55% at 10% 25%, rgba(109, 93, 245, .14), transparent 60%),
        radial-gradient(45% 45% at 60% 90%, rgba(244, 114, 182, .10), transparent 60%);
}

.floating-elements {
    position: absolute;
    inset: 0;
}

.float-item {
    position: absolute;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    opacity: .55;
    filter: drop-shadow(0 8px 16px rgba(45, 20, 90, .12));
    animation: float var(--duration, 7s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.float-item:nth-child(1) { top: 14%; left: 6%; }
.float-item:nth-child(2) { top: 24%; right: 8%; }
.float-item:nth-child(3) { top: 62%; left: 10%; }
.float-item:nth-child(4) { bottom: 14%; right: 14%; }
.float-item:nth-child(5) { top: 46%; right: 4%; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(6deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--brand);
    background: rgba(109, 93, 245, .08);
    border: 1px solid rgba(109, 93, 245, .16);
    padding: 8px 16px;
    border-radius: var(--r-pill);
    margin-bottom: 26px;
}

.hero-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(109, 93, 245, .18);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.hero-title .highlight {
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--brand);
}

.hero-subtitle {
    max-width: 560px;
    color: var(--body);
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.75;
    margin-bottom: 36px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 52px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(24px, 5vw, 56px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--brand);
}

.stat-label {
    font-size: .9rem;
    font-weight: 500;
    color: var(--muted);
}

/* Hero visual / profile card */
.hero-visual {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.profile-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, .8);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    transition: transform var(--t-slow), box-shadow var(--t-slow);
}

.profile-card:hover {
    transform: translateY(-6px);
}

.profile-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 24px;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-ring {
    position: absolute;
    inset: -6px;
    border-radius: calc(var(--r-md) + 6px);
    padding: 3px;
    background: var(--gradient-warm);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.profile-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.profile-info > p {
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 18px;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-badges .badge {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--brand);
    background: rgba(109, 93, 245, .08);
    border: 1px solid rgba(109, 93, 245, .14);
    padding: 6px 12px;
    border-radius: var(--r-pill);
}

/* ------------------------------- About ----------------------------------- */
.about-content {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: clamp(40px, 5vw, 72px);
    align-items: start;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.text-block h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    position: relative;
    padding-left: 18px;
}

.text-block h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 4px;
    background: var(--gradient);
}

.text-block p {
    color: var(--body);
    line-height: 1.75;
}

.about-visual {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.experience-card,
.contact-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-slow), box-shadow var(--t-slow);
}

.experience-card:hover,
.about-visual .contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.card-header i {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: var(--r-sm);
    background: var(--gradient);
    color: #fff;
    font-size: 1.2rem;
}

.card-header h4 {
    font-size: 1.2rem;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.experience-list li {
    color: var(--body);
    padding-left: 26px;
    position: relative;
    line-height: 1.5;
}

.experience-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--brand);
    font-weight: 700;
}

.highlight {
    font-weight: 700;
    color: var(--brand);
}

.about-visual .contact-card h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-links .contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--body);
    font-weight: 500;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    transition: background var(--t), color var(--t), transform var(--t);
}

.contact-links .contact-link i {
    color: var(--brand);
    width: 20px;
    text-align: center;
}

.contact-links .contact-link:hover {
    background: var(--bg-soft);
    color: var(--ink);
    transform: translateX(2px);
}

/* ------------------------------- Team ------------------------------------ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.team-member {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-slow), box-shadow var(--t-slow);
}

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

.member-image {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}

.team-member:hover .member-image img {
    transform: scale(1.05);
}

.member-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(to top, rgba(20, 11, 41, .78), rgba(20, 11, 41, .1) 55%, transparent);
    opacity: 0;
    transition: opacity var(--t-slow);
}

.team-member:hover .member-overlay {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    font-size: 1.05rem;
    transition: background var(--t), transform var(--t);
}

.social-link:hover {
    background: var(--brand);
    transform: translateY(-3px);
}

.member-info {
    padding: 28px;
}

.member-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.member-role {
    color: var(--brand);
    font-weight: 600;
    font-size: .95rem;
}

.member-org {
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 20px;
}

.member-highlights {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--body);
    font-size: .92rem;
}

.highlight-item i {
    color: var(--brand);
    width: 18px;
    text-align: center;
}

.member-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.skill-tag {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--brand);
    background: rgba(109, 93, 245, .08);
    border: 1px solid rgba(109, 93, 245, .14);
    padding: 6px 12px;
    border-radius: var(--r-pill);
}

.member-experience,
.member-education {
    margin-top: 18px;
}

.member-experience h4,
.member-education h4 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    margin-bottom: 10px;
}

.member-experience ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-experience li {
    color: var(--body);
    font-size: .92rem;
    line-height: 1.5;
    padding-left: 16px;
    position: relative;
}

.member-experience li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.member-experience strong,
.member-education strong {
    color: var(--ink);
    font-weight: 600;
}

.member-education p {
    color: var(--body);
    font-size: .92rem;
    line-height: 1.6;
}

/* ------------------------------ Services --------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.service-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t-slow);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(109, 93, 245, .28);
}

.service-card.premium {
    border-color: rgba(109, 93, 245, .22);
    box-shadow: var(--shadow);
}

.service-card.premium::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 4px;
    background: var(--gradient);
    margin-bottom: 22px;
}

.service-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: var(--r-md);
    background: var(--gradient);
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 22px;
    box-shadow: 0 10px 24px rgba(109, 93, 245, .28);
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.service-card > p {
    color: var(--body);
    line-height: 1.7;
    margin-bottom: 22px;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.service-features li {
    position: relative;
    padding-left: 28px;
    color: var(--body);
    font-size: .95rem;
}

.service-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(109, 93, 245, .1);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
}

.service-price {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: .95rem;
    color: var(--brand);
    background: rgba(109, 93, 245, .07);
    border: 1px solid rgba(109, 93, 245, .18);
    padding: 11px 20px;
    border-radius: var(--r-pill);
    transition: background var(--t), color var(--t), border-color var(--t);
}

.service-card:hover .service-price {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

/* ------------------------------ Portfolio -------------------------------- */
.portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.filter-btn {
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    color: var(--body);
    background: #fff;
    border: 1px solid var(--border);
    padding: 11px 22px;
    border-radius: var(--r-pill);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: color var(--t), background var(--t), transform var(--t), box-shadow var(--t), border-color var(--t);
}

.filter-btn:hover {
    transform: translateY(-2px);
    color: var(--ink);
    border-color: rgba(109, 93, 245, .35);
}

.filter-btn.active {
    color: #fff;
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(109, 93, 245, .3);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.portfolio-item {
    border-radius: var(--r-md);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
    /* JS controls transform on hover & opacity; keep transition smooth */
    transition: transform var(--t-slow), box-shadow var(--t-slow);
    cursor: pointer;
}

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

.portfolio-item.hidden {
    display: none;
}

.portfolio-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--r-md);
    background: var(--bg-soft);
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.06);
}

.portfolio-image iframe,
.portfolio-image video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
    background: #000;
    display: block;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    padding: 22px;
    background: linear-gradient(to top, rgba(20, 11, 41, .85), rgba(20, 11, 41, .18) 55%, transparent);
    opacity: 0;
    transition: opacity var(--t-slow);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-info h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.portfolio-info p {
    color: rgba(255, 255, 255, .82);
    font-size: .9rem;
    margin-bottom: 10px;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portfolio-tags span {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .03em;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, .26);
    padding: 4px 10px;
    border-radius: var(--r-pill);
}

.portfolio-actions {
    display: flex;
    gap: 10px;
}

.portfolio-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    font-size: .95rem;
    cursor: pointer;
    transition: background var(--t), transform var(--t), color var(--t);
}

.portfolio-btn:hover {
    background: var(--brand);
    transform: translateY(-2px);
}

.portfolio-btn.liked {
    color: var(--pink) !important;
    background: rgba(255, 255, 255, .92);
    border-color: rgba(255, 255, 255, .6);
}

/* Video / iframe items: use a wider native ratio so controls sit nicely */
.portfolio-item[data-category="videography"] .portfolio-image {
    aspect-ratio: 16 / 9;
}

.portfolio-item:has(video) .portfolio-image,
.portfolio-item:has(iframe) .portfolio-image {
    aspect-ratio: 16 / 9;
}

/* ------------------------------ Clients ---------------------------------- */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.client-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 36px 28px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t-slow);
}

.client-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(109, 93, 245, .25);
}

.client-logo-img {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
}

.client-logo-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1);
    opacity: .72;
    transition: filter var(--t-slow), opacity var(--t-slow), transform var(--t-slow);
}

.client-card:hover .client-logo-img img {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.04);
}

.client-card h4 {
    font-size: 1.15rem;
}

.client-card p {
    color: var(--muted);
    font-size: .9rem;
}

/* ------------------------------ Contact ---------------------------------- */
.contact-section {
    background: var(--bg-soft);
}

.contact-content {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: clamp(32px, 4vw, 56px);
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info .contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-slow), box-shadow var(--t-slow);
}

.contact-info .contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.contact-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: var(--r-sm);
    background: var(--gradient);
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.contact-info .contact-card h4 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.contact-info .contact-card p {
    color: var(--body);
    margin-bottom: 14px;
}

.contact-info .contact-link {
    font-weight: 600;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--t);
}

.contact-info .contact-link::after {
    content: "\2192";
    transition: transform var(--t);
}

.contact-info .contact-link:hover {
    color: var(--brand-2);
}

.contact-info .contact-link:hover::after {
    transform: translateX(4px);
}

/* Form */
.contact-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: clamp(28px, 4vw, 44px);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 18px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 15px 18px;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--muted);
}

.contact-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238B85A0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
    cursor: pointer;
}

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

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(109, 93, 245, .14);
}

.submit-btn {
    width: 100%;
    margin-top: 6px;
}

/* ------------------------------- Footer ---------------------------------- */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, .72);
    padding: clamp(56px, 7vw, 80px) 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 12px;
}

.footer-brand p {
    color: rgba(255, 255, 255, .6);
    max-width: 320px;
}

.footer-links h4,
.footer-contact h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 18px;
    letter-spacing: .01em;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, .68);
    transition: color var(--t), padding-left var(--t);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-contact p {
    color: rgba(255, 255, 255, .68);
    margin-bottom: 10px;
}

.footer-bottom {
    padding-top: 28px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, .5);
    font-size: .9rem;
}

/* ------------------------------ Responsive ------------------------------- */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
        min-height: auto;
        padding-top: 120px;
    }

    .hero-badge,
    .hero-cta,
    .hero-stats {
        justify-content: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    /* Mobile nav: off-canvas dropdown panel */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px var(--gutter) 24px;
        background: rgba(255, 255, 255, .98);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 20px 40px rgba(45, 20, 90, .12);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity var(--t), transform var(--t), visibility var(--t);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 14px 16px;
        font-size: 1.05rem;
        border-radius: var(--r-sm);
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        background: var(--bg-soft);
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 28px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: left;
    }
}

@media (max-width: 520px) {
    .nav-container {
        height: 64px;
    }

    .nav-menu {
        top: 64px;
    }

    .hero {
        padding: 104px 18px 70px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .cta-primary,
    .cta-secondary {
        width: 100%;
    }

    .hero-stats {
        justify-content: space-between;
        gap: 16px;
    }

    .stat-item {
        align-items: center;
        flex: 1;
    }

    .services-grid,
    .portfolio-grid,
    .clients-grid {
        grid-template-columns: 1fr;
    }

    .service-card,
    .member-info,
    .experience-card,
    .contact-form,
    .contact-info .contact-card {
        padding: 26px 22px;
    }

    .profile-card {
        padding: 20px;
    }

    .portfolio-filter {
        gap: 8px;
    }

    .filter-btn {
        padding: 9px 16px;
        font-size: .88rem;
    }
}

/* --------------------------- Reduced motion ------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    .float-item {
        animation: none;
    }
}
