/* Home bento. Backgrounds are the five PLA colours only. Text is ink, ink-soft, or wit on zwart. */

.home {
  background: var(--c-pla-wit);
  color: var(--c-ink);
  --gen-line: var(--c-ink-soft);
  --gen-strong: var(--c-ink);
  --gen-ink: rgba(43, 36, 64, .28);
  --gen-surface: var(--c-pla-wit);
  --gen-text: var(--c-ink);
  --gen-muted: var(--c-ink-soft);
  --gen-font: 'Nunito', system-ui, sans-serif;
  --tig-line: var(--c-ink-soft);
  --tig-strong: var(--c-ink);
  --tig-ink: rgba(43, 36, 64, .55);
  --tig-surface: var(--c-pla-wit);
  --tig-text: var(--c-ink);
  --tig-muted: var(--c-ink-soft);
  --tig-font: 'Nunito', system-ui, sans-serif;
  --home-ease: cubic-bezier(.22, 1, .36, 1);
}

.home h1,
.home h2 {
  font-family: var(--font-serif);
  font-weight: 380;
  font-variation-settings: 'SOFT' 100, 'WONK' 0;
  letter-spacing: -0.02em;
  text-transform: none;
  margin: 0;
}
.home h1 em,
.home h2 em {
  font-style: italic;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
}
.home p { margin: 0; }

.home-wrap { max-width: 1392px; margin: 0 auto; padding: 0 24px; }

.home-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  padding: 8px 0 14px;
}
.home-hero h1 { font-size: 64px; line-height: 1; letter-spacing: -0.025em; }
.home-lead { max-width: 300px; color: var(--c-ink-soft); font-size: 16px; line-height: 1.45; margin: 0 0 6px; }

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 318px 318px;
  gap: 14px;
}
.bento-tile {
  position: relative;
  min-width: 0;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 24px;
  color: var(--c-ink);
}
.bento-tile--puzzle { grid-column: 1 / 3; grid-row: 1 / 3; background: var(--c-pla-roze); }
.bento-tile--ai {
  grid-column: 3 / 5;
  grid-row: 1;
  background: var(--c-pla-abrikoos);
  flex-direction: row;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px 22px;
}
.bento-tile--print { grid-column: 3; grid-row: 2; background: var(--c-pla-blauw); }
.bento-tile--design { grid-column: 4; grid-row: 2; background: var(--c-pla-zwart); }
.is-dark { color: var(--c-pla-wit); }
.is-dark .bento-kicker,
.is-dark .bento-sub,
.is-dark .bento-switch { color: color-mix(in srgb, var(--c-pla-wit) 86%, transparent); }

.bento-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: inherit;
}
.bento-tile--ai .bento-ai-copy,
.bento-tile--ai .bento-ai-art,
.bento-tile--design .bento-lamp,
.bento-tile--design .bento-meta,
.bento-tag { pointer-events: none; }

.bento-kicker { display: block; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--c-ink-soft); }
.bento-tile h2 { font-size: 36px; line-height: 1; letter-spacing: -0.02em; margin-top: 4px; }
.bento-tile--print h2,
.bento-tile--design h2 { font-size: 28px; }
.bento-sub { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.4; color: var(--c-ink-soft); max-width: 32ch; }
.bento-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; position: relative; z-index: 1; }
.bento-copy { min-width: 0; }
.bento-actions { display: flex; gap: 12px; align-items: center; flex: none; }
.bento-price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.bento-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-pla-zwart);
  color: var(--c-pla-wit);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex: none;
}
.is-dark .bento-arrow { background: var(--c-pla-wit); color: var(--c-ink); }
@media (prefers-reduced-motion: no-preference) {
  .bento-tile:hover .bento-arrow { transform: translateX(4px); }
}

