/* TrustRail — kaarna.ai
   Light editorial theme: warm off-white, deep forest accent, light-weight
   headings with tight tracking, pill buttons.
   Clean-Room: public-knowledge; no proprietary or confidential sources */

:root {
  --bg:        #ffffff;
  --bg-2:      #f6f5f1;   /* warm off-white section */
  --bg-3:      #efece5;   /* deeper warm tint */
  --ink:       #1c1b19;   /* terminal / code surface */

  --line:      #e2ded4;
  --line-soft: #ece9e1;

  --text:      #222222;
  --text-2:    #4f4c47;
  --text-3:    #857f76;

  --accent:      #006838;  /* forest */
  --accent-deep: #00522c;
  --sage:        #8da46f;
  --forest:      #4a6d4e;

  --pass:  #1d7a4c;
  --fail:  #b3402f;
  --warn:  #9a6b12;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --max: 1120px;
  --pill: 999px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 24px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500; letter-spacing: .01em; color: var(--text); font-size: 18px;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 24px; height: 24px; border-radius: 7px; flex: none; position: relative;
  background: linear-gradient(140deg, var(--sage), var(--accent));
}
.brand .mark::after {
  content: ""; position: absolute; inset: 7px 6px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(-1px, 1px); border-radius: 1px;
}
.nav nav { display: flex; gap: 30px; align-items: center; font-size: 15px; }
.nav nav a { color: var(--text-2); }
.nav nav a:hover, .nav nav a.on { color: var(--text); text-decoration: none; }
.nav nav a.on { font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: var(--pill);
  font-size: 15px; font-weight: 500; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-3); background: var(--bg-2); }

/* ---------- sections ---------- */
section { padding: 92px 0; }
section:nth-of-type(even) { background: var(--bg-2); }

.eyebrow {
  font-size: 13px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin: 0 0 18px;
}

h1, h2, h3 { color: var(--text); font-weight: 400; }
h1 {
  font-size: 60px; line-height: 1.06; letter-spacing: -.026em;
  margin: 0 0 24px; max-width: 17em;
}
h2 { font-size: 38px; line-height: 1.16; letter-spacing: -.018em; margin: 0 0 20px; }
h3 { font-size: 19px; line-height: 1.35; letter-spacing: -.01em; margin: 0 0 10px; font-weight: 500; }

p { margin: 0 0 18px; }
p.lead { font-size: 20px; line-height: 1.55; color: var(--text-2); max-width: 44em; }
strong { color: var(--text); font-weight: 500; }

.hero { padding: 116px 0 96px; background: var(--bg) !important; }

/* ---------- grid ---------- */
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 16px; padding: 28px 28px 24px;
}
section:nth-of-type(even) .card { background: var(--bg); }
.card p:last-child { margin-bottom: 0; }
.card .num {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin-bottom: 14px; display: block;
}

/* ---------- principle ---------- */
.principle {
  border-left: 2px solid var(--accent);
  padding: 6px 0 6px 26px; margin: 40px 0;
  font-size: 26px; line-height: 1.38; color: var(--text);
  letter-spacing: -.018em; max-width: 30em; font-weight: 400;
}

/* ---------- chain ---------- */
.chain { list-style: none; padding: 0; margin: 0; }
.chain li {
  position: relative; padding: 0 0 22px 32px;
  border-left: 1px solid var(--line); margin-left: 7px; font-size: 16px;
}
.chain li:last-child { border-left-color: transparent; padding-bottom: 0; }
.chain li::before {
  content: ""; position: absolute; left: -5px; top: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line);
}
.chain li.hi { color: var(--text); }
.chain li.hi::before { border-color: var(--accent); background: var(--accent); }

