/* TinyBank site. Built on tokens.css + tinybank-components.css from the brand kit.
   Dark only, square corners, 1px lines, tracked uppercase for brand lines. */

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 26px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: var(--stroke-focus) solid var(--line); outline-offset: 3px; }

.wrap {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding-left: max(var(--space-3), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-3), env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: var(--space-5); padding-right: var(--space-5); } }

.caps { text-transform: uppercase; }
.muted { color: var(--ink-muted); }
.eyebrow {
  margin: 0; font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-muted);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: var(--stroke-hairline) solid var(--line-subtle);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 72px; }
.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand span { font-size: 15px; font-weight: 500; letter-spacing: 0.4em; text-transform: uppercase; }
.nav { display: none; gap: var(--space-4); white-space: nowrap; }
.nav a {
  text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-muted); transition: color .15s ease;
}
.nav a:hover { color: var(--ink); }
@media (min-width: 1100px) { .nav { display: flex; } }
.site-header .tb-btn { min-height: 40px; white-space: nowrap; }
@media (max-width: 420px) { .brand span { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: var(--stroke-hairline) solid var(--line-subtle);
  background: radial-gradient(120% 90% at 30% 20%, var(--charcoal) 0%, var(--surface) 55%, var(--ground) 100%); }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: var(--space-5);
  padding-block: var(--space-6) calc(var(--space-6) + var(--space-5)); }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); max-width: 640px; }
.hero h1 {
  margin: 0; font-weight: 400; text-transform: uppercase; text-wrap: balance;
  font-size: clamp(32px, 6vw, 60px); line-height: 1.15; letter-spacing: 0.28em;
}
.hero .lede { margin: 0; max-width: 34em; color: var(--ink-muted); font-size: 18px; line-height: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
@media (min-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; justify-items: end; padding-block: 120px 140px; }
  .hero-copy { align-items: flex-end; text-align: right; }
  .hero .tb-frame { text-align: center; }
}

/* The lit slab from the brand banner: one corner of a matte block, top face lit from the top left,
   front face falling into shadow, standing on a grey floor. */
.slab { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, var(--charcoal) 0%, var(--surface-raised) 30%, transparent 55%); }
.slab::before, .slab::after { content: ""; position: absolute; inset: 0; }
.slab::before { /* top face */
  background: linear-gradient(118deg, var(--slate) 22%, var(--charcoal) 42%, var(--surface) 68%, var(--ground) 92%);
  clip-path: polygon(20% 34%, 44% 0, 100% 0, 100% 100%, 62% 100%);
}
.slab::after { /* front face */
  background: linear-gradient(180deg, var(--surface-raised) 0%, var(--ground) 60%);
  clip-path: polygon(20% 34%, 62% 100%, 20% 100%);
}
@media (max-width: 959px) { .slab { opacity: .4; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-6); border-bottom: var(--stroke-hairline) solid var(--line-subtle); }
@media (min-width: 720px) { .section { padding-block: 104px; } }
.section-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); max-width: 720px; }
.section-head h2 {
  margin: 0; font-weight: 400; text-transform: uppercase; text-wrap: balance;
  font-size: clamp(22px, 3.4vw, 30px); line-height: 1.35; letter-spacing: 0.28em;
}
.section-head p { margin: 0; color: var(--ink-muted); max-width: 38em; }
.surface { background: var(--surface); }

/* Unsecured explainer: two columns of text */
.split { display: grid; gap: var(--space-5); }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: var(--space-6); } }
.split p { margin: 0 0 var(--space-3); max-width: 34em; }
.compare { display: grid; border: var(--stroke-hairline) solid var(--line); }
.compare > div { padding: var(--space-4); display: grid; gap: var(--space-2); }
.compare > div + div { border-top: var(--stroke-hairline) solid var(--line-subtle); }
.compare h3 { margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.compare p { margin: 0; color: var(--ink-muted); }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: var(--stroke-hairline) solid var(--line); counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: var(--space-2); padding: var(--space-4) 0; border-bottom: var(--stroke-hairline) solid var(--line-subtle); min-width: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero); font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.2em; color: var(--ink-muted); font-variant-numeric: tabular-nums;
}
.steps h3 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.steps p { margin: 0; color: var(--ink-muted); }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(4, 1fr); border-top: 0; }
  .steps li { padding: var(--space-4) var(--space-4) var(--space-4) 0; border-bottom: 0; border-top: var(--stroke-hairline) solid var(--line); }
  .steps li + li { padding-left: var(--space-4); border-left: var(--stroke-hairline) solid var(--line-subtle); }
}

