/* Termless's landing page. Soul sheet: docs/landing-pages/termless.md. Everything is in rem and
   one column holds the first screen, every section and the top bar. From 1024 px up the root size
   follows the window, so a 4K screen shows the same page larger instead of a small page in a
   field. The page asks for nothing but its own files under /welcome/. */

@font-face { font-family: 'Host Grotesk'; src: url('/welcome/fonts/host-grotesk-v5-latin.woff2') format('woff2'); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/welcome/fonts/geist-mono-latin.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --font: 'Host Grotesk', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --ground: #fafbfa; --raised: #ffffff;
  --ink: #0e1210; --soft: #46504a; --faint: #616b65; --rule: #dfe5e1;
  --accent: #0a7a47; --mark: #12a160;
  --btn: #0a7a47; --btn-ink: #ffffff; --btn-hover: #086339;
  --pill: rgb(255 255 255 / 0.84); --pill-line: rgb(14 18 16 / 0.1); --pill-shadow: rgb(14 18 16 / 0.12);
  --tk-s: #0b6e5a; --tk-n: #a85d00; --tk-w: #1d4ed8;
  --focus: #1d4ed8; --select: #cdeede;
  --pad: 1.25rem;
  --column: 100vw;
  --bar: 3.75rem;
  --ease: cubic-bezier(0.22, 0.8, 0.26, 1);
}
@media (min-width: 64rem) {
  :root { --pad: 2.5rem; --column: 72rem; --bar: 4.25rem; }
  html { font-size: clamp(100%, min(1.1111vw, 1.7778vh), 250%); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: var(--select); color: var(--ink); }
svg { display: block; max-width: 100%; }
h1, h2, p, figure, dl, dd, ol, ul, pre { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2 { font-weight: 700; text-wrap: balance; }
h1 { letter-spacing: -0.04em; line-height: 1.03; font-size: clamp(2.25rem, 1.1rem + 5.4vw, 4.75rem); }
h2 { font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.03em; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 0.5rem; }

/* one column: the first screen and every section share these two edges */
.col { padding-inline: max(var(--pad), calc((100% - var(--column)) / 2)); }

/* top bar: the full width at the top, a pill once the page moves, always on screen */
.bar { position: fixed; inset: 0 0 auto; z-index: 40; pointer-events: none; }
.bar-in {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.75rem;
  height: var(--bar); max-width: 100%; margin-inline: auto; border-radius: 999px;
  transition: max-width 0.34s var(--ease), margin-top 0.34s var(--ease), padding 0.34s var(--ease), height 0.34s var(--ease), background-color 0.2s ease-out, box-shadow 0.2s ease-out;
}
.bar.is-pill .bar-in {
  max-width: min(30rem, 100%); height: 3.25rem; margin-top: 0.625rem; padding-inline: 1.125rem 0.4375rem;
  background: var(--pill); box-shadow: 0 0 0 1px var(--pill-line), 0 0.625rem 1.75rem var(--pill-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
}
.brand { display: inline-flex; align-items: center; gap: 0.5625rem; min-height: 2.75rem; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand svg { width: 1.625rem; height: 1.625rem; flex: none; }
.logo .chev { stroke: var(--ink); } .logo .cndl { fill: var(--mark); } .logo .wick { stroke: var(--mark); }
.bar-nav { display: flex; align-items: center; gap: 1.5rem; }
.bar-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; font-size: 0.9375rem; color: var(--soft); white-space: nowrap; transition: color 0.16s ease-out; }
@media (hover: hover) { .bar-link:hover { color: var(--ink); } }
@media (max-width: 39.99rem) { .bar-nav { gap: 1.25rem; } }
@media (max-width: 24.49rem) { .bar-signin { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3.125rem; padding-inline: 1.625rem; border-radius: 999px;
  background: var(--btn); color: var(--btn-ink); font-weight: 650; font-size: 1.0625rem; white-space: nowrap;
  transition: transform 0.16s ease-out, background-color 0.16s ease-out;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) { .btn:hover { background: var(--btn-hover); } }
.btn-s { height: 2.375rem; padding-inline: 1.0625rem; font-size: 0.9375rem; }

/* first screen: the headline, one line, one object that takes what is left. No button: the bar has it. */
.hero {
  height: 100svh; min-height: 31rem;
  padding-top: calc(var(--bar) + clamp(0.25rem, 1.5svh, 1.25rem)); padding-bottom: clamp(0.875rem, 3svh, 2rem);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.hero-line { margin-top: clamp(0.625rem, 1.8svh, 1.125rem); max-width: 38rem; color: var(--soft); font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.3125rem); line-height: 1.45; text-wrap: balance; }
.hero-obj { flex: 0 1 17rem; min-height: 0; width: 100%; margin-top: clamp(1rem, 3.2svh, 2.25rem); display: flex; justify-content: center; text-align: left; }

/* the diagram: your broker, termlessd, your side */
.dia { width: 100%; max-width: 62rem; display: flex; flex-direction: column; min-height: 0; }
.dia-row { flex: 1 1 auto; min-height: min-content; display: grid; grid-template-columns: 1fr auto 1.15fr auto 1fr; align-items: stretch; }
.node { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.375rem; padding: 1.5rem 1.625rem; background: var(--raised); border-radius: 1.125rem; box-shadow: 0 0 0 1px var(--rule), 0 1.25rem 3rem rgb(14 18 16 / 0.06); }
.node b { font-size: 1.3125rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.node span { color: var(--soft); font-size: 0.9375rem; line-height: 1.4; }
.node-main { background: var(--ink); color: var(--ground); box-shadow: 0 1.25rem 3rem rgb(14 18 16 / 0.16); }
.node-main span { color: #c3c9c5; }
.node-main svg { width: 2rem; height: 2rem; margin-bottom: 0.25rem; }
.node-main .logo .chev { stroke: #ffffff; } .node-main .logo .cndl { fill: #56fca2; } .node-main .logo .wick { stroke: #56fca2; }
.wire { position: relative; width: clamp(5.75rem, 9vw, 8.5rem); display: flex; align-items: center; justify-content: center; }
.wire::before { content: ''; position: absolute; inset: 50% 0 auto; border-top: 1.5px solid #6f7772; }
.wire span { position: absolute; inset: auto 0 calc(50% + 0.4375rem) 0; padding-inline: 0.25rem; font-family: var(--mono); font-size: 0.75rem; line-height: 1.3; color: var(--faint); text-align: center; }
@media (max-width: 47.99rem) {
  .hero-obj { flex-basis: 22rem; }
  .dia-row { grid-template-columns: 1fr; grid-template-rows: 1fr auto 1.1fr auto 1fr; }
  .node { padding: 0.875rem 1.125rem; gap: 0.125rem; border-radius: 1rem; }
  .node b { font-size: 1.0625rem; }
  .node span { font-size: 0.875rem; }
  .node-main svg { display: none; }
  .wire { width: auto; height: clamp(1.5rem, 4.4svh, 2.25rem); }
  .wire::before { inset: 0 auto 0 1.5rem; border-top: 0; border-left: 1.5px solid #6f7772; }
  .wire span { position: static; padding: 0; margin: 0 0 0 1rem; }
}
/* a short phone: names only, so three boxes and two links always fit */
@media (max-width: 47.99rem) and (max-height: 38.99rem) {
  .hero-obj { flex-basis: 13.5rem; }
  .node span { display: none; }
  .node { padding-block: 0.5rem; }
}

/* every section: a centred headline, one line, then one object */
.sec { padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.sec > h2, .sec > .lede { text-align: center; margin-inline: auto; }
.sec > h2 { max-width: 20em; }
.sec > .lede { max-width: 38rem; margin-top: 1rem; color: var(--soft); font-size: 1.125rem; text-wrap: pretty; }
.sec > .obj { margin-top: clamp(2.25rem, 5vw, 3.75rem); margin-inline: auto; }
.card { background: var(--raised); border-radius: 1.125rem; box-shadow: 0 0 0 1px var(--rule); padding: 1.375rem 1.5rem; }
@media (max-width: 39.99rem) { .card { padding-inline: 1.125rem; } }

/* a request and its answer: tabs across the top, one panel showing, all panels the same box */
.term { width: 100%; max-width: 44rem; display: flex; flex-direction: column; background: var(--raised); border-radius: 1.125rem; box-shadow: 0 0 0 1px var(--rule), 0 1.25rem 3rem rgb(14 18 16 / 0.07); overflow: hidden; }
.term-tabs { display: flex; gap: 0.25rem; padding: 0.375rem 0.5rem 0; border-bottom: 1px solid var(--rule); }
.term-tabs [role='tab'] { position: relative; min-height: 2.75rem; padding-inline: 0.875rem; font-weight: 600; font-size: 0.9375rem; color: var(--faint); border-radius: 0.5rem 0.5rem 0 0; transition: color 0.16s ease-out; }
.term-tabs [role='tab']::after { content: ''; position: absolute; inset: auto 0.875rem -1px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform 0.2s var(--ease); }
.term-tabs [role='tab'][aria-selected='true'] { color: var(--ink); }
.term-tabs [role='tab'][aria-selected='true']::after { transform: scaleX(1); }
@media (hover: hover) { .term-tabs [role='tab']:hover { color: var(--ink); } }
.term-body { display: grid; }
.term-panel { grid-area: 1 / 1; min-width: 0; overflow: hidden; padding: 1rem 1.125rem 1.125rem; font-family: var(--mono); font-size: 0.875rem; line-height: 1.55; transition: opacity 0.18s ease-out; }
.term-panel:not(.is-on) { visibility: hidden; opacity: 0; }
.req { display: flex; gap: 0.625rem; font-weight: 500; overflow-wrap: anywhere; }
.req .pr { flex: none; color: var(--accent); font-weight: 700; }
.req + .res, .req + .send { margin-top: 0.625rem; }
.send { color: var(--faint); overflow-wrap: anywhere; }
.send + .res { margin-top: 0.625rem; }
.res { font: inherit; white-space: pre; overflow: hidden; }
.res .s { color: var(--tk-s); } .res .n { color: var(--tk-n); } .res .w { color: var(--tk-w); } .res .p, .send .p { color: var(--faint); }
@media (max-width: 39.99rem) {
  .term-tabs [role='tab'] { padding-inline: 0.625rem; }
  .term-tabs [role='tab']::after { inset-inline: 0.625rem; }
  .term-panel { padding: 0.875rem 0.875rem 1rem; font-size: 0.78125rem; }
}
@media (max-width: 24.3rem) { .term-panel { font-size: 0.75rem; } }
@media (max-width: 23.1rem) { .term-panel { font-size: 0.71875rem; } }

/* two requests, one order */
.once { max-width: 46rem; display: grid; gap: 0.875rem; }
.once li { background: var(--raised); border-radius: 1rem; box-shadow: 0 0 0 1px var(--rule); padding: 1rem 1.125rem; display: grid; gap: 0.5rem; }
.once .rq { font-family: var(--mono); font-size: 0.875rem; overflow-wrap: anywhere; }
.once .rq b { color: var(--accent); font-weight: 600; }
.once .rq span { color: var(--faint); white-space: nowrap; }
.once .rs { display: flex; align-items: baseline; justify-content: space-between; gap: 0.375rem 1rem; flex-wrap: wrap; }
.once .rs strong { font-weight: 650; }
.once .rs em { font-style: normal; font-family: var(--mono); font-size: 0.8125rem; color: var(--soft); }
.once-sum { margin-top: 1.5rem; text-align: center; font-weight: 650; font-size: 1.1875rem; letter-spacing: -0.01em; }

/* the built-in servers, searched as you type. Six rows always, so nothing moves. */
.dir { max-width: 44rem; }
.dir-field { position: relative; }
.dir-field svg { position: absolute; left: 1rem; top: 50%; width: 1.125rem; height: 1.125rem; transform: translateY(-50%); stroke: var(--faint); fill: none; pointer-events: none; }
.dir-field input { width: 100%; height: 3.25rem; padding: 0 1rem 0 2.875rem; border: 0; border-radius: 0.875rem; background: var(--ground); box-shadow: 0 0 0 1px var(--rule); font-size: 1.0625rem; -webkit-appearance: none; appearance: none; }
.dir-field input::placeholder { color: var(--faint); }
.dir-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.dir-field input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 0.875rem; }
.dir-list { margin-top: 1rem; height: 19.5rem; border-top: 1px solid var(--rule); overflow: hidden; }
.dir-list li { display: none; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; height: 3.25rem; padding-top: 0.875rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.dir-list li.is-shown { display: flex; }
.dir-list .sv { font-family: var(--mono); font-size: 0.9375rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.dir-list .co { color: var(--faint); font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; }
.dir-box { position: relative; }
.dir-none { display: none; position: absolute; inset: 1px 0 auto; padding-top: 1rem; color: var(--soft); }
.dir.is-empty .dir-none { display: block; }
.dir-n { margin-top: 0.75rem; color: var(--faint); font-size: 0.875rem; text-align: center; }
.dir-more { margin-top: 1rem; padding-top: 1.125rem; border-top: 1px solid var(--rule); color: var(--soft); text-align: center; text-wrap: balance; }
.dir-more strong { color: var(--ink); font-weight: 650; }
@media (max-width: 39.99rem) { .dir-list .co { display: none; } }

/* the file */
.file { max-width: 44rem; }
.file-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: 1.125rem; font-family: var(--mono); font-size: clamp(1.5rem, 1.1rem + 2vw, 2.5rem); font-weight: 500; letter-spacing: -0.03em; }
.file-top span:last-child { color: var(--accent); }
.rows { border-top: 1px solid var(--rule); }
.rows > div { display: grid; grid-template-columns: minmax(6.5rem, 0.36fr) 1fr; gap: 0.25rem 1.5rem; padding-block: 0.9375rem; border-bottom: 1px solid var(--rule); }
.rows > div:last-child { border-bottom: 0; padding-bottom: 0; }
.rows dt { color: var(--faint); }
.rows dd { font-weight: 500; }

/* the close */
.close { text-align: center; padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.close .btn { margin-top: 2rem; }
.close .also { display: block; width: fit-content; margin: 1.125rem auto 0; min-height: 2.75rem; padding-inline: 0.5rem; line-height: 2.75rem; color: var(--soft); font-weight: 600; font-size: 0.9375rem; }
@media (hover: hover) { .close .also:hover { color: var(--ink); } }
.foot { padding-block: 1.5rem 2.25rem; display: flex; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap; color: var(--faint); font-size: 0.875rem; border-top: 1px solid var(--rule); }
.foot a { color: var(--soft); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
