:root{--bg:#f7f6f3;--card:#fff;--fg:#1d2125;--muted:#5d646c;--brand:#0e7c76;--brand-dark:#0a6560;--soft:#e2f2f0;--line:#e2dfd8}
@media (prefers-color-scheme:dark){:root{--bg:#0f1315;--card:#151a1d;--fg:#e3e7e9;--muted:#98a2a8;--brand:#3bbfb4;--brand-dark:#5ad3c9;--soft:#15302e;--line:#252d32}}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font:17px/1.6 "Segoe UI",system-ui,-apple-system,Roboto,sans-serif}
a{color:var(--brand)}
.wrap{max-width:62rem;margin:0 auto;padding:0 1rem}
header.site{border-bottom:1px solid var(--line)}
header.site .wrap{display:flex;align-items:center;justify-content:space-between;min-height:3.5rem;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:.6rem;font-weight:600;color:var(--fg);text-decoration:none}
.brand img{width:28px;height:28px;border-radius:6px}
nav a{margin-left:1.25rem;color:var(--muted);text-decoration:none;font-size:.95rem}
nav a:hover{color:var(--brand)}
.hero{position:relative;overflow:hidden;background:#0e7c76;background-image:radial-gradient(ellipse 80% 70% at 20% 10%,#1a9a8f 0%,transparent 60%),radial-gradient(ellipse 70% 80% at 90% 100%,#07524e 0%,transparent 65%),linear-gradient(160deg,#11867f 0%,#0b6964 100%);color:#fff;text-align:center;padding:4.5rem 0}
.hero h1{margin:0;font-size:clamp(2.2rem,6vw,3.6rem);font-weight:600;line-height:1.1}
.hero .edition{font-size:clamp(1.2rem,3vw,1.7rem);font-weight:300;margin:.4rem 0 1.2rem}
.hero p.lead{max-width:36rem;margin:0 auto 2rem;font-size:1.15rem}
.btn{display:inline-block;background:#fff;color:#0a6560;padding:.7rem 1.4rem;border-radius:6px;font-weight:600;text-decoration:none}
.hero small{display:block;margin-top:.8rem;opacity:.85}
section{padding:3.5rem 0}
section.alt{background:var(--soft)}
h2{margin:0 0 1.5rem;font-size:1.75rem}
.grid{display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit,minmax(15rem,1fr))}
.card{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:1.25rem}
.icon{width:2.25rem;height:2.25rem;margin-bottom:.75rem;color:var(--brand);fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.card h3{margin:0 0 .4rem;font-size:1.1rem}
.card p{margin:0;color:var(--muted);font-size:.97rem}
footer{border-top:1px solid var(--line);padding:2rem 0;color:var(--muted);font-size:.9rem}
footer a{color:var(--muted)}
.doc{padding:2.5rem 1rem 4rem;max-width:44rem}
.doc h1{font-size:2rem;margin-top:0}
.doc h2{font-size:1.3rem;margin:2rem 0 .5rem}
.hero-logo{width:84px;height:84px;padding:14px;background:#f7f6f3;border-radius:20px;margin-bottom:1rem;box-shadow:0 6px 20px -8px rgba(4,40,38,.35),0 1px 3px rgba(4,40,38,.12)}
.hero .wrap{position:relative}
.ripples{position:absolute;inset:0;pointer-events:none}
.ripples i{position:absolute;width:30rem;height:30rem;margin:-15rem 0 0 -15rem;border-radius:50%;border:2px solid rgba(255,255,255,.18);opacity:0}
.ripples i:nth-child(1){left:15%;top:30%}
.ripples i:nth-child(2){left:15%;top:30%;animation-delay:-8s!important}
.ripples i:nth-child(3){left:80%;top:65%}
.ripples i:nth-child(4){left:80%;top:65%;animation-delay:-9s!important}
.ripples i:nth-child(5){left:50%;top:95%}
.ripples i:nth-child(6){left:50%;top:95%;animation-delay:-6s!important}
@media (prefers-reduced-motion:no-preference){
  .ripples i{animation:ripple 18s ease-out infinite}
  .ripples i:nth-child(3),.ripples i:nth-child(4){animation-duration:22s}
  .ripples i:nth-child(5),.ripples i:nth-child(6){animation-duration:16s}
}
@media (prefers-reduced-motion:reduce){
  .ripples i{opacity:.7;transform:scale(.75)}
  .ripples i:nth-child(even){opacity:.45;transform:scale(1.3)}
}
@keyframes ripple{0%{transform:scale(.05) translateX(0);opacity:0}15%{opacity:1}100%{transform:scale(1.6) translateX(2rem);opacity:0}}
.hero::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.22;mix-blend-mode:overlay;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}

/* Threefish Software company pages and UpStream pages */
.hero.water{background:#0b4f7a url("assets/water.jpg") center/cover;padding:6rem 0}
.hero.water::before,.hero.water .ripples{display:none}
.hero.water::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(6,38,64,.35),rgba(6,38,64,.6))}
.hero.water .btn{color:#0b4f7a}
.hero.compact{padding:3rem 0}
.hero.compact h1{font-size:clamp(1.8rem,5vw,2.6rem)}
.hero.compact p.lead{margin-bottom:0}
.product{display:flex;flex-direction:column}
.product p{flex:1}
.product .more{margin-top:1rem;font-weight:600}
.tag{display:inline-block;font-size:.8rem;color:var(--muted);border:1px solid var(--line);border-radius:99px;padding:.05rem .6rem;margin-bottom:.6rem}
.shot{display:block;max-width:100%;height:auto;border:1px solid var(--line);border-radius:8px;margin:1.5rem 0}
.doc ul{padding-left:1.25rem}
.doc .center{text-align:center}
.brand .logo{display:block;width:9.5rem;height:2.5rem;background:currentColor;-webkit-mask:url("threefishsoftwarelogo.svg") center/contain no-repeat;mask:url("threefishsoftwarelogo.svg") center/contain no-repeat}
.hero.water .wrap{z-index:1}

/* Generated underwater hero for the company home page */
.hero.sea{padding:6.5rem 0;background:radial-gradient(ellipse 90% 60% at 50% -10%,#8fe3f5 0%,rgba(143,227,245,0) 60%),linear-gradient(180deg,#2aa9e0 0%,#1585c8 38%,#0c5fa6 75%,#0a4784 100%)}
.hero.sea::before{display:none}
.hero.sea .btn{color:#0b5fa0}
.hero.sea .wrap{z-index:2}
.hero.sea .rays,.hero.sea .rays i,.hero.sea .glints{position:absolute;pointer-events:none}
.hero.sea .rays{inset:-10% -10% 0;overflow:hidden;mix-blend-mode:screen}
.hero.sea .rays i{top:-10%;height:130%;width:var(--w);left:var(--x);transform-origin:50% 0;transform:rotate(var(--a));background:linear-gradient(180deg,rgba(255,255,255,.75),rgba(200,240,255,.35) 45%,rgba(200,240,255,0));filter:blur(14px);opacity:var(--o)}
.hero.sea .rays i:nth-child(1){--x:6%;--w:7rem;--a:14deg;--o:.5}
.hero.sea .rays i:nth-child(2){--x:20%;--w:4rem;--a:18deg;--o:.35}
.hero.sea .rays i:nth-child(3){--x:34%;--w:9rem;--a:12deg;--o:.45}
.hero.sea .rays i:nth-child(4){--x:52%;--w:5rem;--a:16deg;--o:.4}
.hero.sea .rays i:nth-child(5){--x:66%;--w:10rem;--a:11deg;--o:.35}
.hero.sea .rays i:nth-child(6){--x:82%;--w:5rem;--a:15deg;--o:.45}
.hero.sea .rays i:nth-child(7){--x:94%;--w:7rem;--a:19deg;--o:.3}
.hero.sea .glints{inset:0 0 auto;height:9rem;opacity:.55;mix-blend-mode:screen;background:radial-gradient(ellipse 6rem 1rem at 10% 30%,rgba(255,255,255,.7),transparent),radial-gradient(ellipse 8rem 1.1rem at 35% 55%,rgba(255,255,255,.6),transparent),radial-gradient(ellipse 5rem .9rem at 60% 25%,rgba(255,255,255,.7),transparent),radial-gradient(ellipse 9rem 1.2rem at 85% 50%,rgba(255,255,255,.6),transparent);filter:blur(2px)}
.hero.sea::after{content:"";position:absolute;inset:auto 0 0;height:40%;pointer-events:none;background:linear-gradient(180deg,transparent,rgba(5,40,90,.35))}
.hero.sea h1,.hero.sea p.lead{text-shadow:0 1px 14px rgba(5,40,90,.45)}
@media (prefers-reduced-motion:no-preference){
  .hero.sea .rays i{animation:sway var(--d) ease-in-out infinite alternate,shimmer calc(var(--d) * .7) ease-in-out infinite alternate}
  .hero.sea .rays i:nth-child(1){--d:9s}
  .hero.sea .rays i:nth-child(2){--d:12s;animation-delay:-4s}
  .hero.sea .rays i:nth-child(3){--d:11s;animation-delay:-7s}
  .hero.sea .rays i:nth-child(4){--d:8s;animation-delay:-2s}
  .hero.sea .rays i:nth-child(5){--d:13s;animation-delay:-9s}
  .hero.sea .rays i:nth-child(6){--d:10s;animation-delay:-5s}
  .hero.sea .rays i:nth-child(7){--d:12s;animation-delay:-1s}
  .hero.sea .glints{animation:drift 14s ease-in-out infinite alternate}
}
@keyframes sway{from{transform:rotate(var(--a)) translateX(-2.5rem)}to{transform:rotate(calc(var(--a) - 6deg)) translateX(2.5rem)}}
@keyframes shimmer{from{opacity:calc(var(--o) * .45)}to{opacity:calc(var(--o) * 1.25)}}
@keyframes drift{from{transform:translateX(-2rem);opacity:.35}to{transform:translateX(2rem);opacity:.65}}

/* Threefish Software blue theme (company and UpStream pages; Wellspring pages keep the teal theme) */
body.tf{--bg:#f4f8fb;--card:#fff;--fg:#14212b;--muted:#51626f;--brand:#0c5fa6;--brand-dark:#0a4784;--soft:#e1f0fa;--line:#d9e4ec;--accent:#e8832a;--accent-ink:#9a4a07}
@media (prefers-color-scheme:dark){body.tf{--bg:#0a1219;--card:#101b25;--fg:#e4edf3;--muted:#9bb0bf;--brand:#5cc3f2;--brand-dark:#8ad6f8;--soft:#0f2638;--line:#1f3345;--accent:#f4a259;--accent-ink:#f4a259}}
body.tf nav a:hover{color:var(--accent-ink)}
body.tf h2::after{content:"";display:block;width:2.5rem;height:3px;margin-top:.45rem;border-radius:2px;background:var(--accent)}
body.tf .doc h2::after{display:none}
body.tf .card{transition:border-color .2s,transform .2s}
body.tf .card:hover{border-color:var(--accent);transform:translateY(-2px)}
body.tf .tag{background:var(--accent);border-color:var(--accent);color:#2b1500;font-weight:600}
body.tf .product .more{color:var(--brand)}
body.tf .product .more:hover{color:var(--accent-ink)}
body.tf footer{border-top-color:var(--line)}
.hero.sea.compact{padding:3rem 0}
.product .tag{align-self:flex-start}


/* Hero carousel on the Wellspring page: the introduction, then the demo videos in turn.
   Slides share one grid cell so the hero keeps the height of the tallest and never jumps. */
.carousel .slides{display:grid}
.carousel .slide{grid-area:1/1;align-self:center}
.carousel.js .slide{display:block;animation:slide-in .6s ease both}
.carousel.js .slide[hidden]{display:block;visibility:hidden;animation:none}
.carousel .slide video{display:block;width:100%;max-width:50rem;margin:0 auto;aspect-ratio:16/9;border-radius:12px;background:#0c1f1e;box-shadow:0 24px 60px -20px rgba(2,30,28,.7),0 0 0 1px rgba(255,255,255,.18);cursor:pointer}
.carousel .slide:not(.intro){display:none}
.carousel.js .slide:not(.intro){display:block}
.carousel .controls{display:flex;justify-content:center;align-items:center;gap:.9rem;margin-top:2rem}
.carousel .controls[hidden]{display:none}
.carousel .dots{display:flex;gap:.25rem}
.carousel .dots button,.carousel .toggle{background:none;border:0;padding:.55rem .3rem;cursor:pointer;color:#fff}
.carousel .dots i{display:block;position:relative;overflow:hidden;width:.6rem;height:.6rem;border-radius:999px;background:rgba(255,255,255,.4);transition:width .3s}
.carousel .dots button:hover i{background:rgba(255,255,255,.7)}
.carousel .dots button[aria-current=true] i{width:2.4rem}
.carousel .dots button[aria-current=true] i::after{content:"";position:absolute;inset:0;background:#fff;transform-origin:0 50%;transform:scaleX(var(--p,0))}
.carousel .dots button:focus-visible,.carousel .toggle:focus-visible{outline:2px solid #fff;outline-offset:1px;border-radius:6px}
.carousel .toggle{width:2rem;height:2rem;padding:0;border-radius:50%;border:1px solid rgba(255,255,255,.5);position:relative;opacity:.85}
.carousel .toggle:hover{opacity:1;background:rgba(255,255,255,.12)}
.carousel .toggle::before,.carousel .toggle::after{content:"";position:absolute;top:50%;width:3px;height:.7rem;margin-top:-.35rem;background:#fff;border-radius:1px}
.carousel .toggle::before{left:calc(50% - 4.5px)}
.carousel .toggle::after{left:calc(50% + 1.5px)}
.carousel .toggle.play::after{display:none}
.carousel .toggle.play::before{left:calc(50% - 3px);width:0;height:0;margin-top:-.4rem;background:none;border-radius:0;border-style:solid;border-width:.4rem 0 .4rem .65rem;border-color:transparent transparent transparent #fff}
@keyframes slide-in{from{opacity:0;transform:translateY(.6rem)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.carousel.js .slide{animation:none}.carousel .dots i{transition:none}}
