/* =========================================================================
   Fone Xcellence — Design System (v2: light background, glossy black type,
   red accents — matches: "red color, glossy black text, overall")
   Type:     Sora (display/headlines) + Inter (body/UI)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* ---- Color tokens ---- */
    --fx-red:            #E5231B;
    --fx-red-dark:       #9E120C;
    --fx-red-glow:       rgba(229, 35, 27, 0.35);

    --fx-ink:            #101012;   /* primary "glossy black" text */
    --fx-ink-soft:       #2B2B30;
    --fx-bg:             #FFFFFF;   /* page background — LIGHT, not black */
    --fx-bg-soft:        #F5F4F2;   /* secondary section background */
    --fx-panel:          #FFFFFF;   /* card background */
    --fx-panel-2:        #FAFAF9;

    --fx-white:          #FFFFFF;
    --fx-muted:          #6B6B73;
    --fx-border:         rgba(16, 16, 18, 0.10);
    --fx-border-strong:  rgba(16, 16, 18, 0.18);

    --fx-success:        #1FAE5C;
    --fx-warning:        #B4790F;
    --fx-danger:         #E5231B;

    /* Dark surface tokens — reserved for small deliberate accents only
       (e.g. the phone-screen illustration in the hero), NOT page backgrounds */
    --fx-dark-surface:   #101012;
    --fx-dark-surface-2: #1B1B1E;

    /* ---- Glass / gloss effects (for light surfaces) ---- */
    --fx-glass-fill:      linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 100%);
    --fx-glass-highlight: linear-gradient(120deg, rgba(255,255,255,0.6), rgba(255,255,255,0) 40%);
    --fx-shadow-soft:     0 2px 16px rgba(16,16,18,0.06);
    --fx-shadow-lift:     0 16px 40px rgba(16,16,18,0.12);
    --fx-shadow-red-glow: 0 0 0 1px rgba(229,35,27,0.25), 0 8px 26px rgba(229,35,27,0.28);

    /* ---- Type scale ---- */
    --fx-font-display: 'Sora', system-ui, sans-serif;
    --fx-font-body:    'Inter', system-ui, sans-serif;

    --fx-radius-sm: 8px;
    --fx-radius-md: 14px;
    --fx-radius-lg: 22px;
    --fx-radius-pill: 999px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--fx-font-body);
    background: var(--fx-bg);
    color: var(--fx-ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Headings default to a subtle "glossy black" gradient fill */
h1, h2, h3, h4 {
    font-family: var(--fx-font-display);
    font-weight: 700;
    line-height: 1.14;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
    background: linear-gradient(180deg, #2C2C31 0%, var(--fx-ink) 55%, #000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; max-width: 62ch; color: var(--fx-ink-soft); }

:focus-visible { outline: 2px solid var(--fx-red); outline-offset: 3px; }

.fx-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* -------------------------------------------------------------------------
   Logo — "F" and "X" carry the FX brand mark in glossy red
   ------------------------------------------------------------------------- */
.fx-logo {
    display: inline-flex;
    align-items: baseline;
    font-family: var(--fx-font-display);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.fx-logo .fx-letter {
    background: linear-gradient(180deg, #FF453B 0%, var(--fx-red) 55%, var(--fx-red-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,0.15));
}
.fx-logo .fx-quiet { color: var(--fx-ink); }
/* Use .on-dark when placing the logo on a dark surface (e.g. footer banner) */
.fx-logo.on-dark .fx-quiet { color: #fff; }

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.fx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--fx-font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 22px;
    border-radius: var(--fx-radius-pill);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color .15s ease;
}
.fx-btn:active { transform: translateY(1px); }

.fx-btn-primary {
    background: linear-gradient(180deg, #FF3B30 0%, var(--fx-red) 55%, var(--fx-red-dark) 100%);
    color: #fff;
    box-shadow: var(--fx-shadow-red-glow);
}
.fx-btn-primary:hover { box-shadow: 0 0 0 1px rgba(229,35,27,0.4), 0 10px 30px rgba(229,35,27,0.35); }

.fx-btn-dark {
    background: linear-gradient(180deg, #2B2B30 0%, #0A0A0C 100%);
    color: #fff;
    border-color: rgba(0,0,0,0.4);
}
.fx-btn-dark:hover { filter: brightness(1.12); }

.fx-btn-ghost {
    background: transparent;
    color: var(--fx-ink);
    border-color: var(--fx-border-strong);
}
.fx-btn-ghost:hover { background: var(--fx-bg-soft); }

/* -------------------------------------------------------------------------
   Cards (soft glossy light panel)
   ------------------------------------------------------------------------- */
.fx-card {
    position: relative;
    background: var(--fx-panel);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius-lg);
    padding: 24px;
    box-shadow: var(--fx-shadow-soft);
    overflow: hidden;
}
.fx-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--fx-glass-highlight);
    opacity: 0.6;
    pointer-events: none;
}
.fx-card-hover { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.fx-card-hover:hover {
    transform: translateY(-3px);
    border-color: rgba(229,35,27,0.35);
    box-shadow: var(--fx-shadow-lift);
}

/* Icon chip used inside repair-category cards */
.fx-icon-chip {
    width: 52px;
    height: 52px;
    border-radius: var(--fx-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(120% 120% at 30% 20%, rgba(229,35,27,0.16), rgba(229,35,27,0.05) 60%);
    border: 1px solid rgba(229,35,27,0.25);
    margin-bottom: 16px;
}
.fx-icon-chip svg { width: 26px; height: 26px; stroke: var(--fx-red); fill: none; }

/* -------------------------------------------------------------------------
   Badges — used for repair status
   ------------------------------------------------------------------------- */
.fx-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--fx-radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}
.fx-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.fx-badge-received       { background: rgba(107,107,115,0.10); color: #55555C; }
.fx-badge-diagnosing     { background: rgba(180,121,15,0.12); color: var(--fx-warning); }
.fx-badge-in_progress    { background: rgba(229,35,27,0.10); color: var(--fx-red); }
.fx-badge-waiting_parts  { background: rgba(180,121,15,0.12); color: var(--fx-warning); }
.fx-badge-ready_for_collection,
.fx-badge-completed      { background: rgba(31,174,92,0.12); color: #167A42; }
.fx-badge-cancelled      { background: rgba(107,107,115,0.10); color: #8C8C94; }

/* -------------------------------------------------------------------------
   Tabs
   ------------------------------------------------------------------------- */
.fx-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--fx-border); }
.fx-tab {
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--fx-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
}
.fx-tab.is-active { color: var(--fx-ink); border-color: var(--fx-red); }

/* -------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------- */
.fx-field { margin-bottom: 18px; }
.fx-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--fx-ink-soft);
}
.fx-input, .fx-select, .fx-textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--fx-panel-2);
    border: 1px solid var(--fx-border-strong);
    border-radius: var(--fx-radius-sm);
    color: var(--fx-ink);
    font-family: var(--fx-font-body);
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fx-input:focus, .fx-select:focus, .fx-textarea:focus {
    outline: none;
    border-color: var(--fx-red);
    box-shadow: 0 0 0 3px rgba(229,35,27,0.15);
}
.fx-textarea { min-height: 120px; resize: vertical; }

/* -------------------------------------------------------------------------
   Dark surface — used sparingly & deliberately (e.g. footer band, phone
   mockup screen in the hero). Never the page background.
   ------------------------------------------------------------------------- */
.fx-surface-dark {
    background: var(--fx-dark-surface);
    color: #fff;
    border-radius: var(--fx-radius-lg);
    padding: 32px;
}
.fx-surface-dark .fx-muted { color: #9A9AA2; }
.fx-surface-dark h1, .fx-surface-dark h2, .fx-surface-dark h3 {
    background: linear-gradient(180deg, #fff 0%, #C9C9CE 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* -------------------------------------------------------------------------
   Utility
   ------------------------------------------------------------------------- */
.fx-muted { color: var(--fx-muted); }
.fx-eyebrow { color: var(--fx-red); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.fx-grid { display: grid; gap: 20px; }
.fx-grid-3 { grid-template-columns: repeat(3, 1fr); }
.fx-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .fx-grid-3, .fx-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .fx-grid-3, .fx-grid-4 { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------
   Animated hero header (device-repair motif: crack -> repaired pulse)
   Light section background; the phone mockup itself has a dark screen
   (like a real phone), which is intentional and not a page-wide dark theme.
   ------------------------------------------------------------------------- */
.fx-hero {
    position: relative;
    padding: 90px 0 70px;
    overflow: hidden;
    background:
        radial-gradient(55% 50% at 82% 0%, rgba(229,35,27,0.10), transparent 60%),
        radial-gradient(40% 40% at 6% 100%, rgba(229,35,27,0.06), transparent 60%),
        var(--fx-bg);
}
.fx-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .fx-hero-grid { grid-template-columns: 1fr; } }
.fx-hero-device { width: 100%; max-width: 380px; margin: 0 auto; }

@media (prefers-reduced-motion: no-preference) {
    .fx-hero-anim .fx-crack-path {
        stroke-dasharray: 340; stroke-dashoffset: 340;
        animation: fx-draw-crack 1.1s ease-out forwards;
    }
    .fx-hero-anim .fx-repair-sweep {
        transform: translateX(-120%);
        animation: fx-sweep 1.6s 1.0s cubic-bezier(.4,0,.2,1) forwards;
    }
    .fx-hero-anim .fx-crack-path.fx-fade-out {
        animation: fx-draw-crack 1.1s ease-out forwards, fx-fade 0.6s 1.6s ease-out forwards;
    }
    .fx-hero-anim .fx-pulse-ring { animation: fx-pulse 2.4s 2.2s ease-out infinite; }
}
@keyframes fx-draw-crack { to { stroke-dashoffset: 0; } }
@keyframes fx-fade { to { opacity: 0; } }
@keyframes fx-sweep { to { transform: translateX(120%); } }
@keyframes fx-pulse {
    0%   { opacity: 0.5; transform: scale(0.9); }
    70%  { opacity: 0; transform: scale(1.4); }
    100% { opacity: 0; transform: scale(1.4); }
}
