/* FunnelKit Shortener marketing site.
   Palette is the hyperlink itself: link blue, visited violet, on cool paper. */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --ink: #131a33;
  --ink-2: #464e6d;
  --rule: #d9deea;
  --rule-strong: #b9c0d4;
  --blue: #2342e0;
  --blue-wash: #e6eafd;
  --violet: #6a2fc2;
  --on-blue: #ffffff;
  --ok: #0f7a4f;
  --warn-bg: #fff3d6;
  --warn-ink: #6b4a00;
  --panel: #0f1530;
  --panel-ink: #d8ddf2;
  --panel-dim: #8d96bb;
  --panel-blue: #9fb0ff;
  --panel-violet: #cfb2ff;
  --panel-ok: #7fdcb0;

  --font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  /* Type scale: 1.25 (major third) from a 17px base */
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-md: 1.25rem;
  --t-lg: 1.5625rem;
  --t-xl: 1.953rem;
  --t-2xl: clamp(2.2rem, 1.4rem + 3.4vw, 3.815rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --radius: 10px;
  --radius-sm: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1124;
    --surface: #131a33;
    --ink: #e8ebf7;
    --ink-2: #a8b0cc;
    --rule: #262e4f;
    --rule-strong: #3a4470;
    --blue: #8ea3ff;
    --blue-wash: #1a2350;
    --violet: #c5a6ff;
    --on-blue: #0c1124;
    --ok: #6fd3a5;
    --warn-bg: #3a2f10;
    --warn-ink: #f5d98a;
    --panel: #070b1a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.6;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-md); }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
.prose a:visited { color: var(--violet); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
main:focus { outline: none; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: 0.6rem 1rem; background: var(--blue); color: var(--on-blue); border-radius: var(--radius-sm); }
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 46rem; }
.muted { color: var(--ink-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.6rem 1.15rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--on-blue); }
.btn-primary:hover { box-shadow: 0 0 0 4px var(--blue-wash); }
.btn-quiet { border-color: var(--rule-strong); color: var(--ink); }
.btn-quiet:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm { min-height: 2.25rem; padding: 0.35rem 0.95rem; font-size: var(--t-sm); }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.header-row { display: flex; align-items: center; gap: 1.25rem; min-height: 4rem; flex-wrap: wrap; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font-weight: 500; letter-spacing: -0.01em; }
.brand b { font-weight: 800; }
.logo { width: 1.75rem; height: 1.75rem; flex: none; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 0.4rem 0.7rem; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--ink); background: var(--blue-wash); }
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
@media (max-width: 40rem) {
  .header-row { gap: 0.5rem 0.75rem; }
  .site-nav { order: 3; margin-left: -0.7rem; width: 100%; }
  .header-cta { margin-left: auto; }
}

