/* ===========================================================================
   National Center for Environmental Compliance (NCEC)
   Email exposure checker — visual identity implementation

   Palette, typography and logo usage follow the NCEC Mini Visual Identity
   Guideline (Digital Media). See BRAND.md for the token-by-token mapping.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. Typeface — DIN Next LT Arabic, self-hosted (Arabic + Latin in one family)
   --------------------------------------------------------------------------- */

@font-face {
    font-family: 'DIN Next LT Arabic';
    src: url('assets/fonts/din-next-lt-arabic-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DIN Next LT Arabic';
    src: url('assets/fonts/din-next-lt-arabic-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DIN Next LT Arabic';
    src: url('assets/fonts/din-next-lt-arabic-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DIN Next LT Arabic';
    src: url('assets/fonts/din-next-lt-arabic-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DIN Next LT Arabic';
    src: url('assets/fonts/din-next-lt-arabic-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ---------------------------------------------------------------------------
   2. Brand tokens — the four guideline colours and their 75/50/25 tints
   --------------------------------------------------------------------------- */

:root {
    /* Primary — Pantone #006930 */
    --ncec-green: #006930;
    --ncec-green-75: #408f64;
    --ncec-green-50: #80b498;
    --ncec-green-25: #bfdacb;

    /* Secondary — Pantone #06aa43 */
    --ncec-leaf: #06aa43;
    --ncec-leaf-75: #44bf72;
    --ncec-leaf-50: #83d5a1;
    --ncec-leaf-25: #c1ead0;

    /* Accent — Pantone #d8e024 */
    --ncec-lime: #d8e024;
    --ncec-lime-75: #e2e85b;
    --ncec-lime-50: #ecf092;
    --ncec-lime-25: #f5f7c8;

    /* Accent — Pantone #13dbfd */
    --ncec-sky: #13dbfd;
    --ncec-sky-75: #4ee4fe;
    --ncec-sky-50: #89edfe;
    --ncec-sky-25: #c4f6fe;

    /* Shade below the primary, for hover and the footer field */
    --ncec-green-deep: #004d23;

    /* The guideline's gradient treatment, reused as a single brand rule */
    --brand-gradient: linear-gradient(90deg,
        var(--ncec-green) 0%,
        var(--ncec-leaf) 45%,
        var(--ncec-lime) 100%);

    /* ----- Semantic surface + text tokens ----- */
    --surface: #ffffff;
    --canvas: #f4f7f5;
    --canvas-sunk: #eef3f0;
    --ink: #0b2119;
    --ink-muted: #5c6f68;
    --ink-faint: #8a9a94;
    --line: rgba(0, 105, 48, 0.14);
    --line-strong: rgba(0, 105, 48, 0.28);

    /* ----- Status colours -----
       Outside the brand palette by necessity: the identity carries no alert
       red, and a breach result has to read as a warning at a glance. Kept
       desaturated so it sits beside the green without fighting it. */
    --status-critical: #b3261e;
    --status-critical-soft: #fdf2f1;
    --status-critical-line: rgba(179, 38, 30, 0.22);
    --status-safe: var(--ncec-leaf);

    /* ----- Elevation — tinted with the primary, never neutral grey ----- */
    --shadow-xs: 0 1px 2px rgba(0, 105, 48, 0.06);
    --shadow-sm: 0 2px 10px rgba(0, 105, 48, 0.07);
    --shadow-md: 0 8px 28px rgba(0, 105, 48, 0.09);
    --shadow-lg: 0 16px 44px rgba(0, 105, 48, 0.16);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    /* ----- Bootstrap bridge ----- */
    --bs-body-font-family: 'DIN Next LT Arabic', 'Segoe UI', system-ui, sans-serif;
    --bs-primary: var(--ncec-green);
    --bs-primary-rgb: 0, 105, 48;
    --bs-link-color: var(--ncec-green);
    --bs-link-hover-color: var(--ncec-green-deep);
    --bs-focus-ring-color: rgba(0, 105, 48, 0.25);
    --bs-border-radius: var(--radius-md);
}

/* ---------------------------------------------------------------------------
   3. Base
   --------------------------------------------------------------------------- */

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

body {
    font-family: 'DIN Next LT Arabic', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--canvas);
    color: var(--ink);
    min-height: 100vh;
    padding-bottom: 0;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* A quiet field built from the palette tints — no hard edges, no pattern
   competing with the seal. */
.background-pattern {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(60rem 36rem at 88% -8%, rgba(19, 219, 253, 0.10), transparent 62%),
        radial-gradient(52rem 34rem at 6% 4%, rgba(6, 170, 67, 0.11), transparent 60%),
        radial-gradient(46rem 30rem at 50% 108%, rgba(216, 224, 36, 0.12), transparent 64%);
}

.container {
    max-width: 1020px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 1.25rem;
}

/* The guideline's gradient, pinned to the top of every page */
.brand-rule {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    height: 4px;
    background: var(--brand-gradient);
    z-index: 30;
}

.page-shell {
    padding-block: 3.25rem 3.5rem;
}

/* ---------------------------------------------------------------------------
   4. Header — primary logo lockup on white, per "LOGO USE"
   --------------------------------------------------------------------------- */

.header-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2.75rem 2rem 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Outline seal as a watermark — the "vector style outline" treatment, held
   well below text contrast so it never competes with content. */
.header-section::after {
    content: "";
    position: absolute;
    inset-block-start: -18%;
    inset-inline-start: -6%;
    width: 320px;
    height: 320px;
    background: url('assets/brand/ncec-seal.png') no-repeat center / contain;
    opacity: 0.035;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Tagline lockup — "بيئةٌ نحياها / Environment for Life" */
.brand-tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-block: 1.25rem 2rem;
    color: var(--ncec-green);
}

.brand-tagline::before,
.brand-tagline::after {
    content: "";
    height: 1px;
    width: clamp(1.5rem, 8vw, 4.5rem);
    background: var(--line-strong);
}

.brand-tagline span {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.service-mark {
    width: 72px;
    height: 72px;
    background: linear-gradient(145deg, var(--ncec-green) 0%, var(--ncec-leaf) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 10px 24px rgba(0, 105, 48, 0.26);
}

.service-mark i {
    font-size: 2.1rem;
    color: var(--surface);
}

.main-title {
    font-size: clamp(1.9rem, 4.2vw, 2.6rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--ncec-green);
    margin-bottom: 0.6rem;
}

.subtitle {
    font-size: 1.08rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--ink-muted);
    max-width: 44rem;
    margin: 0 auto;
}

/* ---------------------------------------------------------------------------
   5. Language toggle
   --------------------------------------------------------------------------- */

.language-toggle {
    position: absolute;
    inset-block-start: 1.25rem;
    inset-inline-end: 1.25rem;
    background: var(--surface);
    color: var(--ncec-green);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.05rem;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    z-index: 10;
}

.language-toggle:hover {
    background: var(--ncec-green);
    border-color: var(--ncec-green);
    color: var(--surface);
}

.language-toggle:focus-visible {
    outline: 2px solid var(--ncec-green);
    outline-offset: 2px;
}

.language-toggle i {
    font-size: 1rem;
}

/* ---------------------------------------------------------------------------
   6. Form card
   --------------------------------------------------------------------------- */

.form-section {
    margin-bottom: 1.5rem;
}

.form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-sm);
}

.form-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.form-header h2 {
    color: var(--ncec-green);
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.form-header p {
    color: var(--ink-muted);
    font-size: 0.98rem;
    font-weight: 300;
    margin: 0;
}

.form-label {
    color: var(--ink);
    font-weight: 500;
    font-size: 0.98rem;
    margin-bottom: 0.6rem;
}

.form-control {
    font-family: inherit;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    font-size: 1.02rem;
    color: var(--ink);
    background: var(--canvas);
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control::placeholder {
    color: var(--ink-faint);
}

.form-control:focus {
    border-color: var(--ncec-green);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(0, 105, 48, 0.14);
    outline: none;
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.08rem;
}

.form-text {
    color: var(--ink-faint);
    font-size: 0.88rem;
    font-weight: 300;
    margin-top: 0.55rem;
}

/* Buttons — Bootstrap 5.3 exposes its own custom properties, so the brand is
   applied by redefining those rather than by fighting specificity. */
.btn {
    font-family: inherit;
    --bs-btn-border-radius: var(--radius-md);
}

.btn-primary {
    --bs-btn-bg: var(--ncec-green);
    --bs-btn-border-color: var(--ncec-green);
    --bs-btn-hover-bg: var(--ncec-green-deep);
    --bs-btn-hover-border-color: var(--ncec-green-deep);
    --bs-btn-active-bg: var(--ncec-green-deep);
    --bs-btn-active-border-color: var(--ncec-green-deep);
    --bs-btn-disabled-bg: var(--ncec-green-50);
    --bs-btn-disabled-border-color: var(--ncec-green-50);
    padding: 0.95rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 6px 18px rgba(0, 105, 48, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 105, 48, 0.28);
}

.btn-primary:disabled {
    box-shadow: none;
}

.btn-outline-secondary {
    --bs-btn-color: var(--ink-muted);
    --bs-btn-border-color: var(--line-strong);
    --bs-btn-hover-color: var(--ncec-green);
    --bs-btn-hover-bg: var(--canvas-sunk);
    --bs-btn-hover-border-color: var(--ncec-green);
    --bs-btn-active-color: var(--ncec-green);
    --bs-btn-active-bg: var(--canvas-sunk);
    --bs-btn-active-border-color: var(--ncec-green);
    padding: 0.8rem 2rem;
    font-weight: 500;
}

.btn:focus-visible {
    outline: 2px solid var(--ncec-green);
    outline-offset: 2px;
    box-shadow: none;
}

/* ---------------------------------------------------------------------------
   7. Loading + alerts
   --------------------------------------------------------------------------- */

.loading-section {
    margin-bottom: 1.5rem;
}

.loading-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2.75rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.loading-card h3 {
    color: var(--ncec-green);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.loading-card p {
    color: var(--ink-muted);
    font-weight: 300;
    margin: 0;
}

.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

#errorSection {
    margin-bottom: 1.5rem;
}

#errorSection .alert {
    border-radius: var(--radius-md);
    border: 1px solid var(--status-critical-line);
    background: var(--status-critical-soft);
    color: var(--status-critical);
    box-shadow: var(--shadow-xs);
    font-size: 0.98rem;
    padding: 1rem 1.25rem;
}

/* ---------------------------------------------------------------------------
   8. Results header — states the verdict before any detail
   --------------------------------------------------------------------------- */

.results-section {
    margin-bottom: 2rem;
}

.results-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ncec-green-deep) 0%, var(--ncec-green) 58%, #007d3a 100%);
    color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.results-header::after {
    content: "";
    position: absolute;
    inset-block-start: -40%;
    inset-inline-end: -4%;
    width: 280px;
    height: 280px;
    background: url('assets/brand/ncec-seal-reversed.png') no-repeat center / contain;
    opacity: 0.08;
    pointer-events: none;
}

.results-header.is-exposed::after {
    display: none;
}

.results-header.is-exposed {
    background: linear-gradient(135deg, #7d1a15 0%, var(--status-critical) 60%, #c4362e 100%);
    box-shadow: 0 16px 44px rgba(179, 38, 30, 0.22);
}

.results-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.status-icon {
    width: 68px;
    height: 68px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-icon i {
    font-size: 2.1rem;
}

.status-info {
    flex: 1;
    min-width: 0;
}

.results-header h2 {
    font-size: clamp(1.4rem, 3.2vw, 1.85rem);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.email-display {
    font-size: 1.02rem;
    font-weight: 300;
    opacity: 0.92;
    margin-bottom: 1rem;
    word-break: break-word;
}

.results-meta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.meta-badge {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.4rem 0.95rem;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

/* ---------------------------------------------------------------------------
   9. Breach cards
   --------------------------------------------------------------------------- */

.breaches-container {
    display: grid;
    gap: 1rem;
}

.breach-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--status-critical);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.breach-card:hover {
    box-shadow: var(--shadow-md);
}

.breach-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.1rem;
    gap: 1rem;
}

.breach-title {
    flex: 1;
    min-width: 0;
}

.breach-title h3 {
    color: var(--ink);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.breach-icon {
    width: 42px;
    height: 42px;
    background: var(--status-critical-soft);
    border: 1px solid var(--status-critical-line);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--status-critical);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.breach-date {
    background: var(--canvas-sunk);
    color: var(--ncec-green);
    padding: 0.4rem 0.95rem;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 0.86rem;
    white-space: nowrap;
}

.breach-description {
    color: var(--ink-muted);
    font-weight: 300;
    line-height: 1.85;
    margin-bottom: 1.25rem;
    font-size: 0.98rem;
}

.breach-details {
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.breach-details h4 {
    color: var(--ncec-green);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.data-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.data-type-badge {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    color: var(--ncec-green);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.breach-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.stat-item {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
}

.stat-label {
    color: var(--ink-faint);
    font-size: 0.82rem;
    font-weight: 300;
    margin-bottom: 0.2rem;
}

.stat-value {
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------
   10. Clear result + guidance
   --------------------------------------------------------------------------- */

.no-breaches-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2.75rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.success-icon {
    width: 76px;
    height: 76px;
    background: linear-gradient(145deg, var(--ncec-green) 0%, var(--ncec-leaf) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 10px 24px rgba(6, 170, 67, 0.26);
}

.success-icon i {
    font-size: 2.4rem;
    color: var(--surface);
}

.no-breaches-card h3 {
    color: var(--ncec-green);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.no-breaches-card > p {
    color: var(--ink-muted);
    font-size: 1.02rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

.security-tips {
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    text-align: start;
    max-width: 38rem;
    margin: 0 auto;
}

.security-tips h4 {
    color: var(--ncec-green);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.security-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-tips li {
    color: var(--ink-muted);
    font-weight: 300;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.98rem;
    position: relative;
    padding-inline-start: 1.75rem;
}

.security-tips li:last-child {
    border-bottom: none;
}

.security-tips li::before {
    content: "\F26E"; /* bootstrap-icons: check-lg */
    font-family: 'bootstrap-icons';
    position: absolute;
    inset-inline-start: 0;
    color: var(--ncec-leaf);
    font-size: 0.95rem;
}

/* ---------------------------------------------------------------------------
   11. Footer — reversed lockup on brand green, per "LOGO USE"
   --------------------------------------------------------------------------- */

.site-footer {
    position: relative;
    background: var(--ncec-green-deep);
    color: rgba(255, 255, 255, 0.82);
    padding-block: 2.75rem 1.5rem;
    margin-top: 1rem;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    background: var(--brand-gradient);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-logo {
    width: 100%;
    max-width: 260px;
    height: auto;
    display: block;
    margin-bottom: 1rem;
}

.footer-tagline {
    font-size: 0.95rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.72);
}

.footer-heading {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ncec-lime);
    margin-bottom: 0.9rem;
}

.footer-contact {
    list-style: none;
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    font-weight: 300;
}

.footer-contact i {
    color: var(--ncec-leaf-50);
    font-size: 1rem;
    flex-shrink: 0;
}

.footer-contact a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    /* Phone numbers and URLs stay left-to-right inside the Arabic layout */
    direction: ltr;
    unicode-bidi: embed;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
    color: var(--surface);
    text-decoration: underline;
}

.footer-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 1.25rem;
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
}

.footer-note p {
    margin: 0;
}

.footer-note a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.footer-note a:hover {
    text-decoration: underline;
}


/* ---------------------------------------------------------------------------
   12. Motion + accessibility
   --------------------------------------------------------------------------- */

.results-section:not(.d-none),
.loading-section:not(.d-none),
#errorSection:not(.d-none) {
    animation: rise 0.3s ease both;
}

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

:focus-visible {
    outline: 2px solid var(--ncec-green);
    outline-offset: 2px;
}

@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;
    }

    .btn-primary:hover:not(:disabled) {
        transform: none;
    }
}

/* ---------------------------------------------------------------------------
   13. Responsive
   --------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .page-shell {
        padding-block: 2.25rem 2.5rem;
    }

    .header-section {
        padding: 3.25rem 1.25rem 2rem;
    }

    .header-section::after {
        width: 200px;
        height: 200px;
    }

    .brand-logo {
        max-width: 230px;
    }

    .brand-tagline {
        margin-block: 1rem 1.5rem;
    }

    .brand-tagline span {
        font-size: 0.95rem;
        white-space: normal;
    }

    .language-toggle {
        inset-block-start: 1rem;
        inset-inline-end: 1rem;
        padding: 0.4rem 0.85rem;
        font-size: 0.82rem;
    }

    .form-card,
    .results-header {
        padding: 1.5rem;
    }

    .results-header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.1rem;
    }

    .results-meta {
        justify-content: center;
    }

    .breach-card {
        padding: 1.25rem;
    }

    .breach-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .breach-title h3 {
        font-size: 1.15rem;
    }

    .breach-stats {
        grid-template-columns: 1fr;
    }

    .no-breaches-card {
        padding: 2rem 1.25rem;
    }

    .security-tips {
        padding: 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        text-align: start;
    }

    .footer-note {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .service-mark {
        width: 60px;
        height: 60px;
        border-radius: 17px;
    }

    .service-mark i {
        font-size: 1.75rem;
    }

    .data-type-badge {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
}

/* ---------------------------------------------------------------------------
   14. Print — clean record of a check result
   --------------------------------------------------------------------------- */

@media print {
    body {
        background: #fff;
    }

    .background-pattern,
    .language-toggle,
    .brand-rule,
    .form-section,
    .loading-section {
        display: none !important;
    }

    .header-section,
    .form-card,
    .breach-card,
    .no-breaches-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .results-header {
        box-shadow: none;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .site-footer {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
