/* Tuff Reliability website. Brand: colors from direction A, mark and fonts from direction C.
   Layout: one column of sections, max 1160px, square edges, thin rules. */
:root {
  --limestone: #ECEBE7;
  --basalt: #1D2124;
  --tuff: #C98B7B;
  --tuff-soft: #E6D3CD;
  --stone: #D9D6CF;
  --signal: #0F6B57;
  --signal-dark: #0A4F40;
  --signal-on-dark: #7FC9B1;
  --amber: #C7861C;
  --ink-2: #33393D;
  --ink-3: #4A5054;
  --on-dark: #ECEBE7;
  --on-dark-2: #C9CCCE;
  --rule: rgba(29, 33, 36, .18);
  --rule-dark: rgba(236, 235, 231, .16);

  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1160px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--limestone);
  color: var(--basalt);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--signal); text-underline-offset: 3px; }
a:hover { color: var(--signal-dark); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.section { padding-block: 96px 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; max-width: 860px; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 720px; margin-top: 12px; }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--basalt); color: var(--on-dark); padding: 10px 14px; z-index: 20; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 14px 22px;
  font-weight: 600; font-size: 17px; text-decoration: none;
  background: var(--signal); color: #FFFFFF;
}
.btn:hover { background: var(--signal-dark); color: #FFFFFF; }
.btn--small { min-height: 44px; padding: 10px 16px; font-size: 15px; }
.btn--tuff { background: var(--tuff); color: var(--basalt); }
.btn--tuff:hover { background: #D59C8D; color: var(--basalt); }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--limestone); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.site-header .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--basalt); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { color: var(--basalt); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(15, 107, 87, .16); flex: 0 0 auto; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; font-size: 15px; }
.nav a:not(.btn) { color: var(--basalt); text-decoration: none; }
.nav a:not(.btn):hover { text-decoration: underline; }

/* Hero */
.hero { padding-block: 88px 0; }
.hero h1 { font-size: clamp(42px, 7vw, 78px); line-height: 1.0; letter-spacing: -0.03em; max-width: 980px; }
.hero .lede { font-size: clamp(18px, 2.1vw, 21px); margin-top: 28px; max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-top: 36px; }
.hero-actions a:not(.btn) { font-weight: 500; }
.proof { display: flex; flex-wrap: wrap; gap: 10px 36px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

/* Hero animation: a git timeline that is also a reliability graph.
   Without hero.js (or with reduced motion) the final state shows, static.
   With hero.js the figure gets .is-live and elements appear as the playhead passes. */
.gitviz { position: relative; margin: 56px 0 0; }
.gitviz__svg { display: block; width: 100%; height: auto; overflow: visible; }

.gv-ghost line, .gv-ghost path, .gv-ghost polyline { fill: none; stroke: var(--basalt); stroke-width: 1.5; opacity: .12; }
.gv-main { stroke: var(--basalt); stroke-width: 2.5; stroke-linecap: round; }
.gv-branch { fill: none; stroke: var(--basalt); stroke-width: 2; stroke-linecap: round; opacity: .75; }
.gv-rollback { fill: none; stroke: var(--signal); stroke-width: 2; stroke-linecap: round; }
.gv-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.gv-commit { fill: var(--basalt); }
.gv-pr { fill: var(--limestone); stroke: var(--basalt); stroke-width: 2.5; }
.gv-deploy { fill: var(--signal); stroke: var(--limestone); stroke-width: 3; }
.gv-deploy--bad { fill: var(--amber); }
.gv-ripple { fill: none; stroke: var(--signal); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.gv-ripple--bad { stroke: var(--amber); stroke-width: 3; }
.gv-now-ring { fill: var(--signal); opacity: .2; transform-box: fill-box; transform-origin: center; }
.gv-budget { stroke: var(--tuff); stroke-width: 1.5; stroke-dasharray: 6 5; }
.gv-errors { fill: none; stroke: var(--basalt); stroke-width: 1.8; stroke-linejoin: round; }
.gv-incident { fill: var(--tuff); opacity: .22; }
.gv-t { font-family: var(--mono); font-size: 12px; fill: var(--ink-3); }
.gv-t--ink { fill: var(--basalt); }
.gv-t--ok { fill: var(--signal); }
.gv-t--amber { fill: #9A5B00; }
.gv-t--tuff { fill: #9C5A4A; }
.gv-head { display: none; }

.gitviz figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 18px; }
.gv-caption { font-size: 14px; color: var(--ink-3); }
.gv-status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--mono); font-size: 12px; padding: 8px 14px;
  background: rgba(15, 107, 87, .1); color: var(--signal-dark);
  border: 1px solid rgba(15, 107, 87, .3);
  transition: background-color .4s ease, color .4s ease, border-color .4s ease;
}
.gv-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(15, 107, 87, .18); transition: background-color .4s ease, box-shadow .4s ease; }
.gv-status[data-state="warn"] { background: rgba(199, 134, 28, .14); color: #7A4800; border-color: rgba(199, 134, 28, .45); }
.gv-status[data-state="warn"] i { background: var(--amber); box-shadow: 0 0 0 3px rgba(199, 134, 28, .25); }

/* Live mode (set by hero.js) */
.gitviz.is-live .gv-live { transition: opacity .8s ease; }
.gitviz.is-live.is-fading .gv-live { opacity: 0; }
.gitviz.is-live .gv-head { display: inline; transition: opacity .5s ease; opacity: 0; }
.gitviz.is-live.is-playing .gv-head { opacity: 1; }
.gv-head line { stroke: var(--basalt); stroke-width: 1; opacity: .3; }
.gv-head circle { fill: var(--limestone); stroke: var(--basalt); stroke-width: 2.5; }

.gitviz.is-live .gv-pop { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .45s cubic-bezier(.34, 1.7, .64, 1); }
.gitviz.is-live .gv-pop.on { transform: scale(1); }
.gitviz.is-live .gv-rise { opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; }
.gitviz.is-live .gv-rise.on { opacity: 1; transform: none; }
.gitviz.is-live .gv-incident { opacity: 0; transition: opacity .6s ease; }
.gitviz.is-live .gv-incident.on { opacity: .22; }
.gitviz.is-live .gv-ripple.on { animation: gv-ripple 1.3s ease-out forwards; }
.gitviz.is-live .gv-ripple--bad.on { animation: gv-ripple 1s ease-out 2 forwards; }
.gitviz.is-live .gv-now-ring { opacity: 0; }
.gitviz.is-live .gv-now-ring.on { animation: gv-pulse 2s ease-out infinite; }

@keyframes gv-ripple {
  0%   { transform: scale(1); opacity: .6; }
  100% { transform: scale(3.4); opacity: 0; }
}
@keyframes gv-pulse {
  0%   { transform: scale(1); opacity: .35; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* Tables */
.table-box { overflow-x: auto; margin-top: 32px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 18px 16px; border-bottom: 1px solid var(--rule); }
th:first-child, td:first-child { padding-left: 0; }
thead th { border-bottom: 2px solid var(--basalt); padding-top: 0; padding-bottom: 14px; vertical-align: bottom; }
.col-label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.col-label--good { color: var(--signal); }
tbody th { font-weight: 600; }
.before { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(201, 139, 123, .9); text-decoration-thickness: 2px; }
.compare { min-width: 680px; font-size: 17px; }
.compare tbody th { width: 24%; }

/* Platform layers: courses of a tuff wall */
.layers { display: flex; flex-direction: column; gap: 6px; margin-top: 40px; }
.layer { display: flex; flex-wrap: wrap; gap: 6px 32px; align-items: baseline; padding: 20px 28px; margin-inline: var(--indent, 0); }
.layer strong { font-size: 19px; font-weight: 600; flex: 0 0 270px; }
.layer span { flex: 1 1 320px; font-size: 16px; }
.layer-cost {
  flex: 1 1 100%; margin-left: 302px; font-style: normal;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5; opacity: .9;
  display: flex; gap: 10px; align-items: baseline;
}
.layer-cost::before {
  content: "COST"; flex: 0 0 auto; font-size: 10px; letter-spacing: .08em;
  padding: 2px 6px; border: 1px solid currentColor; opacity: .75;
}
.layer--basalt { background: var(--basalt); color: var(--on-dark); }
.layer--stone { background: var(--stone); color: var(--basalt); }
.layer--tuff { background: var(--tuff); color: var(--basalt); }

/* Three lanes */
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--basalt); margin-top: 32px; }
.lane { padding: 24px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--rule); }
.lane:first-child { padding-left: 0; }
.lane:last-child { border-right: 0; }
.lane .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-3); }
.lane h3 { font-size: 21px; }
.lane p { font-size: 16px; }
.lane code { font-family: var(--mono); font-size: 12px; color: var(--ink-2); word-break: break-word; }

