@layer tokens, base, components, sections, pages;
@layer tokens {
:root {
  --signal: #F04E2A; --signal-strong: #C2361A; --signal-soft: #FFEDE7; --signal-ink: #8F2A12;
  --ink: #17153B; --ink-soft: #2A2756; --muted: #5E5A72;
  --bg: #FBF7F2; --surface: #FFFFFF; --sunken: #F3EEE7; --line: #E7E1D8;
  --accent: #C2361A; --accent-ink: #ffffff; --accent-soft: #FFEDE7;
  --ok: #0F7B5F; --ok-soft: #E1F4EC; --warn: #8A5300; --warn-soft: #FFF3D9; --bad: #B42318; --bad-soft: #FDE8E6;
  --ceo: #4B2E9E; --ceo-soft: #EEE8FB;
  --band: #17153B; --band-ink: #ffffff;
  --font: "Plus Jakarta Sans Variable", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 21, 59, 0.06), 0 4px 16px rgba(23, 21, 59, 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --signal: #FF6A47; --signal-strong: #FF7A59; --signal-soft: #3B1C14; --signal-ink: #FFB8A6;
    --ink: #F2F0FA; --ink-soft: #D9D6EA; --muted: #A9A5BF;
    --bg: #0F0E24; --surface: #18163A; --sunken: #211F47; --line: #2E2B5A;
    --accent: #FF7A59; --accent-ink: #1A0C08; --accent-soft: #3B1C14;
    --ok: #5FD3A8; --ok-soft: #12352B; --warn: #F1C26B; --warn-soft: #3A2C10; --bad: #FF8A80; --bad-soft: #3D1715;
    --ceo: #C2AEFF; --ceo-soft: #2B2152;
    --band: #26235E; --band-ink: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
.ttc-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.ttc-wordmark { font-family: var(--font); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--ink); white-space: nowrap; }
.ttc-the { font-weight: 600; font-size: 0.78em; letter-spacing: -0.01em; margin: 0 0.06em; color: var(--muted); }
.ttc-ceo { color: var(--signal); }
.ttc-logo-sub { font-family: var(--font); font-weight: 600; font-size: 12px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 9px; margin-left: 2px; text-transform: uppercase; letter-spacing: 0.06em; }
}
/*
 * The public site's stylesheet (docs/CSS.md). Served at /public/assets/site.css, after the
 * brand's tokens (colours, type, the logo: packages/ui/src/brand-tokens.ts), which core puts
 * in the "tokens" layer in front of this file.
 *
 * Classes say what a thing is, never how it looks. Each layer can refine the one before it
 * by naming where a thing sits:
 *
 *   tokens      custom properties: colours (light and dark), type, radius, shadow
 *   base        plain elements: body, headings, links, forms
 *   components  each thing on its own, wherever it appears:  .tell  .figure  .notice
 *   sections    a thing inside a section:                    .hero .secondary-action
 *   pages       a thing on one page:                         .page-company .hero
 *
 * A later layer always wins over an earlier one, however specific the earlier rule is, so
 * a section or page rule never needs !important. custom.css comes after all of them, outside
 * the layers, for trying out changes without touching this file.
 *
 * Pages:     body.page-front, .page-search, .page-company, .page-terms, .page-unavailable,
 *            and .page-info with .page-<address> for each information page.
 * Sections:  .site-header, .site-footer, .hero, .how-it-works, .shared-tells,
 *            .company-figures, .search-results, .page-text
 */

@font-face {
  font-family: "Plus Jakarta Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/public/assets/plus-jakarta-sans.woff2) format("woff2-variations");
}

