/*
 * collabrun marketing site.
 *
 * Colours are the brand's (coral and cobalt are the two partners in the
 * mark). Coral and cobalt are accents: they are never body text on a light
 * ground. Checked for contrast (WCAG AA, 4.5:1 for text):
 *   ink on paper 16.9, muted on paper 6.8, white on cobalt 5.3,
 *   ink on coral 5.9, paper on ink 16.9, muted-dark on ink 8.4.
 */

:root {
  --coral: #ff5a36;
  --cobalt: #2b59ff;
  --ink: #121419;
  --paper: #f4f5f7;
  --mid: #8a90a0;
  --tile: #1e212a;

  --bg: var(--paper);
  --surface: #ffffff;
  --text: var(--ink);
  --muted: #4f5566;
  --line: #dfe2e8;
  --accent-text: #1f46d6;
  --band-bg: var(--ink);
  --band-surface: var(--tile);
  --band-text: var(--paper);
  --band-muted: #a9afbd;
  --band-line: #2c303b;
  --shadow: 0 1px 2px rgb(18 20 25 / 0.05), 0 12px 32px -12px rgb(18 20 25 / 0.14);

  --font-display: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  /* The wordmark's face, as the logo sets it: Plus Jakarta Sans 800. */
  --font-wordmark: "Plus Jakarta Sans", "Helvetica Neue", sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --gutter: 16px;
  --section: clamp(64px, 10vw, 120px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --surface: var(--tile);
    --text: var(--paper);
    --muted: #a9afbd;
    --line: #2c303b;
    --accent-text: #7c97ff;
    --band-bg: var(--tile);
    --band-surface: #262a35;
    --band-line: #343947;
    --shadow: none;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: var(--cobalt);
}

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
}

h2 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
}

h3 {
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

p,
figure {
  margin: 0;
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.skip:focus {
  top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 720px) {
  :root {
    --gutter: 28px;
  }
}

/* ── Brand ─────────────────────────────────────────────────────────────── */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  text-decoration: none;
  font-family: var(--font-wordmark);
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: 1.6rem;
  line-height: 1;
  text-transform: lowercase;
}

/*
 * Sized by HEIGHT, about as tall as the type is large, as the logo sets it.
 * The width comes from the mark file's own proportions, so any mark dropped
 * into assets/brand/mark.svg keeps its shape (Grip is 84 by 52).
 */
.brand img {
  height: 1.05em;
  width: auto;
  flex: none;
}

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.site-header .brand {
  margin-right: auto;
}

.nav {
  display: none;
  align-items: center;
  gap: 28px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
}

.nav a[aria-current="page"],
.menu nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--cobalt);
}

.nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--cobalt);
}

.menu {
  position: relative;
}

.menu summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu[open] summary {
  background: var(--surface);
}

.menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  display: grid;
  min-width: 200px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.menu nav a {
  padding: 12px;
  text-decoration: none;
  border-radius: 8px;
  min-height: 44px;
}

.menu nav a:hover {
  background: var(--bg);
}

@media (min-width: 820px) {
  .nav {
    display: flex;
  }
  .menu {
    display: none;
  }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--cobalt);
  color: #ffffff;
}

.btn-primary:hover {
  background: #1f46d6;
  text-decoration: none;
}

