/* TrenchSync landing page.
   Dark glass over a slowly flowing silk backdrop. The app keeps its dense
   ledger aesthetic; this page exists to explain the product and get you in. */

:root {
  --up:     #3ECF8E;   /* semantic: growth, the product's subject */
  --text:   #F2F4F8;
  --muted:  #8A90A0;
  --line:   rgba(255, 255, 255, 0.10);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1060px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #000;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* -------------------------------------------------------- silk backdrop */

/* z-index 0, not -1: a negative index would paint the whole backdrop
   *behind* body's own background and render it invisible. Content is
   lifted to 1 instead. */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
  overflow: hidden;
}
.lnav, main, .lfoot { position: relative; z-index: 1; }

/* Elongated, heavily blurred ellipses drifting past each other read as
   ribbons of light. Only transform is animated, so this stays composited. */
/* Kept thin: wide flat ellipses read as ribbons, tall ones as a wash. */
.silk {
  position: absolute;
  width: 140vmax;
  left: -20vmax;
  border-radius: 50%;
  will-change: transform;
}

.s1 {
  top: -2vmax;
  height: 20vmax;
  filter: blur(44px);
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.06) 40%, transparent 66%);
  animation: drift1 34s ease-in-out infinite alternate;
}
.s2 {
  top: 18vmax;
  height: 16vmax;
  filter: blur(40px);
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255, 255, 255, 0.40), rgba(255, 255, 255, 0.04) 42%, transparent 68%);
  animation: drift2 46s ease-in-out infinite alternate;
}
.s3 {
  top: 40vmax;
  height: 24vmax;
  filter: blur(52px);
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255, 255, 255, 0.26), transparent 64%);
  animation: drift3 40s ease-in-out infinite alternate;
}
/* One brand-tinted ribbon so the black isn't entirely neutral. */
.s4 {
  top: 8vmax;
  height: 18vmax;
  filter: blur(58px);
  background: radial-gradient(ellipse at 50% 50%,
    rgba(62, 207, 142, 0.16), transparent 62%);
  animation: drift4 56s ease-in-out infinite alternate;
}

@keyframes drift1 {
  from { transform: translate3d(-6%, 0, 0) rotate(-14deg) scaleY(0.9); }
  to   { transform: translate3d(6%, 6vmax, 0) rotate(-5deg) scaleY(1.15); }
}
@keyframes drift2 {
  from { transform: translate3d(4%, 2vmax, 0) rotate(9deg) scaleY(1.1); }
  to   { transform: translate3d(-7%, -4vmax, 0) rotate(2deg) scaleY(0.85); }
}
@keyframes drift3 {
  from { transform: translate3d(-3%, 3vmax, 0) rotate(-8deg) scaleY(1); }
  to   { transform: translate3d(7%, -6vmax, 0) rotate(-16deg) scaleY(1.2); }
}
@keyframes drift4 {
  from { transform: translate3d(8%, 10vmax, 0) rotate(12deg); }
  to   { transform: translate3d(-8%, -2vmax, 0) rotate(3deg); }
}

/* Darkens the edges so content always has contrast to sit on. */
.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% 38%, transparent 30%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.20), rgba(0,0,0,0) 26%, rgba(0,0,0,0.80));
}

/* Fine noise stops the big blurs from banding on dark screens. */
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------ glass base */

.glass {
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 24px 70px rgba(0, 0, 0, 0.55),
    0 0 70px rgba(255, 255, 255, 0.05);
}

/* ------------------------------------------------------------------- nav */

.lnav {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
/* logo.png is a 1080 square canvas with the wide mark padded inside it
   (artwork at x31 y238, 1005x484). Cropping to those bounds in CSS makes
   the box *be* the mark, so it optically aligns with the wordmark instead
   of floating high inside its own padding. */
.mark {
  width: 54px;
  height: 26px;
  flex-shrink: 0;
  background-image: url("/static/logo.png");
  background-size: 58px 58px;
  background-position: -1.67px -12.79px;
  background-repeat: no-repeat;
}
.lnav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  color: var(--muted);
}
.lnav-links a:hover { color: var(--text); }

