/* Styles for app/Views/landing.php. Extracted from an inline <style> block. */

:root {
    /* Dark premium palette */
    --bg-0: #060d1a;
    --bg-1: #0a1628;
    --bg-2: #0e1e38;
    --ink: #eaf1fb;
    --muted: #9fb2cc;
    --faint: #6f83a0;
    --line: rgba(148, 176, 214, .14);
    --line-strong: rgba(148, 176, 214, .26);

    /* Glass surfaces */
    --glass: rgba(20, 38, 66, .55);
    --glass-hi: rgba(30, 52, 86, .72);

    /* Accent hues (bright, for glow on dark) */
    --blue: #38bdf8;
    --blue-deep: #2563eb;
    --red: #fb7185;
    --red-deep: #e11d48;
    --green: #34d399;
    --green-deep: #059669;
    --violet: #a78bfa;

    --radius: 18px;
}

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg-0);
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Single fixed, composited backdrop layer. Because it is its own
   fixed layer it is painted ONCE and simply stays put while the page
   scrolls — no per-frame background repaint (this is what kept the old
   `background-attachment: fixed` feeling heavy). */
.bg-fixed {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--bg-0);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Ccircle cx='18' cy='18' r='1.2' fill='%2338bdf8' fill-opacity='0.05'/%3E%3C/svg%3E"),
        repeating-linear-gradient(90deg, rgba(148, 176, 214, .022) 0 1px, transparent 1px 140px),
        radial-gradient(48rem 34rem at 12% -6%, rgba(56, 189, 248, .18), transparent 60%),
        radial-gradient(44rem 34rem at 96% 2%, rgba(167, 139, 250, .16), transparent 58%),
        radial-gradient(52rem 40rem at 50% 116%, rgba(52, 211, 153, .12), transparent 60%),
        linear-gradient(165deg, var(--bg-1) 0%, var(--bg-0) 55%, #050a14 100%);
}

/* Slow-drifting glow orbs behind content */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(48px);
    opacity: .5;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
    animation: orb-float 18s ease-in-out infinite alternate;
}
.orb-1 { width: 30rem; height: 30rem; top: -8rem; left: -6rem; background: radial-gradient(circle, rgba(37, 99, 235, .5), transparent 68%); }
.orb-2 { width: 26rem; height: 26rem; top: 20%; right: -8rem; background: radial-gradient(circle, rgba(167, 139, 250, .42), transparent 68%); animation-delay: -6s; }
.orb-3 { width: 28rem; height: 28rem; bottom: -10rem; left: 30%; background: radial-gradient(circle, rgba(16, 185, 129, .32), transparent 68%); animation-delay: -11s; }

@keyframes orb-float {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(0, -28px, 0) scale(1.08); }
}

/* Top gradient hairline */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 1000;
    background: linear-gradient(90deg, var(--blue), var(--violet), var(--green));
    box-shadow: 0 0 22px rgba(56, 189, 248, .5);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.portal-hero,
.service-card { animation: rise .6s cubic-bezier(.22, .61, .36, 1) both; }
.service-card:nth-child(1) { animation-delay: .06s; }
.service-card:nth-child(2) { animation-delay: .12s; }
.service-card:nth-child(3) { animation-delay: .18s; }
.service-card:nth-child(4) { animation-delay: .24s; }
.service-card:nth-child(5) { animation-delay: .30s; }

.portal-shell {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 18px 26px;
}

