/* Cermat's holding page. Colours and type follow packages/ui/src/tokens.css. */

@font-face {
  font-family: "Source Serif 4 Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("/home/fonts/source-serif-4.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Source Serif 4 Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url("/home/fonts/source-serif-4-italic.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Public Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/home/fonts/public-sans.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --font-serif: "Source Serif 4 Variable", Georgia, "Times New Roman", serif;
  --font-sans: "Public Sans Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --paper: #f5f7f6;
  --surface: #ffffff;
  --surface-sunken: #ebf0ef;
  --line: #d3dddb;
  --ink: #10282a;
  --ink-muted: #4c6362;
  --teal: #0f5552;
  --teal-hover: #0b4441;
  --on-teal: #ffffff;
  --teal-tint: #d9ebe8;
  --saffron: #e3a23b;
  --saffron-tint: #f9ecd3;
  --saffron-ink: #7c4f0c;
  --focus: #0d6e86;
  --read: #3f7fd6;
  --receipt: #fffdf7;
  --shadow: 0 1px 2px rgba(16, 40, 42, 0.06), 0 24px 48px -12px rgba(16, 40, 42, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0b1514;
    --surface: #12201f;
    --surface-sunken: #081110;
    --line: #263837;
    --ink: #e4eeec;
    --ink-muted: #9fb4b1;
    --teal: #6cc2b8;
    --teal-hover: #8ad3ca;
    --on-teal: #04201e;
    --teal-tint: #16322f;
    --saffron: #e9b257;
    --saffron-tint: #3a2b12;
    --saffron-ink: #f1c77f;
    --focus: #7fd3e6;
    --read: #7fb3f0;
    --receipt: #f4f1e8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  }
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(60rem 40rem at 85% -10%, var(--teal-tint), transparent 70%), var(--paper);
  color: var(--ink);
  font: 400 16px / 1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.top,
.hero,
.foot {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
}
@media (min-width: 640px) {
  .top,
  .hero,
  .foot {
    padding-inline: 32px;
  }
}

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

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 20px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 600 22px / 1 var(--font-serif);
  letter-spacing: -0.01em;
}
.on-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .on-light {
    display: none;
  }
  .on-dark {
    display: block;
  }
}
.signin {
  font: 600 14px / 1 var(--font-sans);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  transition:
    border-color 0.15s,
    background 0.15s;
}
.signin:hover {
  border-color: var(--teal);
}

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

.hero {
  flex: 1;
  display: grid;
  gap: 48px;
  align-items: center;
  padding-block: 24px 56px;
}
@media (min-width: 920px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 72px;
    padding-block: 40px 80px;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  background: var(--saffron-tint);
  color: var(--saffron-ink);
  font: 600 13px / 1.2 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 0 0 var(--saffron);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--saffron) 60%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 10px transparent;
  }
}

h1 {
  margin: 0;
  font: 600 clamp(40px, 7.2vw, 72px) / 1.04 var(--font-serif);
  font-variation-settings: "opsz" 60;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 em {
  font-weight: 500;
  color: var(--teal);
}

.lede {
  max-width: 34rem;
  margin: 24px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
  max-width: 34rem;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 14px;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--teal);
  font: 600 16px / 1 var(--font-serif);
}
.steps b {
  font-weight: 600;
  line-height: 1.4;
  padding-top: 6px;
}
.steps span {
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ── Phone mock-up ──────────────────────────────────────── */

.phone {
  margin: 0 auto;
  width: 100%;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(1.5deg);
}
@media (prefers-reduced-motion: no-preference) {
  .phone {
    animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .bubble.in {
    animation: rise 0.6s 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pulse {
    animation: none;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--teal);
  color: var(--on-teal);
}
.chat-head img {
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--on-teal) 40%, transparent);
}
.chat-head b {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}
.chat-head span {
  font-size: 12px;
  opacity: 0.8;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px 20px;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 0) 0 0
    / 16px 16px,
    var(--surface-sunken);
}
.day {
  align-self: center;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 12px;
}

.bubble {
  position: relative;
  max-width: 82%;
  padding: 8px 10px 22px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}
.bubble p {
  margin: 0;
}
.bubble time {
  position: absolute;
  right: 10px;
  bottom: 5px;
  font-size: 11px;
  color: var(--ink-muted);
}
.bubble.out {
  align-self: flex-end;
  background: var(--teal-tint);
  padding: 6px 6px 22px;
  border-top-right-radius: 4px;
}
.bubble.in {
  align-self: flex-start;
  background: var(--surface);
  border-top-left-radius: 4px;
  display: grid;
  gap: 6px;
}
.ticks {
  font-style: normal;
  color: var(--read);
  letter-spacing: -3px;
  margin-left: 2px;
}

.receipt {
  width: 200px;
  padding: 14px 14px 18px;
  background: var(--receipt);
  color: #2b2b2b;
  font:
    500 11px / 1.5 ui-monospace,
    "SFMono-Regular",
    Menlo,
    Consolas,
    monospace;
  border-radius: 6px 6px 0 0;
  /* torn bottom edge */
  mask:
    conic-gradient(from -45deg at bottom, transparent, #000 1deg 89deg, transparent 90deg) 50% / 10px 100%;
  transform: rotate(-2deg);
}
.receipt b {
  display: block;
  text-align: center;
  letter-spacing: 0.08em;
}
.receipt > span {
  display: block;
  text-align: center;
  color: #6b6b6b;
}
.receipt hr {
  border: 0;
  border-top: 1px dashed #b9b4a6;
  margin: 8px 0;
}
.receipt p {
  display: flex;
  justify-content: space-between;
  margin: 0;
}
.receipt .total {
  font-weight: 700;
}

.tag {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--saffron-tint);
  color: var(--saffron-ink);
  font-size: 12px;
  font-weight: 600;
}
.meter {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-sunken);
  overflow: hidden;
  margin-top: 2px;
}
.meter span {
  display: block;
  width: 49.6%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}
.small {
  font-size: 12px;
  color: var(--ink-muted);
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-block: 24px 32px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 13px;
}
.foot i {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink);
}
