/* Leavory — inner pages (Platform, Security Gate, Articles). Builds on
   css/styles.css: same tokens, header, footer and call to action; this
   file adds the page hero, the section bar and the content blocks. */

/* The section bar sits under the fixed header: anchors land below both. */
html:has(.subnav) {
  scroll-padding-top: 140px;
}
/* A section's own top padding would sit empty under the bars; its heading
   lands just below them instead. */
main:has(> .subnav) > section[id] {
  scroll-margin-top: calc(28px - var(--section));
}

/* ---------- Page hero ---------- */
.phero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: calc(68px + clamp(56px, 8vw, 112px)) 0 clamp(56px, 7vw, 96px);
  border-bottom: 1px solid var(--line-2);
  text-align: center;
}
.phero h1 {
  max-width: 17ch;
  margin: 24px auto 0;
  font-size: clamp(40px, 5.6vw, 80px);
  font-weight: 540;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.phero h1 span {
  color: var(--text-3);
}
.phero__lede {
  max-width: 40rem;
  margin: 24px auto 0;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--text-2);
  text-wrap: balance;
}
.phero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}
.phero__actions .pill {
  height: 40px;
  padding: 0 18px;
}

/* ---------- Section bar ---------- */
.subnav {
  position: sticky;
  top: 68px;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    rgb(var(--ink-rgb) / 0.82),
    rgb(var(--ink-rgb) / 0.82)
  );
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
}
.subnav__inner {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 52px;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav a {
  flex: none;
  padding: 8px 12px;
  border-radius: 8px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  transition:
    color 0.2s,
    background-color 0.2s;
}
.subnav a:hover,
.subnav a.is-on {
  background-color: rgb(var(--white-rgb) / 0.07);
  color: var(--text);
}

/* ---------- Content blocks ----------
   As on the previous site: the text on top, the product view below at the
   width of the grid, then any supporting points. */
/* As much space under the section's heading as over it, so the heading
   sits centred between the lines. */
.blocks {
  margin-top: var(--section);
}
.block {
  padding: calc(var(--section) / 2) 0;
  border-top: 1px solid var(--line);
}
.block__text {
  max-width: 48rem;
}
.block__text h3 {
  margin-top: 18px;
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 540;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.block__text > p:not(.eyebrow, .for, .block__note) {
  max-width: var(--measure);
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-2);
}
.block__visual {
  min-width: 0;
  max-width: var(--visual-max);
  margin-top: clamp(32px, 4vw, 48px);
  margin-inline: auto;
}
.block__after {
  margin-top: clamp(32px, 4vw, 48px);
}
/* Supporting points follow the product view; a sub-block keeps its text
   on the left and centres only its own view. */
.block__after:not(:has(> .block__text)) {
  max-width: var(--visual-max);
  margin-inline: auto;
}
.block__text--sub h4 {
  margin: 0;
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 540;
  letter-spacing: -0.025em;
}
.block__text--sub p {
  max-width: var(--measure);
  margin-top: 10px;
  font-size: 16px;
  color: var(--text-2);
}
.block__note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-3);
}
/* Who a block is for. */
.for {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.for .mono {
  margin-right: 4px;
  font-size: 11px;
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
}

/* Two short points under a block, side by side. */
.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 32px;
}
.pair > div {
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
}
.pair h4,
.trio h4 {
  margin: 0;
}
.pair h4 {
  font-size: 15px;
  font-weight: 600;
}
.pair p {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--text-2);
}

/* Short points under a block. */
.trio {
  display: grid;
  gap: 16px;
}
.trio--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
}
.trio li {
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}
.trio h3,
.trio h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.trio__icon {
  margin-bottom: 10px;
  color: var(--red);
}
.trio p {
  margin-top: 4px;
  font-size: 14.5px;
  color: var(--text-2);
}
/* ---------- Light product views ---------- */
.mock {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      rgb(var(--white-rgb) / 0.045),
      rgb(var(--white-rgb) / 0.015)
    ),
    var(--ink);
  box-shadow:
    inset 0 1px 0 rgb(var(--white-rgb) / 0.08),
    0 40px 100px -40px rgb(var(--red-rgb) / 0.22);
  font-size: 13.5px;
  line-height: 1.45;
}
.mock__top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}
.mock__top .app__mark {
  height: 18px;
}
.mock__title {
  font-size: 13px;
  color: var(--text-2);
}
.mock__title strong {
  color: var(--text);
  font-weight: 600;
}
.mock__meta {
  margin-left: auto;
  font: 400 11.5px/1.3 var(--mono);
  color: var(--text-3);
  text-align: right;
}
.mock__body {
  display: grid;
  gap: 18px;
  padding: 20px;
}
.mock__label {
  font: 500 10.5px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mock__scroll {
  overflow-x: auto;
}

/* Numbers in a row of tiles. Each tile draws its top and left rule, pulled
   under the frame, so a short last row leaves no grey gap. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat {
  margin: -1px 0 0 -1px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.stat span {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
}
.stat b {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stat small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-2);
}
.stat.is-hot b {
  color: var(--white);
}
.stat.is-hot {
  box-shadow: inset 0 2px 0 var(--red);
}

/* A compact table. */
.mtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mtable th {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line-2);
  font: 500 10.5px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.mtable td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.mtable tr:last-child td {
  border-bottom: 0;
}
.mtable td.num,
.mtable th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mtable .sub {
  display: block;
  font: 400 11.5px/1.4 var(--mono);
  color: var(--text-3);
}
.mtable strong {
  font-weight: 600;
}
.mono-cell {
  font: 400 12.5px/1.4 var(--mono);
  white-space: nowrap;
}
/* A score from 0 to 100. */
.score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 600;
}
.score small {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-3);
}
/* A short bar, as a share of a row. */
.share {
  display: block;
  width: 100%;
  min-width: 60px;
  height: 4px;
  border-radius: 2px;
  background-color: rgb(var(--white-rgb) / 0.08);
}
.share i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background-color: var(--red);
}

