/* ================================================================
   TrendIngine.com — Production Holding Stylesheet
   Stylesheet: css/style.css
   Theme: Global Search Intelligence & Historical Trends Archive
   Multilingual & RTL Ready
   ================================================================ */

/* ── Custom Properties ─────────────────────────────────────────── */
:root {
    /* Brand Colors derived from TrendIngine Orange & Amber Gradient */
    --brand-coral:      #ff781f;
    --brand-crimson:    #f55d00;
    --brand-red:        #d84315;
    --brand-burgundy:   #bf360c;
    --brand-dark:       #2d1600;
    --brand-gradient:   linear-gradient(135deg, #f55d00 0%, #f79800 100%);
    --brand-gradient-h: linear-gradient(90deg, #f55d00 0%, #f79800 100%);
    --brand-muted:      rgba(245, 93, 0, 0.08);
    --brand-border:     rgba(245, 93, 0, 0.22);
    --brand-glow:       rgba(245, 93, 0, 0.28);

    /* Neutrals & Surfaces */
    --gray-page:        #eef2f6;
    --gray-surface:     #f8fafc;
    --gray-line:        #d2d7df;
    --gray-line-subtle: #e5e9f0;
    --white:            #ffffff;

    /* Typography / Ink */
    --ink-primary:      #0f172a;
    --ink-body:         #334155;
    --ink-muted:        #64748b;
    --font-main:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Radii & Shadows */
    --radius-card:      14px;
    --radius-md:        8px;
    --radius-sm:        6px;
    --shadow-card:      0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 16px 32px -4px rgba(15, 23, 42, 0.10);
    --shadow-glow:      0 0 24px rgba(245, 93, 0, 0.16);
    --transition:       0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ── Base ──────────────────────────────────────────────────────── */
html, body {
    min-height: 100%;
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.6;
    background-color: var(--gray-page);
    background-image: 
        radial-gradient(at 0% 0%, rgba(245, 93, 0, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(247, 152, 0, 0.07) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(255, 255, 255, 0.8) 0px, transparent 100%);
    background-attachment: fixed;
    color: var(--ink-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Page Shell ────────────────────────────────────────────────── */
.shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

/* ── Main Card (Gradient Top Border with Preserved Border Radius) ── */
.card {
    width: 100%;
    max-width: 860px;
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(210, 215, 223, 0.8);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.45s ease-out;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--brand-gradient-h);
    z-index: 10;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Top Bar ───────────────────────────────────────────────────── */
.top-bar {
    display: flex;
    flex-direction: column;
    padding: 18px 32px 14px;
    border-bottom: 1px solid var(--gray-line-subtle);
    background: var(--white);
    gap: 12px;
}

.top-bar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

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

.logo-wrap a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity var(--transition), transform var(--transition);
}

.logo-wrap a:hover,
.logo-wrap a:focus {
    opacity: 0.88;
    transform: translateY(-0.5px);
}

.logo-wrap img {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-muted);
    border: 1px solid var(--brand-border);
    color: var(--brand-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    box-shadow: 0 1px 3px rgba(230, 57, 70, 0.08);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-crimson);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.45);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 0 5px rgba(230, 57, 70, 0);
    }
}

/* ── Language Bar (Inside Card Top Bar) ─────────────────────────── */
.lang-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 8px;
    font-size: 11px;
    color: var(--ink-muted);
    padding-top: 10px;
    border-top: 1px dashed var(--gray-line-subtle);
    line-height: 1.4;
}

.lang-bar-title {
    font-weight: 700;
    color: var(--ink-primary);
    margin-right: 4px;
}

.lang-nav {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px 6px;
}

.lang-link {
    color: var(--ink-body);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11.5px;
    transition: color var(--transition), background var(--transition);
}

.lang-link:hover {
    color: var(--brand-crimson);
    background: var(--brand-muted);
}

.lang-link.active {
    color: var(--brand-crimson);
    font-weight: 700;
    background: var(--brand-muted);
    border: 1px solid var(--brand-border);
}

.lang-sep {
    color: var(--gray-line);
    font-size: 10px;
    user-select: none;
}

/* ── Two-Column Body ───────────────────────────────────────────── */
.body {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
}

.col-left {
    padding: 30px 32px;
    border-right: 1px solid var(--gray-line-subtle);
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--white);
}

.col-right {
    padding: 30px 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    background: var(--gray-surface);
}

/* ── Heading & Descriptions ────────────────────────────────────── */
.hero-heading {
    font-size: clamp(22px, 3.2vw, 29px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.025em;
    color: var(--ink-primary);
}

.hero-heading .accent,
.error-title .accent {
    background: var(--brand-gradient-h);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--ink-muted);
    padding-left: 14px;
    border-left: 3px solid var(--brand-coral);
}

/* ── Countdown ─────────────────────────────────────────────────── */
.countdown-wrap {
    display: flex;
    flex-direction: column;
}

.countdown-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.countdown-row {
    display: flex;
    gap: 10px;
}

.count-block {
    flex: 1;
    text-align: center;
    background: var(--gray-surface);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius-md);
    padding: 12px 6px 10px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.count-block:hover {
    border-color: var(--brand-border);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.count-num {
    display: block;
    font-size: clamp(26px, 3.8vw, 34px);
    font-weight: 800;
    color: var(--brand-red);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    transition: transform 0.15s ease, color 0.15s ease;
}

.count-block.flip .count-num {
    transform: scale(1.08);
    color: var(--brand-crimson);
}

.count-unit {
    display: block;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-top: 6px;
    font-weight: 600;
}

/* ── Progress ──────────────────────────────────────────────────── */
.progress-wrap {
    display: flex;
    flex-direction: column;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--ink-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.progress-track {
    height: 6px;
    background: var(--gray-line);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--brand-gradient-h);
    border-radius: 100px;
    box-shadow: 0 0 10px var(--brand-glow);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Right Column: Info Blocks ─────────────────────────────────── */
.info-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-primary);
    padding-bottom: 9px;
    border-bottom: 1px solid var(--gray-line);
}

