:root {
  --bg: #070707;
  --panel: #0c0c0b;
  --n8n: #171717;
  --fg: #e8e6e1;
  --muted: #9a968d;
  --muted-m: #b9b5ac;
  --label: #77736b;
  --dim1: #5f5c55;
  --dim2: #4a4843;
  --disabled: #3a3935;
  --border: #2a2926;
  --panel-border: #1d1c1a;
  --red: #e0334a;
  --green: #3fbf73;
  --amber: #e2b04a;
  --ios-grey: #8e8e93;
  --gutter: clamp(20px, 4vw, 48px);
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Archivo', sans-serif;
  --plex: 'IBM Plex Sans', sans-serif;
  --sf: -apple-system, 'SF Pro Text', 'IBM Plex Sans', system-ui, sans-serif;
  --ease-io: cubic-bezier(.6, 0, .2, 1);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}
@supports (color: oklch(0 0 0)) {
  :root {
    --red: oklch(0.62 0.2 15);
    --green: oklch(0.74 0.15 150);
    --amber: oklch(0.8 0.13 80);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }
body { font-family: var(--sans); min-width: 320px; }
a { color: var(--fg); text-decoration: none; cursor: pointer; }
a:hover { color: var(--red); }
::selection { background: var(--red); color: var(--bg); }
button { font: inherit; color: inherit; background: transparent; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; }
p, h1 { margin: 0; }
h1 { font-size: inherit; font-weight: inherit; }

/* ---------- chrome ---------- */
.trans { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 60; pointer-events: none; display: block; }

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap;
  padding: 22px var(--gutter) 28px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .03em;
  background: linear-gradient(#070707 0%, rgba(7, 7, 7, .85) 60%, rgba(7, 7, 7, 0) 100%);
}
.logo { font-family: var(--sans); font-weight: 700; font-size: 22px; letter-spacing: -.03em; color: var(--fg); padding-bottom: 4px; }
.logo:hover { color: var(--fg); }
.logo .br { color: var(--dim1); }
.logo .err {
  color: var(--red);
  text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: var(--red);
  text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-skip-ink: none;
}
.nav { display: flex; gap: clamp(14px, 2.6vw, 32px); flex-wrap: wrap; }
.nav a { color: var(--fg); transition: color .2s; }
.nav a.on, .nav a:hover { color: var(--red); }
.mob .nav { display: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: none; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  background: rgba(12, 12, 12, .8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  border-top: .33px solid rgba(255, 255, 255, .12);
}
.mob .tabbar { display: grid; }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 49px;
  color: var(--ios-grey); font-family: var(--sf); font-size: 10px; font-weight: 500; letter-spacing: .01em;
  transition: color .2s; -webkit-tap-highlight-color: transparent;
}
.tab.on { color: var(--red); }

.u-link {
  color: var(--fg); padding-bottom: 3px;
  background-image: linear-gradient(var(--fg), var(--fg)); background-repeat: no-repeat;
  background-position: 0 100%; background-size: 0% 1px;
  transition: background-size .4s var(--ease-io);
}
.u-link:hover { background-size: 100% 1px; color: var(--fg); }

.foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--mono); font-size: 12px; color: var(--label);
}
.foot .u-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mob .foot { bottom: 82px; }

.field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