/* ── Top bar ── */
.portal-topbar {
    position: sticky;
    top: 12px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 12px 18px;
    border-radius: 16px;
    /* Solid (not backdrop-blur): a sticky element with backdrop-filter
       re-blurs its backdrop every scroll frame — the main scroll cost. */
    background: rgba(11, 22, 40, .92);
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.portal-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.portal-brand img {
    width: auto; height: 54px;
    filter: drop-shadow(0 4px 12px rgba(56, 189, 248, .3));
}
.portal-brand-title { font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.portal-brand-subtitle { color: var(--muted); font-size: .9rem; }

.portal-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/*
 * Landing topbar support chip — light text only; no hover darkening.
 * (Email is a SPAN inside the chip; colors also locked inline in landing.php.)
 */
.portal-topbar-actions .tma-tech-support--portal,
.portal-topbar-actions .tma-tech-support--portal:hover,
.portal-topbar-actions .tma-tech-support--portal:focus,
.portal-topbar-actions .tma-tech-support--portal:active {
    background: rgba(4, 12, 24, 0.72) !important;
    border: 1px solid var(--line) !important;
    color: #9fb2cc !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.portal-topbar-actions .tma-tech-support--portal i {
    color: #38bdf8 !important;
}
.portal-topbar-actions .tma-tech-support--portal .tma-tech-support-label {
    color: #9fb2cc !important;
    -webkit-text-fill-color: #9fb2cc !important;
}
.portal-topbar-actions .tma-tech-support--portal .tma-tech-support-email {
    color: #7dd3fc !important;
    -webkit-text-fill-color: #7dd3fc !important;
    background: transparent !important;
    text-decoration: none !important;
    font-weight: 700;
}

.portal-lang {
    display: inline-flex; gap: 3px; padding: 4px;
    border-radius: 999px;
    background: rgba(4, 12, 24, .55);
    border: 1px solid var(--line);
    align-items: center;
}
.portal-lang-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    color: var(--blue);
    font-size: .85rem;
    opacity: .9;
}
.portal-lang-btn {
    text-decoration: none; font-weight: 700; font-size: .82rem;
    color: var(--muted); padding: 6px 15px; border-radius: 999px; line-height: 1;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.portal-lang-btn.is-active {
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    color: #fff;
    box-shadow: 0 4px 16px rgba(56, 189, 248, .45);
}
.portal-lang-btn:not(.is-active):hover { color: var(--ink); background: rgba(56, 189, 248, .12); }

/* ── Hero ── */
.portal-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px 36px;
    margin-bottom: 30px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(37, 99, 235, .28), transparent 55%),
        radial-gradient(120% 140% at 0% 100%, rgba(16, 185, 129, .16), transparent 55%),
        linear-gradient(135deg, rgba(16, 30, 56, .92), rgba(8, 18, 34, .92));
    box-shadow: 0 30px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}
/* Sheen sweep */
.portal-hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 55%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .07), transparent);
    transform: translateX(-180%) skewX(-18deg);
    will-change: transform;
    animation: sheen 7s ease-in-out infinite;
    pointer-events: none;
}
/* Animate transform (composited) instead of `left` (triggers layout). */
@keyframes sheen {
    0%, 62% { transform: translateX(-180%) skewX(-18deg); }
    82%, 100% { transform: translateX(360%) skewX(-18deg); }
}

.portal-hero > * { position: relative; z-index: 1; }

.hero-watermark {
    position: absolute;
    right: 30px; bottom: -26px;
    font-size: 200px; line-height: 1;
    color: rgba(56, 189, 248, .06);
    transform: rotate(-8deg);
    z-index: 0; pointer-events: none;
}

.portal-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(268px, .7fr);
    gap: 26px;
    align-items: center;
}

.portal-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    background: rgba(56, 189, 248, .1);
    color: #bfe6fb;
    border: 1px solid rgba(56, 189, 248, .3);
    font-size: .8rem; font-weight: 700; letter-spacing: .02em;
    margin-bottom: 16px;
}
.portal-eyebrow i { color: var(--blue); }

.portal-hero h1 {
    font-size: clamp(2rem, 3.4vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: -.025em;
    font-weight: 800;
    margin-bottom: 14px;
    background: linear-gradient(120deg, #ffffff 0%, #cfe3fb 45%, #8fd7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 40px rgba(56, 189, 248, .12);
}
.portal-hero p { color: var(--muted); font-size: 1.04rem; margin: 0; max-width: 46ch; }

.portal-quick-panel {
    background: rgba(6, 15, 30, .5);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.portal-quick-panel h2 {
    font-size: .78rem; text-transform: uppercase;
    color: var(--faint); margin-bottom: 6px; letter-spacing: .08em; font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}
.portal-quick-panel h2 i { color: var(--blue); font-size: .85rem; }
.portal-pill {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: .95rem; color: #dbe7f6;
}
.portal-pill:last-child { border-bottom: 0; padding-bottom: 0; }
.portal-pill i {
    width: 30px; height: 30px; flex: 0 0 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px; font-size: .9rem;
    color: var(--blue);
    background: rgba(56, 189, 248, .12);
    border: 1px solid rgba(56, 189, 248, .2);
}

/* ── Section header ── */
.section-head { margin: 6px 2px 20px; }
.section-head h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.65rem);
    font-weight: 800; letter-spacing: -.015em; margin-bottom: 5px;
    display: flex; align-items: center; gap: 10px;
}
.section-head h2 i {
    color: var(--blue);
    font-size: .9em;
    opacity: .9;
}
.section-head p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ── Service grid ── */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    /* Solid translucent gradient reads as "frosted glass" on the dark
       backdrop without the per-frame cost of backdrop-filter blur. */
    background: linear-gradient(180deg, rgba(24, 44, 74, .66), rgba(13, 27, 49, .66));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
/* Radial glow that ignites on hover */
.service-card::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: radial-gradient(120% 90% at 50% -10%, var(--card-glow, rgba(56, 189, 248, .22)), transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
/* Top accent bar */
.service-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--card-accent, var(--blue));
    box-shadow: 0 0 18px var(--card-glow, rgba(56, 189, 248, .5));
}
.service-card > * { position: relative; z-index: 1; }

