/* ==========================================================
                RIPPLENCE SOFTWARE COMPANY WEBSITE
   ========================================================== */


/* -------------------------------------- CSS RESET -------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------------------------------- GLOBAL TYPOGRAPY --------------------------------- */

.section-title {
    letter-spacing: -0.5px;
}

h1, h2, h3 {
    font-weight: 600;
}

p {
    max-width: 70ch;
}

.section-intro {
    margin-bottom: 3.5rem;
}


/* ------------------------------------ THEME VARIABLES ------------------------------- */

/* Default: Light Theme */

:root {
    --primary-color: #0b5ed7;         /* Corporate Blue */
    --primary-dark: #06357a;

    --background-color: #ffffff;
    --surface-color: #f8f9fa;

    --text-color: #212529;
    --text-muted: #6c757d;

    --border-color: #dee2e6;

    --button-text: #ffffff;

    --card-bg: var(--surface-color);
    --bg-color: var(--background-color);

}

/* Dark Theme Overrides */

html[data-theme="dark"] {
    --primary-color: #4dabf7;
    --primary-dark: #1c7ed6;

    --background-color: #121212;
    --surface-color: #1e1e1e;

    --text-color: #f1f3f5;
    --text-muted: #adb5bd;

    --border-color: #343a40;

    --button-text: #ffffff;
}

/* ------------------------------------ THEME TOGGLE BUTTON ------------------------------- */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 1rem;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* --------------------------------- CARD HOVER (GLOBAL) ----------------------------------- */

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* ------------------------------ CARD NORMALIZATION (GLOBAL) ----------------------------------- */

.service-card,
.about-card,
.portfolio-card,
.contact-card,
.featured-card {
    max-width: 100%;
    height: 100%;
}

/* Tablet Spacing Refinement */

@media (max-width: 1024px) {
    .services-grid,
    .portfolio-grid {
        gap: 1.8rem;
    }
}

/* Tablet Spacing Refinement */

@media (max-width: 600px) {
    .service-card,
    .about-card,
    .portfolio-card {
        padding: 1.4rem;
    }
}

/* ----------------------------------- BASE STYLES --------------------------------------- */

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Container for consistent width */
.container {
    width: 92%;
    max-width: 1200px;
    margin: auto;
}

/* Container for tablet tightening */

@media (max-width: 1024px) {
    .container {
        width: 94%;
    }
}

/* ---------------------------------- SCROLL-AWARE NAVBAR -------------------------------- */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, 
                box-shadow 0.3s ease,
                backdrop-filter 0.3s ease;
}

/* State when scrolled */
.header.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(7px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Dark mode support */
[data-theme="dark"] .header.scrolled {
    background-color: rgba(18, 18, 18, 0.85);
}

.header.scrolled .nav {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

/* ------------------------------ Mobile Nav Background Blur ------------------------------ */

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 900;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Navbar must stay above overlay */
.navbar {
    z-index: 1000;
}

/* Disable overlay on desktop */
@media (min-width: 1025px) {
    .nav-overlay {
        display: none;
    }
}

/* ----------------------------------- SCROLL ANIMATIONS -------------------------------------- */

/* Initial hidden state */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

/* When visible */
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Faster variant (small items) */
.reveal.fast {
    transition-duration: 0.45s;
}

/* Slight delay utility */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }



/* -------------------------- STICKY NAVBAR + FLOATING THEME TOGGLE ----------------------------- */

/* ---------- Sticky Navbar ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

section {
    scroll-margin-top: 80px; /* adjust to navbar height */
}

/* Smooth scroll for CTA links */
html {
    scroll-behavior: smooth;
}

/* ------------------------------ Floating Theme Toggle ------------------------------- */

.floating-theme-toggle {
    position: fixed;
    right: 20px;
    z-index: 1100;
}

/* Desktop */
@media (min-width: 1025px) {
    .floating-theme-toggle {
        top: 90px; /* below navbar */
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .floating-theme-toggle {
        top: 80px; /* slightly tighter */
        right: 16px;
    }
}

/* Phones */
@media (max-width: 600px) {
    .floating-theme-toggle {
        top: 80px;
        right: 10px;
    }
}

.floating-theme-toggle button {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 0.7rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* Very Small Screens */
@media (max-width: 480px) {
    .floating-theme-toggle button {
        padding: 0.45rem 0.65rem;
        font-size: 0.9rem;
    }
}

.floating-theme-toggle button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* -------------------------------- MOBILE NAV TOGGLE ---------------------------------- */

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 992px) {

    .nav-toggle {
        display: flex;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--surface-color);
        border-top: 1px solid var(--border-color);

        flex-direction: column;
        align-items: center;
        gap: 1rem;

        padding: 1.5rem 0;

        display: none;
    }

    .navbar.active {
        display: flex;
    }

    /* Desktop navbar */
@media (min-width: 993px) {
    .navbar {
        display: flex;
        gap: 0.75rem;
        align-items: center;
    }
}

    .nav-item {
        font-size: 1rem;
        width: 90%;
        text-align: center;
    }
}