/* Footer */
.site-footer { margin-top: 6rem; border-top: 1px solid var(--rule); padding: 3rem 0 2rem; font-size: var(--t-sm); color: var(--ink-2); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 2fr repeat(3, 1fr); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--blue); text-decoration: underline; }
.footer-brand p { margin-top: 0.75rem; max-width: 24rem; }
.footer-title { font-weight: 700; color: var(--ink); margin-bottom: 0.5rem; }
.footer-base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
@media (max-width: 48rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Landing ---------- */
.hero { padding: clamp(3rem, 2rem + 5vw, 6rem) 0 4rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 13ch; }
.lede { font-size: var(--t-md); color: var(--ink-2); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.75rem; }
.beta-note { font-size: var(--t-sm); color: var(--ink-2); margin: 0.9rem 0 0; }
@media (max-width: 56rem) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* The transcript: prompt, tool call, short link, live redirect */
.trace {
  margin: 0; background: var(--panel); color: var(--panel-ink);
  border-radius: 14px; padding: 1.25rem 1.25rem 1.4rem;
  font-family: var(--mono); font-size: 0.86rem; line-height: 1.55;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 24px 48px -24px rgba(15,21,48,0.55);
}
.trace-head { display: flex; justify-content: space-between; gap: 1rem; color: var(--panel-dim); font-size: 0.78rem; padding-bottom: 0.9rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.trace ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.trace li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 0.75rem; }
.trace .who { color: var(--panel-dim); }
.trace .say { font-family: var(--font); font-size: 0.98rem; color: #fff; }
.trace pre { margin: 0; padding: 0; background: none; border-radius: 0; color: inherit; white-space: pre-wrap; word-break: break-word; font: inherit; overflow: visible; }
.trace .k { color: var(--panel-violet); }
.trace .s { color: var(--panel-blue); }
.trace .ok { color: var(--panel-ok); }
.trace .short { color: #fff; text-decoration: underline; text-decoration-color: var(--panel-blue); text-underline-offset: 0.2em; }
@media (max-width: 26rem) { .trace li { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; } }
@media (prefers-reduced-motion: no-preference) {
  .trace li { animation: step 0.5s both ease-out; }
  .trace li:nth-child(2) { animation-delay: 0.35s; }
  .trace li:nth-child(3) { animation-delay: 0.7s; }
  .trace li:nth-child(4) { animation-delay: 1.05s; }
  @keyframes step { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

.section { padding: 4.5rem 0; border-top: 1px solid var(--rule); }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-2); font-size: var(--t-md); }

/* Promises: three ruled statements, not cards */
.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.promises li { padding: 1.5rem 1.5rem 0 0; }
.promises li + li { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.promises h3 { font-size: var(--t-lg); letter-spacing: -0.02em; }
.promises p { color: var(--ink-2); margin: 0; }
@media (max-width: 48rem) {
  .promises { grid-template-columns: minmax(0, 1fr); }
  .promises li, .promises li + li { padding: 1.25rem 0; border-left: 0; border-bottom: 1px solid var(--rule); }
}

/* Agent-native: text beside stacked snippets */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; }
@media (max-width: 56rem) { .split { grid-template-columns: minmax(0, 1fr); } }
.snips { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.snip { margin: 0; }
.snip figcaption { font-size: var(--t-sm); font-weight: 700; margin-bottom: 0.35rem; display: flex; justify-content: space-between; gap: 1rem; }
.snip figcaption a { font-weight: 500; }
.ways { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; }
.ways strong { display: block; font-size: var(--t-md); }
.ways span { color: var(--ink-2); }

/* Feature definition lists */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 3rem; margin: 0; }
.facts div { border-left: 3px solid var(--blue); padding-left: 1.1rem; }
.facts dt { font-weight: 700; font-size: var(--t-md); margin-bottom: 0.3rem; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.facts dd { margin: 0; color: var(--ink-2); }
.facts .ico-lg { width: 1.4rem; height: 1.4rem; color: var(--blue); flex: none; }
@media (max-width: 48rem) { .facts { grid-template-columns: minmax(0, 1fr); } }

.price-strip { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.price-strip a { flex: 1 1 12rem; padding: 1.25rem 1.4rem; color: var(--ink); text-decoration: none; border-right: 1px solid var(--rule); }
.price-strip a:last-child { border-right: 0; }
.price-strip a:hover { background: var(--blue-wash); }
.price-strip b { display: block; font-size: var(--t-lg); letter-spacing: -0.02em; }
.price-strip span { color: var(--ink-2); font-size: var(--t-sm); }

.cta-band { padding: 4rem 0 0; }
.cta-box { border-radius: 16px; background: var(--blue); color: var(--on-blue); padding: clamp(2rem, 1rem + 4vw, 3.5rem); display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.cta-box h2 { margin-bottom: 0.3rem; }
.cta-box p { margin: 0; opacity: 0.92; max-width: 36rem; }
.cta-box .btn { background: var(--on-blue); color: var(--blue); }
.cta-box .btn:hover { box-shadow: 0 0 0 4px rgba(255,255,255,0.3); }
@media (max-width: 48rem) { .cta-box { grid-template-columns: minmax(0, 1fr); } }

.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; line-height: 1.4; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); white-space: nowrap; letter-spacing: 0; }

/* ---------- Pricing ---------- */
.page-head { padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 2rem; }
.page-head p { font-size: var(--t-md); color: var(--ink-2); max-width: 42rem; }
.plans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.5rem; }
.plan-featured { border: 2px solid var(--blue); }
.plan-name { font-size: var(--t-md); margin-bottom: 0.75rem; }
.plan-price { margin: 0; display: flex; align-items: baseline; gap: 0.2rem; }
.plan-price .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.plan-price .per { color: var(--ink-2); }
.plan-annual { font-size: var(--t-sm); color: var(--ink-2); margin: 0.4rem 0 1rem; }
.plan-blurb { min-height: 3.2em; }
.plan-limits { list-style: none; padding: 1rem 0 0; margin: 0 0 1.5rem; border-top: 1px solid var(--rule); display: grid; gap: 0.4rem; font-size: var(--t-sm); color: var(--ink-2); }
.plan-limits strong { color: var(--ink); }
.plan .btn { margin-top: auto; }
@media (max-width: 64rem) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .plans { grid-template-columns: minmax(0, 1fr); } }

.table-wrap { position: relative; overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); }
caption { text-align: left; padding: 0.9rem 1rem; color: var(--ink-2); caption-side: top; }
th, td { padding: 0.65rem 1rem; text-align: left; border-top: 1px solid var(--rule); vertical-align: top; }
thead th { border-top: 0; background: var(--bg); font-weight: 700; }
.compare { margin-top: 3rem; }
.compare table { min-width: 40rem; }
.compare td { text-align: center; }
.compare thead th:not(:first-child) { text-align: center; font-size: var(--t-base); }
.th-price { display: block; font-weight: 500; color: var(--ink-2); font-size: var(--t-sm); }
.compare tbody th { font-weight: 500; }
.group-row th { background: var(--bg); font-weight: 700; color: var(--ink); padding-top: 1rem; }
.compare .yes { color: var(--ok); }
.compare .no { color: var(--ink-2); }
.ico { width: 1.1rem; height: 1.1rem; vertical-align: -0.2em; }

.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 1.1rem 0; font-weight: 700; font-size: var(--t-md); list-style-position: outside; }
.faq details p { color: var(--ink-2); }

