/*
 * Tenatry — the public site.
 *
 * Everything at "/" that a signed-out visitor can read: what the product does,
 * what it costs, the questions it gets asked, and how to reach a person.
 *
 * Built on the same tokens as the app, the portal and the login page rather
 * than on a framework. The marketing page and the product a visitor lands in
 * thirty seconds later should not look like two different companies — and the
 * palette here is not a separate decision that can drift from the one the
 * balances are rendered in.
 *
 * No JavaScript. Every interactive part is a <details> element, which means the
 * page works with scripting off and there is no bundle to keep in step.
 */
@import "/tenatry-tokens.css";

/* --- Shell ---------------------------------------------------------------- */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.st-wrap {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: inherit;
}

/* --- Header --------------------------------------------------------------- */

.st-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.st-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.st-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.st-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.st-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.st-nav a {
  text-decoration: none;
  color: var(--dim);
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 14px;
  transition: color 0.15s, background 0.15s;
}

.st-nav a:hover {
  color: var(--text);
  background: var(--card2);
}

.st-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

/* --- Buttons -------------------------------------------------------------- */

.st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 11px;
  border: 1px solid var(--line2);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease-spring), background 0.15s, border-color 0.15s;
}

.st-btn:hover {
  transform: translateY(-1px);
  border-color: var(--dim);
}

.st-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.st-btn--primary:hover {
  border-color: var(--accent);
}

.st-btn--lg {
  padding: 12px 22px;
  font-size: 15px;
  border-radius: 13px;
}

/* --- Type ----------------------------------------------------------------- */

h1,
h2,
h3 {
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 600;
}

h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
}

h3 {
  font-size: 17px;
  font-weight: 600;
}

.st-lede {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--dim);
  max-width: 62ch;
  margin: 0;
}

.st-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

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

.st-section {
  padding: 68px 0;
  border-top: 1px solid var(--line);
}

.st-section--plain {
  border-top: none;
}

.st-section__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 34px;
  max-width: 66ch;
}

.st-hero {
  padding: 76px 0 64px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
  animation: rb-rise 0.5s var(--ease-rise) both;
}

.st-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.st-hero__note {
  font-size: 13px;
  color: var(--dim);
}

/* --- Cards and grids ------------------------------------------------------ */

.st-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/*
 * Two across, for a section with an even number of cards. auto-fit would give
 * three at desktop width and leave the fourth alone on a row of its own, which
 * reads as a card that did not fit rather than as part of the set.
 */
.st-grid--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .st-grid--pair {
    grid-template-columns: 1fr;
  }
}

.st-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.st-card p {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
}

.st-card__icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 17px;
  margin-bottom: 4px;
}

/* --- Ledger sample -------------------------------------------------------- */

/*
 * The one figure-bearing element on the site, and it uses the app's mono face
 * with tabular figures for the same reason every balance in the product does:
 * a column that does not line up is harder to scan for the one that is wrong.
 */
.st-ledger {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.st-ledger__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.st-ledger__head span {
  color: var(--dim);
  font-size: 12px;
  font-weight: 400;
}

/*
 * The table scrolls inside its own card rather than the page scrolling
 * sideways. `overflow: hidden` on the card alone CLIPS the last columns on a
 * phone — the balance is the rightmost one, so the figure the whole section
 * exists to show is the first thing lost.
 */
.st-ledger__scroll {
  overflow-x: auto;
}

.st-ledger table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 14px;
}

.st-ledger th,
.st-ledger td {
  padding: 10px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.st-ledger th {
  font-weight: 500;
  font-size: 12px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.st-ledger tr:last-child td {
  border-bottom: none;
}

.st-ledger .num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.st-ledger .owed {
  color: var(--danger);
}

.st-ledger .clear {
  color: var(--ok);
}

/* --- Pricing -------------------------------------------------------------- */

.st-plans {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: stretch;
}

.st-plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
}

.st-plan--featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.st-plan__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 17px;
}

.st-plan__price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.st-plan__price small {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--dim);
  letter-spacing: 0;
}

.st-plan__units {
  font-size: 14px;
  color: var(--dim);
}

.st-plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.st-plan li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--dim);
}

.st-plan li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.st-plan .st-btn {
  margin-top: auto;
}

.st-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* --- Callout -------------------------------------------------------------- */

.st-note {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--dim);
}

.st-note strong {
  color: var(--text);
  font-weight: 600;
}

.st-note--warn {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 35%, transparent);
  color: var(--text);
}

/* --- FAQ ------------------------------------------------------------------ */

.st-faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.st-faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.st-faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

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

.st-faq summary::after {
  content: "+";
  color: var(--dim);
  font-size: 19px;
  line-height: 1;
  flex-shrink: 0;
}

.st-faq details[open] summary::after {
  content: "−";
}

.st-faq details[open] summary {
  border-bottom: 1px solid var(--line);
}

.st-faq__body {
  padding: 16px 20px;
  color: var(--dim);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.st-faq__body p {
  margin: 0;
}

/* --- Contact -------------------------------------------------------------- */

.st-contact {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.st-contact a {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  word-break: break-all;
}

/* --- CTA band ------------------------------------------------------------- */

.st-cta {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow);
}

/* --- Footer --------------------------------------------------------------- */

.st-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 48px;
  color: var(--dim);
  font-size: 13px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.st-footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-left: auto;
}

.st-footer a {
  text-decoration: none;
}

.st-footer a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .st-section {
    padding: 48px 0;
  }

  .st-hero {
    padding: 48px 0 40px;
  }

  .st-cta {
    padding: 26px;
  }

  .st-footer nav {
    margin-left: 0;
  }
}

/* The `hidden` attribute has to actually hide things.
 *
 * A browser's own stylesheet says [hidden] { display: none }, but ANY author
 * rule that sets display beats it — `.st-btn { display: inline-flex }` did
 * exactly that, so the demo button rendered while marked hidden and clicking it
 * hit a switched-off endpoint. Stated here once, with the weight to win, rather
 * than remembered per element.
 */
[hidden] {
  display: none !important;
}