/* --------------------------------- HEADER & NAVBAR ---------------------------------- */

.header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}


.logo {
    display: flex;
    align-items: center;
    gap: 0.3rem; /* space between logo and text */
    text-decoration: none;
}

.logo-img {
    height: 36px;
    width: auto;
    max-width: 160px;
    color: var(--primary-color)
    
}

.logo-text {
    font-size: 1.0rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar {
    gap: 0.75rem;
    align-items: center;
}

/* Base nav item – mirrors .btn-secondary behavior */

.nav-item {
    display: inline-block;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;

    color: var(--primary-color);
    border: 1px solid transparent;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;
}

/* Hover = SAME LOGIC as "Our Services" */

.nav-item:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

/* Optional: active section feel (manual or JS later) */

.nav-item:active {
    transform: translateY(0);
}

/* CTA-style nav item (Contact) */

.nav-item.nav-cta {
    border: 1px solid var(--primary-color);
}

/* ---------------------------------- HERO SECTION ----------------------------------------- */

.hero {
    padding: 5rem 0 4rem;
    background: linear-gradient(
        180deg,
        rgba(0, 102, 204, 0.08),
        transparent
    );
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

/* Tablet-only adjustment */

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.2rem;
    }

    .hero h1 {
        font-size: 2.3rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero-subtext {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}
      
.hero-badge {
    display: inline-block;
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--primary-color);
}

.hero-subtext {
    font-size: 1.05rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    justify-content: center;
}

/* Default (desktop & large screens) */
.featured-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    max-width: 420px;
    text-align: left;
}

