/* Huize — demo-app (pagina "Probeer de app") */
.demo-page { padding: 48px 0 80px; }
.demo-page__inner { display: grid; grid-template-columns: 1fr 400px; gap: 56px; align-items: center; }
.demo-page h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }

/* Telefoon */
.dphone { width: 400px; height: 820px; padding: 12px; background: #000; border: 1px solid #333; border-radius: 56px; box-shadow: 0 40px 90px rgba(0,0,0,.6), inset 0 0 0 2px #1a1b1e; }
.dphone__screen { position: relative; height: 100%; border-radius: 45px; overflow: hidden; background: #0f1113; display: flex; flex-direction: column; font-family: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, Arial, sans-serif; color: #f1efea; }
.dphone__island { position: absolute; top: 11px; left: 50%; width: 120px; height: 34px; transform: translateX(-50%); background: #000; border-radius: 20px; z-index: 6; }
.app__status { display: flex; justify-content: space-between; padding: 16px 30px 0; height: 50px; font-size: .86rem; font-weight: 600; flex: none; }
.app__banner { position: absolute; top: 52px; left: 10px; right: 10px; z-index: 7; pointer-events: none; transform: translateY(-160%); }
.app__banner.in { transform: none; }
.app__views { flex: 1; overflow: hidden; position: relative; }
.app__views::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; background: linear-gradient(transparent, #0f1113); pointer-events: none; z-index: 2; }
.app__view { position: absolute; inset: 0; overflow-y: auto; padding: 6px 16px 20px; scrollbar-width: none; }
.app__view::-webkit-scrollbar { display: none; }
.app__view.is-active { animation: viewIn .25s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.app__head { display: flex; justify-content: space-between; align-items: flex-end; margin: 6px 0 14px; }
.app__head small { color: #9b978f; font-size: .76rem; letter-spacing: .12em; font-weight: 600; }
.app__head h2 { margin: 2px 0 0; font-size: 1.7rem; letter-spacing: -.02em; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #2e3237; background: #181a1e; border-radius: 999px; padding: 6px 11px; font-size: .78rem; color: #d9d5cd; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: #4fd18b; }
.app__h { display: flex; justify-content: space-between; align-items: center; font-size: .95rem; margin: 18px 2px 8px; }
.link-btn { background: none; border: 0; color: #dcb676; font: 600 .85rem inherit; cursor: pointer; padding: 4px; }

.card { background: #181b1f; border: 1px solid #262a2f; border-radius: 18px; padding: 14px; margin-bottom: 10px; }
.card small { color: #9b978f; font-size: .76rem; letter-spacing: .08em; }
.card em { font-style: normal; color: #9b978f; font-size: .78rem; display: block; }
.c-sun { color: #e9b866; } .c-blue { color: #6db3ff; } .c-green { color: #4fd18b; }
.bg-sun { background: #d9b17a; } .bg-blue { background: #5fa8f5; }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { min-height: 76px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: #181b1f; border: 1px solid #262a2f; border-radius: 16px; padding: 12px 4px 10px; color: #f1efea; font: inherit; cursor: pointer; }
.stat svg { width: 22px; height: 22px; fill: none; stroke: #4fd18b; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat small { font-size: .68rem; letter-spacing: .1em; color: #9b978f; }
.stat b { font-size: .9rem; color: #4fd18b; }
.stat.is-off svg, .stat.is-off b { color: #9b978f; stroke: #9b978f; }
.stat.is-warn svg { stroke: #e9b866; } .stat.is-warn b { color: #e9b866; }

.row4 { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; cursor: pointer; }
.row4 b { display: block; font-size: 1.05rem; font-weight: 500; margin-top: 2px; }
.row4 small { font-size: .68rem; }

.pcard { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.pcard__lbl { display: flex; align-items: center; gap: 6px; color: #9b978f; font-size: .72rem; letter-spacing: .1em; margin-bottom: 4px; white-space: nowrap; }
.pcard__lbl .tag { margin: 0; letter-spacing: 0; font-size: .66rem; }
.pcard__v { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.pcard__v b { font-size: 1.6rem; font-weight: 500; }
.pcard__v span { color: #9b978f; font-size: .78rem; }
.pcard__r { display: flex; flex-direction: column; align-items: flex-end; }
.pcard__r b { font-size: .95rem; font-weight: 700; white-space: nowrap; padding-bottom: 3px; }
.tag { display: inline-block; font-size: .7rem; border-radius: 999px; padding: 2px 8px; margin-bottom: 4px; }
.tag--warn { color: #e9b866; background: rgba(233,184,102,.12); }

.line { display: flex; align-items: center; gap: 12px; }
.line > div { flex: 1; }
.line b { display: block; font-size: .95rem; }
.ico { width: 38px; height: 38px; display: grid; place-items: center; background: #24272c; border-radius: 12px; flex: none; }
.ico--round { border-radius: 50%; }
.ico svg { width: 19px; height: 19px; fill: none; stroke: #dcb676; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini { min-height: 44px; min-width: 56px; background: #24272c; color: #f1efea; border: 1px solid #33373d; border-radius: 10px; padding: 7px 12px; font: 600 .8rem inherit; cursor: pointer; }

/* Lijsten met schakelaars */
.list { background: #181b1f; border: 1px solid #262a2f; border-radius: 18px; overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #23272c; }
.item:last-child { border-bottom: 0; }
.item > div { flex: 1; }
.item b { display: block; font-size: .95rem; font-weight: 600; }
.item small { color: #9b978f; font-size: .84rem; letter-spacing: 0; }
.item .ico svg { stroke: #6b6f76; }
.item.is-on .ico { background: rgba(231,192,127,.16); }
.item.is-on .ico svg { stroke: #dcb676; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 999px; border: 0; background: #3a3e44; cursor: pointer; flex: none; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch[aria-checked="true"] { background: #34c759; }
.switch[aria-checked="true"] i { transform: translateX(20px); }

.screens__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button { min-height: 46px; background: #24272c; color: #f1efea; border: 1px solid #33373d; border-radius: 12px; padding: 11px 4px; font: 600 .86rem inherit; cursor: pointer; }
.seg button.is-on { background: rgba(231,192,127,.16); border-color: rgba(231,192,127,.5); color: #dcb676; }
.bar { height: 6px; background: #2b2f34; border-radius: 3px; margin: 12px 0 6px; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w, 0%); background: #d9b17a; border-radius: 3px; transition: width .8s ease; }

/* Klimaat */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.room { background: #181b1f; border: 1px solid #262a2f; border-radius: 18px; padding: 12px; }
.room__top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.room__top .ico { width: 32px; height: 32px; }
.room__top b { display: block; font-size: .9rem; }
.room__top small { color: #9b978f; font-size: .8rem; letter-spacing: 0; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: #202328; border-radius: 12px; }
.stepper button { width: 46px; height: 46px; background: none; border: 0; color: #f1efea; font-size: 1.2rem; cursor: pointer; }
.stepper b { font-size: .98rem; }
.air { display: flex; justify-content: space-between; align-items: center; }
.air b { display: block; font-size: 2rem; font-weight: 500; }
.air b em { display: inline; font-size: .8rem; }
.air span { font-size: .8rem; }
.fan { width: 42px; height: 42px; fill: #5fa8f5; animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.smart { border-color: rgba(95,168,245,.45); }
.smart__top, .acc__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.smart > b { display: block; font-size: .92rem; margin-bottom: 6px; }
.smart.is-off > b { color: #9b978f; }
.cmp { display: grid; grid-template-columns: 58px 1fr 52px; align-items: center; gap: 8px; margin-top: 8px; font-size: .82rem; }
.cmp i { height: 8px; background: #2b2f34; border-radius: 4px; overflow: hidden; }
.cmp em { display: block; height: 100%; width: var(--w, 0%); border-radius: 4px; }
.cmp b { text-align: right; }

/* Energie */
.flow { padding: 10px 10px 6px; }
.flowsvg { display: block; width: 100%; height: auto; }
.fl { fill: none; stroke: #2c3036; stroke-width: 2; }
.fl.on { stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; animation: dash .9s linear infinite; }
.fl[data-line="bat-home"].on { stroke: #5fa8f5; }
.fl[data-line="grid-home"].on { stroke: #a9afb6; }
.fl[data-line="sun-home"].on, .fl[data-line="sun-bat"].on { stroke: #e9b866; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.fnode circle { fill: #15171a; stroke-width: 3; }
.fnode--sun circle { stroke: #e9b866; } .fnode--grid circle { stroke: #8d939a; } .fnode--home circle { stroke: #c9cdd2; } .fnode--bat circle { stroke: #5fa8f5; }
.fnode text { text-anchor: middle; fill: #f1efea; font-family: -apple-system, system-ui, sans-serif; }
.fnode .fs { font-size: 11px; fill: #b9b5ad; }
.fnode .fv { font-size: 15px; font-weight: 700; }
.flow__legend { margin: 4px 6px 4px; text-align: center; color: #b9b5ad; font-size: .8rem; }
.acc__big { display: block; font-size: 1.7rem; font-weight: 500; margin-bottom: 8px; }
.acc__big em { display: inline; font-size: .8rem; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid #23272c; font-size: .88rem; }
.kv span { color: #b9b5ad; }
.pbars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 90px; }
.pbars i { display: block; background: #3a3e44; border-radius: 2px 2px 0 0; }
.pbars i.cheap { background: #4fd18b; }
.pbars i.dear { background: #d9b17a; }
.pbars i.now { outline: 2px solid #fff; outline-offset: 1px; }
.pbars__axis { display: flex; justify-content: space-between; color: #9b978f; font-size: .66rem; margin-top: 4px; }
.car > b { display: block; font-size: .98rem; }
.car.is-off > b { color: #9b978f; }

/* Onderste menu */
.app__nav { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px 22px; border-top: 1px solid #23272c; background: rgba(15,17,19,.96); }
.app__nav button { min-height: 50px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; color: #8d8a83; font: 500 .8rem inherit; cursor: pointer; padding: 4px 0; }
.app__nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app__nav button.is-active { color: #dcb676; }

.dphone button:focus-visible, .dphone [tabindex]:focus-visible { outline: 2px solid #dcb676; outline-offset: 2px; }

@media (max-width: 980px) {
  .demo-page__inner { grid-template-columns: 1fr; gap: 32px; justify-items: center; }
  .demo-page__text { max-width: 560px; }
}
.dphone { position: relative; }
.dphone__open, .dphone__close { display: none; }

@media (max-width: 760px) {
  .demo-page { padding-top: 28px; }
  /* Op de telefoon: eerst een voorbeeld met een knop, de app opent op het hele scherm */
  .dphone { width: 100%; max-width: 400px; height: 560px; border-radius: 48px; padding: 9px; }
  .dphone__screen { border-radius: 40px; }
  .dphone:not(.is-open) .dphone__screen { pointer-events: none; }
  .dphone:not(.is-open)::after { content: ""; position: absolute; inset: 9px; border-radius: 40px; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.75)); pointer-events: none; }
  .dphone__open { display: inline-flex; align-items: center; gap: 10px; position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); z-index: 9; background: var(--gold); color: #1b1407; border: 0; border-radius: 14px; padding: 16px 26px; font: 700 1.1rem var(--font); box-shadow: 0 12px 30px rgba(0,0,0,.5); cursor: pointer; white-space: nowrap; }
  .dphone.is-open { position: fixed; inset: 0; z-index: 200; width: 100%; max-width: none; height: 100%; height: 100dvh; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: #0f1113; }
  .dphone.is-open .dphone__screen { border-radius: 0; }
  .dphone.is-open .dphone__open { display: none; }
  .dphone.is-open .dphone__island, .dphone.is-open .app__status { display: none; }
  .dphone.is-open .app__views { padding-top: env(safe-area-inset-top); }
  .dphone.is-open .app__view { padding-top: 56px; }
  .dphone.is-open .app__nav { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .dphone.is-open .app__banner { top: calc(58px + env(safe-area-inset-top)); }
  .dphone.is-open .dphone__close { display: block; position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 210; background: rgba(40,43,48,.95); color: #fff; border: 1px solid #3a3e44; border-radius: 999px; padding: 9px 16px; font: 700 .95rem var(--font); cursor: pointer; }
}
html.demo-open, html.demo-open body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .fan, .fl { animation: none !important; }
}