.btn-ghost {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ------------------------------------------------------------------ hero */

main { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.hero { padding: 108px 0 104px; text-align: center; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}

h1 {
  font-size: clamp(46px, 8.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 0 0 24px;
}
.accent { color: var(--up); }

.lede {
  font-size: clamp(16px, 1.9vw, 19px);
  font-weight: 300;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 44px;
}

/* The hero's glass console. */
.panel {
  border-radius: 24px;
  padding: 14px;
  max-width: 560px;
  margin: 0 auto;
}

.cta { display: flex; gap: 10px; }
.cta input {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 15px 18px;
  outline: none;
}
.cta input:focus { border-color: rgba(255, 255, 255, 0.30); }
.cta input::placeholder { color: #6C7280; }

.btn {
  background: #F4F6FA;
  color: #0A0B0E;
  border: 0;
  border-radius: 14px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14.5px;
  padding: 15px 30px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #fff; }
.btn.big {
  display: inline-block;
  border-radius: 999px;
  padding: 17px 40px;
  font-size: 15px;
}

.err {
  font-family: var(--mono);
  font-size: 12px;
  color: #FF6B85;
  padding: 10px 4px 0;
}
.err[hidden] { display: none; }

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 16px 4px 6px;
}
.trust span { display: flex; align-items: center; gap: 7px; }
.tick { color: var(--up); font-style: normal; }

/* ------------------------------------------------------ numbered chapters */

section { scroll-margin-top: 24px; }

.chapter { position: relative; padding: 46px 0 96px; }

/* Oversized ghost numeral behind the chapter heading. */
.bignum {
  position: absolute;
  top: -18px;
  left: -6px;
  font-size: clamp(140px, 19vw, 250px);
  line-height: 0.8;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
  user-select: none;
}

.chead { position: relative; text-align: center; margin-bottom: 44px; }
.chead .eyebrow { margin-bottom: 16px; }
.chead .sub {
  font-size: 16px;
  font-weight: 300;
  color: var(--muted);
  max-width: 560px;
  margin: 18px auto 0;
}

h2 {
  font-size: clamp(30px, 4.8vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.042em;
  font-weight: 600;
  margin: 0;
}

/* Accent keyword — jade into violet, the app's two accents. */
.grad {
  background: linear-gradient(100deg, #3ECF8E 0%, #5AD9C4 40%, #9B7BFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ----------------------------------------------------------- show cards */

.showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* Tinted over the glass so the cards read as lit panels, and the mock UI
   can bleed off the bottom edge the way a product shot does. */
.show {
  position: relative;
  border-radius: 22px;
  padding: 30px 28px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(158deg, rgba(62, 207, 142, 0.10), rgba(155, 123, 255, 0.13) 62%,
      rgba(155, 123, 255, 0.05)),
    rgba(255, 255, 255, 0.045);
}
.show-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.show h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
}
.arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text);
}
.show > p {
  font-size: 14.5px;
  font-weight: 300;
  color: var(--muted);
  margin: 0 0 26px;
}

/* The mock product surface. flex:1 so shots of differing content length
   both reach the card's bottom edge and crop there, like a product shot. */
.shot {
  flex: 1;
  background: rgba(6, 8, 11, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  padding: 14px;
  margin: 0 -4px;
  font-family: var(--mono);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
}

.mk-rows { display: flex; flex-direction: column; }
.mk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mk-row b { font-weight: 500; width: 68px; }
.mk-q { flex: 1; color: #6C7280; font-size: 11px; }
.mk-row em { font-style: normal; }
.pos { color: var(--up); }
.neg { color: #FF6B85; }

.mk-fees { display: flex; flex-direction: column; }
.mk-f {
  display: flex;
  justify-content: space-between;
  padding: 10px 6px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mk-f b { color: var(--text); font-weight: 500; }
.mk-f.total { color: var(--text); border-bottom: 0; }
.mk-f.total b { color: var(--up); }

.mk-find {
  border-left: 2px solid var(--up);
  padding: 8px 0 8px 12px;
  margin-bottom: 12px;
}
.mk-find.leak { border-left-color: #FF6B85; }
.mk-dim {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6C7280;
}
.mk-find b {
  display: block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0 3px;
}
.mk-find em { font-style: normal; font-size: 11px; color: var(--muted); }

.mk-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.mk-cal i {
  display: block;
  aspect-ratio: 1 / 0.8;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.045);
}
.mk-cal .p1 { background: rgba(62, 207, 142, 0.28); }
.mk-cal .p2 { background: rgba(62, 207, 142, 0.48); }
.mk-cal .p3 { background: rgba(62, 207, 142, 0.72); }
.mk-cal .n1 { background: rgba(229, 85, 110, 0.30); }
.mk-cal .n2 { background: rgba(229, 85, 110, 0.55); }

/* ---------------------------------------------------------------- closer */

.closer {
  padding: 92px 0 108px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}
.closer h2 { margin-bottom: 36px; }

.grad-btn {
  display: inline-block;
  border-radius: 999px;
  padding: 17px 42px;
  font-size: 15px;
  color: #07120D;
  background: linear-gradient(100deg, #3ECF8E, #5AD9C4 45%, #9B7BFF);
  box-shadow: 0 10px 40px rgba(62, 207, 142, 0.22);
}
.grad-btn:hover { filter: brightness(1.08); background-position: 20% 0; }

/* ---------------------------------------------------------------- footer */

.lfoot {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px 24px 46px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 620px) {
  .hero { padding: 68px 0 76px; }
  .cta { flex-direction: column; }
  .lnav-links { gap: 14px; font-size: 13px; }
  .lnav-links a:not(.btn-ghost) { display: none; }
  .showcase { grid-template-columns: 1fr; }
  .show { padding: 26px 22px 0; }
  .bignum { font-size: 120px; top: -4px; }
  .s1, .s2 { filter: blur(34px); }
  .s3, .s4 { filter: blur(42px); }
}

/* Freeze the backdrop entirely rather than merely slowing it. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