/* (Tablet only) */
@media (max-width: 1024px) {
    .featured-card {
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* (Mobile only) */
@media (max-width: 600px) {
    .featured-card {
        max-width: 100%;
        padding: 1.4rem;
    }
}


.project-tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.featured-card h3 {
    margin-bottom: 0.5rem;
}

.featured-card ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.featured-card li {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 3.5rem;
    }
}

/* --------------------------------- ABOUT SECTION ------------------------------- */

.about {
    padding: 5rem 0;
    background-color: var(--background-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

/* Left content */
.section-badge {
    display: inline-block;
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.about-content h2 {
    font-size: 2.4rem;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.about-text {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.about-text.muted {
    opacity: 0.75;
}

/* Right cards */
.about-cards {
    display: grid;
    gap: 1.5rem;
}

.about-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.8rem;
}

.about-card h3 {
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.about-card p {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* Responsive */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* Swap About layout: cards on left, text on right */
.about-content {
    order: 2;
}

.about-cards {
    order: 1;
}

/* Alignment Tablet-only) */

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .about-content,
    .about-cards {
        order: 1;
    }

    .about-cards {
        order: 2;
        text-align: left;
}

    .about-content {
        text-align: center;
    }

    .about-text,
    .about-text.muted {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

}

/* -------------------------------- SERVICES SECTION ---------------------------------- */

.services {
    padding: 4.5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    opacity: 0.85;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.service-card h3 {
    margin-bottom: 0.6rem;
}

.service-desc {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 1.2rem;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
}

.service-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------  PROCESS SECTION ---------------------------------- */

.process {
    padding: 4.5rem 0;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.process-card {
    display: grid;
    gap: unset;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
}

.process-card h3 {
    margin-bottom: 0.6rem;
}

.process-desc {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 1.2rem;
}

.process-cta {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.process-card:last-child {
    grid-column: span 2;
}



@media (max-width: 900px) {
    .process-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------- PORTFOLIO SECTION ------------------------------- */

.portfolio {
    padding: 4.5rem 0;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.portfolio-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

.portfolio-card::after {
    content: "View Project";
    position: absolute;
    inset: 0;
    background: rgba(0, 102, 204, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.portfolio-card:hover::after {
    opacity: 1;
}

.portfolio-tag {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.75rem;
    color: var(--primary-color);
}

@media (max-width: 1000px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------- FAQ SECTION ------------------------------------ */

.faq {
    padding: 5rem 0;
    background-color: var(--surface-color);
}

.faq-list {
    max-width: 800px;
    margin: 3rem auto 0;
    display: grid;
    gap: 1.2rem;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item.open {
    box-shadow: 0 16px 32px rgba(0,0,0,0.08);
}

/* Question button */
.faq-question {
    width: 100%;
    padding: 1.4rem 1.6rem;
    background: transparent;
    border: none;
    cursor: pointer;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: left;
}

.faq-question:hover {
    color: var(--primary-color);
}

/* Icon */
.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Answer */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-answer p {
    padding: 0 1.6rem 1.4rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

/* Open state */
.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

/* ------------------------------ CONTACT STYLES -------------------------------------- */

.contact {
    padding: 4.5rem 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2.5rem;
}

.contact-form {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-msg {
    color: #e63946;
    font-size: 0.75rem;
}

.form-success {
    display: none;
    margin-top: 1rem;
    padding: 14px 16px;
    border-radius: 8px;

    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;

    background: rgba(11, 94, 215, 0.08); /* derived from primary */
    color: var(--primary-color);

    border: 1px solid rgba(11, 94, 215, 0.25);

    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.form-success.visible {
    opacity: 1;
    transform: translateY(0);
}

[data-theme="dark"] .form-success {
    background: rgba(77, 171, 247, 0.14);
    border-color: rgba(77, 171, 247, 0.35);
}

.contact-side {
    display: grid;
    gap: 1.5rem;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.6rem;
    border-radius: 14px;
}

.contact-card .muted {
    opacity: 0.75;
    font-size: 0.9rem;
}

.contact-card a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-card a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact-card a:visited {
    color: var(--text-color);
}


@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

.contact-map {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.contact-map iframe {
    width: 100%;
    max-width: 1100px;
    height: 380px;
    margin: auto;
    border: 0;
    border-radius: 16px;
}

@media (max-width: 768px) {
    .contact-map iframe {
        width: 94%;
        height: 260px;
    }
}

@media (max-width: 1024px) {
    .contact-map iframe {
        width: 94%;
        height: 260px;
    }
}


/* --------------------------------- FOOTER ------------------------------- */

.site-footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 1.5rem;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

/*  Mobile-only */

@media (max-width: 600px) {
    .footer-grid {
        text-align: center;
        gap: 2rem;
    }

    .footer-text {
        margin: auto;
    }

    .footer-links ul {
        align-items: center;
    }

    .social-icons {
        justify-content: center;
    }
}

/* Brand */
.footer-logo-img {
    height: 45px;
    width: auto;
    margin-bottom: 0.3rem;
    color: var(--text-color);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.01rem;
    margin-bottom: 0.3rem;
}


.footer-brand .logo-text {
    font-size: 1.0rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    color: var(--text-color);
}


.footer-text {
    opacity: 0.8;
    max-width: 320px;
    
}

/* Links */
.footer-links h4,
.footer-contact h4 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-color);
    opacity: 0.85;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    opacity: 1;
}

/* Social Media */
.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.social-inactive {
    display: none;
}


/* Bottom bar */
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.75;
}

.footer-bottom p {
    max-width: none;
    margin: 0 auto;
}


/* Responsive */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .footer-logo {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .footer-text {
        margin-left: auto;
        margin-right: auto;
    }
}

/* -------------------------------- FORM FOCUS STATES --------------------------- */

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* Base Button */
.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

/* Secondary Button */
.btn-secondary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--button-text);
}

/* Primary Button */
.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    opacity: 1; /* DO NOT reduce opacity */
}

/* ---------------- SUBMIT BUTTON LOADING STATE ---------------- */

.btn.is-loading {
    opacity: 0.85;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.is-loading::after {
    content: "";
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* -------------------------- BUTTON MICRO-INTERACTIONS ---------------------------- */

.btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* --------------------------------- RESPONSIVE ----------------------------------- */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .nav-links {
        gap: 1rem;
    }
}

/* --------------------------------- MOTION SAFETY ---------------------------------- */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------------------------- RESPONSIVE BREAKPOINTS ------------------------- */

/* Tablets (portrait & landscape) */
@media (max-width: 1024px) {
    .hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .featured-card {
        max-width: 100%;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large phones */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.1rem;
    }

    .section-title {
        font-size: 1.9rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Small phones */
@media (max-width: 480px) {
    body {
        font-size: 0.95rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-subtext {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        text-align: center;
        width: 100%;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}

/* ---------------------- PARTICLE BACKGROUND ---------------------------- */

#particles-js {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