/* ---------- desktop page frame ---------- */
.page { position: relative; height: 100vh; height: 100dvh; min-height: 520px; overflow: hidden; }
.inner {
  position: absolute; top: 76px; left: var(--gutter); right: var(--gutter); bottom: 48px;
  display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 18px);
}
.title-row { flex: none; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; column-gap: 32px; row-gap: 8px; }
.title { font-family: var(--sans); font-weight: 800; font-size: clamp(40px, 4.6vw, 72px); line-height: .95; letter-spacing: -.045em; color: var(--fg); min-height: 1em; }
.title.wide { min-width: 8ch; }
.lead { font-family: var(--mono); font-weight: 400; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.2; letter-spacing: -.01em; color: var(--fg); text-wrap: balance; }
.copy { font-family: var(--plex); font-weight: 400; font-size: clamp(14px, 1vw, 15px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.copy.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.cta { font-family: var(--mono); font-size: 14px; line-height: 1; white-space: nowrap; color: var(--fg); transition: color .2s; }
.cta:hover { color: var(--red); }
.cta-row { flex: none; height: 28px; margin-top: 4px; display: flex; align-items: center; }

.sel { display: flex; align-items: center; white-space: nowrap; font-family: var(--mono); font-size: 13px; }
.sel-btn { display: flex; gap: 8px; align-items: baseline; font-family: var(--mono); font-size: 13px; color: var(--label); transition: color .2s; }
.sel-btn:hover, .sel-btn.on { color: var(--fg); }
.sel-btn .n { font-size: 11px; flex: none; color: var(--dim2); }
.sel-btn.on .n { color: var(--red); }
.sel .visit { flex: none; margin-left: auto; }

/* ---------- landing ---------- */
.hero { min-height: 420px; cursor: crosshair; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.hero-line {
  position: absolute; left: var(--gutter); bottom: clamp(52px, 7vh, 80px);
  font-family: var(--mono); font-weight: 500; font-size: clamp(18px, 2.6vw, 36px); line-height: 1; letter-spacing: -.01em;
  white-space: nowrap; color: var(--dim2); pointer-events: none;
}
.mob .hero-line { bottom: 164px; }
.hero .foot { pointer-events: none; }
.hero .foot a { pointer-events: auto; }

/* ---------- websites (desktop) ---------- */
.cq { flex: 1; min-height: 0; container-type: size; display: flex; align-items: center; justify-content: center; }
.web-stage { position: relative; width: min(100cqw, 100cqh * 1.4545); aspect-ratio: 16 / 11; container-type: inline-size; }
.web-layer {
  position: absolute; inset: 0; opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .6s ease, transform .6s var(--ease-out);
}
.web-layer.on { opacity: 1; transform: none; pointer-events: auto; }
.browser {
  position: absolute; left: 0; top: 0; width: 84%; aspect-ratio: 16 / 10;
  display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); overflow: hidden;
}
.browser-bar { height: 24px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--panel-border); }
.browser-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.browser-bar span { margin-left: 14px; font-family: var(--mono); font-size: 10px; color: var(--dim1); }
.browser-view { position: relative; flex: 1; overflow: hidden; }
.fit-frame { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; }
.browser-view .fit-frame { background: #fff; }
.phone-slot { position: absolute; right: 0; bottom: 0; width: 23%; aspect-ratio: 426 / 898; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .7)); }
.web-row { position: absolute; left: 0; width: calc(77% - 16px); height: 28px; }
.web-row.sel-row { top: calc(52.5cqw + 14px); gap: clamp(12px, 1.4vw, 24px); }
.web-row.sel-row .sel-btn { padding: 6px 0; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.web-row.sel-row .sel-btn span:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.web-row.cta-line { top: calc(52.5cqw + 46px); display: flex; align-items: center; }
.media-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.slot-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--dim1); background: var(--panel);
}