.info-section-icon {
    font-size: 15px;
    line-height: 1;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 12px;
}

.info-list li {
    font-size: 12.5px;
    color: var(--ink-body);
    padding-left: 16px;
    position: relative;
    line-height: 1.55;
}

.info-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand-crimson);
}

.info-list li strong {
    color: var(--ink-primary);
    font-weight: 600;
}

/* ── 404 Error Page Components ─────────────────────────────────── */
.error-code {
    font-size: clamp(64px, 12vw, 96px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: var(--brand-gradient-h);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
    position: relative;
    display: inline-block;
    animation: glitch 6s ease-in-out infinite;
}

.error-code::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background: var(--brand-gradient-h);
    border-radius: 100px;
}

.error-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.error-ring::before {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 14px;
    border: 1.5px dashed rgba(230, 57, 70, 0.25);
    animation: spin-ring 20s linear infinite;
}

@keyframes spin-ring {
    to { transform: rotate(360deg); }
}

@keyframes glitch {
    0%, 90%, 100% { transform: none; }
    92%  { transform: skewX(-2deg); }
    94%  { transform: skewX(2deg); }
    96%  { transform: none; }
}

.error-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-top: 14px;
}

.error-title {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 800;
    color: var(--ink-primary);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.error-divider {
    width: 44px;
    height: 3px;
    background: var(--brand-gradient-h);
    border-radius: 100px;
}

.quick-links-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 10px;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 15px;
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--ink-primary);
    font-size: 13px;
    font-weight: 500;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
}

.quick-link:hover,
.quick-link:focus {
    border-color: var(--brand-border);
    box-shadow: 0 3px 10px rgba(230, 57, 70, 0.12);
    background: #fff8f8;
    transform: translateX(2px);
    outline: none;
}

.quick-link:focus-visible {
    outline: 2px solid var(--brand-coral);
    outline-offset: 2px;
}

.quick-link-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}

.quick-link-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-link-text span:first-child { font-weight: 600; color: var(--ink-primary); }
.quick-link-text span:last-child  { font-size: 11.5px; color: var(--ink-muted); }

.quick-link-arrow {
    margin-left: auto;
    color: var(--ink-muted);
    font-size: 14px;
    transition: transform var(--transition), color var(--transition);
}

.quick-link:hover .quick-link-arrow {
    transform: translateX(4px);
    color: var(--brand-crimson);
}

/* ── Bottom Bar ────────────────────────────────────────────────── */
.bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-top: 1px solid var(--gray-line-subtle);
    background: #f1f4f8;
    flex-wrap: wrap;
    gap: 14px;
}

.security-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 490px;
}

.security-note .lock-icon {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--brand-burgundy);
}

.security-note p {
    font-size: 11.5px;
    color: var(--ink-muted);
    line-height: 1.55;
}

.security-note strong {
    color: var(--brand-burgundy);
    font-weight: 700;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-gradient);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.28);
}

.contact-btn:hover,
.contact-btn:focus {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(192, 57, 43, 0.38);
    outline: none;
}

.contact-btn:focus-visible {
    outline: 2px solid var(--brand-coral);
    outline-offset: 3px;
}

/* ── Footer ────────────────────────────────────────────────────── */
.page-footer {
    font-size: 11px;
    color: #838e9e;
    text-align: center;
    margin-top: 16px;
    letter-spacing: 0.01em;
}

/* ── RTL Support for Arabic ────────────────────────────────────── */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .hero-desc {
    padding-left: 0;
    padding-right: 14px;
    border-left: none;
    border-right: 3px solid var(--brand-coral);
}

[dir="rtl"] .col-left {
    border-right: none;
    border-left: 1px solid var(--gray-line-subtle);
}

[dir="rtl"] .info-list li {
    padding-left: 0;
    padding-right: 16px;
}

[dir="rtl"] .info-list li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .quick-link:hover {
    transform: translateX(-2px);
}

[dir="rtl"] .quick-link-arrow {
    margin-left: 0;
    margin-right: auto;
    transform: rotate(180deg);
}

[dir="rtl"] .quick-link:hover .quick-link-arrow {
    transform: rotate(180deg) translateX(-4px);
}

[dir="rtl"] .lang-bar-title {
    margin-right: 0;
    margin-left: 4px;
}

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

/* ── Responsive: Mobile & Tablet ───────────────────────────────── */
@media (max-width: 740px) {
    .shell {
        padding: 20px 12px;
        justify-content: flex-start;
    }
    .top-bar {
        padding: 14px 16px;
    }
    .body {
        grid-template-columns: 1fr;
    }
    .col-left {
        border-right: none;
        border-bottom: 1px solid var(--gray-line-subtle);
        padding: 24px 20px;
    }
    [dir="rtl"] .col-left {
        border-left: none;
        border-bottom: 1px solid var(--gray-line-subtle);
    }
    .col-right {
        padding: 24px 20px;
    }
    .bottom-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px;
    }
    .contact-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    .error-ring::before {
        display: none;
    }
    .lang-bar {
        font-size: 10.5px;
        gap: 4px 6px;
    }
}
