/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    inset-inline-start: 0;
    background-color: #004085;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* Base Styles & Accessibility */
:root {
    --primary-color: #004085;
    --secondary-color: #e2e3e5;
    --accent-color: #0056b3;
    --text-color: #212529;
    --bg-color: #ffffff;
    --card-bg: #f8f9fa;
    --danger-color: #b02a2a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

section {
    /* Prevents the sticky header from cutting off section titles when clicking anchor links */
    scroll-margin-top: 90px;
}

/* Navigation */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 0.9rem;
    font-weight: normal;
    opacity: 0.9;
    display: block;
    margin-top: 0.2rem;
}

nav a {
    color: white;
    text-decoration: none;
    margin-inline-start: 1.5rem;
    font-weight: bold;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

nav a:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 2rem;
    background: linear-gradient(rgba(248, 249, 250, 0.9), rgba(248, 249, 250, 0.9)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.05"><path d="M0 0h100v100H0z"/></svg>');
    border-bottom: 1px solid var(--secondary-color);
}

.hero h2 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-transform: uppercase;
}

.hero p {
    font-size: 1.3rem;
    max-width: 760px; /* ~80 chars per line at 1.3rem per WCAG 1.4.8 AAA */
    margin: 0 auto 2rem auto;
    color: #495057;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #004085;
}

/* Evidence Section */
.evidence-section {
    padding: 5rem 2rem;
    background-color: var(--bg-color);
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.evidence-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.evidence-card {
    background-color: var(--card-bg);
    border-inline-start: 6px solid var(--accent-color);
    padding: 2rem;
    border-start-end-radius: 8px;
    border-end-end-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.evidence-card.danger {
    border-inline-start-color: var(--danger-color);
}

.statement {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: bold;
}

.evidence-card.danger .statement {
    color: var(--danger-color);
}

.evidence-text {
    font-size: 1.1rem;
    color: #495057;
}

.evidence-label {
    display: inline-block;
    background-color: #e9ecef;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #3d4349; /* darkened from #6c757d to achieve 7:1 contrast on #e9ecef */
}

/* Products Section */
.products-section {
    padding: 5rem 2rem;
    background-color: var(--primary-color);
    color: white;
}

.products-section .section-title {
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background-color: white;
    color: var(--text-color);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-card h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.product-card p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.feature-list {
    list-style-type: none;
}

.feature-list li {
    position: relative;
    padding-inline-start: 1.5rem;
    margin-bottom: 0.8rem;
}

.feature-list li::before {
    content: "✓";
    color: var(--accent-color);
    position: absolute;
    inset-inline-start: 0;
    font-weight: bold;
}

/* Solidarity / Pricing Box */
.solidarity-box {
    max-width: 800px;
    margin: -3rem auto 4rem auto;
    background-color: #e6f2ff;
    color: #004085;
    border: 1px solid #b8daff;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.solidarity-box h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.sdvosb-text {
    font-weight: bold;
    color: #d1ecf1;
    margin-top: 1.5rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    nav a,
    .cta-button {
        transition: none;
    }
}

.evidence-source {
    margin-top: 1rem;
    font-size: 0.78rem;
    color: #595959; /* darkened from #999 for WCAG AA 4.5:1 contrast on #f8f9fa */
}

sup a {
    color: inherit;
    text-decoration: none;
    font-size: 0.7rem;
}

sup a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        position: static;
        padding: 0.75rem 1rem;
    }
    nav {
        margin-top: 0.5rem;
    }
    nav a {
        margin: 0 0.5rem;
        font-size: 0.9rem;
    }
    .hero h2 {
        font-size: 2rem;
    }
}

/* Site name on subpages (the page's own h1 is the page title) */
header .site-name {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 1px;
}

header .site-name a {
    color: white;
    text-decoration: none;
}

header .site-name a:hover {
    text-decoration: underline;
}

header .site-name a:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    border-radius: 2px;
}

nav a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Product card links */
.card-links {
    margin-bottom: 0;
    font-size: 1rem;
}

.product-card .card-links {
    margin: 1.5rem 0 0 0;
}

.product-card a {
    color: var(--accent-color); /* 7:1 on white */
    text-decoration: underline;
}

/* Document pages (privacy policy, support) */
.doc {
    max-width: 70ch;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem 1.5rem;
}

.doc h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.doc h2 {
    font-size: 1.6rem;
    line-height: 1.3;
    color: var(--primary-color);
    margin: 2.5rem 0 0.75rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--secondary-color);
}

.doc h3 {
    font-size: 1.2rem;
    line-height: 1.4;
    color: var(--text-color);
    margin: 1.75rem 0 0.5rem 0;
}

/* Keeps the sticky header from covering anchor targets */
.doc h1,
.doc h2,
.doc h3 {
    scroll-margin-top: 6rem;
}

.doc p,
.doc ul,
.doc ol {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.doc ul,
.doc ol {
    padding-inline-start: 1.75rem;
}

.doc li {
    margin-bottom: 0.5rem;
}

.doc a {
    color: var(--accent-color); /* 7:1 on white */
    text-decoration: underline;
    text-underline-offset: 2px;
}

.doc a:hover {
    color: var(--primary-color);
    text-decoration-thickness: 2px;
}

.doc a:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

.doc .effective {
    color: #495057; /* 7.6:1 on white */
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .doc {
        padding: 2rem 1rem 3rem 1rem;
    }
    .doc h1 {
        font-size: 1.8rem;
    }
}

/* Language switcher (header link goes to the footer list) */
#languages {
    scroll-margin-top: 90px;
    margin-top: 2rem;
}

footer nav a {
    margin-inline-start: 0;
    font-weight: normal;
    text-decoration: underline;
    text-underline-offset: 3px;
}

footer nav a[aria-current="true"] {
    font-weight: bold;
    text-decoration: none;
}

.lang-heading {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

#languages ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}

/* Translation notice (non-English privacy and support pages) */
.doc .translation-notice {
    font-size: 0.95rem;
    color: #495057; /* 7.6:1 on white */
    border-inline-start: 4px solid var(--secondary-color);
    padding-inline-start: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Fonts for scripts where the system default is a poor fit.  The universal
   rule above sets font-family on every element, so the override must match
   descendants too.  Other scripts use the system fonts. */
:lang(ur),
:lang(ur) * {
    font-family: "Noto Nastaliq Urdu", "Jameel Noto Nastaleeq", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body:lang(ur) {
    line-height: 2.2;
}
