/* fiverooms.app in the brand's clothes (design-docs/Five Rooms Brand Identity §09): a 1200 px column, Bricolage
   Grotesque everywhere, sections alternating canvas and sidebar, the final band in the dark theme, no gradients, and
   `prefers-color-scheme` through the same tokens as the app. No script on any page. */
@import url('tokens.css');

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/BricolageGrotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

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

html { color-scheme: light dark; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fr-bg-canvas);
  color: var(--fr-text);
  font: 400 1rem/1.55 var(--fr-font-ui);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--fr-brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--fr-brand-hover); }
:focus-visible { outline: 2px solid var(--fr-brand); outline-offset: 2px; }

img, svg, picture { max-width: 100%; height: auto; display: block; }

.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: min(1200px, 100% - 32px); } }

/* Type roles (§04, web column) */
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; }
.display { font-size: clamp(2.75rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.035em; }
h1, .title-1 { font-size: 2.25rem; line-height: 1.1; letter-spacing: -0.025em; }
h2, .title-2 { font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.02em; }
h3, .headline { font-size: 1.125rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--fr-text-muted); max-width: 40rem; text-wrap: pretty; }
.callout { font-size: 0.875rem; line-height: 1.5; }
.caption { font-size: 0.75rem; line-height: 1.4; font-weight: 500; letter-spacing: 0.01em; color: var(--fr-text-muted); }
.eyebrow { font-size: 0.875rem; font-weight: 600; color: var(--fr-brand); letter-spacing: 0.01em; }
.muted { color: var(--fr-text-muted); }
code, kbd { font: 0.875em var(--fr-font-mono); font-variant-numeric: tabular-nums; }

/* Header */
.masthead { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--fr-bg-canvas) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--fr-border); }
.masthead .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
/* The lockup as drawn (Design/lockup/lockup.svg): its clear space is in the SVG, so it sits a little outside the column. */
.lockup { display: inline-flex; align-items: center; text-decoration: none; margin-left: -12px; }
.lockup svg { height: 48px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a { color: var(--fr-text); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--fr-brand); }
@media (max-width: 720px) { .nav a:not(.button) { display: none; } }

