/* =========================================================
   Project: Sunny Assist – Remote Web, Docs & Admin Support
   Author: Sunny Assist (Giada)
   Role: Design, front-end implementation & web accessibility-aware UI

   Overview:
   - Single-page marketing site for remote web, documentation and admin support
   - Custom logo system: abstract mark + bracketed wordmark on blueprint grid
   - Mobile-first layout with sticky header, hero summary card and service cards
   - Emphasis on calm, “quiet back-office” aesthetics and clear typography

   Technical notes:
   - Stack: HTML5, CSS3 (no frameworks)
   - Layout: flexbox + CSS grid, max-width container
   - Styling: token-based theming via :root custom properties
   - Extras: print stylesheet, prefers-reduced-motion and forced-colors support

   Web accessibility:
   - Skip link and visible focus outlines
   - Keyboard-friendly navigation and CTA buttons
   - High contrast mode support and careful use of ARIA in markup
   - Optional in-page web accessibility toolbar (local preferences)

   Last updated: 2025-12-15
   ========================================================= */


/* =========================================================
   0) Design tokens & global reset
   ========================================================= */

:root {
    --bg: #f4f6fb;
    --surface: #ffffff;

    --ink: #1f2933;
    --ink-2: #4b5563;

    --accent: #0f766e;
    --accent-soft: #e0f2f1;
    --accent-warm: #f97316;

    --line: #d1d5db;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.09);

    --radius: 16px;
    --maxw: 1120px;

    /* Wordmark system (mono) */
    --wm-font: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    --wm-weight: 500;
    --wm-track: 0.22em;

    --link: var(--accent);
    --link-visited: #9a3412;

    --text-main: #1f2933;
    --text-muted: #4b5563;
}

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

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Work Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text-main);
    background: radial-gradient(900px 400px at 0% 0%, #e5f0ff 0, #f4f6fb 45%, #eef2ff 100%);
    line-height: 1.6;
    letter-spacing: 0.1px;
}

.section-sub,
.hero-note,
.footer-meta {
    color: var(--text-muted);
}

@media (prefers-contrast: more) {
    body {
        color: #000;
    }

    a {
        text-decoration-thickness: 0.14em;
    }
}


/* =========================================================
   1) Layout utilities
   ========================================================= */

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

.stack {
    display: grid;
    gap: 14px;
}

.cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}


/* =========================================================
   2) Header & navigation
   ========================================================= */

header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(244, 246, 251, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(209, 213, 219, 0.6);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    flex-wrap: wrap;
    row-gap: 6px;
}

.logo-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    text-align: left;
}

header .logo {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    transition: transform 160ms ease-out;
}

.logo-mark {
    display: none;
}

.logo-text {
    display: grid;
    gap: 6px;
    justify-items: start;
    text-align: left;
}

.logo-sub {
    font-family: var(--wm-font);
    font-weight: 500;
    font-size: 0.84rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(11, 18, 32, 0.72);
    line-height: 1.25;
    max-width: 100%;
    white-space: normal;
}

.logo-link {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    align-self: flex-start;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(15, 118, 110, 0.5);
    cursor: pointer;
    margin-top: 12px;
    transition: color 140ms ease-out, border-color 140ms ease-out, opacity 140ms ease-out;
}

.logo-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    opacity: 0.9;
}

.logo-link:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.55);
    outline-offset: 3px;
    border-bottom-color: var(--accent);
    opacity: 1;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

header nav a {
    position: relative;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--ink-2);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(209, 213, 219, 0.9);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
    transition: color 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out,
        transform 120ms ease-out, border-color 150ms ease-out;
}

header nav a::after {
    content: "";
    position: absolute;
    left: 22%;
    right: 22%;
    bottom: 3px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
    opacity: 0;
    transform: scaleX(0.4);
    transform-origin: center;
    transition: opacity 150ms ease-out, transform 150ms ease-out;
}

header nav a:hover {
    color: var(--accent);
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

header nav a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Keyboard focus for header nav */
header nav a:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.45);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.12);
    color: var(--accent);
    background: #ffffff;
    border-color: var(--accent);
}