.service-card:hover {
    transform: translateY(-7px);
    border-color: var(--line-strong);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .5), 0 0 0 1px var(--card-glow, rgba(56, 189, 248, .3));
}
.service-card:hover::after { opacity: 1; }

.service-card.accent-blue  { --card-accent: linear-gradient(90deg, var(--blue-deep), var(--blue)); --card-glow: rgba(56, 189, 248, .3); }
.service-card.accent-red   { --card-accent: linear-gradient(90deg, var(--red-deep), var(--red));  --card-glow: rgba(251, 113, 133, .3); }
.service-card.accent-green { --card-accent: linear-gradient(90deg, var(--green-deep), var(--green)); --card-glow: rgba(52, 211, 153, .3); }

/* Twin MD programme cards — identical chrome and action stack */
.service-card--md {
    min-height: 320px;
}
.service-card--md .service-desc {
    min-height: 2.7em;
}
.service-card--md .service-note {
    min-height: 1.2em;
}

/* Top row: Open/Closed on the left, category tag on the right — in flow
   so the status never sits under the service icon. */
.service-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    min-height: 1.6rem;
}
.service-tag {
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    padding: 5px 10px; border-radius: 999px;
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 5px;
}
.service-tag i { font-size: .75em; opacity: .9; }
.service-gate {
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 5px 11px; border-radius: 999px;
    line-height: 1.2;
    display: inline-flex; align-items: center; gap: 5px;
}
.service-gate i { font-size: .85em; }
.service-gate.gate-open {
    background: rgba(52, 211, 153, .18); color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, .4);
}
.service-gate.gate-closed {
    background: rgba(251, 113, 133, .18); color: #fda4af;
    border: 1px solid rgba(251, 113, 133, .4);
}
.service-card.is-closed {
    opacity: .88;
}
.service-card.is-closed .service-icon {
    filter: grayscale(.35);
}
.accent-blue  .service-tag { background: rgba(56, 189, 248, .12); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, .28); }
.accent-red   .service-tag { background: rgba(251, 113, 133, .12); color: #fda4af; border: 1px solid rgba(251, 113, 133, .28); }
.accent-green .service-tag { background: rgba(52, 211, 153, .12); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, .28); }

.service-icon {
    width: 46px; height: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; font-size: 1.2rem; margin-bottom: 13px;
    color: #fff;
}
.accent-blue  .service-icon { background: linear-gradient(135deg, var(--blue-deep), var(--blue));  box-shadow: 0 10px 26px rgba(56, 189, 248, .4); }
.accent-red   .service-icon { background: linear-gradient(135deg, var(--red-deep), var(--red));   box-shadow: 0 10px 26px rgba(251, 113, 133, .4); }
.accent-green .service-icon { background: linear-gradient(135deg, var(--green-deep), var(--green)); box-shadow: 0 10px 26px rgba(52, 211, 153, .4); }

.service-title {
    font-size: clamp(.95rem, 1.4vw, 1.05rem);
    line-height: 1.3; margin-bottom: 7px; font-weight: 700; color: var(--ink);
}
.service-desc { color: var(--muted); line-height: 1.5; margin-bottom: 15px; font-size: .9rem; }

