/* LEGAL.RAPIDLAUNCH.IE — Standalone Compliance Stylesheet
   Version: 1.2 — Dark only. Never depends on main site CSS.
   Last updated: 2026-05-23 */

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

:root {
    --bg: #1a1a1e;
    --surface: #252528;
    --border: #3a3a3e;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted: #6e6e73;
    --accent: #4da8c4;
    --accent-light: rgba(77,168,196,0.12);
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border-hover: #4a4a4e;
    --text-primary: #f5f5f7;
    --success: #30d158;
    --warning: #ff9f0a;
    --error: #ff453a;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "SF Mono", Monaco, Consolas, monospace;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    padding-top: 72px;
}

.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }

#main-content { scroll-margin-top: 72px; }

/* SKIP LINK */
.skip-link {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* HEADER */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background-color: rgba(26, 26, 30, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-image: linear-gradient(90deg, transparent 0%, var(--border) 15%, var(--border) 85%, transparent 100%);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    padding-top: env(safe-area-inset-top, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}
.header.scrolled {
    background-color: rgba(26, 26, 30, 0.98);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* LOGO */
.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}
.header-logo img { height: 32px; }
.header-logo:hover { opacity: 0.85; transition: opacity 0.2s ease; }

/* NAV DESKTOP */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: visible;
}

.nav-link {
    position: relative;
    padding: 8px 14px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 50%;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.nav-link:hover {
    color: var(--accent);
    background: var(--bg-card);
}
.nav-link:hover::after { transform: translateX(-50%) scaleX(1); }
.nav-link:active { transform: scale(0.97); }
.nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-link-active {
    color: var(--text);
    background: var(--bg-card);
}
.nav-link-active::after { transform: translateX(-50%) scaleX(1); }

/* DROPDOWN */
.dropdown { position: relative; }

.dropdown-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}
.dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 50%;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}
.dropdown-toggle:hover {
    color: var(--accent);
    background: var(--bg-card);
}
.dropdown-toggle:hover::after { transform: translateX(-50%) scaleX(1); }
.dropdown-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.dropdown-toggle.active { color: var(--text); background: var(--bg-card); }
.dropdown-toggle.active::after { transform: translateX(-50%) scaleX(1); }

.dropdown-chevron {
    width: 12px;
    height: 12px;
    transition: transform 0.25s ease;
}
.dropdown.open .dropdown-chevron { transform: rotate(180deg); }

/* DROPDOWN MENU */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    padding: 24px;
    min-width: 520px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-8px);
    transition: opacity 0.2s ease, transform 0.25s ease, visibility 0.2s ease;
    z-index: 1001;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 24px;
}
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-section { margin-bottom: 4px; }

.dropdown-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 0 10px;
}

.dropdown-section-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}

.dropdown-link {
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}
.dropdown-link:hover { color: var(--text); background: var(--bg-card); }
.dropdown-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.dropdown-link-active {
    color: var(--accent);
    background: var(--bg-card);
    font-weight: 600;
}

/* HEADER ACTIONS */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-actions .btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}
.header-actions .btn-sm:hover { background: #115566; }

/* MOBILE HAMBURGER */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.mobile-menu-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}
.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.mobile-menu-toggle line {
    transition: transform 0.3s ease, opacity 0.25s ease;
    transform-origin: center;
}
.mobile-menu-toggle.open line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-toggle.open line:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* MOBILE MENU */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.25s ease;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom, 16px);
}
.mobile-menu.open {
    max-height: 85vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
}

.mobile-nav { display: flex; flex-direction: column; gap: 4px; }

.mobile-nav-link {
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}
.mobile-nav-link:hover { background: var(--bg-card); color: var(--text); }
.mobile-nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.mobile-nav-link-active {
    color: var(--text);
    background: var(--bg-card);
}

.mobile-nav-cta {
    margin-top: 12px;
    background: var(--accent);
    color: #ffffff;
    text-align: center;
    font-weight: 600;
}
.mobile-nav-cta:hover { background: #115566; color: #ffffff; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .nav-link, .dropdown-toggle { padding: 6px 10px; font-size: 0.875rem; }
    .header-actions .btn-sm { padding: 6px 12px; font-size: 12px; }
}

@media (max-width: 900px) {
    .nav-desktop, .header-actions .btn-sm { display: none; }
    .mobile-menu-toggle { display: flex; }
}

@media (max-width: 768px) {
    .dropdown-menu {
        grid-template-columns: 1fr 1fr;
        min-width: auto;
        left: 0;
        right: 0;
        transform: translateY(-8px);
        border-radius: 0 0 16px 16px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    }
    .dropdown.open .dropdown-menu { transform: translateY(0); }
}

