/* Home page: hero, the four steps and three situations (partials/home-main.php). Uses the tokens of site.css; behaviour in assets/js/home-main.js. */

/* ================= Hero: the promise on the left, one agreement that goes through the four steps on the right =================
   Everything in the picture is sized in em, so the whole composition scales with one font size. The entrance is a short film made
   of CSS animations with a fill, so the picture is complete when animations do not run. One easing for everything. */
.hf-hero { --e: cubic-bezier(.2, 0, 0, 1); position: relative; overflow: hidden; background: var(--bg-2); }
.hf-grid { display: grid; grid-template-columns: minmax(var(--gutter, 1.25rem), 1fr) minmax(0, 35.5rem) minmax(0, 39.5rem) minmax(0, 1fr); align-items: center; }
.hf-copy { grid-column: 2; padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
/* the promo above the heading: a pill with a tag and an arrow, so it reads as news you can open */
.hf-news { display: inline-flex; align-items: center; gap: .6rem; padding: .3rem .95rem .3rem .35rem; border: 1px solid rgba(28, 28, 36, .12); border-radius: 999px; background: #FFFFFF; font-size: .9rem; font-weight: 500; line-height: 1.3; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.hf-news b { padding: .18rem .65rem; border-radius: 999px; background: var(--primary); font-size: .75rem; font-weight: 700; color: #FFFFFF; }
.hf-news::after { content: "\2192"; color: var(--primary); transition: transform .15s; }
.hf-news:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(28, 28, 36, .08); color: var(--ink); text-decoration: none; }
.hf-news:hover::after { transform: translateX(3px); }
.hf-copy h1 { margin: 1.1rem 0 0; text-wrap: balance; font-size: clamp(2.1rem, 3.2vw, 2.9rem); line-height: 1.08; letter-spacing: -.03em; hyphens: manual; -webkit-hyphens: manual; }
.hf-sub { max-width: 31rem; margin: 1.35rem 0 1.75rem; font-size: clamp(1.05rem, 1.3vw, 1.175rem); line-height: 1.6; color: var(--ink-2); }
.hf-copy > * { animation: hf-rise .6s var(--e) both; }
.hf-copy > :nth-child(2) { animation-delay: .07s; }
.hf-copy > :nth-child(3) { animation-delay: .14s; }
.hf-copy > :nth-child(4) { animation-delay: .21s; }
.hf-copy > :nth-child(5) { animation-delay: .28s; }
@keyframes hf-rise { from { opacity: 0; transform: translateY(14px); } }
/* the words that matter: an orange stroke that draws itself under them */
.hf-mark { position: relative; white-space: nowrap; }
.hf-mark::after { content: ""; position: absolute; left: -.03em; right: -.03em; bottom: -.17em; height: .26em; background: var(--accent); -webkit-mask: url("../img/hx-underline.svg") center / 100% 100% no-repeat; mask: url("../img/hx-underline.svg") center / 100% 100% no-repeat; animation: hf-draw .9s var(--e) .75s both; }
@keyframes hf-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.hf-stage { grid-column: 3 / 5; position: relative; height: 35.5em; margin: 2.2em 0 2.2em 3em; font-size: clamp(10.5px, 1.04vw, 15.5px); }
.hf-shot { position: absolute; left: 5em; right: 0; top: 2.6em; bottom: 0; border-radius: 1.1em 0 0 1.1em; background: #F5F5F5 no-repeat left top / auto 100%; box-shadow: 0 2em 4em -2em rgba(28, 28, 36, .28), 0 0 0 1px rgba(28, 28, 36, .06); animation: hf-slide 1s var(--e) .1s both; }
.hf-shot-0 { background-image: url("../img/hero/app-complaints.webp"); }
.hf-shot-1 { background-image: url("../img/hero/app-onboarding.webp"); }
.hf-shot-2 { background-image: url("../img/hero/app-dashboard-nl.webp"); }
/* the English site shows the same screens with the interface and the content in English */
.hf-lang-en .hf-shot-0 { background-image: url("../img/hero/app-complaints-en.webp"); }
.hf-lang-en .hf-shot-1 { background-image: url("../img/hero/app-onboarding-en.webp"); }
.hf-lang-en .hf-shot-2 { background-image: url("../img/hero/app-dashboard-en.webp"); }
@keyframes hf-slide { from { opacity: 0; transform: translateX(8em); } }

/* three pictures share the stage; the script shows one of them */
.hf-film { position: absolute; inset: 0; }
.hf-doc, .hf-card { position: absolute; background: #FFFFFF; color: var(--ink); }
.hf-stage::before { content: ""; position: absolute; left: -6em; top: 1em; width: 30em; height: 30em; border-radius: 50%; background: radial-gradient(circle, rgba(234, 120, 48, .20), rgba(234, 120, 48, 0) 68%); pointer-events: none; }
.hf-doc { left: 0; top: 6.2em; width: 26em; border-radius: 1.1em; box-shadow: 0 2.2em 4.5em -2em rgba(28, 28, 36, .35), 0 .3em .9em rgba(28, 28, 36, .08); overflow: hidden; animation: hf-pop .8s var(--e) .4s both; }
.hf-card { padding: 1.15em 1.3em 1.25em; border-radius: 1.05em; box-shadow: 0 1.6em 3.2em -1.4em rgba(28, 28, 36, .38), 0 .25em .7em rgba(28, 28, 36, .08); animation: hf-pop .7s var(--e) both; }
@keyframes hf-pop { from { opacity: 0; transform: translateY(1.2em) scale(.965); } }
.hf-stage p { margin: 0; }
.hf-crumb { display: flex; gap: .5em; padding: .95em 1.7em; border-bottom: 1px solid #EFEFF1; font-size: .82em; color: var(--ink-3); }
.hf-crumb span:last-child { font-weight: 600; color: var(--ink); }
.hf-doc-in { padding: 1.3em 1.7em 2em; }
.hf-step { display: flex; align-items: center; gap: .55em; margin-bottom: .8em !important; font-family: var(--font-display); font-size: .78em; font-weight: 700; color: var(--primary); }
.hf-step i { display: inline-flex; align-items: center; justify-content: center; width: 1.75em; height: 1.75em; border-radius: 50%; background: var(--primary); font-style: normal; font-size: .92em; color: #FFFFFF; }
.hf-chips { display: inline-grid; }
.hf-chip { grid-area: 1 / 1; justify-self: start; padding: .28em .8em; border-radius: 999px; font-size: .76em; font-weight: 600; white-space: nowrap; }
.hf-chip-a { background: #FFF3DC; color: var(--amber, #8F5E12); animation: hf-out .35s var(--e) 2.1s both; }
.hf-chip-b { background: var(--success-soft); color: var(--success); animation: hf-in .45s var(--e) 2.25s both; }
@keyframes hf-out { to { opacity: 0; transform: translateY(-.5em); } }
@keyframes hf-in { from { opacity: 0; transform: translateY(.5em); } }
.hf-title { margin: .55em 0 .7em !important; font-family: var(--font-display); font-weight: 700; font-size: 1.65em; line-height: 1.15; letter-spacing: -.02em; }
.hf-line { display: block; height: .55em; margin-top: .62em; border-radius: .3em; background: #EFEFF1; }
.hf-l2 { width: 82%; margin-bottom: 1em; }
.hf-l3 { width: 58%; }
.hf-del, .hf-ins { margin-bottom: .45em !important; padding: .5em .75em; border-radius: .45em; font-size: .92em; line-height: 1.45; }
/* the old sentence is struck, then the new one is written under it */
.hf-del { background: #FDECEA; color: #7A271A; animation: hf-tint-del .5s var(--e) 1.15s both; }
.hf-del span { background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 100% 1px; animation: hf-strike .55s var(--e) 1.3s both; }
.hf-ins { margin-bottom: 1em !important; background: var(--success-soft); color: #14532D; font-weight: 600; animation: hf-write .7s var(--e) 1.7s both; }
@keyframes hf-tint-del { from { background: transparent; color: var(--ink-2); } }
@keyframes hf-strike { from { background-size: 0 1px; } }
@keyframes hf-write { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

.hf-second { left: 21.5em; top: 0; width: 17.5em; animation-delay: 2.6s; }
.hf-label { font-size: .8em; font-weight: 600; color: var(--ink-3); }
.hf-num { margin-top: .15em !important; font-family: var(--font-display); font-weight: 700; font-size: 1.85em; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hf-num small { font-family: var(--font-body); font-weight: 400; font-size: .47em; letter-spacing: 0; color: var(--ink-2); }
.hf-meter { display: block; height: .5em; margin: .7em 0 .55em; border-radius: 999px; background: #EFEFF1; overflow: hidden; }
.hf-meter i { display: block; width: 77.5%; height: 100%; border-radius: inherit; background: var(--success); animation: hf-fill 1.3s var(--e) 2.9s both; }
@keyframes hf-fill { from { width: 0; } }
.hf-small { font-size: .8em; color: var(--ink-3); }
.hf-num-sm { margin-bottom: .3em !important; font-size: 1.4em; }
.hf-chip-review { background: #FFF3DC; color: var(--amber, #8F5E12); }
.hf-chip-final { background: var(--success-soft); color: var(--success); }
.hf-text { margin-bottom: 1em !important; font-size: .95em; line-height: 1.5; color: var(--ink-2); }
.hf-quote { margin: .3em 0 .7em !important; font-size: .95em; line-height: 1.45; }
.hf-task { display: flex; flex-wrap: wrap; align-items: center; gap: .4em; padding-top: .65em; border-top: 1px solid var(--line); font-size: .86em; font-weight: 600; animation: hf-rise .5s var(--e) 2.1s both; }
.hf-task span { padding: .15em .55em; border-radius: .45em; background: var(--success-soft); font-size: .88em; font-weight: 700; color: var(--success); }
.hf-task .icon { width: 1.1em; height: 1.1em; color: var(--success); }
/* a picture without a rewritten sentence has less to wait for: the cards arrive sooner */
.hf-quick .hf-second { animation-delay: 1.4s; }
.hf-quick .hf-ask { animation-delay: 2.3s; }
.hf-quick .hf-a { animation-delay: 2.85s; }
.hf-quick .hf-src { animation-delay: 3s; }
.hf-quick .hf-tag { animation-delay: 3.1s; }
/* the change suggestion is a taller card: it gets more width and the cards under it move down a little */
.hf-tall .hf-second { left: 18.6em; width: 21em; }
.hf-tall .hf-ask { top: 14.8em; }
.hf-tall .hf-tag { top: 28.4em; width: 23em; }

.hf-ask { left: 25.4em; top: 13.6em; width: 20.2em; animation-delay: 3.3s; }
.hf-q { padding: .7em .95em; border-radius: .9em .9em .9em .25em; background: var(--ink); font-size: .95em; font-weight: 600; line-height: 1.4; color: #FFFFFF; }
.hf-a { margin: .75em 0 .65em !important; font-family: var(--font-display); font-weight: 700; font-size: 1.3em; line-height: 1.25; letter-spacing: -.015em; animation: hf-rise .5s var(--e) 3.85s both; }
.hf-src { display: flex; flex-wrap: wrap; align-items: center; gap: .55em; font-size: .8em; animation: hf-rise .5s var(--e) 4s both; }
.hf-src span { font-weight: 600; color: var(--ink-3); }
.hf-src b { display: inline-flex; align-items: center; gap: .4em; padding: .3em .7em; border: 1px solid var(--line); border-radius: .6em; font-weight: 600; }
.hf-src .icon { width: 1.1em; height: 1.1em; color: var(--primary); }

.hf-tag { left: 11.6em; top: 27.6em; width: 19.4em; animation-delay: 4s; }
.hf-tagline { display: flex; align-items: center; gap: .5em; font-family: var(--font-display); font-weight: 700; font-size: 1.05em; }
.hf-tagline .icon { width: 1.25em; height: 1.25em; color: var(--success); }

/* With the screen of the product behind them (25 November 2026) the cards are a little smaller and sit along the edges,
   so the screen stays recognisable: the orange bar and the categories on the left show above and beside the cards. */
@media (min-width: 1041px) {
  .hf-stage { height: 39em; }
  .hf-shot { left: 4em; top: 0; bottom: 3em; }
  .hf-doc, .hf-card { font-size: .86em; }
  .hf-doc { left: 0; top: 10.5em; width: 25em; }
  .hf-second { left: auto; right: 1.5em; top: 4.2em; width: 17.5em; }
  .hf-tall .hf-second { left: auto; width: 20em; }
  .hf-ask { left: auto; right: 3em; top: 21.5em; width: 20.2em; }
  .hf-tall .hf-ask { top: 23em; }
  .hf-tag { left: 7em; top: 38.6em; width: 21em; }
  .hf-tall .hf-tag { top: 38.6em; width: 23em; }
}
/* Each card in the colour of its pillar, so it stands out from the white screen behind it and matches the four tabs below */
.hf-doc { --pc: var(--p1); --ps: var(--p1-soft); }
.hf-second { --pc: var(--p2); --ps: var(--p2-soft); }
.hf-ask { --pc: var(--p3); --ps: var(--p3-soft); }
.hf-tag { --pc: var(--p4); --ps: var(--p4-soft); }
.hf-card { background: var(--ps); box-shadow: 0 1.8em 3.4em -1.3em rgba(28, 28, 36, .5), 0 .3em .8em rgba(28, 28, 36, .1), inset 0 0 0 1px rgba(28, 28, 36, .05); }
.hf-doc { box-shadow: 0 2.4em 4.6em -1.8em rgba(28, 28, 36, .5), 0 .3em .9em rgba(28, 28, 36, .1); }
.hf-doc .hf-crumb { background: var(--ps); border-bottom-color: transparent; }
.hf-stage .hf-step { color: var(--pc); }
.hf-stage .hf-step i { background: var(--pc); }
.hf-card .hf-meter, .hf-card .hf-src b { background: #FFFFFF; }
/* the screen behind is a little softer, so the cards come forward */
.hf-shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(246, 239, 234, .35), rgba(246, 239, 234, .1) 60%); }
.hf-shot { overflow: hidden; }

/* ================= Pillars: four tabs that advance by themselves, text and screen side by side ================= */
.hx-pillars { padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem); background: #FFFFFF; }
.ha-story-head { max-width: 44rem; margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); }
.ha-story-head h2 { margin: 0 0 .6rem; font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -.025em; }
.ha-story-head .lead { margin: 0; }
.hx-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.hx-tab { position: relative; display: flex; align-items: center; gap: .8rem; padding: .95rem 1.05rem 1.15rem; border: 1px solid var(--line); border-radius: 16px; background: #FFFFFF; color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s, box-shadow .2s, transform .2s; }
.hx-tab:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.hx-tab:focus-visible { outline: 3px solid var(--primary-deco); outline-offset: 2px; }
.hx-tab.is-active { border-color: transparent; background: var(--bg-2); box-shadow: 0 0 0 2px var(--primary-deco); }
.hx-tab-nr { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--bg-2); font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--ink-2); transition: background .2s, color .2s; }
.hx-tab.is-active .hx-tab-nr { background: var(--primary); color: #FFFFFF; }
.hx-tab:nth-child(1) { --pc: var(--p1); --ps: var(--p1-soft); }
.hx-tab:nth-child(2) { --pc: var(--p2); --ps: var(--p2-soft); }
.hx-tab:nth-child(3) { --pc: var(--p3); --ps: var(--p3-soft); }
.hx-tab:nth-child(4) { --pc: var(--p4); --ps: var(--p4-soft); }
.hx-tab .hx-tab-nr { background: var(--ps); color: var(--pc); }
.hx-tab.is-active .hx-tab-nr { background: var(--pc); color: #FFFFFF; }
.hx-tab.is-active { background: var(--ps); box-shadow: 0 0 0 2px var(--pc); }
.hx-tab-bar::after { background: var(--pc, var(--primary-deco)); }
.hx-tab-text { min-width: 0; }
.hx-tab-text b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.hx-tab-text b, .hx-tab-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-tab-text small { display: block; margin-top: .15rem; font-size: .82rem; line-height: 1.3; color: var(--ink-3); }
.hx-tab-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: transparent; }
.hx-tab-bar::after { content: ""; display: block; width: 0; height: 100%; background: var(--primary-deco); }
.hx-tab.is-active .hx-tab-bar::after { width: 100%; }
.hx-tabs.is-auto .hx-tab.is-active .hx-tab-bar::after { width: 0; animation: hx-fill 7s linear forwards; }
.hx-tabs.is-auto.is-paused .hx-tab.is-active .hx-tab-bar::after { animation-play-state: paused; }
@keyframes hx-fill { to { width: 100%; } }
.hx-panel { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1.25rem, 3vw, 2.5rem); border-radius: 24px; background: var(--bg-2); }
.hx-panel + .hx-panel { margin-top: 1rem; }
.ha-js .hx-panel { display: none; margin-top: 0; }
.ha-js .hx-panel.is-active { display: grid; animation: hx-panel-in .5s ease both; }
@keyframes hx-panel-in { from { opacity: 0; transform: translateY(14px); } }
.hx-panel-nr { margin: 0 0 .3rem; font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .06em; color: var(--primary); }
#hx-panel-0 { --pc: var(--p1); } #hx-panel-1 { --pc: var(--p2); } #hx-panel-2 { --pc: var(--p3); } #hx-panel-3 { --pc: var(--p4); }
.hx-panel-nr { color: var(--pc, var(--primary)); }
#hx-panel-0 { --ps: var(--p1-soft); } #hx-panel-1 { --ps: var(--p2-soft); } #hx-panel-2 { --ps: var(--p3-soft); } #hx-panel-3 { --ps: var(--p4-soft); }
/* the surface behind the screen in the colour of the pillar of the tab, like the tab itself */
.hx-panel .hx-panel-screen { background: var(--ps, var(--sand)); }
.hx-panel .hx-panel-screen .sp { background: transparent; padding: 0; }
.hx-panel-text h3 { margin: 0 0 .7rem; font-size: clamp(1.7rem, 2.8vw, 2.3rem); letter-spacing: -.02em; }
.hx-panel-text p { margin: 0 0 1rem; max-width: 30rem; font-size: 1.08rem; line-height: 1.62; color: var(--ink-2); }
.hx-panel-text p:last-child { margin-bottom: 0; }
.hx-panel-screen { padding: clamp(.8rem, 1.8vw, 1.4rem); border-radius: 20px; background: var(--sand); }
.hx-panel-screen .sp { width: 100%; font-size: clamp(.58rem, .78vw, .74rem); }

/* ================= Three recognisable situations ================= */
.ha-proof { padding: clamp(3.5rem, 7vw, 5.5rem) 0; background: var(--bg-2); }
.ha-proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.ha-card { padding: 1.8rem 1.7rem 1.6rem; border-radius: 22px; background: #FFFFFF; box-shadow: var(--shadow-sm); }
.ha-card .benefit-ico { margin-bottom: 1rem; }
.ha-card h3 { margin: 0 0 .7rem; font-size: 1.4rem; line-height: 1.2; letter-spacing: -.02em; }
.ha-card p { margin: 0; line-height: 1.6; color: var(--ink-2); }
.ha-card .ha-pain { margin-bottom: .75rem; padding-left: .9rem; border-left: 3px solid var(--accent); font-style: italic; color: var(--ink-3); }
.ha-js .ha-card { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.ha-js .ha-card.is-in { opacity: 1; transform: none; }
.ha-js .ha-card:nth-child(2) { transition-delay: .12s; }
.ha-js .ha-card:nth-child(3) { transition-delay: .24s; }
.ha-more { margin: 1.75rem 0 0; }

@media (max-width: 1040px) {
  .hf-grid { grid-template-columns: minmax(var(--gutter, 1.25rem), 1fr) minmax(0, 46rem) minmax(var(--gutter, 1.25rem), 1fr); }
  .hf-copy { grid-column: 2; padding-bottom: 1rem; }
  .hf-stage { grid-column: 2 / 4; margin: 1em 0 2.5em; font-size: clamp(9px, 1.9vw, 15px); }
}
@media (max-width: 900px) {
  .hx-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-tab-text small { display: none; }
  /* two tabs side by side: the pillar name may take two lines ("Actueel houden") instead of being cut off */
  .hx-tab { gap: .6rem; padding: .8rem .85rem 1rem; }
  .hx-tab-text b { white-space: normal; font-size: 1rem; }
  .hx-tab-nr { width: 1.8rem; height: 1.8rem; font-size: .85rem; }
  .hx-panel { grid-template-columns: minmax(0, 1fr); }
  .hx-panel-screen .sp { font-size: clamp(.56rem, 2.1vw, .74rem); }
  .ha-proof-grid { grid-template-columns: minmax(0, 1fr); }
}
/* on a phone the picture becomes a plain stack: the article, then the three cards */
@media (max-width: 640px) {
  .hf-copy h1 { font-size: clamp(2rem, 9vw, 2.5rem); }
  .hf-stage { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: .8em; height: auto; margin: .5em 0 2.5em; padding: 1em; border-radius: 1.4em; background: var(--mist); font-size: 14px; }
  .hf-stage::before { display: none; }
  .hf-shot { position: static; grid-column: 1 / -1; height: 12em; border-radius: .9em; background-size: cover; animation: none; }
  .hf-doc, .hf-card { position: static; width: auto; box-shadow: 0 .3em .9em rgba(28, 28, 36, .1); }
  .hf-doc, .hf-ask { grid-column: 1 / -1; }
  .hf-second, .hf-tag { grid-column: 1 / -1; }
  .hf-film { position: static; display: contents; }
}
@media (prefers-reduced-motion: reduce) {
  .hf-hero *, .hf-hero *::after { animation: none !important; }
  .hf-chip-a { display: none; }
  .ha-js .ha-card { transition: none; }
  .ha-js .hx-panel.is-active { animation: none; }
}