.bento-tag {
  position: absolute;
  z-index: 3;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--c-ink);
  background: var(--c-pla-wit);
  border-radius: 999px;
  padding: 5px 10px;
  pointer-events: none;
}
.bento-tile--puzzle .bento-tag { top: 18px; right: 18px; }
.bento-tile--ai .bento-tag { bottom: 8px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.bento-tile--design > .bento-tag { top: 16px; left: 16px; }
.is-dark > .bento-tag {
  background: var(--c-pla-zwart);
  color: var(--c-pla-wit);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-pla-wit) 35%, transparent);
}
.bento-drop .bento-tag { position: absolute; bottom: 10px; right: 10px; top: auto; left: auto; opacity: 0; }
.bento-drop .bento-tag.is-in { opacity: 1; }

.bento-stage { position: absolute; inset: 36px 24px 118px; display: grid; place-items: center; }
.bento-stage img { width: min(92%, 640px); height: auto; }

.bento-seg {
  display: inline-flex;
  background: color-mix(in srgb, var(--c-pla-wit) 70%, transparent);
  border-radius: 999px;
  padding: 4px;
  font-size: 13px;
  font-weight: 700;
  position: relative;
}
.bento-seg b {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--c-pla-wit);
  transition: transform 450ms var(--home-ease);
}
.bento-seg span { position: relative; padding: 7px 14px; min-width: 52px; text-align: center; }
.bento-seg.is-los b { transform: translateX(100%); }

.bento-ai-copy { flex: 1.5; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.bento-ai-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bento-ai-art { flex: .85; position: relative; display: grid; place-items: end center; min-width: 0; align-self: stretch; }
.bento-ai-art img { width: 100%; height: auto; opacity: 0; }
.bento-ai-art img.is-in { opacity: 1; }
.bento-live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--c-ink); white-space: nowrap; }
.bento-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-pla-zwart); }
.bento-ex { font-size: 12px; font-weight: 700; color: var(--c-ink-soft); margin: 0 0 4px 4px; }
.bento-prompt {
  background: var(--c-pla-wit);
  border-radius: 20px;
  padding: 10px 10px 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 0 rgba(43, 36, 64, .06), 0 12px 30px -18px rgba(43, 36, 64, .35);
}
.bento-prompt-text { flex: 1; font-size: 15px; min-height: 22px; color: var(--c-ink); }
.bento-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--c-pla-zwart);
  vertical-align: -2px;
  margin-left: 1px;
  animation: bento-blink 1s steps(1) infinite;
}
@keyframes bento-blink { 50% { opacity: 0; } }
.bento-go, .bento-attach {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}
.bento-go { background: var(--c-pla-zwart); color: var(--c-pla-wit); font-size: 18px; }
.bento-attach { box-shadow: inset 0 0 0 1.5px rgba(43, 36, 64, .12); color: var(--c-ink-soft); }