@media (max-width: 480px) {
    body { padding-top: 60px; }
    #main-content { scroll-margin-top: 60px; }
    .header-inner { height: 60px; }
    .header-logo img { height: 28px; }
    .mobile-nav-link { padding: 12px 14px; font-size: 0.9375rem; }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .header,
    .nav-link,
    .nav-link::after,
    .dropdown-toggle,
    .dropdown-toggle::after,
    .dropdown-chevron,
    .dropdown-menu,
    .mobile-menu,
    .mobile-menu-toggle,
    .mobile-menu-toggle line,
    .mobile-nav-link,
    .skip-link,
    .header-logo {
        transition-duration: 0.01ms !important;
    }
    .nav-link:active { transform: none; }
    .nav-link:hover::after,
    .nav-link-active::after,
    .dropdown-toggle:hover::after,
    .dropdown-toggle.active::after { transform: translateX(-50%) scaleX(0); }
    .nav-link-active::after,
    .dropdown-toggle.active::after { transform: translateX(-50%) scaleX(1); }
    .dropdown-menu { transform: translateX(-50%) translateY(0); }
    .dropdown.open .dropdown-chevron { transform: rotate(180deg); }
}

/* PAGE TITLE */
.page-title {
    font-size: 32px; font-weight: 700; margin-bottom: 8px;
    letter-spacing: -0.03em;
}
.page-meta { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }
.page-meta strong { color: var(--text); }

/* CONTENT */
.content, .content-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; margin-bottom: 40px; box-shadow: var(--shadow); }
.content h2, .content-card h2 { font-size: 20px; font-weight: 700; margin-top: 32px; margin-bottom: 12px; color: var(--text); }
.content h2:first-child, .content-card h2:first-child { margin-top: 0; }
.content h3, .content-card h3 { font-size: 16px; font-weight: 600; margin-top: 24px; margin-bottom: 8px; }
.content p, .content-card p { margin-bottom: 16px; color: var(--text-secondary); }
.content ul, .content ol, .content-card ul, .content-card ol { margin-bottom: 16px; padding-left: 24px; }
.content li, .content-card li { margin-bottom: 8px; color: var(--text-secondary); }
.content a, .content-card a { color: var(--accent); text-decoration: none; }
.content a:hover, .content-card a:hover { text-decoration: underline; }
.content strong, .content-card strong { color: var(--text); }
.content hr, .content-card hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* STATUS BADGES */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-compliant { background: rgba(52,199,89,0.1); color: var(--success); }
.status-attention { background: rgba(255,149,0,0.1); color: var(--warning); }
.status-overdue { background: rgba(255,59,48,0.1); color: var(--error); }

/* TABLES */
table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { font-weight: 600; color: var(--text-muted); background: var(--bg); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
td { color: var(--text-secondary); }
tr:hover td { background: var(--accent-light); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #115566; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* FORMS */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 15px; font-family: var(--font);
    background: var(--surface); color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}

/* INDEX GRID */
.index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-bottom: 40px; }
.index-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: transform 0.2s; }
.index-card:hover { transform: translateY(-2px); }
.index-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.index-card h3 a { color: var(--text); text-decoration: none; }
.index-card h3 a:hover { color: var(--accent); }
.index-card p { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.index-card .meta { font-size: 12px; color: var(--text-muted); }

/* CHANGELOG */
.changelog-item { border-left: 3px solid var(--accent); padding: 16px 20px; margin-bottom: 16px; background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; }
.changelog-date { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.changelog-desc { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

/* CANCELLATION FORM */
.cancellation-form { border: 1px solid var(--border); padding: 20px; margin: 16px 0; font-size: 14px; background: var(--surface); border-radius: var(--radius); }
.cancellation-form p { margin-bottom: 8px; }
.placeholder-text { color: var(--text-muted); }

/* UTILITY: MARGIN TOP */
.mt-lg { margin-top: 32px; }

/* INLINE FORMS */
.form-inline { display: flex; gap: 12px; align-items: flex-end; max-width: 500px; }
.form-inline .form-group { flex: 1; margin-bottom: 0; }
.form-inline .btn { align-self: flex-end; }
.form-inline-action { display: inline; }

/* SMALL BUTTONS */
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

/* MESSAGES */
.success-message { display: inline-block; padding: 8px 16px; border-radius: 8px; font-size: 15px; font-weight: 600; margin-bottom: 20px; background: rgba(52,199,89,0.1); color: var(--success); }
.error-message { display: inline-block; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; margin-bottom: 16px; background: rgba(255,59,48,0.1); color: var(--error); }

/* TEXT HELPERS */
.text-small-muted { margin-top: 16px; font-size: 0.875rem; color: var(--text-muted); }
.text-small-muted a { color: var(--accent); text-decoration: none; }
.text-small-muted a:hover { text-decoration: underline; }

/* TABLE WRAP */
.table-wrap { overflow-x: auto; }

/* FOOTER */
.footer { text-align: center; padding: 32px 0; border-top: 1px solid var(--border); margin-top: 40px; }
.footer p { color: var(--text-muted); font-size: 13px; margin-bottom: 4px; }
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* RESPONSIVE */
@media (max-width: 640px) {
    .content { padding: 24px; }
    .page-title { font-size: 26px; }
    .index-grid { grid-template-columns: 1fr; }
}