/* Cost: what every offer shows */
.offer { border: var(--stroke-hairline) solid var(--line); background: var(--ground); max-width: 560px; }
.offer-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: var(--stroke-hairline) solid var(--line-subtle); }
.offer-head .eyebrow { color: var(--ink); }
.offer dl { margin: 0; display: grid; }
.offer dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: var(--stroke-hairline) solid var(--line-subtle); }
.offer dl > div:last-child { border-bottom: 0; }
.offer dt { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.offer dd { margin: 0; text-align: right; color: var(--ink); }
.offer .order { font-variant-numeric: tabular-nums; color: var(--ink-muted); margin-right: var(--space-2); }

/* Checklist */
.needs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: var(--stroke-hairline) solid var(--line); }
.needs li { display: grid; grid-template-columns: 24px 1fr; gap: var(--space-3); align-items: start; padding: var(--space-4) 0; border-bottom: var(--stroke-hairline) solid var(--line-subtle); }
.needs svg { width: 24px; height: 24px; stroke: var(--ink); fill: none; stroke-width: 1.5; stroke-linecap: square; margin-top: 1px; }
.needs strong { display: block; font-weight: 600; }
.needs span { color: var(--ink-muted); }
@media (min-width: 860px) { .needs { grid-template-columns: 1fr 1fr; column-gap: var(--space-6); } }

/* Responsible lending */
.promises { display: grid; gap: var(--space-4); }
@media (min-width: 860px) { .promises { grid-template-columns: repeat(3, 1fr); } }
.promise { border: var(--stroke-hairline) solid var(--line-subtle); padding: var(--space-4); display: grid; gap: var(--space-2); align-content: start; }
.promise h3 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.promise p { margin: 0; color: var(--ink-muted); }

/* FAQ */
.faq { border-top: var(--stroke-hairline) solid var(--line); max-width: 860px; }
.faq details { border-bottom: var(--stroke-hairline) solid var(--line-subtle); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  padding: var(--space-4) 0; font-size: 18px; line-height: 28px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 24px; color: var(--ink-muted); transition: transform 250ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 var(--space-4); color: var(--ink-muted); max-width: 40em; }
/* Answers open and close instead of snapping. Browsers without ::details-content keep the instant toggle. */
.faq details { interpolate-size: allow-keywords; }
.faq details::details-content {
  block-size: 0; overflow: hidden; opacity: 0;
  transition: block-size 250ms var(--ease-out), opacity 250ms var(--ease-out), content-visibility 250ms allow-discrete;
}
.faq details[open]::details-content { block-size: auto; opacity: 1; }

/* CTA band */
.cta { padding-block: var(--space-6); background: radial-gradient(90% 140% at 85% 0%, var(--charcoal), var(--ground) 70%); border-bottom: var(--stroke-hairline) solid var(--line-subtle); }
@media (min-width: 720px) { .cta { padding-block: 112px; } }
.cta .wrap { display: grid; gap: var(--space-4); justify-items: start; }
.cta h2 { margin: 0; font-weight: 400; text-transform: uppercase; letter-spacing: 0.3em; font-size: clamp(24px, 4vw, 40px); line-height: 1.3; text-wrap: balance; }
.cta p { margin: 0; color: var(--ink-muted); max-width: 34em; }

