/* ==========================================================================
   ACURIS SERVICES LTD - Shared stylesheet
   Colour tokens checked against WCAG 2.2 AA contrast ratios.
   ========================================================================== */

:root {
    --bg-color: #e2e8f0;
    --surface-color: #f1f5f9;
    --surface-alt: #cbd5e1;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #119da4;      /* Brand teal: decorative use (borders, icons) */
    --accent-text: #0b6e73;       /* Teal for text on light surfaces (>= 4.5:1) */
    --btn-bg: #0d7a80;            /* Button background (white text 5.1:1) */
    --btn-bg-hover: #0b6e73;
    --nav-bg: rgba(226, 232, 240, 0.95);
    --border-color: #94a3b8;
    --focus-ring: #0b6e73;
    --success-bg: #d1fae5; --success-text: #065f46;
    --error-bg: #fee2e2;   --error-text: #991b1b;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    color-scheme: light;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --surface-alt: #0b1120;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #a3b1c6;
    --accent-color: #119da4;
    --accent-text: #2cc4cc;
    --btn-bg: #0d7a80;
    --btn-bg-hover: #0b6e73;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --border-color: #334155;
    --focus-ring: #2cc4cc;
    --success-bg: #064e3b; --success-text: #d1fae5;
    --error-bg: #7f1d1d;   --error-text: #fee2e2;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    color-scheme: dark;
}

/* Base ------------------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    /* System font stack: no third-party font request (privacy + performance) */
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 4px; }

.skip-link {
    position: absolute; left: 1rem; top: -100px; z-index: 3000;
    background: var(--btn-bg); color: #fff; padding: 0.75rem 1rem; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Scroll reveal: only hides content when JS is running (html.js) */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.5, 0, 0, 1); }
.js .reveal.active { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Navigation ------------------------------------------------------------- */
.site-nav {
    position: fixed; top: 0; width: 100%;
    background-color: var(--nav-bg); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color); z-index: 1000;
}
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0.9rem 2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.logo-container img { height: 40px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-primary); font-weight: 600; font-size: 0.9rem; }
.nav-links a:hover { color: var(--accent-text); }
.nav-links .nav-cta { background: var(--btn-bg); color: #fff; padding: 0.5rem 1rem; border-radius: 6px; }
.nav-links .nav-cta:hover { background: var(--btn-bg-hover); color: #fff; }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
    background: none; border: 1px solid transparent; color: var(--text-primary);
    font-size: 1.1rem; cursor: pointer; width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background-color: var(--surface-color); }
.icon-btn svg { width: 22px; height: 22px; }
.menu-toggle { display: none; }

/* Buttons ---------------------------------------------------------------- */
.btn {
    display: inline-block; background-color: var(--btn-bg); color: #ffffff;
    padding: 0.9rem 2.2rem; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 1.05rem;
    border: 2px solid var(--btn-bg); transition: background-color 0.2s ease, transform 0.2s ease; cursor: pointer; font-family: inherit;
}
.btn:hover { background-color: var(--btn-bg-hover); border-color: var(--btn-bg-hover); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--text-primary); border-color: var(--border-color); }
.btn-secondary:hover { background: var(--surface-color); border-color: var(--accent-color); color: var(--text-primary); }
button:disabled { opacity: 0.7; cursor: not-allowed; }