/* ---------- Code ---------- */
.code {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background-color: rgb(var(--white-rgb) / 0.03);
}
.code + .code {
  margin-top: 16px;
}
.code__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 6px 8px 6px 16px;
  border-bottom: 1px solid var(--line);
}
.code__top .mono {
  font-size: 11px;
}
.code__copy {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: none;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.code__copy:hover {
  border-color: rgb(var(--white-rgb) / 0.3);
  color: var(--text);
}
.code__copy {
  justify-content: center;
  gap: 6px;
}
.code__copy svg {
  flex: none;
}
.code__copy-done {
  display: none;
}
/* Copied: a check instead of the copy icon, a solid white button, and the
   sample's frame lit for a moment. */
.code__copy.is-copied {
  border-color: transparent;
  background-color: var(--white);
  color: var(--ink);
}
.code__copy.is-copied .code__copy-icon {
  display: none;
}
.code__copy.is-copied .code__copy-done {
  display: block;
}
@media (prefers-reduced-motion: no-preference) {
  .code__copy.is-copied .code__copy-done {
    animation: copy-pop 0.3s var(--ease);
  }
}
@keyframes copy-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}
/* The browser blocked the clipboard: the code is selected, press the keys. */
.code__copy.is-failed {
  border-color: rgb(var(--red-rgb) / 0.9);
  color: var(--text);
}
.code {
  transition: border-color 0.3s;
}
.code.is-copied {
  border-color: rgb(var(--white-rgb) / 0.45);
}
.code pre {
  margin: 0;
  padding: 16px 18px 18px;
  overflow-x: auto;
  font: 400 13px/1.65 var(--mono);
  color: var(--text-2);
  tab-size: 2;
}
.code .c {
  color: var(--text-3);
}
:not(pre) > code {
  padding: 1px 6px;
  border-radius: 5px;
  background-color: rgb(var(--white-rgb) / 0.08);
  font: 400 0.88em/1.4 var(--mono);
}

/* ---------- Questions ---------- */
.faq {
  border-top: 1px solid var(--line-2);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  position: relative;
  padding: 20px 40px 20px 0;
  font-size: 17px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 4px;
  width: 14px;
  height: 1.5px;
  background-color: var(--text-2);
  transition: transform 0.25s var(--ease);
}
.faq summary::after {
  transform: rotate(90deg);
}
.faq details[open]:not([data-state="closing"]) summary::after {
  transform: rotate(0deg);
}
.faq details > p {
  max-width: 44rem;
  padding-bottom: 22px;
  font-size: 15.5px;
  color: var(--text-2);
}

/* ---------- Big figures ---------- */
.figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line-2);
}
.figures li {
  padding: 28px 24px 30px 0;
}
.figures li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.figures b {
  display: block;
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 540;
  line-height: 1;
  letter-spacing: -0.045em;
}
.figures span {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  color: var(--text-2);
}

/* ---------- Contact ----------
   The form on the left, other ways in on the right. Without JavaScript the
   form stays hidden: the address is the way in. */
.contact {
  padding: clamp(56px, 7vw, 96px) 0 calc(var(--section) / 2);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 18rem);
  gap: 48px clamp(40px, 6vw, 96px);
  align-items: start;
  max-width: 64rem;
}
html:not(.js) .contact-form {
  display: none;
}
.contact-form {
  display: grid;
  gap: 20px;
}
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  font-size: 15px;
}
.field input {
  height: 44px;
  padding: 0 16px;
}
.field textarea {
  min-height: 176px;
  padding: 12px 16px;
  line-height: 1.5;
  resize: vertical;
}
.field__error {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
}
.field__error::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--red);
}
.field__error[hidden] {
  display: none;
}
.contact-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 4px;
}
.contact-form__foot .pill {
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
}
.contact-form__note {
  font-size: 14px;
  color: var(--text-3);
}
.contact-form .form-status {
  margin-top: 0;
}
.contact__noscript {
  font-size: 17px;
  color: var(--text-2);
}
.contact__noscript a,
.contact__aside p a:not(.more) {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact__aside {
  display: grid;
  gap: 28px;
}
.contact__aside > div {
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}
.contact__aside h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}
.contact__aside h3 svg {
  color: var(--text-3);
}
.contact__aside p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-2);
}
.contact__aside .more {
  display: flex;
  width: fit-content;
  margin-top: 6px;
  color: var(--text);
}

/* Motion control on pages without a hero flow: the footer's corner. */
.footer {
  position: relative;
}
.footer > .motion-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 16px;
}

/* ---------- Breakpoints ---------- */
@media (max-width: 760px) {
  .trio--3,
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .pair,
  .figures {
    grid-template-columns: minmax(0, 1fr);
  }
  .figures li + li {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