/* Footer */
.site-footer { padding-block: var(--space-6) var(--space-5); }
.footer-grid { display: grid; gap: var(--space-5); }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { display: grid; gap: var(--space-3); justify-items: start; }
.footer-brand img { width: 120px; }
.site-footer h3 { margin: 0 0 var(--space-3); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; text-underline-offset: 4px; }
.legal { margin-top: var(--space-5); padding-top: var(--space-4); border-top: var(--stroke-hairline) solid var(--line-subtle); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.legal p { margin: 0; }

/* ---------- Coming soon ---------- */
.soon { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; position: relative; overflow: hidden;
  background: radial-gradient(110% 90% at 20% 10%, var(--charcoal) 0%, var(--surface) 50%, var(--ground) 100%); }
.soon .slab { opacity: .7; }
.soon-top, .soon-main, .soon-foot { position: relative; z-index: 1; }
.soon-top .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 72px; gap: var(--space-3); }
.soon-top a { font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted); text-decoration: none; }
.soon-top a:hover { color: var(--ink); }
.soon-main .wrap { display: grid; justify-items: center; text-align: center; gap: var(--space-4); padding-block: var(--space-5) var(--space-6); }
.soon-logo { width: 104px; height: auto; }
.soon h1 { margin: 0; font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 7vw, 64px); line-height: 1.15; letter-spacing: 0.4em; padding-left: 0.4em; }
.soon .lede { margin: 0; max-width: 32em; color: var(--ink-muted); }
.notify { width: 100%; max-width: 520px; display: grid; gap: var(--space-2); text-align: left; margin-top: var(--space-2); }
.notify label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.notify-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.notify input {
  flex: 1 1 240px; min-width: 0; min-height: 48px; padding: 0 var(--space-3);
  font: inherit; color: var(--ink); background: var(--ground);
  border: var(--stroke-hairline) solid var(--line); border-radius: var(--radius-0);
}
.notify input::placeholder { color: var(--ink-muted); }
.notify input:focus-visible { outline: var(--stroke-focus) solid var(--line); outline-offset: 3px; }
.notify input[aria-invalid="true"] { border-color: var(--negative); }
.notify .tb-btn { flex: 0 0 auto; }
.notify-msg { min-height: 20px; margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.notify-msg.error { color: var(--negative); }
.notify-done { display: grid; gap: var(--space-2); justify-items: center; }
.soon-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding-block: var(--space-4); border-top: var(--stroke-hairline) solid var(--line-subtle); font-size: 13px; line-height: 20px; color: var(--ink-muted); }

/* ---------- Motion ---------- */
/* First visit to the launch page: the content settles in once, top to bottom. */
@keyframes tb-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes tb-settle { from { opacity: 0; transform: scale(0.96); } }
@keyframes tb-fade { from { opacity: 0; } }
/* Then two slow, ambient motions keep the page alive: the light drifts across the slab and the logo floats. */
@keyframes tb-light { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes tb-float { from { transform: translateY(0); } to { transform: translateY(-4px); } }
.soon .slab { animation: tb-fade 1200ms var(--ease-out) both; }
.soon .slab::before { background-size: 160% 100%; animation: tb-light 20s ease-in-out infinite alternate; }
.soon-logo, .soon h1, .soon-main .wrap > .tb-frame, .soon-main .wrap > .lede, .notify { animation: tb-rise 700ms var(--ease-out) both; }
.soon-logo { animation: tb-rise 700ms var(--ease-out) both, tb-float 7s ease-in-out 900ms infinite alternate; }
.soon h1 { animation-delay: 60ms; }
.soon-main .wrap > .tb-frame { animation-delay: 120ms; }
.soon-main .wrap > .lede { animation-delay: 180ms; }
.notify { animation-delay: 240ms; }
/* The sign-up confirmation replaces the form, so it settles in where the form was. */
.notify-done { animation: tb-settle 400ms var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  .soon-logo, .soon h1, .soon-main .wrap > .tb-frame, .soon-main .wrap > .lede, .notify, .notify-done { animation: tb-fade 700ms var(--ease-out) both; }
  .soon .slab::before { animation: none; }
}