/* Hero ------------------------------------------------------------------- */
.hero { padding: 11rem 2rem 6rem; text-align: center; max-width: 960px; margin: 0 auto; }
.hero .eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 1rem; }
.hero h1 { font-size: 3.2rem; font-weight: 700; line-height: 1.15; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
.hero h1 span { color: var(--accent-text); }
.hero p { font-size: 1.2rem; color: var(--text-secondary); margin: 0 auto 2.5rem; max-width: 720px; }
.hero-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.trust-strip { margin-top: 3rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem 2rem; font-size: 0.9rem; color: var(--text-secondary); list-style: none; }
.trust-strip li::before { content: "\2713"; color: var(--accent-text); font-weight: 700; margin-right: 0.4rem; }

/* Sections --------------------------------------------------------------- */
section { padding: 6rem 2rem; }
.bg-surface { background-color: var(--surface-color); }
.bg-alt { background-color: var(--surface-alt); }
.section-container { max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2.4rem; margin-bottom: 1rem; font-weight: 700; }
.section-subtitle { text-align: center; color: var(--text-secondary); margin: 0 auto 4rem; font-size: 1.1rem; max-width: 800px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-text .section-title { text-align: left; }
.about-text p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 2rem; }

.card { background-color: var(--card-bg); padding: 2.5rem 2rem; border-radius: 12px; border: 1px solid var(--border-color); box-shadow: var(--card-shadow); transition: transform 0.3s ease, border-color 0.3s ease; }
.card:hover { transform: translateY(-5px); border-color: var(--accent-color); }
.card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.card p { color: var(--text-secondary); font-size: 0.95rem; }
.card .card-title-accent { color: var(--accent-text); font-size: 1.4rem; }
.stat-card { padding: 2rem; }
.stat-card .stat { font-size: 1.5rem; font-weight: 700; color: var(--accent-text); }
.stat-card .stat-label { font-weight: 600; color: var(--text-primary); }

.service-list { margin-top: 1.5rem; padding-left: 1.2rem; color: var(--text-secondary); font-size: 0.95rem; }
.service-list li { margin-bottom: 1rem; }
.service-list strong { color: var(--text-primary); }

.step-number { font-size: 3rem; font-weight: 700; color: var(--accent-text); line-height: 1; margin-bottom: 1rem; display: inline-block; }

.impact-card { border-left: 4px solid var(--accent-color); }
.card .impact-metric { font-size: 2.5rem; font-weight: 700; color: var(--accent-text); margin-bottom: 0.5rem; }
.disclaimer-note { text-align: center; font-size: 0.85rem; color: var(--text-secondary); margin-top: 2rem; }

/* FAQ -------------------------------------------------------------------- */
.faq-container { max-width: 800px; margin: 0 auto; }
details { background-color: var(--card-bg); margin-bottom: 1rem; border-radius: 8px; border: 1px solid var(--border-color); overflow: hidden; box-shadow: var(--card-shadow); }
summary { padding: 1.5rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent-text); font-size: 1.5rem; font-weight: 400; }
details[open] summary::after { content: "\2212"; }
.faq-content { padding: 0 1.5rem 1.5rem; color: var(--text-secondary); }