/* ---------- Docs + prose ---------- */
.docs { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 3rem; padding-top: 2.5rem; }
.docs-nav { position: sticky; top: 1.5rem; align-self: start; font-size: var(--t-sm); }
.docs-nav ul { list-style: none; margin: 0 0 1.5rem; padding: 0; border-left: 1px solid var(--rule); }
.docs-nav a { display: block; padding: 0.3rem 0 0.3rem 0.9rem; margin-left: -1px; color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent; }
.docs-nav a:hover { color: var(--ink); }
.docs-nav a[aria-current="page"] { color: var(--blue); border-left-color: var(--blue); font-weight: 700; }
.docs-nav-title { font-weight: 700; margin-bottom: 0.4rem; }
@media (max-width: 52rem) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .docs-nav { position: static; border-bottom: 1px solid var(--rule); padding-bottom: 0.5rem; }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; border-left: 0; margin-bottom: 1rem; }
  .docs-nav a { padding: 0.25rem 0; border-left: 0; margin: 0; }
  .docs-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
}

.prose { max-width: 44rem; padding-top: 1rem; }
.narrow .prose { padding-top: clamp(2.5rem, 2rem + 3vw, 4rem); }
.prose h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); margin-bottom: 0.4em; }
.prose h1 + p { font-size: var(--t-md); color: var(--ink-2); }
.prose h2 { margin-top: 2.4em; padding-top: 0.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.35em; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.prose :not(pre) > code { background: var(--blue-wash); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.86em; }
pre {
  background: var(--panel); color: var(--panel-ink); border-radius: var(--radius);
  padding: 1rem 1.1rem; overflow-x: auto; line-height: 1.55; font-size: 0.84rem; margin: 0 0 1.4em;
  position: relative;
}
pre[data-lang] { padding-top: 1.7rem; }
pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 0.4rem; right: 0.7rem; font-size: 0.7rem; color: var(--panel-dim); }
pre code { font-size: inherit; }
.note { border-left: 3px solid var(--violet); background: var(--surface); padding: 0.9rem 1.1rem; margin: 0 0 1.4em; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.note p:last-child { margin-bottom: 0; }
.prose table code { white-space: nowrap; }

/* 404 */
.lost { padding: 5rem 0 2rem; }
.lost .code { font-family: var(--mono); color: var(--ink-2); }
.lost ul { padding-left: 1.2rem; }

@media print { .site-header, .site-footer, .docs-nav { display: none; } pre { white-space: pre-wrap; } }