.service-actions { margin-top: auto; display: grid; gap: 7px; }
.service-actions .btn {
    min-height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; white-space: normal; font-weight: 600; font-size: .9rem;
    border-radius: 10px;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.service-actions .btn i { transition: transform .15s ease; }
.service-actions .btn:hover { transform: translateY(-1px); }
.service-card:hover .service-actions .btn:first-child i.fa-arrow-right,
.service-card:hover .service-actions .btn:first-child i.fa-user-plus { transform: translateX(4px); }

/* Primary CTA per accent — bright, glowing gradient */
.service-actions .btn-primary {
    border: 0; color: #04121f;
    background: linear-gradient(135deg, var(--blue), #7dd3fc);
    box-shadow: 0 8px 22px rgba(56, 189, 248, .38);
}
.service-actions .btn-primary:hover { box-shadow: 0 12px 30px rgba(56, 189, 248, .55); color: #04121f; }
.service-actions .btn-danger {
    border: 0; color: #fff;
    background: linear-gradient(135deg, var(--red-deep), var(--red));
    box-shadow: 0 8px 22px rgba(251, 113, 133, .38);
}
.service-actions .btn-danger:hover { box-shadow: 0 12px 30px rgba(251, 113, 133, .55); color: #fff; }
.service-actions .btn-success {
    border: 0; color: #04140d;
    background: linear-gradient(135deg, var(--green), #6ee7b7);
    box-shadow: 0 8px 22px rgba(52, 211, 153, .38);
}
.service-actions .btn-success:hover { box-shadow: 0 12px 30px rgba(52, 211, 153, .55); color: #04140d; }

/* Secondary / outline buttons on dark glass */
.service-actions .btn-outline-secondary {
    color: var(--muted);
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .02);
}
.service-actions .btn-outline-secondary:hover {
    color: var(--ink);
    border-color: rgba(56, 189, 248, .4);
    background: rgba(56, 189, 248, .1);
}
.service-actions .btn-outline-danger {
    color: #fda4af;
    border: 1px solid rgba(251, 113, 133, .35);
    background: rgba(251, 113, 133, .04);
}
.service-actions .btn-outline-danger:hover {
    color: #fff;
    border-color: rgba(251, 113, 133, .55);
    background: rgba(251, 113, 133, .16);
}

.service-note {
    min-height: 16px; color: var(--faint);
    text-align: center; font-size: .8rem; margin-top: 2px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%;
}
.service-note i { opacity: .85; font-size: .9em; }

.portal-footer {
    text-align: center; color: var(--faint);
    font-size: .9rem; padding: 26px 0 6px;
}
.portal-footer i {
    margin-right: 6px;
    opacity: .7;
    color: var(--blue);
}
.portal-footer-support {
    margin-top: 8px;
}
.portal-footer-support a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.portal-footer-support a:hover {
    color: var(--ink);
    border-bottom-color: var(--line-strong);
}

@media (max-width: 991.98px) {
    .portal-hero-grid,
    .service-grid { grid-template-columns: 1fr; }
    .service-card { min-height: auto; }
}

@media (max-width: 575.98px) {
    .portal-shell { padding: 18px 12px; }
    .portal-topbar { align-items: flex-start; flex-direction: column; }
    .portal-brand img { height: 46px; }
    .portal-hero { padding: 24px 20px; }
    .service-card { padding: 20px; }
    .portal-hero h1 { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
    .portal-hero, .service-card, .orb, .portal-hero::before { animation: none; }
    .service-card, .service-actions .btn { transition: none; }
    html { scroll-behavior: auto; }
}

/* Portal topbar tech-support chip — keep hover off the #0f172a global link color. */
.portal-topbar-actions .tma-tech-support--portal {
    background: rgba(4, 12, 24, 0.72) !important;
    border: 1px solid rgba(148, 176, 214, 0.14) !important;
    color: #9fb2cc !important;
    box-shadow: none !important;
}
.portal-topbar-actions .tma-tech-support--portal:hover {
    background: rgba(4, 12, 24, 0.72) !important;
    box-shadow: none !important;
}
.portal-topbar-actions .tma-tech-support--portal .tma-tech-support-label {
    color: #9fb2cc !important;
}
.portal-topbar-actions .tma-tech-support--portal a.tma-tech-support-email,
.portal-topbar-actions .tma-tech-support--portal a.tma-tech-support-email:link,
.portal-topbar-actions .tma-tech-support--portal a.tma-tech-support-email:visited,
.portal-topbar-actions .tma-tech-support--portal a.tma-tech-support-email:hover,
.portal-topbar-actions .tma-tech-support--portal a.tma-tech-support-email:focus,
.portal-topbar-actions .tma-tech-support--portal a.tma-tech-support-email:active,
.portal-topbar-actions .tma-tech-support a:hover {
    color: #7dd3fc !important;
    -webkit-text-fill-color: #7dd3fc !important;
    background: transparent !important;
    background-color: transparent !important;
    text-decoration: none !important;
    border-bottom-color: transparent !important;
    filter: none !important;
    opacity: 1 !important;
}
.portal-topbar-actions .tma-tech-support--portal > i.fa-headset {
    color: #38bdf8 !important;
}
.portal-topbar-actions .tma-tech-support--portal a.tma-tech-support-email i {
    color: #7dd3fc !important;
    -webkit-text-fill-color: #7dd3fc !important;
    margin-right: 0.35rem;
    font-size: 0.78em;
}