/* =========================================================
   2.1) Logo system (mark + bracketed wordmark)
   ========================================================= */

.logo-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.9);
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 118, 110, 0.08);
    white-space: nowrap;
    transition: box-shadow 160ms ease-out, border-color 160ms ease-out, background-color 160ms ease-out;
}

.mark {
    display: inline-flex;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
}

.mark svg {
    display: block;
    width: 26px;
    height: 26px;
}

.logo-ascii {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding: 14px 18px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.33);
    background: linear-gradient(to bottom, #e4f0ee 0%, #f2f9f8 55%, #ffffff 100%);
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.1);
    overflow: hidden;
    user-select: none;
    white-space: nowrap;
    max-width: 100%;
}

.logo-ascii .grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
    border-radius: inherit;
}

.logo-ascii>* {
    position: relative;
    z-index: 1;
}

.logo-ascii .word {
    font-family: var(--wm-font);
    font-weight: var(--wm-weight);
    letter-spacing: var(--wm-track);
    font-size: 20px;
    line-height: 1;
    text-transform: uppercase;
    color: rgba(11, 18, 32, 0.92);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-ascii .bkt {
    font-family: var(--wm-font);
    font-weight: var(--wm-weight);
    font-size: 20px;
    line-height: 1;
    letter-spacing: 0;
    color: rgba(15, 118, 110, 0.99);
}

.logo-ascii .bkt:last-of-type {
    margin-left: -0.18em;
}

header .logo:hover {
    transform: translateY(-1px);
}

header .logo:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.55);
    outline-offset: 6px;
    border-radius: 18px;
    transform: none;
}

header .logo:focus-visible .logo-type {
    border-color: rgba(15, 118, 110, 0.95);
    box-shadow: 0 16px 30px rgba(15, 118, 110, 0.14);
}

@media (hover: none) {
    header .logo:hover {
        transform: none;
    }

    header .logo:hover .logo-type {
        box-shadow: 0 12px 26px rgba(15, 118, 110, 0.08);
    }
}


/* =========================================================
   3) Hero section & CTA buttons
   ========================================================= */

main {
    padding-bottom: 40px;
}

.hero {
    padding: 52px 0 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

.hero-title {
    font-family: "Bricolage Grotesque", ui-sans-serif;
    font-size: clamp(2.1rem, 3.4vw, 3rem);
    line-height: 1.08;
    margin: 0 0 12px;
    color: var(--ink);
}

.hero-title .hero-accent {
    color: var(--accent);
}

.hero-lead {
    font-size: 1.05rem;
    color: var(--ink-2);
    margin: 0 0 10px;
}

/* Hero: capability badges */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 12px;
    padding: 0;
    list-style: none;
}

.badge {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #ffffff;
    font-size: 0.9rem;
    color: var(--ink-2);
}

/* Icon + text in a row inside hero pills */
.badge-row .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* CTA buttons (primary + ghost) */
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.35);
    transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(15, 118, 110, 0.4);
}

/* Contact button: stack main label + sub-line */
.btn-contact {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.btn-contact .btn-main {
    line-height: 1.05;
}

.btn-contact .btn-sub {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.92;
    line-height: 1.1;
    white-space: nowrap;
}

.btn-ghost {
    background: #ffffff;
    color: var(--ink);
    border-color: var(--line);
    transition: background-color 160ms ease-out;
}

.btn-ghost:hover {
    background: #f9fafb;
}

.hero-note {
    font-size: 0.9rem;
    color: var(--ink-2);
    margin-top: 14px;
}

/* Hero summary card */
.hero-card-label {
    display: inline-block;
    padding: 4px 10px;
    margin-bottom: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-weight: 600;
}

.hero-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 18px 18px 16px;
}

.hero-card h2 {
    font-family: "Bricolage Grotesque", ui-sans-serif;
    font-size: 1.2rem;
    margin: 0 0 6px;
}

.hero-card p {
    font-size: 0.95rem;
    color: var(--ink-2);
    margin: 0;
}

.hero-list {
    margin: 10px 0 0;
    padding-left: 20px;
    font-size: 0.95rem;
    color: var(--ink-2);
}