.btn-quiet {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.btn-quiet:hover {
  border-color: var(--mid);
  text-decoration: none;
}

.site-header .btn {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.95rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Chips and badges ──────────────────────────────────────────────────── */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.kicker::before {
  content: "";
  width: 18px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--coral) 50%, var(--cobalt) 50%);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.5;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px dashed var(--mid);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chips li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ── Sections ──────────────────────────────────────────────────────────── */

.section {
  padding-block: var(--section);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 38em;
}

.section-head {
  display: grid;
  gap: 16px;
  max-width: 44rem;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.two-col {
  display: grid;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
}

.two-col > * {
  min-width: 0;
}

@media (min-width: 960px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
  .two-col.flip > :first-child {
    order: 2;
  }
}

.ticks {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

/* The tick is positioned, not a grid column: a price or a link inside the
   sentence must stay part of the sentence, not become its own cell. */
.ticks li {
  position: relative;
  padding-left: 34px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.5 11.5l3 3 6-7' stroke='%23fff' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 22px no-repeat,
    var(--cobalt);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(48px, 9vw, 104px) var(--section);
}

.hero-copy {
  display: grid;
  gap: 22px;
  justify-items: start;
}

.hero .note {
  font-size: 0.95rem;
  color: var(--muted);
}

/* The illustration: plainly an illustration, never real shop data. */
.demo {
  padding: clamp(18px, 3vw, 26px);
  display: grid;
  gap: 18px;
  position: relative;
}

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.demo-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.demo-figure {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 2.9rem);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.demo-spark {
  width: 100%;
  height: 56px;
}

.rows {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
}

.avatar.c1 {
  background: #ffd3c8;
}
.avatar.c2 {
  background: #cfdaff;
}
.avatar.c3 {
  background: #e3e5ea;
}

.row-name {
  min-width: 0;
  display: grid;
  line-height: 1.3;
}

.row-name strong {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.row-name span,
.row-money span {
  font-size: 0.82rem;
  color: var(--muted);
}

.row-money {
  display: grid;
  justify-items: end;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.loss::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--coral);
  vertical-align: 0.1em;
}

/* ── Pillars ───────────────────────────────────────────────────────────── */

.pillars {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pillar {
  padding: clamp(22px, 3vw, 30px);
  display: grid;
  gap: 12px;
  align-content: start;
}

.pillar-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--muted);
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
}

.pillar p {
  color: var(--muted);
}

/* ── Band (the profit section) ─────────────────────────────────────────── */

.band {
  background: var(--band-bg);
  color: var(--band-text);
  --text: var(--band-text);
  --muted: var(--band-muted);
  --line: var(--band-line);
  --surface: var(--band-surface);
  --accent-text: #7c97ff;
}

.section.band + .section,
.section + .section.band {
  border-top: 0;
}

.receipt {
  padding: clamp(20px, 3vw, 30px);
  display: grid;
  gap: 16px;
}

.receipt table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.receipt caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 8px;
}

.receipt th,
.receipt td {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
  vertical-align: top;
}

.receipt td {
  text-align: right;
  white-space: nowrap;
  padding-left: 16px;
}

.receipt tr.total th,
.receipt tr.total td {
  border-bottom: 0;
  padding-top: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.receipt .fine {
  font-size: 0.85rem;
  color: var(--muted);
}

.callout {
  margin-top: 28px;
  padding: 20px 22px;
  border-left: 4px solid var(--cobalt);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

/* ── Sample request card ───────────────────────────────────────────────── */

.request {
  padding: clamp(20px, 3vw, 28px);
  display: grid;
  gap: 18px;
}

.score {
  display: flex;
  align-items: center;
  gap: 16px;
}

.score-ring {
  width: 76px;
  height: 76px;
  flex: none;
}

.score-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.rules {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.switch {
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--cobalt);
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
}

.switch.off {
  background: var(--line);
}

.switch.off::after {
  right: auto;
  left: 3px;
}

/* ── Dashboard tiles ───────────────────────────────────────────────────── */

.tiles {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.tiles li {
  padding: 18px 20px;
  display: grid;
  gap: 6px;
}

.tiles strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.tiles span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Plans ─────────────────────────────────────────────────────────────── */

.plans {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

@media (min-width: 960px) {
  .plans {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plan {
  padding: clamp(22px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.plan.featured {
  border: 2px solid var(--cobalt);
}

.plan-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-variant-numeric: tabular-nums;
}

.price-now {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price-per {
  color: var(--muted);
  font-weight: 500;
}

.price-was {
  color: var(--muted);
  font-size: 1.1rem;
}

.price-alt {
  color: var(--muted);
  font-size: 0.95rem;
}

.plan .ticks {
  margin-top: 4px;
}

.plan .btn {
  width: 100%;
  margin-top: auto;
}

.plan-blurb {
  color: var(--muted);
}

/* ── Call to action ────────────────────────────────────────────────────── */

.cta {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 20px;
}

.cta img {
  height: 64px;
  width: auto;
}

/* ── Legal placeholder ─────────────────────────────────────────────────── */

.prose {
  max-width: 44rem;
  display: grid;
  gap: 18px;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 16px;
}

.placeholder {
  padding: 18px 20px;
  border: 2px dashed var(--coral);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.placeholder strong {
  display: block;
  margin-bottom: 4px;
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 48px;
}

.site-footer .wrap {
  display: grid;
  gap: 28px;
}

@media (min-width: 820px) {
  .site-footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

.footer-brand {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.footer-brand p,
.copyright {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding: 10px 0;
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .nav a,
  .menu nav a {
    transition:
      background-color 120ms ease,
      border-color 120ms ease,
      text-decoration-color 120ms ease;
  }
}

.more {
  margin-top: 24px;
}

.plan-title {
  font-size: 1.4rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.two-col.top {
  align-items: start;
}

/* The smallest phones: the logo, Start free and Menu still share one row. */
@media (max-width: 400px) {
  .site-header .wrap {
    gap: 8px;
  }
  .site-header .brand {
    font-size: 1.3rem;
  }
  .site-header .btn {
    padding: 0 12px;
  }
  .menu summary {
    padding: 10px;
  }
}
