/* Стилі лендинга: герой, зразок запису, стандарт, картки, смуги. */
/* Landing. Mobile first: one column; from 64em the hero, and section 03, sit in two columns.
   Motion (strike, pulse, tick strip, button shimmer, cursor, reveal) comes from motion.css. */

.inline-form { display: contents; }

/* Landing headlines never hyphenate (they are short and chosen to fit); a word that still
   cannot fit wraps without a hyphen instead of widening the page. */
.hero__title,
.closing__title,
.landing-section h2 {
  hyphens: manual;
  overflow-wrap: break-word;
}

/* Two sentences, two lines: each sentence is a span. */
.hero__title > span,
.closing__title > span,
.work__text h2 > span { display: block; }

/* ---------- Hero ---------- */

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

.hero__grid {
  display: grid;
  gap: var(--s-7);
}

/* The headline is sized by its column (container query units), so the longest word always fits. */
.hero__text {
  min-width: 0;
  container-type: inline-size;
}

.hero__title {
  margin-top: var(--s-5);
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-size: clamp(2.5rem, 14cqi, 5.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: var(--track-display);
}

.hero__lede { margin-top: var(--s-5); }

.hero__actions {
  display: grid;
  justify-items: start;
  gap: var(--s-4);
  margin-top: var(--s-6);
}

.hero__actions .btn--lg { min-width: min(15rem, 100%); justify-content: space-between; }

.hero__compare {
  display: grid;
  gap: var(--s-3) var(--s-6);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  font-size: var(--fs-1);
  line-height: 1.4;
}

.hero__compare p { max-width: 22ch; }

@media (min-width: 30em) {
  .hero__compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The example record. */
.hero__figure { min-width: 0; }

.hero__caption { margin-top: var(--s-3); }

.specimen .record__body { display: grid; }

.specimen__shot { margin-bottom: var(--s-5); border: 1px solid var(--line-strong); }

.specimen__name { font-size: var(--fs-3); }

.specimen .plate__tagline { margin-top: var(--s-2); }

.specimen .plate__strip { margin-top: var(--s-5); }

.specimen__declared { margin-top: var(--s-4); }

.specimen__checked { color: var(--accent-text); }

/* "Repo ownership ✓   Domain control ✓ / 30-day uptime 99.9%   ● relay.example" */
.checks {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs--2);
  color: var(--muted);
}

@media (min-width: 30em) {
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.checks__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-3);
  min-width: 0;
}

.checks dd {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--text);
  overflow-wrap: anywhere;
}

.checks__ok { width: 1rem; height: 1rem; color: var(--accent-text); }
.checks .pulse-dot { color: var(--accent-text); }

.specimen__ticks { margin-top: var(--s-4); }

@media (min-width: 64em) {
  .hero { padding-top: var(--s-8); }
  .hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--s-6);
    align-items: start;
  }
  .hero__text { grid-column: 1 / span 6; }
  .hero__figure { grid-column: 7 / span 6; }
}

/* ---------- Product illustrations (made-up screens, decorative) ---------- */
/* Palette-based mock surfaces inherit the active theme. Every text pair
   inside is measured for both themes in docs/PALETTE.md. */

.mock {
  /* In the light theme paper, surface and raised are one colour, so the screen gets its own tinted surface
     (ink mixed into paper) and every inner block gets a hairline edge: nothing floats edgeless in either theme. */
  --mock-bg: var(--preview-bg);
  --mock-ink: var(--text);
  --mock-soft: var(--muted);
  --mock-card: color-mix(in srgb, var(--text) 4%, var(--paper));
  --mock-item: var(--paper);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-width: 0;
  padding: var(--s-4);
  overflow: hidden;
  background: var(--mock-bg);
  color: var(--mock-ink);
  font-size: var(--fs--2);
  line-height: 1.35;
  user-select: none;
}

/* Rows never shrink: when a screen is taller than its frame, the bottom is cut off like a screenshot. */
.mock > * { flex-shrink: 0; }

.mock p, .mock li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mock__bar {
  font-family: var(--font-mono);
  color: var(--mock-soft);
}

