Files

143 lines
12 KiB
CSS

/* A2.css — the v2 grammar for the Apps 2 pages (Wave 2 group 4: /ide /kata /mcp /operative /operator /skills /slack
/studio /tag /sdks). Owned by the Apps 2 chat. Usage: import '../v2/A2.css' from a page, put className="a2" on <main>
and set the page's one accent with style={{ '--acc': '#…' }}. Type, space and grid follow docs/VISION.md:
Display 128/96/80 (phone 56/48), Headline 56/36, Title 28, Lede 24/21, Body 19/17, Kicker Zen Mono 13 caps .12em;
8pt space, sections 240 px of air (120 on phones), a 12-column 1440 grid with 24 px gutters, 28 px hero radii,
16 px card radii, hairlines and long soft shadows. Class names start with a2- so no other chat's styles collide.
7 Nov 14:20 (docs/build-notes/DONE.md wins on taste): 0 UI hues, so --acc is ink in light rooms and #f5f5f7 in dark ones (a page
no longer sets its own), and .a2-kick is never shown above a headline: its words stay in the page for screen readers
and search (visually hidden). Give a label that is not an eyebrow the class .a2-kick.show. */
.a2 { --acc: #0a0a0b; --acc-soft: #f2f2f2; --soft: #525252; --faint: #737373; --card: #f2f2f2; --line: rgba(0, 0, 0, .1); --r-hero: 24px; --r-card: 16px; --a2-ease: cubic-bezier(.16, 1, .3, 1); --a2-shadow: none; --a2-float: 0 24px 60px -16px rgba(0, 0, 0, .18); --gut: clamp(16px, 4vw, 32px); }
/* MASTER.md 3.1 (7 Nov): deck sizes with rhythm. h1 52, section headings 26, H3 17, lede 21, body 16, figures 64;
one big thing per screen, which grows past its resting size only while it is the moment (A2Grow). */
.a2-wrap { width: min(100% - 2 * var(--gut), 1152px); margin-inline: auto; }
.a2-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.a2-sec { position: relative; padding: clamp(72px, 11vw, 188px) 0; }
.a2-sec.tight { padding: clamp(56px, 7vw, 116px) 0; }
.a2-hair { border-top: 1px solid var(--line); }
/* type */
.a2-display { margin: 0; font-size: clamp(40px, 3.6vw, 52px); font-weight: 497; line-height: 1.04; letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.a2-display.m, .a2-display.s { font-size: clamp(26px, 2.25vw, 32px); line-height: 1.1; letter-spacing: -.03em; }
.a2-headline { margin: 0; max-width: 22ch; font-size: 26px; font-weight: 497; line-height: 1.15; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.a2-title { margin: 0; font-size: 17px; font-weight: 497; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.a2-lede { margin: 0; max-width: 44ch; font-size: clamp(17px, 1.46vw, 21px); line-height: 1.45; letter-spacing: -.01em; color: var(--soft); text-wrap: pretty; }
.a2-body { margin: 0; max-width: 66ch; font-size: 16px; line-height: 1.6; color: var(--soft); text-wrap: pretty; }
.a2-kick:not(.show) { position: absolute !important; width: 1px; height: 1px; margin: 0 !important; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.a2-kick.show { margin: 0; font: 500 11.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.a2 [data-room='dark'], .a2 .a2-dark, .a2 .a2-darkpanel { --acc: #fafafa; --acc-soft: #171717; }
.a2-kick b { font-weight: 500; }
.a2-fig { font-family: var(--sans); font-size: 64px; font-weight: 220; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: .95; }
.a2-dark .a2-display, .a2-dark .a2-headline, .a2-dark .a2-title { color: #fafafa; }
.a2-dark .a2-lede, .a2-dark .a2-body { color: rgba(255, 255, 255, .78); }
.a2-dark { background: #000; color: #fafafa; }
.a2-grow { will-change: auto; }
/* the pause control a moving thing carries (A2Pause) */
.a2-pause { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--x-raised); color: var(--ink); cursor: pointer; transition: transform .09s var(--a2-ease); }
.a2-pause:active { transform: scale(.97); }
.a2-pause[aria-pressed='true'] { background: var(--ink); color: var(--x-on-ink); border-color: var(--ink); }
.a2-dark .a2-pause, .a2-darkpanel .a2-pause, [data-room='dark'] .a2-pause { background: #171717; color: #fafafa; border-color: rgba(255, 255, 255, .14); }
.a2-paused, .a2-paused * { animation-play-state: paused !important; }
/* line-masked kinetic type (A2Lines) */
.a2-ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.a2-ln-in { display: inline-block; will-change: auto; }
/* buttons: the solid one wears the accent only when a page asks (data-acc) */
.a2-acts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.a2-acts .x-btn { height: 48px; padding: 0 24px; font-size: 16px; }
/* the paste strip, one line with a copy button */
.a2-paste { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px; align-items: center; padding: 40px 0; border-block: 1px solid var(--line); }
.a2-paste-k { margin: 0; font-size: 17px; font-weight: 497; letter-spacing: -.01em; }
.a2-paste-d { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--soft); }
.a2-paste-box { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r-card); background: var(--card); }
.a2-paste-box code { flex: 1; min-width: 0; font: 500 14.5px/1.5 var(--mono); overflow-wrap: anywhere; }
.a2-paste-box .x-copy { height: 40px; padding: 0 16px; flex: none; }
.a2-paste-l { display: block; margin-bottom: 4px; font: 500 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
/* chapters (A2Chapters): the text pins while the picture changes */
.a2-ch { position: relative; height: calc(var(--n) * 100svh); }
.a2-ch-stick { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.a2-ch-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 24px 72px; align-items: center; padding-top: 48px; }
.a2-ch.flip .a2-ch-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.a2-ch.flip .a2-ch-vis { order: -1; }
.a2-ch-copy { position: relative; }
.a2-ch-nav { display: flex; gap: 6px; margin-bottom: 40px; }
.a2-ch-nav button { position: relative; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; color: var(--faint); font: 500 12px/1 var(--mono); }
.a2-ch-nav button::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--line); transition: background .3s; }
.a2-ch-nav button[aria-current='step'] { color: var(--ink); }
.a2-ch-nav button[aria-current='step']::after { background: var(--acc); }
.a2-ch-items { display: grid; }
.a2-ch-item { grid-area: 1 / 1; transition: opacity .45s var(--a2-ease), transform .7s var(--a2-ease); }
.a2-ch-item:not(.on) { opacity: 0; transform: translateY(var(--dy, 28px)); pointer-events: none; transition-duration: .25s, .45s; }
.a2-ch-item .a2-kick { margin-bottom: 20px; }
.a2-ch-item .a2-headline { margin-bottom: 17px; }
.a2-ch-vis { position: relative; min-width: 0; }
.a2-ch-pv { display: none; }
.a2-dark.a2-ch .a2-ch-nav button[aria-current='step'] { color: #f5f5f7; }
.a2-dark.a2-ch .a2-ch-nav button::after { background: rgba(255, 255, 255, .14); }
/* the spec sheet (A2Sheet) */
.a2-sheet-btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--x-raised); color: var(--ink); font: 500 16px/1 var(--sans); cursor: pointer; }
.a2-sheet-btn i { font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--x-on-ink); font-size: 15px; line-height: 1; transition: transform .35s var(--a2-ease); }
@media (hover: hover) { .a2-sheet-btn:hover i { transform: rotate(90deg); } }
.a2-sheet { position: fixed; inset: 0; z-index: 900; visibility: hidden; transition: visibility 0s .5s; }
.a2-sheet[data-open='true'] { visibility: visible; transition-delay: 0s; }
.a2-sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .32); opacity: 0; transition: opacity .4s var(--a2-ease); border: 0; padding: 0; width: 100%; cursor: pointer; }
.a2-sheet[data-open='true'] .a2-sheet-scrim { opacity: 1; }
.a2-sheet-panel { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(620px, calc(100% - 24px)); display: flex; flex-direction: column; border-radius: var(--r-hero); background: var(--x-raised); color: var(--ink); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .45); transform: translateX(calc(100% + 24px)); transition: transform .55s var(--a2-ease); overflow: hidden; }
.a2-sheet[data-open='true'] .a2-sheet-panel { transform: none; }
.a2-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px 16px; border-bottom: 1px solid var(--line); }
.a2-sheet-top .a2-title { font-size: 21px; }
.a2-sheet-x { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--x-raised); font: 400 22px/1 var(--sans); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.a2-sheet-body { flex: 1; overflow-y: auto; padding: 8px 28px 40px; overscroll-behavior: contain; }
/* questions (A2Faq) */
.a2-faq { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.a2-faq li { border-top: 1px solid var(--line); }
.a2-faq h3 { margin: 0; }
.a2-faq button { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; min-height: 64px; padding: 16px 0; border: 0; background: none; color: var(--ink); font: 497 17px/1.35 var(--sans); letter-spacing: -.01em; text-align: left; cursor: pointer; }
.a2-faq button i { position: relative; width: 16px; height: 16px; flex: none; }
.a2-faq button i::before, .a2-faq button i::after { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .4s var(--a2-ease); }
.a2-faq button i::after { transform: rotate(90deg); }
.a2-faq li.on button i::after { transform: rotate(0deg); }
.a2-faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--a2-ease); }
.a2-faq-a > div { min-height: 0; overflow: hidden; max-width: 66ch; font-size: 16px; line-height: 1.6; color: var(--soft); }
.a2-faq li.on .a2-faq-a { grid-template-rows: 1fr; }
.a2-faq li.on .a2-faq-a > div { padding-bottom: 28px; }
.a2-faq.dark, .a2-faq.dark li { border-color: rgba(255, 255, 255, .12); }
.a2-faq.dark button { color: #f5f5f7; }
.a2-faq.dark .a2-faq-a > div { color: #a1a1a6; }
@media (max-width: 900px) {
.a2-grid { grid-template-columns: minmax(0, 1fr); }
.a2-grid > * { grid-column: 1 / -1 !important; }
.a2-display { font-size: 40px; }
.a2-display.m, .a2-display.s { font-size: 26px; }
.a2-headline { font-size: 22px; }
.a2-body { font-size: 15px; }
.a2-lede { font-size: 17px; }
.a2-fig { font-size: 52px; }
.a2-sec { padding: 72px 0; }
.a2-sec.tight { padding: 56px 0; }
.a2-paste { grid-template-columns: minmax(0, 1fr); padding: 32px 0; }
.a2-paste-box { flex-direction: column; align-items: flex-start; }
.a2-paste-box .x-copy { height: 44px; }
/* phones: chapters become a plain vertical story, each with its own picture */
.a2-ch { height: auto; padding: 72px 0 24px; }
.a2-ch-stick { position: static; height: auto; display: block; overflow: visible; }
.a2-ch-grid, .a2-ch.flip .a2-ch-grid { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
.a2-ch-nav, .a2-ch > .a2-ch-stick .a2-ch-vis { display: none; }
.a2-ch-items { gap: 56px; }
.a2-ch-item, .a2-ch-item:not(.on) { grid-area: auto; opacity: 1; transform: none; pointer-events: auto; }
.a2-ch-pv { display: block; margin-bottom: 32px; }
.a2-sheet-panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 88svh; border-radius: var(--r-hero) var(--r-hero) 0 0; transform: translateY(100%); }
.a2-sheet-top { padding: 20px 20px 14px; }
.a2-sheet-body { padding: 8px 20px 40px; }
}
@media (prefers-reduced-motion: reduce) {
.a2-ch-item, .a2-sheet-panel, .a2-sheet-scrim { transition: none !important; }
}