.hero-list li {
    margin-bottom: 4px;
}

.hero-list strong,
.task-list strong {
    font-weight: 600;
    color: var(--ink);
}

/* Hero badges: on-demand highlight */
.badge.badge-on-demand {
    background: var(--accent-soft);
    border: 1px solid rgba(15, 118, 110, 0.35);
    color: var(--accent);
    font-weight: 500;
}


/* =========================================================
   4) Sections & grid system
   ========================================================= */

section {
    padding: 28px 0;
    border-top: 1px solid rgba(209, 213, 219, 0.6);
}

section:first-of-type {
    border-top: none;
}

/* Offset for in-page anchors under sticky header */
section[id] {
    scroll-margin-top: 90px;
}

.section-title {
    font-family: "Bricolage Grotesque", ui-sans-serif;
    font-size: 1.4rem;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-sub {
    margin: 0 0 18px;
    font-size: 0.98rem;
    color: var(--ink-2);
    max-width: none;
}

/* 12-column grid utilities */
.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(12, 1fr);
}

.span-12 {
    grid-column: span 12;
}

.span-6 {
    grid-column: span 6;
}

.span-4 {
    grid-column: span 4;
}


/* =========================================================
   5) Cards, lists & quote block
   ========================================================= */

.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 16px 16px 14px;
}

.card h3 {
    font-family: "Bricolage Grotesque", ui-sans-serif;
    font-size: 1.05rem;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card p {
    font-size: 0.95rem;
    color: var(--ink-2);
    margin: 0;
}

/* Reusable bullet list for service items */
.task-list {
    margin: 10px 0 0;
    padding-left: 20px;
    font-size: 0.95rem;
    color: var(--ink-2);
}

.task-list li {
    margin-bottom: 4px;
}

/* Brand quote block */
blockquote {
    margin: 0;
    padding: 14px 16px;
    border-left: 4px solid var(--accent);
    background: #ffffff;
    border-radius: 0 12px 12px 0;
    font-size: 0.95rem;
    color: var(--ink-2);
}


/* =========================================================
   6) Services: area labels & grouped cards
   ========================================================= */

.services-area-label {
    grid-column: span 12;
    margin-top: 6px;
}

#services .services-area-label:first-of-type {
    margin-top: 6px;
}

/* Section chips for macro-areas (Web, Docs, Admin) */
.services-area-chip {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 6px 16px;
    min-height: 40px;
    background: var(--accent-soft);
    border-radius: 999px;
    border: 1px solid var(--accent);
    box-shadow: 0 6px 14px rgba(15, 118, 110, 0.18);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    width: 100%;
    box-sizing: border-box;
}

.services-area-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    margin-top: 18px;
}

.services-area-group .card {
    height: 100%;
}


/* =========================================================
   7) Accessibility two-column card
   ========================================================= */

.accessibility-inner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.accessibility-col {
    flex: 1 1 0;
    min-width: 0;
}


/* =========================================================
   8) Portfolio links (external work list)
   ========================================================= */

.links {
    display: grid;
    gap: 10px;
    max-width: var(--maxw);
    width: 100%;
}

.links a {
    position: relative;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: center;
    column-gap: 18px;
    padding: 12px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #ffffff;
    text-decoration: none;
    color: var(--ink);
    font-size: 0.95rem;
    overflow: visible;
    transition: transform 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out,
        background-color 160ms ease-out;
    background-clip: padding-box;
    outline: none;
}

.links a::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 4px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 160ms ease-out;
}

.links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    border-color: var(--accent);
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.04), #ffffff);
}

.links a:hover::before {
    opacity: 1;
}

.links a strong {
    display: block;
    white-space: normal;
    color: var(--link);
    text-decoration: none;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.08em;
    transition: color 160ms ease-out;
}

.links a span {
    color: var(--ink-2);
    font-size: 0.9rem;
}

.links a .ext-icon {
    display: inline-block;
    margin-left: 0.35em;
    font-size: 0.95em;
    opacity: 0.88;
    transform: translateY(-0.02em);
}

/* Portfolio links: visited / hover / focus states */
.links a:visited strong {
    color: var(--link-visited);
}