/* Buttons (§07): one primary per view */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--fr-radius-md); font: 600 0.9375rem/1 var(--fr-font-ui); text-decoration: none; border: 1px solid transparent; white-space: nowrap; transition: background-color 160ms ease-out, color 160ms ease-out; }
.button.primary { background: var(--fr-brand); color: var(--fr-on-brand); }
.button.primary:hover { background: var(--fr-brand-hover); color: var(--fr-on-brand); }
.button.secondary { background: var(--fr-bg-surface); color: var(--fr-text); border-color: var(--fr-border-strong); }
.button.secondary:hover { background: var(--fr-bg-sidebar); color: var(--fr-text); }
.button.large { height: 48px; padding: 0 22px; font-size: 1.0625rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section, .section { padding: 128px 0; }
@media (max-width: 720px) { section, .section { padding: 80px 0; } }
.alt { background: var(--fr-bg-sidebar); }
.band { background: #1b1714; color: #f1e9df; }
.band .lede { color: #a99c90; }
.band .button.primary { background: #e07a57; color: #1b1714; }
.band .button.primary:hover { background: #eb9273; }
.band .button.secondary { background: #241f1b; color: #f1e9df; border-color: #4a4038; }
.band a { color: #e07a57; }

/* Hero */
.hero { padding: 96px 0 72px; }
.hero .display { margin: 16px 0 24px; max-width: 16ch; }
.hero .lede { margin-bottom: 36px; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; color: var(--fr-text-muted); font-size: 0.875rem; }
.platforms span::before { content: '·'; margin-right: 20px; }
.platforms span:first-child::before { content: none; margin: 0; }
.hero-shot { margin-top: 64px; }
.shot { background: var(--fr-bg-surface); border-radius: var(--fr-radius-lg); box-shadow: var(--fr-shadow-2); overflow: hidden; }
.shot img { width: 100%; }

/* Room sections: a tint rule over the heading, text and a real screenshot side by side, alternating */
.rooms-list { display: grid; gap: 96px; }
.room { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.room:nth-child(even) .room-text { order: 2; }
.room-text::before { content: ''; display: block; width: 72px; height: 6px; border-radius: 3px; margin-bottom: 20px; background: var(--room, var(--fr-brand)); }
.room-text h2 { margin-bottom: 12px; }
.room-text p { color: var(--fr-text-muted); font-size: 1.125rem; max-width: 36rem; text-wrap: pretty; }
.room-text .more { display: inline-block; margin-top: 16px; font-weight: 500; }
.room .shot { max-width: 640px; margin-inline: auto; }
@media (max-width: 860px) { .room { grid-template-columns: 1fr; gap: 28px; } .room:nth-child(even) .room-text { order: 0; } .rooms-list { gap: 72px; } }
.room-plan { --room: var(--fr-room-plan); }
.room-research { --room: var(--fr-room-research); }
.room-write { --room: var(--fr-room-write); }
.room-revise { --room: var(--fr-room-revise); }
.room-publish { --room: var(--fr-room-publish); }

/* Tiles (the five rooms at a glance, the formats, the download cards) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tile { background: var(--fr-bg-surface); border-radius: var(--fr-radius-lg); box-shadow: var(--fr-shadow-1); padding: 22px 22px 24px; }
.tile h3 { margin-bottom: 6px; }
.tile p { color: var(--fr-text-muted); font-size: 0.9375rem; }
.tile.tint-plan { background: var(--fr-room-plan); }
.tile.tint-research { background: var(--fr-room-research); }
.tile.tint-write { background: var(--fr-room-write); }
.tile.tint-revise { background: var(--fr-room-revise); }
.tile.tint-publish { background: var(--fr-room-publish); color: #ffffff; }
.tile[class*='tint-'] { box-shadow: none; }
.tile[class*='tint-'] p { color: inherit; opacity: 0.85; }
@media (prefers-color-scheme: dark) { .tile.tint-publish { color: #1b1714; } }

/* Prose pages (support, privacy, terms, press) */
.prose { max-width: 44rem; }
.prose h1 { margin-bottom: 12px; }
.prose > .lede { margin-bottom: 32px; }
.prose h2 { margin: 44px 0 12px; font-size: 1.375rem; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose li { margin: 0 0 14px; line-height: 1.6; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 16px; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--fr-border); }
.prose th { font-weight: 600; background: var(--fr-bg-sidebar); }
.prose pre { background: var(--fr-bg-sidebar); border-radius: var(--fr-radius-sm); padding: 12px 14px; overflow-x: auto; font: 0.875rem/1.5 var(--fr-font-mono); }
.prose .note { background: var(--fr-brand-subtle); border-radius: var(--fr-radius-md); padding: 12px 16px; margin: 0 0 16px; }
.prose .meta { color: var(--fr-text-muted); font-size: 0.875rem; margin-bottom: 28px; }
.draft-banner { background: var(--fr-warning); color: #fffdf9; border-radius: var(--fr-radius-md); padding: 10px 14px; margin-bottom: 24px; font-size: 0.9375rem; }
.page-head { padding: 72px 0 40px; }
.page-head .lede { margin-top: 12px; }

/* Support: the sections and their articles */
.support { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.support-nav { position: sticky; top: 88px; font-size: 0.9375rem; }
.support-nav h3 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fr-text-muted); margin: 20px 0 8px; }
.support-nav h3:first-child { margin-top: 0; }
.support-nav a { display: block; padding: 3px 0; color: var(--fr-text); text-decoration: none; }
.support-nav a:hover, .support-nav a[aria-current='page'] { color: var(--fr-brand); }
@media (max-width: 860px) { .support { grid-template-columns: 1fr; } .support-nav { position: static; } }
.article-list { columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .article-list { columns: 1; } }
.article-list h3 { break-after: avoid; }
.article-list ul { list-style: none; padding: 0; margin: 0 0 24px; }
.article-list li { margin: 0 0 6px; }

/* Press */
.assets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.asset { background: var(--fr-bg-surface); border-radius: var(--fr-radius-lg); box-shadow: var(--fr-shadow-1); padding: 18px; }
.asset .preview { display: grid; place-items: center; height: 120px; border-radius: var(--fr-radius-md); background: var(--fr-bg-sidebar); margin-bottom: 12px; }
.asset .preview.dark { background: #1b1714; }
.asset .preview img { max-height: 80px; width: auto; }
.asset .links { display: flex; gap: 12px; font-size: 0.875rem; }

/* Footer */
.footer { border-top: 1px solid var(--fr-border); padding: 40px 0 56px; color: var(--fr-text-muted); font-size: 0.875rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.footer a { color: var(--fr-text-muted); text-decoration: none; }
.footer a:hover { color: var(--fr-brand); }
.footer .lockup svg { height: 36px; }
.footer .spacer { flex: 1; }

/* Spacing the pages once wrote as style attributes, which the site's policy (`style-src 'self'`) refuses. */
.lede.lede-section { margin: 12px 0 36px; }
.lede.lede-close { margin: 12px 0 32px; }
.tiles.tiles-spaced { margin-top: 32px; }
.title-2.title-spaced { margin-bottom: 24px; }
.caption.caption-spaced { margin-top: 20px; }
.icon-rounded { border-radius: 18px; }

/* The brand's SVGs' own colours (scripts/build.ts `inlineBrand`). */
svg.brand .walls{fill:#2B211B}svg.brand .plan{fill:#F6DCCF}svg.brand .research{fill:#EEBFA9}svg.brand .write{fill:#B5502F}svg.brand .revise{fill:#CF7354}svg.brand .publish{fill:#A6472C}
@media (prefers-color-scheme: dark){svg.brand .walls{fill:#F1E9DF}svg.brand .plan{fill:#4A3027}svg.brand .research{fill:#64392A}svg.brand .write{fill:#E07A57}svg.brand .revise{fill:#B05A3C}svg.brand .publish{fill:#E07A57}}
svg.brand .walls{fill:#2B211B}svg.brand .plan{fill:#F6DCCF}svg.brand .research{fill:#EEBFA9}svg.brand .write{fill:#B5502F}svg.brand .revise{fill:#CF7354}svg.brand .publish{fill:#A6472C}
@media (prefers-color-scheme: dark){svg.brand .walls{fill:#F1E9DF}svg.brand .plan{fill:#4A3027}svg.brand .research{fill:#64392A}svg.brand .write{fill:#E07A57}svg.brand .revise{fill:#B05A3C}svg.brand .publish{fill:#E07A57}}svg.brand .ink{fill:#2B211B}
@media (prefers-color-scheme: dark){svg.brand .ink{fill:#F1E9DF}}