@layer base {
  * { box-sizing: border-box; }
  body { margin: 0; font: 16px/1.55 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
  h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.15; text-wrap: balance; }
  h2 { font-size: 1.35rem; margin: 32px 0 14px; }
  h3 { font-size: 1.1rem; margin: 24px 0 10px; }
  a { color: var(--accent); text-underline-offset: 2px; }
  img { max-width: 100%; height: auto; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  input { font: inherit; color: var(--ink); background: var(--surface); }
  button { font: inherit; cursor: pointer; }
}

@layer components {
  /* The page's width, wherever content is lined up with it. */
  .site-width { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

  /* The main thing to do, and the alternative beside it. */
  .call-to-action, .secondary-action, .company-search button {
    display: inline-block; padding: 10px 18px; border-radius: 12px; border: 0;
    background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none;
  }
  .secondary-action { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }

  .company-search { display: flex; gap: 8px; flex: 1; max-width: 440px; }
  .company-search input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
  .company-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

  .kicker { display: inline-block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); margin-bottom: 10px; }
  .lead { margin: 0; max-width: 640px; font-size: 1.05rem; }

  /* A step in "how it works". */
  .step { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
  .step-number { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--signal-soft); color: var(--signal-strong); font-size: 0.85rem; font-weight: 800; margin-bottom: 8px; }
  .step-title { display: block; font-weight: 700; margin-bottom: 2px; }
  .step-text { color: var(--muted); font-size: 0.92rem; }

  /* A public tell, with its video, summary and the company's reply. */
  .tell-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding-bottom: 40px; }
  .tell { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
  .tell video { width: 100%; border-radius: 14px; background: #111; aspect-ratio: 4 / 3; }
  .tell-summary { margin: 0; }
  .tell-meta { font-size: 0.85rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .tell-meta .company-name { font-weight: 700; color: var(--ink); text-decoration: none; }
  .tell-kind, .featured-label { background: var(--signal-soft); color: var(--signal-ink); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 0.78rem; }
  .featured-label { background: var(--band); color: var(--band-ink); }
  .company-reply { background: var(--ok-soft); border-radius: 14px; padding: 10px 12px; font-size: 0.95rem; }
  .company-reply strong { color: var(--ok); }
  .no-reply, .disclaimer { font-size: 0.85rem; color: var(--muted); margin: 0; }

  /* A company's response figures. */
  .figure { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
  .figure-value { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
  .figure-label { color: var(--muted); font-size: 0.88rem; }

  .company-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--sunken); margin-bottom: 12px; }
  .company-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
  .company-status.on-board::before { background: var(--ok); }

  .company-list { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 10px; }
  .company-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
  .company-list a { font-weight: 700; }
  .company-state { font-size: 0.85rem; color: var(--muted); }

  /* A boxed message: nothing to show yet, or a page that's switched off. */
  .notice, .terms { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin: 16px 0; }

  /* Pictures chosen on the admin app's Site page. */
  .hero-picture, .page-picture { margin: 0; }
  .hero-picture img, .page-picture img { display: block; width: 100%; border-radius: 18px; }
  .page-picture { margin: 20px 0; }
}

@layer sections {
  .site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
  .site-header .site-width { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .site-header .ttc-wordmark { font-size: 22px; }

  .site-footer { background: var(--band); color: rgba(255, 255, 255, 0.75); font-size: 0.85rem; margin-top: 48px; }
  .site-footer .site-width { display: flex; gap: 12px 24px; flex-wrap: wrap; justify-content: space-between; align-items: center; padding-top: 28px; padding-bottom: 36px; }
  .site-footer a { color: #fff; }
  .site-footer .footer-links { display: flex; gap: 8px 18px; flex-wrap: wrap; }

  /* The band at the top of each page, in the brand's dark colour with its circles. */
  .hero { background: var(--band); color: var(--band-ink); border-radius: 26px; padding: clamp(28px, 5vw, 56px); margin: 24px 0 8px; position: relative; overflow: hidden; }
  .hero::before { content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: var(--signal); opacity: 0.22; }
  .hero::after { content: ""; position: absolute; right: 90px; bottom: -120px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid var(--signal); opacity: 0.12; }
  .hero > * { position: relative; }
  .hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 800; margin: 0 0 12px; max-width: 760px; }
  .hero h1 em { font-style: normal; color: var(--signal); }
  .hero .lead { color: rgba(255, 255, 255, 0.82); }
  .hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
  .hero .call-to-action, .hero .secondary-action { padding: 14px 22px; font-size: 1.05rem; }
  .hero .secondary-action { background: transparent; color: var(--band-ink); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.5); }
  .hero .company-status { background: rgba(255, 255, 255, 0.12); }

  /* A picture beside the heading (two columns, one on a phone)… */
  .hero.picture-beside { display: grid; gap: 24px 40px; align-items: center; }
  .hero.picture-beside::before, .hero.picture-beside::after, .hero.picture-behind::before, .hero.picture-behind::after { display: none; }
  @media (min-width: 760px) { .hero.picture-beside { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
  /* …or behind it, darkened so the words stay readable. */
  .hero.picture-behind { min-height: 360px; display: flex; align-items: flex-end; }
  .hero.picture-behind > .hero-picture { position: absolute; inset: 0; }
  .hero.picture-behind > .hero-text { z-index: 1; }
  .hero.picture-behind > .hero-picture img { height: 100%; object-fit: cover; border-radius: 0; }
  .hero.picture-behind > .hero-picture::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(23, 21, 59, 0.92), rgba(23, 21, 59, 0.35)); }

  .how-it-works { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0 8px; }

  .company-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 20px 0; }

  .shared-tells .notice { margin-bottom: 40px; }

  /* An information page's own text. */
  .page-text { max-width: 760px; margin: 24px 0 40px; }
  .page-text li { margin: 4px 0; }
}

@layer pages {
  .page-terms .terms { max-width: 760px; margin: 24px auto; }
  .page-terms .terms h2 { margin-top: 28px; }
  .page-unavailable .notice { margin: 40px 0; }
}
