/* ============================================================
   support4u.gr — shared site styles & design tokens
   One source for every page. Component classes, tokens, and
   interaction styles previously inlined in each page's <style>.

   Color utility classes (bg-brand-red, text-navy-600, ...) come
   from assets/js/tailwind-config.js — keep the hex values below
   in sync with that file.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
    --brand-red: #dc431b;
    --brand-red-dark: #b83515;

    --navy-950: #020617;
    --navy-900: #0F172A;
    --navy-800: #1E293B;
    --navy-700: #334155;
    --navy-600: #475569;
    --navy-500: #64748B;
    --navy-400: #94A3B8;
    --navy-300: #CBD5E1;
    --navy-200: #E2E8F0;
    --navy-100: #F1F5F9;
    --navy-50:  #F8FAFC;

    --font-sans: 'Source Sans 3', system-ui, sans-serif;
    --font-display: 'Manrope', 'Source Sans 3', system-ui, sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

    /* Semantic z-index scale — no arbitrary 999s */
    --z-sticky: 100;
    --z-menu-overlay: 998;
    --z-menu: 999;
    --z-modal-overlay: 1000;
    --z-modal: 1001;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--navy-900);
    background: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

a, button { touch-action: manipulation; }
* { -webkit-tap-highlight-color: transparent; }

:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Type helpers ---------- */
.display-tracking { letter-spacing: -0.025em; }
.stat-number { font-variant-numeric: tabular-nums; }

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-red);
}

/* ---------- Decorative ---------- */
.grid-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
}

.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--navy-200), transparent);
}

@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(30px, -50px) scale(1.1); }
    66%      { transform: translate(-20px, 20px) scale(0.9); }
}
.animate-blob { animation: blob 7s infinite; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* ---------- Buttons ---------- */
.btn-primary {
    background: var(--brand-red);
    color: #fff;
    font-weight: 700;
    transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
    box-shadow: 0 4px 14px -4px rgba(220, 67, 27, 0.5);
}
.btn-primary:hover {
    background: var(--brand-red-dark);
    box-shadow: 0 8px 24px -6px rgba(220, 67, 27, 0.55);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #fff;
    color: var(--navy-900);
    border: 1px solid var(--navy-200);
    font-weight: 700;
    transition: all 200ms ease;
}
.btn-secondary:hover {
    border-color: var(--navy-900);
    transform: translateY(-1px);
}

.btn-ghost-dark {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    transition: all 200ms ease;
}
.btn-ghost-dark:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ---------- Form inputs ---------- */
.input-enterprise {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--navy-300);
    background: #fff;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--navy-900);
    transition: all 200ms ease;
}
.input-enterprise:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(220, 67, 27, 0.12);
}
.input-enterprise::placeholder { color: var(--navy-400); font-weight: 400; }

/* ---------- Cards ---------- */
.card-hover {
    transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out), border-color 250ms ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.12);
    border-color: var(--brand-red);
}

/* ---------- Reveal on scroll ----------
   Progressive enhancement: content is visible by default so it
   never ships blank to no-JS clients, scrapers, or print. The
   inline `document.documentElement.classList.add('js')` in each
   page head opts JS-capable browsers into the entrance animation
   before first paint (no flash). */
.reveal { opacity: 1; }
html.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 650ms var(--ease-out-quint), transform 650ms var(--ease-out-quint);
}
html.js .reveal.visible { opacity: 1; transform: translateY(0); }

/* Signature hero entrance — orchestrated once on load, not on scroll.
   Children animate in sequence; JS-gated so no-JS clients see them immediately. */
@keyframes hero-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
html.js .hero-in > * { animation: hero-rise 700ms var(--ease-out-expo) both; }
html.js .hero-in > *:nth-child(1) { animation-delay: 60ms; }
html.js .hero-in > *:nth-child(2) { animation-delay: 150ms; }
html.js .hero-in > *:nth-child(3) { animation-delay: 240ms; }
html.js .hero-in > *:nth-child(4) { animation-delay: 330ms; }

/* ---------- Form messages ---------- */
.form-message {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    animation: slideDown 0.3s ease-out;
}
.form-message.success { background-color: #d1fae5; border: 1px solid #10b981; color: #065f46; }
.form-message.error   { background-color: #fee2e2; border: 1px solid #ef4444; color: #991b1b; }
.form-message.hidden  { display: none; }
.form-message svg { flex-shrink: 0; width: 1.25rem; height: 1.25rem; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Form validation ---------- */
.input-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.field-error {
    color: #b91c1c;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-top: 6px;
}

/* Honeypot spam trap — off-screen for humans, fillable by bots */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ---------- Mobile menu ---------- */
#mobile-menu-overlay {
    position: fixed; inset: 0;
    background-color: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(4px);
    z-index: var(--z-menu-overlay);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#mobile-menu-overlay.active { opacity: 1; visibility: visible; }

#mobile-menu {
    position: fixed; top: 0; right: 0;
    width: 88%; max-width: 420px; height: 100vh;
    background-color: #fff;
    z-index: var(--z-menu);
    transform: translateX(100%);
    transition: transform 0.32s var(--ease-out);
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
}
#mobile-menu.active { transform: translateX(0); }
body.menu-open { overflow: hidden; }

/* ---------- Contact modal ---------- */
#contact-modal-overlay {
    position: fixed; inset: 0;
    background-color: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
    z-index: var(--z-modal-overlay);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#contact-modal-overlay.active { opacity: 1; visibility: visible; }

#contact-modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: 92%; max-width: 640px;
    background-color: #fff;
    z-index: var(--z-modal);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    max-height: 92vh; overflow-y: auto;
}
#contact-modal.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
body.modal-open { overflow: hidden; }

/* ---------- Back to top ---------- */
#back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 48px; height: 48px;
    background-color: var(--brand-red);
    color: #fff; border: none; border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: var(--z-sticky);
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(220, 67, 27, 0.4);
}
#back-to-top.visible { opacity: 1; visibility: visible; }
#back-to-top:hover { background-color: var(--brand-red-dark); transform: translateY(-3px); }
#back-to-top:active { transform: translateY(-1px); }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 640px) {
    button, a[role="button"], .btn { min-height: 44px; min-width: 44px; }
    body { overflow-x: hidden; }
    img { max-width: 100%; height: auto; }
    input[type="text"], input[type="email"], input[type="tel"], textarea { font-size: 16px; }

    #contact-modal { width: 95%; max-height: 95vh; border-radius: var(--radius-md); }
    #back-to-top { bottom: 20px; right: 20px; width: 44px; height: 44px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    html.js .reveal { opacity: 1; transform: none; }
    .animate-blob { animation: none; }
}