.links a:hover strong,
.links a:focus-visible strong {
    color: var(--accent);
    text-decoration: underline;
}

.links a:visited .ext-icon {
    color: var(--link-visited);
    opacity: 0.95;
}

.links a:hover .ext-icon,
.links a:focus-visible .ext-icon {
    color: var(--accent);
}

/* Focus ring for portfolio links */
.links a:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.45);
    outline-offset: 4px;
    box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.12);
}


/* =========================================================
   9) Update banners & accessibility notes
   ========================================================= */

.update-banner {
    margin-top: 18px;
    margin-bottom: 8px;
    padding: 10px 14px;
    border-radius: 0 12px 12px 0;
    border: 1px solid #fbbf24;
    border-left-width: 4px;
    background: #fffbeb;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ink-2);
}

.update-banner strong {
    color: #92400e;
}

/* Inline section-level update note */
.section-update-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin: 6px 0 18px;
    border-radius: 999px;
    background: #fffbeb;
    border: 1px solid #fbbf24;
    font-size: 0.85rem;
    color: var(--ink-2);
}

.section-update-note strong {
    color: #92400e;
}

/* Accessibility pill (hero banner + footer note) */
.a11y-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: normal;
    max-width: 100%;
}

.a11y-pill-main {
    font-weight: 600;
}

.a11y-pill-sub {
    margin-left: 4px;
}

.a11y-banner-note {
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--ink-2);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}


/* =========================================================
   10) Contact section & footer
   ========================================================= */

.contact-note {
    font-size: 0.95rem;
    color: var(--ink-2);
    margin-top: 8px;
}

footer {
    border-top: 1px solid rgba(209, 213, 219, 0.8);
    padding: 18px 0 26px;
    font-size: 0.9rem;
    color: var(--ink-2);
    background: var(--bg);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
}

.footer-main,
.footer-role {
    font-family: var(--wm-font);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-main {
    margin: 0;
    line-height: 1.2;
    font-weight: 600;
    font-size: 0.76rem;
    color: rgba(31, 41, 51, 0.72);
}

.footer-role {
    display: block;
    margin-top: 4px;
    font-weight: 500;
    font-size: 0.7rem;
    line-height: 1.25;
    color: rgba(31, 41, 51, 0.88);
}

.footer-meta {
    margin: 0;
    padding-top: 12px;
    margin-top: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgb(31, 41, 51);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-meta::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 96px;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(to right, transparent, rgba(15, 118, 110, 0.22), transparent);
}

.footer-bullet {
    opacity: 0.88;
}

.footer-meta-text {
    white-space: nowrap;
}

.footer-mark {
    display: inline-flex;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    align-items: center;
    justify-content: center;
    transform: translateY(0.5px);
    margin-right: -3px;
}

.footer-mark svg {
    width: 14px;
    height: 14px;
    display: block;
}

.footer-brand {
    font-weight: 600;
}

/* =========================================================
   Footer badges: HTML validation (W3C) + WAVE accessibility
   ========================================================= */

/* Shared pill container for W3C and WAVE badges */
.footer-validation,
.footer-wave {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--ink-2);
    display: inline-flex;
    flex-direction: column;
    /* text and note stacked vertically */
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.85);
    background: rgba(255, 255, 255, 0.9);
}

/* Link styling for both badges: logo + underlined text */
.footer-validation-link,
.footer-wave-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.08em;
}

/* Slightly stronger underline hover state */
.footer-validation-link:hover,
.footer-wave-link:hover {
    text-decoration-thickness: 0.12em;
}

/* Logo sizing for W3C and WAVE marks */
.footer-validation-logo,
.footer-wave-logo {
    height: 32px;
    width: auto;
    display: block;
}

/* Main text inside each badge */
.footer-validation-text,
.footer-wave-text {
    text-align: center;
}

/* Small note below each badge: manual check dates */
.footer-validation-note,
.footer-wave-note {
    margin-top: 2px;
    font-size: 0.8rem;
    line-height: 1.3;
}

.footer-a11y {
    margin: 6px 0 0;
}


/* =========================================================
   11) Global links & focus styles
   ========================================================= */