.mock__title {
  font-family: var(--font-display);
  font-size: var(--fs-1);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.mock__kicker {
  font-family: var(--font-mono);
  color: var(--mock-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mock__app {
  display: grid;
  gap: var(--s-4);
}

.mock__side {
  display: none;
  margin: 0;
  padding: 0 var(--s-4) 0 0;
  list-style: none;
  border-right: 1px solid var(--line);
}

.mock__side li + li { margin-top: var(--s-1); }
.mock__side .mock__kicker { margin-bottom: var(--s-2); }

.mock__main { display: grid; gap: var(--s-3); min-width: 0; }

.mock__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
}

.mock__col {
  display: grid;
  align-content: start;
  gap: var(--s-2);
  min-width: 0;
  padding: var(--s-2);
  background: var(--mock-card);
  border: 1px solid var(--line-strong);
}

.mock .mock__item {
  white-space: normal;
  padding: var(--s-1) var(--s-2);
  background: var(--mock-item);
  border: 1px solid var(--line-strong);
}

/* Phones: two board columns instead of three, so the cards stay readable. */
@media (max-width: 29.99em) {
  .mock__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock__cols > :nth-child(3) { display: none; }
}

@media (min-width: 30em) {
  .mock { padding: var(--s-5); }
  .mock__app { grid-template-columns: auto minmax(0, 1fr); }
  .mock__side { display: block; }
  .mock__title { font-size: var(--fs-2); }
}

/* The cards are narrower than the hero record: keep their screens simple. */
.card__media .mock { height: 100%; }
.card__media .mock__title { font-size: var(--fs-1); }

.mock--plotline {
  --mock-bg: var(--preview-bg);
  --mock-ink: var(--text);
  --mock-soft: var(--muted);
}

.mock__books {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
}

.mock .mock__book {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-3);
  aspect-ratio: 5 / 6;
  padding: var(--s-2);
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: normal;
}

.mock__book span { font-family: var(--font-mono); font-weight: 400; }

/* Books: paper on rule/ink, ink on proof; measured in docs/PALETTE.md. */
.mock__book--1 { background: #20383A; color: #F3F6F7; }
.mock__book--2 { background: #071C1E; color: #F3F6F7; }
.mock__book--3 { background: #C7F36B; color: #071C1E; }

.mock--forma {
  --mock-bg: var(--preview-bg);
  --mock-ink: var(--text);
  --mock-soft: var(--muted);
}

.mock__form {
  display: grid;
  gap: var(--s-2);
  align-self: center;
  width: min(100%, 17rem);
  padding: var(--s-4);
  background: var(--mock-item);
  border: 1px solid var(--line-strong);
}

.mock__form .mock__title { color: var(--text); }

.mock__field {
  padding: var(--s-2);
  border: 1px solid var(--line-strong);
  background: #F3F6F7;
  color: #20383A;
}

.mock__button {
  padding: var(--s-2);
  background: #071C1E;
  color: #F3F6F7;
  text-align: center;
  border: 1px solid var(--line-strong);
}

/* Cover letter for a real project without screenshots. */
.card__placeholder {
  display: grid;
  place-content: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: var(--fs-5);
  font-weight: 500;
}

/* ---------- Statements band ---------- */

.statements { padding-block: var(--s-6); }

.statements__list {
  display: grid;
  gap: var(--s-3) var(--s-6);
  margin-block: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--fs--2);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

@media (min-width: 48em) {
  .statements__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Sections ---------- */

.landing-section { padding-top: var(--section); }

.landing-section .section-head h2 { max-width: none; }

@media (min-width: 64em) {
  .landing-section h2 { font-size: var(--fs-5); }
}

/* The standard: three marks, side by side from 48em. */
.standard {
  display: grid;
  gap: var(--s-7);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48em) {
  .standard { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
}

.standard__item {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.standard__top {
  display: flex;
  align-items: center;
  margin-top: var(--s-4);
}

.standard__check { width: 1.5rem; height: 1.5rem; color: var(--accent-text); }

.standard__name { font-size: var(--fs-3); }

.standard__claim { font-weight: 500; font-size: 1.0625rem; }

.standard__rule { max-width: 40ch; color: var(--muted); }

.standard__meta {
  margin-top: auto;
  padding-top: var(--s-4);
  color: var(--accent-text);
}

.standard__note { margin-top: var(--s-7); }

.standard__foot {
  display: grid;
  justify-items: start;
  gap: var(--s-1);
  max-width: var(--measure);
  margin-top: var(--s-4);
  font-size: var(--fs--1);
}

/* 02 Out in the world. */
.landing-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-5);
}

/* 03 The work behind the mark. */
.work__rule { margin-bottom: var(--section); }

.work {
  display: grid;
  gap: var(--s-7);
}

.work__text {
  display: grid;
  align-content: start;
  gap: var(--s-4);
  min-width: 0;
}

.work__text h2 { margin-top: var(--s-2); }

.work__note {
  margin-top: var(--s-2);
  color: var(--accent-text);
  font-size: var(--fs--1);
}

.work__figure { min-width: 0; }

.log__top { margin-top: 0; }

.log {
  display: grid;
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.log__entry {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  align-items: baseline;
  gap: var(--s-4);
}

@media (min-width: 30em) {
  .log__entry { grid-template-columns: 6.5rem minmax(0, 1fr); font-size: var(--fs-1); }
}

.readme {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-4);
}

/* A picture of the README badge. */
.badge-preview {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  font-size: var(--fs--2);
}

.badge-preview__site {
  display: inline-flex;
  align-items: center;
  padding: var(--s-2) var(--s-3);
  background: var(--band-bg);
  color: #F3F6F7; /* the dark theme's text on the always-dark band */
}

.badge-preview__logo { height: 1rem; width: auto; }
.badge-preview__logo .logo-mark,
.badge-preview__logo .logo-word { fill: currentColor; }

.badge-preview__marks {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-2) var(--s-3);
  background: var(--proof-bg);
  color: var(--proof);
  font-family: var(--font-mono);
}

.badge-preview__marks .icon { width: 1.1em; height: 1.1em; } /* follows the mock badge's text */

@media (min-width: 64em) {
  .work {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--s-6);
  }
  .work__text { grid-column: 1 / span 6; }
  .work__figure { grid-column: 7 / span 6; }
}

/* ---------- Closing band ---------- */

.closing {
  margin-top: var(--section);
  padding-block: var(--s-8);
}

@media (min-width: 64em) {
  .closing { padding-block: var(--s-9); }
}

.closing__grid {
  display: grid;
  gap: var(--s-6);
}

.closing__text {
  display: grid;
  gap: var(--s-5);
  min-width: 0;
  container-type: inline-size;
}

.closing__title {
  font-size: var(--fs-4);
  font-size: clamp(2.25rem, 11cqi, 4.25rem);
  line-height: 1.05;
}

.closing__action {
  display: grid;
  justify-items: start;
  gap: var(--s-3);
}

@media (min-width: 64em) {
  .closing__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
  }
  .closing__text { grid-column: 1 / span 8; }
  .closing__action { grid-column: 9 / span 4; justify-items: stretch; }
  .closing__action .btn--lg { justify-content: space-between; }
}

/* The invite card (fewer than three real projects): a dashed frame on the page colour, a plus where the picture
   would be. It is a plain link to sign-in, then to "New project". */
.card--invite { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.card--invite .card__media { display: grid; place-items: center; background: transparent; border-bottom-style: dashed; }
.card--invite .card__placeholder .icon { width: var(--icon-l); height: var(--icon-l); color: var(--muted); }

/* ---------- Example uptime in the Relay card (pages/_example_uptime.html) ----------
   Drawn after the reference in docs/details: flat lime bars of one width with small equal gaps, no outline, one
   shared bottom edge; the day with a failed check is teal and lowest. Landing only: the real project bars
   (components.css, .uptime-bars) keep their own look and meaning. The track keeps the reference's proportion
   (about 15:1), so the density stays the same at every card width. */
.example-uptime__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin: 0 0 var(--s-3);
}

.example-uptime__label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs--1);
}

.example-uptime__value {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-0);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.example-uptime__bars {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  align-items: end;
  gap: clamp(2px, 0.9%, 6px);
  aspect-ratio: 10 / 1; /* phones: a little taller than the reference, so the bars stay readable */
  margin: 0;
  padding: 0;
  list-style: none;
}

/* No min-height here: with aspect-ratio it would become a minimum width and push the card wider than a phone. */
@media (min-width: 30em) {
  .example-uptime__bars { aspect-ratio: 15 / 1; }
}

.example-uptime__bar { height: 100%; background: var(--accent); }
.example-uptime__bar--short { height: 84%; }
.example-uptime__bar--low { height: 43%; }
.example-uptime__bar.is-partial { background: var(--signal); }
.example-uptime__bar.is-down { background: var(--text); }
.example-uptime__bar.is-none { background: var(--line); }

.example-uptime__note {
  margin: var(--s-4) 0 0;
  color: var(--muted);
}
