Queue-North-Website/src/index.css

159 lines
4.9 KiB
CSS
Raw Normal View History

2026-05-12 01:04:17 -05:00
@tailwind base;
@tailwind components;
@tailwind utilities;
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
2026-05-27 12:42:25 -05:00
overflow-x: hidden;
2026-05-12 01:04:17 -05:00
}
body {
font-family: 'Inter', sans-serif;
color: #0F172A;
background-color: #F8FAFC;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
2026-05-27 12:42:25 -05:00
overflow-x: hidden;
2026-05-12 01:04:17 -05:00
}
img {
max-width: 100%;
display: block;
}
2026-05-25 19:40:18 -05:00
.brand-logo-on-dark {
filter:
drop-shadow(0 1px 0 rgba(255, 255, 255, 0.6))
drop-shadow(1px 0 0 rgba(255, 255, 255, 0.45));
}
2026-05-12 01:04:17 -05:00
a {
color: #0EA5E9;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* Container - custom max-width */
2026-05-12 01:04:17 -05:00
.container {
max-width: 1280px;
2026-05-12 01:04:17 -05:00
margin: 0 auto;
padding: 0 16px;
}
/* Section spacing - mobile first */
.section {
padding: 4rem 0;
}
/* Desktop section spacing */
@media (min-width: 1024px) {
.section {
padding: 6rem 0;
}
}
/* Hero section styling */
.hero {
min-height: 70vh;
display: flex;
align-items: center;
background: linear-gradient(135deg, #0B2A3C 0%, #071A2A 100%);
color: white;
padding: 4rem 0 5rem;
}
/* Light section background */
.section-alt {
background: #EEF6FB;
}
fix(a11y): visible focus indicator, aria-expanded, and six Label-in-Name failures Batch 10, and only three of its six issues were real. The other three are answered on the tracker with the arithmetic. #189 — focus indicator. Footer and Home carried zero focus styling across 17 links. Added one global :focus-visible rule rather than sprinkling classes, because the issue's own scope was "all interactive <a> and <Link> elements". Not the ring the issue asked for. It suggested ring-primary-cyan; #22D3EE is 6.26:1 on navy and 2.38:1 on white, so on this light-first design that ring would have failed WCAG 1.4.11 across most of the site. Two rings instead — white inside, navy outside — so the white carries the dark bands and the navy carries the light sections. Worst case across every background in the palette is 13.62:1. box-shadow so both rings follow each element's own border-radius, plus a transparent outline for forced-colors mode. #192 — aria-expanded={isOpen} and aria-controls on the mobile nav trigger, and the id on SheetContent it now points at. Confirmed as "false" in the prerendered HTML. #193 — INVERTED. The issue asked for aria-labels to be added consistently to hero CTAs. The aria-labels already there were WCAG 2.5.3 Label in Name failures, Level A: "Schedule a consultation" is not a superset of the visible "Schedule Consultation", so a voice-control user saying what they see cannot activate the link. Doing what the issue asked would have spread a Level A failure. Removed the six that broke it; kept the eight that genuinely add context and do contain their visible text, including the icon-only header logo link that needs one. Audit now reports 0 failures across Home, Services, Footer and Header. Verified: npm run build; the ring is in the built CSS, aria-expanded="false" and id="mobile-nav-content" are in the prerendered HTML, all six removed labels are absent from it, and the visible CTA text still renders. NOT verified: nothing has been walked keyboard-only in a browser, and no screen reader has been used. That gap is recorded in docs/qa/ClaudeQACoverage.md. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:31:13 -05:00
@layer base {
/*
* Visible keyboard focus WCAG 2.4.7 (Focus Visible) and 1.4.11 (Non-text
* Contrast, which wants 3:1 for the indicator itself).
*
* Two rings, not one, and that is the whole point. This is a light-first
* design with dark navy bands through it, so no single colour clears 3:1
* everywhere: primary-cyan manages 6.26:1 on navy and only 2.38:1 on white,
* which is why the obvious `ring-primary-cyan` was not used. The white ring
* carries the dark sections and the navy ring carries the light ones, and on
* every background in the palette at least one of them clears 3:1 by a wide
* margin the worst case is 13.62:1.
*
* box-shadow rather than outline so both rings stack predictably and follow
* each element's own border-radius. The transparent outline is the standard
* escape hatch for Windows High Contrast / forced-colors mode, where
* box-shadow is discarded and an outline is not.
*
* :focus-visible, not :focus, so a mouse click does not leave a ring behind.
* :where() keeps specificity at zero, so any component can still override it.
*/
:where(a, button, [role="button"], summary, input, select, textarea):focus-visible {
box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 5px #0B2A3C;
outline: 2px solid transparent;
outline-offset: 2px;
}
}
fix(ui): header CTA clipped at iPad portrait, and reCAPTCHA cut off at 320px Two real defects, found by rendering the site rather than reading it. Neither was among the twenty issues filed for Batches 10 and 11. #214 (P1) — at exactly 768px, iPad portrait, the header's "Request Consultation" CTA measured x 676-778 against a 768px viewport: 10px sliced off, with no scrollbar to reveal it because html/body carry overflow-x:hidden. At that width the burger menu is already hidden, so the primary conversion action was simply unreachable. The nav's five gap-6 gaps were the slack; gap-4 at md (gap-6 from lg) frees 40px, keeping the CTA on screen at md rather than deferring it to lg and leaving 768-1023px with no CTA at all. #215 (P2) — Google's reCAPTCHA checkbox iframe is a fixed 304px that cannot be resized. At 320px it measured x 41-345, so 25px of branding and the privacy and terms links were clipped. Scaled to 0.85 below 360px with the wrapper height reduced to match, since transform does not affect layout and the form would otherwise gain dead space. Also adds scripts/qa-browser.mjs, which found them. It measures horizontal scroll, broken images, elements past the right edge, CLS and LCP across pages and viewports. Written because seven of the ten issues in Batches 10 and 11 misstated their own evidence, and two of those would have made the site worse if actioned. Two false positives in the tool itself, both fixed before trusting it: - Lazy images below the fold read as broken. It now scrolls the page AND chases each un-loaded image individually, and reports observed HTTP failures apart from never-rendered images. - `--paths / --viewports 320` swallowed "320" as a path. Argument collection now stops at the next flag. Verified against a local production build: 5 paths x 5 viewports, zero findings. Before the fix the same run reported the CTA overflow at 768 on four pages and the reCAPTCHA overflow at 320 on /contact. Not yet live — this needs a release and a deploy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 04:05:37 -05:00
@layer components {
fix(ui): header, Cisco logo and tap targets, found by rendering on devices Every page on ten emulated phones and tablets: 190 loads, 21 blocking and 530 high findings, on pages that had passed Batch 11 and Batch 16. #214 was fixed in v0.9.5 and released still broken. The check was a desktop window sized to 768, which has a scrollbar, so the layout viewport was ~753px and the md breakpoint the fix was about never engaged. At a true 768 the brand, six nav links and the CTA want 787px against 736px of container, so no amount of gap tightening closes it. The desktop row now starts at lg, and 768 to 1023 gets the Sheet menu, which is the better tablet experience regardless: 44px rows instead of 17px ones, and submenus that do not depend on hover. The CTA takes shrink-0 and whitespace-nowrap, so the next row that does not fit overflows visibly instead of being squeezed past the edge while the total still measures as fitting. The Cisco mark fills 66% of its 700x700 canvas, so both tiles scaled it up inside overflow-hidden and cut 13px off the trademark on / and 24px on /about. Cropping the viewBox to the artwork renders it at 62x46 on /, the same size as the 8x8 logo beside it, unscaled and unclipped. 491 standalone links were 17 to 26px tall. .tap-target grows the hit box and takes it back out of the layout, and every list using it moves to space-y-4: at space-y-2 neighbouring boxes overlap and measure 33px while not being there. Footer links also take block, so the row is the target. A 39x36 word is judged as a compact target wanting 44px; a 200x36 row wants 32. scripts/device-sweep.mjs and scripts/lib/css-audit.js are the instrument. They stay out of verify.sh: playwright is global here and the sweep needs a running server, and a guard that cannot run on a clean clone is one that gets skipped. After the fixes: zero blocking, zero high across all ten devices. Each defect was then re-introduced and reported again (clipped x1, media_overflow x1, past_viewport x19, touch_target x342). closes #238 closes #239 closes #240 closes #241 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-10 07:09:32 -05:00
/*
* A standalone text link is 17 to 20px tall. A finger needs about 32, and the
* device sweep found 491 links under that across the site: every footer
* column, the privacy contents, the related-services lists, the back links.
*
* This grows the hit box by 8px above and below and then takes those 8px back
* out of the layout, so the line the link sits on does not move.
*
* **The list it sits in must leave at least 16px between rows.** The negative
* margin does not shrink the box, only its effect on layout, so at the 8px
* spacing these lists used to have, each link's box reached 8px into a gap the
* neighbour was already reaching 8px into. They overlapped, hit-testing gave
* the whole gap to whichever painted last, and getBoundingClientRect still
* read 33px a checker satisfied by a target that was not really there. Every
* caller therefore pairs this with space-y-4 or gap-y-4, which makes the row
* pitch 33 and the boxes tile exactly.
*
* Not for a link inside a sentence: WCAG 2.5.8 exempts those, and the padding
* would reach into the lines above and below it.
*
* `display` is deliberately inline-block rather than a padding-only rule.
* Vertical padding on an inline box is painted and hit-tested but does not
* enter the line box, so an inline link would report a taller rect while
* overlapping its neighbours. Any caller that needs a different box (the
* "Learn more" links are inline-flex) sets it with a Tailwind utility, which
* wins on layer order.
*/
.tap-target {
display: inline-block;
padding-block: 0.5rem;
margin-block: -0.5rem;
}
fix(ui): header CTA clipped at iPad portrait, and reCAPTCHA cut off at 320px Two real defects, found by rendering the site rather than reading it. Neither was among the twenty issues filed for Batches 10 and 11. #214 (P1) — at exactly 768px, iPad portrait, the header's "Request Consultation" CTA measured x 676-778 against a 768px viewport: 10px sliced off, with no scrollbar to reveal it because html/body carry overflow-x:hidden. At that width the burger menu is already hidden, so the primary conversion action was simply unreachable. The nav's five gap-6 gaps were the slack; gap-4 at md (gap-6 from lg) frees 40px, keeping the CTA on screen at md rather than deferring it to lg and leaving 768-1023px with no CTA at all. #215 (P2) — Google's reCAPTCHA checkbox iframe is a fixed 304px that cannot be resized. At 320px it measured x 41-345, so 25px of branding and the privacy and terms links were clipped. Scaled to 0.85 below 360px with the wrapper height reduced to match, since transform does not affect layout and the form would otherwise gain dead space. Also adds scripts/qa-browser.mjs, which found them. It measures horizontal scroll, broken images, elements past the right edge, CLS and LCP across pages and viewports. Written because seven of the ten issues in Batches 10 and 11 misstated their own evidence, and two of those would have made the site worse if actioned. Two false positives in the tool itself, both fixed before trusting it: - Lazy images below the fold read as broken. It now scrolls the page AND chases each un-loaded image individually, and reports observed HTTP failures apart from never-rendered images. - `--paths / --viewports 320` swallowed "320" as a path. Argument collection now stops at the next flag. Verified against a local production build: 5 paths x 5 viewports, zero findings. Before the fix the same run reported the CTA overflow at 768 on four pages and the reCAPTCHA overflow at 320 on /contact. Not yet live — this needs a release and a deploy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 04:05:37 -05:00
/*
* reCAPTCHA v2's checkbox iframe is a fixed 304px and Google does not allow
* it to be resized. Below ~360px that overflows the viewport and gets sliced
* off by the overflow-x:hidden above taking the branding and the privacy
* and terms links with it. Scaling is the only lever available.
*
* The height is reduced by the same factor because transform does not affect
* layout: without it the wrapper would keep reserving the full-size box and
* the form would gain a strip of dead space under the widget. See #215.
*/
@media (max-width: 360px) {
.recaptcha-scale {
transform: scale(0.85);
transform-origin: 0 0;
height: 66px; /* 78px widget * 0.85, so the box matches what is drawn */
}
}
}