/* ---------- table ---------- */
table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 8px 0 0; }
th, td { text-align: left; padding: 15px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th {
  color: var(--text-3); font-weight: 500; font-size: 12px;
  letter-spacing: .09em; text-transform: uppercase;
}
td { color: var(--text-2); }
td strong { color: var(--text); }
tr:last-child td { border-bottom: 0; }
.price { font-family: var(--mono); color: var(--text); white-space: nowrap; font-size: 14px; }

/* ---------- code ---------- */
pre {
  background: var(--ink); border-radius: 14px;
  padding: 24px 26px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.75;
  color: #d6d3cc; margin: 0;
}
code { font-family: var(--mono); font-size: .89em; color: var(--text); }
p code, td code, li code, figcaption code {
  background: var(--bg-3); border-radius: 5px; padding: 2px 6px; font-size: .85em;
}
pre code { background: none; padding: 0; color: inherit; }
.pass  { color: #6ee7a8; }
.fail  { color: #ff8f7d; }
.warnc { color: #f0c264; }
.dim   { color: #8b8780; }
p .pass, td .pass, figcaption .pass { color: var(--pass); font-weight: 500; }
p .fail, td .fail, figcaption .fail { color: var(--fail); font-weight: 500; }
p .warnc, td .warnc { color: var(--warn); font-weight: 500; }

/* ---------- callout ---------- */
.note {
  background: linear-gradient(134deg, var(--sage) 0%, var(--forest) 100%);
  border-radius: 20px; padding: 34px 38px; color: #f2f4ee;
}
.note h3, .note .eyebrow { color: #fff; }
.note .eyebrow { opacity: .85; }
.note p { color: #eef1e9; }
.note p:last-child { margin-bottom: 0; }
.note a { color: #fff; text-decoration: underline; }
.note code {
  background: rgba(255,255,255,.18); color: #fff;
  border-radius: 5px; padding: 2px 6px;
}

/* ---------- lists ---------- */
ul.ticks, ul.crosses { list-style: none; padding: 0; margin: 0; }
ul.ticks li, ul.crosses li { position: relative; padding: 0 0 12px 26px; font-size: 16px; }
ul.ticks li:last-child, ul.crosses li:last-child { padding-bottom: 0; }
ul.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 10px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
ul.crosses li { color: var(--text-3); }
ul.crosses li::before {
  content: ""; position: absolute; left: 2px; top: 13px;
  width: 9px; height: 1px; background: var(--text-3);
}
.note ul.ticks li { color: #eef1e9; }
.note ul.ticks li::before { background: #fff; }

/* ---------- cta ---------- */
.cta { text-align: center; padding: 104px 0; }
.cta h2 { margin-bottom: 14px; }
.cta p { max-width: 36em; margin-left: auto; margin-right: auto; }
.cta .btns { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line-soft); padding: 40px 0 56px;
  color: var(--text-3); font-size: 14.5px; background: var(--bg);
}
footer .fl { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--text-3); }
footer a:hover { color: var(--text-2); }

/* ---------- demo clip ---------- */
.demo { margin: 0 0 32px; max-width: 880px; }
.demo .frame {
  position: relative; border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; background: var(--ink); line-height: 0;
}
.demo video { width: 100%; height: auto; display: block; }
.demo video[hidden] { display: none; }
.demo figcaption { font-size: 15px; color: var(--text-3); margin-top: 14px; line-height: 1.55; }
.demo .badge {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: #d6d3cc;
  background: rgba(28,27,25,.72); border: 1px solid rgba(255,255,255,.16);
  border-radius: 5px; padding: 5px 9px; line-height: 1.4;
  backdrop-filter: blur(4px);
}
.demo-start {
  display: block; width: 100%; padding: 0; margin: 0; border: 0;
  background: none; cursor: pointer; position: relative; line-height: 0; font-family: inherit;
}
.demo-start img { width: 100%; height: auto; display: block; }
.demo-start:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.demo-start .play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(28,27,25,.26); transition: background .15s ease;
}
.demo-start:hover .play { background: rgba(28,27,25,.10); }
.demo-start .play span {
  width: 66px; height: 66px; border-radius: 50%;
  background: #fff; color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.28);
  transition: transform .15s ease;
}
.demo-start:hover .play span { transform: scale(1.06); }
.demo-start .play svg { width: 24px; height: 24px; margin-left: 3px; fill: currentColor; }
.demo-start.is-loading .play span { opacity: .4; }
.demo-status {
  position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2;
  text-align: center; font-family: var(--mono); font-size: 12px;
  letter-spacing: .06em; color: #d6d3cc; line-height: 1.4;
}
.demo-status[hidden] { display: none; }
.demo-fallback { margin: 16px 0 0; }

/* ---------- form ---------- */
form { max-width: 640px; }
.field { margin-bottom: 22px; }
.field label {
  display: block; font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-3); font-weight: 500; margin-bottom: 8px;
}
.field .hint { font-size: 14.5px; color: var(--text-3); margin: 0 0 9px; text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 15px; color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,104,56,.12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); opacity: .8; }
button.btn { font-family: var(--sans); cursor: pointer; }
.formnote { font-size: 14px; color: var(--text-3); margin-top: 16px; }
.formstatus { font-size: 15px; margin-top: 16px; display: none; }
.formstatus.show { display: block; }
.formstatus.ok { color: var(--pass); }
.formstatus.err { color: var(--fail); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- docs ---------- */
.doctoc { position: sticky; top: 96px; align-self: start; }
.doctoc a { display: block; padding: 6px 0; font-size: 15px; color: var(--text-2); }
.doctoc a:hover { color: var(--accent); text-decoration: none; }
.doctoc .h {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); margin: 24px 0 8px; font-weight: 500;
}
.doctoc .h:first-child { margin-top: 0; }
.layout-doc { display: grid; grid-template-columns: 216px 1fr; gap: 60px; }
.tag {
  display: inline-block; font-size: 11px; letter-spacing: .08em;
  padding: 4px 10px; border-radius: var(--pill); border: 1px solid var(--line);
  color: var(--text-3); text-transform: uppercase; margin-left: 10px; vertical-align: middle;
}

/* ---------- framework row ---------- */
.frameworks {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0;
  padding: 0; list-style: none;
}
.frameworks li {
  font-size: 14.5px; color: var(--text-2);
  border: 1px solid var(--line); border-radius: var(--pill);
  padding: 8px 18px; background: var(--bg);
}
.frameworks li.soon { color: var(--text-3); border-style: dashed; }

.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt24 { margin-top: 26px; }
.mt40 { margin-top: 44px; } .mb8 { margin-bottom: 8px; } .mb32 { margin-bottom: 34px; }

@media (max-width: 900px) {
  body { font-size: 16px; }
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  p.lead { font-size: 18px; }
  .principle { font-size: 21px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .nav nav { gap: 16px; font-size: 14.5px; }
  .nav nav .hide-sm { display: none; }
  .layout-doc { grid-template-columns: 1fr; gap: 30px; }
  .doctoc { position: static; }
  section { padding: 62px 0; }
  .hero { padding: 66px 0 58px; }
  .wrap { padding: 0 22px; }
  .note { padding: 26px 24px; }
}