/* Base link styling */
a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.08em;
}

/* Visited links (site-wide) */
a:visited {
    color: color-mix(in srgb, var(--accent) 72%, var(--ink) 28%);
}

/* Hover: slightly stronger underline */
a:hover {
    text-decoration-thickness: 0.12em;
}

/* Keyboard focus: always visible */
a:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 55%, white 45%);
    outline-offset: 3px;
    border-radius: 10px;
}

/* Avoid removing focus styles globally */
a:focus {
    outline: none;
}

/* Buttons: keyboard focus parity */
.btn:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.45);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.12);
}


/* =========================================================
   12) A11y utilities (skip link, sr-only, focus fallback)
   ========================================================= */

.skip-link {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 9999;
    padding: 10px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 160ms ease-out;
}

.skip-link:focus-visible {
    transform: translateY(0);
    outline: none;
    box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.12);
}

/* Screen-reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* External link hint icon (generic) */
.ext-icon {
    display: inline-block;
}

/* Global focus ring fallback */
:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.55);
    outline-offset: 3px;
}


/* =========================================================
   13) Responsive layout
   ========================================================= */

/* 1130 -> 961: header breathing room only */
@media (max-width: 1130px) and (min-width: 961px) {
    header .wrap {
        padding-left: 32px;
        padding-right: 32px;
    }
}

/* Desktop wide: hero two columns */
@media (min-width: 961px) {
    .hero {
        grid-template-columns: minmax(0, 3.2fr) minmax(0, 2.3fr);
    }

    /* Desktop: keep both hero line breaks */
    .hero-title .hero-break-top,
    .hero-title .hero-break-bottom {
        display: inline;
    }
}

/* <= 960px: grid/layout adjustments */
@media (max-width: 960px) {
    header .wrap {
        padding-left: 24px;
        padding-right: 24px;
    }

    /* Below 960px: one long first line, break only before "Delivered remotely." */
    .hero-title .hero-break-top {
        display: none;
    }

    .hero-title .hero-break-bottom {
        display: inline;
    }

    /* <= 960px: make service area chips full-width */
    .services-area-chip {
        width: 100%;
        box-sizing: border-box;
    }

    #ways .span-4 {
        grid-column: span 12;
    }

    .span-6 {
        grid-column: span 12;
    }

    .span-4 {
        grid-column: span 6;
    }
}

/* <= 860px: center header + allow nav wrap */
@media (max-width: 860px) {
    .header-inner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        flex-wrap: nowrap;
        row-gap: 6px;
        padding: 10px 0 8px;
    }

    header .logo {
        width: 100%;
        justify-content: center;
    }

    .logo-block {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .logo-text {
        justify-items: center;
        text-align: center;
    }

    .logo-link {
        align-self: center;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    header nav {
        width: 100%;
        justify-content: center;
        gap: 14px;
        padding-top: 6px;
        margin-top: 4px;
        border-top: 1px solid rgba(209, 213, 219, 0.7);
        flex-wrap: wrap;
    }
}


/* 391px–649px: hero badges in two columns, last one full-width */
@media (max-width: 649px) and (min-width: 391px) {
    .badge-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-between;
    }

    .badge-row .badge {
        flex: 0 0 calc(50% - 6px);
        /* two per row */
        display: block;
        /* text-align works */
        text-align: center;
        /* center lines of text */
        padding: 6px 12px;
    }

    .badge-row .badge span[aria-hidden="true"] {
        display: inline-block;
        /* icon in the text flow */
        vertical-align: middle;
        margin-right: 4px;
        /* icon attached to text */
    }

    .badge-row .badge.badge-on-demand {
        flex-basis: 100%;
        /* last pill full width */
    }
}

