/* /features: everything ChangeGist does (templates/features.html). Builds on after.css (night colours, arriving words,
   paper cards). Motion starts only when a section scrolls in (.in from after.js); with no script, "reduce motion"
   or a phone, every picture shows its finished state. */

.ft-hero { padding-top: clamp(60px, 10vh, 110px); }
.ft-hero .af-h { font-size: clamp(40px, 6vw, 82px); }
.ft-hero-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: clamp(30px, 5vw, 70px); align-items: center; }
.ft-cta { margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ft-cta span { font-size: 14px; color: var(--dim); }

/* five tabs you keep refreshing, folding into one message */
.ft-tabs { position: relative; display: grid; gap: 10px; padding: 10px 0 120px; }
.ft-tab { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px;
  background: var(--night3); border: 1px solid rgba(243,230,211,.1); border-radius: 12px; font-size: 14px;
  transform: rotate(calc((var(--k) - 2) * .6deg)); }
.ft-tab b { font-weight: 700; color: var(--cream2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-tab em { font-style: normal; font-size: 12px; color: rgba(243,230,211,.45); }
.ft-rf { color: var(--coral); font-weight: 800; display: inline-block; }
.ft-one { position: absolute; left: 4%; right: 4%; bottom: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px;
  align-items: start; background: var(--paper); color: var(--ink); border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.ft-one small { display: block; font-size: 12px; color: #7a7368; font-weight: 700; }
.ft-one b { display: block; font: 800 18px/1.25 "Bricolage Grotesque", sans-serif; letter-spacing: -.02em; }
.ft-one span:last-child { font-size: 14px; color: #4a453d; }
.af.go .ft-hero.in .ft-rf { animation: ft-spin 1.4s linear 3; }
.af.go .ft-hero.in .ft-tab { animation: ft-fold .7s cubic-bezier(.5,0,.3,1) both; animation-delay: calc(4.4s + var(--k) * .08s); }
.af.go .ft-hero.in .ft-one { animation: ft-land .8s cubic-bezier(.2,1.3,.4,1) 5s both; }
@keyframes ft-spin { to { transform: rotate(360deg); } }
@keyframes ft-fold { to { opacity: .45; transform: translateY(calc((4 - var(--k)) * 12px)) scale(.96); } }
@keyframes ft-land { from { opacity: 0; transform: translateY(30px) scale(.94); } }

.ft-jump { margin-top: clamp(40px, 7vh, 70px); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ft-jump span { font-weight: 800; color: var(--dim); margin-right: 4px; }
.ft-jump a { color: var(--cream2); font-weight: 700; padding: 10px 16px; border-radius: 999px; border: 1.5px solid rgba(243,230,211,.22); transition: background .2s, border-color .2s; }
.ft-jump a:hover { background: rgba(243,230,211,.08); border-color: var(--coral); }

/* the four chapters */
.ft-ch { scroll-margin-top: 20px; }
.ft-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 460px); gap: clamp(30px, 6vw, 90px); align-items: center; }
.ft-split.flip > :first-child { order: 2; }
.ft-list { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 52ch; }
.ft-list li { position: relative; padding-left: 26px; color: var(--cream2); line-height: 1.45; }
.ft-list li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border: solid var(--mint);
  border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
.ft-art { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 20px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.75);
  transform: rotate(-1.2deg); }
.ft-split.flip .ft-art { transform: rotate(1.2deg); }

/* jobs: filters and a feed where only matches get through */
.ft-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-bottom: 14px; border-bottom: 1px dashed #d9d2c4; }
.ft-filter small { width: 100%; font-weight: 800; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #7a7368; }
.chip { font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #efe9de; color: #7a7368; text-decoration: line-through; }
.chip.on { background: #590907; color: #f3e6d3; text-decoration: none; }
.ft-feed { display: grid; gap: 8px; margin-top: 14px; }
.ft-job { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 10px 12px; border-radius: 10px; background: #f5f1ea; }
.ft-job b { font-size: 15px; } .ft-job span { grid-column: 1; font-size: 13px; color: #7a7368; }
.ft-job em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-size: 12px; font-weight: 800; }
.ft-job.no { opacity: .45; } .ft-job.no em { color: #9a9285; }
.ft-job.yes { background: #fff; box-shadow: inset 3px 0 0 #2f8a4a, 0 6px 16px -10px rgba(0,0,0,.4); } .ft-job.yes em { color: #2f8a4a; }
.af.go .ft-ch.in .ft-job { animation: ft-in .5s both; animation-delay: calc(.6s + var(--n, 0) * .25s); }
.ft-job:nth-child(2) { --n: 1; } .ft-job:nth-child(3) { --n: 2; } .ft-job:nth-child(4) { --n: 3; }
@keyframes ft-in { from { opacity: 0; transform: translateX(-14px); } }

/* prices: the line drops under your price */
.ft-tag { display: grid; gap: 2px; }
.ft-tag small { font-weight: 700; color: #7a7368; font-size: 13px; }
.ft-tag b { font: 800 30px/1.1 "Bricolage Grotesque", sans-serif; letter-spacing: -.03em; }
.ft-tag s { font-size: 18px; color: #9a9285; font-weight: 600; margin-right: 6px; }
.ft-tag .ok { justify-self: start; margin-top: 6px; font-size: 12.5px; font-weight: 800; color: #2f8a4a; background: #e3f3e7; padding: 4px 10px; border-radius: 999px; }
.ft-chart { display: block; width: 100%; height: 150px; margin-top: 14px; overflow: visible; }
.ft-goal { stroke: #b3261e; stroke-width: 1.5; stroke-dasharray: 5 5; }
.ft-chart text { font: 700 11px "DM Sans", sans-serif; fill: #b3261e; }
.ft-line { fill: none; stroke: #590907; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 420; }
.ft-dot { fill: #2f8a4a; stroke: #fff; stroke-width: 3; }
.af.go .ft-ch.in .ft-line { animation: ft-draw 2s .5s ease-out both; }
.af.go .ft-ch.in .ft-dot { animation: ft-pop .5s 2.3s cubic-bezier(.3,1.8,.5,1) both; }
@keyframes ft-draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@keyframes ft-pop { from { opacity: 0; transform: scale(0); transform-origin: 270px 104px; } }

/* shops: the undercut table and its stamp */
.ft-shop { position: relative; padding-bottom: 74px; }
.ft-row { margin: 0; display: flex; justify-content: space-between; gap: 12px; padding: 11px 4px; border-bottom: 1px solid #ece6da; font-size: 15px; }
.ft-row.head { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7a7368; }
.ft-row.you { font-weight: 800; background: #f5f1ea; border-radius: 8px; padding-inline: 10px; border: 0; }
.ft-row b { font-variant-numeric: tabular-nums; }
.ft-row .cut { color: #b3261e; } .ft-row .cut i { font-style: normal; font-size: 12px; background: #fbe3e0; padding: 2px 6px; border-radius: 6px; margin-left: 4px; }
.ft-stamp { position: absolute; right: 18px; bottom: 16px; margin: 0; font: 900 22px/1 "Bricolage Grotesque", sans-serif; text-transform: uppercase;
  letter-spacing: .08em; color: #b3261e; border: 3px solid #b3261e; border-radius: 8px; padding: 6px 10px; transform: rotate(-12deg); opacity: .85; }
.af.go .ft-ch.in .ft-stamp { animation: ft-stamp .45s 1.2s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes ft-stamp { from { opacity: 0; transform: rotate(-12deg) scale(2.2); } }

/* anything else: a policy with its changes marked */
.ft-doc p { margin: 0 0 10px; line-height: 1.55; font-size: 15px; }
.ft-doc .dim { color: #9a9285; }
.ft-doc-h { font-weight: 800; font-size: 12px !important; letter-spacing: .1em; text-transform: uppercase; color: #7a7368; }
.ft-doc del { color: #b3261e; } .ft-doc ins { text-decoration: none; background: #e3f3e7; color: #1f6b37; padding: 0 3px; border-radius: 4px; }
.ft-doc-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; margin: 16px 0 0 !important;
  padding-top: 14px; border-top: 1px dashed #d9d2c4; font-weight: 700; }
.ft-doc-note .sp-ap, .ft-one .sp-ap { width: 32px; height: 32px; font-size: 16px; }
.af.go .ft-ch.in .ft-doc ins { animation: ft-mark .6s 1s both; }
@keyframes ft-mark { from { background: transparent; } }

/* paste, tick, read */
.ft-steps { margin: 44px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 34px); }
.ft-steps li { position: relative; background: var(--night2); border: 1px solid rgba(243,230,211,.1); border-radius: 18px; padding: 24px; }
.ft-steps .n { position: absolute; top: -14px; left: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--coral); color: var(--night);
  display: grid; place-items: center; font-weight: 900; }
.ft-steps h3 { margin: 18px 0 6px; font: 800 22px/1.2 "Bricolage Grotesque", sans-serif; letter-spacing: -.02em; }
.ft-steps p { margin: 0; color: var(--dim); line-height: 1.5; }
.ft-mini { height: 78px; border-radius: 12px; background: var(--paper); color: var(--ink); display: grid; align-items: center; padding: 0 14px; }
.ft-mini.addr { grid-template-columns: auto 1fr; gap: 8px; font: 600 13px ui-monospace, monospace; }
.ft-mini.addr i { width: 10px; height: 10px; border-radius: 50%; background: #2f8a4a; }
.ft-mini.boxes { grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; align-items: stretch; }
.ft-mini.boxes i { border: 2px dashed #d0c7b7; border-radius: 6px; position: relative; }
.ft-mini.boxes i.on { border: 2px solid #590907; background: rgba(89,9,7,.06); }
.ft-mini.boxes i.on::after { content: "✓"; position: absolute; right: 4px; top: 0; color: #590907; font-weight: 900; font-size: 13px; }
.ft-mini.read b { font: 800 16px/1.2 "Bricolage Grotesque", sans-serif; }
.af.go .ft-easy.in .ft-mini.boxes i.on { animation: ft-tick .4s both; } .af.go .ft-easy.in .ft-mini.boxes i.on:nth-child(2) { animation-delay: 1s; }
.af.go .ft-easy.in .ft-mini.boxes i.on:nth-child(4) { animation-delay: 1.5s; }
@keyframes ft-tick { from { border: 2px dashed #d0c7b7; background: none; } }

/* how often: three tickets */
.ft-tickets { margin-top: 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 30px); }
.ft-ticket { position: relative; background: var(--cream2); color: var(--ink); border-radius: 14px; padding: 22px 22px 24px;
  -webkit-mask: radial-gradient(circle 10px at 0 62%, transparent 98%, #000) , radial-gradient(circle 10px at 100% 62%, transparent 98%, #000);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.ft-ticket:nth-child(1) { transform: rotate(-1.5deg); } .ft-ticket:nth-child(3) { transform: rotate(1.5deg); }
.ft-ticket small { font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #590907; }
.ft-ticket b { display: block; margin: 6px 0 14px; font: 800 22px/1.15 "Bricolage Grotesque", sans-serif; letter-spacing: -.02em; }
.ft-ticket p { margin: 0; padding-top: 14px; border-top: 2px dashed rgba(89,9,7,.25); font-size: 14.5px; line-height: 1.5; color: #4a453d; }

/* blocked sites: the private address */
.ft-env-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; background: #f5f1ea; border-radius: 12px; padding: 14px; }
.ft-env-card small { font-size: 12px; font-weight: 800; color: #7a7368; }
.ft-env-card b { grid-column: 1; font: 700 14px ui-monospace, monospace; overflow-wrap: anywhere; }
.ft-env-card span { grid-row: 1 / span 2; grid-column: 2; font-size: 13px; font-weight: 800; background: #590907; color: #f3e6d3; padding: 7px 12px; border-radius: 8px; }
.ft-env-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 16px 0 0; font-size: 13.5px; }
.ft-env-flow span { background: #efe9de; padding: 6px 10px; border-radius: 8px; font-weight: 700; }
.ft-env-flow span.g { background: #e3f3e7; color: #1f6b37; } .ft-env-flow i { font-style: normal; color: #9a9285; }
.ft-env .af-note { color: #7a7368; }

/* where alerts go */
.ft-chan { margin: 40px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ft-chan li { display: grid; gap: 4px; padding: 18px; border-radius: 14px; background: var(--night2); border: 1px solid rgba(243,230,211,.1); }
.ft-chan b { font: 800 17px/1.25 "Bricolage Grotesque", sans-serif; } .ft-chan span { font-size: 13px; color: var(--dim); }
.ft-extras { margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 3vw, 30px); }
.ft-extras h3 { margin: 0 0 6px; font: 800 18px/1.2 "Bricolage Grotesque", sans-serif; color: var(--cream2); }
.ft-extras p { margin: 0; color: var(--dim); font-size: 15px; line-height: 1.5; }

@media (max-width: 900px) {
  .ft-hero-in, .ft-split { grid-template-columns: minmax(0, 1fr); }
  .ft-split.flip > :first-child { order: 0; }
  .ft-steps, .ft-tickets { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .ft-chan, .ft-extras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-art, .ft-split.flip .ft-art, .ft-ticket { transform: none !important; }
}
@media (max-width: 520px) { .ft-chan, .ft-extras { grid-template-columns: minmax(0, 1fr); } .ft-tabs { padding-bottom: 130px; } }
@media (prefers-reduced-motion: reduce) { .ft-tab, .ft-one, .ft-line, .ft-dot, .ft-stamp { animation: none !important; } .ft-line { stroke-dasharray: none; } }
.ft .btn-cream { text-decoration: none; }
