/* Cloud34 website, built on Mark's Design Language (red and white theme, Showcase mode).
   Master copy of the design language: https://claude.ai/artifact/ACbDRjjJnd3cy87QHmQxJo
   Red and white is a fixed look: no dark mode on purpose.

   Layout: every page sits inside a 32px screen margin as a grid of light grey tiles.
   Home: logo and tab nav, a solid red hero block, and one route tile per app along the bottom, all in the first screen.
   App pages: a red hero block beside an example-screen tile, then content tiles.
   Support and privacy: a big headline on the white ground, then tiles. */

@font-face { font-family: "Barlow Condensed"; src: url("fonts/BarlowCondensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/BarlowCondensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/BarlowCondensed-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/Barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/Barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/Barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("fonts/SpaceMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("fonts/SpaceMono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #ffffff;
  --surface: #f3f2f0;
  --surface-raised: #e8e6e2;
  --line: #e2e0dc;
  --line-strong: #767676;
  --ink: #111111;
  --ink-muted: #5c5c5c;
  --primary: #e4002b;
  --primary-ink: #c8002a;
  --on-primary: #ffffff;
  --accent: #111111;
  --on-accent: #ffffff;
  --hero-fill: #e4002b;
  --on-hero: #ffffff;
  --hero-btn: #ffffff;
  --on-hero-btn: #e4002b;
  --tab-on: #e4002b;
  --on-tab-on: #ffffff;
  --success: #0f7035;
  --warning: #8a5a00;
  --danger: #b00020;
  --focus: #111111;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: Barlow, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Space Mono", ui-monospace, Menlo, monospace;

  --margin: 32px;
  --gutter: 12px;
  --pad: 24px;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
p, h1, h2, h3, ul, ol { margin: 0; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--primary-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
strong { font-weight: 600; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
}
.skip:focus { top: 8px; }

/* The page frame: 32px screen margin, tiles 12px apart */
.frame {
  padding: var(--margin);
  padding-left: max(var(--margin), env(safe-area-inset-left, 0px));
  padding-right: max(var(--margin), env(safe-area-inset-right, 0px));
  display: grid; gap: var(--gutter);
  max-width: 1600px; margin-inline: auto;
}
main { display: grid; gap: var(--gutter); min-width: 0; }

/* Tactile: lift on hover, press on click */
.press { transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 350ms var(--ease-spring); }
.press:hover:not(:disabled):not([aria-current="page"]) { transform: translateY(-2px); }
.press:active:not(:disabled):not([aria-current="page"]) { transform: translateY(2px); transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 80ms ease-out; }

/* Header: small logo and tab nav, top-left, never more than 64px tall */
.site-header {
  display: flex; align-items: center; gap: 12px 40px; min-height: 52px; max-height: 64px;
  position: relative;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1;
  letter-spacing: .01em; text-transform: uppercase; color: var(--ink); text-decoration: none;
}
.wordmark .mark { width: 32px; height: 32px; flex: none; }
.site-nav { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.nav-panel { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.tabs {
  display: flex; gap: 8px; padding: 8px; list-style: none;
  background: var(--surface); border-radius: 12px;
}
.tab, .menu-btn {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border-radius: 8px; border: 0; cursor: pointer;
  background: var(--surface-raised); color: var(--ink-muted); text-decoration: none; white-space: nowrap;
  font-family: var(--font-mono); font-size: 13px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase;
}
.tab:hover, .menu-btn:hover { color: var(--ink); }
.tab[aria-current="page"] { background: var(--tab-on); color: var(--on-tab-on); }
.nav-accent { margin-left: auto; }
.menu-btn { display: none; }

/* Type */
.label, .kicker, .tile-head {
  font-family: var(--font-mono); font-size: 13px; line-height: 16px; font-weight: 400;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted);
}
.tile-head .meta { color: var(--ink-muted); }
.tile-head b { color: var(--ink); font-weight: 400; }
h1, h2, .display {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase; text-wrap: balance;
}
.display-xl { font-size: clamp(56px, min(9vw, 13vh), 128px); line-height: .88; letter-spacing: -.01em; }
.display-l { font-size: clamp(48px, min(6.6vw, 10vh), 88px); line-height: .9; }
.display-m { font-size: clamp(36px, 4vw, 56px); line-height: .92; font-weight: 700; }
h2, .heading { font-size: 32px; line-height: 1; font-weight: 700; }
h3 { font-family: var(--font-display); font-size: 22px; line-height: 1.1; font-weight: 700; }
.intro { font-size: 20px; line-height: 30px; max-width: 52ch; }
.small { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }

/* Tiles */
.tile {
  background: var(--surface); border-radius: 12px; padding: var(--pad);
  display: grid; gap: 16px; align-content: start; min-width: 0;
}
.tile.red { background: var(--primary); color: var(--on-primary); }
.tile.red .tile-head, .tile.red .small { color: var(--on-primary); }
.grid { display: grid; gap: var(--gutter); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: 1 / -1; }

/* Buttons: 44px, 8px corners, mono capitals */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 8px; border: 0; cursor: pointer; white-space: nowrap;
  font-family: var(--font-mono); font-size: 13px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none;
}
.btn.sm { height: 36px; padding: 0 14px; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.accent { background: var(--accent); color: var(--on-accent); }
.btn.quiet { background: var(--surface-raised); color: var(--ink-muted); }
.btn.quiet:hover { color: var(--ink); }
.btn.on-red { background: var(--hero-btn); color: var(--on-hero-btn); }
.btn.on-red-quiet { background: transparent; color: var(--on-primary); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); }
.btn.on-red-quiet:hover { background: rgba(255, 255, 255, .14); }
.btn:disabled { opacity: .4; cursor: default; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.on-red-focus:focus-visible, .hero :focus-visible, .tile.red :focus-visible { outline-color: #ffffff; }

/* Status tags: always a word, 4px corners */
.tag {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 11px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 4px; background: var(--bg); color: var(--ink-muted);
}
.tag.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.tag.wip { color: var(--warning); }
.tag.live { color: var(--success); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* App icons: red rounded squares with simple white shapes */
.icon { display: block; flex: none; width: 48px; height: 48px; }
.icon.big { width: 72px; height: 72px; }
.icon.sm { width: 36px; height: 36px; }
.icon .sq { fill: var(--primary); }
.icon .s { fill: none; stroke: #ffffff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.icon .f { fill: #ffffff; }
.icon .soft { opacity: .45; }
.icon .ring { stroke: var(--primary); stroke-width: 1.6; }
/* On a red block the icon flips: white square, red shapes */
.icon.inv .sq { fill: #ffffff; }
.icon.inv .s { stroke: var(--primary); }
.icon.inv .f { fill: var(--primary); }
.icon.inv .ring { stroke: #ffffff; }

/* Red hero block: headline bottom-left, faint brand mark bleeding off the right edge */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--hero-fill); color: var(--on-hero); border-radius: 12px;
  padding: clamp(24px, 4.5vh, 40px);
  display: grid; align-content: end; gap: 20px; min-width: 0;
}
.hero .kicker, .hero .crumbs, .hero .crumbs a { color: var(--on-hero); }
.hero-mark {
  position: absolute; z-index: -1; right: -6%; top: 50%; transform: translateY(-50%);
  height: 140%; width: auto; opacity: .12; pointer-events: none;
}
.hero-mark path { fill: #ffffff; }
.hero .tag { background: #ffffff; }
.crumbs { font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Home: the whole first screen */
.first {
  min-height: calc(100svh - 2 * var(--margin));
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--gutter);
}
.home-hero .bottom {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 24px 48px; align-items: end;
}
.home-hero .side { display: grid; gap: 20px; justify-items: start; }
.home-hero h1 { max-width: 11ch; }

/* Route tiles: one per app, along the bottom of the first screen */
.routes { display: grid; gap: var(--gutter); grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; }
.route {
  display: grid; grid-template-rows: auto 1fr auto; gap: 14px; height: 100%;
  background: var(--surface); border-radius: 12px; padding: 20px var(--pad) var(--pad);
  color: var(--ink); text-decoration: none;
}
.route:hover { background: var(--surface-raised); }
.route .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.route .num { font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; color: var(--primary-ink); font-weight: 700; }
.route .name-row { display: flex; align-items: center; gap: 14px; }
.route .name { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(28px, 2.6vw, 44px); line-height: .92; }
.route .foot { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.route .desc { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.arrow {
  font-family: var(--font-mono); font-weight: 700; font-size: 20px; line-height: 1; color: var(--primary-ink);
  transition: transform 350ms var(--ease-spring);
}
.route:hover .arrow { transform: translateX(6px); }

/* App pages */
.app-top { display: grid; gap: var(--gutter); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: min(76svh, 720px); }
.app-hero { align-content: space-between; }
.app-hero .head { display: grid; gap: 20px; }
.app-hero .title { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 20px; }
.example { align-content: stretch; grid-template-rows: auto 1fr; }
.example .stage { background: var(--bg); border-radius: 12px; padding: 20px; display: grid; place-items: center; }

/* Example screen inside an app page */
.screen { width: 100%; max-width: 24rem; display: grid; gap: 14px; }
.screen-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.screen-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; text-transform: uppercase; }
.screen-sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.readout { display: grid; font-family: var(--font-mono); font-size: 14px; line-height: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.readout .r { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.readout .r:last-child { border-bottom: 0; }
.readout .r.head { font-weight: 400; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); padding-top: 0; }
.readout .v { text-align: right; }
.flag { color: var(--danger); }
.pending { color: var(--warning); }
.done { color: var(--success); }
.big-clock { font-family: var(--font-display); font-weight: 800; font-size: 72px; line-height: .9; font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--surface-raised); border-radius: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--primary); }

/* Lists with a short red dash */
.dashes { list-style: none; padding: 0; display: grid; gap: 12px; }
.dashes li { position: relative; padding-left: 28px; }
.dashes li::before { content: ""; position: absolute; left: 0; top: 11px; width: 16px; height: 3px; background: var(--primary); }
.dashes.big { font-size: 18px; line-height: 28px; gap: 14px; }
.dashes.big li::before { top: 13px; }

.note { background: var(--bg); border-radius: 8px; padding: 16px; display: grid; gap: 6px; }
.note .label { color: var(--ink); }

/* Text pages: big headline on the white ground */
.page-head { display: grid; gap: 20px; padding: clamp(24px, 6vh, 64px) 0 clamp(16px, 3vh, 32px); align-content: end; }
.page-head .intro { color: var(--ink-muted); }

/* Support */
.email {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 4vw, 56px); line-height: .95;
  overflow-wrap: anywhere; user-select: all;
}
.app-label { display: flex; align-items: center; gap: 12px; }

/* Privacy */
.prose { display: grid; gap: var(--gutter); grid-template-columns: 17rem minmax(0, 1fr); align-items: start; }
.toc { position: sticky; top: 16px; }
.toc ol { list-style: none; padding: 0; display: grid; gap: 4px; }
.toc a { display: block; padding: 4px 0; color: var(--ink-muted); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.text { max-width: 44rem; display: grid; gap: 40px; padding: 8px 0 24px clamp(0px, 3vw, 40px); }
.text section { display: grid; gap: 12px; scroll-margin-top: 16px; }
.text h3 { margin-top: 6px; }
.text ul { padding-left: 1.2em; display: grid; gap: 6px; }

/* Footer: a quiet tile */
.site-footer { background: var(--surface); border-radius: 12px; padding: var(--pad); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.site-footer .legal { max-width: 40rem; display: grid; gap: 4px; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; align-content: start; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.site-footer a { color: var(--ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Page arrival: content slides up 24px and fades in */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 600ms var(--ease-inout) both; }
.rise-2 { animation: rise 600ms var(--ease-inout) 90ms both; }

/* Medium screens */
@media (max-width: 1100px) {
  .routes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-hero .bottom { grid-template-columns: 1fr; }
  .app-top { grid-template-columns: 1fr; min-height: 0; }
  .span-4, .span-5, .span-7, .span-8 { grid-column: span 6; }
}
@media (max-width: 900px) and (min-width: 761px) {
  .tab { padding: 0 10px; }
}

/* Phones: one column, nav collapses to a single MENU button */
@media (max-width: 760px) {
  :root { --margin: 16px; --pad: 20px; }
  .first { min-height: 0; }
  .site-header { justify-content: space-between; }
  .site-nav.collapsible { flex: none; }
  .site-nav.collapsible .menu-btn { display: inline-flex; }
  .site-nav.collapsible .nav-panel {
    display: none; position: absolute; z-index: 5; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--bg); border-radius: 12px;
  }
  .site-nav.collapsible.open .nav-panel { display: grid; gap: 8px; }
  .site-nav .nav-panel { display: flex; flex-wrap: wrap; gap: 8px; }
  .site-nav.collapsible .tabs { flex-direction: column; }
  .site-nav.collapsible .tab { height: 44px; }
  .site-nav.collapsible .nav-accent { margin: 0; }
  .site-header:not(:has(.collapsible)) { flex-wrap: wrap; max-height: none; }
  .routes { grid-template-columns: 1fr; }
  .grid > * { grid-column: 1 / -1 !important; }
  .prose { grid-template-columns: 1fr; }
  .toc { position: static; }
  .text { padding-left: 0; }
  .hero { min-height: 60svh; }
  .app-top .hero { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .press, .press:hover, .press:active, .arrow, .route:hover .arrow { transform: none !important; transition: none !important; }
  .rise, .rise-2 { animation: none; }
}