/* 24-hour strip */
.strip { display: flex; flex-direction: column; gap: 6px; margin-top: 32px; }
.strip-row { display: flex; gap: 12px; align-items: center; }
.strip-row > span { font-family: var(--mono); font-size: 11px; width: 84px; flex: 0 0 84px; color: var(--ink-3); }
.cells { flex: 1; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
.cells i { display: block; height: 34px; background: var(--stone); }
.cells i.n { background: var(--basalt); }
.cells i.w { background: var(--tuff-soft); }
.cells i.c { background: var(--tuff); }
.cells.labels span { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 16px 0 0 96px; font-size: 14px; color: var(--ink-2); }
.swatch { display: inline-block; width: 12px; height: 12px; vertical-align: middle; margin-right: 8px; }

/* Targets */
.targets { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 36px; }
.targets-card { flex: 1 1 440px; min-width: 0; background: var(--basalt); color: var(--on-dark); padding: 28px 32px; }
.targets-card .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--tuff); display: block; margin-bottom: 12px; }
.target { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--rule-dark); }
.target b { font-weight: 600; }
.target span { font-family: var(--mono); font-size: 13px; }
.target .ok { color: var(--signal-on-dark); }
.levels { flex: 1 1 400px; min-width: 0; }
.levels .table-box { margin-top: 0; }
.levels table { min-width: 420px; }
.levels td { font-family: var(--mono); font-size: 14px; }
.levels td:first-child { font-family: var(--sans); font-weight: 600; font-size: 17px; }
.levels td:last-child, .levels th:last-child { text-align: right; padding-right: 0; }
.note { font-size: 14px; color: var(--ink-3); margin-top: 14px; }