/* <= 640px: stack spans + links + accessibility card */
@media (max-width: 640px) {
    .span-4 {
        grid-column: span 12;
    }

    .links a {
        grid-template-columns: 1fr;
        row-gap: 4px;
    }

    .accessibility-inner {
        flex-direction: column;
        gap: 12px;
    }

    .accessibility-col {
        flex: 1 1 auto;
        width: 100%;
    }

    .accessibility-col+.accessibility-col {
        border-top: 1px solid rgba(209, 213, 219, 0.7);
        padding-top: 12px;
        margin-top: 2px;
    }

    #services .accessibility-inner .task-list {
        padding-left: 18px;
    }

    .logo-sub {
        padding: 0 12px;
    }

    .section-update-note {
        border-radius: var(--radius);
    }

    .a11y-banner-note {
        align-items: flex-start;
    }

    .footer-a11y .a11y-pill,
    .footer-validation,
    .footer-wave {
        width: 100%;
        max-width: 360px;
        justify-content: center;
        flex-wrap: wrap;
        border-radius: var(--radius);
        margin: 0 auto;
    }

    .a11y-pill-sub {
        display: block;
        margin-left: 0;
        margin-top: 2px;
        text-align: center;
    }
}

/* W3C logo size adjustment on narrow screens */
@media (max-width: 480px) {

    .footer-validation-logo,
    .footer-wave-logo {
        height: 26px;
    }
}

