/* ─── RAMRAS Technologies — Custom CSS ───────────────────────────────────── */

/* CSS Variables — defaults here; layout injects DB-overrideable :root block above this file */
:root {
    --color-accent:         #00D4B8;
    --color-accent-hover:   #00BFA8;
    --color-bg-darkest:     #050810;
    --color-bg-dark:        #070B14;
    --color-bg-medium:      #0C1221;
    --color-bg-light:       #0F1628;
    --color-bg-card:        #111827;
    --color-border:         rgba(255,255,255,0.08);
    --color-border-hover:   rgba(0,212,184,0.3);
    --color-text-primary:   #FFFFFF;
    --color-text-secondary: rgba(255,255,255,0.6);
    --color-text-muted:     rgba(255,255,255,0.4);
}

/* ─── Base ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    font-family: 'Geist', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Selection */
::selection {
    background-color: var(--color-accent);
    color: #000;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg-darkest); }
::-webkit-scrollbar-thumb { background: rgba(0,212,184,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ─── Typography ─────────────────────────────────────────────────────────── */

.hero-title {
    font-size: clamp(2.5rem, 4.5vw, 4.5rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #fff;
}
@media (min-width: 1400px) {
    .hero-title { font-size: clamp(4.5rem, 5.5vw, 7rem); }
}

.hero-word {
    display: inline-block;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px) skewY(2deg);
    animation: heroWordIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--d, 0s);
}

@keyframes heroWordIn {
    to {
        opacity: 1;
        transform: translateY(0) skewY(0deg);
    }
}

/* ─── Hero keyword — shimmer + glow ─────────────────────────────────────── */

.hero-keyword {
    /* shimmer gradient: accent → white highlight → accent */
    background: linear-gradient(
        100deg,
        #00D4B8 0%,
        #00D4B8 30%,
        #ffffff 48%,
        #a8fff5 52%,
        #00D4B8 70%,
        #00D4B8 100%
    );
    background-size: 250% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    /* start shimmer after entry animation finishes (0.18s in + 0.7s duration) */
    animation:
        heroWordIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards,
        heroShimmer 4s ease-in-out 1.5s infinite,
        heroGlow 4s ease-in-out 1.5s infinite;

    filter: drop-shadow(0 0 0px #00D4B8);
}

@keyframes heroShimmer {
    0%   { background-position: 200% center; }
    40%  { background-position: -50% center; }
    100% { background-position: -50% center; }
}

@keyframes heroGlow {
    0%   { filter: drop-shadow(0 0 0px #00D4B8); }
    30%  { filter: drop-shadow(0 0 18px rgba(0,212,184,0.7)); }
    60%  { filter: drop-shadow(0 0 4px rgba(0,212,184,0.3)); }
    100% { filter: drop-shadow(0 0 0px #00D4B8); }
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.875rem, 3vw, 2.25rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #fff;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 42rem;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: var(--color-accent);
    color: #000;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background-color 200ms, transform 150ms;
    text-decoration: none;
}
.btn-primary:hover {
    background-color: #fff;
    color: #000;
}
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: transparent;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: border-color 200ms, color 200ms;
    text-decoration: none;
}
.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    transition: border-color 300ms, transform 300ms;
}
.card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
}

/* ─── Section spacing ────────────────────────────────────────────────────── */

.section { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 1024px) { .section { padding-top: 7rem; padding-bottom: 7rem; } }

.container { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }


/* ─── Services Ticker ───────────────────────────────────────────────────── */

.services-ticker {
    position: relative;
    background: transparent;
}

/* fade edges */
.services-ticker::before,
.services-ticker::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8rem;
    z-index: 2;
    pointer-events: none;
}
.services-ticker::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg-darkest), transparent);
}
.services-ticker::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg-darkest), transparent);
}

.ticker-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: ticker 35s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.15);
    white-space: nowrap;
    transition: color 200ms;
}

.ticker-item:hover {
    color: var(--color-accent);
}

.ticker-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--color-accent);
    opacity: 0.6;
    flex-shrink: 0;
}

@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-33.333%); }
}

/* ─── Logo Wordmark ──────────────────────────────────────────────────────── */

.logo-wordmark {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    /* width is determined by the wider child (logo-primary) */
}

.logo-primary {
    display: block;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 900;
    letter-spacing: 0.72em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.logo-secondary {
    display: block;
    color: rgba(255,255,255,0.40);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    line-height: 1;
    width: 100%;
    text-align: justify;
    text-align-last: justify;
}

/* ─── Gradient text ──────────────────────────────────────────────────────── */

.gradient-text {
    background: linear-gradient(135deg, #00D4B8 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Divider line with glow ─────────────────────────────────────────────── */

.accent-line {
    width: 3rem;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(0,212,184,0.5);
    margin-bottom: 1.5rem;
}

/* ─── Form inputs ────────────────────────────────────────────────────────── */

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 200ms;
}
.form-input:focus {
    border-color: var(--color-accent);
}
.form-input::placeholder { color: rgba(255,255,255,0.3); }
.form-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.375rem;
}
.form-error {
    font-size: 0.75rem;
    color: #EF4444;
    margin-top: 0.25rem;
}

/* ─── Glow effects ───────────────────────────────────────────────────────── */

.accent-glow {
    box-shadow: 0 0 40px rgba(0,212,184,0.15);
}

/* ─── Scroll Progress Bar ────────────────────────────────────────────────── */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--color-accent);
    box-shadow: 0 0 8px rgba(0,212,184,0.6);
    z-index: 9999;
    transition: width 80ms linear;
}

/* ─── Scroll Animations ──────────────────────────────────────────────────── */

/* Initial hidden states */
[data-animate] {
    opacity: 0;
    transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1),
                transform 0.65s cubic-bezier(0.22,1,0.36,1);
    will-change: opacity, transform;
}

[data-animate="fade-up"]    { transform: translateY(40px); }
[data-animate="fade-down"]  { transform: translateY(-40px); }
[data-animate="fade-left"]  { transform: translateX(50px); }
[data-animate="fade-right"] { transform: translateX(-50px); }
[data-animate="scale-in"]   { transform: scale(0.88); }
[data-animate="flip-up"]    { transform: perspective(600px) rotateX(20deg) translateY(30px); }

/* Visible state — same for all */
.anim-visible {
    opacity: 1 !important;
    transform: none !important;
}

/* ─── Animations ─────────────────────────────────────────────────────────── */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.footer-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 200ms;
}
.footer-link:hover { color: #fff; }

.social-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: border-color 200ms, color 200ms;
}
.social-icon:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ─── Badge ──────────────────────────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.badge-accent {
    background: rgba(0,212,184,0.12);
    color: var(--color-accent);
    border: 1px solid rgba(0,212,184,0.2);
}

/* ─── Failsafe: constrain nav logo regardless of Tailwind CDN loading ─── */
nav img[alt='RAMRAS Technologies'],
header img[alt='RAMRAS Technologies'],
.logo-img {
    height: 2.5rem !important;
    width: auto !important;
    object-fit: contain !important;
    max-height: 40px !important;
}
