/* ------------------------------------------------------------------
   Mobilefunk Apps, general site styles.
   Same visual language as mobilefunk.nl (shadcn inspired, off-white).
   Pairs with Bootstrap 5.
   ------------------------------------------------------------------ */

:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --primary: 28 7% 31%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96%;
    --destructive: 0 84.2% 60.2%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 28 7% 31%;
    --radius: 0.5rem;
    --page-bg: #faf7f7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--page-bg);
    color: hsl(var(--foreground));
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1 0 auto; }

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: hsl(var(--foreground));
}
h1 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800; letter-spacing: -0.05em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.875rem); }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { font-size: 1rem; line-height: 1.7; color: hsl(var(--muted-foreground)); margin-bottom: 1rem; }
h2 a { color: inherit; text-decoration: none; }
.lead { font-size: 1.1rem; }
.lead a { color: hsl(var(--foreground)); text-decoration: underline; }

/* Sticky header --------------------------------------------------- */
.stickyheader {
    background: hsl(var(--background) / 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
    height: 80px;
    z-index: 999;
    display: flex;
    align-items: center;
}
.stickyheader .container-fluid { padding-left: 1.5rem; padding-right: 1.5rem; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { width: 200px; height: auto; }
.logo .logo-suffix {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    color: hsl(var(--muted-foreground));
    padding: 0.2rem 0.55rem;
    border: 1px solid hsl(var(--border));
    border-radius: 999px;
    background: hsl(var(--card));
    white-space: nowrap;
}
.navbar-light .navbar-nav .nav-link {
    color: hsl(var(--muted-foreground));
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.2s ease-in-out;
    margin: 0 2px;
}
.navbar-light .navbar-nav .nav-link:hover {
    color: hsl(var(--foreground));
    background-color: hsl(var(--accent));
}
.navbar-light .navbar-nav .nav-item.active > .nav-link {
    color: hsl(var(--primary));
    background-color: hsl(var(--primary) / 0.1);
}
.lang-switch { font-weight: 700 !important; letter-spacing: 0.08em; }

/* Buttons ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px -5px hsl(var(--foreground) / 0.2); }
.btn p { margin: 0; text-transform: uppercase; letter-spacing: 0.05em; color: inherit; font-size: 0.85rem; }
.btn.shad1 { background: hsl(var(--foreground)); color: #fff; box-shadow: 0 4px 6px -1px hsl(var(--foreground) / 0.25); }
.btn.shad1:hover { background: hsl(var(--foreground) / 0.85); color: #fff; }
.btn.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); border: 1px solid hsl(var(--border)); }
.btn.btn-secondary:hover { background: hsl(var(--primary) / 0.15); color: hsl(var(--secondary-foreground)); }
.button-group { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* Badge / labels --------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: calc(var(--radius) * 0.75);
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Page layout ------------------------------------------------------ */
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.page-header { text-align: center; margin: 3rem 0 3rem; }
.page-header h1 {
    background: linear-gradient(135deg, hsl(var(--foreground)), hsl(var(--muted-foreground)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}
.page-header h3 { color: hsl(var(--muted-foreground)); font-weight: 400; max-width: 800px; margin: 0 auto; font-size: 1.2rem; }

.project-section {
    border-radius: calc(var(--radius) * 2);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    padding: 3rem 2rem;
    margin: 2rem 0;
    transition: border-color 0.3s ease;
}
.project-section:hover { border-color: hsl(var(--primary) / 0.2); }

/* App cards (home + overview) -------------------------------------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.app-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.75rem;
    border-radius: calc(var(--radius) * 2);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}
.app-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--card-accent, hsl(var(--primary)));
}
.app-card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px hsl(var(--foreground) / 0.1); border-color: hsl(var(--primary) / 0.2); }
.app-card .app-icon {
    width: 72px; height: 72px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--muted));
    box-shadow: 0 6px 14px hsl(var(--foreground) / 0.08);
}
.app-card .app-icon.placeholder { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.6rem; color: #fff; }
.app-card h3 { font-size: 1.3rem; }
.app-card p { margin: 0; font-size: 0.95rem; }
.app-card .app-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: auto; }
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    padding: 0.3rem 0.7rem; border-radius: 999px;
    background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
    border: 1px solid hsl(var(--border));
}
.pill.ok { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.app-card .card-cta { font-weight: 600; color: hsl(var(--foreground)); font-size: 0.9rem; }

/* Overview list (like the project listing on mobilefunk.nl) --------- */
.image-stack { position: relative; }
.project-image {
    width: 100%;
    border-radius: calc(var(--radius) * 1.5);
    border: 1px solid hsl(var(--border));
    box-shadow: 0 10px 15px -3px hsl(var(--foreground) / 0.1);
    background: hsl(var(--muted));
    object-fit: cover;
    aspect-ratio: 1 / 1;
    max-width: 260px;
    display: block;
    margin: 0 auto;
}

/* Feature tiles ----------------------------------------------------- */
.tech-item {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: hsl(var(--muted) / 0.3);
    border: 1px solid hsl(var(--border));
    transition: all 0.3s ease;
    height: 100%;
    text-decoration: none;
    display: block;
}
.tech-item:hover { background: hsl(var(--muted) / 0.6); transform: translateY(-2px); }
.tech-item h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.tech-item p { margin: 0; font-size: 0.92rem; }

.contact-card {
    padding: 2rem 1.5rem;
    border-radius: calc(var(--radius) * 1.5);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    height: 100%;
}
.contact-card h4 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.contact-card p { font-size: 0.92rem; }

/* Forms -------------------------------------------------------------- */
.form-control, .form-select {
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    color: hsl(var(--foreground));
    background-color: hsl(var(--background));
    border: 1px solid hsl(var(--input));
    transition: all 0.2s ease-in-out;
}
.form-control:focus, .form-select:focus { border-color: hsl(var(--ring)); box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2); }
label { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; color: hsl(var(--foreground)); display: block; }
.form-group { margin-bottom: 1.25rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }
.form-alert { border-radius: var(--radius); padding: 0.9rem 1.1rem; font-size: 0.92rem; margin-bottom: 1rem; }
.form-alert.ok { background: #dcfce7; color: #166534; }
.form-alert.err { background: #fee2e2; color: #991b1b; }

/* Scroll reveal ------------------------------------------------------ */
.scrollitem {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.scrollitem.visible { opacity: 1; transform: none; }

/* Footer ------------------------------------------------------------- */
footer.site-footer {
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    color: hsl(var(--muted-foreground));
}
.site-footer .footer-heading { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; margin-bottom: 0.9rem; color: hsl(var(--foreground)); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: hsl(var(--muted-foreground)); text-decoration: none; font-weight: 500; font-size: 0.92rem; }
.site-footer a:hover { color: hsl(var(--foreground)); }
.site-footer .footer-brand img { width: 160px; }
.site-footer .footer-brand p { font-size: 0.9rem; max-width: 320px; margin-top: 0.75rem; }
.site-footer .footer-bottom { border-top: 1px solid hsl(var(--border)); margin-top: 2rem; padding-top: 1.25rem; font-size: 0.82rem; }

/* Auth (login) -------------------------------------------------------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 420px; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) * 2); padding: 2.5rem 2rem; box-shadow: 0 20px 25px -5px hsl(var(--foreground) / 0.08); }
.auth-card .logo img { width: 170px; }
#infoMessage:empty { display: none; }
#infoMessage { border-radius: var(--radius); background: #fee2e2; color: #991b1b; padding: 0.75rem 1rem; font-size: 0.9rem; margin-bottom: 1rem; }
#infoMessage p { margin: 0; color: inherit; }

/* Responsive ---------------------------------------------------------- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 80px;
        right: 0;
        width: 100%;
        padding: 1rem 1.5rem;
        background: hsl(var(--background) / 0.97);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid hsl(var(--border));
        box-shadow: 0 10px 15px -3px hsl(var(--foreground) / 0.1);
        z-index: 998;
    }
    .navbar-nav { align-items: flex-end; }
}
@media (max-width: 767.98px) {
    .stickyheader { height: 64px; }
    .logo img { width: 140px; }
    .logo .logo-suffix { display: none; }
    .navbar-collapse { top: 64px; }
    .project-section { padding: 2rem 1.25rem; margin: 1.5rem 0; }
    .page-header { margin: 2rem 0; }
}