/* <= 420px: small phones */
@media (max-width: 420px) {

    html,
    body {
        overflow-x: hidden;
    }

    .wrap {
        padding: 0 16px;
    }

    section[id] {
        scroll-margin-top: 130px;
    }

    .logo-type {
        padding: 6px 8px;
        gap: 6px;
        max-width: 100%;
        margin-top: 10px;
    }

    .header-inner {
        padding-bottom: 12px;
        /* extra breathing room under the menu */
    }

    .mark {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
    }

    .mark svg {
        width: 22px;
        height: 22px;
    }

    .logo-ascii {
        padding: 12px 14px 10px;
        gap: 8px;
    }

    .logo-ascii .word,
    .logo-ascii .bkt {
        font-size: 18px;
    }

    .logo-ascii .word {
        letter-spacing: 0.18em;
    }

    .update-banner {
        padding: 10px 18px;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .footer-meta-text {
        white-space: normal;
    }
}

/* <= 405px: stacked navigation */
@media (max-width: 405px) {
    header nav {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 10px;
        flex-wrap: nowrap;
    }

    header nav a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* =========================================================
   14) Small screens: hero badges & extra-tight layouts
   ========================================================= */

/* <= 390px: stacked hero badges */
@media (max-width: 390px) {
    .badge-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .badge {
        width: 100%;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }
}

/* <= 340px: tighten further */
@media (max-width: 340px) {
    .wrap {
        padding: 0 12px;
    }

    section[id] {
        scroll-margin-top: 145px;
    }

    .logo-type {
        padding: 6px 6px;
    }

    .logo-ascii {
        padding: 11px 12px 9px;
    }

    .logo-ascii .word,
    .logo-ascii .bkt {
        font-size: 16px;
    }

    .logo-ascii .word {
        letter-spacing: 0.16em;
    }

    .hero {
        padding: 44px 0 22px;
        gap: 22px;
    }

    header nav a {
        padding: 6px 12px;
        font-size: 0.92rem;
    }
}


/* W3C badge layout refinement around ~320px width */
@media (max-width: 360px) {

    .footer-validation,
    .footer-wave {
        padding: 10px 12px;
        max-width: 100%;
    }

    .footer-validation-link,
    .footer-wave-link {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }

    .footer-validation-logo,
    .footer-wave-logo {
        height: 22px;
    }
}

/* <= 320px: softer radius on very small devices */
@media (max-width: 320px) {
    .services-area-chip {
        border-radius: var(--radius);
    }
}

/* <= 280px: ultra-narrow phones */
@media (max-width: 280px) {

    /* Slightly smaller base text + more side padding */
    body {
        font-size: 15px;
    }

    .wrap {
        padding: 0 18px;
        /* more space from the edges */
    }

    section[id] {
        scroll-margin-top: 165px;
    }

    .hero {
        padding: 40px 0 20px;
        gap: 20px;
    }

    .hero-title {
        font-size: clamp(1.6rem, 9vw, 2.05rem);
        line-height: 1.1;
    }

    .hero-lead {
        font-size: 0.98rem;
    }

    .hero-list,
    .task-list,
    .card p,
    .hero-card p,
    .section-sub,
    #contact p,
    .contact-note {
        font-size: 0.92rem;
    }

    .section-update-note,
    .a11y-pill {
        border-radius: var(--radius);
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .update-banner {
        text-align: center;
    }

    .badge {
        border-radius: var(--radius);
    }

    .hero-card-label {
        border-radius: var(--radius);
        display: flex;
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .services-area-chip {
        font-size: 0.82rem;
        letter-spacing: 0.06em;
        padding: 6px 12px;
        min-height: 36px;
        border-radius: var(--radius);
    }

    /* Logo subtitle: slightly smaller, more breathing room */
    .logo-sub {
        font-size: 0.70rem;
        padding: 0 8px;
    }

    .logo-ascii .word,
    .logo-ascii .bkt {
        font-size: 15px;
    }

    .logo-ascii .word {
        letter-spacing: 0.14em;
    }
}

/* <= 260px: extra breathing room on ultra-narrow devices */
@media (max-width: 260px) {

    /* More side padding so text + badges are not glued to the edges */
    .wrap {
        padding: 0 24px;
    }

    /* Hero spacing a bit tighter vertically */
    .hero {
        padding: 38px 0 20px;
        gap: 18px;
    }

    /* Hero title a touch smaller */
    .hero-title {
        font-size: clamp(1.5rem, 8.6vw, 1.9rem);
        line-height: 1.08;
    }

    .hero-lead {
        font-size: 0.95rem;
    }

    /* Logo subtitle: smaller + more inner padding so it does not touch the sides */
    .logo-sub {
        font-size: 0.68rem;
        padding: 0 6px;
    }

    /* Keep pills and small labels rounded and centred */
    .hero-card-label,
    .section-update-note,
    .a11y-pill,
    .badge {
        border-radius: var(--radius);
        text-align: center;
    }
}


/* =========================================================
   15) Reduced motion support
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* =========================================================
   16) Forced colors (High Contrast Mode)
   ========================================================= */

@media (forced-colors: active) {
    * {
        forced-color-adjust: auto;
    }

    body {
        background: Canvas;
        color: CanvasText;
    }

    a {
        color: LinkText;
        text-decoration: underline;
    }

    a:visited {
        color: VisitedText;
    }

    :focus-visible {
        outline: 2px solid Highlight;
        outline-offset: 3px;
        box-shadow: none;
    }

    .card,
    .hero-card,
    header nav a,
    .services-area-chip,
    .update-banner,
    .section-update-note {
        background: Canvas;
        color: CanvasText;
        border: 1px solid CanvasText;
        box-shadow: none;
    }

    .badge,
    .a11y-pill,
    .hero-card-label {
        background: Canvas;
        color: CanvasText;
        border: 1px solid CanvasText;
    }

    .mark svg,
    .footer-mark svg,
    .logo-ascii .grid {
        forced-color-adjust: auto;
    }

    header {
        background: Canvas;
        backdrop-filter: none;
    }
}


/* =========================================================
   17) Small-screen fixes (<= 390px) & contact CTA refinements
   ========================================================= */

/* Fix 1: keep badge icon on the left, never centered on its own line */
@media (max-width: 390px) {
    .badge-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .badge-row .badge {
        width: 100%;
        display: block;
        /* Keep icon inside text flow */
        text-align: center;
        padding: 10px 12px;
        /* Slightly taller for multi-line badges */
    }

    .badge-row .badge span[aria-hidden="true"] {
        display: inline-block;
        /* Emoji stays inline, never on its own row */
        vertical-align: middle;
        margin-right: 6px;
        /* Attach emoji to text */
        line-height: 1;
    }

    .badge-row .badge .badge-text {
        display: inline;
        /* Ensure it remains in the same inline flow */
        overflow-wrap: anywhere;
    }
}

/* Allow the sub-line to wrap gracefully on very small screens */
@media (max-width: 360px) {
    .btn-contact .btn-sub {
        white-space: normal;
        text-align: center;
    }
}

/* Fix 2: W3C footer link readability at ~320px */
@media (max-width: 360px) {
    .footer-validation {
        border-radius: var(--radius);
        padding: 10px 12px;
        max-width: 100%;
    }

    .footer-validation-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }

    .footer-,
    .footer-wave-logo {
        height: 22px !important;
        width: auto !important;
        display: block;
    }

    .footer-validation-link span {
        display: block;
        line-height: 1.35;
        text-wrap: balance;
    }
}

/* Contact button: force two-line label (main + sub-line) */
a.btn.btn-primary.btn-contact {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

a.btn.btn-primary.btn-contact .btn-main,
a.btn.btn-primary.btn-contact .btn-sub {
    display: block;
    width: 100%;
}

a.btn.btn-primary.btn-contact .btn-main {
    line-height: 1.08;
}

a.btn.btn-primary.btn-contact .btn-sub {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.1;
    opacity: 0.92;
}

/* Allow wrapping on very small screens */
@media (max-width: 360px) {
    a.btn.btn-primary.btn-contact .btn-sub {
        font-size: 0.74rem;
        white-space: normal;
    }
}

/* Contact: push "Back to top" to the right within CTA row */
#contact .cta-row .btn-ghost {
    margin-left: auto;
}

/* =========================================================
  18)Accessibility toolbar (Sunny Assist)
   ========================================================= */

.sa-a11y-toolbar {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 10001;
    /* Above header (z=20) and most UI */
}

.sa-a11y-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    box-shadow: var(--shadow);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
}

.sa-a11y-toggle:focus-visible,
.sa-a11y-panel button:focus-visible,
.sa-a11y-panel input:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.55);
    outline-offset: 3px;
}