/* Pricing */
.pricing { min-width: 720px; }
.pricing thead th { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.pricing tbody th { color: var(--ink-3); font-weight: 500; width: 14%; }
.start { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; background: var(--tuff); color: var(--basalt); padding: 3px 7px; margin-bottom: 10px; font-weight: 500; }
.price { font-family: var(--mono); font-weight: 500; font-size: 22px; display: block; }

/* About */
.about { display: flex; flex-wrap: wrap; gap: 32px 64px; margin-top: 32px; }
.about p { flex: 1 1 420px; max-width: 640px; font-size: 18px; color: var(--ink-2); }
.facts { flex: 1 1 280px; display: flex; flex-direction: column; border-top: 2px solid var(--basalt); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-family: var(--mono); font-size: 13px; text-align: right; }

/* FAQ */
.faq { margin-top: 32px; border-top: 2px solid var(--basalt); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 600; font-size: 19px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-family: var(--mono); font-size: 22px; font-weight: 400; color: var(--ink-3); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { padding: 0 40px 22px 0; color: var(--ink-2); max-width: 720px; }
.site-footer a { color: var(--ink-3); }

/* Closing call to action */
.cta { background: var(--basalt); color: var(--on-dark); padding: 56px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.cta h2 { font-size: clamp(30px, 4vw, 40px); line-height: 1.1; }
.cta p { color: var(--on-dark-2); font-size: 18px; margin-top: 12px; }
.cta .mail { color: var(--on-dark); font-family: var(--mono); font-size: 14px; margin-top: 16px; display: block; user-select: all; }

/* Footer */
.site-footer { margin-top: 96px; border-top: 1px solid var(--rule); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; padding-block: 28px 40px; font-size: 14px; color: var(--ink-3); }
.site-footer .brand { font-size: 15px; }

/* Phones */
@media (max-width: 760px) {
  .section { padding-block: 72px 0; }
  .hero { padding-block: 56px 0; }
  .lanes { grid-template-columns: minmax(0, 1fr); }
  .lane { padding: 20px 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .layer { margin-inline: 0; padding: 16px 18px; }
  .layer strong { flex-basis: 100%; }
  .layer-cost { margin-left: 0; }
  .strip-row > span { width: 56px; flex-basis: 56px; font-size: 9px; }
  .legend { margin-left: 0; }
  .cells.labels span:nth-child(odd) { visibility: hidden; }
  .cta { padding: 32px 24px; }
  .nav a:not(.btn) { display: none; }
  .gitviz { margin-top: 40px; }
  .gitviz text { display: none; }
}
