Files
SlpSoftware/src/index.css
T

238 lines
6.0 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
/* Theme tokens: variant (b | e) x mode (light | dark), selected by <html data-variant data-mode>
(set before first paint by public/theme-init.js and kept in sync by ThemeProvider).
Semantic names stay the same so the Tailwind colors in tailwind.config.ts keep working.
B values follow the canvas design B (accent #7A1414); E values are base tokens, refined per era
in unit U5 (accent #AC0000). See
aidlc-docs/features/redesign-modern-timetravel/construction/theme-foundation/functional-design/domain-entities.md */
/* Default (also used when the attributes are missing): B light. */
:root,
html[data-variant='b'][data-mode='light'] {
color-scheme: light;
--color-bg: #ffffff;
--color-surface: #f1efec;
--color-surface-2: #ffffff;
--color-line: #e4e0dc;
--color-text: #0e0d0d;
--color-muted: #5c5753;
--color-accent: #7a1414;
--color-accent-soft: rgba(122, 20, 20, 0.1);
--color-accent-line: rgba(122, 20, 20, 0.35);
--color-accent-hover: #911a1a;
--color-accent-contrast: #ffffff;
--color-brand: #7a1414;
--color-on-brand: #ffffff;
--color-body: #3f3b38;
--color-inv: #0e0d0d;
--color-panel: #ffffff;
--color-field: #f1efec;
--color-prog: #7a1414;
--color-danger: #b3261e;
}
html[data-variant='b'][data-mode='dark'] {
color-scheme: dark;
--color-bg: #0f0e0e;
--color-surface: #181615;
--color-surface-2: #232020;
--color-line: #3a3532;
--color-text: #f3f0ec;
--color-muted: #b3ada7;
--color-accent: #e5524a;
--color-accent-soft: rgba(229, 82, 74, 0.16);
--color-accent-line: rgba(229, 82, 74, 0.4);
--color-accent-hover: #ec6a62;
--color-accent-contrast: #0f0e0e;
--color-brand: #7a1414;
--color-on-brand: #ffffff;
--color-body: #d2cdc8;
--color-inv: #050404;
--color-panel: #1c1918;
--color-field: #0f0e0e;
--color-prog: #e5524a;
--color-danger: #ff8a80;
}
html[data-variant='e'][data-mode='light'] {
color-scheme: light;
--color-bg: #ffffff;
--color-surface: #f3f3f3;
--color-surface-2: #e9e9e9;
--color-line: #d0d0d0;
--color-text: #1a1a1a;
--color-muted: #555555;
--color-accent: #ac0000;
--color-accent-soft: rgba(172, 0, 0, 0.1);
--color-accent-line: rgba(172, 0, 0, 0.35);
--color-accent-hover: #c40000;
--color-accent-contrast: #ffffff;
--color-brand: #ac0000;
--color-on-brand: #ffffff;
--color-body: #333333;
--color-inv: #111111;
--color-panel: #ffffff;
--color-field: #f3f3f3;
--color-prog: #ac0000;
--color-danger: #b3261e;
}
html[data-variant='e'][data-mode='dark'] {
color-scheme: dark;
--color-bg: #1b1b1d;
--color-surface: #232326;
--color-surface-2: #2c2c30;
--color-line: #3d3d42;
--color-text: #ededed;
--color-muted: #a8a8ad;
--color-accent: #ff6b5e;
--color-accent-soft: rgba(255, 107, 94, 0.16);
--color-accent-line: rgba(255, 107, 94, 0.4);
--color-accent-hover: #ff8277;
--color-accent-contrast: #1b1b1d;
--color-brand: #ac0000;
--color-on-brand: #ffffff;
--color-body: #cfcfd3;
--color-inv: #0e0e10;
--color-panel: #232326;
--color-field: #1b1b1d;
--color-prog: #ff6b5e;
--color-danger: #ff8a80;
}
html {
scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
/* Clear keyboard focus on every interactive element (WCAG 2.4.7); uses the text colour of the
surrounding block so it is visible on the brand-red header and on light/dark panels. */
:where(a, button, select, input, textarea, [tabindex]):focus-visible {
outline: 2px solid currentColor;
outline-offset: 3px;
}
body {
background-color: var(--color-bg);
color: var(--color-text);
}
/* Smooth colour change on mode switch; instant for visitors who prefer reduced motion (BR-U1-9). */
html {
transition:
background-color 0.2s ease,
color 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
html {
transition: none;
}
}
@keyframes caret-blink {
50% {
opacity: 0;
}
}
.caret {
display: inline-block;
width: 9px;
height: 1.2em;
background: var(--color-accent);
animation: caret-blink 1.1s steps(1) infinite;
vertical-align: text-bottom;
}
@media (prefers-reduced-motion: reduce) {
.caret {
animation: none;
}
}
/* Time-travel transition between variants (BR-U1-6): a pixel-dither overlay that covers the page
(phase "cover"), stays while the variant swaps, then clears (phase "reveal"). Not rendered at all
under prefers-reduced-motion (see TransitionOverlay) and hidden here as a safety net. */
@keyframes tt-dither-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes tt-dither-out {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.tt-overlay {
position: fixed;
inset: 0;
z-index: 100;
pointer-events: all;
background-color: var(--color-accent);
background-image: conic-gradient(
var(--color-bg) 25%,
transparent 0 50%,
var(--color-bg) 0 75%,
transparent 0
);
background-size: 8px 8px;
image-rendering: pixelated;
}
.tt-overlay[data-phase='cover'] {
animation: tt-dither-in 300ms steps(6) forwards;
}
.tt-overlay[data-phase='swap'] {
opacity: 1;
}
.tt-overlay[data-phase='reveal'] {
animation: tt-dither-out 300ms steps(6) forwards;
}
@media (prefers-reduced-motion: reduce) {
.tt-overlay {
display: none;
}
}
/*
* Neutral hero HTML that the CMS host may write into the <!--CMS:HERO-HTML--> region of the first response
* (class names are the host's: cms-hero-*). Same look as the hero in Hero.tsx; React replaces it after loading.
*/
@layer components {
.cms-hero-title {
@apply text-[clamp(56px,10.5vw,168px)] font-extrabold leading-[0.88] tracking-[-0.03em] [font-stretch:125%];
}
.cms-hero-name {
@apply block;
}
.cms-hero-buttons {
@apply mt-12 flex flex-wrap gap-3 sm:mt-[72px];
}
.cms-hero-button {
@apply border-2 border-white px-6 py-[15px] text-base font-bold text-white no-underline transition-colors hover:bg-white hover:text-brand;
}
.cms-hero-button:first-child {
@apply bg-white px-[26px] py-[17px] text-[#0e0d0d] hover:bg-inv hover:text-white;
}
}