.bento-steps { list-style: none; display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 0 4px; padding: 0; min-height: 20px; }
.bento-steps li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 400ms var(--home-ease), transform 400ms var(--home-ease);
}
.bento-steps li.is-on { opacity: 1; transform: none; }
.bento-dot { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--c-ink-soft); flex: none; position: relative; }
.bento-steps li.is-done .bento-dot { box-shadow: none; }
.bento-check { width: 20px; height: 20px; position: absolute; inset: 0; transform: scale(.4); opacity: 0; }
.bento-check circle { fill: var(--c-pla-zwart); }
.bento-check path { fill: none; stroke: var(--c-pla-wit); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bento-steps li.is-done .bento-check { transform: none; opacity: 1; }
.bento-step-label.is-think {
  background: linear-gradient(90deg, var(--c-ink-soft) 0%, var(--c-ink-soft) 40%, var(--c-ink) 50%, var(--c-ink-soft) 60%, var(--c-ink-soft) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: bento-think 1.6s linear infinite;
}
@keyframes bento-think { from { background-position: 100% 0; } to { background-position: -150% 0; } }

.bento-drop {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  bottom: 136px;
  border-radius: 18px;
  border: 1.5px dashed rgba(43, 36, 64, .45);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.bento-hint { text-align: center; font-size: 13.5px; font-weight: 700; color: var(--c-ink-soft); transition: opacity 300ms; }
.bento-hint b { display: block; font-family: var(--font-serif); font-weight: 380; font-variation-settings: 'SOFT' 100, 'WONK' 0; font-size: 26px; color: var(--c-ink); }
.bento-chip {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  background: var(--c-pla-wit);
  color: var(--c-ink);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  transform: translateY(-60px);
  opacity: 0;
  transition: transform 700ms cubic-bezier(.34, 1.4, .64, 1), opacity 300ms;
}
.bento-chip.is-in { transform: none; opacity: 1; }
.bento-drop img { position: absolute; height: 88%; width: auto; bottom: 4%; left: 50%; transform: translateX(-50%); opacity: 0; }
.bento-drop img.is-in { opacity: 1; }
.bento-drop.has-file { border-color: transparent; }
.bento-drop.has-file .bento-hint { opacity: 0; }

.bento-lamp { position: absolute; inset: 48px 8px 148px; display: grid; place-items: center; }
.bento-lamp img { position: absolute; height: 100%; width: auto; }
.bento-lit { opacity: 0; mix-blend-mode: screen; }
.bento-tile--design.is-on .bento-lit { opacity: 1; }
.bento-tile--design.is-on .bento-iso { opacity: 0; }
.bento-switch {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  color: color-mix(in srgb, var(--c-pla-wit) 86%, transparent);
}
.bento-switch i {
  width: 38px;
  height: 22px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--c-pla-wit) 25%, transparent);
  position: relative;
}
.bento-switch i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c-pla-wit);
}
.bento-tile--design.is-on .bento-switch i { background: var(--c-pla-abrikoos); }
.bento-tile--design.is-on .bento-switch i::after { transform: translateX(16px); }

.home-facts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 4px 0;
  color: var(--c-ink-soft);
  font-size: 15px;
  line-height: 1.35;
}
.home-facts-more { display: flex; gap: 24px; }

