asw/src/layers/09-landing.css
Ludo b602a8d54e
refactor: CSS tasks 1-6 — add token aliases, fix all primitive leaks
- Rename 01-asw.css → 01-tokens.css (pure :root, no rules)
- Add semantic aliases: --weight-*, --shadow-*, --focus-ring-width,
  --dropdown-min-width, --space-5a, --weight-light, --border-width-thick
- Extract editorial rules from token file to components/layout
- Replace all Open Props primitives in layers 02-09 with semantic aliases
- Zero primitive leaks remain outside 01-tokens.css

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 15:26:02 +02:00

160 lines
5.5 KiB
CSS

/**
* 09-landing.css
* Landing-page specific layout and component styles.
* Loads after 08-layout so hero overrides correctly take precedence.
* Part of: Agentic Semantic Web
*/
/* ── [data-section] — horizontal-rule sections ──────────────────────────
Usage: <section data-section> or <section data-section="demo">
─────────────────────────────────────────────────────────────────────── */
[data-section] {
padding-block: var(--space-8);
border-bottom: var(--border-width) solid var(--border-subtle);
}
/* ── [data-section-header] — centered section heading ───────────────────
Usage: <header data-section-header> inside [data-section]
─────────────────────────────────────────────────────────────────────── */
[data-section-header] {
text-align: center;
margin-bottom: var(--space-6);
}
[data-section-header] h2 {
margin-bottom: var(--space-3);
}
[data-section-header] > p {
color: var(--text-2);
max-width: 50ch;
margin-inline: auto;
margin-bottom: 0;
}
/* ── Hero overrides — extend [data-layout="hero"] ───────────────────────
Base centering and border live in 08-layout.css; this layer tunes sizing.
─────────────────────────────────────────────────────────────────────── */
[data-layout="hero"] {
padding: clamp(3.5rem, 10vw, 7rem) var(--space-5) clamp(3rem, 8vw, 5.5rem);
}
[data-layout="hero"] h1 {
font-size: clamp(2.6rem, 6vw, 4.5rem);
font-weight: var(--weight-light);
letter-spacing: -0.025em;
line-height: 1.05;
margin-bottom: var(--space-4);
}
[data-text~="tagline"] {
font-size: clamp(1rem, 2.5vw, 1.2rem);
color: var(--text-2);
max-width: 46ch;
margin-inline: auto;
margin-bottom: var(--space-5);
line-height: var(--leading-tight);
}
/* ── figure[data-pane] — side-by-side demo panes ────────────────────────
Usage:
<figure data-pane="code">
<figcaption>HTML</figcaption>
<pre><code>…</code></pre>
</figure>
<figure data-pane="result">
<figcaption>Result</figcaption>
<div data-pane-body>…</div>
</figure>
─────────────────────────────────────────────────────────────────────── */
figure[data-pane] {
background: var(--surface-1);
border: var(--border-width) solid var(--border);
border-radius: var(--radius-md);
overflow: hidden;
display: flex;
flex-direction: column;
margin: 0;
}
figure[data-pane] > figcaption {
background: var(--surface-2);
border-bottom: var(--border-width) solid var(--border);
padding: var(--space-2) var(--space-4);
font-family: var(--font-mono);
font-size: var(--text-xs);
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--text-3);
flex-shrink: 0;
}
figure[data-pane="code"] > pre {
margin: 0;
padding: var(--space-4) var(--space-5);
background: transparent;
border: none;
font-size: 0.775rem;
line-height: 1.75;
flex: 1;
overflow-x: auto;
}
figure[data-pane="result"] > [data-pane-body] {
padding: var(--space-5);
flex: 1;
}
figure[data-pane="result"] > [data-pane-body] article {
margin: 0;
}
/* ── article[data-pillar] — three-pillar feature cards ──────────────────
ASW already styles article as a card; data-pillar tunes internals.
─────────────────────────────────────────────────────────────────────── */
article[data-pillar] {
padding: var(--space-5);
}
article[data-pillar] h3 {
margin-bottom: var(--space-2);
}
article[data-pillar] > p {
color: var(--text-2);
font-size: var(--text-sm);
margin: 0;
}
/* ── [data-preview] — inert mini page preview ───────────────────────────
Sits inside article[data-card="page-type"]. pointer-events: none keeps
it visually alive but non-interactive.
─────────────────────────────────────────────────────────────────────── */
[data-preview] {
margin-top: var(--space-4);
padding: var(--space-4);
background: var(--surface);
border: var(--border-width) solid var(--border-subtle);
border-radius: var(--radius-sm);
pointer-events: none;
overflow: hidden;
}
/* ── [data-agent-native] — agent vocabulary section ─────────────────────
─────────────────────────────────────────────────────────────────────── */
[data-agent-native] h4 {
margin-top: 0;
margin-bottom: var(--space-2);
}
[data-agent-native] pre {
font-size: var(--text-xs);
margin-top: var(--space-3);
}