/* Contact form ----------------------------------------------------------- */
.contact-content { background-color: var(--card-bg); padding: 4rem; border-radius: 16px; border: 1px solid var(--border-color); max-width: 800px; margin: 0 auto; box-shadow: var(--card-shadow); }
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; text-align: left; margin-top: 2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-weight: 600; font-size: 0.9rem; }
.form-hint { font-size: 0.82rem; color: var(--text-secondary); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea {
    width: 100%; padding: 0.9rem 1rem; border: 1px solid var(--border-color); border-radius: 8px;
    background-color: var(--bg-color); color: var(--text-primary); font-family: inherit; font-size: 1rem;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 3px solid var(--focus-ring); outline-offset: 1px; border-color: var(--accent-color); }
.contact-form ::placeholder { color: var(--text-secondary); opacity: 0.75; }
.contact-form [aria-invalid="true"] { border-color: var(--error-text); }
.field-error { color: var(--error-text); font-size: 0.85rem; font-weight: 600; }
.checkbox-row { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.9rem; color: var(--text-secondary); }
.checkbox-row input { width: 20px; height: 20px; margin-top: 0.15rem; flex-shrink: 0; accent-color: var(--btn-bg); }
.privacy-notice { font-size: 0.85rem; color: var(--text-secondary); background: var(--surface-color); border-radius: 8px; padding: 1rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-weight: 600; text-align: center; }
.alert-success { background-color: var(--success-bg); color: var(--success-text); }
.alert-error { background-color: var(--error-bg); color: var(--error-text); }

/* Footer ----------------------------------------------------------------- */
.site-footer { background-color: var(--surface-alt); border-top: 1px solid var(--border-color); padding: 3rem 2rem 2rem; color: var(--text-secondary); font-size: 0.9rem; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--accent-text); text-decoration: underline; }
.footer-legal-id { font-style: normal; line-height: 1.7; }
.linklike { background: none; border: none; padding: 0; font: inherit; color: var(--text-secondary); cursor: pointer; text-align: left; }
.linklike:hover { color: var(--accent-text); text-decoration: underline; }
.footer-bottom { max-width: 1200px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--border-color); font-size: 0.8rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Back to top ------------------------------------------------------------ */
.back-to-top { position: fixed; bottom: 30px; right: 30px; background-color: var(--btn-bg); color: #fff; width: 48px; height: 48px; border-radius: 50%; display: flex; justify-content: center; align-items: center; text-decoration: none; font-size: 1.4rem; opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease; z-index: 900; box-shadow: var(--card-shadow); }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-4px); background-color: var(--btn-bg-hover); }

/* Cookie banner & preferences dialog (PECR) ------------------------------ */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 2000;
    background-color: var(--card-bg); color: var(--text-primary);
    border-top: 2px solid var(--accent-color); box-shadow: 0 -6px 20px rgba(0,0,0,0.15);
    padding: 1.25rem 2rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-banner p { font-size: 0.9rem; color: var(--text-secondary); max-width: 720px; }
.cookie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
/* Accept and Reject MUST have equal prominence (ICO guidance) */
.cookie-actions .btn { padding: 0.6rem 1.2rem; font-size: 0.95rem; }

.cookie-dialog { margin: auto; border: 1px solid var(--border-color); border-radius: 12px; padding: 0; max-width: 640px; width: calc(100% - 2rem); background: var(--card-bg); color: var(--text-primary); box-shadow: var(--card-shadow); }
.cookie-dialog::backdrop { background: rgba(15, 23, 42, 0.6); }
.cookie-dialog form { padding: 2rem; }
.cookie-dialog h2 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.cookie-dialog p { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 1rem; }
.cookie-category { border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; margin-bottom: 0.75rem; }
.cookie-category-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 600; }
.cookie-category p { margin: 0.5rem 0 0; font-size: 0.85rem; }
.always-on { font-size: 0.8rem; color: var(--accent-text); font-weight: 700; }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--border-color); border-radius: 28px; cursor: pointer; transition: background 0.2s; }
.switch .slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.switch input:checked + .slider { background: var(--btn-bg); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.dialog-actions { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.25rem; }
.dialog-actions .btn { padding: 0.6rem 1.2rem; font-size: 0.95rem; }

/* Legal / document pages ------------------------------------------------- */
.legal-container { max-width: 900px; margin: 8rem auto 4rem; padding: 3rem; background-color: var(--card-bg); border-radius: 12px; box-shadow: var(--card-shadow); border: 1px solid var(--border-color); }
.legal-container h1 { font-size: 2.1rem; margin-bottom: 0.5rem; font-weight: 700; }
.legal-meta { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }
.legal-container h2 { font-size: 1.35rem; margin: 2.5rem 0 1rem; font-weight: 600; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.legal-container h3 { font-size: 1.1rem; margin: 1.5rem 0 0.75rem; color: var(--accent-text); }
.legal-container p, .legal-container li { color: var(--text-secondary); margin-bottom: 0.9rem; }
.legal-container ul, .legal-container ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-container ol ol { margin-top: 0.5rem; }
.legal-container strong { color: var(--text-primary); }
.legal-container .toc { background: var(--surface-color); border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.legal-container .toc ol { margin: 0.5rem 0 0; }
.legal-container .toc li { margin-bottom: 0.25rem; }
.callout { border-left: 4px solid var(--accent-color); background: var(--surface-color); padding: 1rem 1.25rem; border-radius: 0 8px 8px 0; margin: 1.5rem 0; }
.callout p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 1rem 0 2rem; }
.legal-container table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.legal-container th, .legal-container td { border: 1px solid var(--border-color); padding: 0.75rem; text-align: left; vertical-align: top; color: var(--text-secondary); }
.legal-container th { color: var(--text-primary); background: var(--surface-color); font-weight: 600; }
.sitemap-list { list-style: none; padding-left: 0 !important; }
.sitemap-list > li { margin-bottom: 1.25rem; }
.sitemap-list ul { margin-top: 0.5rem; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 900px) {
    .menu-toggle { display: inline-flex; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--card-bg); border-bottom: 1px solid var(--border-color); box-shadow: var(--card-shadow);
    }
    .nav-links.open { display: flex; }
    .nav-links a { display: block; padding: 1rem 2rem; border-top: 1px solid var(--border-color); font-size: 1rem; }
    .nav-links .nav-cta { border-radius: 0; padding: 1rem 2rem; }
    .hero { padding-top: 9rem; }
    .hero h1 { font-size: 2.3rem; }
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .contact-content { padding: 2rem 1.25rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .back-to-top { right: 16px; bottom: 16px; }
    section { padding: 4rem 1rem; }
    .section-title { font-size: 2rem; }
    .legal-container { margin: 6.5rem 1rem 2rem; padding: 1.5rem; }
    .cookie-banner { padding: 1rem; }
}
@media (max-width: 600px) {
    .nav-container { padding: 0.75rem 1rem; }
    .form-grid { grid-template-columns: 1fr; }
    .cookie-actions .btn { flex: 1 1 auto; text-align: center; }
}

/* Print (legal pages export cleanly to PDF) */
@media print {
    body { background: #fff; color: #000; }
    .site-nav, .site-footer, .back-to-top, .cookie-banner, .cookie-dialog { display: none !important; }
    .legal-container { box-shadow: none; border: none; margin: 0; padding: 0; max-width: 100%; }
    .legal-container h2, .legal-container h3 { page-break-after: avoid; }
}