dialog.home-view {
  border: 0;
  padding: 0;
  background: var(--c-pla-abrikoos);
  color: var(--c-ink);
}
dialog.home-view--design { background: var(--c-pla-zwart); color: var(--c-pla-wit); }
dialog.home-view[open] {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
dialog.home-view::backdrop { background: transparent; }
.home-view-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--c-pla-wit);
  color: var(--c-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.home-view-stage { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; position: relative; padding: 56px 24px 12px; overflow: hidden; }
.home-view-stage img { max-width: min(720px, 92%); max-height: calc(100vh - 280px); width: auto; height: auto; object-fit: contain; }
.home-view-stage .bento-tag { left: 24px; bottom: 12px; top: auto; right: auto; transform: none; }
.home-view--design .home-view-stage .bento-tag {
  background: var(--c-pla-zwart);
  color: var(--c-pla-wit);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-pla-wit) 35%, transparent);
}
.home-view-bar {
  flex: none;
  position: relative;
  z-index: 2;
  margin: 0 auto 24px;
  width: min(760px, calc(100% - 32px));
  background: var(--c-pla-wit);
  color: var(--c-ink);
  border-radius: 28px;
  padding: 16px 18px 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.home-view-bar p { margin: 0; font-size: 16px; line-height: 1.4; color: var(--c-ink); }
.home-soon {
  flex: none;
  background: var(--c-pla-abrikoos);
  color: var(--c-ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
}

/* First paint with motion: the HTML is the end state, hidden until the tile runs. */
html.home-motion .bento-whale { opacity: 0; }
html.home-motion .bento-tile--ai.is-run .bento-whale.is-in { opacity: 1; }
html.home-motion .bento-prompt-text { color: transparent; }
html.home-motion .bento-tile--ai.is-run .bento-prompt-text { color: var(--c-ink); }
html.home-motion .bento-steps li { opacity: 0; transform: translateY(6px); }
html.home-motion .bento-tile--ai.is-run .bento-steps li.is-on { opacity: 1; transform: none; }
html.home-motion .bento-drop.has-file { border-color: rgba(43, 36, 64, .45); }
html.home-motion .bento-drop.has-file .bento-hint { opacity: 1; }
html.home-motion .bento-chip { opacity: 0; transform: translateY(-60px); }
html.home-motion .bento-vase,
html.home-motion .bento-drop .bento-tag { opacity: 0; }
html.home-motion .bento-tile--print.is-run .bento-drop.has-file { border-color: transparent; }
html.home-motion .bento-tile--print.is-run .bento-drop.has-file .bento-hint { opacity: 0; }
html.home-motion .bento-tile--print.is-run .bento-chip.is-in { opacity: 1; transform: none; }
html.home-motion .bento-tile--print.is-run .bento-vase.is-in,
html.home-motion .bento-tile--print.is-run .bento-drop .bento-tag.is-in { opacity: 1; }
html.home-motion .bento-lit { opacity: 0; }
html.home-motion .bento-iso { opacity: 1; }
html.home-motion .bento-tile--design.is-on .bento-switch i { background: color-mix(in srgb, var(--c-pla-wit) 25%, transparent); }
html.home-motion .bento-tile--design.is-on .bento-switch i::after { transform: none; }
html.home-motion .bento-tile--design.is-run.is-on .bento-lit { opacity: 1; }
html.home-motion .bento-tile--design.is-run.is-on .bento-iso { opacity: 0; }
html.home-motion .bento-tile--design.is-run.is-on .bento-switch i { background: var(--c-pla-abrikoos); }
html.home-motion .bento-tile--design.is-run.is-on .bento-switch i::after { transform: translateX(16px); }

@media (max-width: 1100px) {
  .home-hero h1 { font-size: 56px; }
}
@media (max-width: 700px) {
  .home-wrap { padding: 0 14px; }
  .home-hero { grid-template-columns: 1fr; gap: 12px; padding: 8px 0 16px; }
  .home-hero h1 { font-size: 46px; }
  .bento { grid-template-columns: 1fr; grid-template-rows: none; gap: 12px; }
  .bento-tile { grid-column: auto; grid-row: auto; padding: 20px; }
  .bento-tile--puzzle { min-height: 480px; }
  .bento-tile--puzzle .bento-stage { inset: 40px 12px 200px; }
  .bento-tile--ai { flex-direction: column; min-height: 520px; }
  .bento-ai-art { min-height: 180px; width: 100%; }
  .bento-tile--print,
  .bento-tile--design { min-height: 360px; }
  .bento-tile h2,
  .bento-tile--print h2,
  .bento-tile--design h2 { font-size: 34px; }
  .bento-tile--puzzle .bento-meta { flex-direction: column; align-items: flex-start; }
  .bento-actions { flex-wrap: wrap; }
  .home-facts { flex-direction: column; align-items: flex-start; gap: 10px; }
  .home-facts-more { flex-direction: column; align-items: flex-start; gap: 8px; }
  .home-view-bar { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html.home-motion .bento-whale.is-in { opacity: 1; }
  html.home-motion .bento-prompt-text { color: var(--c-ink); }
  html.home-motion .bento-steps li.is-on { opacity: 1; transform: none; }
  html.home-motion .bento-drop.has-file { border-color: transparent; }
  html.home-motion .bento-drop.has-file .bento-hint { opacity: 0; }
  html.home-motion .bento-chip.is-in { opacity: 1; transform: none; }
  html.home-motion .bento-vase.is-in,
  html.home-motion .bento-drop .bento-tag.is-in { opacity: 1; }
  html.home-motion .bento-tile--design.is-on .bento-lit { opacity: 1; }
  html.home-motion .bento-tile--design.is-on .bento-iso { opacity: 0; }
  html.home-motion .bento-tile--design.is-on .bento-switch i { background: var(--c-pla-abrikoos); }
  html.home-motion .bento-tile--design.is-on .bento-switch i::after { transform: translateX(16px); }
  .bento-step-label.is-think { animation: none; color: var(--c-ink-soft); background: none; }
  .bento-caret { animation: none; }
}