/* ---------- iPhone mock ---------- */
.phone { position: absolute; top: 0; left: 0; width: 426px; height: 898px; transform-origin: 0 0; }
.phone .btn { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #4a4a4d, #2a2a2c); }
.phone .bezel { position: absolute; inset: 0; border-radius: 68px; padding: 3px; background: linear-gradient(145deg, #5a5a5e 0%, #2c2c2e 30%, #1b1b1d 60%, #3d3d40 100%); }
.phone .black { width: 100%; height: 100%; border-radius: 65px; background: #000; padding: 9px; }
.phone .screen { position: relative; width: 402px; height: 874px; border-radius: 56px; overflow: hidden; background: #000; }
.phone .screen { background: var(--phone-bg, #000); }
.phone .main-frame { position: absolute; top: 50px; left: 0; width: 402px; height: 826px; border: 0; background: transparent; z-index: 2; }
.phone .status {
  position: absolute; top: 0; left: 0; right: 0; height: 50px; z-index: 4; pointer-events: none; color: #fff;
  background: var(--phone-bg, #000);
  display: flex; align-items: center; justify-content: space-between; padding: 4px 30px 0 44px;
}
.phone .status .time { font-family: var(--sf); font-weight: 600; font-size: 17px; letter-spacing: -.2px; }
.phone .status .icons { display: flex; align-items: center; gap: 6px; }
.phone .island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 126px; height: 37px; border-radius: 24px; background: #000; z-index: 5; pointer-events: none; }
.phone .island i { position: absolute; right: 22px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2a2d45 0%, #0c0c14 60%); }
.phone .home { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 139px; height: 5px; border-radius: 100px; background: rgba(255, 255, 255, .7); z-index: 5; pointer-events: none; }
.phone .slot-empty { font-size: 22px; }

/* ---------- systems + maintenance (desktop) ---------- */
.stack { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.stack-cq { flex: 1; min-height: 0; width: 100%; container-type: size; display: flex; align-items: flex-end; justify-content: center; }
.sys-outer { position: relative; width: min(100cqw, 100cqh * 1.6); aspect-ratio: 16 / 10; }
.sys-stage { position: absolute; inset: 0; border: 1px solid var(--panel-border); border-radius: 10px; overflow: hidden; background: var(--panel); }
.sys-layer { position: absolute; inset: 0; background: var(--panel); opacity: 0; pointer-events: none; z-index: 1; transition: opacity .45s var(--ease-io); }
.sys-layer.on { opacity: 1; pointer-events: auto; z-index: 2; }
.sys-layer.n8n { background: var(--n8n); }
.sys-layer .fit-frame { background: transparent; z-index: 1; }
.blocked {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--dim1);
}
.blocked span:last-child { color: var(--fg); }
.below { flex: none; max-width: 100%; display: flex; flex-direction: column; gap: 8px; }
.below .sel { min-height: 28px; flex-wrap: wrap; column-gap: clamp(12px, 1.6vw, 28px); }
.below .sel-btn { padding: 4px 0; }

.n8n-host { position: absolute; inset: 0; display: block; width: 100%; height: 100%; background: var(--n8n); }
.n8n-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.n8n-live { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .6s var(--ease-io); }
.n8n-live.ready { opacity: 1; pointer-events: auto; }
.n8n-live n8n-demo { display: block; width: 100%; height: 100%; }

.term-panel {
  width: min(100cqw, 100cqh * 1.6); aspect-ratio: 16 / 10;
  display: flex; flex-direction: column; border: 1px solid var(--panel-border); border-radius: 10px; overflow: hidden; background: var(--panel);
}
.term-head {
  flex: none; height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px;
  border-bottom: 1px solid var(--panel-border); font-family: var(--mono); font-size: 12px; white-space: nowrap;
}
.term-head .l { display: flex; align-items: center; gap: 10px; color: var(--fg); overflow: hidden; }
.term-head .l span:first-child { color: var(--red); }
.term-head .l span:last-child { overflow: hidden; text-overflow: ellipsis; }
.term-head button { color: var(--label); transition: color .2s; }
.term-head button:hover { color: var(--red); }
.term-body {
  flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px 24px; font-family: var(--mono); font-size: clamp(12px, 1vw, 14px); line-height: 1.75; white-space: pre;
}
.term-line { display: flex; min-height: 1.75em; }
.term-cursor { display: inline-block; width: .6em; height: 1.15em; margin-top: .3em; background: var(--fg); }

/* ---------- mobile pages ---------- */
.mpage {
  position: relative; height: 100vh; height: 100dvh; min-height: 620px;
  padding: 84px 20px calc(76px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px; overflow: hidden;
}
.mpage > :not(.field) { position: relative; }
.m-head { display: flex; flex-direction: column; gap: 8px; }
.m-title { font-family: var(--sans); font-weight: 800; font-size: 40px; line-height: .95; letter-spacing: -.045em; color: var(--fg); min-height: 1em; }
.m-lead { font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--label); }
.m-mid { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.m-bottom { flex: none; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.m-copy { font-family: var(--plex); font-size: 14px; line-height: 1.5; color: var(--muted-m); text-wrap: pretty; }
.m-cta { display: flex; align-items: center; justify-content: center; height: 28px; }
.m-panel { position: relative; flex: 1; min-height: 0; border: 1px solid var(--panel-border); border-radius: 14px; overflow: hidden; background: var(--panel); }
.m-panel.n8n { background: var(--n8n); }
.m-badge {
  position: absolute; bottom: 12px; left: 12px; z-index: 2; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 999px;
  background: rgba(7, 7, 7, .85); font-family: var(--mono); font-size: 11px; color: var(--fg);
}
.m-badge span:first-child { color: var(--red); }
.m-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; z-index: 1; }
.m-links { display: flex; justify-content: center; gap: 22px; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.m-phone-cq { flex: 1; min-height: 0; container-type: size; display: flex; align-items: center; justify-content: center; }
.m-phone { position: relative; width: min(100cqw, 100cqh * .4744); aspect-ratio: 426 / 898; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .7)); }
.m-phone-layer { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.m-phone-layer.on { opacity: 1; pointer-events: auto; }
.m-sel { flex: none; justify-content: center; flex-wrap: wrap; column-gap: 16px; font-size: 12px; }
.m-sel .sel-btn { padding: 8px 0; }
.m-sel-stack { flex: none; display: flex; flex-direction: column; gap: 0; }
.m-sel-stack .m-sel .sel-btn { padding: 6px 0; }
.m-term { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; padding: 22px 20px; font-family: var(--mono); font-size: 12px; line-height: 1.8; white-space: pre; }
.m-restart {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(7, 7, 7, .85); color: var(--label);
  font-family: var(--mono); font-size: 15px; display: flex; align-items: center; justify-content: center;
}

/* ---------- start a project ---------- */
.contact { min-height: 560px; }
.reset {
  position: absolute; z-index: 5; top: clamp(88px, 12vh, 120px); right: var(--gutter); width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--label); font-family: var(--mono); font-size: 28px; font-weight: 400; line-height: 1;
  transition: color .25s, transform .4s var(--ease-io);
}
.reset:hover { color: var(--red); transform: rotate(90deg); }
.reset[hidden] { display: none; }
.mob .reset { top: 26px; }
.c-wrap {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 96px var(--gutter) 72px; pointer-events: none;
}
.mob .c-wrap { padding-bottom: 110px; }
.c-col { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(24px, 4vh, 40px); width: 100%; max-width: 820px; pointer-events: auto; }
.c-q { font-family: var(--mono); font-weight: 500; font-size: clamp(28px, 4.6vw, 68px); line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; color: var(--dim2); min-height: 1.05em; }
.c-step { display: contents; }
.chips { display: flex; flex-direction: column; align-items: center; gap: 0; font-family: var(--mono); font-weight: 400; font-size: clamp(20px, 2.4vw, 32px); letter-spacing: -.02em; }
.mob .chips { gap: 10px; font-size: 15px; }
.chip-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 0; }
.mob .chip-row { flex-wrap: nowrap; }
.chip-item { display: flex; align-items: baseline; }
.chip {
  font: inherit; letter-spacing: inherit; padding: 4px 0; color: var(--fg);
  text-decoration-thickness: 2px; text-underline-offset: 9px; text-decoration-skip-ink: none; transition: color .25s;
}
.chips.picked .chip { color: var(--dim1); }
.chip:hover, .chip.on, .chips.picked .chip:hover, .chips.picked .chip.on {
  color: var(--red); text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: var(--red);
}
.sep { color: var(--disabled); padding: 0 18px; }
.mob .sep { padding: 0 12px; }
.sep.hide { opacity: 0; }
.other-input {
  font-family: var(--mono); font-weight: 400; font-size: 16px; letter-spacing: 0; width: 180px;
  background: transparent; border: 0; border-bottom: 1px solid var(--red); color: var(--fg);
  padding: 6px 2px; outline: none; text-align: left; align-self: center; border-radius: 0;
}
.c-input {
  background: transparent; border: 0; border-bottom: 1px solid var(--disabled); border-radius: 0; color: var(--fg);
  font-family: var(--sans); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.35; padding: 8px 0 10px;
  outline: none; text-align: center; width: 100%; display: block;
}
textarea.c-input { resize: none; overflow: hidden; }
.c-fields { display: flex; flex-direction: column; gap: 28px; width: 100%; }
.c-label { display: flex; flex-direction: column; gap: 6px; }
.c-label > span { font-family: var(--mono); font-size: 12px; color: var(--label); }
.summary { display: flex; flex-direction: column; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 14px; line-height: 1.6; width: 100%; text-align: left; }
.sum-row { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.sum-row span:first-child { color: var(--label); }
.sum-row span:last-child { white-space: pre-wrap; overflow-wrap: anywhere; }
.c-err { font-family: var(--mono); font-size: 14px; line-height: 1.7; color: var(--red); }
.controls { display: flex; justify-content: space-between; align-items: center; width: 100%; font-family: var(--mono); font-size: 14px; line-height: 1; }
.controls button { font-family: var(--mono); font-size: 14px; line-height: 1; padding: 10px 0; transition: color .2s; }
.back { color: var(--label); }
.back:hover { color: var(--fg); }
.next { margin-left: auto; color: var(--disabled); cursor: not-allowed; }
.next.ok { color: var(--fg); cursor: pointer; }
.next.ok:hover { color: var(--red); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
