/* ModelPenny's coming-soon page. Every value comes from the ModelPenny design system's tokens. */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("/fonts/plex-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-mono-400-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-mono-500-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --canvas: #f6f6f4;
  --surface: #ffffff;
  --line: #e4e5e2;
  --line-strong: #868a90;
  --ink: #0f1115;
  --ink-muted: #4a4e56;
  --ink-subtle: #5c6068;
  --action: #0f1115;
  --on-action: #ffffff;
  --action-hover: #2a2d33;
  --focus: #386bb6;
  --shadow-xs: 0 1px 2px rgba(15, 17, 21, 0.05);

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: 32px;
  --content-max: 1180px;
}

/* The dark theme has its own chosen values; it is not an inverted light theme. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #0b0c0f;
    --surface: #15171c;
    --line: #262930;
    --line-strong: #6b717c;
    --ink: #e6e9ee;
    --ink-muted: #b0b6bf;
    --ink-subtle: #8e95a0;
    --action: #e6e9ee;
    --on-action: #0f1115;
    --action-hover: #c9ced6;
    --focus: #7da6e3;
    --shadow-xs: none;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
p,
figure {
  margin: 0;
}

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

a {
  color: inherit;
}

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

.shell {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */

.site-header {
  padding-block: 32px;
}

.logo {
  display: inline-block;
}

.logo img {
  height: 30px;
  width: auto;
}

/* Hero: the statement on the left, the receipt that proves it on the right. */

.hero {
  display: grid;
  align-items: center;
  padding-block: 24px 72px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 80px;
  align-items: center;
}

.hero__title {
  font-weight: 500;
  font-size: clamp(34px, 3.7vw, 56px);
  line-height: 1.07;
  letter-spacing: -0.025em;
  max-width: 13em;
  text-wrap: balance;
}

.hero__lede {
  margin-top: 24px;
  font-weight: 300;
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 31em;
  text-wrap: pretty;
}

.hero__lede strong {
  font-weight: 500;
  color: var(--ink);
}

.hero__open {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 22px;
  border-radius: 8px;
  background: var(--action);
  color: var(--on-action);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 120ms ease;
}

.button:hover {
  background: var(--action-hover);
}

.status {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-subtle);
}

/* The receipt: an example day of AI calls, itemised to the last penny and torn at the foot like the coin. */

.receipt {
  --tear: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-xs);
  padding: 28px 28px calc(28px + var(--tear));
  clip-path: polygon(
    0 0, 100% 0, 100% 100%,
    95% calc(100% - var(--tear)), 90% 100%, 85% calc(100% - var(--tear)), 80% 100%, 75% calc(100% - var(--tear)),
    70% 100%, 65% calc(100% - var(--tear)), 60% 100%, 55% calc(100% - var(--tear)), 50% 100%,
    45% calc(100% - var(--tear)), 40% 100%, 35% calc(100% - var(--tear)), 30% 100%, 25% calc(100% - var(--tear)),
    20% 100%, 15% calc(100% - var(--tear)), 10% 100%, 5% calc(100% - var(--tear)), 0 100%
  );
}

.receipt table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

.receipt caption {
  text-align: left;
  padding-bottom: 20px;
}

.receipt__title {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  line-height: 22px;
}

.receipt__note {
  display: block;
  font-size: 12px;
  color: var(--ink-subtle);
}

.receipt th,
.receipt td {
  padding: 8px 0;
  text-align: right;
  font-weight: 400;
}

.receipt th:first-child,
.receipt td:first-child {
  text-align: left;
}

.receipt td + td,
.receipt th + th {
  padding-left: 16px;
}

.receipt thead th {
  padding-top: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-subtle);
}

.receipt tbody tr + tr td,
.receipt tbody tr + tr th {
  border-top: 1px dotted var(--line-strong);
}

.receipt tbody tr:first-child > * {
  border-top: 1px dotted var(--line-strong);
}

.receipt .tokens {
  color: var(--ink-subtle);
}

.receipt .subtotal > * {
  border-top: 1px solid var(--line-strong);
  color: var(--ink-muted);
}

.receipt .group th {
  padding-top: 20px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  border-top: 0;
}

.receipt tbody .group + tr > * {
  border-top: 1px dotted var(--line-strong);
}

.receipt tfoot th,
.receipt tfoot td {
  padding-top: 12px;
  border-top: 3px double var(--line-strong);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
}

.receipt__proof {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-subtle);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 24px 32px;
  font-size: 13px;
  color: var(--ink-subtle);
}

.site-footer a {
  color: var(--ink-muted);
}

.site-footer a:hover {
  color: var(--ink);
}

/* The 404 page. */

.lost {
  display: grid;
  align-content: center;
  gap: 24px;
  padding-block: 64px 120px;
}

.lost .hero__title {
  font-size: clamp(30px, 3vw, 40px);
}

/* Smaller screens: the statement first, then the receipt, full width. */

@media (max-width: 52rem) {
  :root {
    --gutter: 20px;
  }

  .site-header {
    padding-block: 20px;
  }

  .logo img {
    height: 26px;
  }

  .hero {
    padding-block: 32px 64px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .hero__open {
    margin-top: 32px;
  }

  .receipt {
    padding: 22px 20px calc(22px + var(--tear));
  }

  .receipt table {
    font-size: 12px;
  }

  .receipt td + td,
  .receipt th + th {
    padding-left: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