/* Dialog overlay */
.sa-a11y-panel[hidden] {
    display: none;
}

.sa-a11y-panel {
    position: fixed;
    inset: 0;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.55);
    display: grid;
    place-items: end;
    padding: 12px;
}

.sa-a11y-panel__inner {
    width: min(420px, 100%);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
    padding: 14px;
}

.sa-a11y-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.sa-a11y-panel__title {
    margin: 0;
    font-family: "Bricolage Grotesque", ui-sans-serif;
    font-size: 1.05rem;
}

.sa-a11y-close {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 6px 10px;
    cursor: pointer;
}

.sa-a11y-panel__controls {
    display: grid;
    gap: 10px;
}

.sa-a11y-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sa-a11y-buttons button {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
}

.sa-a11y-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sa-a11y-reset {
    margin-top: 4px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
}

/* Preference hooks applied to <html> */
html[data-sa-a11y-underline="on"] a {
    text-decoration-thickness: 0.14em !important;
    text-decoration: underline !important;
    text-underline-offset: 0.18em !important;
}

html[data-sa-a11y-contrast="on"] body {
    background: #ffffff !important;
    color: #000000 !important;
}

html[data-sa-a11y-contrast="on"] .card,
html[data-sa-a11y-contrast="on"] .hero-card,
html[data-sa-a11y-contrast="on"] header nav a,
html[data-sa-a11y-contrast="on"] .update-banner,
html[data-sa-a11y-contrast="on"] .section-update-note {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
    box-shadow: none !important;
}

/* Forced colors: keep it predictable */
@media (forced-colors: active) {

    .sa-a11y-toggle,
    .sa-a11y-panel__inner,
    .sa-a11y-close,
    .sa-a11y-buttons button,
    .sa-a11y-reset {
        forced-color-adjust: auto;
        background: Canvas;
        color: CanvasText;
        border: 1px solid CanvasText;
        box-shadow: none;
    }
}


/* =========================================================
   19) Print styles
   ========================================================= */

@media print {
    * {
        box-shadow: none;
        text-shadow: none;
    }

    body {
        background: #ffffff;
        color: #000000;
    }

    header {
        position: static;
        background: #ffffff;
        border-bottom: 1px solid #cccccc;
    }

    header nav {
        display: none;
    }

    .wrap {
        max-width: 100%;
        padding: 0 10mm;
    }

    .card,
    .hero-card {
        border-color: #cccccc;
    }

    a {
        color: #000000;
        text-decoration: underline;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    .btn,
    .badge {
        border: 1px solid #000000;
        background: #ffffff;
        box-shadow: none;
    }
}